mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader: Implement SV_ViewportArrayIndex.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2f5b718205
commit
94497f31a0
@ -2942,6 +2942,12 @@ static void vkd3d_dxbc_compiler_decorate_builtin(struct vkd3d_dxbc_compiler *com
|
||||
case SpvBuiltInLayer:
|
||||
vkd3d_spirv_enable_capability(builder, SpvCapabilityGeometry);
|
||||
break;
|
||||
case SpvBuiltInViewportIndex:
|
||||
vkd3d_spirv_enable_capability(builder, SpvCapabilityMultiViewport);
|
||||
break;
|
||||
case SpvBuiltInSampleId:
|
||||
vkd3d_spirv_enable_capability(builder, SpvCapabilitySampleRateShading);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -3012,14 +3018,6 @@ static uint32_t sv_front_face_fixup(struct vkd3d_dxbc_compiler *compiler,
|
||||
return vkd3d_dxbc_compiler_emit_bool_to_int(compiler, 1, front_facing_id);
|
||||
}
|
||||
|
||||
static uint32_t sv_sample_index(struct vkd3d_dxbc_compiler *compiler, uint32_t id)
|
||||
{
|
||||
struct vkd3d_spirv_builder *builder = &compiler->spirv_builder;
|
||||
|
||||
vkd3d_spirv_enable_capability(builder, SpvCapabilitySampleRateShading);
|
||||
return id;
|
||||
}
|
||||
|
||||
struct vkd3d_spirv_builtin
|
||||
{
|
||||
enum vkd3d_component_type component_type;
|
||||
@ -3049,10 +3047,11 @@ vkd3d_system_value_builtins[] =
|
||||
{VKD3D_SIV_INSTANCE_ID, {VKD3D_TYPE_INT, 1, SpvBuiltInInstanceIndex, sv_instance_id_fixup}},
|
||||
|
||||
{VKD3D_SIV_RENDER_TARGET_ARRAY_INDEX, {VKD3D_TYPE_INT, 1, SpvBuiltInLayer}},
|
||||
{VKD3D_SIV_VIEWPORT_ARRAY_INDEX, {VKD3D_TYPE_INT, 1, SpvBuiltInViewportIndex}},
|
||||
|
||||
{VKD3D_SIV_IS_FRONT_FACE, {VKD3D_TYPE_BOOL, 1, SpvBuiltInFrontFacing, sv_front_face_fixup}},
|
||||
|
||||
{VKD3D_SIV_SAMPLE_INDEX, {VKD3D_TYPE_UINT, 1, SpvBuiltInSampleId, sv_sample_index}},
|
||||
{VKD3D_SIV_SAMPLE_INDEX, {VKD3D_TYPE_UINT, 1, SpvBuiltInSampleId}},
|
||||
|
||||
{VKD3D_SIV_CLIP_DISTANCE, {VKD3D_TYPE_FLOAT, 1, SpvBuiltInClipDistance, NULL, true}},
|
||||
{VKD3D_SIV_CULL_DISTANCE, {VKD3D_TYPE_FLOAT, 1, SpvBuiltInCullDistance, NULL, true}},
|
||||
|
Loading…
x
Reference in New Issue
Block a user