Commit Graph

144211 Commits

Author SHA1 Message Date
Alyssa Rosenzweig 8c6b9b9c92 pan/va: Workaround quirk of barrier handling
For some unknown reason, waiting for general slots (at least for memory stores)
doesn't work properly on a BARRIER instruction. We need to wait for all general
slots right before issuing the BARRIER in addition to the general wait on the
BARRIER itself. I don't know if this is a hardware bug or some hideous
gate-saving quirk, but I observe the Mali-G78 DDK using the same workaround,
which implies this really is necessary.

Fixes rare flakes in:

   dEQP-GLES31.functional.compute.shared_var.work_group_size.float_128_1_1

Note that the flakes from that test are extremely timing dependent. Without this
change, that test is racy but we almost always win the race. Reproducing the
issue reliably requires high system load (e.g. running the CTS in the
background) and simultaneously running that test a large number of times.

Minimal shader-db impact. In particular, no cycle count regressions.

total instructions in shared programs: 2699419 -> 2699458 (<.01%)
instructions in affected programs: 22014 -> 22053 (0.18%)
helped: 2
HURT: 25
helped stats (abs) min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.12% max: 0.12% x̄: 0.12% x̃: 0.12%
HURT stats (abs)   min: 1.0 max: 3.0 x̄: 1.64 x̃: 1
HURT stats (rel)   min: 0.07% max: 2.82% x̄: 0.69% x̃: 0.49%
95% mean confidence interval for instructions value: 1.01 1.87
95% mean confidence interval for instructions %-change: 0.38% 0.88%
Instructions are HURT.

total cvt in shared programs: 14468.81 -> 14469.42 (<.01%)
cvt in affected programs: 221.33 -> 221.94 (0.28%)
helped: 2
HURT: 25
helped stats (abs) min: 0.015625 max: 0.015625 x̄: 0.02 x̃: 0
helped stats (rel) min: 0.18% max: 0.18% x̄: 0.18% x̃: 0.18%
HURT stats (abs)   min: 0.015625 max: 0.046875 x̄: 0.03 x̃: 0
HURT stats (rel)   min: 0.10% max: 4.44% x̄: 1.06% x̃: 0.79%
95% mean confidence interval for cvt value: 0.02 0.03
95% mean confidence interval for cvt %-change: 0.57% 1.36%
Cvt are HURT.

total quadwords in shared programs: 1462496 -> 1462528 (<.01%)
quadwords in affected programs: 4632 -> 4664 (0.69%)
helped: 0
HURT: 4
HURT stats (abs)   min: 8.0 max: 8.0 x̄: 8.00 x̃: 8
HURT stats (rel)   min: 0.35% max: 7.69% x̄: 4.03% x̃: 4.03%
95% mean confidence interval for quadwords value: 8.00 8.00
95% mean confidence interval for quadwords %-change: -2.71% 10.76%
Inconclusive result (%-change mean confidence interval includes 0).

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17091>
2022-06-21 22:19:59 +00:00
Alyssa Rosenzweig 7fa545528d pan/va: Simplify insert flow tests
Test cases for insert flow are necessarily the reference test cases with the
NOPs stripped out. That means we don't need to duplicate the test bodies.
Deduplicate.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17091>
2022-06-21 22:19:59 +00:00
Alyssa Rosenzweig 35fcf8d3d7 pan/va: Move VA_NUM_GENERAL_SLOTS to common
This definition is a hardware property. It's not specific to the flow control
insertion pass, so move it to common code where other passes can use it.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17091>
2022-06-21 22:19:59 +00:00
Emma Anholt 5f09b1ebe9 ci/bare-metal: Add test phase timeouts to all boards.
This should help with "marge got stuck for an hour and all I got was this
failed job with no results/" when a system intermittently wedges.

This replaces the BM_POE_TIMEOUT ("did we get something on serial in the
last 3 minutes?") that rpi had, in favor of checking that the whole test
job gets through in 20 minutes.

Acked-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17096>
2022-06-21 21:38:25 +00:00
Danylo Piliaiev 909e7aaf57 tu: Reset xfb_used at the end of a renderpass
Otherwise xfb_used could be true until the end of command buffer,
which is not what we intended it to be.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17162>
2022-06-21 21:15:10 +00:00
Emma Anholt 086faecbba turnip: Document some fields about resolves.
I noticed the unk12 pattern, and cwabbott and danylo had figured out some
more details.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17126>
2022-06-21 19:40:58 +00:00
Lionel Landwerlin efc398c722 vulkan/wsi: fix crash with debug names on swapchain
If you set a name of on a swapchain object, because the base object
struct has not been initialized with a VkDevice,
vk_object_base_finish() will segfault when trying to free the object
name.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: cb1e0db23e ("vulkan/wsi: Make wsi_swapchain inherit from vk_object_base")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17165>
2022-06-21 17:05:10 +00:00
Lionel Landwerlin 4f10eddf77 anv: fix index buffer emission
In the following case :

  vkCmdBindPipeline(compute_pipeline);
  vkCmdDispatch(...);
  vkCmdBindPipeline(graphics_pipeline);
  vkCmdBindIndexBuffer(buffer)
  vkCmdDraw(...);

We're emitting the 3DSTATE_INDEX_BUFFER instruction while the HW is
still in GPGPU mode, because we're dealing the pipeline selection to
vkCmdDraw().

Found while debugging Age Of Empire 4, HW is hung on
3DSTATE_INDEX_BUFFER instruction.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17153>
2022-06-21 16:24:10 +00:00
Timur Kristóf 21ea19d504 zink: Always enable depth clamping, make depth clipping independent.
Enabling depth clamping ensures that the Vulkan driver respects
the depth range that zink sets on viewport objects in zink_draw.

When depth clipping is required, use VK_EXT_depth_clip_enable to
enable that independently of depth clamping.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16929>
2022-06-21 15:44:54 +00:00
Timur Kristóf 82e08f6b1e zink: Enable the VK_EXT_depth_clip_enable extension.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16929>
2022-06-21 15:44:54 +00:00
Timur Kristóf 810135fb42 gallium/u_blitter: Fix depth.
Fix the transform to make sure it doesn't disturb the depth range
of the blitted image. Set the Z coordinates of the vertices
by hand instead of relying on the transform to do it.

This is a pre-requisite to Zink always enabling depth clamping.

Fixes: 26c6640835
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16929>
2022-06-21 15:44:54 +00:00
Sarah Walker ee491967c3 pvr: Update for firmware 1.17@6256262
Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17139>
2022-06-21 15:09:10 +00:00
Danylo Piliaiev 48540caec9 tu: Disable sample counting for 3d blits during occlusion query
Per Vulkan spec only "Draw" commands should be counted towards
occlusion query.

Apparently RB_SAMPLE_COUNT_CONTROL::UNK0 bool controls whether
sample counting is enabled, so we could use it to disable
sample counting for 3d blits which are sometimes used for
clear/copy/blit/gmem-store/resolve operations.

Fixes GL CTS tests running through Zink:
 dEQP-GLES3.functional.occlusion_query.depth_clear
 dEQP-GLES3.functional.occlusion_query.depth_clear_stencil_clear
 dEQP-GLES3.functional.occlusion_query.scissor_depth_clear_stencil_clear
 dEQP-GLES3.functional.occlusion_query.scissor_stencil_clear
 dEQP-GLES3.functional.occlusion_query.stencil_clear

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6559

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17138>
2022-06-21 13:13:36 +00:00
Gert Wollny 0c3fae4e6e virgl: Don't let ntt optimize the register allocation
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15995>
2022-06-21 11:24:09 +00:00
Martin Roukala (né Peres) 677a42378b ci/radv: add a missing flake
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17131>
2022-06-21 13:11:05 +03:00
Martin Roukala (né Peres) f86e12743c ci/radv: move a test from the fail list to the flake list
The test was misidentified as a "fail", when it actually has a very
high failure rate (>95%). The test happened to pass twice within the
last week, so let's mark this test as a flake.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17131>
2022-06-21 13:10:51 +03:00
Boris Brezillon d232f5a026 dzn: Fix the 2DMSArray case in dzn_image_get_dsv_desc()
Texture2DMSArray element is not initialized, making 2DMSArray DS
views buggy.

Reported-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17158>
2022-06-21 08:39:40 +00:00
Samuel Pitoiset 6cab999d6a radv,aco: rename radv_prolog_binary/radv_shader_prolog to shader_part
The same structures and functions will be re-used for PS epilogs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17084>
2022-06-21 08:04:50 +00:00
Christian Gmeiner 5cce02325c ir3: Create at least one thread for async shader compile
On a single core CPU system we end with num_threads being 0 and we do
_NOT_ create any async compile threads in util_queue_init(..).

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17124>
2022-06-21 07:18:56 +00:00
Christian Gmeiner 3196bde941 freedreno: Wait for async compile jobs to finish
initial_variants_synchronous(..) allows initial shader variant
compilation asynchronously if debug.debug_message == NULL. If the
debug callback gets changed it seems like a good idea to wait until
all async shader compiles are done.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17124>
2022-06-21 07:18:56 +00:00
Vinson Lee 081b1eeacd microsoft/compiler: Fix assert.
Fix defect reported by Coverity Scan.

Side effect in assertion (ASSERT_SIDE_EFFECT)
assignment_where_comparison_intended: Assignment var->type =
glsl_int_type() has a side effect. This code will work differently in a
non-debug build.

Fixes: afb64e10c1 ("microsoft/compiler: Move d3d12_fix_io_uint_type() to dxil_nir.c")
Suggested-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17097>
2022-06-21 06:54:18 +00:00
Vinson Lee 2b87073133 radv: Remove unnecessary null check.
Fix defect reported by Coverity Scan.

Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking subpass suggests that it may be null,
but it has already been dereferenced on all paths leading to the check.

Fixes: 779e09639b ("radv: configure DB_Z_INFO.NUM_SAMPLES correctly on GFX11")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17100>
2022-06-21 04:00:46 +00:00
Filip Gawin 6cbb19110b r300: prefer old not native swizzle in constant folding
r300 and r400 have strict rules with swizzles, so we
will need to convert swizzle back.

Operating on 0, 1, H in this case unnecessarily makes
rest of r300 overly complicated.
(also it's not currently able to handle this)

helps with:
deqp-gles2@functional@shaders@random@exponential@fragment@24

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17117>
2022-06-20 19:10:00 +00:00
Alyssa Rosenzweig b6a30b72ab panfrost: Implement provoking vertices on Valhall
Starting with Valhall, the provoking vertex state is specified per-framebuffer
(batch) instead of per-draw. We use the pan_tristate infrastructure to translate
between desktop OpenGL's per-draw semantics to Valhall's per-framebuffer
semantic. This is notably not required for GLES or Vulkan.

If the provoking vertex is unset when the tiler context is generated, it could
be set (incompatibly) later in the batch, and the tiler context's provoking
vertex field would no longer match the framebuffer's. That would violate a
hardware invariant. To ensure that doesn't happen, we make sure to set provoking
vertexes *before* generating the tiler context so it can't change after.

Fixes arb-provoking-vertex-render on Valhall.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17068>
2022-06-20 18:38:16 +00:00
Alyssa Rosenzweig 9cdd32257f panfrost: Add tristate_is_defined helper
This is useful to ensure that the tri-state has been set. It could be inlined,
but the tri-state structure is designed to be opaque so this matches better.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17068>
2022-06-20 18:38:16 +00:00
Alyssa Rosenzweig 950d27f9bf panfrost: Fix batch state changes on Valhall
If we need to change batch state (currently just point coord origins), not only
do we need to flush the old batch, but also set the desired state on the new
batch. That second step was missing. Fix that so this mechanism works as
intended.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Fixes: 3641dfe436 ("panfrost: Flip point coords in hardware")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17068>
2022-06-20 18:38:16 +00:00
Alyssa Rosenzweig e9190c45d5 panfrost: Disable QUADS on Valhall
Even with the fixes in the rest of the series, arb-provoking-vertex-render is
still failing on Valhall for a single subcase (involving QUADS). It seems likely
that QUADS support is broken on Valhall, given it's not used in any of the APIs
for which Arm ships drivers.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17068>
2022-06-20 18:38:16 +00:00
Marcin Ślusarz 008163f382 intel/compiler: vectorize task payload loads/stores
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17000>
2022-06-20 17:38:20 +00:00
Marcin Ślusarz 97b53ad759 nir/opt_load_store_vectorize: handle task payloads
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17000>
2022-06-20 17:38:20 +00:00
Karmjit Mahil fad7e858f2 pvr: Extend hard coding infra to allow per stage per device coding.
This commit extends the graphics hard coding infrastructure to
allow the independent hard coding of stages, i.e. hard code fragment
stage and vertex stage separately instead of having to hard code
everything.

It also extends the infrastructure to allow per device hard coding.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17106>
2022-06-20 16:59:01 +00:00
Karmjit Mahil c6933cc9de pvr: Enable 33.15.11.3 (AXE-1-16M).
This commit adds 33.15.11.3 in the supported BVNCs and addresses
differences in the descriptor limits between devices so that the
physical device limit is accurate.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17106>
2022-06-20 16:59:01 +00:00
Frank Binns 62cc9bba06 pvr: Add TI AM62 as a supported device.
The AM62 platform contains an IMG AXE-1-16M GPU.

Co-Authored-By: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17106>
2022-06-20 16:59:01 +00:00
David Heidelberg 57ad38c2fc ci/freedreno: disable non-existing trace
Never existed in the repository.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17137>
2022-06-20 16:36:10 +00:00
Juan A. Suarez Romero c0626a6bd2 v3dv/ci: Update expected results
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17141>
2022-06-20 15:37:39 +00:00
Boris Brezillon 1987fb0091 ci/dzn: Move to a .toml description
This way we don't force a CI run on all platforms anytime we add a
group of test, and, as a bonus, we make dozen CI consistent with other
platforms.

Suggested-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Suggested-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17074>
2022-06-20 14:48:51 +00:00
David Heidelberg dfe9b856cb ci/freedreno: update restricted traces to the brotli compressed version
Save some space on proxies and speedup network transfer to the runners.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17016>
2022-06-20 12:42:41 +00:00
Matti Hamalainen 11ac33c2a9 gallium/tools: fixes to option handling
Not all options in the options object are set by all tools.
Instead of using argparse result objects directly, use separate
with default settings and copy relevant attributes there.

Signed-off-by: Matti Hamalainen <ccr@tnsp.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17108>
2022-06-20 12:35:53 +00:00
Mykhailo Skorokhodov 50b21fb6e4 anv: Use sampleLocationsEnable for sample locations
The spec says: "sampleLocationsEnable controls whether custom sample
locations are used. If sampleLocationsEnable is VK_FALSE, the default
sample locations are used and the values specified in
sampleLocationsInfo are ignored."

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6675
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17134>
2022-06-20 11:58:09 +00:00
Erik Faye-Lund 419b8c7f8d dzn: correct order of src_subres and dst_subres args
Fixes: 2d0798440b ("dzn: Add support for dynamic rendering")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17133>
2022-06-20 11:16:15 +00:00
Georg Lehmann 7afecd8ad8 radv: Check descriptor pool entry count before allocating a new set.
It's simpler and more efficient.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17127>
2022-06-20 10:50:01 +00:00
Georg Lehmann ceb3ae2afb radv: Remove redundant memset in radv_descriptor_set_create.
The memset below also clears this memory, plus the descriptor set header.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17127>
2022-06-20 10:50:01 +00:00
Karmjit Mahil 7c25c6f04e pvr: Add graphics pipeline hard coding infrastructure.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16999>
2022-06-20 08:13:11 +00:00
Karmjit Mahil e47350a245 pvr: Remove unused output_selects from vertex shader state.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16999>
2022-06-20 08:13:11 +00:00
Karmjit Mahil 66f4c9abc9 pvr: Change compute hard coding infrastructure.
This commit changes the way in which the hard coding is done in
the compute pipeline to allow easier hard coding for demos other
than the simple-compute demo.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16999>
2022-06-20 08:13:11 +00:00
Marcin Ślusarz 4e4ef72aac intel/dev: fixup max_cs_workgroup_threads after hwconfig is read
Without it we get max value from gfx12 on gfx>12.

Fixes: d9ff9ea9c3 ("intel/dev: Read hwconfig from i915")

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17063>
2022-06-20 07:43:43 +00:00
Samuel Pitoiset 5485bf7b1b aco: fix validation of SOP1 instructions without definitions
Like s_setpc_b64.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17082>
2022-06-20 07:08:28 +00:00
Samuel Pitoiset 6dd2699e9f radv/amdgpu: do not add "global" BO to the virtual BO list
To avoid dangling BO references if it's destroyed without being
previously unbound. This is under Vulkan spec clarification but it
looks like the "global" BO fix is simple enough to workaround the
issue for now.

This fixes a CPU hang with Halo Infinite because the kernel rejects
a submission (invalid BO handle found).

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17085>
2022-06-20 06:43:53 +00:00
Samuel Pitoiset b4cc10b342 radv/amdgpu: make sure to reset the number of BO when there is no ranges
If an application binds a sparse resource and then unbind it with NULL,
the number of "real" BOs in the virtual BO list should be reset to 0.
Otherwise, it might use a dangling BO reference if it's destroyed just
after being unbound.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17085>
2022-06-20 06:43:53 +00:00
Mike Blumenkrantz 6072d5d8dc zink: ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17111>
2022-06-20 00:50:48 +00:00
Mike Blumenkrantz 420270cb4f zink: relax zink_resource_buffer_needs_barrier checks
this now matches zink_resource_image_needs_barrier

cc: mesa-stable

Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17111>
2022-06-20 00:50:48 +00:00
Mike Blumenkrantz f889bece46 zink: don't short-circuit gfx stage finding during barrier generation
according to spec, all stages must be specified, not just the first one

Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17111>
2022-06-20 00:50:48 +00:00
Mike Blumenkrantz 1fa3f03442 zink: collect gfx stages for all bindings during barrier generation
it's important to get the full mask in order to accurately provide
dependency info

Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17111>
2022-06-20 00:50:48 +00:00
Mike Blumenkrantz 9e3ed65324 zink: add a #define for vk shader bits
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17111>
2022-06-20 00:50:48 +00:00
Mike Blumenkrantz 80569f9e5f zink: track image binds
track all the things

Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17111>
2022-06-20 00:50:48 +00:00
Mike Blumenkrantz 47361daffc zink: rework buffer barrier generation
by passing through the draw buffers, more accurate barriers can be generated
to ensure synchronization for both the draw buffer scopes and
descriptor binding scopes

ref #6597

Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17111>
2022-06-20 00:50:48 +00:00
Mike Blumenkrantz db0fda6f36 zink: track vertex buffer bind counts on resources
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17111>
2022-06-20 00:50:48 +00:00
Mike Blumenkrantz 7b88dbfd78 zink: move draw-time barrier generation down a little
ensure that this occurs after potential rebind handling

Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17111>
2022-06-20 00:50:48 +00:00
Mike Blumenkrantz 9ca0c0b4b4 mesa/st: increment num_uniforms for hw accel select shaders
this otherwise breaks nir_lower_uniforms_to_ubo() and probably lots
of drivers

Fixes: 9b22ab4167 ("mesa/st: implement hardware accelerated GL_SELECT")

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17092>
2022-06-18 20:18:18 +00:00
Mike Blumenkrantz 81557a4fdf zink: unset PIPE_CAP_DITHERING
there's no point in updating blend state for this when it does nothing,
so skip updates for this functionality

in the future, I expect zink will export this conditionally based on
the underlying driver, and some sort of functionality will be implemented
to do something

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17043>
2022-06-18 17:56:28 +00:00
Mike Blumenkrantz 371660b877 mesa/st: add PIPE_CAP_DITHERING
this is for drivers like zink that may or may not
handle dithering and so getting blend state changes
when this state changes isn't useful

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17043>
2022-06-18 17:56:28 +00:00
Martin Roukala (né Peres) 8a9f7087a1 radv/ci: test vkd3d on kabini
The machine is extremely slow and fails to finish vkcts, but vkd3d may
still be used as a way to detect extreme regressions.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17081>
2022-06-18 19:33:24 +03:00
Jason Ekstrand 7a8ec23c9d anv: Properly clamp attachment layer counts
Vulkan requires that the acutal layer count come from
VkRenderingInfo::layerCount or VkFramebufferCreateInfo::layers rather
than from the image view itself.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17060>
2022-06-17 18:33:58 -05:00
Chia-I Wu 858cd2797c freedreno/fdl: use XYZW swap for PIPE_FORMAT_X24S8_UINT
We used to use WZYX and apply swizzles.  Because swizzles apply for
border colors as well, the gallium driver un-swizzled the border colors
to cancel out swizzles.  That did not work for turnip because turnip
advertises customBorderColorWithoutFormat and does not know when to
un-swizzle.

This change replaces WZYX by XYZW and removes the swizzles.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6516
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16647>
2022-06-17 18:39:47 +00:00
Icecream95 d8803c724b panfrost: Remove sync arguments from panfrost_batch_submit
Whether a sync object is used cannot depend on where the batch is
submitted from, remove the in_sync and out_sync fields from
panfrost_batch_submit.

Always use an output syncobj, this is required for glFinish to work
correctly. This could be skipped for batches which another batch
depends on, but because of the existence of empty batches which emit
no job, doing so is not trivial.

Never use an input syncobj. There appears to be no point to this, the
kernel driver does implicit sync anyway.

Fixes "seconds per frame" rendering with Neverball; previously, every
batch was submitted with out_sync=0, so DRI's frame throttling could
do nothing. New jobs would keep getting submitted until more than a
thousand were queued in the kernel, which increased rendering latency
for the compositor far beyond acceptable levels.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16966>
2022-06-17 18:13:46 +00:00
Icecream95 b538519bbc panfrost: Use a macro for checking for a shared bind type
PAN_BIND_SHARED_MASK is all binding flags that mean that a resource
might be shared and accessible by other contexts.

Don't replace the usage of this pattern in panfrost_should_afbc and
panfrost_should_tile in case a new binding is introduced that not all
layouts can support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16966>
2022-06-17 18:13:46 +00:00
Andres Calderon Jaramillo cd04679a08 mesa/st: Account for YUV color space and range.
This patch plumbs the YUV color space and range provided through
EGL_EXT_image_dma_buf_import all the way to nir_lower_tex().

NIR already accounts for the YUV color space courtesy of commit
d8fdb8da. However, the color space was wired only for i965/i915 (see
6c11a799) and not for Gallium.

Tested-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16651>
2022-06-17 17:25:44 +00:00
Andres Calderon Jaramillo a5d09d7a0a nir: Account for YUV range.
This patch expands on what commit
d8fdb8dab4 did. It adds support for
YUV-to-RGB conversions depending on the range of the YUV samples.

The conversion matrices and offsets are derived from
https://gist.github.com/yohhoy/dafa5a47dade85d8b40625261af3776a.

Tested-by: Andres Calderon Jaramillo <andrescj@chromium.org>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16651>
2022-06-17 17:25:44 +00:00
Ian Romanick 676acfe956 intel/fs: Add missing synchronization for WaW dependency
v2: Do the synchronization in the correct place.  Noticed by Curro.

Fixes: b5fa43952a ("intel/fs: Better handle constant sources of FS_OPCODE_PACK_HALF_2x16_SPLIT")
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Tested-by: Felix DeGrood <felix.j.degrood@intel.com> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17037>
2022-06-17 17:05:43 +00:00
Lionel Landwerlin 03e543a422 intel/validator: validate dst/src types against devinfo support
v2: deal with src3_a1/src3_a16 instruction types (Curro)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16985>
2022-06-17 15:43:05 +00:00
Ken Johnson 2866ae32da mesa/main: Correct alloca() use without #include "c99_alloca.h"
Fixes: d231f95591 ("mesa: add hw select name stack code path")

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17073>
2022-06-17 14:24:47 +00:00
Mike Blumenkrantz d275765630 zink: print runtime warning on missing EXT_border_color_swizzle
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17029>
2022-06-17 01:32:25 +00:00
Mike Blumenkrantz 46b4017b37 zink: use VK_EXT_border_color_swizzle
if borderColorSwizzleFromImage isn't supported, assume the border color
must be pre-swizzled

fixes #6651

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17029>
2022-06-17 01:32:25 +00:00
Mike Blumenkrantz 1effd3be67 zink: hook up VK_EXT_border_color_swizzle
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17029>
2022-06-17 01:32:25 +00:00
Mike Blumenkrantz be4f120476 zink: be a little selective about BAR fallback memory type
some resources MUST be host-visible, so use the appropriate heap for them

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17093>
2022-06-17 01:14:45 +00:00
Mike Blumenkrantz 5750050432 zink: move BAR allocation demotion up the stack
having this so far down in the BO allocation path meant that slabs were
getting demoted to device-local and then stored as BAR in the pb cache,
which broke the cache pretty badly

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17093>
2022-06-17 01:14:45 +00:00
Mike Blumenkrantz d63e04e583 zink: store and reuse memory heap flags for buffer placement
the flags in vk_domain_from_heap() are the MINIMUM required flags for
the heap, but there may be other flags present, so ensure those are picked
up as expected

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17093>
2022-06-17 01:14:45 +00:00
Mike Blumenkrantz ce5aa07db1 zink: fix buffer transfer flushes with offsets
the src and dst ofsets need to be adjusted by the base map offset
in order to flush the correct region

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17095>
2022-06-17 00:56:33 +00:00
Mike Blumenkrantz 28d23c9e26 zink: use only the extents for buffer unmap flushes
flush_region is relative to the map, so passing in the offsets again
breaks the flush (if the flush hook is implemented correctly)

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17095>
2022-06-17 00:56:33 +00:00
Mike Blumenkrantz 2645430b06 zink: unify actual map calls in buffer mapping
make this a bit easier to debug by moving the calls to one place

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17095>
2022-06-17 00:56:33 +00:00
Mike Blumenkrantz dd5d215c62 zink: rename a variable
make this a little clearer to read

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17095>
2022-06-17 00:56:32 +00:00
Yiwei Zhang b37d97bb86 venus: resolve YV12 AHB to VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM
YV12 is a 3-plane format with minigbm. This change mitigates the crash
of testGLViewLargerHeightDecodeAccuracy[4], and successfully creates the
host side image and imports the memory.

vk_format(1000156002) drm_fourcc(842094169)
offsets(0, 27648, 34560, 0)
strides(256, 128, 128, 0)
modifier(0)

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16913>
2022-06-17 00:40:10 +00:00
Brian Paul a7911faa95 gallivm: use enum types instead of unsigned in lp_bld_sample.[ch]
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul 86c9f3f034 draw: asst. clean-up in draw_vbuf.h
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul 63457cb63d draw: asst. clean-up in draw_pt_vsplit.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul f0dfc05660 draw: asst. clean-up in draw_pt_util.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul 9586a38e39 draw: asst. clean-up in draw_pt_fetch_shader_pipeline.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul fcdbf7112c draw: asst. clean-up in draw_pt_fetch_shader_emit.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul 2eabffdd86 draw: asst. clean-up in draw_pt.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul a8cb20339c draw: asst. clean-up in draw_pt.h
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul 824ccace17 draw: asst. clean-up in draw_private.h
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul 91a21fb519 draw: asst. clean-up in draw_pipe_validate.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul 49a115e86c draw: asst. clean-up in draw_pipe.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul 7e1a1e898a draw: asst. clean-up in draw_gs.h
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul 14d4fe286b draw: asst. clean-up in draw_context.h
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul b2d9be8627 draw: s/unsigned/enum pipe_prim_type/
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul e20664cbc3 llvmpipe: asst. clean-ups in lp_state_fs.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul c5521d5af1 gallivm: asst. clean-ups in lp_bld_logic.
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul eef5e6ac7c llvmpipe: s/unsigned/enum pipe_compare_func/
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul 9c19ed1b88 llvmpipe: use enum blend types instead of unsigned
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Brian Paul cde8d3479e llvmpipe: minor clean-up in lp_state_blend.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17064>
2022-06-16 23:46:23 +00:00
Mike Blumenkrantz 8987e266e4 kmsro: add error message on drm ioctl failure
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16949>
2022-06-16 23:15:09 +00:00
Mike Blumenkrantz c24d8ba316 drisw: probe kms if fd is passed
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16949>
2022-06-16 23:15:09 +00:00
Jesse Natalie 7a9617b869 dzn: Skip another test that times out occasionally
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17089>
2022-06-16 23:00:27 +00:00
Dave Airlie 6e5d126a65 llvmpipe: disable alpha test branch if multisample is enabled.
If multisample is enabled and alpha testing happens, the
branch can jump out of the fragment shader before the other
samples are generated. Just don't take the branch optimisation
post alpha test if multisample is enabled.

This should fix some rendering bugs in kicad with multisample
enabled.

Cc: mesa-stable
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17049>
2022-06-16 22:45:13 +00:00
Mike Blumenkrantz 18585cac04 zink: radv baseline updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17088>
2022-06-16 22:28:27 +00:00
Yonggang Luo d39553da10 ci/vs2019: Upgrade Windows 10 SDK version to 20348
This comes with stdalign.h for more C11 conformance

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17044>
2022-06-16 21:49:54 +00:00
Yonggang Luo 2d934ac110 meson: Use cc.get_argument_syntax instead cc.get_id when possible.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17065>
2022-06-16 19:59:58 +00:00
Yonggang Luo 1173c0f33a meson: Using get_argument_syntax as the `--compiler_id` option for gen_vs_module_defs.py
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17065>
2022-06-16 19:59:58 +00:00
David Heidelberg 2df90aa562 ci/iris: disable Blender Diorama trace (incompatible with perf. traces)
Sadly, Blender Diorama trace causes crash for our performance tracing as we
use it right now.

Let's disable it for now, until we figure out what's wrong.

Reported in: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6676

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17083>
2022-06-16 19:07:15 +00:00
Yiwei Zhang d7f2e6c8d0 venus: add fence feedback
- intercept to record feedback cmds for:
  - vkQueueSubmit
- add feedback code path for
  - vkGetFenceStatus
  - vkResetFences
- VN_PERF_NO_FENCE_FEEDBACK can disable fence feedback

Test: dEQP-VK.synchronization.basic.fence.*
Test: dEQP-VK.wsi.android.swapchain.render.basic*
Test: dEQP-VK.api.object_management.*
Test: dEQP-VK.api.external.fence.sync_fd.*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16731>
2022-06-16 19:00:36 +00:00
Yiwei Zhang 9f9d543b12 venus: renderer to store allow_vk_wait_syncs capset
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16731>
2022-06-16 19:00:36 +00:00
Yiwei Zhang 8ecac4c063 venus: create per queue family command pool for feedback cmd
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16731>
2022-06-16 19:00:36 +00:00
Yiwei Zhang 1a7632e54b venus: add NO_FENCE_FEEDBACK perf option and disable sparse resource
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16731>
2022-06-16 19:00:36 +00:00
Yiwei Zhang 942ec179f3 venus: add event feedback
- add perf option VN_PERF_NO_EVENT_FEEDBACK
- intercept to record feedback cmds for:
  - vkCmdSetEvent
  - vkCmdResetEvent
- add feedback code path for
  - vkGetEventStatus
  - vkSetEvent
  - vkResetEvent

Test: dEQP-VK.synchronization.basic.event.*
Test: dEQP-VK.api.command_buffers.record_simul*

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16731>
2022-06-16 19:00:36 +00:00
Yiwei Zhang f2563788a1 venus: add feedback check/set/reset helpers
Implemented:
- vn_feedback_get_status
- vn_feedback_reset_status
- vn_feedback_set_status
- vn_feedback_get_counter
- vn_feedback_set_counter

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16731>
2022-06-16 19:00:36 +00:00
Yiwei Zhang e52da323b0 venus: add vn_feedback_pool backed by coherent buffer (part 2)
Implemented:
- vn_feedback_pool_alloc
- vn_feedback_pool_free

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16731>
2022-06-16 19:00:36 +00:00
Yiwei Zhang 27a24caf16 venus: add vn_feedback_pool backed by coherent buffer (part 1)
Implemented:
- vn_feedback_pool_init
- vn_feedback_pool_fini

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16731>
2022-06-16 19:00:36 +00:00
Yiwei Zhang d578f6c727 venus: let device track queue families used for device creation
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16731>
2022-06-16 19:00:36 +00:00
Yiwei Zhang 4cf87d8822 venus: adjust device resources init order
queue init involves fence creation, and we need to do that at the last
to prepare for other resource creation dependencies involved in fence
creation.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16731>
2022-06-16 19:00:36 +00:00
Yiwei Zhang cf55a3f70e venus: fix a missing mtx_destroy in vn_device_init
This was introduced in commit e08960482, however, the logic around has
been largly refactored since then. It's not worth adding the fixes tag.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16731>
2022-06-16 19:00:36 +00:00
Yiwei Zhang cb8dfa4966 venus: fix the queue init failure path
The prior behavior can ignore certain failure result, and might also
clean up queues that are never initialized.

Fixes: ddd7533055 ("venus: initial support for queue/fence/semaphore")

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16731>
2022-06-16 19:00:36 +00:00
Yiwei Zhang 01a0bfc3f9 venus: fix a bug on buffer cache init failure path
The failure path was never hit though, and will not either.

Fixes: 65abd1d4ae ("venus: implement vn_buffer_cache_entries_create")

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16731>
2022-06-16 19:00:36 +00:00
Samuel Pitoiset 16c47ad347 radv: advertise VK_EXT_border_color_swizzle on GFX10+
On GFX9 and older, the driver needs to swizzle itself it seems.
Exposing it on GFX10+, allows us to test it with Zink, at least.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17057>
2022-06-16 18:31:33 +00:00
Mike Blumenkrantz 09a7304d5a zink: tu ci baseline update
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17080>
2022-06-16 15:18:45 +00:00
Iván Briano 4666ef720e anv: do not get rid of empty/useless fragment shaders
This was an optimization done a while ago that doesn't seem to be having
much of an impact anymore, and on the other hand, causes all sorts of
breakage with queries, as many of our HW counters don't get incremented
when rasterization is disabled.

This fixes a bunch of issues Zink has with ANV, but more importantly, it
fixes upcoming CTS tests:
dEQP-VK.transform_feedback.primitives_generated_query.*.empty_frag.*
dEQP-VK.transform_feedback.primitives_generated_query.*.no_attachment.*
dEQP-VK.transform_feedback.primitives_generated_query.*.color_write_disable_*

Cc: mesa-stable

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17038>
2022-06-16 14:42:12 +00:00
Danylo Piliaiev 10f6191fb5 turnip: copy disasm strings for pipeline executables
A single compiled_shaders instance could be reused by several
pipelines, but strings from disasm info could be stolen only once.
So now we have to copy them.

Fixes crashes when using RenderDoc.

Fixes: 05329d7f9a
("tu: Implement pipeline caching with shared Vulkan cache")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17053>
2022-06-16 08:45:34 +00:00
Samuel Pitoiset 9df7ad0320 radv/ci: add vkd3d-proton testing
The vkd3d-proton can be very useful, I recently found issues while
implementing VK_EXT_primitives_generated_query and
VK_KHR_fragment_shader_barycentric.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17050>
2022-06-16 06:36:36 +00:00
Samuel Pitoiset 3f2de5e662 radv/ci: refactor test machines and dEQP rules to reduce copy&paste config
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17050>
2022-06-16 06:36:36 +00:00
Ruijing Dong 365bf2a3b0 radeonsi/vcn: support unified queue in vcn4
- use unified queue only in vcn4
 - implement signature and engine-info ib headers
   in vcn4
 - implemented unified queue functions

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16911>
2022-06-16 03:30:47 +00:00
Ruijing Dong 515112eabd radeonsi/vcn: prepare for unified queue in vcn4
- apply unified queue ib headers to vcn4
  - re-use encoding queue as unified queue
  - define unified queue functions and structures

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16911>
2022-06-16 03:30:47 +00:00
Mark Janes 7b74747854 iris: provide a callback to INTEL_MEASURE to clean up snapshots
Snapshots are processed asynchronously by INTEL_MEASURE, but snapshot
memory is allocated and associated with an iris batch.  Provide a
callback that will free snapshot memory after a batch is fully
processed.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16571>
2022-06-16 02:58:08 +00:00
Mark Janes a1a5f6430a intel: provide a callback to clean up after intel_measure_gather
The caller may have passed ownership of intel_measure_batch structures
to intel_measure until they are ready to be gathered.  The caller
needs a notification when rendering is complete and snapshots have
been processed, so it can free the resources that measure the batch.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16571>
2022-06-16 02:58:08 +00:00
Mark Janes 34a130fedf anv: fix performance bug in INTEL_MEASURE
Re-allocating the buffer object for snapshots carries a heavy penalty
at run-time.  When resetting a command buffer, the buffer object that
is allocated for snapshots may be re-used directly on subsequent
renders.

Stale snapshot data will persist in the buffer object.  To verify that
rendering is complete, zero the final timestamp value and check that
it has been written before gathering data.

Reviewed-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/16571>
2022-06-16 02:58:08 +00:00
Mark Janes c4c096e66e intel: relax assertion in INTEL_MEASURE
It is possible that a secondary command buffer was submitted with no
renders in it.  For that case, no timestamp will be collected.  Only
verify that timestamps if the index is nonzero.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16571>
2022-06-16 02:58:08 +00:00
Mark Janes 3c53c6b247 intel: parse intel_measure environment without side effects
If an application links agaist both iris and anv, they will clash when
parsing the INTEL_MEASURE environment variable.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16571>
2022-06-16 02:58:08 +00:00
Jan Beich 78523eea2f vulkan/wsi: treat EBADF as missing DMA_BUF_IOCTL_{EXPORT,IMPORT}_SYNC_FILE
FreeBSD supports DMA-BUF but not DMA_BUF_IOCTL_SYNC and similar yet.
As it returns EBADF instead of ENOTTY all consumers fail due to
VK_ERROR_OUT_OF_HOST_MEMORY.

Fixes: 30b57f10b3 ("vulkan/wsi: Signal semaphores and fences from the dma-buf")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17070>
2022-06-16 02:33:23 +00:00
Mike Blumenkrantz 1783a261f6 zink: only enable vtn debugging if validation is active
this is otherwise incredibly cumbersome and eats up minutes in ci

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17069>
2022-06-16 02:18:53 +00:00
Mike Blumenkrantz 1bd94b07f6 zink: always bind on the sparse queue
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17066>
2022-06-16 02:01:53 +00:00
Mike Blumenkrantz 0f9bc1ebe3 zink: detect sparse-only binding queue
still prefer binding on the gfx queue when available, but store a separate
sparse binding queue if necessary

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17066>
2022-06-16 02:01:53 +00:00
Mike Blumenkrantz d1456a6b0a zink: add semaphore handling for sparse binds
this is a little tricky since it's possible to need a truly unreasonable
number of sparse binds in one go, so the current implementation will
daisy-chain through the sparse submits such that:
* sparse bind A creates signal semaphore X
* sparse bind B waits on X, creates signal semaphore Y
* sparse bind C waits on Y, creates signal semaphore Z

thus, any number of sparse binds will produce exactly one semaphore
that can be waited on by the following submit

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17066>
2022-06-16 02:01:53 +00:00
Mike Blumenkrantz 285a5144cc zink: add batch api for adding a wait semaphore
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17066>
2022-06-16 02:01:53 +00:00
Mike Blumenkrantz 48b56d2efd zink: use a dynarray for semaphore wait flags
ensure that any number of semaphore waits is handled as expected

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17066>
2022-06-16 02:01:53 +00:00
Mike Blumenkrantz f5ac058812 zink: remove thread_queue
I had originally intended to hook this up properly with synchronization et al,
but I didn't do it, and now it's seeming less smart anyway, so let's
remove the footgun

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17066>
2022-06-16 02:01:53 +00:00
Connor Abbott cba6da2b21 tu: Save/restore *_BIN_CONTROL in 3d GMEM store path
These are normally only set once because it's constant across the entire
renderpass, but they're trashed by the 3d store path because it needs to
store to CCU instead of GMEM. Therefore we need to save/restore them. Do
it in a way compatible with #5181.

Fixes: b157a5d ("tu: Implement non-aligned multisample GMEM STORE_OP_STORE")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17058>
2022-06-16 01:10:24 +00:00
Connor Abbott a9d7b47613 tu: Add missing WFI to the 3d GMEM store path
Similar to the 2d path.

Fixes: b157a5d ("tu: Implement non-aligned multisample GMEM STORE_OP_STORE")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17058>
2022-06-16 01:10:24 +00:00
Connor Abbott 705c0d0373 tu: Fix 3d GMEM store swizzle in texture descriptor
Even though image views for attachments must use the identity swizzle,
there are cases where we have to add in our own swizzle, in particular
for D24S8 when the view is depth-only/stencil-only. Therefore we have to
reset it to the identity, similar to what we do with input attachments.

Fixes: b157a5d ("tu: Implement non-aligned multisample GMEM STORE_OP_STORE")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17058>
2022-06-16 01:10:24 +00:00
Rhys Perry 33e7ba2e3e aco: update SMEM offset workaround for LLVM 15
This isn't needed since LLVM 15's b0ccf38b018.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6663
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17036>
2022-06-16 00:47:51 +00:00
Mike Blumenkrantz d301883aba zink: use uint64_t for batch_id
this maps directly to the vulkan api and allows removal of timeline
wrapping code

the consequence of this is a ~0.26% reduction in drawoverhead performance
on base cases (n=1000), but the simplification and deletions seem worth it

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17045>
2022-06-16 00:30:45 +00:00
Tiago Koji Castro Shibata 4622e99e10 d3d12: fallback to integrated adapter instead of arbitrary one
Using the integrated adapter when none is specified uses less power by
default and doesn't break scenarios on Optimus systems (for example, on
Surface Books, detaching the screen gets prohibited because the GPU on
the performance base is in use)

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17005>
2022-06-16 00:19:54 +00:00
Mike Blumenkrantz 3b867ae69b zink: anv ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17061>
2022-06-16 00:05:52 +00:00
Mike Blumenkrantz bd859e1f96 zink: clamp renderpass layers better
this needs to be the minimum layer, not the maximum

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17061>
2022-06-16 00:05:52 +00:00
Mike Blumenkrantz 7edecbf4c2 zink: clamp dynamic fb layers better
this needs to be the minimum layer, not the maximum

Fixes: c81cd989c8 ("zink: use dynamic rendering (most of the time)")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17061>
2022-06-16 00:05:52 +00:00
Mike Blumenkrantz f74df6205d zink: add a function for getting the minimum framebuffer layers
this clamps the layer count to the smallest number of layers rather
than the largest

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17061>
2022-06-16 00:05:52 +00:00
Emma Anholt 979f213110 ci/iris: Disable blender-demo-cube_diorama on APL.
It has timed out on 3 jobs today.

Fixes: 96f0944a69 ("ci/panfrost: add Blender, Warzone2100, Freedoom and Unvanquished traces")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17041>
2022-06-15 23:28:23 +00:00
Connor Abbott 6dfabab08f freedreno/a6xx: Support more 3-component formats
These should be trivially enableable. This gets us some test coverage on
turnip because there are no tests of RGB32 texel buffers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16980>
2022-06-15 22:48:38 +00:00
Connor Abbott 2e63c570dd tu: Enable uniform texture buffers with NPOT formats
This is enough for zink to expose ARB_texture_buffer_object_rgb32 and
therefore GL 4.0. We could enable sampled images with a few more
workarounds, but the blob doesn't bother and there isn't any need at the
moment.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16980>
2022-06-15 22:48:38 +00:00
Boris Brezillon db2d264989 dzn: Enable support for geometry shaders
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17039>
2022-06-15 22:04:01 +00:00
Boris Brezillon e9066ff2be dzn: Disable rasterization if the last geometry stage doesn't write the position
If we don't do that, and we get passed a dummy geometry shader (one
that has no EmitVertex() calls) we get a DXIL validation error.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17039>
2022-06-15 22:04:00 +00:00
Boris Brezillon e11035bf6d microsoft/compiler: Support gl_Layer
Maps pretty nicely to SV_RenderTargetArrayIndex, so nothing complicated
here.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17039>
2022-06-15 22:04:00 +00:00
Boris Brezillon 9c45ee3f86 microsoft/compiler: Fix Layer type
DXIL wants a uint, but we get passed an int.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17039>
2022-06-15 22:04:00 +00:00
Boris Brezillon afb64e10c1 microsoft/compiler: Move d3d12_fix_io_uint_type() to dxil_nir.c
We currently have two implementations of the same logic. Let's pick
the d3d12 one, move it to dxil_nir.c and let nir_to_dxil() call it
when appropriate.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17039>
2022-06-15 22:04:00 +00:00
Boris Brezillon c9b2c79d16 d3d12: Keep access masks up-to-date when removing vars in d3d12_disable_multisampling()
Fixes: e5cf19fced ("d3d12: Modify shaders when MSAA is disabled")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17039>
2022-06-15 22:04:00 +00:00
Mike Lothian e1accb1c4c util: Fix invalid usage of alignas in u_cpu_detect.c
This fixes the following errors when compiling Mesa with Clang 14:
../mesa-9999/src/util/u_cpu_detect.c:368:5: error: expected ';' after struct
   } alignas(16) fxarea;
    ^
    ;

This has been tested with Clang 14.0.5 and GCC 12.1

Fixes: e3bc78b8e3 ("util: use c11 alignas instead of rolling our own")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6667
Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17035>
2022-06-15 21:27:57 +00:00
Marek Olšák e24354c1b2 radeonsi/gfx11: rework GDS streamout code to single-lane and enable streamout
GDS is basically scalar in gfx11.

This is not exactly how it's supposed to be done (we should be using
the GDS_STRMOUT registers), but it works.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16990>
2022-06-15 20:52:42 +00:00
Marek Olšák 44e4d42c23 radeonsi/gfx11: add missing register shadowing code
it doesn't work yet

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16990>
2022-06-15 20:52:42 +00:00
Marek Olšák fbd68a3839 radeonsi/gfx11: drop the ES vertex count requirement
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16990>
2022-06-15 20:52:42 +00:00
Marek Olšák 99fd408946 radeonsi/gfx11: don't allocate unused wait_mem_scratch
We sync using PWS instead of memory.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16990>
2022-06-15 20:52:42 +00:00
Marek Olšák 98d6a3d6c6 radeonsi/gfx11: don't use memory for waiting for cache flushes
There is a new flush/wait mechanism called PixelWaitSync that uses
an internal counter.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16990>
2022-06-15 20:52:42 +00:00
Marek Olšák 56d4e0be86 radeonsi/gfx11: synchronize correctly before setting SPI_ATTRIBUTE_RING_*
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16990>
2022-06-15 20:52:42 +00:00
Marek Olšák fa25eba744 radeonsi/gfx11: allocate more space for pipeline statistics
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16990>
2022-06-15 20:52:42 +00:00
Marek Olšák 0e8beb1eed radeonsi/gfx11: compile monolithic PS if it writes memory
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16990>
2022-06-15 20:52:42 +00:00
Marek Olšák ee7150da79 amd/gfx11: add PixelWaitSync packet fields
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16990>
2022-06-15 20:52:42 +00:00
Marek Olšák 7d8847d963 ac/llvm: fix tcs_wave_id unpacking on gfx11
no effect on behavior because the higher bits are always zero

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16990>
2022-06-15 20:52:42 +00:00
Emma Anholt ae432b67b7 ci/dzn: Skip a test that intermittently times out at a minute.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17054>
2022-06-15 20:30:46 +00:00
Christian Gmeiner 15f394cc7a nir: Fix unused-variable compile warnings
Fixes: 8492e78f9d ("nir/deref: Handle SSBO array bindings specially")

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17021>
2022-06-15 19:43:27 +00:00
Timur Kristóf 08435b1c6f radv: Always use 3D block ID and grid size in task shaders.
These are needed to address the task draw and payload ring buffers
when the task shader dispatch is 3 dimensional.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17023>
2022-06-15 18:28:58 +00:00
Timur Kristóf 0fb9573c57 ac/nir/taskmesh: Preserve workgroup ID Y and Z when applying firstTask.
NV_mesh_shader workgroups are only 1 dimensional, so it's OK to
only add firstTask to the X dimension.
However, let's keep the Y and Z dimensions so this doesn't mess up
the workgroup ID for future 3 dimensional task shader dispatches.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17023>
2022-06-15 18:28:58 +00:00
Timur Kristóf b243e94f07 radv: Lower mesh shader 3D workgroup ID to 1D index.
This allows future mesh shaders to use a 3D workgroup ID.
Also changes how the NV_mesh_shader first_task is emulated.
The new code moves the responsibility from ac_nir into radv.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17023>
2022-06-15 18:28:58 +00:00
Timur Kristóf e05f63f56c ac/nir/ngg: Add mesh shader workgroup index.
This will allow lowering 3D workgroup ID to a 1D index.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17023>
2022-06-15 18:28:58 +00:00
Timur Kristóf 856a8acab0 radv: Enable NGG wave ID for mesh shader scratch ring.
This wave ID is used to address the scratch ring, so it should be
enabled when the scratch ring is used.

Note: the naming is confusing here, as this ID is actually the same
accross the whole workgroup. (It would be more appropriate to call
it workgroup ID instead.)

Fixes: 0280b526d5
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17022>
2022-06-15 18:05:51 +00:00
Yonggang Luo a9e2c699aa util/c11: Update function u_thread_create to be c11 conformance
Do not assume thrd_t to be a pointer or integer, as the C11 standard tells us:
  thrd_t: implementation-defined complete object type identifying a thread
At https://en.cppreference.com/w/c/thread
So we always return the thread creation return code instead of thrd_t value, and judge the return
code properly.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15087>
2022-06-15 17:37:17 +00:00
Yonggang Luo 6e33ef2bb9 c11: Implement thread_local in c11/threads.h
Use thread_local when possible

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15087>
2022-06-15 17:37:17 +00:00
Yonggang Luo 09cd5c9bdb c11: Fixes memory leak of pack in thrd_create on win32
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15087>
2022-06-15 17:37:17 +00:00
Yonggang Luo e6392fcf3d c11: Move the implementation of threads.h into c source code
By doing this, now the global variable impl_tss_dtor_tbl are only defined one time.
So the memory usage would reduced

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15087>
2022-06-15 17:37:17 +00:00
Yonggang Luo b7773fd105 util: Define WIN32_LEAN_AND_MEAN before include of `windows.h` in u_thread.h
This is a prepare for move the c11 threads implementation into c source code

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15087>
2022-06-15 17:37:17 +00:00
Yonggang Luo be00a7c8ac glx: using C++11 keyword thread_local
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15087>
2022-06-15 17:37:16 +00:00
Yonggang Luo 0f3064ee44 intel: using C++11 keyword thread_local
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15087>
2022-06-15 17:37:16 +00:00
Chia-I Wu af0080c4ef turnip: advertise VK_EXT_border_color_swizzle
We already support the functionality so just advertise it.  Pass all
dEQP-VK*border_swizzle*.

v2: update freedreno-a630-fails.txt

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17019>
2022-06-15 15:48:47 +00:00
Samuel Pitoiset 4480e577a4 zink/ci: update list of failures again
Only two tests have been fixed and the list has been incorrectly
updated.

Fixes: b240be28e3 ("zink: check for pending clears to determine write status of zs attachments")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16975>
2022-06-15 13:14:17 +00:00
Samuel Pitoiset 8589230602 radv/ci: add GLES/GLCTS testing with Zink on NAVI10
This includes GLES{2,3,21} and GL46.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16975>
2022-06-15 13:14:17 +00:00
Samuel Pitoiset 8ffabb2511 ci/valve: split .b2c-test into .b2c-test-vk and .b2c-test-gl
We have to use a different test image for GL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16975>
2022-06-15 13:14:17 +00:00
Samuel Pitoiset c895e5d140 zink/ci: change the surface type used for dEQP
This was for vk-cts-image, but it seems like Mesa CI only supports
pbuffer.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16975>
2022-06-15 13:14:17 +00:00
Brian Paul 470f8b2267 llvmpipe: asst. clean-ups in lp_scene.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16937>
2022-06-15 12:30:05 +00:00
Brian Paul 99dcb5bcec llvmpipe: asst. clean-ups in lp_tex_sample.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16937>
2022-06-15 12:30:05 +00:00
Brian Paul a14fd548f5 llvmpipe: asst. clean-ups in lp_linear_sampler.c
Whitespace fixes.
Move loop var decls into loops.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16937>
2022-06-15 12:30:05 +00:00
Brian Paul dde4f9969c llvmpipe: fix comment typo in lp_bld_interp.h
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16937>
2022-06-15 12:30:05 +00:00
Brian Paul eeb9938c64 gallivm: asst. clean-ups in lp_bld_nir.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16937>
2022-06-15 12:30:05 +00:00
Brian Paul 7f4d1c7486 llvmpipe: misc clean-ups in lp_bld_interp.c
Remove trailing whitespace.
Replace unsigned with enum types.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16937>
2022-06-15 12:30:05 +00:00
Brian Paul 846900fe3f gallivm: minor clean-ups in lp_bld_sample_soa.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16937>
2022-06-15 12:30:05 +00:00
Brian Paul 5a1ad575c8 llvmpipe: asst. clean-ups in lp_rast_priv.h
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16937>
2022-06-15 12:30:05 +00:00