mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
radv: Fix radeon_enc_code_ue with values over 2^16
This ports this fixes from radeonsi:
138ba42a87 ("radeonsi/vcn: Fix radeon_enc_code_ue with values over 2^16")
Cc: mesa-stable
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31135>
This commit is contained in:
parent
e0157abec6
commit
e89f4a48fd
1 changed files with 4 additions and 4 deletions
|
|
@ -382,7 +382,7 @@ radv_enc_flush_headers(struct radv_cmd_buffer *cmd_buffer)
|
|||
static void
|
||||
radv_enc_code_ue(struct radv_cmd_buffer *cmd_buffer, unsigned int value)
|
||||
{
|
||||
int x = -1;
|
||||
unsigned int x = 0;
|
||||
unsigned int ue_code = value + 1;
|
||||
value += 1;
|
||||
|
||||
|
|
@ -390,9 +390,9 @@ radv_enc_code_ue(struct radv_cmd_buffer *cmd_buffer, unsigned int value)
|
|||
value = (value >> 1);
|
||||
x += 1;
|
||||
}
|
||||
|
||||
unsigned int ue_length = (x << 1) + 1;
|
||||
radv_enc_code_fixed_bits(cmd_buffer, ue_code, ue_length);
|
||||
if (x > 1)
|
||||
radv_enc_code_fixed_bits(cmd_buffer, 0, x - 1);
|
||||
radv_enc_code_fixed_bits(cmd_buffer, ue_code, x);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue