mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 20:10:17 +01:00
llvmpipe: Fix PIPE_FORMAT_Z32_FLOAT_S8X24_UINT handling for big-endian.
llvmpipe treats PIPE_FORMAT_Z32_FLOAT_S8X24_UINT as a bit of a special case, handling it as two 32-bit pieces rather than a single 64-bit block: /* 64bit d/s format is special already extracted 32 bits */ total_bits = format_desc->block.bits > 32 ? 32 : format_desc->block.bits; The format_desc describes the whole 64-bit block, so the z shift will be 32 for big-endian. But since we're accessing the z channel as a 32-bit value rather than a 64-bit value, we need to mask the shift with 31. Signed-off-by: Richard Sandiford <rsandifo@linux.vnet.ibm.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
1a65629ccc
commit
9cd4dced06
1 changed files with 2 additions and 1 deletions
|
|
@ -363,7 +363,8 @@ get_z_shift_and_mask(const struct util_format_description *format_desc,
|
|||
return FALSE;
|
||||
|
||||
*width = format_desc->channel[z_swizzle].size;
|
||||
*shift = format_desc->channel[z_swizzle].shift;
|
||||
/* & 31 is for the same reason as the 32-bit limit above */
|
||||
*shift = format_desc->channel[z_swizzle].shift & 31;
|
||||
|
||||
if (*width == total_bits) {
|
||||
*mask = 0xffffffff;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue