diff options
author | Corbin Simpson <[email protected]> | 2009-05-16 08:47:36 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2009-05-16 10:07:58 -0700 |
commit | 13131adbf1beb3e4222ce16c32ac7910a4a5331b (patch) | |
tree | c0babbda1bc045005a54dadd628cd92757231453 /src/gallium/drivers/r300/r300_emit.c | |
parent | 57fd20237541c34ed06587bca9f5a58c8a63fbf4 (diff) |
r300-gallium: Various cleanups leftover from before.
BEGIN/END_CS pair, a few asserts, and a slightly more correct VTE setup.
Diffstat (limited to 'src/gallium/drivers/r300/r300_emit.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_emit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index cd5c38a0c7d..3beb1b8c3f6 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -163,6 +163,7 @@ void r300_emit_fb_state(struct r300_context* r300, BEGIN_CS((8 * fb->nr_cbufs) + (fb->zsbuf ? 8 : 0) + 4); for (i = 0; i < fb->nr_cbufs; i++) { tex = (struct r300_texture*)fb->cbufs[i]->texture; + assert(tex && tex->buffer && "cbuf is marked, but NULL!"); pixpitch = tex->stride / tex->tex.block.size; OUT_CS_REG_SEQ(R300_RB3D_COLOROFFSET0 + (4 * i), 1); @@ -177,7 +178,8 @@ void r300_emit_fb_state(struct r300_context* r300, if (fb->zsbuf) { tex = (struct r300_texture*)fb->zsbuf->texture; - pixpitch = (tex->stride / tex->tex.block.size); + assert(tex && tex->buffer && "zsbuf is marked, but NULL!"); + pixpitch = tex->stride / tex->tex.block.size; OUT_CS_REG_SEQ(R300_ZB_DEPTHOFFSET, 1); OUT_CS_RELOC(tex->buffer, 0, 0, RADEON_GEM_DOMAIN_VRAM, 0); @@ -473,7 +475,7 @@ void r300_emit_dirty_state(struct r300_context* r300) /* ...textures... */ for (i = 0; i < r300->texture_count; i++) { tex = r300->textures[i]; - assert(tex && tex->buffer && "zsbuf is marked, but NULL!"); + assert(tex && tex->buffer && "texture is marked, but NULL!"); r300->winsys->add_buffer(r300->winsys, tex->buffer, RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); } |