summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/extensions_table.h1
-rw-r--r--src/mesa/main/shaderimage.c22
2 files changed, 17 insertions, 6 deletions
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index 036e62b23e5..d3ec551282c 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -315,6 +315,7 @@ EXT(NV_depth_clamp , ARB_depth_clamp
EXT(NV_draw_buffers , dummy_true , x , x , x , ES2, 2011)
EXT(NV_fbo_color_attachments , dummy_true , x , x , x , ES2, 2010)
EXT(NV_fog_distance , NV_fog_distance , GLL, x , x , x , 2001)
+EXT(NV_image_formats , ARB_shader_image_load_store , x , x , x , 31, 2014)
EXT(NV_light_max_exponent , dummy_true , GLL, x , x , x , 1999)
EXT(NV_packed_depth_stencil , dummy_true , GLL, GLC, x , x , 2000)
EXT(NV_point_sprite , NV_point_sprite , GLL, GLC, x , x , 2001)
diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c
index db36e3bb101..5cce3acd157 100644
--- a/src/mesa/main/shaderimage.c
+++ b/src/mesa/main/shaderimage.c
@@ -401,7 +401,7 @@ _mesa_is_shader_image_format_supported(const struct gl_context *ctx,
/* Formats supported on unextended desktop GL and the original
* ARB_shader_image_load_store extension, c.f. table 3.21 of the OpenGL 4.2
- * specification.
+ * specification or by GLES 3.1 with GL_NV_image_formats extension.
*/
case GL_RG32F:
case GL_RG16F:
@@ -418,17 +418,27 @@ _mesa_is_shader_image_format_supported(const struct gl_context *ctx,
case GL_RG8I:
case GL_R16I:
case GL_R8I:
- case GL_RGBA16:
case GL_RGB10_A2:
- case GL_RG16:
case GL_RG8:
- case GL_R16:
case GL_R8:
+ case GL_RG8_SNORM:
+ case GL_R8_SNORM:
+ return true;
+
+ /* Formats supported on unextended desktop GL and the original
+ * ARB_shader_image_load_store extension, c.f. table 3.21 of the OpenGL 4.2
+ * specification.
+ *
+ * These can be supported by GLES 3.1 with GL_NV_image_formats &
+ * GL_EXT_texture_norm16 extensions but we don't have support for the
+ * latter in Mesa yet.
+ */
+ case GL_RGBA16:
case GL_RGBA16_SNORM:
+ case GL_RG16:
case GL_RG16_SNORM:
- case GL_RG8_SNORM:
+ case GL_R16:
case GL_R16_SNORM:
- case GL_R8_SNORM:
return _mesa_is_desktop_gl(ctx);
default: