summaryrefslogtreecommitdiffstats
path: root/src/glsl
Commit message (Collapse)AuthorAgeFilesLines
* Fix what I think are a few NIR typosJason Ekstrand2015-01-151-3/+3
| | | | Reviewed-by: Connor Abbott <[email protected]>
* nir: add an SSA-based dead code elimination passConnor Abbott2015-01-153-0/+191
| | | | | v2: Jason Ekstrand <[email protected]>: 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 <[email protected]>: 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 <[email protected]> whitespace fixes
* nir: add a pass to lower system value readsConnor Abbott2015-01-153-0/+109
| | | | | v2: Jason Ekstrand <[email protected]>: 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 <[email protected]>: 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 <[email protected]>: 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 <[email protected]>: whitespace fixes
* nir: add a printerConnor Abbott2015-01-153-0/+915
| | | | | | | This is similar to ir_print_visitor.cpp. v2: Jason Ekstrand <[email protected]>: whitespace fixes
* SQUASH: Fix comments from ericJason Ekstrand2015-01-151-0/+3
| | | | Reviewed-by: Eric Anholt <[email protected]>
* 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 <[email protected]>: 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 <[email protected]>: Include ralloc and hash_table from the util directory whitespace fixes Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-By glenn.kennard <[email protected]>
* nir: add a simple C wrapper around glsl_types.hConnor Abbott2015-01-154-1/+238
| | | | | | | v2: Jason Ekstrand <[email protected]>: whitespace and automake fixes Reviewed-by: Eric Anholt <[email protected]>
* nir: add initial READMEConnor Abbott2015-01-151-0/+118
| | | | Reviewed-by: Eric Anholt <[email protected]>
* exec_list: add a list_foreach_typed_reverse() macroConnor Abbott2015-01-151-0/+6
| | | | Reviewed-by: Eric Anholt <[email protected]>
* 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 <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* glsl: use the is_gl_identifier() helper in a couple more placesBrian Paul2015-01-052-2/+2
| | | | Reviewed-by: Eric Anholt <[email protected]>
* 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 <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* glsl: remove extern "C" around #includesBrian Paul2014-12-163-7/+2
| | | | | Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* glsl: remove commented out codeTimothy Arceri2014-12-161-2/+0
| | | | | | | MaxGeometryOutputComponents is used as the value for gl_MaxGeometryVaryingComponents Acked-by: Matt Turner <[email protected]>
* 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" <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* 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 <[email protected]> Signed-off-by: Eric Anholt <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* 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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* 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 <[email protected]> Signed-off-by: Abdiel Janulgue <[email protected]>
* glcpp: Fix `can not` to `cannot` in error messageChris Forbes2014-12-072-4/+4
| | | | Signed-off-by: Chris Forbes <[email protected]>
* 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 <[email protected]> Reviewed-by: Anuj Phogat <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82585 Reviewed-by: Jordan Justen <[email protected]>
* 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 <[email protected]> Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82585 Reviewed-by: Jordan Justen <[email protected]>
* 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 <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
* main, glsl: Bump max known desktop glsl version to 4.50Jordan Justen2014-12-012-4/+8
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* 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 <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glsl: Initialize static temporaries_allocate_names once per process.Matt Turner2014-12-011-1/+3
| | | | Reviewed-by: Jason Ekstrand <[email protected]>