Guess another unknown register in R300 command buffer initialization. (Oliver McFadden)
authorAapo Tahkola <aapo@aapo-desktop.(none)>
Sun, 11 Mar 2007 09:47:03 +0000 (11:47 +0200)
committerAapo Tahkola <aapo@aapo-desktop.(none)>
Sun, 11 Mar 2007 09:47:03 +0000 (11:47 +0200)
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_context.h
src/mesa/drivers/dri/r300/r300_reg.h
src/mesa/drivers/dri/r300/r300_state.c

index d5f4c917f0194967c9fefde9cd58165e0e1700ad..89725447f1dc1a72d592e9723c92605a2d30422b 100644 (file)
@@ -341,8 +341,8 @@ void r300InitCmdBuf(r300ContextPtr r300)
                r300->hw.polygon_mode.cmd[0] = cmdpacket0(R300_RE_POLYGON_MODE, 3);
        ALLOC_STATE( fogp, always, 3, "fogp", 0 );
                r300->hw.fogp.cmd[0] = cmdpacket0(R300_RE_FOG_SCALE, 2);
-       ALLOC_STATE( unk42A0, always, 2, "unk42A0", 0 );
-               r300->hw.unk42A0.cmd[0] = cmdpacket0(0x42A0, 1);
+       ALLOC_STATE( zbias_cntl, always, 2, "zbias_cntl", 0 );
+               r300->hw.zbias_cntl.cmd[0] = cmdpacket0(R300_RE_ZBIAS_CNTL, 1);
        ALLOC_STATE( zbs, always, R300_ZBS_CMDSIZE, "zbs", 0 );
                r300->hw.zbs.cmd[R300_ZBS_CMD_0] = cmdpacket0(R300_RE_ZBIAS_T_FACTOR, 4);
        ALLOC_STATE( occlusion_cntl, always, 2, "occlusion_cntl", 0 );
@@ -481,7 +481,7 @@ void r300InitCmdBuf(r300ContextPtr r300)
        insert_at_tail(&r300->hw.atomlist, &r300->hw.shade);
        insert_at_tail(&r300->hw.atomlist, &r300->hw.polygon_mode);
        insert_at_tail(&r300->hw.atomlist, &r300->hw.fogp);
-       insert_at_tail(&r300->hw.atomlist, &r300->hw.unk42A0);
+       insert_at_tail(&r300->hw.atomlist, &r300->hw.zbias_cntl);
        insert_at_tail(&r300->hw.atomlist, &r300->hw.zbs);
        insert_at_tail(&r300->hw.atomlist, &r300->hw.occlusion_cntl);
        insert_at_tail(&r300->hw.atomlist, &r300->hw.cul);
index 43de5dfea3080d0f78765dc81f001ac97a786b2a..bd9ed6f170e6d3ce60402f56e997431183bd949f 100644 (file)
@@ -457,7 +457,7 @@ struct r300_hw_state {
        struct r300_state_atom polygon_mode;
        struct r300_state_atom fogp;    /* fog parameters (4294) */
        struct r300_state_atom unk429C; /* (429C) */
-       struct r300_state_atom unk42A0; /* (42A0) */
+       struct r300_state_atom zbias_cntl;
        struct r300_state_atom zbs;     /* zbias (42A4) */
        struct r300_state_atom occlusion_cntl;
        struct r300_state_atom cul;     /* cull cntl (42B8) */
index 69bc994cf66d232d08b6806917067d6d72b2ab89..7bc832c871c5333306ed18983d4b720a883cd96b 100644 (file)
@@ -571,6 +571,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
  * Some of the tests indicate that fgl has a fallback implementation of zbias
  * via pixel shaders.
  */
+#define R300_RE_ZBIAS_CNTL                    0x42A0 /* GUESS */
 #define R300_RE_ZBIAS_T_FACTOR                0x42A4
 #define R300_RE_ZBIAS_T_CONSTANT              0x42A8
 #define R300_RE_ZBIAS_W_FACTOR                0x42AC
index 402f7508a485a74e06424c511a13e5df61440510..895c2ff43ccf8c054c33c151a08003b20b4177a5 100644 (file)
@@ -2089,7 +2089,7 @@ void r300ResetHwState(r300ContextPtr r300)
        r300PolygonMode(ctx, GL_BACK, ctx->Polygon.BackMode);
        r300->hw.polygon_mode.cmd[2] = 0x00000001;
        r300->hw.polygon_mode.cmd[3] = 0x00000000;
-       r300->hw.unk42A0.cmd[1] = 0x00000000;
+       r300->hw.zbias_cntl.cmd[1] = 0x00000000;
 
        r300PolygonOffset(ctx, ctx->Polygon.OffsetFactor, ctx->Polygon.OffsetUnits);
        r300Enable(ctx, GL_POLYGON_OFFSET_FILL, ctx->Polygon.OffsetFill);