Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu> --- Note that this relies on my earlier patches which add core ARB_ES3_1_compatibility support.
docs/GL3.txt | 2 +- src/compiler/glsl/builtin_functions.cpp | 4 +++- src/compiler/glsl/glsl_parser_extras.cpp | 1 + src/compiler/glsl/glsl_parser_extras.h | 2 ++ src/mesa/main/extensions_table.h | 1 + 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 437c296..b9d9713 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -249,7 +249,7 @@ GLES3.2, GLSL ES 3.2 GL_OES_primitive_bounding box not started GL_OES_sample_shading DONE (nvc0, r600, radeonsi) GL_OES_sample_variables DONE (nvc0, r600, radeonsi) - GL_OES_shader_image_atomic not started (based on parts of GL_ARB_shader_image_load_store, which is done for some drivers) + GL_OES_shader_image_atomic DONE (all drivers that support GL_ARB_shader_image_load_store) GL_OES_shader_io_blocks not started (based on parts of GLSL 1.50, which is done) GL_OES_shader_multisample_interpolation DONE (nvc0, r600, radeonsi) GL_OES_tessellation_shader not started (based on GL_ARB_tessellation_shader, which is done for some drivers) diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp index 60a7293..1cf8805 100644 --- a/src/compiler/glsl/builtin_functions.cpp +++ b/src/compiler/glsl/builtin_functions.cpp @@ -474,7 +474,8 @@ shader_image_load_store(const _mesa_glsl_parse_state *state) static bool shader_image_atomic(const _mesa_glsl_parse_state *state) { - return (state->is_version(420, 0) || + return (state->is_version(420, 320) || + state->OES_shader_image_atomic_enable || state->ARB_shader_image_load_store_enable); } @@ -482,6 +483,7 @@ static bool shader_image_atomic_float(const _mesa_glsl_parse_state *state) { return (state->is_version(450, 320) || + state->OES_shader_image_atomic_enable || state->ARB_ES3_1_compatibility_enable); } diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index bcdf51a..d15947a 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -613,6 +613,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = { EXT(OES_geometry_shader, false, true, OES_geometry_shader), EXT(OES_gpu_shader5, false, true, ARB_gpu_shader5), EXT(OES_sample_variables, false, true, OES_sample_variables), + EXT(OES_shader_image_atomic, false, true, ARB_shader_image_load_store), EXT(OES_shader_multisample_interpolation, false, true, OES_sample_variables), EXT(OES_standard_derivatives, false, true, OES_standard_derivatives), EXT(OES_texture_3D, false, true, dummy_true), diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h index 28e9b20..1a602d2 100644 --- a/src/compiler/glsl/glsl_parser_extras.h +++ b/src/compiler/glsl/glsl_parser_extras.h @@ -604,6 +604,8 @@ struct _mesa_glsl_parse_state { bool OES_gpu_shader5_warn; bool OES_sample_variables_enable; bool OES_sample_variables_warn; + bool OES_shader_image_atomic_enable; + bool OES_shader_image_atomic_warn; bool OES_shader_multisample_interpolation_enable; bool OES_shader_multisample_interpolation_warn; bool OES_standard_derivatives_enable; diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index 74cb3d8..e8d2f53 100644 --- a/src/mesa/main/extensions_table.h +++ b/src/mesa/main/extensions_table.h @@ -335,6 +335,7 @@ EXT(OES_read_format , dummy_true EXT(OES_rgb8_rgba8 , dummy_true , x , x , ES1, ES2, 2005) EXT(OES_sample_shading , OES_sample_variables , x , x , x , 30, 2014) EXT(OES_sample_variables , OES_sample_variables , x , x , x , 30, 2014) +EXT(OES_shader_image_atomic , ARB_shader_image_load_store , x , x , x , 31, 2014) EXT(OES_shader_multisample_interpolation , OES_sample_variables , x , x , x , 30, 2014) EXT(OES_single_precision , dummy_true , x , x , ES1, x , 2003) EXT(OES_standard_derivatives , OES_standard_derivatives , x , x , x , ES2, 2005) -- 2.4.10 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev