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:

committed by
Marge Bot

parent
5872c7ca7b
commit
d5acae3206
@@ -3291,6 +3291,11 @@ ntq_emit_intrinsic(struct v3d_compile *c, nir_intrinsic_instr *instr)
|
|||||||
unreachable("Should have been lowered");
|
unreachable("Should have been lowered");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case nir_intrinsic_load_view_index:
|
||||||
|
ntq_store_dest(c, &instr->dest, 0,
|
||||||
|
vir_uniform(c, QUNIFORM_VIEW_INDEX, 0));
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "Unknown intrinsic: ");
|
fprintf(stderr, "Unknown intrinsic: ");
|
||||||
nir_print_instr(&instr->instr, stderr);
|
nir_print_instr(&instr->instr, stderr);
|
||||||
|
@@ -325,6 +325,11 @@ enum quniform_contents {
|
|||||||
* out-of-bounds accesses into the tile state during binning.
|
* out-of-bounds accesses into the tile state during binning.
|
||||||
*/
|
*/
|
||||||
QUNIFORM_FB_LAYERS,
|
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)
|
static inline uint32_t v3d_unit_data_create(uint32_t unit, uint32_t value)
|
||||||
|
Reference in New Issue
Block a user