Joshua Ashton
6fcf3314d0
venus: Fix zero-initialized fd causing apps to hang/crash
...
Some apps such as Gamescope crash under the mere presence of the virtio Vulkan driver without using a device.
This is because virtgpu::fd is zero-initialized upon allocation, which causes fd 0 to be closed in virtgpu_destroy.
Cc: mesa-stable
Fixes: 247232d5 ("venus: add experimental renderers")
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Chia-I Wu <olvaffe@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10814 >
2021-05-16 01:47:01 +00:00
Joshua Ashton
855cb78d46
radv: Handle unnormalized samplers in YCbCr lowering
...
We need to divide these by their divisors and special-case COSITED_EVEN.
Fixes NV12 compositing in Gamescope.
Fixes: 91702374 ("radv: Add ycbcr lowering pass.")
Cc: mesa-stable
Signed-off-by: Joshua Ashton <joshua@froggi.es >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10816 >
2021-05-15 18:15:52 +00:00
Lionel Landwerlin
fc765d6a8d
iris: fix assert to reflect correct limit for encoded size
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10805 >
2021-05-15 09:57:58 +00:00
Gert Wollny
b3499435ec
r600/sfn: Ignore precision when linking
...
There doesn't seem to be any speciifc support for passing arount
mediump and lowp data, so when linking these specifiers can be ignored
theerby saving IO instructions.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10722 >
2021-05-15 09:58:35 +02:00
Gert Wollny
4c045ad11e
nir/linker: add option to ignore the IO precisions for better varying packing
...
Backends that don't handle IO component precision can pack more varyings
into one slot if the linker ignores the precision. If the IO is vectorized
then this can save IO instructions.
Related: 165a69d2f7
nir: handle mediump varyings in varying compaction helpers
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10722 >
2021-05-15 09:58:27 +02:00
Juan A. Suarez Romero
629e8347ad
ci: Update VK-GL-CTS to 1.2.6.1
...
Reviewed-by: Emma Anholt <emma@anholt.net >
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10800 >
2021-05-14 20:35:24 +00:00
Dave Airlie
172c719baf
llvmpipe: fix non-multisampled rendering to multisampled framebuffer
...
Don't depend moving between samples on key->multisample
Big CI wins
Reported-by: Erik Faye-Lund <kusmabite@gmail.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Fixes: 210d714f46 ("llvmpipe: handle multisample color stores.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10780 >
2021-05-15 06:05:00 +10:00
Nanley Chery
bcdebf4ff8
iris: Avoid sampling some MCS surfaces with clear
...
Supposedly avoids GPU hangs in BF4. See HSD 1707282275 and 14013111325.
v2. Fix bug in WA implementation. (Sagar)
Cc: mesa-stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8755 >
2021-05-14 18:05:32 +00:00
Nanley Chery
eef4c708b3
anv: Avoid sampling some MCS surfaces with clear
...
Supposedly avoids GPU hangs in BF4. See HSD 1707282275 and 14013111325.
v2. Fix bug in WA implementation. (Sagar)
Cc: mesa-stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8755 >
2021-05-14 18:05:32 +00:00
Nanley Chery
608c131638
anv: Add clear_supported to anv_layout_to_aux_state
...
This will be used for an MCS workaround.
Cc: mesa-stable
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8755 >
2021-05-14 18:05:32 +00:00
Daniel Schürmann
b3eb87aa65
radv: call nir_copy_prop() after load-store vectorization
...
The load-store vectorizer can create a large amount
of unnecessary nir_op_vec and nir_op_mov instructions.
This prevents nir_opt_move from stalling to much and
potentially also helps other passes.
Closes : #4778
Fixes: 1958381c9a ('radv: Reorder some NIR optimizations in preparation for the I/O changes.')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10804 >
2021-05-14 17:38:46 +00:00
Daniel Schürmann
d659ce0d6c
aco/ra: prevent underflow register for p_create_vector operands
...
It could happen that we tested negative out-of-range
registers for p_create_vector operands resulting in a crash.
Fixes: 8962510e38 ('aco/ra: Conservatively refactor get_reg_specified to use PhysRegInterval')
Closes : #4697
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10799 >
2021-05-14 17:26:41 +00:00
Emma Anholt
341ecb2dfc
ci/freedreno: Skip refract on a306 now that it hangchecks sometimes.
...
Not every MR, but several per day since I landed the apitrace switch which
increased trace replay resolution to 1080p. Hopefully some day we can
tune the hangcheck to be less aggressive.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10793 >
2021-05-14 16:59:13 +00:00
Caio Marcelo de Oliveira Filho
09984fd02f
nir: Rename nir_is_per_vertex_io to nir_is_arrayed_io
...
VS outputs are "per vertex" but not the kind of I/O we want to match
with this helper. Change to a name that covers the "arrayness"
required by the type.
Name inspired by the GLSL spec definition of arrayed I/O.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Matt Turner <mattst88@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10493 >
2021-05-14 16:17:45 +00:00
Gert Wollny
e418710f8b
compiler/nir: check whether var is an input in lower_fragcoord_wtrans
...
Otherwise the lowering pass might try to lower any other load from
a deref if its data.location value happens to be zero.
Fixes: 418c4c0d7d
compiler/nir: extend lower_fragcoord_wtrans to support VARYING_SLOT_POS
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10577 >
2021-05-14 13:26:13 +00:00
Mike Blumenkrantz
0f04a90ea3
zink: emit some barriers out of renderpass where possible
...
when emitting barriers, we don't need to end the renderpass in some cases
this handles the case of emitting barriers for new resources which have
never before been accessed and thus do not require synchronization at a
specific point in the batch
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10700 >
2021-05-14 13:15:07 +00:00
Mike Blumenkrantz
f1ec655e47
zink: add flags for determining whether to update framebuffer and renderpass
...
we can optimize restarting renderpasses here a little by only performing
lookups if states have actually changed
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10761 >
2021-05-14 13:02:21 +00:00
Mike Blumenkrantz
b11b1968ee
zink: add a flag for tracking/validating renderpass clears
...
we've been tracking which attachments are deferring clears but not
specifically the ones that are going to be cleared in a renderpass
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10761 >
2021-05-14 13:02:21 +00:00
Mike Blumenkrantz
a7d3636d03
zink: split out base renderpass begin into separate function
...
let fb setup and barriers and whatever be separate
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10761 >
2021-05-14 13:02:21 +00:00
Tony Wasserka
a50d5b13be
util: tune signatures of generated enum operators
...
This allows use of these operators in a constexpr context and silences
a clang -Wunused-function warning.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10784 >
2021-05-14 11:00:52 +00:00
Tony Wasserka
c0f4bb9a22
util: add support for defining bitwise operators on strongly typed enums
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10784 >
2021-05-14 11:00:52 +00:00
Jordan Justen
df5b14969f
intel: Add 2 ADL-S pci-ids
...
Cc: mesa-stable
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10781 >
2021-05-14 08:59:18 +00:00
Daniel Schürmann
c62d58c80f
driconf: set vk_x11_strict_image_count for Metro: Exodus
...
Otherwise, the game crashes on startup under xwayland.
Closes : #4650
Cc: mesa-stable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10750 >
2021-05-14 07:59:50 +00:00
Mike Blumenkrantz
776ddfc858
util/queue: don't require a fence when adding a job
...
sometimes we just want to fire jobs off into the void and don't care
if or when they finish
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10719 >
2021-05-14 06:49:31 +00:00
Icecream95
4da88060d0
panfrost: Skip blit shader labelling if the buffer has no space
...
Fixes stack corruption in dEQP-GLES31.functional.draw_buffers_indexed.
random.max_implementation_draw_buffers.10
Fixes: 8ba2f9f698 ("panfrost: Create a blitter library to replace the existing preload helpers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10792 >
2021-05-14 06:39:05 +00:00
Lionel Landwerlin
938e52a6e8
anv: handle spirv parsing failure
...
v2: don't leak spec_entries
v3: Also switch to VK_ERROR_UNKNOWN when parsing fails
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10790 >
2021-05-14 06:32:03 +00:00
Jordan Justen
e435511b58
intel/dev: Add device info for ADL GT2
...
Cc: mesa-stable
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9465 >
2021-05-14 06:10:47 +00:00
Jordan Justen
89f3312625
intel/isl: Add Wa_22011186057 to disable CCS on ADL GT2 A0
...
Cc: mesa-stable
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9465 >
2021-05-14 06:10:47 +00:00
Daniel Stone
e1d74c9cfd
CI: Disable all Panfrost/AMD/Iris automatic jobs
...
The power in Cambridge is unstable; disable these jobs until it's back
clear.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10797 >
2021-05-14 04:18:17 +00:00
Mike Blumenkrantz
d1e30ca120
zink: immediately return false when getting query result if it's not gonna happen
...
this is a small optimization for the no-wait case when unflushed usage
exists since it's impossible for a qbo update to happen instantly
no functionality will be fixed by this, it's just a very minor optimization
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10796 >
2021-05-14 03:15:09 +00:00
Mike Blumenkrantz
cf3f17a643
lavapipe: fix fencing when submitting multiple cmdbufs
...
a fence applies to all the submitted cmdbufs, so it's necessary to do
the flush which creates the user fence after all the cmdbufs have been
processed in order to avoid creating a fence that only applies to the
first cmdbuf
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10795 >
2021-05-14 03:03:32 +00:00
Mike Blumenkrantz
719e4fb369
zink: fix DrawParameters shader cap usage
...
this is for vertex shaders and covers more than just baseinstance
Fixes: dcb9e4ddb4 ("zink: emit cap early")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10788 >
2021-05-13 21:44:59 +00:00
Mike Blumenkrantz
8e2ac24482
zink: stop overwriting buffer map pointers for stream uploader
...
this breaks the driver!
the uploader always maps its own pointer, so modifying that at any
point just explodes things later
Fixes: d179c5d28e ("zink: implement threaded context")
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10787 >
2021-05-13 21:37:15 +00:00
Caio Marcelo de Oliveira Filho
c0dc6affdc
intel/compiler: Clarify why VUE is recomputed by FS
...
FS will get the last geometry VUE, but it still needs to recompute in
case the number of position slots assigned by geometry is larger than
one -- this happens when Primitive Replication is used.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10653 >
2021-05-13 12:10:26 -07:00
Danylo Piliaiev
5a133ef1f2
ci/turnip: drop fail annotation for image.extend_operands_spirv1p4.*
...
They were fixed in
ed20e69b "vtn: Handle ZeroExtend/SignExtend image operands"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10783 >
2021-05-13 17:18:48 +00:00
Danylo Piliaiev
9a477ccbea
ci/turnip: drop fail annotation for float_control tests
...
These tests are NotSupported and therefore cannot fail.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10783 >
2021-05-13 17:18:48 +00:00
Lionel Landwerlin
2cebb1b5b3
anv: fix perf query pass with command buffer batching
...
We've only considered the perf query pool change previously. But we
also need to pay attention to the pass index.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 0a7224f3ff ("anv: group as many command buffers into a single execbuf")
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10301 >
2021-05-13 17:02:41 +00:00
Lionel Landwerlin
2c2de4d60e
intel/mi_builder: fix resolve call
...
Giving NULL for anv_combine_address() triggers an assert in that
function.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 8525ebe6e3 ("intel/mi_builder: Return an address from __gen_get_batch_address")
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10301 >
2021-05-13 17:02:41 +00:00
Abel García Dorta
f88dd7ed4d
i915g: add HW atomic counters as unsupported
...
Closes : #4772
Fixes: 2a06423c00 ("gallium: add CAPs to support HW atomic counters. (v3)")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10776 >
2021-05-13 16:29:07 +00:00
Tony Wasserka
80ee9d3947
aco/scheduler: Verify register demand invariants in debug mode
...
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10644 >
2021-05-13 15:27:57 +00:00
Tony Wasserka
50ba919d37
aco/scheduler: Fix register demand computation for upwards moves
...
The initial value needs to be taken from the instruction that is being
moved over, not the one to be moved.
Additionally the parameter of this function was removed because it was
misleading. Setting it to any value other than source_idx would cause
register_demand to be initialized incorrectly. (Instead, the maximum
demand among the covered instructions would need to be determined.)
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10644 >
2021-05-13 15:27:57 +00:00
Tony Wasserka
c528af1076
aco/scheduler: Fix register demand computation for downwards moves
...
Previously, changes in total_demand_clause were not always propagated to
total_demand. For instance, clause moves do not change the local register
demand at the end of a clause, yet they may still affect the total maximum.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Fixes: 8235bc6411 ("aco: try to group together VMEM loads of the same resource")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4533
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10644 >
2021-05-13 15:27:57 +00:00
Daniel Schürmann
c7d679f0f7
aco: relax validation rules for p_reduce dst RegType
...
By exposing a subgroupSize of 64, reductions with
cluster_size 32 in wave32 might be considered divergent,
and thus, result in a VGPR.
Fixes: dEQP-VK.subgroups.clustered.graphics.subgroupclustered* with wave32
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10769 >
2021-05-13 15:10:24 +00:00
Tapani Pälli
343d90b6ab
isl: require hiz for depth surface in isl_surf_get_ccs_surf
...
Fixes: 752eefdb ("intel/isl: Refactor isl_surf_get_ccs_surf")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10768 >
2021-05-13 17:18:54 +03:00
Jose Fonseca
6bb7d3bbc0
wgl: Remove opengl32.mingw.def.
...
MinGW DEF parsing is even more broken than before, and 32-bits import
libs are broken regardless one uses opengl32.mingw.def or opengl32.def.
This change removes opengl32.mingw.def and addresses the issue differently:
- link opengl32.dll with --enable-stdcall-fixup
- use the systems opengl32 import lib (libopengl32.a/opengl32.lib)
instead of our own
This change also gets test_wgl built with MinGW (even if it's never tested),
which I used to verify this; and to not link against internal libraries.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
v2: Revert back to shared_library.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10767 >
2021-05-13 13:18:16 +00:00
Mike Blumenkrantz
4791738d1d
zink: always do maybe_flush after draw/compute
...
this is a bit more sensible since a forced flush is going to require
refs and layouts be reapplied
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10760 >
2021-05-13 10:31:59 +00:00
Mike Blumenkrantz
9fc2b47870
zink: check for a work_count-based stall in zink_maybe_flush_or_stall()
...
put all the maybes in one place
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10760 >
2021-05-13 10:31:59 +00:00
Mike Blumenkrantz
afb837523d
zink: flush every 100k draws/computes
...
this ensures more consistent throughput in e.g., drawoverhead
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10760 >
2021-05-13 10:31:59 +00:00
Timothy Arceri
5aabc91273
glsl: add missing support for explicit components in interface blocks
...
From the ARB_enhanced_layouts spec:
"As with input layout qualifiers, all shaders except compute shaders
allow *location* layout qualifiers on output variable declarations,
output block declarations, and output block member declarations. Of
these, variables and block members (but not blocks) additionally
allow the *component* layout qualifier."
We previously had compile tests in piglit to make sure this was not a
compile error but no execution tests.
Fixes: d99a040bbf ("i965: enable ARB_enhanced_layouts for gen8+")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10763 >
2021-05-13 08:07:53 +00:00
Timothy Arceri
1a71d6aa6e
glsl: create validate_component_layout_for_type() helper
...
This will be used in the following patch.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10763 >
2021-05-13 08:07:53 +00:00