etnaviv: Clear lbl_usage array correctly
Fill the entire array instead of just a quarter. This avoids
crashes with large shaders.
(currently this never causes a problem because shaders larger than 2048/4
instructions are not supported by this driver on any hardware, but it will
cause problems in the future)
Fixes: ec43605189 ("etnaviv: fix shader miscompilation with more than 16 labels")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
This commit is contained in:
committed by
Christian Gmeiner
parent
6874b953f6
commit
15a1ceb127
@@ -2353,7 +2353,7 @@ etna_compile_shader(struct etna_shader_variant *v)
|
||||
if (!c)
|
||||
return false;
|
||||
|
||||
memset(&c->lbl_usage, -1, ARRAY_SIZE(c->lbl_usage));
|
||||
memset(&c->lbl_usage, -1, sizeof(c->lbl_usage));
|
||||
|
||||
const struct tgsi_token *tokens = v->shader->tokens;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user