mesa/src/compiler
Eric Anholt f3b33a5a35 nir: Add a range_base+range to nir_intrinsic_load_ubo().
For UBO accesses to be the same performance as classic GL default uniform
block uniforms, we need to be able to push them through the same path.  On
freedreno, we haven't been uploading UBOs as push constants when they're
used for indirect array access, because we don't know what range of the
UBO is needed for an access.

I believe we won't be able to calculate the range in general in spirv
given casts that can happen, so we define a [0, ~0] range to be "We don't
know anything".  We use that at the moment for all UBO loads except for
nir_lower_uniforms_to_ubo, where we now avoid losing the range information
that default uniform block loads come with.

In a departure from other NIR intrinsics with a "base", I didn't make the
base an be something you have to add to the src[1] offset.  This keeps us
from needing to modify all drivers (particularly since the base+offset
thing can mean needing to do addition in the backend), makes backend
tracking of ranges easy, and makes the range calculations in
load_store_vectorizer reasonable.  However, this could definitely cause
some confusion for people used to the normal NIR base.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6359>
2020-09-08 18:20:51 +00:00
..
glsl glsl_to_nir: fix crashes with int16 shifts 2020-09-06 06:35:31 -04:00
nir nir: Add a range_base+range to nir_intrinsic_load_ubo(). 2020-09-08 18:20:51 +00:00
spirv nir: Add a range_base+range to nir_intrinsic_load_ubo(). 2020-09-08 18:20:51 +00:00
Android.glsl.gen.mk Android: Fixes for Q and R 2020-07-15 20:49:24 +00:00
Android.glsl.mk android: glsl: build shader cache sources 2017-02-20 16:30:37 +00:00
Android.mk
Android.nir.gen.mk nir: Add missing dependency in Android.nir.gen.mk 2019-08-19 09:53:18 +03:00
Android.nir.mk android: fix libmesa_nir build 2017-07-21 08:47:56 +03:00
builtin_type_macros.h nir/vtn: Add support for kernel images to SPIRV-to-NIR. 2020-08-31 21:17:39 +00:00
glsl_types.cpp compiler/types: Fix deserializing structs with >= 15 members 2020-09-04 20:12:12 +00:00
glsl_types.h nir/glsl: Add an explicit_alignment field to glsl_type 2020-09-03 18:02:50 +00:00
Makefile.sources nir: Add a lowering pass for backends wanting load_ubo with vec4 offsets. 2020-08-24 09:53:35 -07:00
meson.build spirv: add some tests for volatile/available/visible 2020-09-01 17:15:22 +00:00
nir_types.cpp nir/glsl: Add an explicit_alignment field to glsl_type 2020-09-03 18:02:50 +00:00
nir_types.h nir/glsl: Add an explicit_alignment field to glsl_type 2020-09-03 18:02:50 +00:00
SConscript spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
SConscript.glsl Move compiler.h and imports.h/c from src/mesa/main into src/util 2020-03-27 21:00:09 +00:00
SConscript.nir nir: mako all the intrinsics 2018-03-27 08:36:37 -04:00
SConscript.spirv spirv: Fix building with SCons 2018-03-30 14:33:03 -06:00
shader_enums.c compiler: add INTERP_MODE_COLOR for radeonsi 2020-09-02 23:03:00 -04:00
shader_enums.h compiler: add INTERP_MODE_COLOR for radeonsi 2020-09-02 23:03:00 -04:00
shader_info.h nir/vtn: Convert constant samplers to variables with data 2020-08-31 21:17:39 +00:00