vkd3d-shader/fx: Do not output empty strings for missing semantics for fx_2_0.

This is directly visible in parameter description. For a parameter without semantic
it should return null, instead of a pointer to an empty string.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-07-10 19:24:48 +02:00 committed by Henri Verbeet
parent 85fe4c421b
commit c792114a6a
Notes: Henri Verbeet 2024-07-11 00:42:34 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/940

View File

@ -830,7 +830,7 @@ static uint32_t write_fx_2_parameter(const struct hlsl_type *type, const char *n
}
name_offset = write_string(name, fx);
semantic_offset = write_string(semantic->raw_name, fx);
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));