summaryrefslogtreecommitdiffstats
path: root/scons/custom.py
diff options
context:
space:
mode:
authorNeil Roberts <[email protected]>2014-08-11 12:21:44 +0100
committerNeil Roberts <[email protected]>2014-08-14 11:54:48 +0100
commit2c50212b14da27de4e3da62488ae4e35c069d84e (patch)
treec0cadda73f6d4db2549277cd393d650894c7481d /scons/custom.py
parent6fb42ee7a632e181160ac4be234b30e50a1b91d5 (diff)
i965: Store uniform constant values in a gl_constant_value instead of float
The brw_stage_prog_data struct previously contained an array of float pointers to the values of parameters. These were then copied into a batch buffer to upload the values using a regular assignment. However the float values were also being overloaded to store integer values for integer uniforms. This can break if x87 floating-point registers are used to do the assignment because the fst instruction tries to fix up invalid float values. If an integer constant happened to look like an invalid float value then it would get altered when it was copied into the batch buffer. This patch changes the pointers to be gl_constant_value instead so that the assignment should end up copying without any alteration. This also makes it more obvious that the values being stored here are overloaded for multiple types. There are some static asserts where the values are uploaded to ensure that the size of gl_constant_value is the same as a float. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81150 Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'scons/custom.py')
0 files changed, 0 insertions, 0 deletions