Commit Graph

155919 Commits

Author SHA1 Message Date
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
Samuel Pitoiset 29f34cc806 ci: uprev vkd3d-proton to 39d07dea2cef34bfb3ed39741f026bc637e3eec4
The 2.6 version is old (released 4 months ago), the latest contains
even more useful tests (+2900 tests). Use the master branch by default,
so it could be regularly updated.

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/17105>
2022-06-20 07:52:02 +02: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
Martin Roukala (né Peres) f7ed0941c4 Revert "ci/valve: uprev boot2container"
This reverts commit 4824396572.

The newest version of b2c has changed the mount point of the cache
device, which is has proven to be working very well in my local
testing, but ends up confusing podman when the cache device had been
initialized using an older version of b2c. The end result is that we
end up using tmpfs to run our jobs, and some machines just run out of
RAM before the end of the job...

We'll be fixing this issue, cut a new b2c release, then re-introduce
in Mesa.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17120>
2022-06-18 16:03:58 +00: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
Rob Clark 736a07155f Revert "ci: freedreno farm is down"
They seem to be responding again.

This reverts commit 551442b53e.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17110>
2022-06-17 16:11:37 +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
Roman Stratiienko 45267d5181 Android.mk: Fix c11-related build failures
When building with Android.mk we are ending-up with:

    gcc ..... -std=gnu99 .... -std=c11 .... target.o
              ^^^^^^^^^^      ^^^^^^^^
                   |              |
    _______________^_____    _____^___________
     AOSP/KATI GENERATED      MESON GENERATED

Some compilers uses first -std=gnu99 option and ignores second,
which results:

    c99 implicit declaration of function static_assert()

This patch filters-out the first '-std=gnu99' from the cflags obtained
from AOSP/KATI dummy target output to avoid such kind of errors.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17078>
2022-06-17 12:28:46 +00:00
Martin Roukala (né Peres) 4824396572 ci/valve: uprev boot2container
The latest version of the initramfs brings in the latest podman, but
most importantly brings in the usage of collapsed sections, thus
reducing the amount of scrolling up necessary when wanting to find out
the list of failures/flakes.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17051>
2022-06-17 11:31:36 +00:00
Daniel Stone 551442b53e ci: freedreno farm is down
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17104>
2022-06-17 09:27:53 +01: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