summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtins/profiles/130.vert
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Delete old built-in function generation code.Kenneth Graunke2013-09-091-2/+0
| | | | | | | | None of this is used anymore. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Acked-by: Paul Berry <[email protected]>
* glsl/builtins: Rework profiles to use the new '.glsl' common suffix.Kenneth Graunke2012-04-171-908/+0
| | | | | | | | | | | | | | | | | | | | Deletes a lot of pointless duplication, as well as some run-time effort. Conveniently, GLSL 1.40 no longer needs a .vert variant, since it doesn't define any built-ins specific to the vertex shader stage. ARB_texture_rectangle and OES_EGL_image_external also only need a single profile, since the .vert and .frag variants were identical. I didn't bother with EXT_texture_array and OES_texture_3D because they're so tiny that the savings would be miniscule. Cuts the generated builtin_function.cpp from 1.7MB to 1.0MB (41%). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Acked-by: Ian Romanick <[email protected]>
* glsl/builtins: Use ivec for texel offsets in textureProjGradOffset.Kenneth Graunke2012-04-171-1/+1
| | | | | | | | | | | | | | | | | The GLSL 1.30 -> 4.10 specs all erroneously say "vec2" for a few overloads of textureProjGradOffset, while most overloads and all other texturing functions use ivec types. The GLSL 4.20 specification corrects these to "ivec2", but doesn't mention this as being a conscious change in behavior. Nor does the ARB_shading_language_420pack extension. So presumably it was a typo. At any rate, our builtin functions all use ivec already, so the fact that these prototypes use plain vecs will only lead to applications dying in a fire when trying to use them. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* glsl/builtins: Add missing mix(genType, genType, bvec) built-ins.Kenneth Graunke2012-01-061-0/+5
| | | | | | | | | | | | The IR for mix(float, float, bool) was missing a write mask, causing the IR reader to die horribly. Furthermore, I neglected to add any of the new prototypes to the 1.30 profiles. Fixes oglconform's glsl-bif-com advanced.mix test cases. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44477 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glsl: Remove textureGradOffset built-ins taking samplerCube parameters.Kenneth Graunke2011-11-101-4/+0
| | | | | | | | | These simply don't exist in the 1.30 specification---none of the Offset variants allow samplerCube. This must have been a cut and paste error from textureGrad, which /does/ allow cubemaps. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Fix misnamed textureProjOffset prototypes in built-in profiles.Kenneth Graunke2011-11-101-20/+20
| | | | | | | | Due to a cut and paste error, these were accidentally misnamed textureProj() rather than textureProjOffset(). Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Remove texture built-ins with 'bias' from 1.30 VS profile.Kenneth Graunke2011-11-101-118/+4
| | | | | | | | | | | From the GLSL 1.30 spec, section 8.7 "Texture Lookup Functions": "In all functions below, the bias parameter is optional for fragment shaders. The bias parameter is not accepted in a vertex shader." This was a cut and paste mistake. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Paul Berry <[email protected]>
* glsl: Add isinf() and isnan() builtins.Paul Berry2011-10-311-2/+0
| | | | | | | | | | | | | The implementations are as follows: isinf(x) = (abs(x) == +infinity) isnan(x) = (x != x) Note: the latter formula is not necessarily obvious. It works because NaN is the only floating point number that does not equal itself. Fixes piglit tests "isinf-and-isnan fs_basic" and "isinf-and-isnan vs_basic".
* glsl/builtins: Uncomment textureSize prototypes.Kenneth Graunke2011-08-231-2/+0
| | | | | | Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* glsl/builtins: Fix return type for textureSize sampler2DArray variants.Kenneth Graunke2011-02-271-2/+2
| | | | A copy and paste error.
* glsl/builtins: Uncomment prototypes for texture*Offset functions.Kenneth Graunke2011-01-311-10/+0
|
* glsl: Implement the asinh, acosh, and atanh built-in functions.Kenneth Graunke2010-11-151-2/+0
|
* glsl: Add support for GLSL 1.30's modf built-in.Kenneth Graunke2010-10-211-0/+5
|
* glsl: Add support for the 1.30 round() built-in.Kenneth Graunke2010-10-141-0/+5
| | | | | | | This implements round() via the ir_unop_round_even opcode, rather than adding a new opcode. We may wish to add one in the future, since it might enable a small performance increase on some hardware, but for now, this should suffice.
* glsl: Add front-end support for GLSL 1.30's roundEven built-in.Kenneth Graunke2010-10-141-0/+5
| | | | Implemented using the op-code introduced in the previous commit.
* glsl: Add front-end support for the "trunc" built-in.Kenneth Graunke2010-10-141-0/+5
|
* glsl/builtins: Add forgotten hyperbolic trig builtins in 1.30 profiles.Kenneth Graunke2010-08-181-0/+32
|
* glsl2: Add builtins profile for GLSL 1.30.Kenneth Graunke2010-08-161-0/+987
Many functions are currently wrapped with #if 0 since we haven't implemented them yet.