mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader/spirv: Handle the WAVELANEINDEX register.
This commit is contained in:
parent
29786d7efb
commit
c770efc530
Notes:
Alexandre Julliard
2024-05-02 22:40:21 +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/800
@ -3157,6 +3157,9 @@ static bool spirv_compiler_get_register_name(char *buffer, unsigned int buffer_s
|
||||
case VKD3DSPR_WAVELANECOUNT:
|
||||
snprintf(buffer, buffer_size, "vWaveLaneCount");
|
||||
break;
|
||||
case VKD3DSPR_WAVELANEINDEX:
|
||||
snprintf(buffer, buffer_size, "vWaveLaneIndex");
|
||||
break;
|
||||
default:
|
||||
FIXME("Unhandled register %#x.\n", reg->type);
|
||||
snprintf(buffer, buffer_size, "unrecognized_%#x", reg->type);
|
||||
@ -4543,6 +4546,7 @@ static void spirv_compiler_decorate_builtin(struct spirv_compiler *compiler,
|
||||
vkd3d_spirv_enable_capability(builder, SpvCapabilityCullDistance);
|
||||
break;
|
||||
case SpvBuiltInSubgroupSize:
|
||||
case SpvBuiltInSubgroupLocalInvocationId:
|
||||
vkd3d_spirv_enable_capability(builder, SpvCapabilityGroupNonUniform);
|
||||
break;
|
||||
default:
|
||||
@ -4736,6 +4740,7 @@ vkd3d_register_builtins[] =
|
||||
{VKD3DSPR_OUTSTENCILREF, {VKD3D_SHADER_COMPONENT_UINT, 1, SpvBuiltInFragStencilRefEXT}},
|
||||
|
||||
{VKD3DSPR_WAVELANECOUNT, {VKD3D_SHADER_COMPONENT_UINT, 1, SpvBuiltInSubgroupSize}},
|
||||
{VKD3DSPR_WAVELANEINDEX, {VKD3D_SHADER_COMPONENT_UINT, 1, SpvBuiltInSubgroupLocalInvocationId}},
|
||||
};
|
||||
|
||||
static void spirv_compiler_emit_register_execution_mode(struct spirv_compiler *compiler,
|
||||
|
@ -63,7 +63,7 @@ void main(uint id : SV_GroupIndex)
|
||||
}
|
||||
|
||||
[test]
|
||||
todo dispatch 4 1 1
|
||||
dispatch 4 1 1
|
||||
probe uav 1 (0) rui (0)
|
||||
probe uav 1 (1) rui (1)
|
||||
probe uav 1 (2) rui (2)
|
||||
|
Loading…
Reference in New Issue
Block a user