Skip to content
Snippets Groups Projects
Commit 320f7aa1 authored by Wladimir J. van der Laan's avatar Wladimir J. van der Laan Committed by Robert Foss
Browse files

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: ec436051 ("etnaviv: fix shader miscompilation with more than 16 labels")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: default avatarWladimir J. van der Laan <laanwj@gmail.com>
Reviewed-by: default avatarChristian Gmeiner <christian.gmeiner@gmail.com>
parent 13db7809
No related branches found
No related tags found
No related merge requests found
......@@ -2304,7 +2304,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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment