diff options
author | Marek Olšák <[email protected]> | 2010-04-27 00:06:07 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-04-27 00:06:07 +0200 |
commit | a961431285804e39e9089a9382954e454b9f6816 (patch) | |
tree | b46e0976b2daf6d84737e81551e19d006ce2e4da /src/gallium/drivers/r300/r300_state.c | |
parent | 83b76657b3dbf5e00d73bc03cc102317c4af6eca (diff) |
r300g: setup PSC first, then align vertex formats
This allows us to put correct swizzles for undefined components in PSC.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index b90c99c9d97..cc8209db6a3 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1283,13 +1283,16 @@ static void* r300_create_vertex_elements_state(struct pipe_context* pipe, memcpy(velems->velem, attribs, sizeof(struct pipe_vertex_element) * count); if (r300_screen(pipe->screen)->caps.has_tcl) { - /* Check if the format is aligned to the size of DWORD. */ + r300_vertex_psc(velems); + + /* Check if the format is aligned to the size of DWORD. + * We only care about the blocksizes of the formats since + * swizzles are already set up. */ for (i = 0; i < count; i++) { format = &velems->velem[i].src_format; /* Replace some formats with their aligned counterparts, * this is OK because we check for aligned strides too. */ - /* XXX We need X instead of A in the format names. */ switch (*format) { case PIPE_FORMAT_R8G8B8_UNORM: *format = PIPE_FORMAT_R8G8B8X8_UNORM; @@ -1330,7 +1333,6 @@ static void* r300_create_vertex_elements_state(struct pipe_context* pipe, } } - r300_vertex_psc(velems); } } return velems; |