Skip to content
Permalink
Browse files

Headless: Fix graphics tests for Vulkan/Direct3D.

Otherwise we hang because there's no thread to ever end.
  • Loading branch information...
unknownbrackets committed Jul 29, 2018
1 parent fba0de5 commit 78dc07e7a3af43147944f4f3be87a25dc2c69ef1
Showing with 2 additions and 1 deletion.
  1. +1 −0 GPU/GLES/TextureCacheGLES.cpp
  2. +1 −1 headless/WindowsHeadlessHost.cpp
@@ -862,6 +862,7 @@ bool TextureCacheGLES::GetCurrentTextureDebug(GPUDebugBuffer &buffer, int level)
GLRenderManager *renderManager = (GLRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);

// Not a framebuffer, so let's assume these are right.
// TODO: But they may definitely not be, if the texture was scaled.
int w = gstate.getTextureWidth(level);
int h = gstate.getTextureHeight(level);

@@ -163,7 +163,7 @@ bool WindowsHeadlessHost::InitGraphics(std::string *error_message, GraphicsConte

void WindowsHeadlessHost::ShutdownGraphics() {
gfx_->StopThread();
while (threadState_ != RenderThreadState::STOPPED)
while (threadState_ != RenderThreadState::STOPPED && threadState_ != RenderThreadState::IDLE)
sleep_ms(1);

gfx_->Shutdown();

0 comments on commit 78dc07e

Please sign in to comment.
You can’t perform that action at this time.