summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-01-30 11:17:35 -0800
committerDylan Baker <[email protected]>2019-01-31 11:09:28 -0800
commit7fdb08375f7091284778668f6ecf0d9304e0dc24 (patch)
tree768ffafff860c19d99338b78910366f646beabf5 /src
parent535cc4f1d511c147c4c9525e2f7b9fc742ea83ae (diff)
v3d: Fix image_load_store clamping of signed integer stores.
This was copy-and-paste fail, that oddly showed up in the CTS's reinterprets of r32f, rgba8, and srgba8 to rgba8i, but not r32ui and r32i to rgba8i or reinterprets to other signed int formats. Fixes: 6281f26f064a ("v3d: Add support for shader_image_load_store.") (cherry picked from commit ab4d5775b0decad7df56245cecad63912ed62b4c)
Diffstat (limited to 'src')
-rw-r--r--src/broadcom/compiler/v3d_nir_lower_image_load_store.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/broadcom/compiler/v3d_nir_lower_image_load_store.c b/src/broadcom/compiler/v3d_nir_lower_image_load_store.c
index e74206b3949..2aa3cbad495 100644
--- a/src/broadcom/compiler/v3d_nir_lower_image_load_store.c
+++ b/src/broadcom/compiler/v3d_nir_lower_image_load_store.c
@@ -156,7 +156,7 @@ pack_sint(nir_builder *b, nir_ssa_def *color, const unsigned *bits,
int num_components)
{
color = nir_channels(b, color, (1 << num_components) - 1);
- color = nir_format_clamp_uint(b, color, bits);
+ color = nir_format_clamp_sint(b, color, bits);
return pack_bits(b, color, bits, num_components, true);
}