/* 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,
}
/* ...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,
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) {
tex->stride);
pipe_buffer_reference(&tex->buffer, buffer);
- debug_printf("%p is the buffer\n", tex->buffer);
return (struct pipe_texture*)tex;
}