=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Add ARB_shader_image_load_store extension.

Alexandre Julliard julliard at winehq.org
Thu Nov 24 16:27:58 CST 2016


Module: wine
Branch: master
Commit: e9011a011eba70f28305358178a7d7bb4443df90
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e9011a011eba70f28305358178a7d7bb4443df90

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Wed Nov 23 14:36:03 2016 +0100

wined3d: Add ARB_shader_image_load_store extension.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/directx.c     | 5 +++++
 dlls/wined3d/glsl_shader.c | 3 ++-
 dlls/wined3d/wined3d_gl.h  | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 3f200f5..5b56ae4 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -145,6 +145,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
     {"GL_ARB_provoking_vertex",             ARB_PROVOKING_VERTEX          },
     {"GL_ARB_sampler_objects",              ARB_SAMPLER_OBJECTS           },
     {"GL_ARB_shader_bit_encoding",          ARB_SHADER_BIT_ENCODING       },
+    {"GL_ARB_shader_image_load_store",      ARB_SHADER_IMAGE_LOAD_STORE   },
     {"GL_ARB_shader_texture_lod",           ARB_SHADER_TEXTURE_LOD        },
     {"GL_ARB_shading_language_100",         ARB_SHADING_LANGUAGE_100      },
     {"GL_ARB_shadow",                       ARB_SHADOW                    },
@@ -2707,6 +2708,9 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
     USE_GL_FUNC(glGetSamplerParameterfv)
     USE_GL_FUNC(glGetSamplerParameterIiv)
     USE_GL_FUNC(glGetSamplerParameterIuiv)
+    /* GL_ARB_shader_image_load_store */
+    USE_GL_FUNC(glBindImageTexture)
+    USE_GL_FUNC(glMemoryBarrier)
     /* GL_ARB_shader_objects */
     USE_GL_FUNC(glAttachObjectARB)
     USE_GL_FUNC(glBindAttribLocationARB)
@@ -3622,6 +3626,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, DWORD
 
         {ARB_INTERNALFORMAT_QUERY,         MAKEDWORD_VERSION(4, 2)},
         {ARB_MAP_BUFFER_ALIGNMENT,         MAKEDWORD_VERSION(4, 2)},
+        {ARB_SHADER_IMAGE_LOAD_STORE,      MAKEDWORD_VERSION(4, 2)},
         {ARB_TEXTURE_COMPRESSION_BPTC,     MAKEDWORD_VERSION(4, 2)},
         {ARB_TEXTURE_STORAGE,              MAKEDWORD_VERSION(4, 2)},
 
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 9e9c83b..41ace75 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -8613,7 +8613,8 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s
      * soon as we introduce them, adjusting the GL / GLSL version checks
      * accordingly. */
     if (gl_info->glsl_version >= MAKEDWORD_VERSION(4, 30) && gl_info->supported[WINED3D_GL_VERSION_4_3]
-            && gl_info->supported[ARB_DERIVATIVE_CONTROL])
+            && gl_info->supported[ARB_DERIVATIVE_CONTROL]
+            && gl_info->supported[ARB_SHADER_IMAGE_LOAD_STORE])
         shader_model = 5;
     else if (gl_info->glsl_version >= MAKEDWORD_VERSION(1, 50) && gl_info->supported[WINED3D_GL_VERSION_3_2]
             && gl_info->supported[ARB_SHADER_BIT_ENCODING] && gl_info->supported[ARB_SAMPLER_OBJECTS]
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h
index b71190d..d0b3102 100644
--- a/dlls/wined3d/wined3d_gl.h
+++ b/dlls/wined3d/wined3d_gl.h
@@ -78,6 +78,7 @@ enum wined3d_gl_extension
     ARB_PROVOKING_VERTEX,
     ARB_SAMPLER_OBJECTS,
     ARB_SHADER_BIT_ENCODING,
+    ARB_SHADER_IMAGE_LOAD_STORE,
     ARB_SHADER_TEXTURE_LOD,
     ARB_SHADING_LANGUAGE_100,
     ARB_SHADOW,




More information about the wine-cvs mailing list