mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 08:40:39 +01:00
r600: fix constant buffer size programming
When buffer size is less than 16, zero ends up being programmed as
size, which prevents the hardware from fetching the correct values.
Fix it by combining shift and align so that the value is always
rounded up.
Cc: "11.1 11.0 10.6" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92229
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
(cherry picked from commit da0e216e06)
This commit is contained in:
parent
b95dc1a5c8
commit
e468d4b1d6
2 changed files with 2 additions and 2 deletions
|
|
@ -1944,7 +1944,7 @@ static void evergreen_emit_constant_buffers(struct r600_context *rctx,
|
|||
|
||||
if (!gs_ring_buffer) {
|
||||
radeon_set_context_reg_flag(cs, reg_alu_constbuf_size + buffer_index * 4,
|
||||
ALIGN_DIVUP(cb->buffer_size >> 4, 16), pkt_flags);
|
||||
ALIGN_DIVUP(cb->buffer_size, 256), pkt_flags);
|
||||
radeon_set_context_reg_flag(cs, reg_alu_const_cache + buffer_index * 4, va >> 8,
|
||||
pkt_flags);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1768,7 +1768,7 @@ static void r600_emit_constant_buffers(struct r600_context *rctx,
|
|||
|
||||
if (!gs_ring_buffer) {
|
||||
radeon_set_context_reg(cs, reg_alu_constbuf_size + buffer_index * 4,
|
||||
ALIGN_DIVUP(cb->buffer_size >> 4, 16));
|
||||
ALIGN_DIVUP(cb->buffer_size, 256));
|
||||
radeon_set_context_reg(cs, reg_alu_const_cache + buffer_index * 4, offset >> 8);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue