[Mesa-dev] [PATCH 00/21] i965/fs: Push small uniform arrays

Jason Ekstrand jason at jlekstrand.net
Wed Aug 19 22:45:35 PDT 2015


Previously, every time we had an indirect into a uniform array it would
immediatly git shoved off to a pull constant because we had no way of
indirectly addressing GRFs.  This series adds support for indirect push
constants to the FS backend.  Most of the patches are general cleanups and
fixes that we probably want anyway including 4 from Ken.  The last 4 are
where we actually add new functionality.

Shader-db results will be difficult to get because an indirect push
constant and an indirect pull constant generate the exact same number of
instructions (2).  I'll try and hack something up to find the affected
programs and try and maybe get some benchmark results.

Eventually we may want to do something similar in the vec4 backend as well.
The same principles will probably work there though it may be a little
trickier with the way we re-arrange uniforms to pack them better.

Jason Ekstrand (17):
  i965: Rename setup_vector_uniform_values to setup_vec4_uniform_value
  i965: Make setup_vec4_uniform_value and _image_uniform_values take an
    offset
  i965/vec4: Drop an assertion from type_size_vec4
  nir/intrinsics: Add a second const index to load_uniform
  nir/lower_io: Separate driver_location and base offset for uniforms
  i965/vec4_nir: Get rid of the uniform_driver_location tracking
  i965/fs: Rework uniform handling
  nir/lower_io: Remove assign_var_locations_direct_first
  i965/fs: Combine assign_constant_locations and
    move_uniform_array_access_to_pull_constants
  i965/fs: Handle reladdr in liveness calculations in
    assign_constant_locations
  i964/fs: Refactor assign_constant_locations
  i965/fs: Rename demote_pull_constants to lower_constant_loads
  i965/fs: Split VGRFs after lowering pull constants
  i965/brw_reg: Add a brw_VxH_indirect helper
  i965/fs: Add an opcode for loading indirect push constants
  i965/fs: Support indirect push constants in lower_constant_loads
  i965/fs: Push small uniform arrays

Kenneth Graunke (4):
  nir: Pull nir_lower_io's load_op selection into a helper function.
  nir: Use nir_builder in nir_lower_io's get_io_offset().
  i965: Move type_size() methods out of visitor classes.
  nir: Pass a type_size() function pointer into nir_lower_io().

 src/glsl/nir/nir.h                             |  14 +-
 src/glsl/nir/nir_intrinsics.h                  |  28 ++-
 src/glsl/nir/nir_lower_io.c                    | 276 +++++--------------------
 src/mesa/drivers/dri/i965/brw_defines.h        |  17 ++
 src/mesa/drivers/dri/i965/brw_fs.cpp           | 274 ++++++++++++++----------
 src/mesa/drivers/dri/i965/brw_fs.h             |  16 +-
 src/mesa/drivers/dri/i965/brw_fs_cse.cpp       |   1 +
 src/mesa/drivers/dri/i965/brw_fs_generator.cpp |  70 +++++++
 src/mesa/drivers/dri/i965/brw_fs_nir.cpp       |  42 +---
 src/mesa/drivers/dri/i965/brw_nir.c            |  21 +-
 src/mesa/drivers/dri/i965/brw_reg.h            |  11 +
 src/mesa/drivers/dri/i965/brw_shader.cpp       |  18 +-
 src/mesa/drivers/dri/i965/brw_shader.h         |  11 +-
 src/mesa/drivers/dri/i965/brw_vec4.h           |   7 +-
 src/mesa/drivers/dri/i965/brw_vec4_gs_nir.cpp  |   4 +-
 src/mesa/drivers/dri/i965/brw_vec4_nir.cpp     |  30 +--
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |  49 +++--
 17 files changed, 423 insertions(+), 466 deletions(-)

-- 
2.4.3



More information about the mesa-dev mailing list