From 4f50af4c83ee3bf5d098a5d8bdf961cb862d8caa Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Wed, 24 Apr 2024 12:37:31 +1000 Subject: [PATCH] vkd3d-shader/dxil: Handle SV_Coverage out. --- libs/vkd3d-shader/dxil.c | 3 +++ tests/hlsl/coverage.shader_test | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/vkd3d-shader/dxil.c b/libs/vkd3d-shader/dxil.c index 48b7fff3..fab0bde7 100644 --- a/libs/vkd3d-shader/dxil.c +++ b/libs/vkd3d-shader/dxil.c @@ -3821,6 +3821,8 @@ static enum vkd3d_shader_register_type register_type_from_dxil_semantic_kind( { switch (sysval_semantic) { + case VKD3D_SHADER_SV_COVERAGE: + return VKD3DSPR_COVERAGE; case VKD3D_SHADER_SV_DEPTH: return VKD3DSPR_DEPTHOUT; 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_PRIMITIVEID] = VKD3D_SHADER_SV_PRIMITIVE_ID, [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_DEPTH] = VKD3D_SHADER_SV_DEPTH, [SEMANTIC_KIND_DEPTHLESSEQUAL] = VKD3D_SHADER_SV_DEPTH_LESS_EQUAL, diff --git a/tests/hlsl/coverage.shader_test b/tests/hlsl/coverage.shader_test index faa933fe..e7cf30ad 100644 --- a/tests/hlsl/coverage.shader_test +++ b/tests/hlsl/coverage.shader_test @@ -13,11 +13,11 @@ float4 main(out uint sample_mask : SV_Coverage) : SV_Target } [test] -todo draw quad +todo(sm<6) draw quad probe all rgba (0.5, 0.5, 0.5, 0.5) sample mask 0x0b 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)