c4ccdfa51359362d90c0f825811928103bb3f7f9 |
|
24-Dec-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/lower_io: Use the builder instead of carrying a mem_ctx Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
663b2e9a92f152c314f611526b8a16ff4c06249f |
|
04-Oct-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Add a "compact array" flag and IO lowering code. Certain built-in arrays, such as gl_ClipDistance[], gl_CullDistance[], gl_TessLevelInner[], and gl_TessLevelOuter[] are specified as scalar arrays. Normal scalar arrays are sparse - each array element usually occupies a whole vec4 slot. However, most hardware assumes these built-in arrays are tightly packed. The new var->data.compact flag indicates that a scalar array should be tightly packed, so a float[4] array would take up a single vec4 slot, and a float[8] array would take up two slots. They are still arrays, not vec4s, however. nir_lower_io will generate intrinsics using ARB_enhanced_layouts style component qualifiers. v2: Add nir_validate code to enforce type restrictions. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
ad9d4a4f8d57725305ab767551bf6a89b69c11e1 |
|
26-Sep-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Generalize the "is per-vertex variable?" helpers and export them. I want this function for nir_gather_info(), and realized it's basically the same as the ones in nir_lower_io(). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
2e423ca1477bd212c01676c5e4828ebdb83310d8 |
|
25-Oct-2016 |
Timothy Arceri <timothy.arceri@collabora.com> |
nir: stop adjusting driver location for varying packing As of 59864e8e020 we just use the location assigned by the front-end and no longer need this for i965. Since there were some issues in the logic with assigning arrays the same driver location if they didn't start at the same location just remove it and let other drivers implement a solution if needed when they add ARB_enhanced_layouts support. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
ae032e5ea61dac3c63d74056174939e5ec091629 |
|
06-Oct-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Remove some no longer needed asserts Now that the NIR casting functions have type assertions, we have a bunch of assertions that aren't needed anymore. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
28ab2570c8994993acf199e6c728c0f316bf253a |
|
05-Oct-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Use the correct infos structure for copying atomic sources Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Tested-by: Mark Janes <mark.a.janes@intel.com> Cc: "12.0" <mesa-dev@lists.freedestkop.org>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
ed65e6ef49e17e9cae93a8f98e2968346de2bc6e |
|
14-Sep-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a flag to lower_io to force "sample" interpolation Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
0ba7288376dc66f932336862c8a6abb629b47686 |
|
22-Jul-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Lower interp_var_at_* like a normal load_var for flat inputs. "flat centroid" and "flat sample" both just mean "flat", so we should ignore interpolateAtCentroid/Sample and just return the flat value. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97032 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
cba6657d8ba57fddf72bbe3c96e8aee997a1527d |
|
19-Jul-2016 |
Timothy Arceri <timothy.arceri@collabora.com> |
nir: add doubles component packing support This makes sure we give the correct driver location for doubles when using component packing. Specifically it handles packing a dvec3 with a double which is the only packing scenario allowed which spans across two locations. Acked-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
707ca00fce464af84212fa1fff573f5814a8c118 |
|
12-Jul-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Add nir_load_interpolated_input lowering code. Now nir_lower_io can optionally produce load_interpolated_input and load_barycentric_* intrinsics for fragment shader inputs. flat inputs continue using regular load_input. v2: Use a nir_shader_compiler_options flag rather than ad-hoc boolean passing (in response to review feedback from Chris Forbes). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chris Forbes <chrisforbes@google.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
249646247996d9950584bbd34067a27b8b704a6f |
|
12-Jul-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Add new intrinsics for fragment shader input interpolation. Backends can normally handle shader inputs solely by looking at load_input intrinsics, and ignore the nir_variables in nir->inputs. One exception is fragment shader inputs. load_input doesn't capture the necessary interpolation information - flat, smooth, noperspective mode, and centroid, sample, or pixel for the location. This means that backends have to interpolate based on the nir_variables, then associate those with the load_input intrinsics (say, by storing a map of which variables are at which locations). With GL_ARB_enhanced_layouts, we're going to have multiple varyings packed into a single vec4 location. The intrinsics make this easy: simply load N components from location <loc, component>. However, working with variables and correlating the two is very awkward; we'd much rather have intrinsics capture all the necessary information. Fragment shader input interpolation typically works by producing a set of barycentric coordinates, then using those to do a linear interpolation between the values at the triangle's corners. We represent this by introducing five new load_barycentric_* intrinsics: - load_barycentric_pixel (ordinary variable) - load_barycentric_centroid (centroid qualified variable) - load_barycentric_sample (sample qualified variable) - load_barycentric_at_sample (ARB_gpu_shader5's interpolateAtSample()) - load_barycentric_at_offset (ARB_gpu_shader5's interpolateAtOffset()) Each of these take the interpolation mode (smooth or noperspective only) as a const_index, and produce a vec2. The last two also take a sample or offset source. We then introduce a new load_interpolated_input intrinsic, which is like a normal load_input intrinsic, but with an additional barycentric coordinate source. The intention is that flat inputs will still use regular load_input intrinsics. This makes them distinguishable from normal inputs that need fancy interpolation, while also providing all the necessary data. This nicely unifies regular inputs and interpolateAt functions. Qualifiers and variables become irrelevant; there are just load_barycentric intrinsics that determine the interpolation. v2: Document the interp_mode const_index value, define a new BARYCENTRIC() helper rather than using SYSTEM_VALUE() for some of them (requested by Jason Ekstrand). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chris Forbes <chrisforbes@google.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
f0f466214e65aa462f80d3608296685011862714 |
|
19-Jul-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Fix uninitialized use of 'replacement'. For intrinsics we don't care about, just skip to the next loop iteration and process the next instruction. We don't want to execute the rest of the code. This was a bug in commit cdfc05ea6e8c87876cdbf588aa8e03d70f3da4bb. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
aa6f60f844f3834fd89d35d8bfe6aa88a288d4fe |
|
16-Jul-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Use dest.ssa.num_components rather than intrin->num_components. I recently refactored this to share code between load and atomic lowering. loads used intrin->num_components, while atomics used intrin->dest.ssa.num_components. They should be equivalent, but Jason wanted me to use the latter. I missed applying his review. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
52e75dcb8c04c0dde989970c4c587cbe8313f7cf |
|
14-Jul-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Use nir_intrinsic_set_base in atomic lowering. This is more readable and also offers assertions that protect against setting const_index fields on the wrong kind of intrinsic. Suggested by Jason. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
50b9bb94219ae443d81cda1b15cda519d48dbdc7 |
|
12-Jul-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Split nir_lower_io's input/output/atomic handling into helpers. The original function was becoming a bit hard to read, with the details of creating and filling out load/store/atomic atomics all in one function. This patch makes helpers for creating each type of intrinsic, and also combines them with the *_op() helpers, as they're closely coupled and not too large. v2: Minor style nits from Jason. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
e12e4af780d8f8973021c43fe27d44fefca2df4c |
|
12-Jul-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Drop bogus nir_var_shader_in case in nir_lower_io's store_op(). This can't happen, the caller asserts that mode is shader_out or shared. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
cdfc05ea6e8c87876cdbf588aa8e03d70f3da4bb |
|
12-Jul-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Share destination rewriting and replacement code in IO lowering. Both loads and atomics had identical code to rewrite destinations, and all cases had the same two lines to replace instructions. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
349fe79c9bc9bd20b877f0425763509208179b47 |
|
12-Jul-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Share get_io_offset handling in nir_lower_io. The load/store/atomic cases all duplicated the get_io_offset code, with a few tiny differences: stores didn't bother checking for per-vertex inputs, because they can't be stored to, and atomics didn't check at all, since shared variables aren't per-vertex. However, it's harmless to check, and allows us to share more code. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
7171a9a87d001d4958a8fb14a78c8235ba4e7e26 |
|
12-Jul-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Make a 'var' temporary in nir_lower_io. Less typing and word wrapping issues than intrin->variables[0]->var. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
448adfbc67f4f6d0268a2f94dac311a26dc19864 |
|
18-May-2016 |
Timothy Arceri <timothy.arceri@collabora.com> |
nir: use the same driver location for packed varyings Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
0eea6b3297930d36cd510fa6b0e35c91935928f2 |
|
23-May-2016 |
Timothy Arceri <timothy.arceri@collabora.com> |
nir: add new intrinsic field for storing component offset This offset is used for packing. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
098166e1bc68860b2be9230e5241ead014bf254c |
|
25-Aug-2015 |
Ian Romanick <ian.d.romanick@intel.com> |
nir: Silence unused parameter warnings 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 <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
9464d8c49813aba77285e7465b96e92a91ed327c |
|
27-Apr-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Switch the arguments to nir_foreach_function This matches the "foreach x in container" pattern found in many other programming languages. Generated by the following regular expression: s/nir_foreach_function(\([^,]*\),\s*\([^,]*\))/nir_foreach_function(\2, \1)/ Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
707e72f13bb78869ee95d3286980bf1709cba6cf |
|
27-Apr-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Switch the arguments to nir_foreach_instr This matches the "foreach x in container" pattern found in many other programming languages. Generated by the following regular expression: s/nir_foreach_instr(\([^,]*\),\s*\([^,]*\))/nir_foreach_instr(\2, \1)/ and similar expressions for nir_foreach_instr_safe etc. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
c81ca60b41db4632237dc5facfe4e37e500a840a |
|
08-Apr-2016 |
Connor Abbott <cwabbott0@gmail.com> |
nir/lower_io: fixup for new foreach_block() Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
b6dc940ec273252678d40707d300851fa1c85ea5 |
|
13-Apr-2016 |
Connor Abbott <cwabbott0@gmail.com> |
nir: rename nir_foreach_block*() to nir_foreach_block*_call() Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
d7cddbd6d66120899ffcb5735ee436f13432ed64 |
|
14-Apr-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/lower_io: Add UBOs and SSBOs to get_io_offset_src Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
63101177f32e7ebcaa6c71e046b3e599d21a20b5 |
|
24-Nov-2015 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add another index to load_uniform to specify the range read Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
dd616cab0154c24a5ac274acd98ab12f52079d5d |
|
11-Apr-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/lower_io: Allow for a full bitmask of modes Acked-by: Eric Anholt <eric@anholt.net> Reviewed-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
3124ce699bb3844e793f00e00bfbea5c91744f90 |
|
17-Nov-2015 |
Connor Abbott <connor.w.abbott@intel.com> |
nir: add a bit_size parameter to nir_ssa_dest_init 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 <itoral@igalia.com> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Tested-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
b1e7cdfdcf744e083bca5afdc7537e1c4a4042af |
|
18-Jan-2016 |
Jordan Justen <jordan.l.justen@intel.com> |
nir: Lower shared var atomics during nir_lower_io Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
e3cbb9d37ce4e3efafce834deef3ce814c3777ce |
|
18-Jan-2016 |
Jordan Justen <jordan.l.justen@intel.com> |
nir: Add support for lowering load/stores of shared variables Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
ced8d3e7730777ea8a264d22f83b43f7b3a5c433 |
|
21-Jan-2016 |
Rob Clark <robclark@freedesktop.org> |
nir: use const_index helpers Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|
a39a8fbbaa129f4e52f2a3ad2747182e9a74d910 |
|
17-Jan-2016 |
Emil Velikov <emil.velikov@collabora.com> |
nir: move to compiler/ Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/compiler/nir/nir_lower_io.c
|