glapi: add EXT_shader_image_load_store
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 12 Jul 2019 13:46:27 +0000 (15:46 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 6 Aug 2019 21:40:52 +0000 (17:40 -0400)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mapi/glapi/gen/EXT_shader_image_load_store.xml [new file with mode: 0644]
src/mapi/glapi/gen/gl_API.xml
src/mapi/glapi/gen/meson.build
src/mesa/main/extensions_table.h
src/mesa/main/mtypes.h
src/mesa/state_tracker/st_extensions.c

diff --git a/src/mapi/glapi/gen/EXT_shader_image_load_store.xml b/src/mapi/glapi/gen/EXT_shader_image_load_store.xml
new file mode 100644 (file)
index 0000000..2a69357
--- /dev/null
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<OpenGLAPI>
+
+<category name="GL_EXT_shader_image_load_store" number="386">
+
+<enum name="VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT" value="0x00000001"/>
+<enum name="ELEMENT_ARRAY_BARRIER_BIT_EXT" value="0x00000002"/>
+<enum name="UNIFORM_BARRIER_BIT_EXT" value="0x00000004"/>
+<enum name="TEXTURE_FETCH_BARRIER_BIT_EXT" value="0x00000008"/>
+<enum name="SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT" value="0x00000020"/>
+<enum name="COMMAND_BARRIER_BIT_EXT" value="0x00000040"/>
+<enum name="PIXEL_BUFFER_BARRIER_BIT_EXT" value="0x00000080"/>
+<enum name="TEXTURE_UPDATE_BARRIER_BIT_EXT" value="0x00000100"/>
+<enum name="BUFFER_UPDATE_BARRIER_BIT_EXT" value="0x00000200"/>
+<enum name="FRAMEBUFFER_BARRIER_BIT_EXT" value="0x00000400"/>
+<enum name="TRANSFORM_FEEDBACK_BARRIER_BIT_EXT" value="0x00000800"/>
+<enum name="ATOMIC_COUNTER_BARRIER_BIT_EXT" value="0x00001000"/>
+<enum name="ALL_BARRIER_BITS_EXT" value="0xFFFFFFFF"/>
+<enum name="MAX_IMAGE_UNITS_EXT_EXT" value="0x8F38"/>
+<enum name="MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT" value="0x8F39"/>
+<enum name="IMAGE_BINDING_NAME_EXT" value="0x8F3A"/>
+<enum name="IMAGE_BINDING_LEVEL_EXT" value="0x8F3B"/>
+<enum name="IMAGE_BINDING_LAYERED_EXT" value="0x8F3C"/>
+<enum name="IMAGE_BINDING_LAYER_EXT" value="0x8F3D"/>
+<enum name="IMAGE_BINDING_ACCESS_EXT" value="0x8F3E"/>
+<enum name="IMAGE_1D_EXT" value="0x904C"/>
+<enum name="IMAGE_2D_EXT" value="0x904D"/>
+<enum name="IMAGE_3D_EXT" value="0x904E"/>
+<enum name="IMAGE_2D_RECT_EXT" value="0x904F"/>
+<enum name="IMAGE_CUBE_EXT" value="0x9050"/>
+<enum name="IMAGE_BUFFER_EXT" value="0x9051"/>
+<enum name="IMAGE_1D_ARRAY_EXT" value="0x9052"/>
+<enum name="IMAGE_2D_ARRAY_EXT" value="0x9053"/>
+<enum name="IMAGE_CUBE_MAP_ARRAY_EXT" value="0x9054"/>
+<enum name="IMAGE_2D_MULTISAMPLE_EXT" value="0x9055"/>
+<enum name="IMAGE_2D_MULTISAMPLE_ARRAY_EXT" value="0x9056"/>
+<enum name="INT_IMAGE_1D_EXT" value="0x9057"/>
+<enum name="INT_IMAGE_2D_EXT" value="0x9058"/>
+<enum name="INT_IMAGE_3D_EXT" value="0x9059"/>
+<enum name="INT_IMAGE_2D_RECT_EXT" value="0x905A"/>
+<enum name="INT_IMAGE_CUBE_EXT" value="0x905B"/>
+<enum name="INT_IMAGE_BUFFER_EXT" value="0x905C"/>
+<enum name="INT_IMAGE_1D_ARRAY_EXT" value="0x905D"/>
+<enum name="INT_IMAGE_2D_ARRAY_EXT" value="0x905E"/>
+<enum name="INT_IMAGE_CUBE_MAP_ARRAY_EXT" value="0x905F"/>
+<enum name="INT_IMAGE_2D_MULTISAMPLE_EXT" value="0x9060"/>
+<enum name="INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT" value="0x9061"/>
+<enum name="UNSIGNED_INT_IMAGE_1D_EXT" value="0x9062"/>
+<enum name="UNSIGNED_INT_IMAGE_2D_EXT" value="0x9063"/>
+<enum name="UNSIGNED_INT_IMAGE_3D_EXT" value="0x9064"/>
+<enum name="UNSIGNED_INT_IMAGE_2D_RECT_EXT" value="0x9065"/>
+<enum name="UNSIGNED_INT_IMAGE_CUBE_EXT" value="0x9066"/>
+<enum name="UNSIGNED_INT_IMAGE_BUFFER_EXT" value="0x9067"/>
+<enum name="UNSIGNED_INT_IMAGE_1D_ARRAY_EXT" value="0x9068"/>
+<enum name="UNSIGNED_INT_IMAGE_2D_ARRAY_EXT" value="0x9069"/>
+<enum name="UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT" value="0x906A"/>
+<enum name="UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT" value="0x906B"/>
+<enum name="UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT" value="0x906C"/>
+<enum name="MAX_IMAGE_SAMPLES_EXT" value="0x906D"/>
+<enum name="IMAGE_BINDING_FORMAT_EXT" value="0x906E"/>
+
+<!--
+<function name="BindImageTextureEXT">
+  <param name="index" type="GLuint"/>
+  <param name="texture" type="GLuint"/>
+  <param name="level" type="GLint"/>
+  <param name="layered" type="GLboolean"/>
+  <param name="layer" type="GLint"/>
+  <param name="access" type="GLenum"/>
+  <param name="format" type="GLint"/>
+</function>
+-->
+
+<function name="MemoryBarrierEXT" alias="MemoryBarrier" >
+  <param name="barriers" type="GLbitfield"/>
+</function>
+
+</category>
+
+</OpenGLAPI>
index f6128f1a36e4e04268a3a4ed1672e8e219a7e21e..c5e6a066ac656e093d664c1cdcd2adb85b00d3cd 100644 (file)
 <xi:include href="EXT_direct_state_access.xml"
             xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
+<xi:include href="EXT_shader_image_load_store.xml"
+            xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <category name="GL_EXT_texture_sRGB_decode" number="402">
     <enum name="TEXTURE_SRGB_DECODE_EXT"              value="0x8A48"/>
     <enum name="DECODE_EXT"                           value="0x8A49"/>
index c36e49fbf94ca938c9abd40dac9426963c74d518..1e69242e042e721fbafdc361e62dca3565544105 100644 (file)
@@ -120,6 +120,7 @@ api_xml_files = files(
   'EXT_packed_depth_stencil.xml',
   'EXT_provoking_vertex.xml',
   'EXT_separate_shader_objects.xml',
+  'EXT_shader_image_load_store.xml',
   'EXT_texture_array.xml',
   'EXT_texture_integer.xml',
   'EXT_transform_feedback.xml',
index af321131654a33c54f3b7c29ebde30ceaa135cbc..3f313db870d8dcedd59fa5248ca4f555d4db097d 100644 (file)
@@ -274,6 +274,7 @@ EXT(EXT_separate_specular_color             , dummy_true
 EXT(EXT_shader_framebuffer_fetch            , EXT_shader_framebuffer_fetch           , GLL, GLC,  x , ES2, 2013)
 EXT(EXT_shader_framebuffer_fetch_non_coherent, EXT_shader_framebuffer_fetch_non_coherent, GLL, GLC,  x, ES2, 2018)
 EXT(EXT_shader_image_load_formatted         , EXT_shader_image_load_formatted        , GLL, GLC,  x ,  x , 2014)
+EXT(EXT_shader_image_load_store             , EXT_shader_image_load_store            , GLL, GLC,  x ,  x , 2010)
 EXT(EXT_shader_implicit_conversions         , dummy_true                             ,  x ,  x ,  x ,  31, 2013)
 EXT(EXT_shader_integer_mix                  , EXT_shader_integer_mix                 , GLL, GLC,  x ,  30, 2013)
 EXT(EXT_shader_io_blocks                    , dummy_true                             ,  x ,  x ,  x ,  31, 2014)
index 56a6358918215bf4e155bb6550121763165ff56f..30fe50affc0d80014a8e992788e25bea50eda838 100644 (file)
@@ -4289,6 +4289,7 @@ struct gl_extensions
    GLboolean EXT_semaphore;
    GLboolean EXT_semaphore_fd;
    GLboolean EXT_shader_image_load_formatted;
+   GLboolean EXT_shader_image_load_store;
    GLboolean EXT_shader_integer_mix;
    GLboolean EXT_shader_samples_identical;
    GLboolean EXT_sRGB;
index c146c8d99028c17ec440fc76cf6c80ab082ef71a..abc816ed0d49e4da800faddc81ac381613873230 100644 (file)
@@ -725,6 +725,7 @@ void st_init_extensions(struct pipe_screen *screen,
       { o(ARB_shader_draw_parameters),       PIPE_CAP_DRAW_PARAMETERS                  },
       { o(ARB_shader_group_vote),            PIPE_CAP_TGSI_VOTE                        },
       { o(EXT_shader_image_load_formatted),  PIPE_CAP_IMAGE_LOAD_FORMATTED             },
+      { o(EXT_shader_image_load_store),      PIPE_CAP_TGSI_ATOMINC_WRAP                },
       { o(ARB_shader_stencil_export),        PIPE_CAP_SHADER_STENCIL_EXPORT            },
       { o(ARB_shader_texture_image_samples), PIPE_CAP_TGSI_TXQS                        },
       { o(ARB_shader_texture_lod),           PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD      },
@@ -1179,6 +1180,9 @@ void st_init_extensions(struct pipe_screen *screen,
    extensions->OES_sample_variables = extensions->ARB_sample_shading &&
       extensions->ARB_gpu_shader5;
 
+   extensions->EXT_shader_image_load_store &=
+      screen->get_param(screen, PIPE_CAP_IMAGE_LOAD_FORMATTED);
+
    /* Maximum sample count. */
    {
       static const enum pipe_format color_formats[] = {