diff options
author | Roland Scheidegger <[email protected]> | 2018-01-01 04:20:41 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2018-01-10 04:59:00 +0100 |
commit | 0be1dc25cf72da49fc767f2cd6560f738c0449e0 (patch) | |
tree | c9bc91d810b9ae4ca1a726faa5b27da30d72059f /src/gallium/drivers/r600/r600_state.c | |
parent | 43292c78b7f6b496cd568005c8fa14b5b1d6375f (diff) |
r600: increase number of ubos by one to 14
Ideally we'd support 16 (d3d11 requires 15, and mesa subtracts one for non-ubo
constants), but that's kind of impossible (it would be only doable if either
we'd somehow merge the mesa non-ubo constants with the driver constants, or
only use the driver constants with vtx fetch instead of through the kcache
mechanism - the latter probably wouldn't be too bad).
For now just do as the comment already said, place the gs ring (not really
a const buffer in any case) which is only ever referred to through vc fetch
clauses at index 16. Throw in a couple asserts for good measure to make sure
the hw limit isn't exceeded.
Tested-by: Konstantin Kharlamov <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_state.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_state.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 253ff57a98f..89cf7d2e50a 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -1712,6 +1712,7 @@ static void r600_emit_constant_buffers(struct r600_context *rctx, offset = cb->buffer_offset; if (!gs_ring_buffer) { + assert(buffer_index < R600_MAX_HW_CONST_BUFFERS); radeon_set_context_reg(cs, reg_alu_constbuf_size + buffer_index * 4, DIV_ROUND_UP(cb->buffer_size, 256)); radeon_set_context_reg(cs, reg_alu_const_cache + buffer_index * 4, offset >> 8); |