[Mesa-dev] [PATCH 04/11] glsl: Add textureSize(*samplerBuffer) support.
Eric Anholt
eric at anholt.net
Fri Apr 13 16:38:32 PDT 2012
Fixes the corresponding new tests in piglit.
---
src/glsl/builtins/profiles/140.frag | 4 ++++
src/glsl/builtins/profiles/140.vert | 4 ++++
src/glsl/builtins/tools/texture_builtins.py | 1 +
3 files changed, 9 insertions(+)
diff --git a/src/glsl/builtins/profiles/140.frag b/src/glsl/builtins/profiles/140.frag
index b534827..ba616a1 100644
--- a/src/glsl/builtins/profiles/140.frag
+++ b/src/glsl/builtins/profiles/140.frag
@@ -504,6 +504,10 @@ ivec2 textureSize(isampler2DRect sampler);
ivec2 textureSize(usampler2DRect sampler);
ivec2 textureSize(sampler2DRectShadow sampler);
+int textureSize( samplerBuffer sampler);
+int textureSize(isamplerBuffer sampler);
+int textureSize(usamplerBuffer sampler);
+
/* texture - no bias */
vec4 texture( sampler1D sampler, float P);
ivec4 texture(isampler1D sampler, float P);
diff --git a/src/glsl/builtins/profiles/140.vert b/src/glsl/builtins/profiles/140.vert
index 7aa9240..1aab72c 100644
--- a/src/glsl/builtins/profiles/140.vert
+++ b/src/glsl/builtins/profiles/140.vert
@@ -504,6 +504,10 @@ ivec2 textureSize(isampler2DRect sampler);
ivec2 textureSize(usampler2DRect sampler);
ivec2 textureSize(sampler2DRectShadow sampler);
+int textureSize( samplerBuffer sampler);
+int textureSize(isamplerBuffer sampler);
+int textureSize(usamplerBuffer sampler);
+
/* texture */
vec4 texture( sampler1D sampler, float P);
ivec4 texture(isampler1D sampler, float P);
diff --git a/src/glsl/builtins/tools/texture_builtins.py b/src/glsl/builtins/tools/texture_builtins.py
index bbbbd0b..3d957e2 100755
--- a/src/glsl/builtins/tools/texture_builtins.py
+++ b/src/glsl/builtins/tools/texture_builtins.py
@@ -162,6 +162,7 @@ def generate_texture_functions(fs):
generate_sigs("", "txs", "2DArrayShadow")
generate_fiu_sigs("txs", "2DRect")
generate_sigs("", "txs", "2DRectShadow")
+ generate_fiu_sigs("txs", "Buffer")
end_function(fs, "textureSize")
start_function("texture")
--
1.7.10
More information about the mesa-dev
mailing list