nir/lower_blend: Fix SNORM logic ops
We need to sign extend. Incidentally this means the iand above is useless for SNORM. Fixes arb_color_buffer_float-render with GL_RGBA8_SNORM. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20016>
This commit is contained in:
committed by
Marge Bot
parent
f9839e7e1b
commit
ee127f03e4
@@ -313,6 +313,8 @@ nir_blend_logicop(
|
||||
if (util_format_is_unorm(format)) {
|
||||
out = nir_format_unorm_to_float(b, out, bits);
|
||||
} else if (util_format_is_snorm(format)) {
|
||||
/* Sign extend before converting so the i2f in snorm_to_float works */
|
||||
out = nir_format_sign_extend_ivec(b, out, bits);
|
||||
out = nir_format_snorm_to_float(b, out, bits);
|
||||
} else {
|
||||
assert(util_format_is_pure_integer(format));
|
||||
|
||||
Reference in New Issue
Block a user