OSDN Git Service

vc4: Make sure that direct texture clamps have a minimum value of 0.
authorEric Anholt <eric@anholt.net>
Mon, 15 Jun 2015 22:05:36 +0000 (15:05 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 16 Jun 2015 22:15:14 +0000 (15:15 -0700)
commita0cd1a4060fdb55a57609b460629c7059bbe7047
treeac939eae00ab2ac973fb74664e19f9530cea83f1
parentd4d27361499cac73da4716b571519ecb71cef551
vc4: Make sure that direct texture clamps have a minimum value of 0.

I was thinking of the MIN opcode in terms of unsigned math, but it's
signed, so if you used a negative array index, you could read before the
UBO.  Fixes segfaults under simulation in piglit array indexing tests with
mprotect-based guard pages.
src/gallium/drivers/vc4/kernel/vc4_validate_shaders.c
src/gallium/drivers/vc4/vc4_program.c