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

Alexandre Julliard julliard at winehq.org
Tue Nov 29 16:01:39 CST 2016


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

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Tue Nov 29 12:06:29 2016 +0100

wined3d: Add ARB_shader_image_size 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     | 2 ++
 dlls/wined3d/glsl_shader.c | 5 ++++-
 dlls/wined3d/wined3d_gl.h  | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 5b56ae4..f3bb385 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -146,6 +146,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
     {"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_image_size",            ARB_SHADER_IMAGE_SIZE         },
     {"GL_ARB_shader_texture_lod",           ARB_SHADER_TEXTURE_LOD        },
     {"GL_ARB_shading_language_100",         ARB_SHADING_LANGUAGE_100      },
     {"GL_ARB_shadow",                       ARB_SHADOW                    },
@@ -3632,6 +3633,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, DWORD
 
         {ARB_DEBUG_OUTPUT,                 MAKEDWORD_VERSION(4, 3)},
         {ARB_INTERNALFORMAT_QUERY2,        MAKEDWORD_VERSION(4, 3)},
+        {ARB_SHADER_IMAGE_SIZE,            MAKEDWORD_VERSION(4, 3)},
         {ARB_TEXTURE_QUERY_LEVELS,         MAKEDWORD_VERSION(4, 3)},
         {ARB_TEXTURE_VIEW,                 MAKEDWORD_VERSION(4, 3)},
 
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 74a6060..0d9eb67 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -5995,6 +5995,8 @@ static void shader_glsl_enable_extensions(struct wined3d_string_buffer *buffer,
         shader_addline(buffer, "#extension GL_ARB_shader_bit_encoding : enable\n");
     if (gl_info->supported[ARB_SHADER_IMAGE_LOAD_STORE])
         shader_addline(buffer, "#extension GL_ARB_shader_image_load_store : enable\n");
+    if (gl_info->supported[ARB_SHADER_IMAGE_SIZE])
+        shader_addline(buffer, "#extension GL_ARB_shader_image_size : enable\n");
     if (gl_info->supported[ARB_TEXTURE_QUERY_LEVELS])
         shader_addline(buffer, "#extension GL_ARB_texture_query_levels : enable\n");
     if (gl_info->supported[ARB_UNIFORM_BUFFER_OBJECT])
@@ -8731,7 +8733,8 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s
      * 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_SHADER_IMAGE_LOAD_STORE])
+            && gl_info->supported[ARB_SHADER_IMAGE_LOAD_STORE]
+            && gl_info->supported[ARB_SHADER_IMAGE_SIZE])
         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 d0b3102..2bafa89 100644
--- a/dlls/wined3d/wined3d_gl.h
+++ b/dlls/wined3d/wined3d_gl.h
@@ -79,6 +79,7 @@ enum wined3d_gl_extension
     ARB_SAMPLER_OBJECTS,
     ARB_SHADER_BIT_ENCODING,
     ARB_SHADER_IMAGE_LOAD_STORE,
+    ARB_SHADER_IMAGE_SIZE,
     ARB_SHADER_TEXTURE_LOD,
     ARB_SHADING_LANGUAGE_100,
     ARB_SHADOW,




More information about the wine-cvs mailing list