Link to v1: http://lists.freedesktop.org/archives/mesa-dev/2015-May/084196.html
Changes in v2: - Drop obsolete FS visitor support - Add FS NIR implementation - Use "is_shader_storage" flag names instead of "is_buffer" (Jordan) - Modify lower_ubo_reference to merge emit_sso_writes and emit_ubo_loads into a single function (Jordan) - Rename ir_var_buffer to ir_var_shader_storage (Jordan) Development branch with the patches and some dependencies (*): git clone -b itoral-ARB_shader_storage_buffer_object-v2.0 https://github.com/Igalia/mesa.git (*) The i965 implementation needs to use untyped read/write messages to implement SSBO reads/writes which are also used in the implementation of ARB_shader_image_load_store that Curro is working on. The branch linked above includes these patches from Curro as well as a general bugfix (not SSBO-specific) Antia that is necessary for correct behavior in some scenarios involving instance arrays. Piglit repository including SSBO tests: git clone -b arb_shader_storage_buffer_object-v1 https://github.com/Igalia/piglit.git Antia Puentes (1): glsl: Consider active all elements of a shared/std140 block array Iago Toral Quiroga (46): 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: Do not do CSE for expressions involving SSBO loads 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 mesa: Add new IR node ir_ssbo_store glsl: Lower shader storage buffer object writes to ir_ssbo_store glsl: Do constant folding on ir_ssbo_store 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/fs: Do not include the header with a pixel mask in untyped read messages i965/vec4: Implement SSBO writes nir: implement ir_ssbo_store i965/nir/fs: Implement SSBO writes i965/vec4: Implement SSBO reads nir: implement ir_binop_ssbo_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 nir: Add SSBO atomic operations i965/nir/fs: Implement SSBO atomics i965/vec4: Implement SSBO atomics 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 (7): glsl: Add ir_var_shader_storage glsl: Implement parser support for 'buffer' qualifier glsl: link buffer variables and shader storage buffer interface blocks glsl: Add ir_binop_ssbo_load expression operation. glsl: lower SSBO reads to ir_binop_ssbo_load expressions i965: do not emit_bool_to_cond_code with ssbo load expressions glsl: atomic counters can be declared as buffer-qualified variables Samuel Iglesias Gonsalvez (28): 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: add support for unsized arrays in shader storage blocks glsl: Add parser/compiler support for unsized array's length() 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 writes 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 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 i965: Enable ARB_shader_storage_buffer_object extension for gen7+ docs/GL3.txt | 2 +- src/glsl/ast.h | 12 + src/glsl/ast_array_index.cpp | 6 +- src/glsl/ast_function.cpp | 37 ++ src/glsl/ast_to_hir.cpp | 362 ++++++++++-- src/glsl/ast_type.cpp | 4 +- src/glsl/builtin_functions.cpp | 215 ++++++- src/glsl/builtin_types.cpp | 3 +- src/glsl/builtin_variables.cpp | 5 +- src/glsl/glcpp/glcpp-parse.y | 3 + src/glsl/glsl_lexer.ll | 11 +- src/glsl/glsl_parser.yy | 110 +++- src/glsl/glsl_parser_extras.cpp | 65 ++- src/glsl/glsl_parser_extras.h | 7 + src/glsl/glsl_symbol_table.cpp | 16 +- src/glsl/glsl_types.cpp | 203 +++++-- src/glsl/glsl_types.h | 48 +- src/glsl/hir_field_selection.cpp | 15 +- src/glsl/ir.cpp | 14 + src/glsl/ir.h | 84 ++- src/glsl/ir_function.cpp | 1 + src/glsl/ir_hierarchical_visitor.cpp | 18 + src/glsl/ir_hierarchical_visitor.h | 2 + src/glsl/ir_hv_accept.cpp | 23 + src/glsl/ir_print_visitor.cpp | 15 +- src/glsl/ir_print_visitor.h | 1 + src/glsl/ir_reader.cpp | 2 + src/glsl/ir_rvalue_visitor.cpp | 21 + src/glsl/ir_rvalue_visitor.h | 3 + src/glsl/ir_uniform.h | 5 + src/glsl/ir_validate.cpp | 18 + src/glsl/ir_visitor.h | 2 + src/glsl/link_interface_blocks.cpp | 15 +- src/glsl/link_uniform_block_active_visitor.cpp | 24 + src/glsl/link_uniform_block_active_visitor.h | 1 + src/glsl/link_uniform_blocks.cpp | 36 +- src/glsl/link_uniform_initializers.cpp | 3 +- src/glsl/link_uniforms.cpp | 49 +- src/glsl/linker.cpp | 166 ++++-- src/glsl/linker.h | 1 + src/glsl/loop_unroll.cpp | 1 + src/glsl/lower_named_interface_blocks.cpp | 5 +- src/glsl/lower_ubo_reference.cpp | 645 ++++++++++++++++----- src/glsl/lower_variable_index_to_cond_assign.cpp | 1 + src/glsl/nir/glsl_to_nir.cpp | 105 +++- src/glsl/nir/nir.h | 1 + src/glsl/nir/nir_intrinsics.h | 35 +- src/glsl/nir/nir_lower_atomics.c | 3 +- src/glsl/nir/nir_lower_io.c | 9 +- src/glsl/nir/nir_lower_phis_to_scalar.c | 2 + src/glsl/nir/nir_print.c | 5 +- src/glsl/nir/nir_validate.c | 6 +- src/glsl/opt_constant_folding.cpp | 16 + src/glsl/opt_constant_propagation.cpp | 8 + src/glsl/opt_constant_variable.cpp | 7 + src/glsl/opt_copy_propagation.cpp | 2 +- src/glsl/opt_cse.cpp | 33 +- src/glsl/opt_dead_code.cpp | 9 +- src/glsl/opt_structure_splitting.cpp | 5 +- src/glsl/opt_tree_grafting.cpp | 9 +- .../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/mesa/drivers/dri/i965/brw_context.c | 2 + src/mesa/drivers/dri/i965/brw_context.h | 6 + src/mesa/drivers/dri/i965/brw_defines.h | 4 + src/mesa/drivers/dri/i965/brw_eu_emit.c | 4 +- src/mesa/drivers/dri/i965/brw_fs.cpp | 1 + src/mesa/drivers/dri/i965/brw_fs.h | 4 + .../dri/i965/brw_fs_channel_expressions.cpp | 3 + src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 47 ++ src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 277 +++++++++ .../drivers/dri/i965/brw_fs_vector_splitting.cpp | 1 + src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 35 +- 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 | 8 + src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 35 ++ src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 362 +++++++++++- 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/bufferobj.c | 380 ++++++++++++ src/mesa/main/config.h | 2 + src/mesa/main/context.c | 8 + src/mesa/main/extensions.c | 1 + src/mesa/main/get.c | 38 +- src/mesa/main/get_hash_params.py | 12 + src/mesa/main/mtypes.h | 57 +- src/mesa/main/program_resource.c | 7 +- src/mesa/main/shader_query.cpp | 265 ++++++++- 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 | 10 + src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 16 + 98 files changed, 3873 insertions(+), 460 deletions(-) create mode 100644 src/mapi/glapi/gen/ARB_shader_storage_buffer_object.xml -- 1.9.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev