SPIRV-Cross/shaders-msl/comp/mat3-row-maj-read-write-const.comp
Bill Hollings 9552ca5473 MSL: Support row-major transpose when storing matrix from constant RHS matrix.
Remove test and exception when storing row-major matrix
from RHS that is not a SPIRExpression.
Add test shaders.
2021-08-12 09:08:35 -04:00

18 lines
467 B
Plaintext

#version 450
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(set = 0, binding = 1, std430) buffer model_t
{
layout(row_major) mediump mat3 mtx_rm;
} model;
void main()
{
mat3 mtx_cm = model.mtx_rm;
mat3 mtx1 = mtx_cm * mat3(vec3(4.0, -3.0, 1.0), vec3(-7.0, 7.0, -7.0), vec3(-5.0, 6.0, -8.0));
if (mtx1[0][0] != 0.0)
{
model.mtx_rm = mat3(vec3(-5.0, -3.0, -5.0), vec3(-2.0, 2.0, -5.0), vec3(6.0, 3.0, -8.0));
}
}