For background/EOT only.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
}
}
+nir_def *
+agx_internal_layer_id(nir_builder *b)
+{
+ /* In the background and end-of-tile programs, the layer ID is available as
+ * sr2, the Z component of the workgroup index.
+ */
+ return nir_channel(b, nir_load_workgroup_id(b), 2);
+}
+
static nir_def *
tib_impl(nir_builder *b, nir_instr *instr, void *data)
{
/* Forward declarations to keep the header lean */
struct nir_shader;
+struct nir_def;
+struct nir_builder;
struct agx_usc_builder;
struct agx_tile_size {
uint8_t *colormasks, unsigned *bindless_base,
bool *translucent);
+struct nir_def *agx_internal_layer_id(struct nir_builder *b);
+
struct agx_msaa_state {
uint8_t nr_samples;