nvc0: serialize before updating some constant buffer bindings on Maxwell+
authorRhys Perry <pendingchaos02@gmail.com>
Sun, 15 Jul 2018 22:14:41 +0000 (23:14 +0100)
committerRhys Perry <pendingchaos02@gmail.com>
Mon, 30 Jul 2018 14:04:26 +0000 (15:04 +0100)
commitf310e86a4200d8ecc74f9ae682386b6ecd1d09d2
treebf19cc58643899fdc8412723a9cb146c9c472d85
parent0a3f653180996e4ca44586e6974ded9ba6bc8ecc
nvc0: serialize before updating some constant buffer bindings on Maxwell+

To avoid serializing, this has the user constant buffer always be 65536
bytes and enabled unless it's required that something else is used for
constant buffer 0.

Fixes artifacts with at least XCOM: Enemy Within, 0 A.D. and Unigine
Valley, Heaven and Superposition.

v2: changed uniform_buffer_bound to be bool instead of a uint32_t
v3: remove magic constants
v3: remove pointless code in nvc0_validate_driverconst

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100177
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nvc0/nvc0_compute.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.h
src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c