summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-04-29i965/eu: Allow 3-src float ops with doublesTopi Pohjolainen1-6/+18
v2: - set 3src_src_type for BRW_REGISTER_TYPE_DF (Connor) Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2016-04-29i965/disasm: fix disasm of 3-src doublesConnor Abbott1-0/+1
2016-04-29i965: Tell backend register about double precision typeTopi Pohjolainen1-1/+2
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Signed-off-by: Tapani P\344lli <tapani.palli@intel.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2016-04-29i965: Determine size of double precision float registerTopi Pohjolainen1-0/+1
This is used to determine how many registers an instruction reads and writes as well as for offseting register region into a desired component. v2 (Connor): rebase on master Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Signed-off-by: Tapani P\344lli <tapani.palli@intel.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2016-04-29i965: Lower DFRACEXP/DLDEXPTopi Pohjolainen1-0/+1
v2 (Connor): rebase on master which moved this to brw_link.cpp v3 (Sam): - Only enable DFREXP_DLDEXP_TO_ARITH in process_glsl_ir(). This is used for doubles. Single floating point op is lowered by NIR. Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2016-04-29i965: use pack/unpackDouble loweringConnor Abbott1-0/+1
2016-04-29i965: use double lowering passConnor Abbott2-0/+10
v2: also lower trunc, ceil, floor, fract and roundEven (Iago) v3: also lower mod for doubles (Sam) Signed-off-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2016-04-29freedreno/ir3: lower lrp when operating with double operandsSamuel Iglesias Gonsálvez1-0/+1
Lower lrp when operating with double operands because float version of lrp is also lowered. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> CC: Rob Clark <robdclark@gmail.com>
2016-04-29vc4: lower lrp when operating with double operandsSamuel Iglesias Gonsálvez1-0/+1
Lower lrp when operating with double operands because float version of lrp is also lowered. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> CC: Eric Anholt <eric@anholt.net>
2016-04-29i965: enable lrp lowering for doublesSamuel Iglesias Gonsálvez1-0/+1
Broadwell and previous generations does not support lrp instruction operating with doubles. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2016-04-29nir/opt_algebraic: lower mod() with doubles operands if lower_fmod64 is enabledSamuel Iglesias Gonsálvez2-1/+4
Make this distintion as the drivers might need to lower it inside NIR. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2016-04-29mesa: rename lower_fmod to lower_fmod32Samuel Iglesias Gonsálvez3-4/+4
A later patch will add lower_fmod64 option to NIR. Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2016-04-29nir/lower_double_ops: lower mod()Samuel Iglesias Gonsálvez2-1/+31
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>
2016-04-29glsl: Checks for interpolation into its own function.Andres Gomez1-145/+171
This generalizes the validation also to be done for variables inside interface blocks, which, for some cases, was missing. For a discussion about the additional validation cases included see https://lists.freedesktop.org/archives/mesa-dev/2016-March/109117.html and Khronos bug #15671. Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Andres Gomez <agomez@igalia.com>
2016-04-28nir/algebraic: Support lowering for both 64 and 32-bit ldexpJason Ekstrand1-9/+22
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2016-04-28nir/opcodes: Make ldexp take an explicitly 32-bit intJason Ekstrand2-2/+2
There is no sense in having the double version of ldexp take a 64-bit integer. Instead, let's just take a 32-bit int all the time. This also matches what GLSL does where both variants of ldexp take a regular integer for the exponent argument. Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2016-04-28nir/opcodes: Simplify the expressions for [un]pack_doubleJason Ekstrand1-61/+8
The new expressions are more explicit in terms of where the bits go so it's a little easier to tell what's going on. This is the way GLSL specifies things so it's a bit easier to verify too. It also has the benifit that the new expressions easily vectorize so we can constant-fold vector forms of the _split versions correctly. Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
2016-04-28mesa: Fix indirect draw buffer size check on 32-bit systems.Kenneth Graunke1-1/+1
Fixes dEQP-GLES31.functional subtests: draw_indirect.negative.command_offset_not_in_buffer_signed32_wrap draw_indirect.negative.command_offset_not_in_buffer_unsigned32_wrap These tests use really large values that overflow GLsizeiptr, at which point the buffer size isn't less than "end". Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95138 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Reviewed-by: Mark Janes <mark.a.janes@intel.com>
2016-04-28nir: Switch the arguments to nir_foreach_defJason Ekstrand4-5/+5
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>
2016-04-28nir: Switch the arguments to nir_foreach_use and friendsJason Ekstrand12-27/+27
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>
2016-04-28nir: Switch the arguments to nir_foreach_functionJason Ekstrand61-77/+77
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>
2016-04-28nir: Switch the arguments to nir_foreach_parallel_copy_entryJason Ekstrand4-7/+7
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>
2016-04-28nir: Switch the arguments to nir_foreach_phi_srcJason Ekstrand15-23/+23
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>
2016-04-28nir: Switch the arguments to nir_foreach_instrJason Ekstrand65-106/+106
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>
2016-04-28anv/lower_push_constants: fixup for nir_foreach_block()Jason Ekstrand1-22/+18
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28anv/apply_pipeline_layout: fixup for nir_foreach_block()Jason Ekstrand1-22/+19
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28anv/apply_dynamic_offsets: fixup for nir_foreach_block()Jason Ekstrand1-33/+22
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28i965/nir: fixup for new foreach_block()Connor Abbott6-80/+69
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/algebraic: fixup for new foreach_block()Connor Abbott1-20/+14
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/validate: fixup for new foreach_block()Connor Abbott1-10/+4
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/nir_worklist: fixup for new foreach_block()Connor Abbott1-9/+3
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/remove_dead_variables: fixup for new foreach_block()Connor Abbott1-28/+20
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/split_var_copies: fixup for new foreach_block()Connor Abbott1-4/+4
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/repair_ssa: fixup for new foreach_block()Connor Abbott1-11/+5
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/opt_peephole_select: fixup for new foreach_block()Connor Abbott1-23/+14
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/phi_builder: fixup for new foreach_block()Connor Abbott1-9/+3
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/opt_cp: fixup for new foreach_block()Connor Abbott1-18/+10
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/opt_remove_phis: fixup for new foreach_block()Connor Abbott1-5/+7
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/opt_undef: fixup for new foreach_block()Connor Abbott1-15/+8
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/opt_dead_cf: fixup for new foreach_block()Connor Abbott1-22/+21
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/opt_dce: fixup for new foreach_block()Connor Abbott1-20/+13
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/opt_gcm: fixup for new foreach_block()Connor Abbott1-4/+5
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/opt_constant_folding: fixup for new foreach_block()Connor Abbott1-15/+13
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/lower_samplers: fixup for new foreach_block()Connor Abbott1-28/+8
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/normalize_cubemap_coords: fixup for new foreach_block()Connor Abbott1-15/+11
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/lower_var_copies: fixup for new foreach_block()Connor Abbott1-19/+15
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/move_vec_src_uses_to_dest: fixup for new foreach_block()Connor Abbott1-2/+5
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/lower_vars_to_ssa: fixup for new foreach_block()Connor Abbott1-5/+9
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/lower_vec_to_movs: fixup for new foreach_block()Connor Abbott1-14/+10
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2016-04-28nir/lower_idiv: fixup for new foreach_block()Connor Abbott1-14/+7
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>