intermittent commit: do not spawn doomsim instances to test rendering
Without spawning doomsims the SDL_UpdateTexture()+SDL_RenderCopy() way does scale well: with 1024 non-spawned dooms I'm at 19.4 fps, 51.5 ms/frame. A single core is maxed out all the time and it's nicely jumping between cores.
This commit is contained in:
parent
feb0bc995c
commit
773ea7341c
1 changed files with 3 additions and 1 deletions
|
@ -62,12 +62,14 @@ void spawn_doom(ControllerContext &ctx)
|
||||||
|
|
||||||
// TODO: Close stdin and stdout? Leave them open for now to see the logging
|
// TODO: Close stdin and stdout? Leave them open for now to see the logging
|
||||||
// output.
|
// output.
|
||||||
|
#if 0
|
||||||
if (auto err = posix_spawn(&ds.id, "doomsim", nullptr, nullptr,
|
if (auto err = posix_spawn(&ds.id, "doomsim", nullptr, nullptr,
|
||||||
const_cast<char *const *>(argv), nullptr))
|
const_cast<char *const *>(argv), nullptr))
|
||||||
{
|
{
|
||||||
log_error("Could not spawn doom: %s", strerror(err));
|
log_error("Could not spawn doom: %s", strerror(err));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ds.texture = SDL_CreateTexture(ctx.renderer, SDL_PIXELFORMAT_ARGB8888,
|
ds.texture = SDL_CreateTexture(ctx.renderer, SDL_PIXELFORMAT_ARGB8888,
|
||||||
SDL_TEXTUREACCESS_STREAMING, DoomScreenWidth, DoomScreenHeight);
|
SDL_TEXTUREACCESS_STREAMING, DoomScreenWidth, DoomScreenHeight);
|
||||||
|
@ -177,7 +179,7 @@ void final_cleanup(ControllerContext &ctx)
|
||||||
if (!ctx.dooms.empty())
|
if (!ctx.dooms.empty())
|
||||||
{
|
{
|
||||||
log_warn("final cleanup: terminating all %zu remaining dooms", ctx.dooms.size());
|
log_warn("final cleanup: terminating all %zu remaining dooms", ctx.dooms.size());
|
||||||
signal_all_dooms(ctx, SIGTERM);
|
//signal_all_dooms(ctx, SIGTERM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue