Mesa (master): r300-gallium: Fix bad cast. Space accounting completely works now.
Corbin Simpson
csimpson at kemper.freedesktop.org
Sat May 9 05:05:53 UTC 2009
Module: Mesa
Branch: master
Commit: ce758a21b9984cce14db4234fbe353d06a3a2d32
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce758a21b9984cce14db4234fbe353d06a3a2d32
Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date: Fri May 8 22:05:18 2009 -0700
r300-gallium: Fix bad cast. Space accounting completely works now.
Boy, is my face red. :C
---
src/gallium/drivers/r300/r300_emit.c | 4 ++--
src/gallium/drivers/r300/r300_texture.c | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 38b1682..c73d5a0 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -458,7 +458,7 @@ void r300_emit_dirty_state(struct r300_context* r300)
/* XXX check size */
/* Color buffers... */
for (i = 0; i < r300->framebuffer_state.nr_cbufs; i++) {
- tex = (struct r300_texture*)r300->framebuffer_state.cbufs[i];
+ tex = (struct r300_texture*)r300->framebuffer_state.cbufs[i]->texture;
assert(tex && tex->buffer && "cbuf is marked, but NULL!");
if (!tex->buffer) return;
r300->winsys->add_buffer(r300->winsys, tex->buffer,
@@ -466,7 +466,7 @@ void r300_emit_dirty_state(struct r300_context* r300)
}
/* ...depth buffer... */
if (r300->framebuffer_state.zsbuf) {
- tex = (struct r300_texture*)r300->framebuffer_state.zsbuf;
+ tex = (struct r300_texture*)r300->framebuffer_state.zsbuf->texture;
assert(tex && tex->buffer && "zsbuf is marked, but NULL!");
if (!tex->buffer) return;
r300->winsys->add_buffer(r300->winsys, tex->buffer,
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 6c9d3b7..5ea9f56 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -86,8 +86,6 @@ static struct pipe_texture*
r300_texture_create(struct pipe_screen* screen,
const struct pipe_texture* template)
{
- /* XXX struct r300_screen* r300screen = r300_screen(screen); */
-
struct r300_texture* tex = CALLOC_STRUCT(r300_texture);
if (!tex) {
@@ -187,7 +185,6 @@ static struct pipe_texture*
tex->stride);
pipe_buffer_reference(&tex->buffer, buffer);
- debug_printf("%p is the buffer\n", tex->buffer);
return (struct pipe_texture*)tex;
}
More information about the mesa-commit
mailing list