spirv: handle ViewportMaskNV builtin/cap from SPV_NV_mesh_shader
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Acked-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14263>
This commit is contained in:

committed by
Marge Bot

parent
1619279219
commit
4cb7dcb097
@@ -85,6 +85,7 @@ struct spirv_supported_capabilities {
|
|||||||
bool float_controls;
|
bool float_controls;
|
||||||
bool shader_clock;
|
bool shader_clock;
|
||||||
bool shader_viewport_index_layer;
|
bool shader_viewport_index_layer;
|
||||||
|
bool shader_viewport_mask_nv;
|
||||||
bool sparse_residency;
|
bool sparse_residency;
|
||||||
bool stencil_export;
|
bool stencil_export;
|
||||||
bool storage_8bit;
|
bool storage_8bit;
|
||||||
|
@@ -4805,6 +4805,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
|
|||||||
spv_check_supported(mesh_shading_nv, cap);
|
spv_check_supported(mesh_shading_nv, cap);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SpvCapabilityShaderViewportMaskNV:
|
||||||
|
spv_check_supported(shader_viewport_mask_nv, cap);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
vtn_fail("Unhandled capability: %s (%u)",
|
vtn_fail("Unhandled capability: %s (%u)",
|
||||||
spirv_capability_to_string(cap), cap);
|
spirv_capability_to_string(cap), cap);
|
||||||
|
@@ -864,6 +864,10 @@ vtn_get_builtin_location(struct vtn_builder *b,
|
|||||||
else
|
else
|
||||||
vtn_fail("invalid stage for SpvBuiltInViewportIndex");
|
vtn_fail("invalid stage for SpvBuiltInViewportIndex");
|
||||||
break;
|
break;
|
||||||
|
case SpvBuiltInViewportMaskNV:
|
||||||
|
*location = VARYING_SLOT_VIEWPORT_MASK;
|
||||||
|
*mode = nir_var_shader_out;
|
||||||
|
break;
|
||||||
case SpvBuiltInTessLevelOuter:
|
case SpvBuiltInTessLevelOuter:
|
||||||
*location = VARYING_SLOT_TESS_LEVEL_OUTER;
|
*location = VARYING_SLOT_TESS_LEVEL_OUTER;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user