Soon, we're going to start providing UBO data to shaders as push
constants, rather than requiring them to issue pull loads. The
3DSTATE_CONSTANT_* commands require 32 byte aligned pointers.
So, we need to increase this from 16 to 32.
Reviewed-by: Matt Turner <mattst88@gmail.com>
* the element in the buffer."
*
* However, unaligned accesses are slower, so enforce buffer alignment.
+ *
+ * In order to push UBO data, 3DSTATE_CONSTANT_XS imposes an additional
+ * restriction: the start of the buffer needs to be 32B aligned.
*/
- ctx->Const.UniformBufferOffsetAlignment = 16;
+ ctx->Const.UniformBufferOffsetAlignment = 32;
/* ShaderStorageBufferOffsetAlignment should be a cacheline (64 bytes) so
* that we can safely have the CPU and GPU writing the same SSBO on