Module: vkd3d Branch: master Commit: c792114a6a58c7c97abf827d154d7ecd22d81536 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/c792114a6a58c7c97abf827d154d7e...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Wed Jul 10 19:24:48 2024 +0200
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
---
libs/vkd3d-shader/fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/fx.c b/libs/vkd3d-shader/fx.c index 0857ebb6..bd2ad129 100644 --- a/libs/vkd3d-shader/fx.c +++ b/libs/vkd3d-shader/fx.c @@ -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));