mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-17 21:10:35 +01:00
anv: use align/align64 instead ALIGN, as the input is size_t/uint64_t
When the input is size_t, cast the input to uint32_t, as the output is expect uint32_t not size_t Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38365>
This commit is contained in:
parent
db767eb7e0
commit
ee4c3e790f
2 changed files with 3 additions and 3 deletions
|
|
@ -248,7 +248,7 @@ get_bvh_layout(VkGeometryTypeKHR geometry_type, uint32_t leaf_count,
|
|||
offset += leaf_count * sizeof(uint64_t);
|
||||
}
|
||||
/* The BVH and hence bvh_offset needs 64 byte alignment for RT nodes. */
|
||||
offset = ALIGN(offset, 64);
|
||||
offset = align64(offset, 64);
|
||||
|
||||
/* This is where internal_nodes/leaves start to be encoded */
|
||||
layout->bvh_offset = offset;
|
||||
|
|
|
|||
|
|
@ -1246,7 +1246,7 @@ anv_h264_encode_video(struct anv_cmd_buffer *cmd, const VkVideoEncodeInfoKHR *en
|
|||
|
||||
slice_header_data_len_in_bits -= 8;
|
||||
|
||||
length_in_dw = ALIGN(slice_header_data_len_in_bits, 32) >> 5;
|
||||
length_in_dw = align((uint32_t)slice_header_data_len_in_bits, 32) >> 5;
|
||||
data_bits_in_last_dw = slice_header_data_len_in_bits & 0x1f;
|
||||
|
||||
dw = anv_batch_emitn(&cmd->batch, length_in_dw + 2, GENX(MFX_PAK_INSERT_OBJECT),
|
||||
|
|
@ -2355,7 +2355,7 @@ anv_h265_encode_video(struct anv_cmd_buffer *cmd, const VkVideoEncodeInfoKHR *en
|
|||
uint32_t length_in_dw;
|
||||
uint32_t data_bits_in_last_dw;
|
||||
|
||||
length_in_dw = ALIGN(slice_header_data_len_in_bits, 32) >> 5;
|
||||
length_in_dw = align((uint32_t)slice_header_data_len_in_bits, 32) >> 5;
|
||||
data_bits_in_last_dw = slice_header_data_len_in_bits & 0x1f;
|
||||
|
||||
dw = anv_batch_emitn(&cmd->batch, length_in_dw + 2, GENX(HCP_PAK_INSERT_OBJECT),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue