From: Paul Gofman Subject: [PATCH] wined3d: Check GLSL version when using ARB_shader_bit_encoding with uvec4. Message-Id: <20190418170649.27930-1-gofmanp@gmail.com> Date: Thu, 18 Apr 2019 20:06:49 +0300 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47039 There are GPUs which support ARB_shader_bit_encoding with GLSL version 1.2 and uvec4 data type is available since GLSL 1.3. Spotted with Intel Ironlake Mobile. Signed-off-by: Paul Gofman --- dlls/wined3d/glsl_shader.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 7d4678965d..0d0e8b25c9 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -442,7 +442,7 @@ static void shader_glsl_append_imm_vec4(struct wined3d_string_buffer *buffer, co wined3d_ftoa(values[2], str[2]); wined3d_ftoa(values[3], str[3]); - if (gl_info->supported[ARB_SHADER_BIT_ENCODING]) + if (gl_info->supported[ARB_SHADER_BIT_ENCODING] && gl_info->glsl_version >= MAKEDWORD_VERSION(1, 30)) { const unsigned int *uint_values = (const unsigned int *)values; @@ -3316,7 +3316,8 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register * case WINED3D_DATA_UNORM: case WINED3D_DATA_SNORM: case WINED3D_DATA_FLOAT: - if (gl_info->supported[ARB_SHADER_BIT_ENCODING]) + if (gl_info->supported[ARB_SHADER_BIT_ENCODING] + && gl_info->glsl_version >= MAKEDWORD_VERSION(1, 30)) { string_buffer_sprintf(register_name, "uintBitsToFloat(uvec4(%#xu, %#xu, %#xu, %#xu))", reg->u.immconst_data[0], reg->u.immconst_data[1], -- 2.20.1