summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/glsl_to_nir.cpp
Commit message (Collapse)AuthorAgeFilesLines
* compiler: Move glsl_to_nir to libglsl.laJason Ekstrand2016-05-261-2026/+0
| | | | | | | | Right now libglsl.la depends on libnir.la so putting it in libnir.la adds a dependency on libglsl.la that goes the wrong direction. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* nir/glsl_to_nir: quell some uninit_member coverity errorsRob Clark2016-05-201-0/+6
| | | | | Signed-off-by: Rob Clark <[email protected]> Acked-by: Matt Turner <[email protected]>
* nir: add double input bitmapJuan A. Suarez Romero2016-05-171-0/+1
| | | | | | This bitmap tracks which input attributes are double-precision. Reviewed-by: Kenneth Graunke <[email protected]>
* nir: Add a nir->info.uses_interp_var_at_offset flag.Kenneth Graunke2016-05-151-0/+3
| | | | | | | | | I've added this to nir_gather_info(), but also to glsl_to_nir() as a temporary measure, since the i965 GL driver today doesn't use nir_gather_info() yet. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: Add an info bit for uses_sample_qualifierJason Ekstrand2016-05-141-0/+1
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* nir: Silence unused parameter warningsIan Romanick2016-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These cases had the parameter removed: nir/nir_lower_vec_to_movs.c: In function ‘try_coalesce’: nir/nir_lower_vec_to_movs.c:124:66: warning: unused parameter ‘shader’ [-Wunused-parameter] try_coalesce(nir_alu_instr *vec, unsigned start_idx, nir_shader *shader) ^ nir/nir_lower_io.c: In function ‘load_op’: nir/nir_lower_io.c:147:32: warning: unused parameter ‘state’ [-Wunused-parameter] load_op(struct lower_io_state *state, ^ These cases had the parameter (void) silenced because the parameter was necessary for an interface: nir/glsl_to_nir.cpp:1900:32: warning: unused parameter 'ir' [-Wunused-parameter] nir_visitor::visit(ir_barrier *ir) ^ nir/nir.c: In function ‘remove_use_cb’: nir/nir.c:802:35: warning: unused parameter ‘state’ [-Wunused-parameter] remove_use_cb(nir_src *src, void *state) ^ nir/nir.c: In function ‘remove_def_cb’: nir/nir.c:811:37: warning: unused parameter ‘state’ [-Wunused-parameter] remove_def_cb(nir_dest *dest, void *state) ^ Number of total warnings in my build reduced from 2543 to 2538 (reduction of 5). Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* nir: glsl_get_bit_size() should take glsl_typeRob Clark2016-05-121-8/+8
| | | | | | | | It's what all the call-sites once, so gets rid of a bunch of inlined glsl_get_base_type() at the call-sites. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: move callsite of lower_outputs_to_temporariesRob Clark2016-05-111-2/+0
| | | | | | | | | | Going to convert this pass to parameterized lower_io_to_temporaries, and we want the user to be able to specify whether to lower outputs or inputs or both. The restriction of running this pass before validate to avoid output reads no longer applies. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* Revert "nir: Try to warn when C99 extensions are used in nir headers."Jose Fonseca2016-05-101-22/+1
| | | | | | | | | | This reverts commit 99474dc29b0f45413d0e538d7321da9ad4c9f6f5. -Wpedantic is too verbose, even when applied to just a few includes. We'll just have to deal with the issues as they come. Reviewed-by: Brian Paul <[email protected]>
* nir: Try to warn when C99 extensions are used in nir headers.Jose Fonseca2016-04-281-1/+22
| | | | | | | | | | | | | | Ideally we'd have nir.h being included with -Wpedantic too, but it fails with: src/compiler/nir/nir.h:754:20: warning: ISO C++ forbids zero-size array ‘src’ [-Wpedantic] nir_alu_src src[]; ^ In file included from src/compiler/nir/glsl_to_nir.cpp:42:0: src/compiler/nir/nir.h:919:16: warning: ISO C++ forbids zero-size array ‘src’ [-Wpedantic] nir_src src[]; Reviewed-by: Connor Abbott <[email protected]>
* nir: Remove spurious ; after namespace.Jose Fonseca2016-04-281-1/+1
| | | | | | Makes -pedantic happy. Reviewed-by: Connor Abbott <[email protected]>
* nir: add support for (un)pack_double_2x32Connor Abbott2016-04-111-0/+6
| | | | | | | | v2 (Sam): - Use uint64 instead of float64 for sources and destinations. (Connor) Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: add i2d and u2d opcodesIago Toral Quiroga2016-04-111-0/+8
| | | | | | | v2: - Assert supports_int and don't fallback to nir_fmov (Jason) Reviewed-by: Jason Ekstrand <[email protected]>
* nir: add d2i, d2u, d2b opcodesIago Toral Quiroga2016-04-111-0/+3
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir: add support for d2f and f2dConnor Abbott2016-04-111-0/+2
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/glsl_to_nir: set bit_size on ssbo_load resultIago Toral Quiroga2016-04-111-2/+3
| | | | | | | v2 (Sam): - Add missing bit_size assignment when ssbo_load destination is a boolean. Reviewed-by: Jason Ekstrand <[email protected]>
* nir/glsl_to_nir: add bit-size info to add_instr()Samuel Iglesias Gonsálvez2016-04-111-10/+14
| | | | | Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir/glsl_to_nir: support doublesConnor Abbott2016-04-111-26/+38
| | | | | | | | v2: - Don't set sized types to the destination of texture related opcodes. (Jason) Reviewed-by: Jason Ekstrand <[email protected]>
* nir: add bit_size info to nir_ssa_undef_instr_create()Samuel Iglesias Gonsálvez2016-04-111-1/+1
| | | | | | | | v2: - Make the users to give the right bit_sizes as arguments (Jason). Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_out_to_temp: Add an "entrypoint" parameterJason Ekstrand2016-03-281-1/+1
| | | | | | | | Previously, the pass assumed that the entrypoint would be whatever function happened to have the name "main". We really shouldn't trust in the function names. Reviewed-by: Rob Clark <[email protected]>
* nir/glsl: Propagate invariant into NIR alu opsJason Ekstrand2016-03-231-0/+3
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* nir: add a bit_size parameter to nir_ssa_dest_initConnor Abbott2016-03-171-9/+13
| | | | | | | | | | | | | | | | | | | | | | v2: Squash multiple commits addressing the new parameter in different files so we don't break the build (Iago) v3: Fix tgsi (Samuel) v4: Fix nir_clone.c (Samuel) v5: Fix vc4 and freedreno (Iago) v6 (Sam) - Fix build errors in nir_lower_indirect_derefs - Use helper to get type size from nir_alu_type. Signed-off-by: Iago Toral Quiroga <[email protected]> Signed-off-by: Samuel Iglesias Gonsalvez <[email protected]> Tested-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]>
* nir/glsl: Remove dead function parameter handling codeJason Ekstrand2016-03-121-46/+5
| | | | | | | | | NIR has never been used on IR where we haven't already done function inlining so this code has been dead from the beginning. Let's just get rid of it for now. We can always put it back in if we decide to use NIR for function inlining at some point in the future. Reviewed-by: Jordan Justen <[email protected]>
* nir: Remove the const_offset from nir_tex_instrJason Ekstrand2016-02-101-11/+5
| | | | | | | | | | | When NIR was originally drafted, there was no easy way to determine if something was constant or not. The result was that we had lots of special-casing for constant values such as this. Now that load_const instructions are SSA-only, it's really easy to find constants and this isn't really needed anymore. Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* nir/tex_instr: Rename sampler to textureJason Ekstrand2016-02-091-1/+1
| | | | | | | | | We're about to separate the two concepts. When we do, the sampler will become optional. Doing a rename first makes the separation a bit more safe because drivers that depend on GLSL or TGSI behaviour will be fine to just use the texture index all the time. Reviewed-by: Kenneth Graunke <[email protected]>
* gtn: use const_index helpersRob Clark2016-02-091-8/+9
| | | | | Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* nir: remove unused nir_variable fieldsTimothy Arceri2016-02-091-2/+0
| | | | | | | These are used in GLSL IR to removed unused varyings and match transform feedback variables. There is no need to use these in NIR. Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: Remove 2x16 half-precision pack/unpack opcodes.Matt Turner2016-02-011-9/+0
| | | | | | i965/fs was the only consumer, and we're now doing the lowering in NIR. Reviewed-by: Iago Toral Quiroga <[email protected]>
* glsl: move to compiler/Emil Velikov2016-01-261-3/+3
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>
* nir: move to compiler/Emil Velikov2016-01-261-0/+2031
Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Jose Fonseca <[email protected]>