[PATCH 6/6] wined3d: Use non-deprecated texture sample builtins also in the fragment pipeline replacement shaders.

Matteo Bruni mbruni at codeweavers.com
Thu Oct 15 15:01:07 CDT 2015


Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
 dlls/wined3d/glsl_shader.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 82f9275..afed67a 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -6259,7 +6259,7 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct shader_glsl_priv *
 {
     struct wined3d_string_buffer *buffer = &priv->shader_buffer;
     BYTE lum_map = 0, bump_map = 0, tex_map = 0, tss_const_map = 0;
-    BOOL tempreg_used = FALSE, tfactor_used = FALSE;
+    BOOL tempreg_used = FALSE, tfactor_used = FALSE, legacy_syntax = needs_legacy_glsl_syntax(gl_info);
     const char *final_combiner_src = "ret";
     UINT lowest_disabled_stage;
     GLuint shader_id;
@@ -6480,52 +6480,52 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct shader_glsl_priv *
             case WINED3D_GL_RES_TYPE_TEX_1D:
                 if (proj)
                 {
-                    texture_function = "texture1DProj";
+                    texture_function = legacy_syntax ? "texture1DProj" : "textureProj";
                     coord_mask = "xw";
                 }
                 else
                 {
-                    texture_function = "texture1D";
+                    texture_function = legacy_syntax ? "texture1D" : "texture";
                     coord_mask = "x";
                 }
                 break;
             case WINED3D_GL_RES_TYPE_TEX_2D:
                 if (proj)
                 {
-                    texture_function = "texture2DProj";
+                    texture_function = legacy_syntax ? "texture2DProj" : "textureProj";
                     coord_mask = "xyw";
                 }
                 else
                 {
-                    texture_function = "texture2D";
+                    texture_function = legacy_syntax ? "texture2D" : "texture";
                     coord_mask = "xy";
                 }
                 break;
             case WINED3D_GL_RES_TYPE_TEX_3D:
                 if (proj)
                 {
-                    texture_function = "texture3DProj";
+                    texture_function = legacy_syntax ? "texture3DProj" : "textureProj";
                     coord_mask = "xyzw";
                 }
                 else
                 {
-                    texture_function = "texture3D";
+                    texture_function = legacy_syntax ? "texture3D" : "texture";
                     coord_mask = "xyz";
                 }
                 break;
             case WINED3D_GL_RES_TYPE_TEX_CUBE:
-                texture_function = "textureCube";
+                texture_function = legacy_syntax ? "textureCube" : "texture";
                 coord_mask = "xyz";
                 break;
             case WINED3D_GL_RES_TYPE_TEX_RECT:
                 if (proj)
                 {
-                    texture_function = "texture2DRectProj";
+                    texture_function = legacy_syntax ? "texture2DRectProj" : "textureProj";
                     coord_mask = "xyw";
                 }
                 else
                 {
-                    texture_function = "texture2DRect";
+                    texture_function = legacy_syntax ? "texture2DRect" : "texture";
                     coord_mask = "xy";
                 }
                 break;
-- 
2.4.9




More information about the wine-patches mailing list