summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Sindholt <bacn@zhasha.com>2009-02-05 22:23:40 +0100
committerCorbin Simpson <MostAwesomeDude@gmail.com>2009-02-05 13:37:29 -0800
commit402d45d99b4533140aa706300da3154af2f376f0 (patch)
treec9b68b714a458124f4246178b9ab1b2fe6468ef7
parentbe53dfa3b9ca4d1503fdbdf934569442175e30ef (diff)
r300: working trivial/clear for r5xx
-rw-r--r--src/gallium/drivers/r300/r300_surface.c4
-rw-r--r--src/gallium/drivers/r300/r300_texture.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_surface.c b/src/gallium/drivers/r300/r300_surface.c
index e03f3de3712..3db013cd7e5 100644
--- a/src/gallium/drivers/r300/r300_surface.c
+++ b/src/gallium/drivers/r300/r300_surface.c
@@ -290,8 +290,8 @@ OUT_CS_REG(R300_ZB_ZCACHE_CTLSTAT,
OUT_CS_REG_SEQ(R300_RB3D_COLOROFFSET0, 1);
OUT_CS_RELOC(dest->buffer, 0, 0, RADEON_GEM_DOMAIN_VRAM, 0);
/* XXX this should not be so rigid and it still doesn't work right */
-OUT_CS_REG(R300_RB3D_COLORPITCH0, (w / 4) | R300_COLOR_TILE_ENABLE |
- R300_COLOR_FORMAT_ARGB8888);
+debug_printf("Buffer width (stride): %d\n", dest->stride);
+OUT_CS_REG(R300_RB3D_COLORPITCH0, (dest->stride >> 2) | R300_COLOR_FORMAT_ARGB8888);
OUT_CS_REG(RB3D_COLOR_CHANNEL_MASK, 0x0000000F);
/* XXX Packet3 */
OUT_CS(CP_PACKET3(R200_3D_DRAW_IMMD_2, 8));
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 537425c1e2f..f9ad14f12be 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -44,11 +44,11 @@ static void r300_setup_miptree(struct r300_texture* tex)
/* Radeons enjoy things in multiples of 32. */
/* XXX NPOT -> 64, not 32 */
- stride = (base->nblocksx[i] * base->block.size + 31) & ~31;
+ stride = (base->nblocksx[i] * base->block.size + 63) & ~63;
size = stride * base->nblocksy[i] * base->depth[i];
/* XXX 64 for NPOT */
- tex->offset[i] = (tex->size + 31) & ~31;
+ tex->offset[i] = (tex->size + 63) & ~63;
tex->size = tex->offset[i] + size;
}
}
@@ -72,7 +72,7 @@ static struct pipe_texture*
r300_setup_miptree(tex);
- tex->buffer = screen->buffer_create(screen, 32,
+ tex->buffer = screen->buffer_create(screen, 63,
PIPE_BUFFER_USAGE_PIXEL,
tex->size);
@@ -130,7 +130,7 @@ static struct pipe_surface* r300_get_tex_surface(struct pipe_screen* screen,
surface->nblocksy = texture->nblocksy[level];
/* XXX save the actual stride instead plz kthnxbai */
surface->stride =
- (texture->nblocksx[level] * texture->block.size + 31) & ~31;
+ (texture->nblocksx[level] * texture->block.size + 63) & ~63;
surface->offset = offset;
surface->usage = flags;
surface->status = PIPE_SURFACE_STATUS_DEFINED;