Commit Graph

127385 Commits

Author SHA1 Message Date
Alyssa Rosenzweig ec35159fba panfrost: Drop rasterizer null checks in draw calls
rasterizer must be non-null when draw_vbo is called (indeed, we assert
this there), so anything in the per-draw graphics path can safely assume
we have a rasterizer object bound.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6327>
2020-08-19 08:24:37 +00:00
Alyssa Rosenzweig e46d4fe8bc panfrost: Decontextualize rasterizer
Tightens the scope.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6327>
2020-08-19 08:24:36 +00:00
Samuel Pitoiset d26f62c667 radv: track and report if a logical device is lost
This currently covers two situations where it's obvious that
the GPU hung:

1) when wait-of-idle doesn't finish in a finite time
2) when a CS submission is cancelled by the kernel

There is still probably some other situations that aren't yet handled.

According to the Vulkan spec, some operations should return
VK_ERROR_DEVICE_LOST when the corresponding logical device is
known to be lost.

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/5878>
2020-08-19 07:57:51 +00:00
Tomeu Vizoso c9c53dade0 ci: Update kernel used in LAVA to 5.8-based drm-misc
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6371>
2020-08-19 07:39:22 +00:00
Tomeu Vizoso 91cd7fe978 ci: Fix URL to imagediff page in traces dashboard
It has been updated recently.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Reviewed-By: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6185>
2020-08-19 07:47:48 +02:00
Tomeu Vizoso 922217431c ci: Test Panfrost with more traces
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Reviewed-By: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6185>
2020-08-19 07:47:48 +02:00
Tomeu Vizoso 7d5f4d3f70 ci: Split traces.yml file per driver
As drivers have been tested with more and more traces, the yml file is
becoming a bit unwieldy. As more drivers are going to be tested with
traces, and more traces will be used, split them in per-driver files so
the size stays manageable.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Reviewed-By: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6185>
2020-08-19 07:47:48 +02:00
Dave Airlie eb787773b2 llvmpipe/nir: lower some more packing at nir level.
Fixes:
dEQP-VK.glsl.builtin.function.pack_unpack.*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19 10:16:49 +10:00
Dave Airlie 95d611e036 llvmpipe: lower mul 2x32_64
Fixes:
dEQP-VK.glsl.builtin.function.integer.umulextended*
dEQP-VK.glsl.builtin.function.integer.imulextended*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19 10:16:46 +10:00
Dave Airlie 25ba200985 llvmpipe: lower cs local index from id
Fixes:
dEQP-VK.glsl.atomic_operations.*_shared

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19 10:16:43 +10:00
Dave Airlie 3cc5b75577 gallivm/nir: split tex/sampler indirect offsets
vulkan has these separate, should be fine for GL as well as
the values will be the same anyways.

Fixes:
dEQP-VK.binding_model.shader_access.secondary_cmd_buf.uniform_texel_buffer.*
dEQP-VK.binding_model.descriptorset_random.sets4.noarray.ubolimitlow.sbolimitlow.sampledimglow.outimgtexlow.noiub.uab.vert.noia*
dEQP-VK.binding_model.descriptor_copy.graphics.uniform_texel_buffer.*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19 10:16:40 +10:00
Dave Airlie e616223024 gallivm/nir: fixup compact TCS variable storage.
This fixes a lot of tessellation shaders, since tess factors
get emitted with spir-v now.

Fixes a bunch of:
dEQP-VK.tessellation*
along with 7000 others.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19 10:16:36 +10:00
Dave Airlie 597d0e9b5f gallium/nir/tgsi: add support for compact variables
vulkan tessellation uses compact variables for tess factors,
and trips over in the nir->tgsi info gathering, add support
to the info extraction for compact inputs and outputs.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19 10:16:34 +10:00
Dave Airlie fe9667e336 llvmpipe: lower uadd_carry/usub_borrow.
Fixes:
dEQP-VK.glsl.builtin.function.integer.uaddcarry.*
dEQP-VK.glsl.builtin.function.integer.usubborrow.*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19 10:16:31 +10:00
Dave Airlie 7893dfa247 gallivm/sample: fix lod query on array textures.
The lod query doesn't take a layer, but the code tries to use one,
detect lodq and don't use a layer in those cases.

There appears to be no GL tests for this behaviour, but the vulkan
CTS hits it.

Fixes:
dEQP-VK.glsl.texture_functions.query.texturequerylod.*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19 10:16:27 +10:00
Dave Airlie da4f2215aa gallivm/nir: add imod support
Just adds support for the imod instruction

Fixes:
dEQP-VK.glsl.operator.binary_operator.mod.*

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19 10:16:24 +10:00
Dave Airlie 407fa329a4 gallium/nir/tgsi: reindent some code in the nir->tgsi info (v2)
v2: Eric pointed out some code changes snuck in here.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19 10:16:16 +10:00
Dave Airlie e137bbb87f llvmpipe/cs: update compute counters not fragment shader.
This was updating the wrong counters.

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Fixes: a6f6ca37c8 ("llvmpipe: add initial shader create/bind/destroy variants framework.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19 10:16:14 +10:00
Dave Airlie 6c7383d315 vallium: fix input attachment lowering variable shadowing
This caused a bunch of tests to crash due to pos being shadowed
wrongly.

Fixes:
dEQP-VK.binding_model.descriptor_copy.graphics.input_attachment*

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Fixes: b38879f8c5 ("vallium: initial import of the vulkan frontend")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6339>
2020-08-19 10:16:09 +10:00
Hyunjun Ko e0e9712a4d freedreno: support GL_EXT_semaphore
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4565>
2020-08-18 20:40:40 +00:00
Eduardo Lima Mitev f6187aa1c3 freedreno: Enable GL_EXT_memory_object and GL_EXT_memory_object_fd
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4565>
2020-08-18 20:40:40 +00:00
Eduardo Lima Mitev e3c39e5052 freedreno: Implement pipe screen's get_device/driver_uuid()
v2: Don't need to prefix included uuid headers path with
    'freedreno'. (Rob Clark)

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4565>
2020-08-18 20:40:40 +00:00
Eduardo Lima Mitev 6bef126c62 freedreno: implement pipe screen's resource_from_memobj
v2: Use 'prsc' and 'rsc', 'pmemobj' and 'memobj' for consistency with
    rest of the code. (Rob Clark)

v3: - Use the existing flag PIPE_BIND_LINEAR instead (Marek Olšák)
    - Assert that the resource is not intended for scanout (Rob Clark)
    - Use the fd_resource_allocate_and_resolve() helper (Rob Clark)
    - Check that bo's resolved size fit into memobj's bo size (Rob Clark)

v4: Don't steal memobj's bo, but share it instead by getting a new
ref. (Rob Clark)

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4565>
2020-08-18 20:40:40 +00:00
Eduardo Lima Mitev 03fdf418a5 freedreno/layout: Move hard-coded minimum width for UBWC to a macro
This will also allow reuse of the value later in this series.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4565>
2020-08-18 20:40:40 +00:00
Eduardo Lima Mitev 536ec9d7f5 freedreno: Refactor fd_resource_create_with_modifiers() into a helper
The helper just allocates and resolves layout, but does not deal with
scanout buffers nor allocation of the actual bo.

The resolved bo size is returned as an output argument.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4565>
2020-08-18 20:40:40 +00:00
Eduardo Lima Mitev 0eecd3d684 freedreno: Implement memory object create/destroy for GL_EXT_memory_object
v2: Add implementation of fd_memobj_destroy() virtual func, which was newly
added.

v3: The memobj bo must be non-NULL and destroyed as part of memobj
destruction (instead of its reference being stolen). (Rob Clark)

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4565>
2020-08-18 20:40:40 +00:00
Eduardo Lima Mitev e48f27ee64 st: Pass TextureTiling option from texture to memory obj
If tiling is linear, also adds the corresponding pipe bind flag
to the resource template when creating a new resource from the
memory object.

Modified TexParameteri to update the TextureTiling option only when the
texObj is not immutable (before TexStorageMem*DEXT is called to create
the texture from external memory).

v2: Ensure that memory object is not NULL before setting the
TextureTiling option (fixes TexStorage*D).

v3: Also add flag PIPE_SHARED to bindings (needed for some gallium
drivers).

v4: Use PIPE_BIND_LINEAR instead of adding a new PIPE_RESOURCE_FLAG
(Marek Olšák)

Co-authored-by: Eduardo Lima Mitev <elima@igalia.com>
Co-authored-by: Eleni Maria Stea <estea@igalia.com>
Co-authored-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4565>
2020-08-18 20:40:40 +00:00
Jason Ekstrand b479de8537 spirv: Don't emit RMW for vector indexing in shared or global
Anything that fails the is_external_block check is getting the
vtn_local_load/store path which does read-modify-write which isn't
correct if the variable mode can be written cross-workgroup.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6372>
2020-08-18 20:22:05 +00:00
Bas Nieuwenhuizen f038b3a136 radv: Fix handling of attribs 16-31.
We really need to update the enum for consistency, but that involves
a bunch of GL & bitfield work which is error-prone, so since this is
a fix for stable lets do the simple things.

Confirmed that nothing in radv/aco/nir/spirv uses MAX_VERT_ATTRIB
except the one thing I bumped.

CC: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6120>
2020-08-18 20:31:21 +02:00
Bas Nieuwenhuizen 0067f89920 radv: Override the uniform buffer offset alignment for World War Z.
Game does the equivalent of a

ALIGN(..., minUniformBufferOffsetAlignment >> 4)

which breaks when said alignment is <16 with a SIGFPE.

CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6120>
2020-08-18 20:31:15 +02:00
Bas Nieuwenhuizen a1d4721e21 driconf: Support selection by Vulkan applicationName.
This adds applicationName + version through like engineName.

Rationale: A game (World War Z) includes the store name in the
executable name, so has multiple executable names.

CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6120>
2020-08-18 20:31:07 +02:00
Kristian H. Kristensen f88b9eb9c5 egl/android: Add support for CrOS buffer info perform op
This uses a new gralloc perform op that returns the buffer info we
need.  No need to guess at formats, hard code offsets and recalculate
strides.  This also gives us the format modifier as well as aux planes
for compressed RGBA buffers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6055>
2020-08-18 17:20:16 +00:00
Kristian H. Kristensen acb235c0c8 egl/android: Use droid_create_image_from_prime_fds() in get_back_bo()
This function wants to create a __DRIimage for an ANativeWindowBuffer,
which is mostly the same logic as when we create an EGLImage for an
ANativeWindowBuffer.  Reuse droid_create_image_from_prime_fds().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6055>
2020-08-18 17:20:16 +00:00
Kristian H. Kristensen cad9d42bb4 egl/android: Move droid_create_image_from_prime_fds() function up
We'll use it for get_back_bo() next.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6055>
2020-08-18 17:20:16 +00:00
Kristian H. Kristensen 5c8b67ed0c egl/android: Simplify droid_create_image_from_name() path
This can now return an __DRIimage which we'll wrap in the shared code
in dri2_create_image_android_native_buffer().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6055>
2020-08-18 17:20:16 +00:00
Kristian H. Kristensen d47b6f330c egl/android: Drop unused ctx argument
EGL_ANDROID_image_native_buffer requires the ctx argument to always be
NULL, so not point in passing it around.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6055>
2020-08-18 17:20:16 +00:00
Kristian H. Kristensen 9cc788f0ff egl/android: Look up prime fds in droid_create_image_from_prime_fds()
We always need to look them up before calling this function, so move
the lookup into the function to consolidate the code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6055>
2020-08-18 17:20:16 +00:00
Kristian H. Kristensen 972f36d8fa egl/android: Call createImageFromDmaBufs directly
Instead of building up EGL attribute lists and then having to parse
them again, call the DRI driver directly and then use the
dri2_create_image_from_dri() helper to wrap the __DRIimage in an
EGLImage.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6055>
2020-08-18 17:20:16 +00:00
Connor Abbott 7c98066e80 freedreno: Add afuc regression test
a5xx is still TODO, but at least this is a start.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6368>
2020-08-18 16:17:31 +00:00
Connor Abbott d145fcc1c1 freedreno/afuc: Install asm/disasm
Make the name a bit longer, since when installed it's not tucked away
under afuc/ anymore.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6368>
2020-08-18 16:17:31 +00:00
Connor Abbott f0b87186df freedreno/afuc: Make 0 a valid number
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6368>
2020-08-18 16:17:31 +00:00
Connor Abbott 66dd248593 freedreno/afuc: Handle xmov modifiers
Although it's kind-of similar to "(rptN)" in the shader ISA, I called it
"xmov" to make it clear that it's completely orthogonal to "(rep)",
although you certainly can use both modifiers on the same instruction.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6368>
2020-08-18 16:17:31 +00:00
Connor Abbott b2b19234d8 freedreno/afuc: Add iret
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6368>
2020-08-18 16:17:31 +00:00
Connor Abbott a2c14ac070 freedreno/afuc: Handle setsecure opcode
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6368>
2020-08-18 16:17:31 +00:00
Connor Abbott 0acc394486 freedreno/afuc: Fix printing preemptleave on a5xx
This opcode is actually used on a5xx, but I'm not sure what it's for.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6368>
2020-08-18 16:17:31 +00:00
Boris Brezillon 165009bc70 spirv: Add support for the CL Round instruction
Add a round() implementation that's conformant with the CL spec.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6256>
2020-08-18 17:09:47 +02:00
Gert Wollny 6d28270968 meson: Make some warnings handled as errors with MSVC
We should really pass the right number and parameter types to
functions.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6227>
2020-08-18 13:44:10 +00:00
Daniel Stone 45f2252879 meson: Add MSVC narrowing-int-to-char warnings
MSVC seems quite keen to warn us that we're narrowing an int into a
char, even if it fits entirely within range.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6227>
2020-08-18 13:44:10 +00:00
Tomeu Vizoso d8edf8e383 Revert "CI: Disable Panfrost T720/T760 CI"
This reverts commit 9ef192c100.

Revert "CI: Disable Panfrost T860 and AMD Stoney tests"

This reverts commit 3e447c1ad2.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6366>
2020-08-18 14:47:57 +02:00
Gert Wollny fcc7a1e7b6 gallium/aux: reorder vertex attributes in triangle fans according to PV
With triangle fans when "first vertex convention" is active the
provoking vertex is actually the second vertex so that the different
triangle can have different colors with flat shading. Take this into
account when re-ordering the vertex indices (as proposed by Erik)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5976>
2020-08-18 12:12:27 +00:00