mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Leave enum alone for passing to glGetProgramStageiv
* We can't pass GL_COMPUTE_SHADER to glGetProgramPipelineiv in some cases, but if we have a program (not pipeline) and want to query, we need the enum intact even if the AMD bug workaround is active.
This commit is contained in:
@@ -154,15 +154,19 @@ void GLRenderState::FetchState(void *ctx, WrappedOpenGL *gl)
|
||||
eGL_TESS_EVALUATION_SHADER,
|
||||
eGL_GEOMETRY_SHADER,
|
||||
eGL_FRAGMENT_SHADER,
|
||||
VendorCheck[VendorCheck_AMD_pipeline_compute_query] ? eGL_NONE : eGL_COMPUTE_SHADER,
|
||||
eGL_COMPUTE_SHADER,
|
||||
};
|
||||
|
||||
RDCCOMPILE_ASSERT(ARRAY_COUNT(shs) == ARRAY_COUNT(Subroutines), "Subroutine array not the right size");
|
||||
for(size_t s=0; s < ARRAY_COUNT(shs); s++)
|
||||
{
|
||||
GLuint prog = Program;
|
||||
if(prog == 0 && Pipeline != 0 && shs[s] != eGL_NONE)
|
||||
m_Real->glGetProgramPipelineiv(Pipeline, shs[s], (GLint *)&prog);
|
||||
if(prog == 0 && Pipeline != 0)
|
||||
{
|
||||
// can't query for GL_COMPUTE_SHADER on some AMD cards
|
||||
if(shs[s] != eGL_COMPUTE_SHADER || !VendorCheck[VendorCheck_AMD_pipeline_compute_query])
|
||||
m_Real->glGetProgramPipelineiv(Pipeline, shs[s], (GLint *)&prog);
|
||||
}
|
||||
|
||||
if(prog == 0) continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user