Zebediah Figura : vkd3d-shader: Replace hlsl_message() with hlsl_error().

Alexandre Julliard julliard at winehq.org
Tue Feb 23 15:51:18 CST 2021


Module: vkd3d
Branch: master
Commit: 7069fa1c40f8762581336b57b06f0f41c5ca6161
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=7069fa1c40f8762581336b57b06f0f41c5ca6161

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Sun Feb 21 22:04:37 2021 -0600

vkd3d-shader: Replace hlsl_message() with hlsl_error().

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 libs/vkd3d-shader/hlsl.c | 5 -----
 libs/vkd3d-shader/hlsl.h | 2 --
 libs/vkd3d-shader/hlsl.y | 4 +++-
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
index 1f9a392..dbc6954 100644
--- a/libs/vkd3d-shader/hlsl.c
+++ b/libs/vkd3d-shader/hlsl.c
@@ -20,11 +20,6 @@
 #include "hlsl.h"
 #include <stdio.h>
 
-void hlsl_message(const char *fmt, ...)
-{
-    /* FIXME */
-}
-
 void hlsl_note(struct hlsl_ctx *ctx, const struct vkd3d_shader_location loc,
         enum vkd3d_shader_log_level level, const char *fmt, ...)
 {
diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h
index 9122b09..a374f54 100644
--- a/libs/vkd3d-shader/hlsl.h
+++ b/libs/vkd3d-shader/hlsl.h
@@ -544,8 +544,6 @@ struct hlsl_ir_var *hlsl_new_var(const char *name, struct hlsl_type *type, const
         const struct hlsl_reg_reservation *reg_reservation) DECLSPEC_HIDDEN;
 struct hlsl_ir_load *hlsl_new_var_load(struct hlsl_ir_var *var, const struct vkd3d_shader_location loc) DECLSPEC_HIDDEN;
 
-void hlsl_message(const char *fmt, ...) VKD3D_PRINTF_FUNC(1,2) DECLSPEC_HIDDEN;
-
 void hlsl_error(struct hlsl_ctx *ctx, const struct vkd3d_shader_location loc, enum vkd3d_shader_error error,
         const char *fmt, ...) VKD3D_PRINTF_FUNC(4, 5) DECLSPEC_HIDDEN;
 void hlsl_warning(struct hlsl_ctx *ctx, const struct vkd3d_shader_location loc, enum vkd3d_shader_error error,
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y
index b6d0324..ea640b9 100644
--- a/libs/vkd3d-shader/hlsl.y
+++ b/libs/vkd3d-shader/hlsl.y
@@ -3110,7 +3110,9 @@ int hlsl_parser_compile(struct hlsl_ctx *ctx, const char *entrypoint)
 
     if (!(entry_func = get_func_entry(ctx, entrypoint)))
     {
-        hlsl_message("error: entry point \"%s\" is not defined\n", entrypoint);
+        const struct vkd3d_shader_location loc = {.source_name = ctx->location.source_name};
+
+        hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_NOT_DEFINED, "Entry point \"%s\" is not defined.", entrypoint);
         return VKD3D_ERROR_INVALID_SHADER;
     }
 




More information about the wine-cvs mailing list