diff options
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_depth.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_depth.c b/src/gallium/drivers/llvmpipe/lp_bld_depth.c index 5c13ee5a58e..b6c32ffb979 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_depth.c +++ b/src/gallium/drivers/llvmpipe/lp_bld_depth.c @@ -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; |