vkd3d-shader/dxil: Handle SV_Coverage out.

This commit is contained in:
Conor McCarthy 2024-04-24 12:37:31 +10:00 committed by Alexandre Julliard
parent e4724b4635
commit 4f50af4c83
Notes: Alexandre Julliard 2024-05-14 23:00:31 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/864
2 changed files with 5 additions and 2 deletions

View File

@ -3821,6 +3821,8 @@ static enum vkd3d_shader_register_type register_type_from_dxil_semantic_kind(
{ {
switch (sysval_semantic) switch (sysval_semantic)
{ {
case VKD3D_SHADER_SV_COVERAGE:
return VKD3DSPR_COVERAGE;
case VKD3D_SHADER_SV_DEPTH: case VKD3D_SHADER_SV_DEPTH:
return VKD3DSPR_DEPTHOUT; return VKD3DSPR_DEPTHOUT;
case VKD3D_SHADER_SV_DEPTH_GREATER_EQUAL: case VKD3D_SHADER_SV_DEPTH_GREATER_EQUAL:
@ -8455,6 +8457,7 @@ static const enum vkd3d_shader_sysval_semantic sysval_semantic_table[] =
[SEMANTIC_KIND_POSITION] = VKD3D_SHADER_SV_POSITION, [SEMANTIC_KIND_POSITION] = VKD3D_SHADER_SV_POSITION,
[SEMANTIC_KIND_PRIMITIVEID] = VKD3D_SHADER_SV_PRIMITIVE_ID, [SEMANTIC_KIND_PRIMITIVEID] = VKD3D_SHADER_SV_PRIMITIVE_ID,
[SEMANTIC_KIND_ISFRONTFACE] = VKD3D_SHADER_SV_IS_FRONT_FACE, [SEMANTIC_KIND_ISFRONTFACE] = VKD3D_SHADER_SV_IS_FRONT_FACE,
[SEMANTIC_KIND_COVERAGE] = VKD3D_SHADER_SV_COVERAGE,
[SEMANTIC_KIND_TARGET] = VKD3D_SHADER_SV_TARGET, [SEMANTIC_KIND_TARGET] = VKD3D_SHADER_SV_TARGET,
[SEMANTIC_KIND_DEPTH] = VKD3D_SHADER_SV_DEPTH, [SEMANTIC_KIND_DEPTH] = VKD3D_SHADER_SV_DEPTH,
[SEMANTIC_KIND_DEPTHLESSEQUAL] = VKD3D_SHADER_SV_DEPTH_LESS_EQUAL, [SEMANTIC_KIND_DEPTHLESSEQUAL] = VKD3D_SHADER_SV_DEPTH_LESS_EQUAL,

View File

@ -13,11 +13,11 @@ float4 main(out uint sample_mask : SV_Coverage) : SV_Target
} }
[test] [test]
todo draw quad todo(sm<6) draw quad
probe all rgba (0.5, 0.5, 0.5, 0.5) probe all rgba (0.5, 0.5, 0.5, 0.5)
sample mask 0x0b sample mask 0x0b
clear rtv 0 0.0 0.0 0.0 0.0 clear rtv 0 0.0 0.0 0.0 0.0
todo draw quad todo(sm<6) draw quad
probe all rgba (0.25, 0.25, 0.25, 0.25) probe all rgba (0.25, 0.25, 0.25, 0.25)