[Mesa-dev] [PATCH v3 (part1) 00/26] ARB_shader_storage_buffer_object (mesa)
Iago Toral
itoral at igalia.com
Fri Jul 10 03:23:13 PDT 2015
On Fri, 2015-07-10 at 12:13 +0200, Iago Toral Quiroga wrote:
> As discussed with Jordan, this v3-part1 series contains a good part of the
> frontend stuff (most of which has already been reviewed). The idea is to get
> this landed ahead, since some of the remaining patches (specifically the i965
> backend stuff) depends on ther patches from Curro that have not landed yet.
>
> For reference, this v3-part1 series does not include all the frontend bits,
> specifically it lacks: support for the optional unsized array at the bottom of
> SSBO definitions, implementation of layout mode std430, getters and queries
> for GL_SHADER_STORAGE_BUFFER targets and glShaderStorageBlockBinding.
I forgot to make a reference to the changes in v3... the main change is
the fact that now we lower ssbo operations to GLSL IR intrinsics. In v2
we had ssbo loads implemented as ir_expression nodes and we had added a
new IR node for ssbo stores.
Iago
> Link to the original v2:
> http://lists.freedesktop.org/archives/mesa-dev/2015-June/085562.html
>
> Development branch with this series:
> git clone -b itoral-ARB_shader_storage_buffer_object-v3-part1 https://github.com/Igalia/mesa.git
>
> For reference, here is a repository with the full v3 series (together with the
> patches from Curro it depends on):
> git clone -b itoral-ARB_shader_storage_buffer_object-v3 https://github.com/Igalia/mesa.git
>
> Piglit repository including SSBO tests:
> git clone -b arb_shader_storage_buffer_object-v2 https://github.com/Igalia/piglit.git
>
> Notice that if you intent to run these with this v3-part1 series you will need
> to use:
> MESA_EXTENSION_OVERRIDE="GL_ARB_shader_storage_buffer_object"
>
> There are no piglit regressions with this series except for
> arb_program_interface_query-getprogramresourceiv, but that is expected since
> that test was edited some weeks to incorporate a SSBO in one of the shaders, so
> it will abort when it hits that (since the NIR and i965 backend bits are not
> included with this v3-part1 series).
>
> As for the SSBO specific piglit tests present in the aforementioned repository,
> the results are the ones expected and can be observed here:
> http://paste.ubuntu.com/11854375/
>
> Some notes on these results:
>
> - crashes: mostly due to the fact that this part1 series does not provide the
> NIR implementation of the new intrinsics, so they hit an assert. The
> shader-storage-block-different-size crash is fixed with a patch from Antia that
> was part of one of our dEQP series and was also included at the end of our
> v2 series: http://lists.freedesktop.org/archives/mesa-dev/2015-June/085642.html
> - Other than that, compiler/link tests generally pass and failed tests are
> related to missing features (like unsized arrays or queries) or missing i965
> backend implementation.
>
> With the full v3 series there are no regressions (except for the
> one we discussed with the v1 of this series that is actually a bogus UBO test
> for which we sent a fix to piglit).
>
> Iago Toral Quiroga (15):
> mesa: rename is_in_uniform_block to is_in_buffer_block
> nir: add nir_var_shader_storage
> glsl: Identify active uniform blocks that are buffer blocks as such.
> mesa: Add shader storage buffer support to struct gl_context
> mesa: Initialize and free shader storage buffers
> mesa: Implement _mesa_DeleteBuffers for target
> GL_SHADER_STORAGE_BUFFER
> mesa: Implement _mesa_BindBuffersBase for target
> GL_SHADER_STORAGE_BUFFER
> mesa: Implement _mesa_BindBuffersRange for target
> GL_SHADER_STORAGE_BUFFER
> mesa: Implement _mesa_BindBufferBase for target
> GL_SHADER_STORAGE_BUFFER
> mesa: Implement _mesa_BindBufferRange for target
> GL_SHADER_STORAGE_BUFFER
> glsl: Don't do tree grafting on buffer variables
> glsl: Do not kill dead assignments to buffer variables or SSBO
> declarations.
> glsl: Don't do constant propagation on buffer variables
> glsl: Don't do constant variable on buffer variables
> glsl: Don't do copy propagation on buffer variables
>
> Kristian Høgsberg (3):
> glsl: Add ir_var_shader_storage
> glsl: Implement parser support for 'buffer' qualifier
> glsl: link buffer variables and shader storage buffer interface blocks
>
> Samuel Iglesias Gonsalvez (8):
> mesa: define ARB_shader_storage_buffer_object extension
> mesa: add MaxShaderStorageBlocks to struct gl_program_constants
> glsl: enable binding layout qualifier usage for shader storage buffer
> objects
> glsl: shader buffer variables cannot have initializers
> glsl: buffer variables cannot be defined outside interface blocks
> glsl: fix error messages in invalid declarations of shader storage
> blocks
> glsl: Lower shader storage buffer object writes to GLSL IR instrinsics
> glsl: Lower shader storage buffer object loads to GLSL IR instrinsics
>
> src/glsl/ast.h | 1 +
> src/glsl/ast_to_hir.cpp | 81 +++-
> src/glsl/ast_type.cpp | 3 +-
> src/glsl/builtin_variables.cpp | 5 +-
> src/glsl/glcpp/glcpp-parse.y | 3 +
> src/glsl/glsl_lexer.ll | 1 +
> src/glsl/glsl_parser.yy | 33 +-
> src/glsl/glsl_parser_extras.cpp | 65 +--
> src/glsl/glsl_parser_extras.h | 7 +
> src/glsl/glsl_symbol_table.cpp | 16 +-
> src/glsl/ir.cpp | 3 +
> src/glsl/ir.h | 10 +-
> src/glsl/ir_function.cpp | 1 +
> src/glsl/ir_print_visitor.cpp | 3 +-
> src/glsl/ir_reader.cpp | 2 +
> src/glsl/link_interface_blocks.cpp | 15 +-
> src/glsl/link_uniform_block_active_visitor.cpp | 7 +-
> src/glsl/link_uniform_block_active_visitor.h | 1 +
> src/glsl/link_uniform_blocks.cpp | 4 +
> src/glsl/link_uniform_initializers.cpp | 7 +-
> src/glsl/link_uniforms.cpp | 14 +-
> src/glsl/linker.cpp | 6 +-
> src/glsl/loop_unroll.cpp | 1 +
> src/glsl/lower_named_interface_blocks.cpp | 5 +-
> src/glsl/lower_ubo_reference.cpp | 498 +++++++++++++++++------
> src/glsl/lower_variable_index_to_cond_assign.cpp | 1 +
> src/glsl/nir/glsl_to_nir.cpp | 4 +
> src/glsl/nir/nir.h | 1 +
> src/glsl/nir/nir_lower_atomics.c | 3 +-
> src/glsl/nir/nir_lower_io.c | 9 +-
> src/glsl/nir/nir_print.c | 5 +-
> src/glsl/nir/nir_validate.c | 6 +-
> src/glsl/opt_constant_propagation.cpp | 8 +
> src/glsl/opt_constant_variable.cpp | 7 +
> src/glsl/opt_copy_propagation.cpp | 2 +-
> src/glsl/opt_dead_code.cpp | 11 +-
> src/glsl/opt_structure_splitting.cpp | 5 +-
> src/glsl/opt_tree_grafting.cpp | 9 +-
> src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 2 +-
> src/mesa/main/bufferobj.c | 380 +++++++++++++++++
> src/mesa/main/config.h | 2 +
> src/mesa/main/context.c | 8 +
> src/mesa/main/extensions.c | 1 +
> src/mesa/main/mtypes.h | 54 +++
> src/mesa/program/ir_to_mesa.cpp | 2 +-
> 45 files changed, 1076 insertions(+), 236 deletions(-)
>
More information about the mesa-dev
mailing list