diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2011-04-19 12:03:55 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2011-04-19 12:06:52 -0400 |
commit | b545b2987aaca856f3a54ecb31fb4646bf619cc6 (patch) | |
tree | 71efbc955654dccb04085e0b358d1f5cf0cf71c2 /src/mesa/drivers/dri/r600/evergreen_render.c | |
parent | 3c3a2596033d88848392c4aab5cc16d96afe149f (diff) | |
download | external_mesa3d-b545b2987aaca856f3a54ecb31fb4646bf619cc6.zip external_mesa3d-b545b2987aaca856f3a54ecb31fb4646bf619cc6.tar.gz external_mesa3d-b545b2987aaca856f3a54ecb31fb4646bf619cc6.tar.bz2 |
r600c: add evergreen big endian support
Based on Cedric's r6xx/r7xx patch.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/r600/evergreen_render.c')
-rw-r--r-- | src/mesa/drivers/dri/r600/evergreen_render.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r600/evergreen_render.c b/src/mesa/drivers/dri/r600/evergreen_render.c index b5a5f07..4507be2 100644 --- a/src/mesa/drivers/dri/r600/evergreen_render.c +++ b/src/mesa/drivers/dri/r600/evergreen_render.c @@ -180,6 +180,15 @@ static void evergreenRunRenderPrimitive(struct gl_context * ctx, int start, int SETfield(vgt_index_type, DI_INDEX_SIZE_16_BIT, INDEX_TYPE_shift, INDEX_TYPE_mask); } + /* 16-bit indexes are packed in a 32-bit value */ + SETfield(vgt_index_type, +#if MESA_BIG_ENDIAN + VGT_DMA_SWAP_32_BIT, +#else + VGT_DMA_SWAP_NONE, +#endif + SWAP_MODE_shift, SWAP_MODE_mask); + vgt_num_indices = num_indices; SETfield(vgt_draw_initiator, DI_SRC_SEL_DMA, SOURCE_SELECT_shift, SOURCE_SELECT_mask); SETfield(vgt_draw_initiator, DI_MAJOR_MODE_0, MAJOR_MODE_shift, MAJOR_MODE_mask); @@ -252,6 +261,15 @@ static void evergreenRunRenderPrimitiveImmediate(struct gl_context * ctx, int st SETfield(vgt_index_type, DI_INDEX_SIZE_16_BIT, INDEX_TYPE_shift, INDEX_TYPE_mask); } + /* 16-bit indexes are packed in a 32-bit value */ + SETfield(vgt_index_type, +#if MESA_BIG_ENDIAN + VGT_DMA_SWAP_32_BIT, +#else + VGT_DMA_SWAP_NONE, +#endif + SWAP_MODE_shift, SWAP_MODE_mask); + vgt_num_indices = num_indices; SETfield(vgt_draw_initiator, DI_MAJOR_MODE_0, MAJOR_MODE_shift, MAJOR_MODE_mask); |