radv: replace align_u32_npot() by ALIGN_NPOT
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28568>
This commit is contained in:
committed by
Marge Bot
parent
e75fdac533
commit
6a27c5e9a8
@@ -10564,9 +10564,9 @@ radv_emit_dispatch_packets(struct radv_cmd_buffer *cmd_buffer, const struct radv
|
||||
/* If aligned, these should be an entire block size,
|
||||
* not 0.
|
||||
*/
|
||||
remainder[0] = blocks[0] + cs_block_size[0] - align_u32_npot(blocks[0], cs_block_size[0]);
|
||||
remainder[1] = blocks[1] + cs_block_size[1] - align_u32_npot(blocks[1], cs_block_size[1]);
|
||||
remainder[2] = blocks[2] + cs_block_size[2] - align_u32_npot(blocks[2], cs_block_size[2]);
|
||||
remainder[0] = blocks[0] + cs_block_size[0] - ALIGN_NPOT(blocks[0], cs_block_size[0]);
|
||||
remainder[1] = blocks[1] + cs_block_size[1] - ALIGN_NPOT(blocks[1], cs_block_size[1]);
|
||||
remainder[2] = blocks[2] + cs_block_size[2] - ALIGN_NPOT(blocks[2], cs_block_size[2]);
|
||||
|
||||
blocks[0] = DIV_ROUND_UP(blocks[0], cs_block_size[0]);
|
||||
blocks[1] = DIV_ROUND_UP(blocks[1], cs_block_size[1]);
|
||||
|
||||
@@ -124,12 +124,6 @@ extern "C" {
|
||||
#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST
|
||||
#endif
|
||||
|
||||
static inline uint32_t
|
||||
align_u32_npot(uint32_t v, uint32_t a)
|
||||
{
|
||||
return (v + a - 1) / a * a;
|
||||
}
|
||||
|
||||
/** Alignment must be a power of 2. */
|
||||
static inline bool
|
||||
radv_is_aligned(uintmax_t n, uintmax_t a)
|
||||
|
||||
Reference in New Issue
Block a user