Commit Graph

128832 Commits

Author SHA1 Message Date
Dave Airlie b0504ed682 llvmpipe: use an alternate env var to enable clover.
This can be used outside debug contexts.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6928>
2020-09-30 16:54:10 +10:00
Dave Airlie 760ba65733 gallivm/nir: handle non-32-bit mul high
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6928>
2020-09-30 16:54:07 +10:00
Dave Airlie 5d4502c085 gallivm/nir: fix up non 32-bit load stores
This fixes a bunch of opencl tests.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6928>
2020-09-30 16:54:04 +10:00
Dave Airlie 2891136050 gallivm: fix 64-bit CL intrinsics.
This fixes a bunch of bad casts in piglit tests

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6928>
2020-09-30 16:53:55 +10:00
Jonathan Marek 728061b968 turnip: signal fence and semaphore in AcquireNextImage2KHR
As a result of doing semaphores correctly, this is needed for things to
work correctly.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6719>
2020-09-30 00:32:40 +00:00
Jonathan Marek e192f8f30a turnip: share code between semaphores/fences + fence import/export
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6719>
2020-09-30 00:32:40 +00:00
Jonathan Marek 0497c9cb6c turnip: remove remaining uses of drmSyncobj helpers
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6719>
2020-09-30 00:32:40 +00:00
Jonathan Marek c4d5010c54 turnip: rework ImportSemaphoreFdKHR
The behavior of OPAQUE_FD should be unchanged.

SYNC_FD case is reworked to be more like what anv does: a new temporary
syncobj is always created, with the CREATE_SIGNALED flag if necessary.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6719>
2020-09-30 00:32:40 +00:00
Jonathan Marek 8343c32f5a turnip: rework GetSemaphoreFdKHR
Fixes:
- permanent payload not being restored for the OPAQUE_FD case
- incorrectly resetting the permanent payload in SYNC_FD case

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6719>
2020-09-30 00:32:40 +00:00
Jonathan Marek fb76af24a2 turnip: semaphores simplification (only syncobj semaphores supported)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6719>
2020-09-30 00:32:40 +00:00
Jonathan Marek 1dfb5a93d2 turnip: set MSM_SUBMIT_SYNCOBJ_RESET for submit pWaitSemaphores
From VK spec:

"the act of waiting for a binary semaphore also unsignals that semaphore"

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6719>
2020-09-30 00:32:40 +00:00
Jonathan Marek 2a3f6e0267 turnip: always create permanent syncobj for semaphore
This allows non-exported semaphores to behave correctly instead of being
ignored in QueueSubmit().

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6719>
2020-09-30 00:32:40 +00:00
Jonathan Marek dcc278c722 turnip: clean up tu_device_memory
Delete unused code.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6913>
2020-09-29 23:24:32 +00:00
Dave Airlie d12cdc9374 gallivm: fix pow(0, y) to be 0
The log2(0) was producing bad results.

Fixes:
piglit pow tests on llvmpipe.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6907>
2020-09-29 21:51:22 +00:00
Gert Wollny 89a1a3e9d6 r600/sfn: extend life range of all variables by one
This is a strange fix for some gles 3.1 tests with atomics. Maybed
the register holding the atomic add value can't be re-used in the
first instruction after an GDS instruction.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6925>
2020-09-29 21:30:42 +00:00
Gert Wollny 02245e38fc r600/sfn: Add support for more barrier instructions
These barriers should probably be global, but currently we only issue
a shared barrir (i.e. for only one wave front).

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6925>
2020-09-29 21:30:42 +00:00
Gert Wollny 48edb98a7e r600/sfn: Fix IDX register ID
Fixes: 9a6b11a733
   r600/sfn: Fix indirect const buffer access

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6925>
2020-09-29 21:30:42 +00:00
Gert Wollny 7683e27561 r600/sfn: Fix enabling the right interpolator for inerpolate_at_sample
Fixes: 73c5f45191
   r600/sfn: Fix interpolate at sample

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6925>
2020-09-29 21:30:42 +00:00
Rob Clark 16a3a56321 freedreno: Don't leak LRZ bo's
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6900>
2020-09-29 20:56:54 +00:00
Rob Clark 7454ae4ea6 freedreno/registers: Add a couple things used on kernel side
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6900>
2020-09-29 20:56:54 +00:00
Rob Clark 27c8d97657 freedreno/drm: Also clean ring_cache
We also need to release all the entries from the ring_cache when tearing
down the dev.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6900>
2020-09-29 20:56:54 +00:00
Rob Clark 98093e2780 freedreno/a6xx: Small cleanup
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6900>
2020-09-29 20:56:54 +00:00
Rob Clark 5be3cfdc13 freedreno: Don't leak border_color_buf reference
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6900>
2020-09-29 20:56:54 +00:00
Rob Clark 69a3ef6511 freedreno/drm: drop bo's dev reference
This is a bit over-paranoid, and can cause drm device fd leaks if there
is a bo leak somewhere.  Which is kind of a worse outcome.

This "fixes" a fd leak seen in:

dEQP-EGL.functional.query_context.get_current_display.*
dEQP-EGL.functional.query_context.get_current_context.*
dEQP-EGL.functional.query_context.get_current_display.*

(Still tracking down the root leak)

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6900>
2020-09-29 20:56:54 +00:00
Mike Blumenkrantz 6a20c630b9 zink: unify all occurrences of waiting on a fence
this was duplicated in a few places

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6922>
2020-09-29 20:49:15 +00:00
Mike Blumenkrantz e31381ac26 zink: combine all surface layout-setting for src/dst into util function
we do a lot of src/dst layout-setting, so ensure that we use the same code
everywhere to avoid cases where src==dst and we aren't setting GENERAL
layout as we should

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6922>
2020-09-29 20:49:15 +00:00
Bas Nieuwenhuizen 24f19f409d radv: Write correct dispatch size for RGP.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6875>
2020-09-29 20:14:40 +00:00
Rob Clark 1b39d74c68 ci: Enable remaining (non-rotate) mustpass CTS tests
The gles3 and gles31 multisample and 565-no-depth-no-stencil caselists
are also mustpass.  And they don't add a significant number of extra
test cases.

The remaining mustpass caselists all involve rotation, which is not
currently supported in the surfaceless deqp build.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6553>
2020-09-29 19:58:50 +00:00
Rob Clark 8abe3bb95a ci: cherry-pick deqp fix for config choosing
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6553>
2020-09-29 19:58:50 +00:00
Rob Clark aee1c08c06 ci/deqp-runner: Allow overriding width/height/config
This will allow adding multi-sample caselists, and jobs with larger
surface size.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6553>
2020-09-29 19:58:50 +00:00
Eric Anholt efaea653b5 intel: Add support for i945g to intel_stub_gpu.
I wanted to check the impact of nir-to-tgsi on the i915g driver, but I
don't have an i915 set up.  Similarly, for driconf refactoring I needed to
make sure that classic i915_dri.so still loaded.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6868>
2020-09-29 19:53:22 +00:00
Jan Ziak f5901484a7 Add driver override to envvars.rst
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6911>
2020-09-29 17:07:48 +00:00
Pierre-Eric Pelloux-Prayer 2584d48b2c gallium/vl: add chroma_format arg to vl_video_buffer functions
vl_mpeg12_decoder needs to override the chroma_format value to get the
correct size calculated (chroma_format is used by vl_video_buffer_adjust_size).

I'm not sure why it's needed, but this is needed to get correct mpeg decode.

Fixes: 24f2b0a856 ("gallium/video: remove pipe_video_buffer.chroma_format")
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6817>
2020-09-29 16:50:37 +00:00
Pierre-Eric Pelloux-Prayer b121b1b8b8 gallium/vl: do not call transfer_unmap if transfer is NULL
CC: mesa-stable
Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6817>
2020-09-29 16:50:37 +00:00
Connor Abbott 8d2757789a tu: Enable multi-position output
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6515>
2020-09-29 16:16:05 +00:00
Connor Abbott 64ad5a1f7b ir3, tu: Link per-view position correctly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6515>
2020-09-29 16:16:05 +00:00
Connor Abbott 6982e8510b ir3, tu: Run optimization loop twice
This call to ir3_optimize_nir() mirrors what st/mesa does for us in
Gallium, and will be necessary for cross-stage linking and the multiview
lowering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6515>
2020-09-29 16:16:05 +00:00
Connor Abbott 41a5a21858 tu: Refactor shader compilation flow
In order to do cross-stage linking, we'll need to split out SPIR-V->NIR
and NIR finalization, so that we can do a round of linking in between.
The multiview lowering pass also assumes that it sits between two
optimization loops, which in anv are the pre-linking optimizations and
post-linking finalization.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6515>
2020-09-29 16:16:05 +00:00
Connor Abbott 67ac16611b tu: Write multiview control registers in binning pass
Multiview is never used with binning, but we still need to make sure to
disable it in the binning pass.

Fixes: c0c7dbd ("tu: Implement multiview pipeline state")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6515>
2020-09-29 16:16:05 +00:00
Michel Dänzer a3363c348d gallium: Make pipe_viewport_state swizzle_x/y/z/w bit-fields 8 bits wide
Previously there were 20 padding bits after them, which would be left
uninitialized and preserved when writing to the swizzle members. This
could result in two equal viewport states spuriously being considered
different (because memcmp compared the padding bits as well).

Noticed while looking for something else with valgrind:

==801624== Conditional jump or move depends on uninitialised value(s)
==801624==    at 0x10B86259: cso_set_viewport (cso_context.c:739)
==801624==    by 0x10B862C7: cso_set_viewport_dims (cso_context.c:764)
==801624==    by 0x1057E3A1: clear_with_quad (st_cb_clear.c:335)
==801624==    by 0x1057E3A1: st_Clear (st_cb_clear.c:545)
==801624==    [...]
==801624==
==801624== Conditional jump or move depends on uninitialised value(s)
==801624==    at 0x10B885DE: cso_restore_viewport (cso_context.c:777)
==801624==    by 0x10B885DE: cso_restore_state (cso_context.c:1710)
==801624==    by 0x1057E4CB: clear_with_quad (st_cb_clear.c:364)
==801624==    by 0x1057E4CB: st_Clear (st_cb_clear.c:545)
==801624==    [...]

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6867>
2020-09-29 15:58:22 +00:00
Samuel Pitoiset 291cfb1e41 radv: move lowering of FS outputs outside of ACO
This enables lowering of FS outputs for RADV/LLVM.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6865>
2020-09-29 14:44:05 +00:00
Samuel Pitoiset 4dae9e53f6 radv: call nir_io_add_const_offset_to_base for FS outputs
The store_output of RADV/LLVM expects the const offset to be 0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6865>
2020-09-29 14:44:05 +00:00
Timur Kristóf 85074ec5f6 radv/aco: Set I/O variable locations outside ACO.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6865>
2020-09-29 14:44:05 +00:00
Indrajit Kumar Das cd1fab4ed6 radeonsi: enable support for GL_NV_shader_atomic_int64
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6708>
2020-09-29 14:24:44 +00:00
Indrajit Kumar Das 40c1f9883e mesa,glsl: add support for GL_NV_shader_atomic_int64
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6708>
2020-09-29 14:24:44 +00:00
Indrajit Kumar Das 8930b3bcdd gallium: prepare framework for supporting GL_NV_shader_atomic_int64
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6708>
2020-09-29 14:24:44 +00:00
Jonathan Marek 6d4f33e469 turnip: initial implementation of VK_KHR_push_descriptor
Add missing descriptor sets code for push descriptors, and a simple initial
implementation to enable the extension and pass dEQP tests.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6755>
2020-09-29 12:58:34 +00:00
Jonathan Marek 992d24794d turnip: delete unused/broken pipeline layout hashing code
Note: immutable samplers hash was wrong since we have an array of
tu_sampler and not 4 dwords like radv.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6755>
2020-09-29 12:58:34 +00:00
Jonathan Marek 560cff81f5 turnip: remove unused cmd_buffer/device arguments in descriptor sets
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6755>
2020-09-29 12:58:34 +00:00
Boris Brezillon d4d5382963 panfrost: Add support for rbg16 formats
Fixes: 171e94fe62 ("mesa/st: enable EXT_color_buffer_half_float when formats supported")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6887>
2020-09-29 11:48:31 +00:00