projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d5e62d
)
broadcom/vc5: Skip emitting textures that aren't used.
author
Eric Anholt
<eric@anholt.net>
Fri, 3 Nov 2017 02:04:12 +0000
(19:04 -0700)
committer
Eric Anholt
<eric@anholt.net>
Tue, 7 Nov 2017 17:40:25 +0000
(09:40 -0800)
Fixes crashes when ARB_fp uses texture[1] but not 0, as in piglit's
fp-fragment-position.
src/gallium/drivers/vc5/vc5_emit.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/vc5/vc5_emit.c
b/src/gallium/drivers/vc5/vc5_emit.c
index 094d5482954f22cdbb949cc07ad0723fb30e1304..de4737eeec860b387ccb2761aac1bb53bf342366 100644
(file)
--- a/
src/gallium/drivers/vc5/vc5_emit.c
+++ b/
src/gallium/drivers/vc5/vc5_emit.c
@@
-201,8
+201,10
@@
emit_one_texture(struct vc5_context *vc5, struct vc5_texture_stateobj *stage_tex
static void
emit_textures(struct vc5_context *vc5, struct vc5_texture_stateobj *stage_tex)
{
- for (int i = 0; i < stage_tex->num_textures; i++)
- emit_one_texture(vc5, stage_tex, i);
+ for (int i = 0; i < stage_tex->num_textures; i++) {
+ if (stage_tex->textures[i])
+ emit_one_texture(vc5, stage_tex, i);
+ }
}
void