|
|
@@ -1507,6 +1507,7 @@ void CommandBuffer::setPushConstants(const void* data, U32 dataSize)
|
|
|
static_cast<ShaderProgramImpl&>(*state.m_crntProg).getReflection();
|
|
|
ANKI_ASSERT(refl.m_uniformDataSize == m_data.getSizeInBytes());
|
|
|
|
|
|
+ const Bool transpose = true;
|
|
|
for(const ShaderProgramImplReflection::Uniform& uni : refl.m_uniforms)
|
|
|
{
|
|
|
const U8* data = reinterpret_cast<const U8*>(&m_data[0]) + uni.m_pushConstantOffset;
|
|
|
@@ -1525,7 +1526,7 @@ void CommandBuffer::setPushConstants(const void* data, U32 dataSize)
|
|
|
glUniform4uiv(loc, count, reinterpret_cast<const GLuint*>(data));
|
|
|
break;
|
|
|
case ShaderVariableDataType::MAT4:
|
|
|
- glUniformMatrix4fv(loc, count, false, reinterpret_cast<const GLfloat*>(data));
|
|
|
+ glUniformMatrix4fv(loc, count, transpose, reinterpret_cast<const GLfloat*>(data));
|
|
|
break;
|
|
|
case ShaderVariableDataType::MAT3:
|
|
|
{
|
|
|
@@ -1533,7 +1534,7 @@ void CommandBuffer::setPushConstants(const void* data, U32 dataSize)
|
|
|
ANKI_ASSERT(count == 1 && "TODO");
|
|
|
const Mat3x4* m34 = reinterpret_cast<const Mat3x4*>(data);
|
|
|
Mat3 m3(m34->getRotationPart());
|
|
|
- glUniformMatrix3fv(loc, count, false, reinterpret_cast<const GLfloat*>(&m3));
|
|
|
+ glUniformMatrix3fv(loc, count, transpose, reinterpret_cast<const GLfloat*>(&m3));
|
|
|
break;
|
|
|
}
|
|
|
default:
|