diff options
author | Dave Airlie <[email protected]> | 2010-02-22 17:26:30 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2010-02-22 17:26:35 +1000 |
commit | b14548ea32000459f4f0c4b49f3fa11d1ee9c003 (patch) | |
tree | c6034ea6d6cdfb7669a11bed5b066c2345b7c48d /src/gallium/drivers/r300/r300_state.c | |
parent | fff5be8e7b4557c221f2425dcafc2e7cbbba76ba (diff) |
Revert "r300g: rebuild winsys/pipe buffer handling and add buffer map"
This reverts commit fff5be8e7b4557c221f2425dcafc2e7cbbba76ba.
Probably went too soon with this, dileX reported OA not working for him
it works here fine, but the optimisations I wanted aren't working properly
yet so I'll fix that now.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index d8a87dec151..34bf81c1930 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -34,7 +34,6 @@ #include "r300_context.h" #include "r300_reg.h" #include "r300_screen.h" -#include "r300_screen_buffer.h" #include "r300_state_inlines.h" #include "r300_fs.h" #include "r300_vs.h" @@ -522,7 +521,7 @@ static void r300_fb_update_tiling_flags(struct r300_context *r300, tex = (struct r300_texture*)old_state->cbufs[i]->texture; if (tex) { - r300->rws->buffer_set_tiling(r300->rws, tex->buffer, + r300->winsys->buffer_set_tiling(r300->winsys, tex->buffer, tex->pitch[0], tex->microtile != 0, tex->macrotile != 0); @@ -534,7 +533,7 @@ static void r300_fb_update_tiling_flags(struct r300_context *r300, tex = (struct r300_texture*)old_state->zsbuf->texture; if (tex) { - r300->rws->buffer_set_tiling(r300->rws, tex->buffer, + r300->winsys->buffer_set_tiling(r300->winsys, tex->buffer, tex->pitch[0], tex->microtile != 0, tex->macrotile != 0); @@ -546,7 +545,7 @@ static void r300_fb_update_tiling_flags(struct r300_context *r300, tex = (struct r300_texture*)new_state->cbufs[i]->texture; level = new_state->cbufs[i]->level; - r300->rws->buffer_set_tiling(r300->rws, tex->buffer, + r300->winsys->buffer_set_tiling(r300->winsys, tex->buffer, tex->pitch[level], tex->microtile != 0, tex->mip_macrotile[level] != 0); @@ -555,7 +554,7 @@ static void r300_fb_update_tiling_flags(struct r300_context *r300, tex = (struct r300_texture*)new_state->zsbuf->texture; level = new_state->zsbuf->level; - r300->rws->buffer_set_tiling(r300->rws, tex->buffer, + r300->winsys->buffer_set_tiling(r300->winsys, tex->buffer, tex->pitch[level], tex->microtile != 0, tex->mip_macrotile[level] != 0); @@ -1029,26 +1028,10 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe, const struct pipe_vertex_buffer* buffers) { struct r300_context* r300 = r300_context(pipe); - boolean any_user_buffer = false; - int i; - - if (count == r300->vertex_buffer_count && - memcmp(r300->vertex_buffer, buffers, count * sizeof(buffers[0])) == 0) - return; - - for (i = 0; i < count; i++) { - pipe_buffer_reference(&r300->vertex_buffer[i].buffer, buffers[i].buffer); - if (r300_buffer_is_user_buffer(buffers[i].buffer)) - any_user_buffer = true; - } - - for ( ; i < r300->vertex_buffer_count; i++) - pipe_buffer_reference(&r300->vertex_buffer[i].buffer, NULL); memcpy(r300->vertex_buffer, buffers, sizeof(struct pipe_vertex_buffer) * count); r300->vertex_buffer_count = count; - r300->any_user_vbs = any_user_buffer; if (r300->draw) { draw_flush(r300->draw); |