summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorAapo Tahkola <aapo@aapo-desktop.(none)>2007-03-11 11:47:03 +0200
committerAapo Tahkola <aapo@aapo-desktop.(none)>2007-03-11 11:47:03 +0200
commit69e57cf6ae0af823e903926bafa8daa46b11352c (patch)
treed444aed03c2664271645e637bfef0de66bdf9184 /src/mesa/drivers
parente64166703a27c5b1127373b1dff3b93e617bcaea (diff)
Guess another unknown register in R300 command buffer initialization. (Oliver McFadden)
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c6
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.h2
-rw-r--r--src/mesa/drivers/dri/r300/r300_reg.h1
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c2
4 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index d5f4c917f0..89725447f1 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -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);
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h
index 43de5dfea3..bd9ed6f170 100644
--- a/src/mesa/drivers/dri/r300/r300_context.h
+++ b/src/mesa/drivers/dri/r300/r300_context.h
@@ -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) */
diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h
index 69bc994cf6..7bc832c871 100644
--- a/src/mesa/drivers/dri/r300/r300_reg.h
+++ b/src/mesa/drivers/dri/r300/r300_reg.h
@@ -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
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 402f7508a4..895c2ff43c 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -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);