radeonsi: check if value is negative
authorJakob Sinclair <sinclair.jakob@openmailbox.org>
Mon, 25 Apr 2016 07:03:52 +0000 (09:03 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 28 Apr 2016 09:33:38 +0000 (11:33 +0200)
commit76b8c5cc602eda19c91b842b02f84564c18e79a6
tree0b4a6b78863a780c2f6ead5cea1789aa4cb30148
parent860210ccfc0a90a4635fc930cd323bc426db5991
radeonsi: check if value is negative

Fixes a Coverity defect by adding checks to see if a value is negative
before using it to index an array. By checking the value first it makes
the code a bit safer but overall should not have a big impact.

CID: 1355598

Signed-off-by: Jakob Sinclair <sinclair.jakob@openmailbox.org>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_state.c