[PATCH v2 0/1] MR381: vkd3d-shader/tpf: Handle "COLOR" semantic the same way as "sv_target" in the parser.
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> -- v2: vkd3d-shader/tpf: Return usage for all known semantic names. https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/381
From: Nikolay Sivov <nsivov(a)codeweavers.com> The write_sm4_signature() helper exlicitly handles "color", "depth", "position" semantics and turns them to corresponding system values names. This does not currently work because usage is not returned for said names. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- libs/vkd3d-shader/tpf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/vkd3d-shader/tpf.c b/libs/vkd3d-shader/tpf.c index d6902f8b6..9b1be36b5 100644 --- a/libs/vkd3d-shader/tpf.c +++ b/libs/vkd3d-shader/tpf.c @@ -2806,8 +2806,7 @@ bool hlsl_sm4_usage_from_semantic(struct hlsl_ctx *ctx, const struct hlsl_semant { if (!ascii_strcasecmp(semantic->name, semantics[i].name) && output == semantics[i].output - && ctx->profile->type == semantics[i].shader_type - && !ascii_strncasecmp(semantic->name, "sv_", 3)) + && ctx->profile->type == semantics[i].shader_type) { *usage = semantics[i].usage; return true; -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/381
On Wed Oct 4 22:28:21 2023 +0000, Zebediah Figura wrote:
Yes, I think we should remove 1/2 until we have evidence it's necessary. Done.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/381#note_47638
Apparently this should be conditional to backwards compatibility mode, without it on Windows signatures are not modified. I didn't notice it at first, because pixel shader already required it for tex2D().
From what I can tell, for vertex shaders compat mode maps POSITION -\> SV_Position for outputs, and for pixel shaders POSITION -\> SV_Position for inputs, and COLORN -\> SV_TargetN for outputs.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/381#note_47678
Create a bug report for this https://bugs.winehq.org/show_bug.cgi?id=55719, to make it easier to retest. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/381#note_47680
participants (2)
-
Nikolay Sivov -
Nikolay Sivov (@nsivov)