aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* st/glsl_to_tgsi: reduce stack explosion in recursive expression visitorNicolai Hähnle2016-04-292-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | In optimized builds, visit(ir_expression *) experiences inlining with gcc that leads the function to have a roughly 32KB stack frame. This is a problem given that the function is called recursively. In non-optimized builds, the stack frame is much smaller, hence one gets crashes that happen only in optimized builds. Arguably there is a compiler bug or at least severe misfeature here. In any case, the easy thing to do for now seems to be moving the bulk of the non-recursive code into a separate function. This is sufficient to convince my version of gcc not to blow up the stack frame of the recursive part. Just to be sure, add the gcc-specific noinline attribute to prevent this bug from reoccuring if inliner heuristics change. v2: put ATTRIBUTE_NOINLINE into macros.h Cc: "11.1 11.2" <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95133 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95026 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92850 Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* tgsi/text: fix parsing of memory instructionsNicolai Hähnle2016-04-291-13/+27
| | | | | | | Properly handle Target and Format parameters when present. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* tgsi/text: add str_match_name_from_arrayNicolai Hähnle2016-04-291-0/+18
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* tgsi/text: add str_match_format helper functionNicolai Hähnle2016-04-291-9/+22
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* tgsi/build: pass Memory.Texture and .Format through tgsi_build_full_instructionNicolai Hähnle2016-04-291-2/+6
| | | | | Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* tgsi/dump: signal nospace when the last print exceeded the sizeNicolai Hähnle2016-04-291-4/+6
| | | | | | | Previously, there was a bug where nospace wasn't signalled if it just so happened that the very last print exceeded the available space. Reviewed-by: Dave Airlie <[email protected]>
* tgsi/dump: shared dump_ctx initializationNicolai Hähnle2016-04-291-31/+17
| | | | Reviewed-by: Dave Airlie <[email protected]>
* st/omx: don't return early in vid_enc_EncodeFrame()Emil Velikov2016-04-291-1/+2
| | | | | | | | | | | | | | Earlier commit plugged a memory leak, although it missed a pair of brackets. Thus we unconditionally returned even in the case of no error. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95203 Fixes: b87856d25d1 ("st/omx: Fix resource leak on OMX_ErrorNone") Tested-by: Andy Furniss <[email protected]> Acked-by: Robert Foss <[email protected]> Signed-off-by: Emil Velikov <[email protected]> --- What an embarassing bug - missing brackets. Andy can you confirm that it resolves the issue ?
* glsl: Checks for interpolation into its own function.Andres Gomez2016-04-291-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 <[email protected]> Signed-off-by: Andres Gomez <[email protected]>
* nir/algebraic: Support lowering for both 64 and 32-bit ldexpJason Ekstrand2016-04-281-9/+22
| | | | Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
* nir/opcodes: Make ldexp take an explicitly 32-bit intJason Ekstrand2016-04-282-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 <[email protected]>
* nir/opcodes: Simplify the expressions for [un]pack_doubleJason Ekstrand2016-04-281-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 <[email protected]>
* mesa: Fix indirect draw buffer size check on 32-bit systems.Kenneth Graunke2016-04-281-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 <[email protected]> Reviewed-by: Alejandro Piñeiro <[email protected]> Reviewed-by: Mark Janes <[email protected]>
* nir: Switch the arguments to nir_foreach_defJason Ekstrand2016-04-284-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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* nir: Switch the arguments to nir_foreach_use and friendsJason Ekstrand2016-04-2812-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 <[email protected]>
* nir: Switch the arguments to nir_foreach_functionJason Ekstrand2016-04-2861-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 <[email protected]>
* nir: Switch the arguments to nir_foreach_parallel_copy_entryJason Ekstrand2016-04-284-7/+7
| | | | | | | | This matches the "foreach x in container" pattern found in many other programming languages. Reviewed-by: Eduardo Lima Mitev <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* nir: Switch the arguments to nir_foreach_phi_srcJason Ekstrand2016-04-2815-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 <[email protected]>
* nir: Switch the arguments to nir_foreach_instrJason Ekstrand2016-04-2865-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 <[email protected]>
* anv/lower_push_constants: fixup for nir_foreach_block()Jason Ekstrand2016-04-281-22/+18
| | | | Signed-off-by: Jason Ekstrand <[email protected]>
* anv/apply_pipeline_layout: fixup for nir_foreach_block()Jason Ekstrand2016-04-281-22/+19
| | | | Signed-off-by: Jason Ekstrand <[email protected]>
* anv/apply_dynamic_offsets: fixup for nir_foreach_block()Jason Ekstrand2016-04-281-33/+22
| | | | Signed-off-by: Jason Ekstrand <[email protected]>
* i965/nir: fixup for new foreach_block()Connor Abbott2016-04-286-80/+69
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/algebraic: fixup for new foreach_block()Connor Abbott2016-04-281-20/+14
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/validate: fixup for new foreach_block()Connor Abbott2016-04-281-10/+4
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/nir_worklist: fixup for new foreach_block()Connor Abbott2016-04-281-9/+3
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/remove_dead_variables: fixup for new foreach_block()Connor Abbott2016-04-281-28/+20
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/split_var_copies: fixup for new foreach_block()Connor Abbott2016-04-281-4/+4
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/repair_ssa: fixup for new foreach_block()Connor Abbott2016-04-281-11/+5
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/opt_peephole_select: fixup for new foreach_block()Connor Abbott2016-04-281-23/+14
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/phi_builder: fixup for new foreach_block()Connor Abbott2016-04-281-9/+3
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/opt_cp: fixup for new foreach_block()Connor Abbott2016-04-281-18/+10
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/opt_remove_phis: fixup for new foreach_block()Connor Abbott2016-04-281-5/+7
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/opt_undef: fixup for new foreach_block()Connor Abbott2016-04-281-15/+8
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/opt_dead_cf: fixup for new foreach_block()Connor Abbott2016-04-281-22/+21
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/opt_dce: fixup for new foreach_block()Connor Abbott2016-04-281-20/+13
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/opt_gcm: fixup for new foreach_block()Connor Abbott2016-04-281-4/+5
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/opt_constant_folding: fixup for new foreach_block()Connor Abbott2016-04-281-15/+13
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_samplers: fixup for new foreach_block()Connor Abbott2016-04-281-28/+8
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/normalize_cubemap_coords: fixup for new foreach_block()Connor Abbott2016-04-281-15/+11
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_var_copies: fixup for new foreach_block()Connor Abbott2016-04-281-19/+15
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/move_vec_src_uses_to_dest: fixup for new foreach_block()Connor Abbott2016-04-281-2/+5
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_vars_to_ssa: fixup for new foreach_block()Connor Abbott2016-04-281-5/+9
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_vec_to_movs: fixup for new foreach_block()Connor Abbott2016-04-281-14/+10
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_idiv: fixup for new foreach_block()Connor Abbott2016-04-281-14/+7
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_to_source_mods: fixup for new foreeach_block()Connor Abbott2016-04-281-9/+6
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_io: fixup for new foreach_block()Connor Abbott2016-04-281-4/+5
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_system_values: fixup for new foreach_block()Connor Abbott2016-04-281-16/+11
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_phis_to_scalar: fixup for new foreach_block()Connor Abbott2016-04-281-4/+5
| | | | Reviewed-by: Jason Ekstrand <[email protected]>
* nir/lower_indirect_derefs: fixup for new foreach_block()Connor Abbott2016-04-281-22/+17
| | | | | | v2 (Jason Ekstrand): Use nir_foreach_block_safe Reviewed-by: Jason Ekstrand <[email protected]>