Module: vkd3d Branch: master Commit: 0cf39f3c63472e34968f71e4f4aacd7448f55231 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/0cf39f3c63472e34968f71e4f4aacd...
Author: Zebediah Figura zfigura@codeweavers.com Date: Thu Feb 9 14:36:58 2023 -0600
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; } }