<value value="0x3" name="LAYER_2D_ARRAY"/>
</enum>
- <reg32 offset="0x8004" name="GRAS_LAYER_CNTL">
- <bitfield name="LAYERED" pos="0" type="boolean"/>
- <bitfield name="TYPE" low="1" high="2" type="a6xx_layer_type"/>
- </reg32>
+ <!-- index of highest layer that can be written to via gl_Layer -->
+ <reg32 offset="0x8004" name="GRAS_MAX_LAYER_INDEX" type="uint"/>
<reg32 offset="0x8005" name="GRAS_CNTL">
<!-- see also RB_RENDER_CONTROL0 -->
.rt6 = mrt_comp[6],
.rt7 = mrt_comp[7]));
- // XXX: We probably can't hardcode LAYER_CNTL_TYPE.
- tu_cs_emit_regs(cs,
- A6XX_GRAS_LAYER_CNTL(.layered = fb->layers > 1,
- .type = LAYER_2D_ARRAY));
+ tu_cs_emit_regs(cs, A6XX_GRAS_MAX_LAYER_INDEX(fb->layers - 1));
}
void
unsigned srgb_cntl = 0;
unsigned i;
- bool layered = false;
- unsigned type = 0;
+ unsigned max_layer_index = 0;
for (i = 0; i < pfb->nr_cbufs; i++) {
enum a6xx_format format = 0;
swap = fd6_resource_swap(rsc, pformat);
tile_mode = fd_resource_tile_mode(psurf->texture, psurf->u.tex.level);
-
- if (psurf->u.tex.first_layer < psurf->u.tex.last_layer) {
- layered = true;
- if (psurf->texture->target == PIPE_TEXTURE_2D_ARRAY && psurf->texture->nr_samples > 0)
- type = LAYER_MULTISAMPLE_ARRAY;
- else if (psurf->texture->target == PIPE_TEXTURE_2D_ARRAY)
- type = LAYER_2D_ARRAY;
- else if (psurf->texture->target == PIPE_TEXTURE_CUBE)
- type = LAYER_CUBEMAP;
- else if (psurf->texture->target == PIPE_TEXTURE_3D)
- type = LAYER_3D;
- }
+ max_layer_index = psurf->u.tex.last_layer - psurf->u.tex.first_layer;
debug_assert((offset + slice->size0) <= fd_bo_size(rsc->bo));
.rt6 = mrt_comp[6],
.rt7 = mrt_comp[7]));
- OUT_REG(ring, A6XX_GRAS_LAYER_CNTL(.layered = layered, .type = type));
+ OUT_REG(ring, A6XX_GRAS_MAX_LAYER_INDEX(max_layer_index));
}
static void