aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorIcecream95 <[email protected]>2020-06-05 20:17:27 +1200
committerMarge Bot <[email protected]>2020-06-05 22:51:45 +0000
commitd97aaad1555ad25fd13af588aa02f9ff3e081e34 (patch)
tree9aec358f966bef083035eb1738973659ea725586 /src/panfrost
parent0bacb280a886905310c9b30c5af234c32ff582dc (diff)
pan/midgard: Use a signed value for checking inline constants
Inline constants are sign extended, so we should use a int16_t instead of an unsigned type. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5351>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/midgard/midgard_compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index 4cce9102c68..3ccff63c5b4 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -2221,7 +2221,7 @@ embedded_to_inline_constant(compiler_context *ctx, midgard_block *block)
unsigned component = ins->swizzle[1][first_comp];
/* Scale constant appropriately, if we can legally */
- uint16_t scaled_constant = 0;
+ int16_t scaled_constant = 0;
if (is_16) {
scaled_constant = ins->constants.u16[component];