Module: vkd3d Branch: master Commit: 437ef0896f6d59b5ccd90fc1e5c0299a4fcbf851 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/437ef0896f6d59b5ccd90fc1e5c029...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Fri Feb 23 14:55:34 2024 +0100
vkd3d-shader/fx: Make sure to set error message for unimplemented cases.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
---
libs/vkd3d-shader/fx.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/libs/vkd3d-shader/fx.c b/libs/vkd3d-shader/fx.c index 5ba24e6d..fd5c8443 100644 --- a/libs/vkd3d-shader/fx.c +++ b/libs/vkd3d-shader/fx.c @@ -284,6 +284,7 @@ static uint32_t get_fx_4_numeric_type_description(const struct hlsl_type *type, [HLSL_TYPE_UINT ] = 3, [HLSL_TYPE_BOOL ] = 4, }; + struct hlsl_ctx *ctx = fx->ctx; uint32_t value = 0;
switch (type->class) @@ -294,8 +295,7 @@ static uint32_t get_fx_4_numeric_type_description(const struct hlsl_type *type, value |= numeric_type_class[type->class]; break; default: - FIXME("Unexpected type class %u.\n", type->class); - set_status(fx, VKD3D_ERROR_NOT_IMPLEMENTED); + hlsl_fixme(ctx, &ctx->location, "Not implemented for type class %u.\n", type->class); return 0; }
@@ -308,8 +308,7 @@ static uint32_t get_fx_4_numeric_type_description(const struct hlsl_type *type, value |= (numeric_base_type[type->base_type] << NUMERIC_BASE_TYPE_SHIFT); break; default: - FIXME("Unexpected base type %u.\n", type->base_type); - set_status(fx, VKD3D_ERROR_NOT_IMPLEMENTED); + hlsl_fixme(ctx, &ctx->location, "Not implemented for base type %u.\n", type->base_type); return 0; }
@@ -358,6 +357,7 @@ static uint32_t write_fx_4_type(const struct hlsl_type *type, struct fx_write_co [HLSL_SAMPLER_DIM_BUFFER] = "RWBuffer", [HLSL_SAMPLER_DIM_STRUCTURED_BUFFER] = "RWStructuredBuffer", }; + struct hlsl_ctx *ctx = fx->ctx;
/* Resolve arrays to element type and number of elements. */ if (type->class == HLSL_CLASS_ARRAY) @@ -386,8 +386,7 @@ static uint32_t write_fx_4_type(const struct hlsl_type *type, struct fx_write_co put_u32_unaligned(buffer, variable_type[type->class]); break; default: - FIXME("Writing type class %u is not implemented.\n", type->class); - set_status(fx, VKD3D_ERROR_NOT_IMPLEMENTED); + hlsl_fixme(ctx, &ctx->location, "Writing type class %u is not implemented.\n", type->class); return 0; }
@@ -465,8 +464,7 @@ static uint32_t write_fx_4_type(const struct hlsl_type *type, struct fx_write_co put_u32_unaligned(buffer, uav_type[type->sampler_dim]); break; default: - FIXME("Object type %u is not supported.\n", type->base_type); - set_status(fx, VKD3D_ERROR_NOT_IMPLEMENTED); + hlsl_fixme(ctx, &ctx->location, "Object type %u is not supported.\n", type->base_type); return 0; } }