mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 11:00:11 +01:00
gallium/r600: Replace ALIGN_DIVUP with DIV_ROUND_UP
ALIGN_DIVUP is a driver specific(r600g) macro that duplicates DIV_ROUND_UP functionality. Replacing it with DIV_ROUND_UP eliminates this problems. Signed-off-by: Krzysztof A. Sobiecki <sobkas@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
bbd29f1375
commit
0d7477a289
3 changed files with 2 additions and 3 deletions
|
|
@ -1956,7 +1956,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, 256), pkt_flags);
|
||||
DIV_ROUND_UP(cb->buffer_size, 256), pkt_flags);
|
||||
radeon_set_context_reg_flag(cs, reg_alu_const_cache + buffer_index * 4, va >> 8,
|
||||
pkt_flags);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -946,7 +946,6 @@ static inline uint32_t S_FIXED(float value, uint32_t frac_bits)
|
|||
{
|
||||
return value * (1 << frac_bits);
|
||||
}
|
||||
#define ALIGN_DIVUP(x, y) (((x) + (y) - 1) / (y))
|
||||
|
||||
/* 12.4 fixed-point */
|
||||
static inline unsigned r600_pack_float_12p4(float x)
|
||||
|
|
|
|||
|
|
@ -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, 256));
|
||||
DIV_ROUND_UP(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