diff options
author | Brian Paul <[email protected]> | 2012-07-26 13:26:17 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-07-26 16:00:31 -0600 |
commit | dafa77201f116dc53b18a274fb41eef5bb2bd0e3 (patch) | |
tree | 4fb355ce9781f7aea238860289632540d7b82b4c /src/gallium/drivers/svga/svga_tgsi.c | |
parent | 38184dcd54e77c8f9adc89d337a97afd630b2c07 (diff) |
svga: fix invalid memory reference in needs_to_create_zero()
The emit->key.fkey info is only valid if we're generating a fragment shader.
We should not look at it if we're generating a vertex shader.
When generating a vertex shader, the value of emit->key.fkey.num_textures was
garbage and the loop over num_textures would read invalid data. At best
this would cause us to emit an unused constant. At worse, we could segfault.
Just by dumb luck, fkey.num_textures was usually a smallish integer.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_tgsi.c')
0 files changed, 0 insertions, 0 deletions