mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
Don't use uint8_t compCount to store GL enum that might be GL_BGRA
This commit is contained in:
@@ -941,7 +941,10 @@ void GLReplay::SavePipelineState()
|
||||
|
||||
fmt.type = ResourceFormatType::Regular;
|
||||
fmt.compCount = 4;
|
||||
gl.glGetVertexAttribiv(i, eGL_VERTEX_ATTRIB_ARRAY_SIZE, (GLint *)&fmt.compCount);
|
||||
GLint compCount;
|
||||
gl.glGetVertexAttribiv(i, eGL_VERTEX_ATTRIB_ARRAY_SIZE, (GLint *)&compCount);
|
||||
|
||||
fmt.compCount = (uint8_t)compCount;
|
||||
|
||||
bool intComponent = !normalized || integer;
|
||||
|
||||
@@ -1001,7 +1004,7 @@ void GLReplay::SavePipelineState()
|
||||
break;
|
||||
}
|
||||
|
||||
if(fmt.compCount == eGL_BGRA)
|
||||
if(compCount == eGL_BGRA)
|
||||
{
|
||||
fmt.compByteWidth = 1;
|
||||
fmt.compCount = 4;
|
||||
|
||||
Reference in New Issue
Block a user