summaryrefslogtreecommitdiffstats
path: root/src/glsl
Commit message (Collapse)AuthorAgeFilesLines
...
* nir/glsl: Add support for saturateJason Ekstrand2015-01-151-0/+5
| | | | Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
* Fix what I think are a few NIR typosJason Ekstrand2015-01-151-3/+3
| | | | Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
* nir: add an SSA-based dead code elimination passConnor Abbott2015-01-153-0/+191
| | | | | v2: Jason Ekstrand <jason.ekstrand@intel.com>: whitespace fixes
* nir: add an SSA-based copy propagation passConnor Abbott2015-01-153-0/+317
|
* nir: add a pass to convert to SSAConnor Abbott2015-01-153-0/+686
| | | | | v2: Jason Ekstrand <jason.ekstrand@intel.com>: whitespace fixes
* nir: calculate dominance informationConnor Abbott2015-01-154-1/+337
|
* nir: add an optimization to turn global registers into local registersConnor Abbott2015-01-153-0/+106
| | | | | After linking and inlining, this allows us to convert these registers into SSA values and optimise more code.
* nir: add a pass to lower atomicsConnor Abbott2015-01-153-0/+130
| | | | | v2: Jason Ekstrand <jason.ekstrand@intel.com> whitespace fixes
* nir: add a pass to lower system value readsConnor Abbott2015-01-153-0/+109
| | | | | v2: Jason Ekstrand <jason.ekstrand@intel.com>: whitespace fixes
* nir: add a pass to lower sampler instructionsConnor Abbott2015-01-153-0/+176
|
* nir: add a pass to remove unused variablesConnor Abbott2015-01-153-0/+141
| | | | | | | | After we lower variables, we want to delete them in order to free up some memory. v2: Jason Ekstrand <jason.ekstrand@intel.com>: whitespace fixes
* nir: keep track of the number of input, output, and uniform slotsConnor Abbott2015-01-153-4/+16
|
* nir: add a pass to lower variables for scalar backendsConnor Abbott2015-01-153-0/+1237
|
* nir: add a glsl-to-nir passConnor Abbott2015-01-153-1/+1797
| | | | | | v2: Jason Ekstrand <jason.ekstrand@intel.com>: Make glsl_to_nir build again fix whitespace
* nir: add a validation passConnor Abbott2015-01-153-0/+793
| | | | | | | This is similar to ir_validate.cpp. v2: Jason Ekstrand <jason.ekstrand@intel.com>: whitespace fixes
* nir: add a printerConnor Abbott2015-01-153-0/+915
| | | | | | | This is similar to ir_print_visitor.cpp. v2: Jason Ekstrand <jason.ekstrand@intel.com>: whitespace fixes
* SQUASH: Fix comments from ericJason Ekstrand2015-01-151-0/+3
| | | | Reviewed-by: Eric Anholt <eric@anholt.net>
* SQUASH: Add an assertJason Ekstrand2015-01-151-0/+1
|
* nir: add core helper functionsConnor Abbott2015-01-153-3/+1815
| | | | | | | | | These include functions for adding and removing various bits of IR and helpers for iterating over all the sources and destinations of an instruction. This is similar to ir.cpp. v2: Jason Ekstrand <jason.ekstrand@intel.com>: whitespace and automake fixes
* SQUASH: Use the enum for the variable modeJason Ekstrand2015-01-151-1/+1
|
* nir: add the core datastructuresConnor Abbott2015-01-156-0/+1751
| | | | | | | | | | | | | This includes all the instructions, ifs, loops, functions, etc. This is similar to the information in ir.h. v2: Jason Ekstrand <jason.ekstrand@intel.com>: Include ralloc and hash_table from the util directory whitespace fixes Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-By glenn.kennard <glenn.kennard@gmail.com>
* nir: add a simple C wrapper around glsl_types.hConnor Abbott2015-01-154-1/+238
| | | | | | | v2: Jason Ekstrand <jason.ekstrand@intel.com>: whitespace and automake fixes Reviewed-by: Eric Anholt <eric@anholt.net>
* nir: add initial READMEConnor Abbott2015-01-151-0/+118
| | | | Reviewed-by: Eric Anholt <eric@anholt.net>
* exec_list: add a list_foreach_typed_reverse() macroConnor Abbott2015-01-151-0/+6
| | | | Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa/glsl/glapi: enable GL_EXT_draw_buffers extensionTapani Pälli2015-01-143-0/+4
| | | | | | | | | | | | | | | | Patch enables ES2 extension that utilizes existing ES3 functionality. Changes make all the subtests to run and pass in WebGL conformance test 'webgl-draw-buffers' when running Chrome on OpenGL ES, also Piglit test 'draw_buffers_gles2' passes. v2: remove unused boolean (Ilia Mirkin) v3: proper error checking for invalid values (Chad Versace) v4: run error check explicitly for ES2 and ES3 (Kenneth Graunke) Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
* glsl: use the is_gl_identifier() helper in a couple more placesBrian Paul2015-01-052-2/+2
| | | | Reviewed-by: Eric Anholt <eric@anholt.net>
* glsl: check if implicitly sized arrays match explicitly sized arrays across ↵Timothy Arceri2014-12-231-1/+20
| | | | | | | | | the same stage V2: Improve error message. Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
* glsl: remove extern "C" around #includesBrian Paul2014-12-163-7/+2
| | | | | Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* glsl: remove commented out codeTimothy Arceri2014-12-161-2/+0
| | | | | | | MaxGeometryOutputComponents is used as the value for gl_MaxGeometryVaryingComponents Acked-by: Matt Turner <mattst88@gmail.com>
* glsl: Add gl_MaxViewports to available builtin constantsMaxence Le Doré2014-12-153-0/+10
| | | | | | | | It seems to have been forgotten during viewports array implementation time. Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* util/hash_table: Rework the API to know about hashingJason Ekstrand2014-12-143-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the hash_table API required the user to do all of the hashing of keys as it passed them in. Since the hashing function is intrinsically tied to the comparison function, it makes sense for the hash table to know about it. Also, it makes for a somewhat clumsy API as the user is constantly calling hashing functions many of which have long names. This is especially bad when the standard call looks something like _mesa_hash_table_insert(ht, _mesa_pointer_hash(key), key, data); In the above case, there is no reason why the hash table shouldn't do the hashing for you. We leave the option for you to do your own hashing if it's more efficient, but it's no longer needed. Also, if you do do your own hashing, the hash table will assert that your hash matches what it expects out of the hashing function. This should make it harder to mess up your hashing. v2: change to call the old entrypoint "pre_hashed" rather than "with_hash", like cworth's equivalent change upstream (change by anholt, acked-in-general by Jason). Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
* glsl: Add dist-hook to delete glcpp test *.out files.Matt Turner2014-12-121-0/+4
|
* glcpp: Make tests write .out files to builddir.Matt Turner2014-12-122-7/+14
|
* mesa: Add notes/readme files to distribution.Matt Turner2014-12-121-1/+1
|
* mesa: Add scons files to distribution.Matt Turner2014-12-121-1/+2
|
* glsl: Add clean-local rule to delete glcpp test output.Matt Turner2014-12-121-0/+3
|
* glsl: Add parser headers to distribution.Matt Turner2014-12-121-0/+2
|
* glsl: Add lex and yacc sources to distribution.Matt Turner2014-12-121-1/+5
| | | | | Since we have manual build rules and list the .c/.cpp files in SOURCES, we need to explicitly list these for distribution.
* glsl: Add headers to distribution.Matt Turner2014-12-122-3/+32
|
* glsl: Distribute tests/, TODO, and READMEMatt Turner2014-12-121-0/+2
|
* glsl: invariant qualifier is not valid for shader inputs in GLSL ES 3.00Samuel Iglesias Gonsalvez2014-12-092-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLSL ES 3.00 spec, chapter 4.6.1 "The Invariant Qualifier", Only variables output from a shader can be candidates for invariance. This includes user-defined output variables and the built-in output variables. As only outputs can be declared as invariant, an invariant output from one shader stage will still match an input of a subsequent stage without the input being declared as invariant. This patch fixes the following dEQP tests: dEQP-GLES3.functional.shaders.qualification_order.variables.valid.invariant_interp_storage_precision dEQP-GLES3.functional.shaders.qualification_order.variables.valid.invariant_interp_storage dEQP-GLES3.functional.shaders.qualification_order.variables.valid.invariant_storage_precision dEQP-GLES3.functional.shaders.qualification_order.variables.valid.invariant_storage dEQP-GLES3.functional.shaders.qualification_order.variables.invalid.invariant_interp_storage_precision_invariant_input dEQP-GLES3.functional.shaders.qualification_order.variables.invalid.invariant_interp_storage_invariant_input dEQP-GLES3.functional.shaders.qualification_order.variables.invalid.invariant_storage_precision_invariant_input dEQP-GLES3.functional.shaders.qualification_order.variables.invalid.invariant_storage_invariant_input No piglit regressions observed. v2: - Add spec content in the code Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: Don't optimize min/max into saturate when EmitNoSat is setAbdiel Janulgue2014-12-081-1/+1
| | | | | | | v3: Fix multi-line comment format (Ian) Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
* glcpp: Fix `can not` to `cannot` in error messageChris Forbes2014-12-072-4/+4
| | | | Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
* glcpp: Disallow undefining GL_* builtin macros.Chris Forbes2014-12-071-1/+2
| | | | | | | | Fixes the piglit test: spec/glsl-es-3.00/compiler/undef-GL_ES.vert Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* glsl: Optimize scalar all_equal/any_nequal into equal/nequal.Matt Turner2014-12-051-0/+10
| | | | | | | | | Cuts an instruction from two shaders in Tesseract, by allowing the (x+y) cmp 0 -> x cmp -y optimization to take place. instructions in affected programs: 1198 -> 1194 (-0.33%) Reviewed-by: Eric Anholt <eric@anholt.net>
* linker: Assign varying locations geometry shader inputs for SSOIan Romanick2014-12-031-0/+15
| | | | | | | | | | Previously only geometry shader outputs would be assigned locations if the geometry shader was the only stage in the linked program. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Cc: pavol@klacansky.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82585 Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* linker: Wrap access of producer_var with a NULL checkIan Romanick2014-12-031-3/+5
| | | | | | | | | | | | producer_var could be NULL if consumer_var is not NULL and consumer_is_fs is false. This will occur when the producer is NULL and the consumer is the geometry shader for a program that contains only a geometry shader. This will occur starting with the next patch. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Cc: pavol@klacansky.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82585 Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* glsl: throw error when using invariant(all) in a fragment shaderTapani Pälli2014-12-031-1/+12
| | | | | | | | Note that some of the GLSL specifications explicitly state this as compile error, some simply state that 'it is an error'. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
* main, glsl: Bump max known desktop glsl version to 4.50Jordan Justen2014-12-012-4/+8
| | | | | Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* glsl/cs: Change gl_WorkGroupSize from ivec3 to uvec3Jordan Justen2014-12-011-4/+4
| | | | | | | | | | | As documented in: https://www.opengl.org/registry/specs/ARB/compute_shader.txt const uvec3 gl_WorkGroupSize; Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>