diff options
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 3430734a9dd..f8dfcf298bd 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -3322,6 +3322,15 @@ static void *si_create_vertex_elements(struct pipe_context *ctx, v->fix_fetch |= SI_FIX_FETCH_A2_SINT << (2 * i); } } + + /* We work around the fact that 8_8_8 and 16_16_16 data formats + * do not exist by using the corresponding 4-component formats. + * This requires a fixup of the descriptor for bounds checks. + */ + if (desc->block.bits == 3 * 8 || + desc->block.bits == 3 * 16) { + v->fix_size3 |= (desc->block.bits / 24) << (2 * i); + } } memcpy(v->elements, elements, sizeof(struct pipe_vertex_element) * count); |