mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader: Handle the SV_SampleIndex semantic.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
bfd1fc9cd6
commit
75299c04fd
Notes:
Henri Verbeet
2024-09-10 21:55:43 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1034
@ -2814,6 +2814,7 @@ bool sysval_semantic_from_hlsl(enum vkd3d_shader_sysval_semantic *semantic,
|
||||
{"sv_isfrontface", false, VKD3D_SHADER_TYPE_PIXEL, VKD3D_SHADER_SV_IS_FRONT_FACE},
|
||||
{"sv_rendertargetarrayindex", false, VKD3D_SHADER_TYPE_PIXEL, VKD3D_SHADER_SV_RENDER_TARGET_ARRAY_INDEX},
|
||||
{"sv_viewportarrayindex", false, VKD3D_SHADER_TYPE_PIXEL, VKD3D_SHADER_SV_VIEWPORT_ARRAY_INDEX},
|
||||
{"sv_sampleindex", false, VKD3D_SHADER_TYPE_PIXEL, VKD3D_SHADER_SV_SAMPLE_INDEX},
|
||||
|
||||
{"color", true, VKD3D_SHADER_TYPE_PIXEL, VKD3D_SHADER_SV_TARGET},
|
||||
{"depth", true, VKD3D_SHADER_TYPE_PIXEL, VKD3D_SHADER_SV_DEPTH},
|
||||
@ -4461,6 +4462,7 @@ static void write_sm4_dcl_semantic(const struct tpf_writer *tpf, const struct hl
|
||||
case VKD3D_SHADER_SV_INSTANCE_ID:
|
||||
case VKD3D_SHADER_SV_PRIMITIVE_ID:
|
||||
case VKD3D_SHADER_SV_VERTEX_ID:
|
||||
case VKD3D_SHADER_SV_SAMPLE_INDEX:
|
||||
instr.opcode = (profile->type == VKD3D_SHADER_TYPE_PIXEL)
|
||||
? VKD3D_SM4_OP_DCL_INPUT_PS_SGV : VKD3D_SM4_OP_DCL_INPUT_SGV;
|
||||
break;
|
||||
|
@ -2062,7 +2062,8 @@ static void test_signature_reflection(void)
|
||||
" out uint c : sv_coverage,\n"
|
||||
" in float4 d : position,\n"
|
||||
" in float4 e : sv_position,\n"
|
||||
" out float f : sv_depth)\n"
|
||||
" out float f : sv_depth,\n"
|
||||
" in uint g : sv_sampleindex)\n"
|
||||
"{\n"
|
||||
" b = d;\n"
|
||||
" c = 0;\n"
|
||||
@ -2071,9 +2072,10 @@ static void test_signature_reflection(void)
|
||||
|
||||
static const D3D12_SIGNATURE_PARAMETER_DESC ps1_inputs[] =
|
||||
{
|
||||
{"apple", 0, 0, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0x3},
|
||||
{"position", 0, 1, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0xf},
|
||||
{"sv_position", 0, 2, D3D_NAME_POSITION, D3D_REGISTER_COMPONENT_FLOAT32, 0xf},
|
||||
{"apple", 0, 0, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0x3},
|
||||
{"position", 0, 1, D3D_NAME_UNDEFINED, D3D_REGISTER_COMPONENT_FLOAT32, 0xf, 0xf},
|
||||
{"sv_position", 0, 2, D3D_NAME_POSITION, D3D_REGISTER_COMPONENT_FLOAT32, 0xf},
|
||||
{"sv_sampleindex", 0, 3, D3D_NAME_SAMPLE_INDEX, D3D_REGISTER_COMPONENT_UINT32, 0x1},
|
||||
};
|
||||
|
||||
static const D3D12_SIGNATURE_PARAMETER_DESC ps1_outputs[] =
|
||||
|
Loading…
Reference in New Issue
Block a user