Don't use uint8_t compCount to store GL enum that might be GL_BGRA

This commit is contained in:
baldurk
2017-08-24 21:04:46 +01:00
parent 2a0fac1ad6
commit d12aa5196c
+5 -2
View File
@@ -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;