[Mesa-dev] [PATCH v4 (part2) 00/59] ARB_shader_storage_buffer_object (mesa, i965)

Iago Toral Quiroga itoral at igalia.com
Wed Aug 5 01:29:57 PDT 2015


This is roughly the same as v3 (mostly with some review feedback addressed) but
it adds 3 new patches to the beginning of the series that implement
typed/untyped vec4 messages, which we need for vec4 SSBO support. These patches
where initially part of the ARB_shader_image_load_store series that Curro
worked on but they had some issues and since support for the extension in
geometry stages was not mandatory they never landed. We still need them for
SSBO support in geometry stages (unless we decide to drop that too), so Curro
reworked the patches to align them with review feedback and we decided that
at this point it would make more sense to have them reviewed with the SSBO
implementation, since it would be the only user for them at this moment
(at least support for geometry stages in ARB_shader_image_load_store would also
make use of them if we decide to retake that at a later moment).

With these 3 patches included for review, the series no longer has dependencies
from other patches, since the rest of Curro's patches we depended on
have already landed in master.

As with previous versions, the last two patches are optional, although
specially patch 58 is interesting since it fixes a bug that affects
UBOs (and thus also SSBOs) in master.

Antia Puentes (1):
  glsl: Mark as active all elements of shared/std140 block arrays

Francisco Jerez (3):
  i965/vec4: Introduce VEC4 IR builder.
  i965/vec4: Import helpers to convert vectors into arrays and back.
  i965/vec4: Import surface message builder functions.

Iago Toral Quiroga (28):
  i965: Use 16-byte offset alignment for shader storage buffers
  i965: Implement DriverFlags.NewShaderStorageBuffer
  i965: Set MaxShaderStorageBuffers for compute shaders
  i965: Upload Shader Storage Buffer Object surfaces
  i965: handle visiting of ir_var_shader_storage variables
  i965/fs: Do not split buffer variables
  i965/vec4: Implement SSBO writes
  nir: Implement __intrinsic_store_ssbo
  i965/nir/fs: Implement SSBO writes
  i965/vec4: Implement SSBO reads
  nir: Implement __intrinsic_store_load
  i965/nir/fs: Implement SSBO reads
  nir: ignore an instruction's dest if it hasn't any
  glsl: Rename atomic counter functions
  glsl: Add atomic functions from ARB_shader_storage_buffer_object
  glsl: lower SSBO atomic intrinsics
  nir: Implement lowered SSBO atomic intrinsics
  i965/nir/fs: Implement SSBO atomics
  i965/vec4: Implement lowered SSBO atomic intrinsics
  glsl: First argument to atomic functions must be a buffer variable
  mesa: Add queries for GL_SHADER_STORAGE_BUFFER
  glsl: Allow use of memory qualifiers with
    ARB_shader_storage_buffer_object.
  glsl: Apply memory qualifiers to buffer variables
  glsl: Allow memory layout qualifiers on shader storage buffer objects
  glsl: Do not allow assignments to read-only variables
  glsl: Do not allow reads from write-only variables
  docs: Mark ARB_shader_storage_buffer_object as done for i965
  i965/vec4: Skip dependency control for opcodes emitting multiple
    instructions

Kristian Høgsberg (1):
  glsl: atomic counters can be declared as buffer-qualified variables

Samuel Iglesias Gonsalvez (26):
  i965: set ARB_shader_storage_buffer_object related constant values
  glsl: add support for unsized arrays in shader storage blocks
  glsl: Add parser/compiler support for unsized array's length()
  glsl: Lower unsized array's length calculation expression
  nir: add shader storage buffer's unsized array length calculation
  i965/vec4: Implement unsized array's length calculation
  i965/fs: Implement generator code for unsized array's length
    calculation
  i965/fs/nir: implement unsized array's length calculation
  i965/wm: emit null buffer surfaces when null buffers are attached
  i965/wm: surfaces should have the API buffer size, not the drm buffer
    size
  glsl: Add parser/compiler support for std430 interface packing
    qualifier
  glsl: propagate interface packing information to arrays of scalars,
    vectors.
  glsl: propagate std430 packing qualifier to struct's members and array
    of structs
  glsl: add std430 interface packing support to ssbo store and unsized
    array length
  glsl: a shader storage buffer must be smaller than the maximum size
    allowed
  glsl: number of active shader storage blocks must be within allowed
    limits
  glsl: ignore buffer variables when counting uniform components
  glsl: shader storage blocks use different max block size values than
    uniforms
  mesa: add glShaderStorageBlockBinding()
  glsl: fix UNIFORM_BUFFER_START or UNIFORM_BUFFER_SIZE query when no
    buffer object is bound
  main: Add SHADER_STORAGE_BLOCK and BUFFER_VARIABLE support for
    ARB_program_interface_query
  main/tests: add ARB_shader_storage_buffer_object tokens to
    enum_strings
  glapi: add ARB_shader_storage_block_buffer_object
  mesa: Add getters for the GL_ARB_shader_storage_buffer_object max
    constants
  mesa: enable ARB_shader_storage_buffer_object extension for GLES 3.1
  i965: Enable ARB_shader_storage_buffer_object extension for gen7+

 docs/GL3.txt                                       |   4 +-
 src/glsl/ast.h                                     |  11 +
 src/glsl/ast_array_index.cpp                       |   3 +-
 src/glsl/ast_function.cpp                          |  50 +-
 src/glsl/ast_to_hir.cpp                            | 323 ++++++++++-
 src/glsl/ast_type.cpp                              |   1 +
 src/glsl/builtin_functions.cpp                     | 215 +++++++-
 src/glsl/builtin_types.cpp                         |   3 +-
 src/glsl/glsl_lexer.ll                             |  10 +-
 src/glsl/glsl_parser.yy                            |  77 +++
 src/glsl/glsl_parser_extras.cpp                    |   1 +
 src/glsl/glsl_parser_extras.h                      |   2 +-
 src/glsl/glsl_types.cpp                            | 205 +++++--
 src/glsl/glsl_types.h                              |  49 +-
 src/glsl/ir.cpp                                    |  10 +
 src/glsl/ir.h                                      |  35 +-
 src/glsl/ir_uniform.h                              |   5 +
 src/glsl/ir_validate.cpp                           |  13 +
 src/glsl/link_uniform_block_active_visitor.cpp     |  23 +
 src/glsl/link_uniform_blocks.cpp                   |  32 +-
 src/glsl/link_uniforms.cpp                         |  40 +-
 src/glsl/linker.cpp                                | 174 ++++--
 src/glsl/linker.h                                  |   1 +
 src/glsl/lower_ubo_reference.cpp                   | 388 ++++++++++++-
 src/glsl/nir/glsl_to_nir.cpp                       | 171 +++++-
 src/glsl/nir/nir_intrinsics.h                      |  35 +-
 src/glsl/nir/nir_lower_phis_to_scalar.c            |   2 +
 .../glapi/gen/ARB_shader_storage_buffer_object.xml |  36 ++
 src/mapi/glapi/gen/GL4x.xml                        |  18 +-
 src/mapi/glapi/gen/Makefile.am                     |   1 +
 src/mapi/glapi/gen/gl_API.xml                      |   6 +-
 src/mapi/glapi/gen/static_data.py                  |   1 +
 src/mesa/drivers/dri/i965/Makefile.sources         |   3 +
 src/mesa/drivers/dri/i965/brw_context.c            |  14 +
 src/mesa/drivers/dri/i965/brw_context.h            |   6 +
 src/mesa/drivers/dri/i965/brw_defines.h            |   4 +
 src/mesa/drivers/dri/i965/brw_fs.cpp               |   1 +
 src/mesa/drivers/dri/i965/brw_fs.h                 |   5 +
 .../dri/i965/brw_fs_channel_expressions.cpp        |   2 +
 src/mesa/drivers/dri/i965/brw_fs_generator.cpp     |  47 ++
 src/mesa/drivers/dri/i965/brw_fs_nir.cpp           | 259 +++++++++
 .../drivers/dri/i965/brw_fs_vector_splitting.cpp   |   1 +
 src/mesa/drivers/dri/i965/brw_shader.cpp           |   6 +
 src/mesa/drivers/dri/i965/brw_state_upload.c       |   1 +
 src/mesa/drivers/dri/i965/brw_vec4.cpp             |   1 +
 src/mesa/drivers/dri/i965/brw_vec4.h               |  10 +
 src/mesa/drivers/dri/i965/brw_vec4_builder.h       | 602 +++++++++++++++++++++
 src/mesa/drivers/dri/i965/brw_vec4_generator.cpp   |  35 ++
 .../drivers/dri/i965/brw_vec4_surface_builder.cpp  | 332 ++++++++++++
 .../drivers/dri/i965/brw_vec4_surface_builder.h    |  69 +++
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp     | 391 ++++++++++++-
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c   |  70 ++-
 src/mesa/drivers/dri/i965/intel_buffer_objects.c   |   2 +
 src/mesa/drivers/dri/i965/intel_extensions.c       |   1 +
 src/mesa/main/get.c                                |  44 +-
 src/mesa/main/get_hash_params.py                   |  16 +
 src/mesa/main/mtypes.h                             |   3 +-
 src/mesa/main/program_resource.c                   |   7 +-
 src/mesa/main/shader_query.cpp                     | 269 ++++++++-
 src/mesa/main/tests/enum_strings.cpp               |  15 +
 src/mesa/main/uniforms.c                           |  52 ++
 src/mesa/main/uniforms.h                           |   4 +
 src/mesa/program/ir_to_mesa.cpp                    |   2 +
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp         |   5 +
 64 files changed, 4009 insertions(+), 215 deletions(-)
 create mode 100644 src/mapi/glapi/gen/ARB_shader_storage_buffer_object.xml
 create mode 100644 src/mesa/drivers/dri/i965/brw_vec4_builder.h
 create mode 100644 src/mesa/drivers/dri/i965/brw_vec4_surface_builder.cpp
 create mode 100644 src/mesa/drivers/dri/i965/brw_vec4_surface_builder.h

-- 
1.9.1



More information about the mesa-dev mailing list