summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAapo Tahkola <aet@rasterburn.org>2005-02-10 05:11:31 +0000
committerAapo Tahkola <aet@rasterburn.org>2005-02-10 05:11:31 +0000
commit4afa1d7abbf4bdd368ebfbc5e18dc02f8b8ec21a (patch)
tree44cdd42e277b2c9d53b38d22381d18f4e6508a5e /src
parent58010eb35ca55e487251a2b62965d42e18e5ef18 (diff)
Turns out unknown5 was border color. texwrap looks good now.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c10
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.h3
-rw-r--r--src/mesa/drivers/dri/r300/r300_reg.h3
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c9
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c2
5 files changed, 9 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index aa5b6f35a3..04a47bb8bf 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -460,11 +460,8 @@ void r300InitCmdBuf(r300ContextPtr r300)
ALLOC_STATE( tex.unknown4, variable, mtu+1, "tex_unknown4", 0 );
r300->hw.tex.unknown4.cmd[R300_TEX_CMD_0] = cmducs(R300_TX_UNK4_0, 0);
- ALLOC_STATE( tex.unknown5, variable, mtu+1, "tex_unknown5", 0 );
- r300->hw.tex.unknown5.cmd[R300_TEX_CMD_0] = cmducs(R300_TX_UNK5_0, 0);
-
- //ALLOC_STATE( tex.border_color, variable, mtu+1, "tex_border_color", 0 );
- // r300->hw.tex.border_color.cmd[R300_TEX_CMD_0] = cmducs(R300_TX_BORDER_COLOR_0, 0);
+ ALLOC_STATE( tex.border_color, variable, mtu+1, "tex_border_color", 0 );
+ r300->hw.tex.border_color.cmd[R300_TEX_CMD_0] = cmducs(R300_TX_BORDER_COLOR_0, 0);
/* Setup the atom linked list */
@@ -550,8 +547,7 @@ void r300InitCmdBuf(r300ContextPtr r300)
insert_at_tail(&r300->hw.atomlist, &r300->hw.tex.format);
insert_at_tail(&r300->hw.atomlist, &r300->hw.tex.offset);
insert_at_tail(&r300->hw.atomlist, &r300->hw.tex.unknown4);
- insert_at_tail(&r300->hw.atomlist, &r300->hw.tex.unknown5);
- //insert_at_tail(&r300->hw.atomlist, &r300->hw.tex.border_color);
+ insert_at_tail(&r300->hw.atomlist, &r300->hw.tex.border_color);
r300->hw.is_dirty = GL_TRUE;
r300->hw.all_dirty = GL_TRUE;
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h
index e88c4591a2..6b027f380b 100644
--- a/src/mesa/drivers/dri/r300/r300_context.h
+++ b/src/mesa/drivers/dri/r300/r300_context.h
@@ -465,8 +465,7 @@ struct r300_hw_state {
struct r300_state_atom format;
struct r300_state_atom offset;
struct r300_state_atom unknown4;
- struct r300_state_atom unknown5;
- //struct r300_state_atom border_color;
+ struct r300_state_atom border_color;
} tex;
struct r300_state_atom txe; /* tex enable (4104) */
};
diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h
index 7da9c7609b..60b2c8074e 100644
--- a/src/mesa/drivers/dri/r300/r300_reg.h
+++ b/src/mesa/drivers/dri/r300/r300_reg.h
@@ -723,8 +723,7 @@ probably work also. --aet
# define R300_TXO_OFFSET_SHIFT 5
/* END */
#define R300_TX_UNK4_0 0x4580
-#define R300_TX_UNK5_0 0x45C0
-#define R300_TX_BORDER_COLOR_0 0x45F0 //ff00ff00 == { 0, 1.0, 0, 1.0 }
+#define R300_TX_BORDER_COLOR_0 0x45C0 //ff00ff00 == { 0, 1.0, 0, 1.0 }
/* END */
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index f99e398ce3..af0e0d72a8 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -1213,8 +1213,7 @@ void r300_setup_textures(GLcontext *ctx)
R300_STATECHANGE(r300, tex.format);
R300_STATECHANGE(r300, tex.offset);
R300_STATECHANGE(r300, tex.unknown4);
- R300_STATECHANGE(r300, tex.unknown5);
- //R300_STATECHANGE(r300, tex.border_color);
+ R300_STATECHANGE(r300, tex.border_color);
r300->state.texture.tc_count=0;
@@ -1260,8 +1259,7 @@ void r300_setup_textures(GLcontext *ctx)
//fprintf(stderr, "t->format=%08x\n", t->format);
r300->hw.tex.offset.cmd[R300_TEX_VALUE_0+i]=r300->radeon.radeonScreen->fbLocation+t->offset;
r300->hw.tex.unknown4.cmd[R300_TEX_VALUE_0+i]=0x0;
- r300->hw.tex.unknown5.cmd[R300_TEX_VALUE_0+i]=0x0;
- //r300->hw.tex.border_color.cmd[R300_TEX_VALUE_0+i]=t->pp_border_color;
+ r300->hw.tex.border_color.cmd[R300_TEX_VALUE_0+i]=t->pp_border_color;
}
}
((drm_r300_cmd_header_t*)r300->hw.tex.filter.cmd)->unchecked_state.count = max_texture_unit+1;
@@ -1270,8 +1268,7 @@ void r300_setup_textures(GLcontext *ctx)
((drm_r300_cmd_header_t*)r300->hw.tex.format.cmd)->unchecked_state.count = max_texture_unit+1;
((drm_r300_cmd_header_t*)r300->hw.tex.offset.cmd)->unchecked_state.count = max_texture_unit+1;
((drm_r300_cmd_header_t*)r300->hw.tex.unknown4.cmd)->unchecked_state.count = max_texture_unit+1;
- ((drm_r300_cmd_header_t*)r300->hw.tex.unknown5.cmd)->unchecked_state.count = max_texture_unit+1;
- //((drm_r300_cmd_header_t*)r300->hw.tex.border_color.cmd)->unchecked_state.count = max_texture_unit+1;
+ ((drm_r300_cmd_header_t*)r300->hw.tex.border_color.cmd)->unchecked_state.count = max_texture_unit+1;
if (RADEON_DEBUG & DEBUG_STATE)
fprintf(stderr, "TX_ENABLE: %08x max_texture_unit=%d\n", r300->hw.txe.cmd[R300_TXE_ENABLE], max_texture_unit);
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index 6bbfb01023..0f3089d4c8 100644
--- a/src/mesa/drivers/dri/r300/r300_tex.c
+++ b/src/mesa/drivers/dri/r300/r300_tex.c
@@ -267,7 +267,7 @@ static void r300SetTexFilter(r300TexObjPtr t, GLenum minf, GLenum magf)
static void r300SetTexBorderColor(r300TexObjPtr t, GLubyte c[4])
{
- t->pp_border_color = radeonPackColor(4, c[0], c[1], c[2], c[3]);
+ t->pp_border_color = radeonPackColor(4, c[3], c[2], c[1], c[0]);
}
/**