Commit Graph

127441 Commits

Author SHA1 Message Date
Eric Engestrom b5d36e9cb6 gitlab-ci: fix quoting of variables passed down to bare-metal runners
Eric Anholt identified the issue when merging one of my MRs: the
variable contained words in '`' backticks, which caused them to be
executed by the bare metal runner's shell.

Quote the value printed using bash's shell expansion feature to make
sure anything in the future will be properly quoted.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6389>
2020-08-19 21:53:31 +00:00
Eric Engestrom 72fac11ca3 gitlab-ci: fix testing whether a variable with a given name is set or not
The previous code considered unset variables the same as set-but-empty;
sometimes setting a variable as something empty is meaningful, so let's
pass them through properly.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6389>
2020-08-19 21:53:31 +00:00
Eric Engestrom 64fb3e6def docs: update calendar and link releases notes for 20.1.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6394>
2020-08-19 21:49:38 +00:00
Eric Engestrom 8be321f30a docs: add release notes for 20.1.6
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6394>
2020-08-19 21:49:38 +00:00
Alejandro Piñeiro bd38ea77e8 v3d/compiler: add v3dv_prog_data_size helper
Main use case is to help to implement Vulkan PipelineCache, as we are
serializing/deserializing the prog_data too.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6078>
2020-08-19 22:50:21 +02:00
Jason Ekstrand a880f97d59 compiler/types: Allow interfaces in get_explicit_type_for_size_align
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6210>
2020-08-19 19:43:31 +00:00
Jason Ekstrand df9596353a nir/large_constants: Handle incomplete derefs
This pass works entirely with variables, all we have to do is ignore any
derefs we see which we can't chase back to the variable.  The one
interesting case we have to handle is if we have a complex use of a
deref_var.  In that case, we have to flag it non-constant.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6210>
2020-08-19 19:43:31 +00:00
Jason Ekstrand 9f3c595dfc nir/find_array_copies: Handle cast derefs
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6210>
2020-08-19 19:43:31 +00:00
Jason Ekstrand a0a0bcfa26 nir/builder: Add a nir_iand_imm helper
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6210>
2020-08-19 19:43:31 +00:00
Jason Ekstrand ac95bb45e8 nir: Initialize nir_ssa_def::live_index
Previously, this was left uninitialized.  Let's initialize it to an
obviously bogus value so we notice if anyone ever tries to use stale
liveness data.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6210>
2020-08-19 19:43:31 +00:00
Jason Ekstrand 8f7784ee8d clover/nir: Use the correct address mode for shared
Shared memory needs to have 64-bit pointers but we want 32-bit offsets
most of the time.  This is exactly what 32bit_offset_as_64bit is for.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
2020-08-19 18:11:42 +00:00
Jason Ekstrand b2226f7a98 clover/nir: Stop computing the global address format twice
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
2020-08-19 18:11:42 +00:00
Jason Ekstrand 884d2021d9 clover/nir: Stop setting ubo_addr_format
We unconditionally set constant_as_global = true so we should never get
UBO access out of spirv_to_nir.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
2020-08-19 18:11:42 +00:00
Karol Herbst 5ef9c110d5 nv50/ir/nir: support load_work_dim
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
2020-08-19 18:11:42 +00:00
Karol Herbst 080bee33da nvc0: handle nr being 0 in nvc0_set_global_bindings
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
2020-08-19 18:11:42 +00:00
Karol Herbst b283fb335b nv50/ir/nir: fix global_atomic_comp_swap
Fixes: 20d0ae464c ("nv50/ir: implement global atomics and handle it for nir")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
2020-08-19 18:11:42 +00:00
Karol Herbst 4403176201 clover/nir: support int64 atomics if the device supports it
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
2020-08-19 18:11:42 +00:00
Karol Herbst 38e904f929 nv50/ir/nir: assert on unknown alu ops
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
2020-08-19 18:11:42 +00:00
Karol Herbst ada8c76cca nve4: fix uploading unaligned sized input buffers
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
2020-08-19 18:11:42 +00:00
Karol Herbst 918e444f04 clover/nir: Call vars_to_explicit_types for shared memory
This is required for shared memory buffers declared with an explicit
size inside the kernel.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
2020-08-19 18:11:42 +00:00
Jesse Natalie 1e7c2d1862 nir/glsl: Add glsl_get_cl_type_size_align helper
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6367>
2020-08-19 18:11:42 +00:00
Eric Anholt a27823ef2c freedreno/ir3: Fix assertion failures dumping CS high full regs.
The *2 here would bump into the *2 in regset, causing assertion failures
dumping CS programs.  Just set the mergedregs flag on a6xx, and don't
duplicate the mergedregs logic.  If you're dealing with new HW where we
don't know if mergedregs is set, you may need to tweak the flag during
disasm setup for the stats to make sense.

Fixes: f7bd3456d7 ("freedreno: deduplicate a3xx+ disasm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6323>
2020-08-19 16:56:14 +00:00
Eric Anholt ce335dcb19 freedreno/cffdec: When .mergedregs is set, don't count half regs.
This matches what ir3.c does in the mergedregs case: just count max full
reg used.  This flag is unset so far, but will be soon and keeps our
output comparable between blob and freedreno.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6323>
2020-08-19 16:56:13 +00:00
Eric Anholt 803ec06b1b freedreno/ir3: Fix compiler warning from the setjmp fails path.
The TRY() macro doesn't call the contents if we fail to set up
setjmp/longjmp.

Fixes: 3d6e4a201a ("freedreno/decode: try harder to not crash in disasm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6323>
2020-08-19 16:56:13 +00:00
Connor Abbott c1a6e34573 nir/lower_input_attachments: Support loading layer id via gl_ViewIndex
This is required on adreno when the special multiview mode is switched
on.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5719>
2020-08-19 16:36:43 +00:00
Connor Abbott 76f711d09d tu: Use an input for the layer when lowering input attachments
Also remove a hack that's no longer needed. This should fix input
attachments with layered rendering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5719>
2020-08-19 16:36:43 +00:00
Connor Abbott c77716294b radv: Use an input for the layer when lowering input attachments
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5719>
2020-08-19 16:36:43 +00:00
Connor Abbott d243bf1032 nir/lower_input_attachments: Support loading layer id as an input
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5719>
2020-08-19 16:36:43 +00:00
Connor Abbott e72895767b nir/lower_input_attachments: Refactor to use an options struct
While we're at it, fold the details of how to load the fragcoord into
load_fragcoord().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5719>
2020-08-19 16:36:43 +00:00
Connor Abbott 340c73d4ef nir/spirv: Add the option to keep ViewIndex as an input
This is necessary for fragment shaders on adreno.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5719>
2020-08-19 16:36:43 +00:00
Andres Gomez c1e6957033 Revert "gitlab-ci: reuse container_post_build when building the test images"
ccache is installed as ephemeral. Hence, the build will fail if used
by the post_build script after removing it.

This reverts commit 40ab6d77c0.

Signed-off-by: Andres Gomez <agomez@igalia.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6391>
2020-08-19 16:19:43 +00:00
Rob Clark 7e3a788bd3 freedreno/a6xx: fix occlusion query with more than one tile
We need to emit epilogue after each tile, not just after the last tile.

Fixes: 13fc03f4c0 ("freedreno/a6xx: Avoid stalling for occlusion queries")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6376>
2020-08-19 14:03:42 +00:00
Rob Clark 5550bc0423 freedreno/a6xx: only generate streamout for draw pass shader
Previously we were doing this both for draw and binning pass.. resulting
that the stateobj contained first the incorrect state (based on binning
pass shader with varyings DCEd) followed by the correct state.

Also, in the streamout case we should link binning pass VS against the
real FS, rather than the dummy FS, so that OUTLOC's match (since same
streamout stateobj is used for both draw and binning pass).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6376>
2020-08-19 14:03:42 +00:00
Rob Clark ee7949b064 freedreno/registers: SC_WAIT_WC is not a6xx
I think this is probably only a2xx, but it was masking
WRITE_PRIMITIVE_COUNTS on a6xx.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6376>
2020-08-19 14:03:42 +00:00
Rhys Perry 60dae98456 nir/opt_remove_phis: optimize out phis with undef
This removes some phis that loop unrolling can create.

fossil-db (Navi):
Totals from 349 (0.26% of 135946) affected shaders:
SpillSGPRs: 52 -> 41 (-21.15%)
CodeSize: 3179968 -> 3169920 (-0.32%); split: -0.33%, +0.01%
Instrs: 626965 -> 624712 (-0.36%); split: -0.37%, +0.01%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6348>
2020-08-19 13:27:50 +00:00
Eric Engestrom 326eb56718 egl/x11_dri3: implement EGL_KHR_swap_buffers_with_damage
Passes all of `dEQP-EGL.functional.swap_buffers_with_damage.*`:

    Passed:        36/54 (66.7%)
    Failed:        0/54 (0.0%)
    Not supported: 18/54 (33.3%)
    Warnings:      0/54 (0.0%)
    Waived:        0/54 (0.0%)

The "not supported" ones are the `preserve_buffer_*` tests, which is not
supported on X11/DRI3.

Cc: 20.2 <mesa-stable>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3030
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6132>
2020-08-19 12:47:58 +00:00
Eric Engestrom eae181e3eb egl/x11_dri3: enable & require xfixes 2.0
Cc: 20.2 <mesa-stable>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6132>
2020-08-19 12:47:57 +00:00
Tomeu Vizoso 6c9cf84409 ci: Run deqp-gles2 on RadeonSI
We have one more DUT in the Collabora lab, use it to run GLES2 tests.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6385>
2020-08-19 12:20:20 +00:00
Alyssa Rosenzweig ff3ea3b3bb pan/mdg: Fix auxiliary load/store swizzle packing
It needs to respect the existing swizzle, as well as the type size.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6321>
2020-08-19 12:08:51 +00:00
Alyssa Rosenzweig 529f79d639 pan/mdg: Fix printing of r26 ld/st sources post-RA
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6321>
2020-08-19 12:08:51 +00:00
Alyssa Rosenzweig 14e774929e pan/mdg: Identify barrier out-of-order field
All barrier types are implied regardless, this is an optimization for
out-of-order.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6321>
2020-08-19 12:08:51 +00:00
Alyssa Rosenzweig af97331aba pan/mdg: Handle 32-bit offsets from store_shared
Implicitly zero-extended for the 64-bit address.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6321>
2020-08-19 12:08:51 +00:00
Alyssa Rosenzweig 06c31031e7 pan/mdg: Ensure barrier op is set on texture
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Fixes: 92c808cd47 ("pan/mdg: eliminate references to ins->texture.op")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6321>
2020-08-19 12:08:51 +00:00
Alyssa Rosenzweig 415eb43fd5 panfrost: Fix shared memory size computation
Based on core count. Also, avoid some of the more complex programming
and stick to powers-of-two for now.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6321>
2020-08-19 12:08:51 +00:00
Alyssa Rosenzweig 39bf1fb322 panfrost: Fix WRITES_GLOBAL bit
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Fixes: dce7722ef8 ("panfrost: Handle writes_memory correctly")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6321>
2020-08-19 12:08:51 +00:00
Roman Stratiienko 8626d4cbef android: freedreno: Another build fix
During build on Android 10, build error occurred:

'''
[ 26% 456/1718] Gen Header: libfreedreno_registers_32 <= a3xx.xml.h
FAILED: out/target/product/pinephone/gen/STATIC_LIBRARIES/libfreedreno_registers_intermediates/registers/adreno/a3xx.xml.h
/bin/bash -c "PATH=/usr/bin:\$PATH python3 external/mesa3d/src/freedreno/registers/gen_header.py external/mesa3d/src/freedreno/registers/adreno/a3xx.xml > out/target/product/pinephone/gen/STATIC_LIBRARIES/libfreedreno_registers_intermediates/registers/adreno/a3xx.xml.h"
Traceback (most recent call last):
  File "external/mesa3d/src/freedreno/registers/gen_header.py", line 470, in <module>
    main()
  File "external/mesa3d/src/freedreno/registers/gen_header.py", line 446, in main
    xml_file = sys.argv[2]
IndexError: list index out of range
'''

Align build rules with meson fixes it.

Fixes: 62ebd342 ("freedreno/registers: split header build into subdirs")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6170>
2020-08-19 11:57:17 +00:00
Emil Velikov 41bb6459d3 radv: restrict exported symbols with static llvm
Like the gallium --version-script magic but for radv.

The long term goal is to make LLVM support optional, remove it even, so
let's keep the hunk in an if block.

v2: fold if checks (Eric)
v3 (Tomeu): Remove spaces within [] (Dylan)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6203>
2020-08-19 11:19:18 +00:00
Eduardo Lima Mitev a457256e2d freedreno: Destroy syncobj too when destroying fence
This is a missing part of freedreno EXT_semaphore support,
recently merged as part of series adding EXT_external_objects. This hunk was
actually lost due to a mistake on my side while doing a rebase.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6383>
2020-08-19 09:11:21 +00:00
Andres Gomez b08fcab44d gitlab-ci: reorder container_post_build call for arm64_test image
And remove a redundant call to ccache --show-stats

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6343>
2020-08-19 08:56:45 +00:00
Andres Gomez 40ab6d77c0 gitlab-ci: reuse container_post_build when building the test images
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6343>
2020-08-19 08:56:45 +00:00