diff options
author | Michel Dänzer <[email protected]> | 2012-04-19 16:46:15 +0200 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2012-04-19 19:59:54 +0200 |
commit | 09b2cd7ade15755f7375be9704b825e6f606cf25 (patch) | |
tree | 052dd362b160104e603ac632f12b0bfd785d5309 /src/gallium/drivers | |
parent | 9918fbd0268601b4dcd7c07c883733c959d78f9e (diff) |
radeonsi: Replace magic numbers for vertex buffer resource.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/r600_state_common.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/r600_state_common.c b/src/gallium/drivers/radeonsi/r600_state_common.c index 3c32b44422c..ff1e3fedad8 100644 --- a/src/gallium/drivers/radeonsi/r600_state_common.c +++ b/src/gallium/drivers/radeonsi/r600_state_common.c @@ -624,12 +624,16 @@ static void r600_vertex_buffer_update(struct r600_context *rctx) /* Fill in T# buffer resource description */ ptr[0] = va & 0xFFFFFFFF; - ptr[1] = ((va >> 32) & 0xFFFF) | - (vertex_buffer->stride & 0x3FFF) << 16; + ptr[1] = (S_008F04_BASE_ADDRESS_HI(va >> 32) | + S_008F04_STRIDE(vertex_buffer->stride)); ptr[2] = (vertex_buffer->buffer->width0 - offset) / vertex_buffer->stride; /* XXX: Hardcoding RGBA */ - ptr[3] = 4 | 5 << 3 | 6 << 6 | 7 << 9 | - num_format << 12 | data_format << 15; + ptr[3] = (S_008F0C_DST_SEL_X(V_008F0C_SQ_SEL_X) | + S_008F0C_DST_SEL_Y(V_008F0C_SQ_SEL_Y) | + S_008F0C_DST_SEL_Z(V_008F0C_SQ_SEL_Z) | + S_008F0C_DST_SEL_W(V_008F0C_SQ_SEL_W) | + S_008F0C_NUM_FORMAT(num_format) | + S_008F0C_DATA_FORMAT(data_format)); r600_context_bo_reloc(rctx, rbuffer, RADEON_USAGE_READ); } |