wined3d: Use GL_ARB_shading_language_420pack for swizzle operations on scalars.

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-02-26 18:48:01 +01:00 committed by Alexandre Julliard
parent c07bfeb2b8
commit a9fdb4a099
3 changed files with 9 additions and 1 deletions

View File

@ -152,6 +152,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
{"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_shading_language_420pack", ARB_SHADING_LANGUAGE_420PACK },
{"GL_ARB_shading_language_packing", ARB_SHADING_LANGUAGE_PACKING },
{"GL_ARB_shadow", ARB_SHADOW },
{"GL_ARB_stencil_texturing", ARB_STENCIL_TEXTURING },
@ -3717,6 +3718,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_SHADING_LANGUAGE_420PACK, MAKEDWORD_VERSION(4, 2)},
{ARB_SHADING_LANGUAGE_PACKING, MAKEDWORD_VERSION(4, 2)},
{ARB_TEXTURE_COMPRESSION_BPTC, MAKEDWORD_VERSION(4, 2)},
{ARB_TEXTURE_STORAGE, MAKEDWORD_VERSION(4, 2)},

View File

@ -2860,6 +2860,9 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register *
break;
case WINED3DSPR_LOCALTHREADINDEX:
if (gl_info->supported[ARB_SHADING_LANGUAGE_420PACK])
sprintf(register_name, "int(gl_LocalInvocationIndex)");
else
sprintf(register_name, "ivec2(gl_LocalInvocationIndex, 0)");
break;
@ -6459,6 +6462,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_SHADING_LANGUAGE_420PACK])
shader_addline(buffer, "#extension GL_ARB_shading_language_420pack : enable\n");
if (gl_info->supported[ARB_SHADING_LANGUAGE_PACKING])
shader_addline(buffer, "#extension GL_ARB_shading_language_packing : enable\n");
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP_ARRAY])

View File

@ -85,6 +85,7 @@ enum wined3d_gl_extension
ARB_SHADER_IMAGE_SIZE,
ARB_SHADER_TEXTURE_LOD,
ARB_SHADING_LANGUAGE_100,
ARB_SHADING_LANGUAGE_420PACK,
ARB_SHADING_LANGUAGE_PACKING,
ARB_SHADOW,
ARB_STENCIL_TEXTURING,