freedreno/ir3: Enable PIPE_CAP_PACKED_UNIFORMS
authorKristian H. Kristensen <hoegsberg@chromium.org>
Tue, 26 Mar 2019 17:31:54 +0000 (10:31 -0700)
committerKristian H. Kristensen <hoegsberg@chromium.org>
Wed, 27 Mar 2019 20:26:02 +0000 (13:26 -0700)
commit3c8779af325965a6c200b14ab4cc44c8f0b835e8
tree966fc49e79794464ada647ed814f1606022ece02
parent56b4bc292f1994619d6a9779f15e6b2c5180b1de
freedreno/ir3: Enable PIPE_CAP_PACKED_UNIFORMS

This commit turns on the gallium cap and adds a pass to lower the
load_ubo intrinsics for block 0 back to load_uniform intrinsics and
adjust the backend where the cap switches units from vec4s to dwords.

As we stop using ir3_glsl_type_size() for uniform layout, this also
corrects an issue where we would allocate a vec4 slot for samplers in
uniforms, fixing:

  dEQP-GLES3.functional.shaders.struct.uniform.sampler_array_fragment
  dEQP-GLES3.functional.shaders.struct.uniform.sampler_array_vertex
  dEQP-GLES3.functional.shaders.struct.uniform.sampler_nested_fragment
  dEQP-GLES2.functional.shaders.struct.uniform.sampler_nested_vertex
  dEQP-GLES2.functional.shaders.struct.uniform.sampler_nested_fragment

Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Reviewed-by: Rob Clark <robdclark@gmail.com>
src/freedreno/Makefile.sources
src/freedreno/ir3/ir3_compiler_nir.c
src/freedreno/ir3/ir3_nir.c
src/freedreno/ir3/ir3_nir.h
src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c [new file with mode: 0644]
src/freedreno/ir3/ir3_nir_lower_io_offsets.c
src/freedreno/ir3/meson.build
src/gallium/drivers/freedreno/freedreno_screen.c