i965/fs: push first double-based uniforms in push constant buffer
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Thu, 5 May 2016 07:18:07 +0000 (09:18 +0200)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 10 May 2016 09:25:09 +0000 (11:25 +0200)
commitc3fab3d00095ed4a5693d5272073298f07dcb9b5
tree292f4bd881b21340c20e05b2578cd56055af98d9
parent193cb67a84c1725382f62a2f3aa60564d275c2f8
i965/fs: push first double-based uniforms in push constant buffer

When there is a mix of definitions of uniforms with 32-bit or 64-bit
data type sizes, the driver ends up doing misaligned access to double
based variables in the push constant buffer.

To fix this, this patch pushes first all the 64-bit variables and
then the rest. Then, all the variables would be aligned to
its data type size.

v2:
- Fix typo and improve comment (Jordan).
- Use ralloc(NULL,...) instead of rzalloc(mem_ctx,...) (Jordan).
- Fix typo (Topi).
- Use pointers instead of references in set_push_pull_constant_loc() (Topi).

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_fs.cpp