projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2486738
)
panfrost: Assert on sysval overflow
author
Icecream95
<ixn@disroot.org>
Mon, 28 Dec 2020 11:49:36 +0000
(
00:49
+1300)
committer
Marge Bot
<eric+marge@anholt.net>
Mon, 18 Jan 2021 20:49:45 +0000
(20:49 +0000)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8358>
src/panfrost/util/pan_sysval.c
patch
|
blob
|
history
diff --git
a/src/panfrost/util/pan_sysval.c
b/src/panfrost/util/pan_sysval.c
index
f28d3a1
..
80e4469
100644
(file)
--- a/
src/panfrost/util/pan_sysval.c
+++ b/
src/panfrost/util/pan_sysval.c
@@
-123,6
+123,7
@@
panfrost_nir_assign_sysval_body(struct panfrost_sysvals *ctx, nir_instr *instr)
/* It hasn't -- so assign it now! */
unsigned id = ctx->sysval_count++;
+ assert(id < MAX_SYSVAL_COUNT);
_mesa_hash_table_u64_insert(ctx->sysval_to_id, sysval, (void *) ((uintptr_t) id + 1));
ctx->sysvals[id] = sysval;
}