nir: Let nir_opt_algebraic rules contain unsigned constants > INT_MAX.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 20 Jan 2016 01:34:24 +0000 (17:34 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 20 Jan 2016 02:10:30 +0000 (18:10 -0800)
commitb3cc10f3b24527e06da175cb8422f1e4f301cd87
tree4b7cad15334a74c39893caf7a995e706958ca975
parenteb2a119da284174068d9ad0a2ec4314a77ad1697
nir: Let nir_opt_algebraic rules contain unsigned constants > INT_MAX.

struct.pack('i', val) interprets `val` as a signed integer, and dies
if `val` > INT_MAX.  For larger constants, we need to use 'I' which
interprets it as an unsigned value.

This patch makes us use 'I' for all values >= 0, and 'i' for negative
values.  This should work in all cases.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/nir/nir_algebraic.py