summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* nir/algebraic: add option to lower fall_equalN/fany_nequalNJonathan Marek2019-07-242-0/+9
| | | | | | | | | Add generic lowerings for fall_equalN/fany_nequalN. These should be optimal for vec4 backends that doesn't have any special instructions for it, as long as they support saturate. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* nir/algebraic: add fdot2 optimizationsJonathan Marek2019-07-241-0/+3
| | | | | | | | | Add simple fdot2 optimizations that are missing. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Thomas Helland <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* nir/algebraic: add option to lower fdphJonathan Marek2019-07-242-1/+6
| | | | | | | | For backends that don't have a 'fdph' instructions Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Thomas Helland <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* nir: replace lower_sincos with algebraic optJonathan Marek2019-07-246-144/+13
| | | | | | | | This version has less ops for the same precision. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Acked-by: Matt Turner <[email protected]>
* nir/algebraic: allow swizzle in nir_algebraic replace expressionJonathan Marek2019-07-244-6/+22
| | | | | | | | This is to allow optimizations in nir_opt_algebraic not otherwise possible Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Acked-by: Matt Turner <[email protected]>
* gallium/u_transfer_helper: fix assert in RGTC caseRob Clark2019-07-241-26/+27
| | | | | | | Previously we'd hit the unreachable() for uploading RGTC. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* main: Free memory allocated for gl_bitmap_atlas structureYevhenii Kolesnikov2019-07-241-0/+1
| | | | | | | | | Structure itself wasn't freed during context tear-down, causing a memory leak on iris. Signed-off-by: Yevhenii Kolesnikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* nir,intel: lower if (cond) demote() to new intrinsic demote_if(cond)Daniel Schürmann2019-07-245-22/+38
| | | | | | | This will effectively enable the optimization in anv. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* i965: Use NIR to lower legacy userclipping.Kenneth Graunke2019-07-249-158/+64
| | | | | | | | | | | | | | | This allows us to drop legacy userclip plane handling in both the vec4 and FS backends, and simplifies a few interfaces. v2 (Jason Ekstrand): - Move brw_nir_lower_legacy_clipping to brw_nir_uniforms.cpp because it's i965-specific. - Handle adding the params in brw_nir_lower_legacy_clipping - Call brw_nir_lower_legacy_clipping from brw_codegen_vs_prog Co-authored-by: Jason Ekstrand <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* anv: Implement VK_EXT_subgroup_size_controlJason Ekstrand2019-07-243-2/+46
| | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* anv/pipeline: Plumb pipeline shader stage create flagsJason Ekstrand2019-07-241-12/+21
| | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* intel/compiler: Allow for required subgroup sizesJason Ekstrand2019-07-243-6/+42
| | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* intel/compiler: Allow for varying subgroup sizesJason Ekstrand2019-07-243-2/+26
| | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* nir/lower_subgroups: Properly lower masks when subgroup_size == 0Jason Ekstrand2019-07-241-5/+11
| | | | | | | | | | | | Instead of building a constant mask (which depends on knowing the subgroup size), we build an expression. Because the pass uses the nir_shader_lower_instructions helper, subgroup lowering will be run on any newly emitted instructions as well as the previously existing instructions. In particular, if the subgroup size is known, the newly emitted subgroup_size intrinsic will get turned into a constant and a later constant folding pass will clean it up. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* vulkan: Update the XML and headers to 1.1.116Jason Ekstrand2019-07-241-18/+55
| | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* intel/compiler: Be more conservative about subgroup sizes in GLJason Ekstrand2019-07-2411-13/+55
| | | | | | | | | | | The rules for gl_SubgroupSize in Vulkan require that it be a constant that can be queried through the API. However, all GL requires is that it's a uniform. Instead of always claiming that the subgroup size in the shader is 32 in GL like we have to do for Vulkan, claim 8 for geometry stages, the maximum for fragment shaders, and the actual size for compute. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* intel/compiler: Lower gl_SubgroupSize in postprocess_nirJason Ekstrand2019-07-241-2/+7
| | | | | | | | | | Instead of lowering the subgroup size so early, wait until we have more information. In particular, we're going to want different subgroup sizes from different stages depending on the API. We also defer lowering of subgroup masks because the ge/gt masks require the subgroup size to generate a subgroup mask. Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* intel/nir: Make brw_nir_apply_sampler_key more genericJason Ekstrand2019-07-247-16/+26
| | | | Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
* nir: Add lowering for nir_op_irem and nir_op_imodSagar Ghuge2019-07-241-2/+16
| | | | | | | | | | Tested on Gen > 9. v2: 1) Fix lowering 2) Keep a consistent i/u order (Matt Turner) Signed-off-by: Sagar Ghuge <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* main: Fix memleaks in mesa_use_programYevhenii Kolesnikov2019-07-241-0/+2
| | | | | | | | | Add freeing of SubroutineIndexes to the _mesa_free_shader_state. Fixes: 4566aaaa5b1 ("mesa/subroutines: start adding per-context subroutine index support (v1.1)") Signed-off-by: Yevhenii Kolesnikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* intel/compiler: don't use a keyword struct for a class fs_regAndrii Simiklit2019-07-241-1/+1
| | | | | | | | warning: struct 'fs_reg' was previously declared as a class Fixes: e64be391 ("intel/compiler: generalize the combine constants pass") Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Andrii Simiklit <[email protected]>
* lima/ppir: fix disassembler temp read/write printQiang Yu2019-07-241-9/+23
| | | | | | | | temp read/write use negtive offset, and handle alignment==1 case. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]>
* gallium+mesa: fix tgsi_semantic array typeEric Engestrom2019-07-244-10/+16
| | | | | | Fixes: ed23335a313dfc9cec26 ("gallium: use enums in p_shader_tokens.h (v2)") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* util: fix no-op macro (bad number of arguments)Eric Engestrom2019-07-241-1/+1
| | | | | | Fixes: b8e077daee4d6369d774 ("util: no-op __builtin_types_compatible_p() for non-GCC compilers") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* radv/gfx10: enable VK_EXT_transform_feedbackSamuel Pitoiset2019-07-241-1/+1
| | | | | | | | | | | | When a pipeline uses transform feedback, the driver fallbacks to the legacy path because NGG support for streamout is a non-trivial amount of work. AMDVLK also uses the legacy path for streamout, while RadeonSI uses the new NGG path. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: do not enable NGG if a pipeline uses XFBSamuel Pitoiset2019-07-241-0/+27
| | | | | | | | NGG GS for streamout requires a bunch of work, so enable it with the legacy path only for now. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: emit streamout shader configSamuel Pitoiset2019-07-241-7/+7
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: declare streamout user SGPRsSamuel Pitoiset2019-07-241-3/+0
| | | | | | | Required for legacy streamout. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: update streamout descriptorsSamuel Pitoiset2019-07-241-2/+9
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: fix VS input VGPRs with the legacy pathSamuel Pitoiset2019-07-242-5/+15
| | | | | | | For some reasons, InstanceID is VGPR3 although StepRate0 is set to 1. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* gallivm: rework lp_build_tgsi_soa to take a structDave Airlie2019-07-245-114/+126
| | | | | | | The parameters were getting messy and I have to add a few more for compute shaders, so clean it up before proceeding. Reviewed-by: Roland Scheidegger <[email protected]>
* nir/lower_io: Return SSA defs from helpersJason Ekstrand2019-07-231-25/+42
| | | | | | | | I can't find a single place where nir_lower_io is called after going out of SSA which is the only real reason why you wouldn't do this. Returning SSA defs is more idiomatic and is required for the next commit. Reviewed-by: Matt Turner <[email protected]>
* meson: allow building all glx without any driversDylan Baker2019-07-231-3/+3
| | | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111016 Fixes: a47c525f3281a2753180e076c7e9b7772aff8f06 ("meson: build glx") Acked-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* swr/rasterizer: Fix 3D resource copies.Jan Zielinski2019-07-231-0/+14
| | | | | | Ensure constant attributes stay constant with barycentric interpolation. Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: Fix return type on SIMD8 version of Clamp and Normalize ↵Jan Zielinski2019-07-231-2/+2
| | | | | | utility functions Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: small formatting changesJan Zielinski2019-07-233-22/+48
| | | | Reviewed-by: Alok Hota <[email protected]>
* swr/rasterizer: Adding support for unhandled clipEnable stateJan Zielinski2019-07-233-4/+8
| | | | | | Clipping is not correctly handled by the rasterizer - fixing this. Reviewed-by: Alok Hota <[email protected]>
* radv/gfx10: Enable binning.Bas Nieuwenhuizen2019-07-231-2/+1
| | | | | | | | | | Numbers for Talos: gfx10 without binning: 77.0 77.7 77.2 77.6 gfx10 with binning: 82.3 82.0 82.7 82.4 Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv/gfx10: Implement bin size calculation.Bas Nieuwenhuizen2019-07-231-2/+112
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv/gfx9: Select between depth/color bins based on area.Bas Nieuwenhuizen2019-07-231-2/+2
| | | | | | | Mirrors radeonsi. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Generalize binning settings.Bas Nieuwenhuizen2019-07-231-10/+2
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/gfx10: Use new scan converter.Bas Nieuwenhuizen2019-07-231-9/+51
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Set FLUSH_ON_BINNING_TRANSITION.Bas Nieuwenhuizen2019-07-233-10/+50
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Use pbb_allow for framebuffer BREAK_BATCH.Bas Nieuwenhuizen2019-07-231-1/+1
| | | | | | | Ported from radeonsi. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radeonsi/nir: set tgsi_shader_info::uses_fbfetch for KHR_blend_equation_adv.Marek Olšák2019-07-231-5/+23
| | | | | | This doesn't implement the color buffer load. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* tgsi/scan: add uses_fbfetchMarek Olšák2019-07-233-1/+5
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi: fail if importing a texture with incorrect last_level or samplesMarek Olšák2019-07-231-5/+38
| | | | | | v2: don't fail if the texture comes from an incompatible driver. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> (v1)
* radeonsi: rewrite si_get_opaque_metadata, also for gfx10 supportMarek Olšák2019-07-231-24/+40
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi: simplify si_get_input_prim and remove incorrect TODO commentMarek Olšák2019-07-233-11/+5
| | | | | | u_vertices_per_prim(QUADS) is the same as TRIANGLES. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
* radeonsi/gfx10: fix and enable CLEAR_STATEMarek Olšák2019-07-232-1/+3
| | | | | | it was a driver bug. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>