mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-23 06:05:45 +00:00
Mark unbound pixel shader in GL pixel history
This commit is contained in:
@@ -1963,6 +1963,14 @@ void QueryPrimitiveIdPerFragment(WrappedOpenGL *driver, GLReplay *replay,
|
||||
GLRenderState state;
|
||||
state.FetchState(driver);
|
||||
|
||||
ResourceId ps;
|
||||
if(state.Program.name)
|
||||
ps = driver->GetProgram(driver->GetResourceManager()->GetResID(state.Program))
|
||||
.stageShaders[(int)ShaderStage::Pixel];
|
||||
else
|
||||
ps = driver->GetPipeline(driver->GetResourceManager()->GetResID(state.Pipeline))
|
||||
.stageShaders[(int)ShaderStage::Pixel];
|
||||
|
||||
driver->glBindFramebuffer(eGL_FRAMEBUFFER, resources.fullPrecisionFrameBuffer);
|
||||
driver->glReadBuffer(eGL_COLOR_ATTACHMENT0);
|
||||
// rebind colour image to 0
|
||||
@@ -2067,6 +2075,9 @@ void QueryPrimitiveIdPerFragment(WrappedOpenGL *driver, GLReplay *replay,
|
||||
RDCERR("Primitive ID was not written correctly");
|
||||
}
|
||||
|
||||
if(ps == ResourceId())
|
||||
historyIndex->unboundPS = true;
|
||||
|
||||
++historyIndex;
|
||||
}
|
||||
driver->glUseProgram(currentProgram);
|
||||
|
||||
Reference in New Issue
Block a user