mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader/fx: Fix the matrix type class for fx_2_0.
CTAB type correctly reflects matrix majority, unlike effects type data that does not respond to majority modifiers at all. It doesn't transpose default values either. Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
b9e894f232
commit
c8cc1b1a24
Notes:
Henri Verbeet
2024-08-19 14:30:34 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1003
@ -894,6 +894,13 @@ static uint32_t write_fx_2_string(const char *string, struct fx_write_context *f
|
||||
return offset;
|
||||
}
|
||||
|
||||
static uint32_t get_fx_2_type_class(const struct hlsl_type *type)
|
||||
{
|
||||
if (type->class == HLSL_CLASS_MATRIX)
|
||||
return D3DXPC_MATRIX_ROWS;
|
||||
return hlsl_sm1_class(type);
|
||||
}
|
||||
|
||||
static uint32_t write_fx_2_parameter(const struct hlsl_type *type, const char *name, const struct hlsl_semantic *semantic,
|
||||
struct fx_write_context *fx)
|
||||
{
|
||||
@ -912,7 +919,7 @@ static uint32_t write_fx_2_parameter(const struct hlsl_type *type, const char *n
|
||||
semantic_offset = semantic->raw_name ? write_string(semantic->raw_name, fx) : 0;
|
||||
|
||||
offset = put_u32(buffer, hlsl_sm1_base_type(type));
|
||||
put_u32(buffer, hlsl_sm1_class(type));
|
||||
put_u32(buffer, get_fx_2_type_class(type));
|
||||
put_u32(buffer, name_offset);
|
||||
put_u32(buffer, semantic_offset);
|
||||
put_u32(buffer, elements_count);
|
||||
|
Loading…
Reference in New Issue
Block a user