|
|
@@ -1002,7 +1002,7 @@ r_annotate_struct_layout(uint32_t type_id) {
|
|
|
if (const ShaderType::Matrix *matrix_type = base_type->as_matrix()) {
|
|
|
// Matrix types need to be explicitly laid out.
|
|
|
add_annotation(spv::OpMemberDecorate,
|
|
|
- {type_id, i, spv::DecorationMatrixStride, matrix_type->get_num_columns() * 4});
|
|
|
+ {type_id, i, spv::DecorationMatrixStride, (matrix_type->get_scalar_type() == ShaderType::ST_double) ? 32 : 16});
|
|
|
add_annotation(spv::OpMemberDecorate,
|
|
|
{type_id, i, spv::DecorationColMajor});
|
|
|
} else {
|