mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Fix numeric register offset for matrix components.
This commit is contained in:
parent
ade3daa311
commit
ab01fedc5d
Notes:
Henri Verbeet
2024-06-11 16:55:09 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/787
@ -558,12 +558,14 @@ unsigned int hlsl_type_get_component_offset(struct hlsl_ctx *ctx, struct hlsl_ty
|
||||
|
||||
switch (type->class)
|
||||
{
|
||||
case HLSL_CLASS_SCALAR:
|
||||
case HLSL_CLASS_VECTOR:
|
||||
case HLSL_CLASS_MATRIX:
|
||||
offset[HLSL_REGSET_NUMERIC] += idx;
|
||||
break;
|
||||
|
||||
case HLSL_CLASS_MATRIX:
|
||||
offset[HLSL_REGSET_NUMERIC] += 4 * idx;
|
||||
break;
|
||||
|
||||
case HLSL_CLASS_STRUCT:
|
||||
for (r = 0; r <= HLSL_REGSET_LAST; ++r)
|
||||
offset[r] += type->e.record.fields[idx].reg_offset[r];
|
||||
@ -594,6 +596,7 @@ unsigned int hlsl_type_get_component_offset(struct hlsl_ctx *ctx, struct hlsl_ty
|
||||
case HLSL_CLASS_PASS:
|
||||
case HLSL_CLASS_TECHNIQUE:
|
||||
case HLSL_CLASS_VOID:
|
||||
case HLSL_CLASS_SCALAR:
|
||||
vkd3d_unreachable();
|
||||
}
|
||||
type = next_type;
|
||||
|
Loading…
Reference in New Issue
Block a user