Evas GL: Fix oopsie in the shaders selection
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 10 Nov 2015 11:07:46 +0000 (20:07 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Tue, 10 Nov 2015 11:08:36 +0000 (20:08 +0900)
Thanks @raster

src/modules/evas/engines/gl_common/evas_gl_shader.c

index 08f04d4..c5ef0b9 100644 (file)
@@ -668,7 +668,8 @@ evas_gl_common_shader_flags_get(Evas_GL_Shared *shared, Shader_Type type,
           sam = SHD_SAM21;
         else if (sh >= (h * 2))
           sam = SHD_SAM12;
-        flags |= (1 << (SHADER_FLAG_SAM_BITSHIFT + sam - 1));
+        if (sam)
+          flags |= (1 << (SHADER_FLAG_SAM_BITSHIFT + sam - 1));
      }
 
    // mask downscale sampling
@@ -680,7 +681,8 @@ evas_gl_common_shader_flags_get(Evas_GL_Shared *shared, Shader_Type type,
           masksam = SHD_SAM21;
         else if (mtex->h >= (mh * 2))
           masksam = SHD_SAM12;
-        flags |= (1 << (SHADER_FLAG_MASKSAM_BITSHIFT + masksam - 1));
+        if (masksam)
+          flags |= (1 << (SHADER_FLAG_MASKSAM_BITSHIFT + masksam - 1));
      }
 
    switch (type)