mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
libs/vkd3d-shader: Implement SV_RenderTargetArrayIndex.
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
9974237f35
commit
b59ad01dd2
@ -2779,33 +2779,9 @@ static uint32_t vkd3d_spirv_front_facing_fixup(struct vkd3d_dxbc_compiler *compi
|
||||
return vkd3d_dxbc_compiler_emit_bool_to_int(compiler, 1, front_facing_id);
|
||||
}
|
||||
|
||||
/* The Vulkan spec says:
|
||||
*
|
||||
* "The variable decorated with GlobalInvocationId must be declared as a
|
||||
* three-component vector of 32-bit integers."
|
||||
*
|
||||
* "The variable decorated with LocalInvocationId must be declared as a
|
||||
* three-component vector of 32-bit integers."
|
||||
*
|
||||
* "The variable decorated with WorkgroupId must be declared as a
|
||||
* three-component vector of 32-bit integers."
|
||||
*
|
||||
* "The variable decorated with FragCoord must be declared as a
|
||||
* four-component vector of 32-bit floating-point values."
|
||||
*
|
||||
* "The variable decorated with FragDepth must be declared as a scalar 32-bit
|
||||
* floating-point value."
|
||||
*
|
||||
* "Any variable decorated with Position must be declared as a four-component
|
||||
* vector of 32-bit floating-point values."
|
||||
*
|
||||
* "The variable decorated with VertexIndex must be declared as a scalar
|
||||
* 32-bit integer."
|
||||
*
|
||||
* "The variable decorated with InstanceIndex must be declared as a scalar
|
||||
* 32-bit integer."
|
||||
*
|
||||
* "The variable decorated with FrontFacing must be declared as a boolean."
|
||||
/*
|
||||
* The following table is based on the "14.6. Built-In Variables" section from
|
||||
* the Vulkan spec.
|
||||
*/
|
||||
static const struct vkd3d_spirv_builtin
|
||||
{
|
||||
@ -2835,6 +2811,8 @@ vkd3d_spirv_builtin_table[] =
|
||||
{VKD3D_SIV_VERTEX_ID, ~0u, VKD3D_TYPE_INT, 1, SpvBuiltInVertexIndex},
|
||||
{VKD3D_SIV_INSTANCE_ID, ~0u, VKD3D_TYPE_INT, 1, SpvBuiltInInstanceIndex, vkd3d_spirv_instance_id_fixup},
|
||||
|
||||
{VKD3D_SIV_RENDER_TARGET_ARRAY_INDEX, ~0u, VKD3D_TYPE_INT, 1, SpvBuiltInLayer},
|
||||
|
||||
{VKD3D_SIV_IS_FRONT_FACE, ~0u, VKD3D_TYPE_BOOL, 1, SpvBuiltInFrontFacing, vkd3d_spirv_front_facing_fixup},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user