freedreno/a6xx: document some unknown bits
authorJonathan Marek <jonathan@marek.ca>
Wed, 12 Feb 2020 02:08:58 +0000 (21:08 -0500)
committerJonathan Marek <jonathan@marek.ca>
Fri, 14 Feb 2020 13:22:33 +0000 (08:22 -0500)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3814>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3814>

src/freedreno/registers/a6xx.xml
src/freedreno/vulkan/tu_pipeline.c
src/gallium/drivers/freedreno/a6xx/fd6_rasterizer.c

index 2c4266e90b4f72710c21bb37b603d65d26a2c1dc..c03b3e6f1332f2987cd780f1cab03592a66d5594 100644 (file)
@@ -1767,7 +1767,15 @@ to upconvert to 32b float internally?
        <!-- always 0x03200000 ? -->
        <reg32 offset="0x0e12" name="UCHE_UNKNOWN_0E12"/>
 
-       <reg32 offset="0x8000" name="GRAS_UNKNOWN_8000"/>
+       <reg32 offset="0x8000" name="GRAS_DISABLE_CNTL">
+                <!-- likely something clip-disable related -->
+               <bitfield name="UNK0" pos="0" 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"/>
+               <bitfield name="VP_XFORM_DISABLE" pos="8" type="boolean"/>
+               <bitfield name="PERSP_DIVISION_DISABLE" pos="9" type="boolean"/>
+       </reg32>
        <reg32 offset="0x8001" name="GRAS_UNKNOWN_8001"/>
        <reg32 offset="0x8002" name="GRAS_UNKNOWN_8002"/>
        <reg32 offset="0x8003" name="GRAS_UNKNOWN_8003"/>
index a0e22e7bce857a93d26a23d087e46eb1da03efdd..5519cfe7139b3c9f927374fabbdc668546851931 100644 (file)
@@ -1223,8 +1223,8 @@ tu6_emit_scissor(struct tu_cs *cs, const VkRect2D *scissor)
 static void
 tu6_emit_gras_unknowns(struct tu_cs *cs)
 {
-   tu_cs_emit_pkt4(cs, REG_A6XX_GRAS_UNKNOWN_8000, 1);
-   tu_cs_emit(cs, 0x80);
+   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_UNKNOWN_8001, 1);
    tu_cs_emit(cs, 0x0);
    tu_cs_emit_pkt4(cs, REG_A6XX_GRAS_LAYER_CNTL, 1);
index 4cc31c5d38b3d30f8ff9ebdef079c32cad1024f1..db0c249d83e862336546d090b55bae77a8ac0d80 100644 (file)
@@ -52,7 +52,7 @@ __fd6_setup_rasterizer_stateobj(struct fd_context *ctx,
        }
 
        OUT_REG(ring,
-               A6XX_GRAS_UNKNOWN_8000(.unknown = 0x80),
+               A6XX_GRAS_DISABLE_CNTL(.vp_clip_code_ignore = 1),
                A6XX_GRAS_UNKNOWN_8001());
 
        OUT_REG(ring,