From 0cf39f3c63472e34968f71e4f4aacd7448f55231 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Thu, 9 Feb 2023 14:36:58 -0600 Subject: [PATCH] vkd3d-shader/hlsl: Emit a hlsl_fixme() if multiple valid entry point definitions are given. --- libs/vkd3d-shader/hlsl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c index 1f21f043..3656d05d 100644 --- a/libs/vkd3d-shader/hlsl.c +++ b/libs/vkd3d-shader/hlsl.c @@ -2696,8 +2696,13 @@ int hlsl_compile_shader(const struct vkd3d_shader_code *hlsl, const struct vkd3d { if (!decl->has_body) continue; + if (entry_func) + { + /* Depending on d3dcompiler version, either the first or last is + * selected. */ + hlsl_fixme(&ctx, &decl->loc, "Multiple valid entry point definitions."); + } entry_func = decl; - break; } }