diff options
author | Marek Olšák <[email protected]> | 2009-11-15 16:41:25 +0100 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2009-11-20 18:04:06 -0800 |
commit | 4e1236e60267d036a1a604412bd7efd7a249a588 (patch) | |
tree | bd1548ba02a50d8daa124df85e5409c463155b2d /src/gallium/drivers/r300 | |
parent | b7078a88119e248b0196f7446abe029c22f1ee28 (diff) |
r300g: fix updating a vertex format
We must update PSC when we change the vertex format, e.g. vertex colors
from RGBA to BGRA.
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_state_derived.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index f2867675f0f..997d59ff6ff 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -687,6 +687,8 @@ static void r300_set_vertex_buffers(struct pipe_context* pipe, draw_flush(r300->draw); draw_set_vertex_buffers(r300->draw, count, buffers); } + + r300->state |= R300_NEW_VERTEX_FORMAT; } static void r300_set_vertex_elements(struct pipe_context* pipe, diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c index 5aa4166d939..82f2be3101e 100644 --- a/src/gallium/drivers/r300/r300_state_derived.c +++ b/src/gallium/drivers/r300/r300_state_derived.c @@ -512,7 +512,7 @@ static void r300_update_derived_shader_state(struct r300_context* r300) r300->vertex_info = vformat; r300->rs_block = rs_block; - r300->dirty_state |= (R300_NEW_VERTEX_FORMAT | R300_NEW_RS_BLOCK); + r300->dirty_state |= R300_NEW_RS_BLOCK; } static void r300_update_ztop(struct r300_context* r300) @@ -551,7 +551,8 @@ static void r300_update_ztop(struct r300_context* r300) void r300_update_derived_state(struct r300_context* r300) { if (r300->dirty_state & - (R300_NEW_FRAGMENT_SHADER | R300_NEW_VERTEX_SHADER)) { + (R300_NEW_FRAGMENT_SHADER | R300_NEW_VERTEX_SHADER | + R300_NEW_VERTEX_FORMAT)) { r300_update_derived_shader_state(r300); } |