nir: Add multiplier argument to nir_lower_uniforms_to_ubo.
authorTimur Kristóf <timur.kristof@gmail.com>
Thu, 28 Feb 2019 09:53:11 +0000 (10:53 +0100)
committerEric Anholt <eric@anholt.net>
Tue, 5 Mar 2019 19:13:27 +0000 (19:13 +0000)
commit6684e039eba9c2e9602b1cc9d5177f69e478ff46
treef2d93cf6d84b5a2c44d41e57980e22905c10a1fb
parent909d1f50f3ffc62d5a23669ad0bc8eedb9416af0
nir: Add multiplier argument to nir_lower_uniforms_to_ubo.

Note that locations can be set in different units, and the multiplier
argument caters to supporting these different units. For example,
st_glsl_to_nir uses dwords (4 bytes) so the multiplier should be 4,
while tgsi_to_nir uses bytes, so the multiplier should be 16.

Signed-Off-By: Timur Kristóf <timur.kristof@gmail.com>
Tested-by: Andre Heider <a.heider@gmail.com>
Tested-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_uniforms_to_ubo.c
src/mesa/state_tracker/st_glsl_to_nir.cpp
src/mesa/state_tracker/st_nir_builtins.c