<!-- always 0x03200000 ? -->
<reg32 offset="0x0e12" name="UCHE_UNKNOWN_0E12"/>
- <reg32 offset="0x8000" name="GRAS_DISABLE_CNTL">
- <!-- likely something clip-disable related -->
- <bitfield name="UNK0" pos="0" type="boolean"/>
+ <reg32 offset="0x8000" name="GRAS_CL_CNTL">
+ <bitfield name="CLIP_DISABLE" pos="0" type="boolean"/>
+ <bitfield name="ZNEAR_CLIP_DISABLE" pos="1" type="boolean"/>
+ <bitfield name="ZFAR_CLIP_DISABLE" pos="2" type="boolean"/>
+ <!-- set with depthClampEnable, not clear what it does -->
+ <bitfield name="UNK5" pos="5" type="boolean"/>
+ <!-- controls near z clip behavior (set for vulkan) -->
+ <bitfield name="ZERO_GB_SCALE_Z" pos="6" type="boolean"/>
<!-- guess based on a3xx and meaning of bits 8 and 9
if the guess is right then this is related to point sprite clipping -->
<bitfield name="VP_CLIP_CODE_IGNORE" pos="7" type="boolean"/>
<reg32 offset="0x8014" name="GRAS_CL_VPORT_ZOFFSET_0" type="float"/>
<reg32 offset="0x8015" name="GRAS_CL_VPORT_ZSCALE_0" type="float"/>
+ <!-- not clear what it does, mirrors RB_Z_CLAMP_MIN -->
+ <reg32 offset="0x8070" name="GRAS_CL_Z_CLAMP_MIN" type="float"/>
+ <reg32 offset="0x8071" name="GRAS_CL_Z_CLAMP_MAX" type="float"/>
+
<reg32 offset="0x8090" name="GRAS_SU_CNTL">
<bitfield name="CULL_FRONT" pos="0" type="boolean"/>
<bitfield name="CULL_BACK" pos="1" type="boolean"/>
<bitfield name="Z_ENABLE" pos="0" type="boolean"/>
<bitfield name="Z_WRITE_ENABLE" pos="1" type="boolean"/>
<bitfield name="ZFUNC" low="2" high="4" type="adreno_compare_func"/>
+ <bitfield name="Z_CLAMP_ENABLE" pos="5" type="boolean"/>
<doc>Z_TEST_ENABLE bit is set for zfunc other than GL_ALWAYS or GL_NEVER</doc>
<bitfield name="Z_TEST_ENABLE" pos="6" type="boolean"/>
</reg32>
<bitfield name="ENABLE" pos="0" type="boolean"/>
</reg32>
+ <!-- clamps depth value for depth test/write -->
+ <reg32 offset="0x88c0" name="RB_Z_CLAMP_MIN" type="float"/>
+ <reg32 offset="0x88c1" name="RB_Z_CLAMP_MAX" type="float"/>
+
<reg32 offset="0x88d0" name="RB_UNKNOWN_88D0"/>
<reg32 offset="0x88d1" name="RB_BLIT_SCISSOR_TL" type="adreno_reg_xy"/>
<reg32 offset="0x88d2" name="RB_BLIT_SCISSOR_BR" type="adreno_reg_xy"/>
static void
tu6_emit_gras_unknowns(struct tu_cs *cs)
{
- tu_cs_emit_pkt4(cs, REG_A6XX_GRAS_DISABLE_CNTL, 1);
- tu_cs_emit(cs, A6XX_GRAS_DISABLE_CNTL_VP_CLIP_CODE_IGNORE);
+ tu_cs_emit_pkt4(cs, REG_A6XX_GRAS_CL_CNTL, 1);
+ tu_cs_emit(cs, A6XX_GRAS_CL_CNTL_VP_CLIP_CODE_IGNORE);
tu_cs_emit_pkt4(cs, REG_A6XX_GRAS_UNKNOWN_8001, 1);
tu_cs_emit(cs, 0x0);
tu_cs_emit_pkt4(cs, REG_A6XX_GRAS_LAYER_CNTL, 1);