Commit Graph

140614 Commits

Author SHA1 Message Date
Tapani Pälli 586f84ce01 mesa: fix error set for glCompressedTexSubImage calls
Desktop and ES expect a different error code here when dealing with
generic compressed format tokens. This fixes failures with upcoming
new tests for compressed texture related API calls.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11009>
2021-05-28 08:56:41 +03:00
Ian Romanick a4e1501770 mesa/st: Don't assert !unify_interfaces in the passthrough edge flags case
Technically, this is correct, and I think it's the right long-term
solution.  However, Iris has code that undoes the damage caused by
nir_lower_passthrough_edgeflags (see iris_fix_edge_flags in
iris_program.c), so it should be safe to do the lowering here.

I'm not marking this as closing mesa#4838 because I think we should move
the Iris code up to here, make a different version of the NIR pass, or
something different... to properly fix this problem.  In the mean time,
this gets a bunch of tests to stop crashing. :)

Fixes: a76ec17f12 ("mesa/st: Fix iris regression with clip distances.")
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11013>
2021-05-27 14:22:36 -07:00
Emma Anholt 9d28bac9d0 turnip: Make sure that SNORM blits don't clamp ambiguous -1.0 values.
The CTS expects that some paths transfer SNORM data exactly, but the HW
will clamp 0x80 values to 0x81 in the process.  We can treat snorm as
unorm, though, and get working compression without the clamping happening.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10735>
2021-05-27 19:27:40 +00:00
Emma Anholt 69df1e8650 turnip: Reorganize copy_format()'s switch statement.
Now that we need FALLTHROUGH macros we weren't saving much by falling
through, and things were weirdly ordered anyway with depth intermixed with
color formats and the default case tucked in the middle of the switch
statement.  Replace with pretty obvious ordering of normal color, planar
color, depth, then default.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10735>
2021-05-27 19:27:40 +00:00
Karol Herbst 8169d709c4 nv50/ir: don't optimize shl(mul_hi, a) to mul_hi
Fixes shader_storage_buffer_object.advanced-unsizedArrayLength* CTS tests

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11021>
2021-05-27 13:32:04 +00:00
Karol Herbst e7485f1294 nv50/ir: when constant folding shl(mul, a) we need to copy muls type
Also clear subop while at it as we might convert a shl.wrap to mul.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11021>
2021-05-27 13:32:04 +00:00
Antonio Caggiano 5e88a1caca panfrost: Performance configuration
Configure a panfrost performance structure with tables of categories and
counters for the current product id. An array for storing counter values
read from the GPU is also managed by this structure. A generic read
function can be used to retrieve the value of a counter from the conter
values array.

v2: Generate tables instead of calling register functions.
v3: Simplify counter read function and `pan_gen_perf.py` write method.
v4: Accumulate counter values from all cores.
v5: Wrap `STATIC_ASSERT`s within unused functions.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10844>
2021-05-27 13:24:54 +00:00
Antonio Caggiano fece367e9e panfrost: Counter definitions
Add Mali events XML files generated with Panfrost HWC helper.
https://gitlab.freedesktop.org/fahien/panfrost-hwc-helper/

v2: Restore license headers.
v3: Fix shader core and memory system counter offsets.

Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10844>
2021-05-27 13:24:54 +00:00
Pierre-Eric Pelloux-Prayer ee669227ad st/mesa: fix clearing of 1D array textures
st_gl_texture_dims_to_pipe_dims isn't usable in this case since its
API doesn't match the usage so fix up the dimensions manually.

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

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10523>
2021-05-27 14:32:01 +02:00
Tomeu Vizoso e381bc0e67 ci/freedreno: Skip Portal 2 trace on a630, due to flakiness
Sometimes the reticle is missing. Skip it for now to keep the number of
pipeline failures due to flakes low.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11033>
2021-05-27 14:07:44 +02:00
Samuel Pitoiset 380742b9f3 radv: fix missing default state for DB_DFSM_CONTROL
Fixes: 69ae02151d ("radv: remove DFSM")
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/11028>
2021-05-27 11:48:29 +00:00
Mike Blumenkrantz caa99c2064 zink: improve unsupported feature warning message
this should print the device name and the missing features in order to
be less opaque

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10959>
2021-05-27 11:40:02 +00:00
Erik Faye-Lund 7613837206 zink: use actual const for const offset
When we emit constants, we don't know what type they'll be used as, so
we just emit them as uint, and then bitcast them to whatever we need.

But this isn't a good idea for ConstOffset, which needs to actually be a
const value, and not a const value bitcasted. So we sadly have to
open-code the const emitting here to avoid the problem.

Fixes: e963d35efe1 ("zink: use ConstOffset for nir_tex_src_offset")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4831
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11032>
2021-05-27 11:16:38 +00:00
Iago Toral Quiroga 3179daf613 v3dv: add v3dv_GetImageSparseMemoryRequirements back
This one is not implemented in the common dispatch handler in terms
of its KHR_get_memory_requirements2 version, so the driver needs
to implement it.

Fixes: d87afc1acc ('v3dv: implement VK_KHR_get_memory_requirements2')
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11038>
2021-05-27 13:01:18 +02:00
Erik Faye-Lund c289e88809 docs: drop clayton from intel-ci notice
As per his request.

Reviewed-by: Clayton Craft <clayton@craftyguy.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10975>
2021-05-27 10:08:13 +00:00
Erik Faye-Lund e710b9bd7b docs: update another IRC reference
In the last round of IRC link updates, #freedesktop hadn't moved yet. Now
it has, so let's update the reference.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Clayton Craft <clayton@craftyguy.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10975>
2021-05-27 10:08:13 +00:00
Erik Faye-Lund bc1240ce94 docs: update another IRC reference
I didn't initially update this one because craftguy hadn't moved to OFTC
when I wrote the last patch. But now he has, so let's also update this
reference.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Clayton Craft <clayton@craftyguy.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10975>
2021-05-27 10:08:13 +00:00
Tomeu Vizoso 6cd37e4bf0 Partial revert of "ci: Add a manual job for tracking the performance of Freedreno"
This reverts commit 8e470457de.

Drop that jobs, as it's sometimes causing a gitlab-ci.yml parse error
that isn't readily reproducible:

Found errors in your .gitlab-ci.yml:

'a630-profile-traces' job needs 'arm_test' job but it was not added to the pipeline
'a630-profile-traces' job needs 'meson-arm64' job but it was not added to the pipeline

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11030>
2021-05-27 10:41:53 +02:00
Iago Toral Quiroga e531755451 v3dv: trivially handle VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11002>
2021-05-27 08:23:55 +02:00
Iago Toral Quiroga 597b448967 v3dv: implement VK_KHR_dedicated_allocation
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11002>
2021-05-27 08:23:55 +02:00
Iago Toral Quiroga e60b009271 v3dv: keep track of whether an image may be backed by external memory
Such images will always require dedicated allocations.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11002>
2021-05-27 08:21:15 +02:00
Iago Toral Quiroga d87afc1acc v3dv: implement VK_KHR_get_memory_requirements2
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11002>
2021-05-27 08:21:15 +02:00
Timothy Arceri 82bd970a0c Revert "util: disable glthread in CSGO"
This reverts commit 40c93e2f45.

The trust factor issue has now been resolved [1]

[1] https://github.com/ValveSoftware/csgo-osx-linux/issues/2630

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10948>
2021-05-27 05:05:16 +00:00
cheyang 4a3c715bb4 virgl:Fix the leak of hw_res used as fence
Fence destroy hw_res not dec reference.Lead leak.
Call virgl_drm_resource_reference() to release hw_res
instead of calling virgl_hw_res_destroy() directly.

Fixes: c54fb6ef3d ("virgl: Don't destroy resource while it's in use.")

Signed-off-by: cheyang <cheyang@bytedance.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lepton Wu <lepton@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11008>
2021-05-27 04:30:13 +00:00
Marek Olšák b8d59e68be gallium/u_vbuf: add a fast path to skip refcounting for uploaded user buffers
This improves performance by 23% with radeonsi and Ryzen 3900X running
the game torcs.

All vertex buffers must be user buffers to get this.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10992>
2021-05-27 01:52:13 +00:00
Mike Blumenkrantz bbbcf14311 radeonsi: clamp clear_buffer values using new util helper
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10822>
2021-05-27 00:23:04 +00:00
Mike Blumenkrantz c4d3d21024 zink: clamp clear_buffer values
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10822>
2021-05-27 00:23:04 +00:00
Mike Blumenkrantz fb2fb0d4fe gallium/aux: add helper for pre-clamping clear_buffer value to dword
copied from radeonsi

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10822>
2021-05-27 00:23:04 +00:00
Mike Blumenkrantz 8418334efe lavapipe: also ignore multiple pipeline barriers in succession
this just flushes repeatedly, which is pointless

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10762>
2021-05-27 00:12:48 +00:00
Mike Blumenkrantz df47ed074d lavapipe: skip "pipeline barriers" if they're first or last in a cmdbuf
barriers just trigger a full flush, which is unnecessary if it's:
* the first cmd in a cmdbuf, as the previous cmdbuf will have already
  flushed and so this is flushing nothing
* the last cmd in a cmdbuf, as there will be a flush immediately after
  returning from this function

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10762>
2021-05-27 00:12:48 +00:00
Mike Blumenkrantz 08a7cfce5e llvmpipe: stop accessing pipe_resource::screen internally
this breaks driver tracing

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11017>
2021-05-26 23:58:59 +00:00
Mike Blumenkrantz 09019fb456 llvmpipe: store a screen pointer in resource struct
directly accessing the pipe_resource::screen pointer crashes trace,
so it's necessary to have an unwrapped pointer available if such things
are needed

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11017>
2021-05-26 23:58:59 +00:00
Mike Blumenkrantz 621b8788bb llvmpipe: only dump tgsi shaders if they're actually tgsi shaders
this crashes otherwise

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11016>
2021-05-26 23:44:10 +00:00
Mike Blumenkrantz 9f5e4ccdb9 llvmpipe: split out scene surface init into separate function
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11015>
2021-05-26 23:32:12 +00:00
Mike Blumenkrantz a2d1b6d14f llvmpipe: split out scene surface info into separate struct
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11015>
2021-05-26 23:32:12 +00:00
Mike Blumenkrantz 614fcdc8c7 lavapipe: moar @optimize
without enough nir optimizing, some shaders fail to reduce as they should,
resulting in the wrong output

fixes dEQP-VK.graphicsfuzz.spv-stable-mergesort-flatten-selection-dead-continues

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11019>
2021-05-26 23:21:07 +00:00
Mike Blumenkrantz 5925f2ea39 llvmpipe: remove clamping to [0,1] for tri offset
this was added in 315f8daab1 without much detail, then refactored
a bunch of times, and there's even now been a comment added questioning
whether it's correct: it does not appear to be.

fixes lavapipe cts cases:
dEQP-VK.draw.inverted_depth_ranges.depthclamp_deltaone_bias_clamp_neg
dEQP-VK.draw.inverted_depth_ranges.nodepthclamp_deltaone_bias_clamp_neg

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11012>
2021-05-26 23:06:48 +00:00
Emma Anholt 26677008b9 ci/freedreno: Turn off default a530 quick_gl testing, do full quick_shader.
The quick_gl set is too unstable -- even when I switched to a consistent
set of tests, and added lots of flakes, I keep getting new ones as some
test (unclear which, but it's like 7-8 minutes into the run) kills other
innocent ones.  Until we get per process pagetables, disable this testing
by default.

However, now that we've freed up a board that was doing quick_gl, we have
time to do all of quick_shader so that piglit uprevs don't reshuffle the
test list and expose new failures.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11018>
2021-05-26 20:49:47 +00:00
Yiwei Zhang 7adb9c42e0 venus: advertise VK_ANDROID_external_memory_android_hardware_buffer
Besides advertising AHB support, for Android, we do not advertise
KHR_external_memory_fd, EXT_external_memory_dma_buf or
EXT_image_drm_format_modifier so that AHB remains the sole channel for
external resource sharing.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>
2021-05-26 20:26:19 +00:00
Yiwei Zhang 47bf8be024 venus: support AHB external format for sampler YCbCr conversion
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>
2021-05-26 20:26:19 +00:00
Yiwei Zhang 78b30a0696 venus: implement vn_GetMemoryAndroidHardwareBufferANDROID
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>
2021-05-26 20:26:19 +00:00
Yiwei Zhang 7370f33953 venus: implement AHB allocation and import (part 2/2)
TODO left to fix plane count > 1 case for external memory.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>
2021-05-26 20:26:19 +00:00
Yiwei Zhang 1743892f24 venus: implement AHB allocation and import (part 1/2)
This patch refactors the struct look up logic for memory allocation, and
it prepares the necessary info for ahb allocation and import.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>
2021-05-26 20:26:19 +00:00
Yiwei Zhang 4958ce582c venus: refactor device memory fd import
This patch wraps up fd import logic, which will be used later by ahb
import. This patch also removes a redundant check in need_bo.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>
2021-05-26 20:26:19 +00:00
Yiwei Zhang 910c0602c4 venus: implement image creation for ahb handle type
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>
2021-05-26 20:26:18 +00:00
Yiwei Zhang 19b7b09885 venus: prepare image creation helpers for AHB
Store image create info for deferred creation of AHB image.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>
2021-05-26 20:26:18 +00:00
Yiwei Zhang 53e35f716e venus: fix AHB image format properties query
1. bail early if there's no compatiable AHB format
2. check against the corresponding drm format modifier

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>
2021-05-26 20:26:18 +00:00
Yiwei Zhang 7f52544f6f venus: fix vn_GetAndroidHardwareBufferPropertiesANDROID
Append a VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT bit to pass cts.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>
2021-05-26 20:26:18 +00:00
Yiwei Zhang 8c06f018a4 venus: complete the format conversion between AHB and Vulkan
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>
2021-05-26 20:26:18 +00:00
Yiwei Zhang c82e836490 venus: tiny refactor of vn_android_get_gralloc_buffer_info
Return false if the queried drm format modifier is invalid.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10960>
2021-05-26 20:26:18 +00:00