summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorVladimir Dergachev <[email protected]>2005-01-06 04:39:51 +0000
committerVladimir Dergachev <[email protected]>2005-01-06 04:39:51 +0000
commite09c843c137d91a20e5c705c6c4b8a75579d8232 (patch)
tree601fc2c084816670bef9a04f7cd9e54d381adda2 /src/mesa/drivers/dri
parent91538b44322ca8970f8423395ff37cb1c38e8c32 (diff)
Turns out the kfountain.kss (as well as lesson19) had a bug - the size was set wrong. Fixed.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c24
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c4
2 files changed, 25 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index b094dc29a7b..53f90c63221 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -815,14 +815,31 @@ static GLuint translate_texture_format(GLcontext *ctx, GLint tex_unit, GLuint fo
format
)){
case FORMAT_HASH(0, 1, 0x2100, 0, 1, 0x2100, 0x00088047):
+ /* tested with:
+ kfiresaver.kss
+ */
return 0x1a0c;
case FORMAT_HASH(0, 1, 0x2100, 0, 1, 0x2100, 0x00077047):
+ /* tested with:
+ kfiresaver.kss
+ */
return 0x4ba0c;
case FORMAT_HASH(0, 1, 0x2100, 0, 1, 0x2100, 0x00055047):
- return 0x53a0c;
+ /* tested with:
+ kfiresaver.kss
+ kfountain.kss
+ */
+ return 0x51a0c;
case FORMAT_HASH(0, 1, 0x2100, 0, 4, 0x1e01, 0x00088047):
+ /* tested with
+ lesson 06
+ lesson 07
+ */
return 0x53a0c;
case FORMAT_HASH(0, 1, 0x2100, 0, 4, 0x1e01, 0x00055047):
+ /* Can't remember what I tested this with..
+ try putting return 0 of you see broken textures which
+ are not being complained about */
return 0x53a0c;
default:
{
@@ -899,12 +916,12 @@ void r300_setup_textures(GLcontext *ctx)
repeatedly */
#if 1
if(r300->hw.tex.format.cmd[R300_TEX_VALUE_0+i]==0){
- static int fmt=0;
+ static int fmt=1;
static int k=0;
k++;
if(k>200){
k=0;
- fmt++;
+ fmt+=2;
texUnit = &ctx->Texture.Unit[i];
fprintf(stderr, "Want to set FORMAT_HASH(%d, %d, 0x%04x, %d, %d, 0x%04x, 0x%08x)\n",
texUnit->_CurrentCombine->OperandRGB[0] -GL_SRC_COLOR,
@@ -922,6 +939,7 @@ void r300_setup_textures(GLcontext *ctx)
//sleep(1);
fprintf(stderr, "Now trying format %08x\n",
0x00a0c | (fmt<<12));
+ fprintf(stderr, "size=%08x\n", t->size);
}
r300->hw.tex.format.cmd[R300_TEX_VALUE_0+i]=0x00a0c | (fmt<<12);
}
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index 55d97f304e2..ae0cff6a1a7 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -176,6 +176,10 @@ static void r300SetTexImages(r300ContextPtr rmesa,
}
assert(size > 0);
+ if(0)
+ fprintf(stderr, "w=%d h=%d d=%d tb=%d\n", texImage->Width, texImage->Height,
+ texImage->Depth, texImage->TexFormat->TexelBytes);
+
/* Align to 32-byte offset. It is faster to do this unconditionally
* (no branch penalty).
*/