summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2019-06-22 19:40:04 +0100
committerEric Engestrom <[email protected]>2019-07-31 09:41:05 +0100
commit53b98b0185ddc37f9e3f29eef5cf8d954ba5ac49 (patch)
tree3288ee510730d3d71caad2b830f2f75b2a3e1982
parent20c89b060ffa2bb21b8b0e71817a59c9d02b2bbf (diff)
virgl: make use of local variable
Otherwise that variable is only used in an assert() and would need an ASSERTED to avoid the warning. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
-rw-r--r--src/gallium/drivers/virgl/virgl_screen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
index 35becc1bd6a..e1a9f4ef385 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -550,7 +550,7 @@ has_format_bit(struct virgl_supported_format_mask *mask,
unsigned idx = val / 32;
unsigned bit = val % 32;
assert(idx < ARRAY_SIZE(mask->bitmask));
- return (mask->bitmask[val / 32] & (1u << bit)) != 0;
+ return (mask->bitmask[idx] & (1u << bit)) != 0;
}
bool