mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
zink: add conversion util for nir_scope -> SpvScope
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10510>
This commit is contained in:
parent
3c06eede9c
commit
73210e3a99
1 changed files with 15 additions and 0 deletions
|
|
@ -123,6 +123,21 @@ get_bvec_type(struct ntv_context *ctx, int num_components)
|
|||
return bool_type;
|
||||
}
|
||||
|
||||
static SpvScope
|
||||
get_scope(nir_scope scope)
|
||||
{
|
||||
SpvScope conv[] = {
|
||||
[NIR_SCOPE_NONE] = 0,
|
||||
[NIR_SCOPE_INVOCATION] = SpvScopeInvocation,
|
||||
[NIR_SCOPE_SUBGROUP] = SpvScopeSubgroup,
|
||||
[NIR_SCOPE_SHADER_CALL] = SpvScopeShaderCallKHR,
|
||||
[NIR_SCOPE_WORKGROUP] = SpvScopeWorkgroup,
|
||||
[NIR_SCOPE_QUEUE_FAMILY] = SpvScopeQueueFamily,
|
||||
[NIR_SCOPE_DEVICE] = SpvScopeDevice,
|
||||
};
|
||||
return conv[scope];
|
||||
}
|
||||
|
||||
static SpvId
|
||||
block_label(struct ntv_context *ctx, nir_block *block)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue