aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/builtins/profiles/300es.frag
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-08-04 15:42:33 -0700
committerIan Romanick <[email protected]>2012-12-06 12:13:22 -0800
commit486f9556548292e776781e85052ec4122180891d (patch)
tree991c5312c9aa49888f9b6642fb61a39a1c3d5c82 /src/glsl/builtins/profiles/300es.frag
parent9a69f66353010d3fe8c666bd4adee26139f32efa (diff)
glsl: Create builtin function profiles for GLSL 3.00 ES.
Nearly all of the builtin functions in GLSL 3.00 ES are already implemented in Mesa; this patch enables them. A few functions are not implemented yet; those have been commented out, with a FIXME comment to act as a reminder of what still needs to be implemented. Here is the complete list: packSnorm2x16, unpackSnorm2x16, packUnorm2x16, unpackUnorm2x16, packHalf2x16, unpackHalf2x16. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Acked-by: Carl Worth <[email protected]>
Diffstat (limited to 'src/glsl/builtins/profiles/300es.frag')
-rw-r--r--src/glsl/builtins/profiles/300es.frag84
1 files changed, 84 insertions, 0 deletions
diff --git a/src/glsl/builtins/profiles/300es.frag b/src/glsl/builtins/profiles/300es.frag
new file mode 100644
index 00000000000..38589f79bae
--- /dev/null
+++ b/src/glsl/builtins/profiles/300es.frag
@@ -0,0 +1,84 @@
+#version 300 es
+
+/* texture - bias variants */
+ vec4 texture( sampler2D sampler, vec2 P, float bias);
+ivec4 texture(isampler2D sampler, vec2 P, float bias);
+uvec4 texture(usampler2D sampler, vec2 P, float bias);
+
+ vec4 texture( sampler3D sampler, vec3 P, float bias);
+ivec4 texture(isampler3D sampler, vec3 P, float bias);
+uvec4 texture(usampler3D sampler, vec3 P, float bias);
+
+ vec4 texture( samplerCube sampler, vec3 P, float bias);
+ivec4 texture(isamplerCube sampler, vec3 P, float bias);
+uvec4 texture(usamplerCube sampler, vec3 P, float bias);
+
+float texture(sampler2DShadow sampler, vec3 P, float bias);
+float texture(samplerCubeShadow sampler, vec4 P, float bias);
+
+ vec4 texture( sampler2DArray sampler, vec3 P, float bias);
+ivec4 texture(isampler2DArray sampler, vec3 P, float bias);
+uvec4 texture(usampler2DArray sampler, vec3 P, float bias);
+
+float texture(sampler2DArrayShadow sampler, vec4 P, float bias);
+
+/* textureProj - bias variants */
+ vec4 textureProj( sampler2D sampler, vec3 P, float bias);
+ivec4 textureProj(isampler2D sampler, vec3 P, float bias);
+uvec4 textureProj(usampler2D sampler, vec3 P, float bias);
+ vec4 textureProj( sampler2D sampler, vec4 P, float bias);
+ivec4 textureProj(isampler2D sampler, vec4 P, float bias);
+uvec4 textureProj(usampler2D sampler, vec4 P, float bias);
+
+ vec4 textureProj( sampler3D sampler, vec4 P, float bias);
+ivec4 textureProj(isampler3D sampler, vec4 P, float bias);
+uvec4 textureProj(usampler3D sampler, vec4 P, float bias);
+
+float textureProj(sampler2DShadow sampler, vec4 P, float bias);
+
+/* textureOffset - bias variants */
+ vec4 textureOffset( sampler2D sampler, vec2 P, ivec2 offset, float bias);
+ivec4 textureOffset(isampler2D sampler, vec2 P, ivec2 offset, float bias);
+uvec4 textureOffset(usampler2D sampler, vec2 P, ivec2 offset, float bias);
+
+ vec4 textureOffset( sampler3D sampler, vec3 P, ivec3 offset, float bias);
+ivec4 textureOffset(isampler3D sampler, vec3 P, ivec3 offset, float bias);
+uvec4 textureOffset(usampler3D sampler, vec3 P, ivec3 offset, float bias);
+
+float textureOffset(sampler2DShadow sampler, vec3 P, ivec2 offset, float bias);
+
+ vec4 textureOffset( sampler2DArray sampler, vec3 P, ivec2 offset, float bias);
+ivec4 textureOffset(isampler2DArray sampler, vec3 P, ivec2 offset, float bias);
+uvec4 textureOffset(usampler2DArray sampler, vec3 P, ivec2 offset, float bias);
+
+/* textureProjOffsetOffset - bias variants */
+ vec4 textureProjOffset( sampler2D sampler, vec3 P, ivec2 offset, float bias);
+ivec4 textureProjOffset(isampler2D sampler, vec3 P, ivec2 offset, float bias);
+uvec4 textureProjOffset(usampler2D sampler, vec3 P, ivec2 offset, float bias);
+ vec4 textureProjOffset( sampler2D sampler, vec4 P, ivec2 offset, float bias);
+ivec4 textureProjOffset(isampler2D sampler, vec4 P, ivec2 offset, float bias);
+uvec4 textureProjOffset(usampler2D sampler, vec4 P, ivec2 offset, float bias);
+
+ vec4 textureProjOffset( sampler3D sampler, vec4 P, ivec3 offset, float bias);
+ivec4 textureProjOffset(isampler3D sampler, vec4 P, ivec3 offset, float bias);
+uvec4 textureProjOffset(usampler3D sampler, vec4 P, ivec3 offset, float bias);
+
+float textureProjOffset(sampler2DShadow s, vec4 P, ivec2 offset, float bias);
+
+/*
+ * 8.9 - Fragment Processing Functions
+ */
+float dFdx(float p);
+vec2 dFdx(vec2 p);
+vec3 dFdx(vec3 p);
+vec4 dFdx(vec4 p);
+
+float dFdy(float p);
+vec2 dFdy(vec2 p);
+vec3 dFdy(vec3 p);
+vec4 dFdy(vec4 p);
+
+float fwidth(float p);
+vec2 fwidth(vec2 p);
+vec3 fwidth(vec3 p);
+vec4 fwidth(vec4 p);