broadcom/compiler: implement nir_intrinsic_load_view_index
This is used for multiview's gl_ViewIndex built-in. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034>
This commit is contained in:
parent
5872c7ca7b
commit
d5acae3206
|
@ -3291,6 +3291,11 @@ ntq_emit_intrinsic(struct v3d_compile *c, nir_intrinsic_instr *instr)
|
|||
unreachable("Should have been lowered");
|
||||
break;
|
||||
|
||||
case nir_intrinsic_load_view_index:
|
||||
ntq_store_dest(c, &instr->dest, 0,
|
||||
vir_uniform(c, QUNIFORM_VIEW_INDEX, 0));
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Unknown intrinsic: ");
|
||||
nir_print_instr(&instr->instr, stderr);
|
||||
|
|
|
@ -325,6 +325,11 @@ enum quniform_contents {
|
|||
* out-of-bounds accesses into the tile state during binning.
|
||||
*/
|
||||
QUNIFORM_FB_LAYERS,
|
||||
|
||||
/**
|
||||
* Current value of gl_ViewIndex for Multiview rendering.
|
||||
*/
|
||||
QUNIFORM_VIEW_INDEX,
|
||||
};
|
||||
|
||||
static inline uint32_t v3d_unit_data_create(uint32_t unit, uint32_t value)
|
||||
|
|
Loading…
Reference in New Issue