Mesa (9.1): glsl/builtins: Fix ARB_texture_cube_map_array built-in availability.

Carl Worth cworth at kemper.freedesktop.org
Mon Jul 15 20:40:44 UTC 2013


Module: Mesa
Branch: 9.1
Commit: 330203c267761590d22e75710677b6f0b9cfbd09
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=330203c267761590d22e75710677b6f0b9cfbd09

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Fri Jun 28 13:46:44 2013 -0700

glsl/builtins: Fix ARB_texture_cube_map_array built-in availability.

This patch adds texture() for isamplerCubeArray and usamplerCubeArray,
which were entirely missing.

It also makes texture() with a LOD bias fragment shader specific.  The
main GLSL specification explicitly says that texturing with LOD bias
should not be allowed for vertex shaders.

Affects Piglit's ARB_texture_cube_map_array/compiler/tex_bias-01.vert.
which tries to use bias in a vertex shader.  Currently, it expects this
to pass (so this patch regresses the test), but I've sent a patch to
reverse the expected behavior (so this patch would fix the updated test):
http://lists.freedesktop.org/archives/piglit/2013-June/006123.html

NOTE: This is a candidate for stable branches.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
Reviewed-by: Dave Airlie <airlied at redhat.com>
(cherry picked from commit 15ca0ca1b6779bcf2d2603153035d3f971c24666)

---

 .../profiles/ARB_texture_cube_map_array.frag       |    6 ++++++
 .../profiles/ARB_texture_cube_map_array.glsl       |    3 ++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/glsl/builtins/profiles/ARB_texture_cube_map_array.frag b/src/glsl/builtins/profiles/ARB_texture_cube_map_array.frag
new file mode 100644
index 0000000..0d9f4f6
--- /dev/null
+++ b/src/glsl/builtins/profiles/ARB_texture_cube_map_array.frag
@@ -0,0 +1,6 @@
+#version 130
+#extension GL_ARB_texture_cube_map_array : enable
+
+ vec4 texture( samplerCubeArray sampler, vec4 coord, float bias);
+ivec4 texture(isamplerCubeArray sampler, vec4 coord, float bias);
+uvec4 texture(usamplerCubeArray sampler, vec4 coord, float bias);
diff --git a/src/glsl/builtins/profiles/ARB_texture_cube_map_array.glsl b/src/glsl/builtins/profiles/ARB_texture_cube_map_array.glsl
index 0f53212..73659b3 100644
--- a/src/glsl/builtins/profiles/ARB_texture_cube_map_array.glsl
+++ b/src/glsl/builtins/profiles/ARB_texture_cube_map_array.glsl
@@ -7,7 +7,8 @@ ivec3 textureSize(usamplerCubeArray sampler, int lod);
 ivec3 textureSize(samplerCubeArrayShadow sampler, int lod);
 
  vec4 texture( samplerCubeArray sampler, vec4 coord);
- vec4 texture( samplerCubeArray sampler, vec4 coord, float bias);
+ivec4 texture(isamplerCubeArray sampler, vec4 coord);
+uvec4 texture(usamplerCubeArray sampler, vec4 coord);
 float texture( samplerCubeArrayShadow sampler, vec4 P, float compare);
 
  vec4 textureGrad( samplerCubeArray sampler, vec4 P, vec3 dPdx, vec3 dPdy);




More information about the mesa-commit mailing list