wined3d: Add ARB_shader_storage_buffer_object extension.

Nvidia binary drivers require the ARB_shader_storage_buffer_object
extension to be enabled in order to use atomic operations on compute
shader shared variables.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2017-03-02 00:55:30 +01:00 committed by Alexandre Julliard
parent d853eaedae
commit 700dd3518b
3 changed files with 7 additions and 0 deletions

View File

@ -150,6 +150,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
{"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_storage_buffer_object", ARB_SHADER_STORAGE_BUFFER_OBJECT},
{"GL_ARB_shader_texture_lod", ARB_SHADER_TEXTURE_LOD },
{"GL_ARB_shading_language_100", ARB_SHADING_LANGUAGE_100 },
{"GL_ARB_shading_language_420pack", ARB_SHADING_LANGUAGE_420PACK },
@ -2832,6 +2833,8 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
USE_GL_FUNC(glUniformMatrix4fvARB)
USE_GL_FUNC(glUseProgramObjectARB)
USE_GL_FUNC(glValidateProgramARB)
/* GL_ARB_shader_storage_buffer_object */
USE_GL_FUNC(glShaderStorageBlockBinding)
/* GL_ARB_sync */
USE_GL_FUNC(glClientWaitSync)
USE_GL_FUNC(glDeleteSync)
@ -3774,6 +3777,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
{ARB_ES3_COMPATIBILITY, MAKEDWORD_VERSION(4, 3)},
{ARB_INTERNALFORMAT_QUERY2, MAKEDWORD_VERSION(4, 3)},
{ARB_SHADER_IMAGE_SIZE, MAKEDWORD_VERSION(4, 3)},
{ARB_SHADER_STORAGE_BUFFER_OBJECT, MAKEDWORD_VERSION(4, 3)},
{ARB_STENCIL_TEXTURING, MAKEDWORD_VERSION(4, 3)},
{ARB_TEXTURE_BUFFER_RANGE, MAKEDWORD_VERSION(4, 3)},
{ARB_TEXTURE_QUERY_LEVELS, MAKEDWORD_VERSION(4, 3)},

View File

@ -6613,6 +6613,8 @@ static void shader_glsl_enable_extensions(struct wined3d_string_buffer *buffer,
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_SHADER_STORAGE_BUFFER_OBJECT])
shader_addline(buffer, "#extension GL_ARB_shader_storage_buffer_object : enable\n");
if (gl_info->supported[ARB_SHADING_LANGUAGE_420PACK])
shader_addline(buffer, "#extension GL_ARB_shading_language_420pack : enable\n");
if (gl_info->supported[ARB_SHADING_LANGUAGE_PACKING])

View File

@ -83,6 +83,7 @@ enum wined3d_gl_extension
ARB_SHADER_BIT_ENCODING,
ARB_SHADER_IMAGE_LOAD_STORE,
ARB_SHADER_IMAGE_SIZE,
ARB_SHADER_STORAGE_BUFFER_OBJECT,
ARB_SHADER_TEXTURE_LOD,
ARB_SHADING_LANGUAGE_100,
ARB_SHADING_LANGUAGE_420PACK,