vkd3d-shader/hlsl: Handle the "_centroid" modifier suffix in semantic names.

This commit is contained in:
Shaun Ren
2025-09-08 12:07:57 -04:00
committed by Henri Verbeet
parent 5e4ee62cad
commit 44582a930c
Notes: Henri Verbeet 2025-10-06 19:48:17 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1721
3 changed files with 33 additions and 18 deletions

View File

@@ -215,11 +215,11 @@ float4 main(float4 pos : SV_Position, float2 attr : ATTR_centRoid,
[test]
clear rtv 0 1.0 1.0 1.0 1.0
if(sm<6) draw triangle list 3
if(sm<6) todo probe (0, 0) f32(0.25, 0.25, 0.25, 0.25)
if(sm<6) todo(msl | glsl) draw triangle list 3
if(sm<6) todo(llvmpipe) probe (0, 0) f32(0.25, 0.25, 0.25, 0.25)
if(sm<6) probe (638, 0) f32(0.0, 0.0, 0.0, 0.0)
if(sm<6) todo probe (0, 478) f32(0.25, 0.25, 0.25, 0.25)
if(sm<6) probe (639, 479) f32(0.0, 0.0, 0.0, 0.0)
if(sm<6) probe (0, 478) f32(0.25, 0.25, 0.25, 0.25)
if(sm<6) todo(llvmpipe) probe (639, 479) f32(0.0, 0.0, 0.0, 0.0)
% The "_centroid" semantic modifier can be specified together with the "centroid" prefix attribute.
@@ -285,11 +285,11 @@ float4 main(ps_in data) : SV_Target
[test]
clear rtv 0 1.0 1.0 1.0 1.0
if(sm<6) draw triangle list 3
if(sm<6) todo probe (0, 0) f32(0.25, 0.25, 0.25, 0.25)
if(sm<6) todo(msl | glsl) draw triangle list 3
if(sm<6) todo(llvmpipe) probe (0, 0) f32(0.25, 0.25, 0.25, 0.25)
if(sm<6) probe (638, 0) f32(0.0, 0.0, 0.0, 0.0)
if(sm<6) todo probe (0, 478) f32(0.25, 0.25, 0.25, 0.25)
if(sm<6) probe (639, 479) f32(0.0, 0.0, 0.0, 0.0)
if(sm<6) probe (0, 478) f32(0.25, 0.25, 0.25, 0.25)
if(sm<6) todo(llvmpipe) probe (639, 479) f32(0.0, 0.0, 0.0, 0.0)
[pixel shader]
static const float2 positions[4] =
@@ -329,9 +329,9 @@ float4 main(float4 pos : SV_Position, float2 attr : ATTR, float2 attr2 : ATTR_ce
[test]
clear rtv 0 1.0 1.0 1.0 1.0
% This test causes the GPU to hang with MVK.
if(sm<6 & !mvk) draw triangle list 3
if(sm<6 & !mvk) probe (0, 0) f32(1.0, 1.75, 0.25, 0.25)
if(sm<6 & !mvk) probe (638, 0) f32(1.0, 2.0, 0.0, 0.0)
if(sm<6 & !mvk) todo(msl | glsl) draw triangle list 3
if(sm<6 & !mvk) todo probe (0, 0) f32(1.0, 1.75, 0.25, 0.25)
if(sm<6 & !mvk) todo probe (638, 0) f32(1.0, 2.0, 0.0, 0.0)
% Sample interpolation.