fd957b17511b9a7654e70e0f4a21c2c7547f95c6 |
|
08-Aug-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Introduce a nir_opt_move_comparisons() pass. This tries to move comparisons (a common source of boolean values) closer to their first use. For GPUs which use condition codes, this can eliminate a lot of temporary booleans and comparisons which reload the condition code register based on a boolean. V2: (Timothy Arceri) - fix move comparision for phis so we dont end up with: vec1 32 ssa_227 = phi block_34: ssa_1, block_38: ssa_240 vec1 32 ssa_235 = feq ssa_227, ssa_1 vec1 32 ssa_230 = phi block_34: ssa_221, block_38: ssa_235 - add nir_op_i2b/nir_op_f2b to the list of comparisons. V3: (Timothy Arceri) - tidy up suggested by Jason. - add inot/fnot to move comparison list V4: (Jason Ekstrand) - clean up move_comparison_source - get rid of the tuple - rework phi handling Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> [v1] Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
5297267a1c78d21486fbe8c2a584f53c4147c950 |
|
01-Oct-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Add a pass to lower TES patch_vertices intrinsics to a constant. In Vulkan, we always have both the TCS and TES available in the same pipeline, so we can simply use the TCS OutputVertices execution mode value as the TES PatchVertices built-in. For GLSL, we handle this in the linker. But we could use this pass in the case when both TCS and TES are linked together, if we wanted. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
27cf6a369fcec15a9f65837507f57dbd8bdfaaaa |
|
07-Dec-2016 |
Samuel Iglesias Gonsálvez <siglesias@igalia.com> |
nir: add nir_type_conversion_op() This function returns the nir_op corresponding to the conversion between the given nir_alu_type arguments. This function lacks support for integer-based types with bit_size != 32 and for float16 conversion ops. v2: - Improve readiness of the code and delete cases that don't happen now (Jason) Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
3a571fcc43e70731417f0b81cbce4b0a0c1be71d |
|
07-Dec-2016 |
Samuel Iglesias Gonsálvez <siglesias@igalia.com> |
nir: add nir_get_nir_type_for_glsl_type() v2 (Jason): - Refactor nir_get_nir_type_for_glsl_type() to avoid using unneeded helpers (Jason) v3: - Use return directly (Jason) Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
62332d139c8f6deb7fd8b72a48b34b4b652df7c1 |
|
10-Dec-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a local variable-based copy propagation pass Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
/external/mesa3d/src/compiler/nir/nir.h
|
47b54a6f747cf3025696a6c29b75940d78e05ecb |
|
24-Dec-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/lower_var_copies: Use a shader rather than a void *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.h
|
134a5ad31c8d39219f241f7a7cad246a6864c74b |
|
24-Dec-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Make nir_copy_deref follow the "clone" pattern We rename it to nir_deref_clone, re-order the sources to match the other clone functions, and expose nir_deref_var_clone. This past part, in particular, lets us get rid of quite a few lines since we no longer have to call nir_copy_deref and wrap it in deref_as_var. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
baf1aa1334c61d505cde7e132b5f1bf4fa44a22c |
|
14-Dec-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add foreach_register helper macros
/external/mesa3d/src/compiler/nir/nir.h
|
fb181196deac2e3a070c49a29803e53cc7cc7f9b |
|
14-Dec-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Rename convert_to_ssa lower_regs_to_ssa This matches the naming of nir_lower_vars_to_ssa, the other to-SSA pass.
/external/mesa3d/src/compiler/nir/nir.h
|
6d9f576b56e53e26315aa589c72f399dc29e9672 |
|
19-Dec-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a pass for moving SPIR-V continue blocks to the ends of loops When shaders come in from SPIR-V, we handle continue blocks by placing the contents of the continue inside of a "if (!first_iteration)". We do this so that we can properly handle the fact that continues in SPIR-V jump to the continue block at the end of the loop rather than jumping directly to the top of the loop like they do in NIR. In particular, the increment step of a simple for loop ends up in the continue block. This pass looks for this case in loops that don't actually have any continues and moves the continue contents to the end of the loop instead. We need this because loop unrolling doesn't work if the increment is inside of a condition. Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
/external/mesa3d/src/compiler/nir/nir.h
|
1111a05f90e27e9820dd187be16ae41335db6838 |
|
17-Dec-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add an optimization pass to remove trivial continues Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
/external/mesa3d/src/compiler/nir/nir.h
|
51daccb289eb6d39a2b399e6b0c38ec0b339643a |
|
15-Sep-2016 |
Timothy Arceri <timothy.arceri@collabora.com> |
nir: add a loop unrolling pass V2: - tidy ups suggested by Connor. - tidy up cloning logic and handle copy propagation based of suggestion by Connor. - use nir_ssa_def_rewrite_uses to fix up lcssa phis suggested by Connor. - add support for complex loop unrolling (two terminators) - handle case were the ssa defs use outside the loop is already a phi - support unrolling loops with multiple terminators when trip count is know for each terminator V3: - set correct num_components when creating phi in complex unroll - rewrite update remap table based on Jasons suggestions. - remove unrequired extract_loop_body() helper as suggested by Jason. - simplify the lcssa phi fix up code for simple loops as per Jasons suggestions. - use mem context to keep track of hash table memory as suggested by Jason. - move is_{complex,simple}_loop helpers to the unroll code - require nir_metadata_block_index - partially rewrote complex unroll to be simpler and easier to follow. V4: - use rzalloc() when creating nir_phi_src but not setting pred right away fixes regression cause by ralloc() no longer zeroing memory. V5: - simplify calling of complex_unroll() - use new loop terminator fields to get the break/continue from blocks and simplify loop unrolling code - handle slightly less trivial loop terminators. if branches can now have instructions but can only contain a single block. - use nir print type IR snippets in unroll function descriptions - add better explanation and variable for why we need to clone additional times when the second terminator it the limiting terminator. - partially convert out of ssa before unrolling loops (suggested by Jason) v6: - remove unused nir_builder - use Jasons new from ssa helper - tidy/fixup cursor use - unroll terminators that contain control flow correctly - unroll complex loops with control flow before the terminators correctly Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
ec8423a4b174450575152dfb3f9c80ba1b8729af |
|
29-Aug-2016 |
Thomas Helland <thomashelland90@gmail.com> |
nir: Add a LCSAA-pass V2: Do a "depth first search" to convert to LCSSA V3: Small comment fixup V4: Rebase, adapt to removal of function overloads V5: Rebase, adapt to relocation of nir to compiler/nir Still need to adapt to potential if-uses Work around nir_validate issue V6 (Timothy): - tidy lcssa and stop leaking memory - dont rewrite the src for the lcssa phi node - validate lcssa phi srcs to avoid postvalidate assert - don't add new phi if one already exists - more lcssa phi validation fixes - Rather than marking ssa defs inside a loop just mark blocks inside a loop. This is simpler and fixes lcssa for intrinsics which do not have a destination. - don't create LCSSA phis for loops we won't unroll - require loop metadata for lcssa pass - handle case were the ssa defs use outside the loop is already a phi V7: (Timothy) - pass indirect mask to metadata call v8: (Timothy) - make convert to lcssa a helper function rather than a nir pass - replace inside loop bitset with on the fly block index logic. - remove lcssa phi validation special cases - inline code from useless helpers, suggested by Jason. - always do lcssa on loops, suggested by Jason. - stop making lcssa phis special. Add as many source as the block has predecessors, suggested by Jason. V9: (Timothy) - fix regression with the is_lcssa_phi field not being initialised to false now that ralloc() doesn't zero out memory. V10: (Timothy) - remove extra braces in SSA example, pointed out by Topi V11: (Timothy) - add missing support for LCSSA phis in if conditions. V12: (Timothy) - small tidy up suggested by Jason. - always create lcssa phi even if it just points to an lcssa phi from an inner loop Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
6772a17acc8ee90f9398348251a4455f988208fd |
|
13-Dec-2016 |
Thomas Helland <thomashelland90@gmail.com> |
nir: Add a loop analysis pass This pass detects induction variables and calculates the trip count of loops to be used for loop unrolling. V2: Rebase, adapt to removal of function overloads V3: (Timothy Arceri) - don't try to find trip count if loop terminator conditional is a phi - fix trip count for do-while loops - replace conditional type != alu assert with return - disable unrolling of loops with continues - multiple fixes to memory allocation, stop leaking and don't destroy structs we want to use for unrolling. - fix iteration count bugs when induction var not on RHS of condition - add FIXME for && conditions - calculate trip count for unsigned induction/limit vars V4: (Timothy Arceri) - count instructions in a loop - set the limiting_terminator even if we can't find the trip count for all terminators. This is needed for complex unrolling where we handle 2 terminators and the trip count is unknown for one of them. - restruct structs so we don't keep information not required after analysis and remove dead fields. - force unrolling in some cases as per the rules in the GLSL IR pass V5: (Timothy Arceri) - fix metadata mask value 0x10 vs 0x16 V6: (Timothy Arceri) - merge loop_variable and nir_loop_variable structs and lists suggested by Jason - remove induction var hash table and store pointer to induction information in the loop_variable suggested by Jason. - use lowercase list_addtail() suggested by Jason. - tidy up init_loop_block() as per Jasons suggestions. - replace switch with nir_op_infos[alu->op].num_inputs == 2 in is_var_basic_induction_var() as suggested by Jason. - use nir_block_last_instr() in and rename foreach_cf_node_ex_loop() as suggested by Jason. - fix else check for is_trivial_loop_terminator() as per Connors suggetions. - simplify offset for induction valiables incremented before the exit conditions is checked. - replace nir_op_isub check with assert() as it should have been lowered away. V7: (Timothy Arceri) - use rzalloc() on nir_loop struct creation. Worked previously because ralloc() was broken and always zeroed the struct. - fix cf_node_find_loop_jumps() to find jumps when loops contain nested if statements. Code is tidier as a result. V8: (Timothy Arceri) - move is_trivial_loop_terminator() to nir.h so we can use it to assert is the loop unroll pass - fix analysis to not bail when looking for terminator when the break is in the else rather then the if - added new loop terminator fields: break_block, continue_from_block and continue_from_then so we don't have to gather these when doing unrolling. - get correct array length when forcing unrolling of variables indexed arrays that are the same size as the iteration count - add support for induction variables of type float - update trival loop terminator check to allow an if containing instructions as long as both branches contain only a single block. V9: (Timothy) - bunch of tidy ups and simplifications suggested by Jason. - rewrote trivial terminator detection, now the only restriction is there must be no nested jumps, anything else goes. - rewrote the iteration test to use nir_eval_const_opcode(). - count instruction properly even when forcing an unroll. - bunch of other tidy ups and simplifications. V10: (Timothy) - some trivial tidy ups suggested by Jason. - conditional fix for break inside continue branch by Jason. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
a620f66872c27fa24a1ccdd1d0a6e563eefbaad6 |
|
20-Dec-2016 |
Jason Ekstrand <jason@jlekstrand.net> |
nir: Add a couple quick-and-dirty out-of-SSA helpers These are designed for use within an optimization pass when SSA becomes more pain than it's worth. They're very naive and don't generate anything close to optimal register-based NIR. Also, they may result in shaders which do not validate because of, for instance, registers in phi sources. However, the register-based into-SSA pass should be pretty efficient at cleaning up the mess. Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
/external/mesa3d/src/compiler/nir/nir.h
|
5be2e785b1df2160424eb73e53cca340e0130020 |
|
30-Nov-2016 |
Iago Toral Quiroga <itoral@igalia.com> |
nir/lower_tex: add lowering for texture gradient on shadow samplers This is ported from the Intel lowering pass that we use with GLSL IR. This takes care of lowering texture gradients on shadow samplers other than cube maps. Intel hardware requires this for gen < 8. v2 (Ken): - Use the helper function to retrieve ddx/ddy - Swizzle away size components we are not interested in v3: - Get rid of the ddx/ddy helper and use nir_tex_instr_src_index instead (Ken, Eric) v4: - Add a 'continue' statement if the lowering makes progress because it replaces the original texture instruction Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v3)
/external/mesa3d/src/compiler/nir/nir.h
|
a8e740c3547b0209d04b505d95a79794db31ce0b |
|
30-Nov-2016 |
Iago Toral Quiroga <itoral@igalia.com> |
nir/lower_tex: add lowering for texture gradient on cube maps This is ported from the Intel lowering pass that we use with GLSL IR. The NIR pass only handles cube maps, not shadow samplers, which are also lowered for gen < 8 on Intel hardware. We will add support for that in a later patch, at which point we should be able to remove the GLSL IR lowering pass. v2: - added a helper to retrieve ddx/ddy parameters (Ken) - No need to make size.z=1.0, we are only using component x anyway (Iago) v3: - Get rid of the ddx/ddy helper and use nir_tex_instr_src_index instead (Ken, Eric) v4: - When emitting the textureLod operation, copy all texture parameters from the original textureGrad() (except for ddx/ddy) using a loop - Add a 'continue' statement if the lowering makes progress because it replaces the original texture instruction Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v3)
/external/mesa3d/src/compiler/nir/nir.h
|
fd249c803e3ae2acb83f5e3b7152728e73228b7b |
|
12-Dec-2016 |
Ilia Mirkin <imirkin@alum.mit.edu> |
treewide: s/comparitor/comparator/ git grep -l comparitor | xargs sed -i 's/comparitor/comparator/g' Just happened to notice this in a patch that was sent and included one of the tokens in question. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
/external/mesa3d/src/compiler/nir/nir.h
|
7db009b59ee9df3a106f2f7e440a3ff9223b268f |
|
16-Jul-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Remove some unused fields from nir_variable All of these are happily set from glsl_to_nir or spirv_to_nir but their values are never used for anything. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir.h
|
50e0b0bee3fb97089cf9913af7a0c980dfce6dce |
|
16-Jul-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Delete most of the constant_initializer support Constant initializers have been a constant (ha!) pain for quite some time. While they're useful from a language perspective, people writing passes or backends really don't want deal with them most of the time. This commit removes most of the constant initializer support from NIR. It is expected that you call nir_lower_constant_initializers VERY EARLY to ensure that they're gone before you do anything interesting. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir.h
|
f5232db9e5fb00efc094c5dd071da4be88527568 |
|
16-Jul-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a pass for lowering away constant initializers Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir.h
|
19a541f496aace95d6660ed7e216fecc8be2e49d |
|
30-Nov-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Get rid of nir_constant_data This has bothered me for about as long as NIR has been around. Why do we have two different unions for constants? No good reason other than one of them is a direct port from GLSL IR. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir.h
|
9a179f2db090bfb5643779ac84c2b61fe525a780 |
|
04-Oct-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: add a pass to compact clip/cull distances. v2: Use nir_is_per_vertex_io() rather than is_arrays_of_arrays(). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
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.h
|
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.h
|
b16dff2d88302e5113598a818d2f92f8af02cd79 |
|
02-Nov-2016 |
Dave Airlie <airlied@redhat.com> |
nir: add conditional discard optimisation (v4) This is ported from GLSL and converts if (cond) discard; into discard_if(cond); This removes a block, but also is needed by radv to workaround a bug in the LLVM backend. v2: handle if (a) discard_if(b) (nha) cleanup and drop pointless loop (Matt) make sure there are no dependent phis (Eric) v3: make sure only one instruction in the then block. v4: remove sneaky tabs, add cursor init (Eric) Reviewed-by: Eric Anholt <eric@anholt.net> Cc: "13.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/compiler/nir/nir.h
|
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.h
|
e1af20f18a86f52a9640faf2d4ff8a71b0a4fa9b |
|
13-Oct-2016 |
Timothy Arceri <timothy.arceri@collabora.com> |
nir/i965/anv/radv/gallium: make shader info a pointer When restoring something from shader cache we won't have and don't want to create a nir_shader this change detaches the two. There are other advantages such as being able to reuse the shader info populated by GLSL IR. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
094fe3a9591ce200162d955635eee577c13f9324 |
|
13-Oct-2016 |
Timothy Arceri <timothy.arceri@collabora.com> |
nir: move nir_shader_info to a common compiler header This will allow use to stop copying values between structs and will also simplify handling handling these values in the shader cache. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
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.h
|
2ed17d46de045404042f13c6591895a1cf31b167 |
|
06-Oct-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Make nir_foo_first/last_cf_node return a block instead One of NIR's invariants is that control flow lists always start and end with blocks. There's no good reason why we should return a cf_node from these functions since we know that it's always a block. Making it a block lets us remove a bunch of code. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
7a3bcadf4e665ff80775f520715061f4e3d63823 |
|
06-Oct-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add asserts to the casting functions This makes calling nir_foo_as_bar a bit safer because we're no longer 100% trusting in the caller to ensure that it's safe. The caller still needs to do the right thing but this ensures that we catch invalid casts with an assert rather than by reading garbage data. The one downside is that we do use the casts a bit in nir_validate and it's not a validate_assert. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
36f0f0318275f65f8744ec6f9471702e2f58e6d5 |
|
07-Sep-2016 |
Eric Anholt <eric@anholt.net> |
nir: Allow opt_peephole_sel to be more aggressive in flattening IFs. VC4 was running into a major performance regression from enabling control flow in the glmark2 conditionals test, because of short if statements containing an ffract. This pass seems like it was was trying to ensure that we only flattened IFs that should be entirely a win by guaranteeing that there would be fewer bcsels than there were MOVs otherwise. However, if the number of ALU ops is small, we can avoid the overhead of branching (which itself costs cycles) and still get a win, even if it means moving real instructions out of the THEN/ELSE blocks. For now, just turn on aggressive flattening on vc4. i965 will need some tuning to avoid regressions. It does looks like this may be useful to replace freedreno code. Improves glmark2 -b conditionals:fragment-steps=5:vertex-steps=0 from 47 fps to 95 fps on vc4. vc4 shader-db: total instructions in shared programs: 101282 -> 99543 (-1.72%) instructions in affected programs: 17365 -> 15626 (-10.01%) total uniforms in shared programs: 31295 -> 31172 (-0.39%) uniforms in affected programs: 3580 -> 3457 (-3.44%) total estimated cycles in shared programs: 225182 -> 223746 (-0.64%) estimated cycles in affected programs: 26085 -> 24649 (-5.51%) v2: Update shader-db output. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
/external/mesa3d/src/compiler/nir/nir.h
|
7bf76563e25222fa285cf9a19207318759588aac |
|
15-Sep-2016 |
Dave Airlie <airlied@redhat.com> |
glsl: add subpass image type (v2) SPIR-V/Vulkan have a special image type for input attachments called the subpass type. It has different characteristics than other images types. The main one being it can only be an input image to fragment shaders and loads from it are relative to the frag coord. This adds support for it to the GLSL types. Unfortunately we've run out of space in the sampler dim in types, so we need to use another bit. v2: Fixup subpass input name (Jason) Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/compiler/nir/nir.h
|
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.h
|
2d8a3fa7ea994ad02a40ff497109f966e3fcbeec |
|
14-Sep-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Report progress from nir_lower_phis_to_scalar. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/compiler/nir/nir.h
|
32630e211e60a2b41388d403cfbd4f43344d8590 |
|
14-Sep-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Report progress from nir_lower_alu_to_scalar. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/compiler/nir/nir.h
|
1a8424cebaeaf46a01000624a46764f3e84dad85 |
|
08-Sep-2016 |
Rob Clark <robdclark@gmail.com> |
nir: move tex_instr_remove_src I want to re-use this in a different pass, so move to nir.h Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
88a2a2e05302179c59e257533ed77d2d0a6a5021 |
|
10-Aug-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/gcm: Add global value numbering support Unlike the current CSE pass, global value numbering is capable of detecting common values even if one does not dominate the other. For instance, in you have if (...) { ssa_1 = ssa_0 + 7; /* use ssa_1 */ } else { ssa_2 = ssa_0 + 7; /* use ssa_2 */ } Global value numbering doesn't care about dominance relationships so it figures out that ssa_1 and ssa_2 are the same and converts this to if (...) { ssa_1 = ssa_0 + 7; /* use ssa_1 */ } else { /* use ssa_1 */ } Obviously, we just broke SSA form which is bad. Global code motion, however, will repair this for us by turning this into ssa_1 = ssa_0 + 7; if (...) { /* use ssa_1 */ } else { /* use ssa_1 */ } This intended to eventually mostly replace CSE. However, conventional CSE may still be useful because it's less of a scorched-earth approach and doesn't require GCM. This makes it a bit more appropriate for use as a clean-up in a late optimization run. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
356d101af35e27c7b5cdb0dbacb1152f901c085a |
|
03-Sep-2016 |
Connor Abbott <cwabbott0@gmail.com> |
nir: remove some fields from nir_shader_compiler_options I accidentally added these with 0dc4cab. Oops!
/external/mesa3d/src/compiler/nir/nir.h
|
0dc4cabee213135aa25bef9062366f251838dc16 |
|
03-Sep-2016 |
Connor Abbott <cwabbott0@gmail.com> |
nir: add nir_after_phis() cursor helper And re-implement nir_after_cf_node_and_phis() using it. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
93bfa1d7a2e70a72a01c48a04c208845c22f9376 |
|
25-Aug-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Change nir_shader_get_entrypoint to return an impl. Jason suggested adding an assert(function->impl) here. All callers of this function actually want ->impl, so I decided just to change the API. We also change the nir_lower_io_to_temporaries API here. All but one caller passed nir_shader_get_entrypoint(), and with the previous commit, it now uses a nir_function_impl internally. Folding this change in avoids the need to change it and change it back. v2: Fix one call I missed in ir3_compiler (caught by Eric). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
97ac3eba58a7d11e171475f4a209cfdb3578b21d |
|
20-Jul-2016 |
Francisco Jerez <currojerez@riseup.net> |
nir: Pass through fb_fetch_output and OutputsRead from GLSL IR. The NIR representation of framebuffer fetch is the same as the GLSL IR's until interface variables are lowered away, at which point it will be translated to load output intrinsics. The GLSL-to-NIR pass just needs to copy the bits over to the NIR program. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
9f1411d1ecc0029f4a6697849e657ac7b2a64f94 |
|
04-Aug-2016 |
Eric Anholt <eric@anholt.net> |
nir: Add an IO scalarizing pass using the intrinsic's first_component. vc4 wants to have per-scalar IO load/stores so that dead code elimination can happen on a more granular basis, which it has been doing in the backend using a multiplication by 4 of the intrinsic's driver_location. We can represent it properly in the NIR using the first_component field, though. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
24728637e2c006012e4c0a3d87629b53beaddd3b |
|
06-Aug-2016 |
Eric Anholt <eric@anholt.net> |
nir: Move the undef of nir_intrinsics.h macros to the .h. I wanted to include this from nir_builder as well, so it also needed the undefs. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
7603b4d3a182fe5d756ac9d7196134aa5c43dbea |
|
29-Jul-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Make nir_alu_srcs_equal non-static. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir.h
|
d1f6f656973a2e18641441e3c97b30799a82de52 |
|
27-Jun-2016 |
Matt Turner <mattst88@gmail.com> |
glsl: Separate overlapping sentinel nodes in exec_list. I do appreciate the cleverness, but unfortunately it prevents a lot more cleverness in the form of additional compiler optimizations brought on by -fstrict-aliasing. No difference in OglBatch7 (n=20). Co-authored-by: Davin McCall <davmac@davmac.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
d9156efc5292b4ac7cea9d12e68882fc7b5da5fd |
|
21-Jul-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/lower_tex: Add support for lowering coordinate offsets On i965, we can't support coordinate offsets for texelFetch or rectangle textures. Previously, we were doing this with a GLSL pass but we need to do it in NIR if we want those workarounds for SPIR-V. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "12.0" <mesa-dev@lists.freedesktop.org>
/external/mesa3d/src/compiler/nir/nir.h
|
09135cd55a05908a68e173e37e0f5c375f341776 |
|
04-May-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a helper for determining the type of a texture source Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "12.0" <mesa-dev@lists.freedesktop.org>
/external/mesa3d/src/compiler/nir/nir.h
|
dc9f2436c39d6539b56c9aedceefdc79566e5db8 |
|
16-Jul-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a nir_deref_foreach_leaf helper Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/compiler/nir/nir.h
|
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.h
|
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.h
|
ac1181ffbef5250cb3b651e047cce5116727c34c |
|
07-Jul-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
compiler: Rename INTERP_QUALIFIER_* to INTERP_MODE_*. Likewise, rename the enum type to glsl_interp_mode. Beyond the GLSL front-end, talking about "interpolation modes" seems more natural than "interpolation qualifiers" - in the IR, we're removed from how exactly the source language specifies how to interpolate an input. Also, SPIR-V calls these "decorations" rather than "qualifiers". Generated by: $ find . -regextype egrep -regex '.*\.(c|cpp|h)' -type f -exec sed -i \ -e 's/INTERP_QUALIFIER_/INTERP_MODE_/g' \ -e 's/glsl_interp_qualifier/glsl_interp_mode/g' {} \; Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Acked-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/compiler/nir/nir.h
|
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.h
|
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.h
|
60a27ad122128145d28be37e9c0b0bc86a8e5181 |
|
23-Jun-2016 |
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> |
Remove wrongly repeated words in comments Clean up misrepetitions ('if if', 'the the' etc) found throughout the comments. This has been done manually, after grepping case-insensitively for duplicate if, is, the, then, do, for, an, plus a few other typos corrected in fly-by v2: * proper commit message and non-joke title; * replace two 'as is' followed by 'is' to 'as-is'. v3: * 'a integer' => 'an integer' and similar (originally spotted by Jason Ekstrand, I fixed a few other similar ones while at it) Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
202751fbb7e3d35c1aa84f325f862245dab67f6c |
|
13-Jun-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a pass for propagating invariant decorations This pass is similar to propagate_invariance in the GLSL compiler. The real "output" of this pass is that any algebraic operations which are eventually consumed by an invariant variable get marked as "exact". Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
/external/mesa3d/src/compiler/nir/nir.h
|
4d3b8318a714c470d12636a41b08bd60688f6c3b |
|
02-Jun-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/info: Get rid of uses_interp_var_at_offset We were using this briefly in the i965 driver to trigger recompiles but we haven't been using it since we switched to the NIR y-transform lowering pass. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
dfbae7d64f4d563bc65af338cdcb217f10474c1c |
|
07-May-2016 |
Rob Clark <robclark@freedesktop.org> |
nir/algebraic: support for power-of-two optimizations Some optimizations, like converting integer multiply/divide into left/ right shifts, have additional constraints on the search expression. Like requiring that a variable is a constant power of two. Support these cases by allowing a fxn name to be appended to the search var expression (ie. "a#32(is_power_of_two)"). Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
6f316c9d8658e870b0140b0f601d35d1fcf133b9 |
|
23-May-2016 |
Jordan Justen <jordan.l.justen@intel.com> |
nir: Make lowering gl_LocalInvocationIndex optional Cc: "12.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
15e553daf0cd5fe70994b6ac5377ff11002357a3 |
|
27-May-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Make nir_const_value a union There's no good reason for it to be a struct of an anonymous union. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96221 Tested-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
a41b57679fd659dda1b6df3286b34c13cac7811a |
|
02-May-2016 |
Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com> |
nir: Add a lowering pass for YUV textures This lowers sampling from YUV textures to 1) one or more texture instructions to sample each plane and 2) color space conversion to RGB. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
29921ee987d8f2cc315c846dea958ab19b986ecd |
|
02-May-2016 |
Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com> |
nir: Add new 'plane' texture source type This will be used to select the plane to sample from for planar textures. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
6e5d86c07af920fa52afbe075a04116b9ebb3cc3 |
|
18-May-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Add a simple nir_lower_wpos_center() pass for Vulkan drivers. nir_lower_wpos_ytransform() is great for OpenGL, which allows applications to choose whether their coordinate system's origin is upper left/lower left, and whether the pixel center should be on integer/half-integer boundaries. Vulkan, however, has much simpler requirements: the pixel center is always half-integer, and the origin is always upper left. No coordinate transform is needed - we just need to add <0.5, 0.5>. This means that we can avoid using (and setting up) a uniform. I thought about adding more options to nir_lower_wpos_ytransform(), but making a new pass that never even touched uniforms seemed simpler. v2: Use normal iterator rather than _safe variant (noticed by Matt). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Acked-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
a0ef26c1c2f0fcdebfa2699817cf63f644df8155 |
|
14-May-2016 |
Rob Clark <robclark@freedesktop.org> |
nir/print: add support for print annotations Caller can pass a hashtable mapping NIR object (currently instr or var, but I guess others could be added as needed) to annotation msg to print inline with the shader dump. As the annotation msg is printed, it is removed from the hashtable to give the caller a way to know about any unassociated msgs. This is used in the next patch, for nir_validate to try to associate error msgs to nir_print dump. Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
80535873bbed9d6fda7bb0d2cca3d0950afb8431 |
|
15-Apr-2016 |
Juan A. Suarez Romero <jasuarez@igalia.com> |
nir: add double input bitmap This bitmap tracks which input attributes are double-precision. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
41915512624b26f10ebc2e7c41e9b982fb9208bb |
|
13-May-2016 |
Matt Turner <mattst88@gmail.com> |
nir: Mark nir_start_block()/nir_impl_last_block() with returns_nonnull. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
6d65b0c6dc0ef4fad319129fea5fd7b4ad940bec |
|
13-May-2016 |
Kenneth Graunke <kenneth@whitecape.org> |
nir: Add a nir->info.uses_interp_var_at_offset flag. 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 <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
79d6409a1467127daaea8a98e6d8c14779180a79 |
|
09-May-2016 |
Rob Clark <robclark@freedesktop.org> |
nir: return progress from lower_idiv With algebraic-opt support for lowering div to shift, the driver would like to be able to run this pass *after* the main opt-loop, and then conditionally re-run the opt-loop if this pass actually lowered some- thing. Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
f47faa431616b36ad0d3811d0bcdd24f8b77cef9 |
|
03-May-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add texture opcodes and source types for multisample compression Intel hardware does a form of multisample compression that involves an auxilary surface called the MCS. When an MCS is in use, you have to first sample from the MCS with a special opcode and then pass the result of that operation into the next sample instrucion. Normally, we just do this ourselves in the back-end, but we want to expose that functionality to NIR so that we can use MCS values directly in NIR-based blorp. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
a2f50d87b6e9d07c6974ef309cc99acf56b2dc09 |
|
10-May-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add an info bit for uses_sample_qualifier Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
1b72c31e1f1947123d8c236b56e230f030f60cf9 |
|
06-May-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/algebraic: Separate ffma lowering from fusing The i965 driver has its own pass for fusing mul+add combinations that's much smarter than what nir_opt_algebraic can do so we don't want to get the nir_opt_algebraic one just because we didn't set lower_ffma. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
dfbabc6bad775e1575ff4a97a3c871341cd57f77 |
|
25-Mar-2016 |
Rob Clark <robclark@freedesktop.org> |
nir/lower-io: add support for lowering inputs Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
b085016f94721a6c18f7076fc37c450a98e6bdbc |
|
25-Mar-2016 |
Rob Clark <robclark@freedesktop.org> |
nir: rename lower_outputs_to_temporaries -> lower_io_to_temporaries Since it will gain support to lower inputs, give it a more generic name. Signed-off-by: Rob Clark <robclark@freedesktop.org>
/external/mesa3d/src/compiler/nir/nir.h
|
5261947260bf63693fc13eaaf8a1e845ab130a57 |
|
25-Mar-2016 |
Rob Clark <robclark@freedesktop.org> |
nir: lower-io-types pass A pass to lower complex (struct/array/mat) inputs/outputs to primitive types. This allows, for example, linking that removes unused components of a larger type which is not indirectly accessed. In the near term, it is needed for gallium (mesa/st) support for NIR, since only used components of a type are assigned VBO slots, and we otherwise have no way to represent that to the driver backend. But it should be useful for doing shader linking in NIR. v2: use glsl_count_attribute_slots() rather than passing a type_size fxn pointer Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
b10cc245198d375b940a49b4f93a73bc75e47ce8 |
|
01-Feb-2016 |
Rob Clark <robclark@freedesktop.org> |
nir: passthrough-edgeflags support Handled by tgsi_emulate for glsl->tgsi case. Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/compiler/nir/nir.h
|
3a939d034e41755b46b51fbe9071f5d31cdf1f81 |
|
22-Dec-2015 |
Rob Clark <robclark@freedesktop.org> |
nir: add lowering pass for glBitmap Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/compiler/nir/nir.h
|
12c18ce4763d3982a52318365f45c4535aac0567 |
|
22-Dec-2015 |
Rob Clark <robclark@freedesktop.org> |
nir: add lowering pass for glDrawPixels Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/compiler/nir/nir.h
|
b26645a00f3bb3100cff167087f6bd84af150986 |
|
07-Nov-2015 |
Rob Clark <robclark@freedesktop.org> |
nir: add lowering pass for y-transform Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/compiler/nir/nir.h
|
4fab8dd5ea0730be7a484ed4b4bf80598c21cbfa |
|
13-Apr-2016 |
Connor Abbott <cwabbott0@gmail.com> |
nir: remove now-unused nir_foreach_block*_call() Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Connor Abbott <cwabbott0@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
2ab2d2e5881d289a8239467a97516e4e410cebfb |
|
28-Apr-2016 |
Samuel Iglesias Gonsálvez <siglesias@igalia.com> |
nir: Separate 32 and 64-bit fmod lowering Split 32-bit and 64-bit fmod lowering as the drivers might need to lower them separately inside NIR depending on the HW support. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
b902377a56b802d4fca95fb3733f47e466dfe501 |
|
12-Apr-2016 |
Samuel Iglesias Gonsálvez <siglesias@igalia.com> |
nir/lower_double_ops: lower mod() There are rounding errors with the division in i965 that affect the mod(x,y) result when x = N * y. Instead of returning '0' it was returning 'y'. This lowering pass fixes those cases. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
64abf6d404be9030d1232e1533a64edb09ad8b13 |
|
01-Feb-2016 |
Rob Clark <robclark@freedesktop.org> |
nir: clamp-color-output support Handled by tgsi_emulate for glsl->tgsi case. Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
70f89dd75ee7487d0143fa871bb20cbd29f54da0 |
|
27-Apr-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Switch the arguments to nir_foreach_def This matches the "foreach x in container" pattern found in many other programming languages. Generated by the following regular expression: s/nir_foreach_def(\([^,]*\),\s*\([^,]*\))/nir_foreach_def(\2, \1)/ Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
5015260a0598ada4865b2c6086fc669505f64749 |
|
27-Apr-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Switch the arguments to nir_foreach_use and friends This matches the "foreach x in container" pattern found in many other programming languages. Generated by the following regular expression: s/nir_foreach_use(\([^,]*\),\s*\([^,]*\))/nir_foreach_use(\2, \1)/ and similar expressions for nir_foreach_use_safe, etc. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
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.h
|
e63766fb4b54bc88756ee7e82c3ff8cec0dc5561 |
|
27-Apr-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Switch the arguments to nir_foreach_parallel_copy_entry This matches the "foreach x in container" pattern found in many other programming languages. Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
8564916d01b31ca5665a27366e483738541ba5a3 |
|
27-Apr-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Switch the arguments to nir_foreach_phi_src This matches the "foreach x in container" pattern found in many other programming languages. Generated by the following regular expression: s/nir_foreach_phi_src(\([^,]*\),\s*\([^,]*\))/nir_foreach_phi_src(\2, \1)/ and a similar expression for nir_foreach_phi_src_safe. Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
/external/mesa3d/src/compiler/nir/nir.h
|
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.h
|
db07b46f2cb89d96a17a28a0453a236451b560c7 |
|
26-Apr-2016 |
Samuel Iglesias Gonsálvez <siglesias@igalia.com> |
nir: Add lrp lowering for doubles in opt_algebraic Some hardware (i965 on Broadwell generation, for example) does not support natively the execution of lrp instruction with double arguments. Add 'lower_flrp64' flag to lower this instruction in that case. v2: - Rename lower_flrp_double to lower_flrp64 (Jason) - Fix typo (Jason) - Adapt the code to define bit_size information in the opcodes. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
443600d51e34576a7ee0060948e3d6f56b41b51d |
|
28-Apr-2016 |
Samuel Iglesias Gonsálvez <siglesias@igalia.com> |
nir: rename lower_flrp to lower_flrp32 A later patch will add lower_flrp64 option to NIR. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
072613b3f366d884f398166673d4fd24c166225d |
|
05-Jan-2016 |
Iago Toral Quiroga <itoral@igalia.com> |
nir/lower_double_ops: lower round_even() At least i965 hardware does not have native support for round_even() on doubles. Reviewed-by: Matt Turner <mattst88@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
bf91df7f7ff0c07e12d49a47df3b67ee149540f9 |
|
05-Jan-2016 |
Iago Toral Quiroga <itoral@igalia.com> |
nir/lower_double_ops: lower fract() At least i965 hardware does not have native support for fract() on doubles. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
126a1ac03f7c7d7cd01629c91725ffced06147a9 |
|
04-Jan-2016 |
Iago Toral Quiroga <itoral@igalia.com> |
nir/lower_double_ops: lower ceil() At least i965 hardware does not have native support for ceil on doubles. v2 (Sam): - Improve the lowering pass to remove one bcsel (Jason). Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
29541ec53175120f916a0ab74e5d82308aa9ef47 |
|
04-Jan-2016 |
Iago Toral Quiroga <itoral@igalia.com> |
nir/lower_double_ops: lower floor() At least i965 hardware does not have native support for floor on doubles. v2 (Sam): - Improve the lowering pass to remove one bcsel (Jason) Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
5fab3d178b7093b0f0e5e98f09052f401ac714ad |
|
04-Jan-2016 |
Iago Toral Quiroga <itoral@igalia.com> |
nir/lower_double_ops: lower trunc() At least i965 hardware does not have native support for truncating doubles. v2: - Simplified the implementation significantly. - Fixed the else branch, that was not doing what we wanted. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
2ea3649c63f39f07b9cebda1ef0569b7347ada93 |
|
31-Jul-2015 |
Connor Abbott <connor.w.abbott@intel.com> |
nir: add a pass to lower some double operations v2: Move to compiler/nir (Iago) v3: Use nir_imm_int() to load the constants (Sam) v4 (Sam): - Undo line-wrap (Jason). - Fix comment (Jason). - Improve generated code for get_signed_inf() function (Connor). Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
122d27e9981342dc267c5aebf1a8dd8ce30689ce |
|
08-Apr-2016 |
Connor Abbott <cwabbott0@gmail.com> |
nir: rewrite nir_foreach_block and friends Previously, these were functions which took a callback. This meant that the per-block code had to be in a separate function, and all the data that you wanted to pass in had to be a single void *. They walked the control flow tree recursively, doing a depth-first search, and called the callback in a preorder, matching the order of the original source code. But since each node in the control flow tree has a pointer to its parent, we can implement a "get-next" and "get-previous" method that does the same thing that the recursive function did with no state at all. This lets us rewrite nir_foreach_block() as a simple for loop, which lets us greatly simplify its users in some cases. This does require us to rewrite every user, although the transformation from the old nir_foreach_block() to the new nir_foreach_block() is mostly trivial. One subtlety, though, is that the new nir_foreach_block() won't handle the case where the current block is deleted, which the old one could. There's a new nir_foreach_block_safe() which implements the standard trick for solving this. Most users don't modify control flow, though, so they won't need it. Right now, only opt_select_peephole needs it. The old functions are reimplemented in terms of the new macros, although they'll go away after everything is converted. v2: keep an implementation of the old functions around v3 (Jason Ekstrand): A small cosmetic change and a bugfix in the loop handling of nir_cf_node_cf_tree_last(). v4 (Jason Ekstrand): Use the _safe macro in foreach_block_reverse_call Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
d800b7daa5440f6b49b5e0ae6e404d240c6a4ddc |
|
09-Oct-2015 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a helper for figuring out what channels of an SSA def are read Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
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.h
|
eddfc977096c63dc9699b63b05ad0e1212680fb1 |
|
19-Apr-2016 |
Rob Clark <robclark@freedesktop.org> |
nir/lower-tex: add srgb->linear lowering Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
c825e29a826bf9f03303d1527a2aeef8bcd80dea |
|
25-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/intrinsics: Add a vulkan_resource_index intrinsic This is used to facilitate the Vulkan binding model where each resource is described by a (descriptor set, binding, array index) tuple. Reviewed-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
1e0012e3e41e09c33f7f9d6671a803b7b0a7d9b8 |
|
25-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a descriptor_set field to nir_variable This is needed for supporting the Vulkan binding model Reviewed-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
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.h
|
ba0c0e3940c904cd88d51a0dafc41cd91723877c |
|
13-Apr-2016 |
Jose Fonseca <jfonseca@vmware.com> |
nir: Avoid structure initalization expressions. Not supported by MSVC, and completely unnecessary -- inline functions work just as well. NIR_SRC_INIT/NIR_DEST_INIT could and probably should be replaced by the inline functions. Acked-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/compiler/nir/nir.h
|
b63a98b1211d22f759ae9c80b2270fe2d3b2639e |
|
25-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/dead_variables: Configurably work with any variable mode The old version of the pass only worked on globals and locals and always left inputs, outputs, uniforms, etc. alone. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
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.h
|
2caaf0ac5e0266c69e64309af9307e422e48b44d |
|
11-Apr-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/lower_indirect: nir_variable_mode is now a bitfield 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.h
|
ffa0e12e15bdfd0116446bfc5697e9e250770981 |
|
11-Apr-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Convert nir_variable_mode to a bitfield There are several passes where we need to specify some set of variable modes that the pass needs top operate on. This lets us easily do that. 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.h
|
a9e6213edd757980475167331bda15c3970a538d |
|
25-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/lower_system_values: Add support for several computed values Reviewed-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
a89c47415774fe9b5458a7ec7e072711e06201e6 |
|
12-Nov-2015 |
Connor Abbott <connor.w.abbott@intel.com> |
nir: add a pass for lowering (un)pack_double_2x32 v2: Undo unintended change to the signature of nir_normalize_cubemap_coords (Iago). v3: Move to compiler/nir (Iago) v4: Remove Authors from copyright header (Michael Schellenberger) v5 (Sam): - Use nir_channel() and nir_ssa_for_alu_src() helpers (Jason) - Inline lower_double_pack_instr() code into lower_double_pack_block() (Jason). - Initialize nir_builder at lower_double_pack_impl() (Jason). Signed-off-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
3663a2397e47da9b766b0c4239a8b74ac77b5d04 |
|
23-Mar-2016 |
Samuel Iglesias Gonsálvez <siglesias@igalia.com> |
nir: add bit_size info to nir_load_const_instr_create() Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
e3edaec739a72a36d54b60ddf5c952d377324f00 |
|
23-Mar-2016 |
Samuel Iglesias Gonsálvez <siglesias@igalia.com> |
nir: add bit_size info to nir_ssa_undef_instr_create() v2: - Make the users to give the right bit_sizes as arguments (Jason). Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
7d58cfa36680206f7b81d47c6507e0b56b8468c5 |
|
25-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a pass for gathering various bits of shader info Reviewed-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
35e2e96b307bcd6dd839a11e2bd98fa22bd4d50a |
|
25-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a helper for getting the current block from a cursor Reviewed-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
be98c475284823abdd9a6102c1c65ed548d9afd2 |
|
25-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/lower_out_to_temp: Add an "entrypoint" parameter 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 <robdclark@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
38de85f9a5f3daae65ebe715f29fe2783e4ea146 |
|
25-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a helper for getting the unique function in a shader Reviewed-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
da422663a6cacefcfae6be39154ab7598072cafa |
|
25-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a variable_foreach_safe helper Reviewed-by: Rob Clark <robdclark@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
22b343a8ec75a08dae6a6badbb261eab8437475d |
|
14-Feb-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a pass to inline functions This commit adds a new NIR pass that lowers all function calls away by inlining the functions. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
79dec93ead6e3b95b1240a9d843d617a88ee9179 |
|
14-Feb-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add return lowering pass This commit adds a NIR pass for lowering away returns in functions. If the return is in a loop, it is lowered to a break. If it is not in a loop, it's lowered away by moving/deleting code as needed. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
8d61d7252433a0470b441c70085391d3dd4c04bb |
|
28-Dec-2015 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a cursor helper for getting a cursor after any phi nodes Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
7022a673cd6b9e4bdd4c55fe1d7c76c04d27d4e6 |
|
26-Dec-2015 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a function for comparing cursors Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
364212f1ede4b2ecf4361e27e24e3d84e19aa54d |
|
13-Feb-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a pass to repair SSA form Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
4ff89377d96e0670bd4f5e149a6dc5955b6bb635 |
|
17-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add an "exact" bit to nir_alu_instr Reviewed-by: Francisco Jerez <currojerez@riseup.net>
/external/mesa3d/src/compiler/nir/nir.h
|
f849f53990c613a28c32826d09005e127adedeac |
|
23-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/clone: Export nir_variable_clone Reviewed-by: Rob Clark <robclark@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
5fe8959912f617fd0ada71f6b952e66305f48d67 |
|
31-Dec-2015 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/clone: Expose nir_constant_clone Reviewed-by: Rob Clark <robclark@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
c4c373f156a0b63a5789c0a8a3a1b641a58aa938 |
|
23-Mar-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Fix whitespace Reviewed-by: Rob Clark <robclark@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
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.h
|
084b24f5582567ebf5aa94b7f40ae3bdcb71316b |
|
16-Mar-2016 |
Iago Toral Quiroga <itoral@igalia.com> |
nir: rename nir_const_value fields to include bitsize information Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
/external/mesa3d/src/compiler/nir/nir.h
|
9076c4e289de0debf1fb2a7237bdeb9c11002347 |
|
14-Aug-2015 |
Connor Abbott <connor.w.abbott@intel.com> |
nir: update opcode definitions for different bit sizes Some opcodes need explicit bitsizes, and sometimes we need to use the double version when constant folding. v2: fix output type for u2f (Iago) v3: do not change vecN opcodes to be float. The next commit will add infrastructure to enable 64-bit integer constant folding so this is isn't really necessary. Also, that created problems with source modifiers in some cases (Iago) v4 (Jason): - do not change bcsel to work in terms of floats - leave ldexp generic Squashed changes to handle different bit sizes when constant folding since otherwise we would break the build. v2: - Use the bit-size information from the opcode information if defined (Iago) - Use helpers to get type size and base type of nir_alu_type enum (Sam) - Do not fallback to sized types to guess bit-size information. (Jason) Squashed changes in i965 and gallium/nir drivers to support sized types. These functions should only see sized types, but we can't make that change until we make sure that nir uses the sized versions in all the relevant places. A later commit will address this. Signed-off-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.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.h
|
6700d7e423bb2d7c5f0b46740bd92b5e65679eaf |
|
14-Aug-2015 |
Connor Abbott <connor.w.abbott@intel.com> |
nir: add nir_{src,dest}_bit_size() helpers v2: use a ternary (Jason) 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.h
|
e172dbe5d2e9a4effd92823cd8ebc342e0928a36 |
|
17-Nov-2015 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a bit_size to nir_register and nir_ssa_def This really hacky commit adds a bit size to registers and SSA values. It also adds rules in the validator to validate that they do the right things. It's still an open question as to whether or not we want a bit_size in nir_alu_instr or if we just want to let it inherit from the destination. I'm inclined to just let it inherit from the destination. A similar question needs to be asked about intrinsics. v2 (Connor): - Relax validation: comparisons have explicit destination sizes and implicit source sizes. v3 (Sam): - Use helpers to get size and base types of nir_alu_type enum. 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.h
|
78f19194295e3ea3cf219c15bf67dcab5dea4a34 |
|
15-May-2015 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add explicitly sized types v2: Fix size/type mask to properly handle 8-bit types. v3: Add helpers to get the bitsize and base type of a nir_alu_type enum. Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.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.h
|
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.h
|
3c807607df4ab457037f2daa5ea9e5ce18392b7b |
|
09-Jan-2016 |
Jordan Justen <jordan.l.justen@intel.com> |
nir: Add compute shader shared variable storage class Previously we were receiving shared variable accesses via a lowered intrinsic function from glsl. This change allows us to send in variables instead. For example, when converting from SPIR-V. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
98d58e73204a9ba84fb70ad29651659399dcc8bd |
|
13-Feb-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/clone: Add support for cloning a single function_impl Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
066d3c115ec80270bffc4981fadcc7534ca351cd |
|
28-Oct-2015 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a helper for creating a "bare" nir_function_impl Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
2ef4754a20be5fc7a6ecc2a8b6b8041637c998c6 |
|
12-Feb-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a new "param" variable mode for parameters and return variables Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/compiler/nir/nir.h
|
14b18aba89026204043d2e0d441e6be0e1af4aca |
|
14-Feb-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Add a pass for lower indirect variable dereferences This new pass lowers load/store_var intrinsics that act on indirect derefs to if-ladder of direct load/store_var intrinsics. The if-ladders perform a simple binary search on the indirect. Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
8750299a420af76cebd3067f6f603eacde06ae06 |
|
09-Feb-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Remove the const_offset from nir_tex_instr 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 <cwabbott0@gmail.com> Reviewed-by: Rob Clark <robclark@gmail.com>
/external/mesa3d/src/compiler/nir/nir.h
|
5ec456375e4fdd0b6c7d797f99191044e19ead74 |
|
03-Nov-2015 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir: Separate texture from sampler in nir_tex_instr This commit adds the capability to NIR to support separate textures and samplers. As it currently stands, glsl_to_nir only sets the texture deref and leaves the sampler deref alone as it did before and nir_lower_samplers assumes this. Backends can still assume that they are combined and only look at only at the texture index. Or, if they wish, they can assume that they are separate because nir_lower_samplers, tgsi_to_nir, and prog_to_nir all set both texture and sampler index whenever a sampler is required (the two indices are the same in this case). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
ee85014b90af1d94d637ec763a803479e9bac5dc |
|
06-Feb-2016 |
Jason Ekstrand <jason.ekstrand@intel.com> |
nir/tex_instr: Rename sampler to texture 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 <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
1df3ecc1b87d95130165283154a13ea5b9a498d4 |
|
14-Jan-2016 |
Rob Clark <robclark@freedesktop.org> |
nir: const_index helpers Direct access to intr->const_index[n], where different slots have different meanings, is somewhat confusing. Instead, let's put some extra info in nir_intrinsic_infos[] about which slots map to what, and add some get/set helpers. The helpers validate that the field being accessed (base/writemask/etc) is applicable for the intrinsic opc, for some extra safety. And nir_print can use this to dump out decoded const_index fields. Signed-off-by: Rob Clark <robclark@freedesktop.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
/external/mesa3d/src/compiler/nir/nir.h
|
1aae5e8cedcb4b9635965d784f3e3803007b2047 |
|
02-Feb-2016 |
Timothy Arceri <timothy.arceri@collabora.com> |
nir: remove unused nir_variable fields 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 <kenneth@whitecape.org>
/external/mesa3d/src/compiler/nir/nir.h
|
955d0520585f6f774b132647519b1ffaa152f8e8 |
|
25-Jan-2016 |
Matt Turner <mattst88@gmail.com> |
nir: Add lowering support for unpacking opcodes. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir.h
|
9b8786eba95532d53c45d52059a44abd7ee93530 |
|
25-Jan-2016 |
Matt Turner <mattst88@gmail.com> |
nir: Add lowering support for packing opcodes. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir.h
|
68f8c5730bef7b93fd235ae2f3c87cc9403b5b4c |
|
21-Jan-2016 |
Matt Turner <mattst88@gmail.com> |
nir: Add opcodes to extract bytes or words. The uint versions zero extend while the int versions sign extend. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir.h
|
9ce901058f3d08031d486da7f0f8b86ea351ef69 |
|
22-Jan-2016 |
Matt Turner <mattst88@gmail.com> |
nir: Add lowering of nir_op_unpack_half_2x16. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
/external/mesa3d/src/compiler/nir/nir.h
|
eb63640c1d38a200a7b1540405051d3ff79d0d8a |
|
17-Jan-2016 |
Emil Velikov <emil.velikov@collabora.com> |
glsl: 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.h
|
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.h
|