From c792114a6a58c7c97abf827d154d7ecd22d81536 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 10 Jul 2024 19:24:48 +0200 Subject: [PATCH] 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 --- 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));