summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-03-26 19:06:37 -0400
committerIlia Mirkin <[email protected]>2015-03-26 21:02:09 -0400
commit626434893a048f3ba89a751998fcb3789a3dbb96 (patch)
tree1a061b5cc6a54110959211bfbc73249221d0d149 /src/gallium
parentf95a6b2ff4237181fd7e9622e19e9aa0719a1f21 (diff)
tgsi: fix out-of-bounds access for cube arrays
The CUBE_ARRAY case uses r[4]. Make sure that the stack variable is there. Noticed by Coverity. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 8d08059deca..d9e40506afa 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -2344,7 +2344,7 @@ exec_sample(struct tgsi_exec_machine *mach,
{
const uint resource_unit = inst->Src[1].Register.Index;
const uint sampler_unit = inst->Src[2].Register.Index;
- union tgsi_exec_channel r[4], c1;
+ union tgsi_exec_channel r[5], c1;
const union tgsi_exec_channel *lod = &ZeroVec;
enum tgsi_sampler_control control = tgsi_sampler_lod_none;
uint chan;