summaryrefslogtreecommitdiffstats
path: root/src/glsl
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Allow texture2DProjLod and textureCubeLod in GL ESKalyan Kondapally2014-09-291-3/+3
| | | | | | | | | | According to GLES (i.e. 1.0 and above) spec textureCubeLod and texture2DProjLod are built in functions. We seem to disable support for these functions with GLES. This patch enables the support. Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84355
* glsl: Recognize open-coded pow(x, y).Matt Turner2014-09-271-0/+14
| | | | | | | | pow(x, y) is equivalent to exp(log(x) * y). instructions in affected programs: 578 -> 458 (-20.76%) Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl: Strip arrayness from ir_type_dereference_variable tooIan Romanick2014-09-261-1/+1
| | | | | | | | | | | | If the thing being dereferenced is a record or an array of records, it should be treated as row-major. The ir_type_derference_record path already does this, and I think I intended to do the same for this path in b17a4d5d. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83741 Cc: mesa-stable@lists.freedesktop.org
* glsl: Round struct size up to at least 16 bytesIan Romanick2014-09-261-1/+1
| | | | | | | | | | | Per rule #9, the size of the structure is vec4 aligned. The MAX2 in the loop ensures that sizes >= 16 bytes are vec4 aligned. The new MAX2 after the loop ensures that sizes < 16 bytes are vec4 aligned. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82932 Cc: mesa-stable@lists.freedesktop.org
* glsl: Make sure row-major array-of-structure get correct layoutIan Romanick2014-09-261-1/+8
| | | | | | | | | | | Whether or not the field is row-major (because it might be a bvec2 or something) does not affect the array itself. We need to know whether an array element in its entirety is row-major. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83506 Cc: mesa-stable@lists.freedesktop.org
* glsl: Make sure fields after small structs have correct paddingIan Romanick2014-09-261-0/+22
| | | | | | | | | | | Previously the linker would correctly calculate the layout, but the lower_ubo_reference pass would not apply correct alignment to fields following small (less than 16-byte) nested structures. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83533 Cc: mesa-stable@lists.freedesktop.org
* glsl: remove unused link_assign_uniform_block_offsetsTapani Pälli2014-09-262-37/+0
| | | | | | | ubo offsets are assigned by link_uniform_blocks since 514f8c7e Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: Structures must have same name to be considered same type.Kalyan Kondapally2014-09-262-0/+22
| | | | | | | | | | | | | | | | | | | According to GLSL(4.2) and GLSL-ES (1.0, 3.0) spec, Structures must have the same name to be considered same type. We currently ignore the name check while checking if two records are same. This patch fixes this. Patch fixes failing tests in WebGL conformance test 'shaders-with-uniform-structs' when running Chrome on OpenGL ES. v2: Do not force name comparison with unnamed types (Tapani) v3: Cleanups (Matt) Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com> Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83934
* glsl: fix uniform location count used for glsl typesTapani Pälli2014-09-262-9/+12
| | | | | | | | | Patch fixes the slot count used by vector types and adds 1 slot to be used by image and sampler types. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82921
* glsl: Check realloc return value in ir_function::matching_signature()Juha-Pekka Heikkila2014-09-231-2/+9
| | | | | Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* glsl: Check calloc return value in link_intrastage_shaders()Juha-Pekka Heikkila2014-09-231-4/+11
| | | | | | | Check calloc return value while adding build-in functions. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* glsl: add missing null check in tfeedback_decl::init()Juha-Pekka Heikkila2014-09-231-0/+5
| | | | | Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* glsl: Fix memory leak in glsl_lexer.llJuha-Pekka Heikkila2014-09-231-3/+6
| | | | | | | | | | | | | Running fast clear glClear with SNB caused Valgrind to complain about this. v2: line 237 fixed glClear from leaking memory, other strdups are also now changed to ralloc_strdups but I don't know what effect those have. At least no changes in my Piglit quick run. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: use ptrdiff_t cast to silence g++ sign warningBrian Paul2014-09-221-1/+1
| | | | Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: fix error message for redeclaring gl_PerVertex as outputChris Forbes2014-09-171-1/+1
| | | | | Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* Generate a warning when not writing gl_Position with GLES.Kalyan Kondapally2014-09-151-2/+9
| | | | | | | | | | With GLES we don't give any kind of warning in case we don't write to gl_position. This patch makes changes so that we generate a warning in case of GLES (VER < 300) and an error in case of GL. Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* glsl: Speed up constant folding for swizzles.Kenneth Graunke2014-09-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ir_rvalue::constant_expression_value() recursively walks down an IR tree, attempting to reduce it to a single constant value. This is useful when you want to know whether a variable has a constant expression value at all, and if so, what it is. The constant folding optimization pass attempts to replace rvalues with their constant expression value from the bottom up. That way, we can optimize subexpressions, and ideally stop as soon as we find a non-constant subexpression. In order to obtain the actual value of an expression, the optimization pass calls constant_expression_value(). But it should only do so if it knows the value can be combined into a constant. Otherwise, at each step of walking back up the tree, it will walk down the tree again, only to discover what it already knew: it isn't constant. We properly avoided this call for ir_expression nodes, but not for ir_swizzle nodes. This patch fixes that, drastically reducing compile times on certain shaders where tree grafting has given us huge expression trees. It also fixes SuperTuxKart. Thanks to Iago and Mike for help in tracking this down. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78468 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Cc: mesa-stable@lists.freedesktop.org
* glsl: allow precision qualifier on sampler arraysFrank Henigman2014-09-111-34/+41
| | | | | | | | | | | If a precision qualifer is allowed on type T, it should be allowed on an array of T. Refactor the check to ensure this is the case. (Fixes failures in WebGL conformance test 'gl-min-textures') Signed-off-by: Frank Henigman <fjhenigman@google.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* glsl: mark variable as loop constant when it is set read onlyTapani Pälli2014-09-111-7/+2
| | | | | | | | | | | | | | Patch modifies is_loop_constant() to take advantage of 'read_only' bit in ir_variable to detect a loop constant. Variables marked read-only are loop constant like mentioned by a comment in the function. v2: remove unnecessary comment (Francisco) Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82537 Tested-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
* glsl: Add a lowering pass for gl_VertexIDIan Romanick2014-09-104-0/+150
| | | | | | | | | | | | | | | | | | | | | | | | | Converts gl_VertexID to (gl_VertexIDMESA + gl_BaseVertex). gl_VertexIDMESA is backed by SYSTEM_VALUE_VERTEX_ID_ZERO_BASE, and gl_BaseVertex is backed by SYSTEM_VALUE_BASE_VERTEX. v2: Put the enum in struct gl_constants and propoerly resolve the scope in C++ code. Fix suggested by Marek. v3: Reabase on Matt's foreach_in_list changes (was using foreach_list). v4 (Ken): Use a systemvalue instead of a uniform because STATE_BASE_VERTEX has been removed. v5: Use a boolean to select lowering, and only allow one lowering method. Suggested by Ken. v6 (Ken): Replace strcmp against literal "gl_BaseVertex"/"gl_VertexID" with SYSTEM_VALUE enum checks, for efficiency. v7: Rebase on context constant initialization work. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl/linker: Make get_main_function_signature publicIan Romanick2014-09-102-4/+8
| | | | | | | | The next patch will use this function in a different file. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* Linking fails when not writing gl_Position.Kalyan Kondapally2014-09-091-3/+3
| | | | | | | | | | | | | | | According to GLSL-ES Spec(i.e. 1.0, 3.0), gl_Position value is undefined after the vertex processing stage if we don't write gl_Position. However, GLSL 1.10 Spec mentions that writing to gl_Position is mandatory. In case of GLSL-ES, it's not an error and atleast the linking should pass. Currently, Mesa throws an linker error in case we dont write to gl_position and Version is less then 140(GLSL) and 300(GLSL-ES). This patch changes it so that we don't report an error in case of GLSL-ES. Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83380
* glsl: Report progress from opt_copy_propagation_elements().Kenneth Graunke2014-09-031-0/+1
| | | | | | | It's been altering the tree and reporting "false" since January 2011. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
* glsl: Skip rewriting instructions in opt_cpe when unnecessary.Kenneth Graunke2014-09-031-0/+10
| | | | | | | | | | | | Previously, opt_copy_propagation_elements would always rewrite the instruction stream, even if was the same thing as before. In order to report progress correctly, we'll need to bail if the suggested replacement is identical (or equivalent) to the original code. This also introduced unnecessary noop swizzles, as far as I can tell. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
* glsl: Initialize source_chan in opt_copy_propagation_elements.Kenneth Graunke2014-09-031-1/+1
| | | | | | | | | | | Previously, if chans < 4, we passed uninitialized stack garbage to the ir_swizzle constructor for the excess components. Thankfully, it ignores that data, as it's unnecessary, so no harm actually comes of it. However, it's obviously better to initialize it. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
* glsl: fix assertion which fails for unsigned array indices.tiffany2014-09-031-1/+1
| | | | | | | | | According to the GLSL 1.40 spec, section 5.7 Structure and Array Operations: "Array elements are accessed using an expression whose type is int or uint." Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* glsl: free uniform_map on failure path.Dave Airlie2014-09-021-1/+3
| | | | | | | | | If we fails in reserve_explicit_locations, we leak uniform_map. Reported-by: coverity scanner. Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* glsl: Optimize clamp(x, b, 1.0), where b > 0.0 as max(saturate(x),b)Abdiel Janulgue2014-08-311-0/+23
| | | | | | | | | | | | v2: - Output max(saturate(x),b) instead of saturate(max(x,b)) - Make sure we do component-wise comparison for vectors (Ian Romanick) v3: - Add missing condition where the outer constant value is > 0.0 and inner constant is 1.0. - Fix comments to show that the optimization is a commutative operation (Matt Turner) Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
* glsl: Optimize clamp(x, 0.0, b), where b < 1.0 as min(saturate(x),b)Abdiel Janulgue2014-08-311-0/+39
| | | | | | | | | | | v2: - Output min(saturate(x),b) instead of saturate(min(x,b)) suggested by Ilia Mirkin - Make sure we do component-wise comparison for vectors (Ian Romanick) v3: - Add missing condition where the outer constant value is zero and inner constant is < 1 - Fix comments to reflect we are doing a commutative operation (Matt Turner) Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
* glsl: Optimize clamp(x, 0, 1) as saturate(x)Abdiel Janulgue2014-08-311-0/+36
| | | | | | | | | | | v2: - Check that the base type is float (Ian Romanick) v3: - Make sure comments reflect that we are doing a commutative operation - Add missing condition where the inner constant is 1.0 and outer constant is 0.0 - Make indexing of operands easier to read (Matt Turner) Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
* glsl: Implement saturate as ir_unop_saturateAbdiel Janulgue2014-08-311-5/+1
| | | | | | | | | Now that we have the ir_unop_saturate implemented as a single instruction, generate the correct simplified expression. Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
* glsl: Add a pass to lower ir_unop_saturate to clamp(x, 0, 1)Abdiel Janulgue2014-08-312-0/+30
| | | | | | Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: Add constant evaluation of ir_unop_saturateAbdiel Janulgue2014-08-311-0/+6
| | | | | | | | v2: Use CLAMP macro (Ian Romanick) Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: Add ir_unop_saturateAbdiel Janulgue2014-08-313-0/+4
| | | | | | Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: Use bit-flags image attributes and uint16_t for the image formatIan Romanick2014-08-296-43/+42
| | | | | | | | | | | | | | | | | | | | | | All of the GL image enums fit in 16-bits. Also move the fields from the anonymous "image" structucture to the next higher structure. This will enable packing the bits with the other bitfield. Valgrind massif results for a trimmed apitrace of dota2: n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) Before (32-bit): 76 40,572,916,873 68,831,248 63,328,783 5,502,465 0 After (32-bit): 70 40,577,421,777 68,487,584 62,973,695 5,513,889 0 Before (64-bit): 60 36,822,640,058 96,526,824 88,735,296 7,791,528 0 After (64-bit): 74 37,124,603,758 95,891,808 88,466,712 7,425,096 0 A real savings of 346KiB on 32-bit and 262KiB on 64-bit. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl: Use a single bit for the dual-source blend indexIan Romanick2014-08-291-5/+9
| | | | | | | | | | | | | | | | | | | The only values allowed are 0 and 1, and the value is checked before assigning. Valgrind massif results for a trimmed apitrace of dota2: n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) Before (32-bit): 74 40,580,119,657 69,186,544 63,506,327 5,680,217 0 After (32-bit): 76 40,572,916,873 68,831,248 63,328,783 5,502,465 0 Before (64-bit): 89 36,822,971,897 96,526,616 88,735,296 7,791,320 0 After (64-bit): 60 36,822,640,058 96,526,824 88,735,296 7,791,528 0 A real savings of 173KiB on 32-bit and no change on 64-bit. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl: Eliminate ir_variable::data.atomic.buffer_indexIan Romanick2014-08-293-4/+5
| | | | | | | | | | | | | | | | | | | Just use ir_variable::data.binding... because that's the where the binding is stored for everything else that can use layout(binding=). Valgrind massif results for a trimmed apitrace of dota2: n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B) Before (32-bit): 50 40,564,927,443 69,185,408 63,683,871 5,501,537 0 After (32-bit): 74 40,580,119,657 69,186,544 63,506,327 5,680,217 0 Before (64-bit): 59 36,822,048,449 96,526,888 89,113,000 7,413,888 0 After (64-bit): 89 36,822,971,897 96,526,616 88,735,296 7,791,320 0 A real savings of 173KiB on 32-bit and 368KiB on 64-bit. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl: Add strings.h on non-MSC platformsAlexander von Gluck IV2014-08-271-0/+3
| | | | | | | | | | | | * IEEE Std 1003.1-2001 placed strcasecmp() in strings.h. * ISO C99 doesn't mention strcase* in string.h * On all platforms I could find, strcasecmp is in strings.h and string.h as a compatibility layer for software written pre-2001 POSIX * Technically strcasecmp should be only in strings.h and the man pages back this up. * Tested build on CentOS and Haiku Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* glsl: Remove bogus "OUPTUT" tokenChris Forbes2014-08-261-1/+1
| | | | | | | | This is never used. There is another token "OUTPUT" which the lexer can generate, though. This has been around since the dawn of time; is most likely a typo. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
* glcpp: Don't use alternation in the lookahead for empty pragmas.Carl Worth2014-08-221-2/+8
| | | | | | | | | | | | | | | | | | | | We've found that there's a buffer overrun bug in flex that's triggered by using alternation in a lookahead pattern. Fortunately, we don't need to match the exact {NEWLINE} expression to detect an empty pragma. It suffices to verify that there are no non-space characters before any newline character. So we can use a simple [\r\n] to get the desired behavior while avoiding the flex bug. Fixes the regression of piglit's 17000-consecutive-chars-identifier test, (which has been crashing since commit 04e40fd337a244ee77ef9553985e9398ff0344af ). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82472 Signed-off-by: Carl Worth <cworth@cworth.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> CC: <mesa-stable@lists.freedesktop.org>
* glsl/linker: pass through the is_intrinsic flagConnor Abbott2014-08-211-0/+2
| | | | | | | | | | | | This flag was set to true for the atomic counter intrinsics, but it never got plumbed through the linker, so by the time it got to the backends it would always be set to the false. The current i965 backend code doesn't use is_intrinsic, so this should not change any existing code, but it's useful for codepaths that want to distinguish between intrinsics and non-intrinsics without using strcmp. Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Connor Abbott <connor.abbott@intel.com>
* glcpp: Fix glcpp-test-cr-lf "make check" test for Mac OS XCarl Worth2014-08-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | There were two problems with the way this script used sed on OS X: 1. The OS X sed doesn't interpret "\r" in a replacement list as a carriage-return character, (instead it was inserting a literal 'r' character). We fix this by putting an actual ^M character into the source of the script, (rather than a two-character escape sequence hoping for sed to do the right thing). 2. When generating the test files with LF-CR ("\n\r") newlines, the OS X sed was adding an undesired final newline ("\n") at the end of the file. We avoid this by first using sed to add the ^M before the newlines, then using tr to swap the \r and \n characters. This way, sed never sees any lines ending with anything but \n, so it doesn't get confused and doesn't add any bogus extra newlines. Tested-by: Vinson Lee <vlee@freedesktop.org> Vinson's testing confirmed that this patch fixes FreeBSD as well.
* glcpp: Use printf instead of "echo -n" in glcpp-testCarl Worth2014-08-201-2/+2
| | | | | | | | | | I noticed that with /bin/sh on Mac OS X, "echo -n" does not work as desired, (it actually prints "-n" rather than suppressing the final newline). There is a /bin/echo that could be used (it actually works) instead of the builtin echo. But I decided it's more robust to just use printf rather than hardcoding /bin/echo into the script.
* glsl: Use the without_array predicate in some more placesTimothy Arceri2014-08-191-2/+1
| | | | | Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
* glsl: Use UniformBooleanTrue value for uniform initializers.Matt Turner2014-08-188-34/+52
| | | | Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* glsl: Mark program as using dFdy if coarse/fine variant is usedChris Forbes2014-08-151-1/+3
| | | | | Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Matt Turner <mattst88@gmail.com>
* glsl: add ARB_derivative control supportIlia Mirkin2014-08-148-0/+74
| | | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: Fixed vectorize pass vs. texture lookups.Aras Pranckevicius2014-08-141-0/+13
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82574 Reviewed-by: Matt Turner <mattst88@gmail.com>
* android: glsl: the stlport over the limited Android STLEmil Velikov2014-08-131-1/+1
| | | | | | | The latter lacks various functionality used by mesa/glsl. Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* glsl: Allow dynamically uniform sampler array indexing with 4.0/gs5Chris Forbes2014-08-121-1/+8
| | | | | | | | | V2: Expand comment to explain what dynamically uniform expressions are about. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>