Commit Graph

2825 Commits

Author SHA1 Message Date
Connor Abbott 952ab4f64f tu: Enable subgroupBroadcastDynamicId
It's a Vulkan 1.2 only feature, but it's trivially supported.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13756>
2021-11-12 18:14:34 +00:00
Hyunjun Ko ddb3d30d47 turnip: Enable VK_KHR_separate_depth_stencil_layouts
We now start handling depth/stencil layouts separately when
adding implicit subpass dependancies.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13057>
2021-11-12 13:16:23 +00:00
Christian Gmeiner a0634a3c85 ci/bare-metal: switch to common .baremetal-test-arm64
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13751>
2021-11-12 08:22:29 +00:00
Emma Anholt a68a0c9e1c mesa/st: Disable NV_copy_depth_to_color on non-doubles-capable HW.
The previous doubles check
(https://gitlab.freedesktop.org/mesa/mesa/-/issues/3459) checked that you
didn't have full doubles emulation turned on, but we also need to check
that you have doubles at all (emulated or not) or non-GL4 drivers will
fail.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13743>
2021-11-11 16:38:58 +00:00
Emma Anholt 94e4cd4d83 freedreno/fdl6: Skip redundant setting of TILE_ALL for NV12.
We already respect the tile_all flag above, and it should be set in tu.
Fixes a mismatch between fdl6_view_init() and gallium.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13443>
2021-11-11 00:10:57 +00:00
Emma Anholt 2e6810a06a util/format: Add G8_B8R8_420_UNORM to match Vulkan.
turnip was playing fast and loose with the name, using the R8_G8B8 format
name but actually setting the descriptors up to read G8_B8R8 like Vulkan
(sensibly) wants.  This caused trouble when trying to make freedreno and
turnip share code.  By having both orderings as format names, we can share
the descriptor code and also confuse readers less.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13443>
2021-11-11 00:10:57 +00:00
Emma Anholt 271b6cb981 util: Rename PIPE_FORMAT_G8_B8_R8_420_UNORM.
The only user, turnip, was actually treating it as this layout, matching
vulkan's specification of how the planes map to RGB values.  (Y=G means
that Cb=B and Cr=R).

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13443>
2021-11-11 00:10:57 +00:00
Emma Anholt 549924d53e freedreno: Fix constant-index assumptions in IBO loads.
The encoder already sets up our IBO accesses as potentially nonuniform, so
we just need to be careful to not try to force the IBO index into an
immediate.

Fixes assertion failures in piglit arb_shader_image_load_store-invalid
(intermittent due to
https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/597), which
had some interesting actual failures hidden behind it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13601>
2021-11-10 17:48:59 +00:00
Emma Anholt 9e04f97d8e freedreno: Fix the uniform/nonuniform handling for cat5 bindful modes.
We can see from the dynamically_uniform (compiler doesn't know if you're
uniform or not) vs uniform (compiler can see it's uniform) case in the
blob which is which.  Now that we have the right names, also use the
nonunif flag for encoding the actual non-uniform mode (previously, we were
always setting it always in a way that meant uniform).

I verified this behavior back to a418 with samplers.  The a3xx blob I have
only does GLES3, so we don't have the opaque_type_indexing tests to see.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13601>
2021-11-10 17:48:59 +00:00
Hyunjun Ko 5d0712b185 turnip: expose VK_KHR_driver_properties
Now that we have a conformance version to advertise, we can expose the
extension.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6251>
2021-11-09 03:43:54 +00:00
Emma Anholt 1e850f23b1 turnip: Claim 1.2.7.1 CTS conformance.
I submitted a conformance package for A618 today, so let's stop doing all
this warning about non-conformance.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6251>
2021-11-09 03:43:54 +00:00
Connor Abbott 38f0b36f1a ir3/spill: Initial implementation of rematerialization
This only handles moves from immedates/constants. The next step would be
to rematerialize ALU instructions whose sources are available.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13650>
2021-11-08 23:51:37 +00:00
Connor Abbott db566904ba ir3/spill: Mark root as non-spillable after inserting
We have to mark the root as non-spillable in case the interval is the
child of some other interval, but we can't know whether it's the child
of some other interval until it's been inserted. Move the setting of
cant_spill below the insertion. This prevents us from using a bogus
parent value.

Fixes: 613eaac7b5 ("ir3: Initial support for spilling non-shared registers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13650>
2021-11-08 23:51:37 +00:00
Emma Anholt 34739cb6e2 freedreno/ir3: Fix off-by-one in prefetch safety assert.
This looks like just a typo, we allow up to == 0xf in the lowering pass.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668>
2021-11-04 22:49:29 +00:00
Emma Anholt 35f56ad856 freedreno/a5xx: Diff reduction in fd5_layout to fd6_layout.
This should be exactly equivalent code, except for the is_3d "level <= 1"
which doesn't bring over 6c19d37331 ("freedreno/a6xx: fix 3d tex
layout") due to it failing our unit tests where we compare to the blob's
behavior.  The layer_stride setup is pulling in what freedreno_resource.c
was doing after the layout setup, so we match fd6 and so that it could
potentially be checked in unit testing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13668>
2021-11-04 22:49:29 +00:00
Emma Anholt 1e869e3fb4 freedreno/a5xx+: Fix missing LA formats.
GL_ARB_texture_buffer_object uses these formats, and we expose it.  Since
we didn't have the formats in the table, we we were using bad HW
texture/color formats for them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13666>
2021-11-04 19:07:54 +00:00
Emma Anholt 0e4fcda7e0 freedreno/a6xx: Don't try to generate mipmaps for SNORM with our blitter.
Since we're casting to unorm, the linear filtering will give bad results.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13666>
2021-11-04 19:07:54 +00:00
Emma Anholt 0913ac33a9 freedreno/a618: Mark a flaky test that triggers hangcheck.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13659>
2021-11-04 03:47:54 +00:00
Emma Anholt d1801d43f8 freedreno/a5xx: Use the defined names for 2D_BLIT_CNTL regs.
We have definitions for them above, no need to be UNKNOWN about it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13659>
2021-11-04 03:47:54 +00:00
Emma Anholt f0f5b8d47c freedreno/a6xx: Fix partial z/s clears with sysmem.
We have to set 8c01 to say "leave these channels alone" when
clearing/storing just Z or S of z24s8.  Fixes the bypass path for
KHR-GLES3.packed_depth_stencil.verify_read_pixels.depth24_stencil8.

Cc: mesa-stable
Fixes: #5592
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13659>
2021-11-04 03:47:54 +00:00
Matt Turner cc29b94041 freedreno/ir3: Use immediate for flat.b's src1
According to Jonathan Marek:

  Only one immediate can be decoded in a cat2 instruction (if both srcs
  are immediates, they will use the value of the either the first or
  second one, I don't remember which) - using 2 immediates in a cat2
  instruction is only "correct" if they are both equal.

  The (i,j) in the second src of flat.b is not unused, but behaves as 0
  for any (small) integer because it is a float src. The hack I
  suggested is to set the second src equal to (immediate) first src,
  which seems to work.

This allows us to remove a couple of mov instructions or a bit of extra
constfile usage.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13558>
2021-11-04 02:59:28 +00:00
Matt Turner 2ab0cf2b54 freedreno/ir3: Use flat.b to load flat varyings on a6xx
The flat.b/bary.f cat2 instruction should be faster than an ldlv cat6
instruction, even with a couple of additional moves (which will be
removed in the next patch).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13558>
2021-11-04 02:59:28 +00:00
Matt Turner 2ee1b5a526 freedreno/ir3: Add infrastructure for flat.b
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13558>
2021-11-04 02:59:28 +00:00
Matt Turner a150e31910 ir3: Add support for (dis)assembling flat.b
flat.b is a variant of the bary.f instruction that does not perform
interpolation of the varying input.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13558>
2021-11-04 02:59:28 +00:00
Emma Anholt 14fca01b32 freedreno: Fix layered rendering to just Z/S and not color.
We would try to take the gmem path which can't do layered rendering.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13653>
2021-11-03 21:13:45 +00:00
Emma Anholt 3050e20283 freedreno/fdl6: Add support for texture swizzles of A/L/I/LA/RGBx.
To convert freedreno over, we need to support these formats where we remap
R or RG formats to GL compat ones, or RGBA to RGBx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13635>
2021-11-03 19:38:48 +00:00
Emma Anholt 669caded51 turnip: Remove buffer-view cross-check code.
Now that I've tested storage.*buffer, I'm confident I've moved the buffer
views correctly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13635>
2021-11-03 19:38:48 +00:00
Emma Anholt ef1fb25787 turnip: Use the new shared buffer-view descriptor creation function.
This cross-checks that our descriptors match as I move the code.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13635>
2021-11-03 19:38:48 +00:00
Emma Anholt aa3074e5be freedreno/fdl6: Add an interface for setting up buffer descriptors.
Buffers don't need all the layout stuff that image views do, so it's
easier to have a separate interface for generating them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13635>
2021-11-03 19:38:48 +00:00
Emma Anholt 7b578c1249 freedreno/a6xx: Emit a null descriptor for unoccupied IBO slots.
Fixes a crash in some desktop GL testcases in piglit.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13635>
2021-11-03 19:38:48 +00:00
Emma Anholt 29093bc42d freedreno: Fix gmem invalidating the depth or stencil of packed d/s.
The gmem store stores both depth and stencil for z24s8.  So, if we're
doing a write (clear or draw) to one or the other of the channels, we need
the other one restored as well.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13649>
2021-11-03 18:56:23 +00:00
Danylo Piliaiev 3afdc3ab2c freedreno/computerator: Support A660 gpu
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13640>
2021-11-03 16:32:19 +00:00
Danylo Piliaiev 79fcd63bd6 tu: fix rast state allocation size on a6xx gen4
A few regs were added without changing the size of draw state.

Fixes: 4e05338d99 ("turnip: Rast updates for a6xx gen4")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13644>
2021-11-03 16:09:23 +00:00
Emma Anholt 4e28962800 ci: Uprev VK-GL-CTS to 1.2.7.2, and pull in piglit while I'm here.
The VK-GL-CTS fixes some issues for freedreno, and almost all of LVP's
xfails.

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13622>
2021-11-02 20:29:31 +00:00
Tomeu Vizoso 27cb4166b5 freedreno/ci: Test Turnip on Adreno 618
Collabora has added 7 new lazor Chromebooks which have Adreno 618 GPUs.

Run half of the test suite (plus variants) in pre-merge.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13441>
2021-11-02 10:51:54 +00:00
Guilherme Gallo 8d96cf4eaa ci/freedreno: Add maxcpus=2 to the kernel cmdline on a530
It seems that the cpufreq support in a530 is not rock solid yet, as the
device intermittently reboots during the boot process.

Passing `maxcpus=2` to the kernel avoids this issue.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13089>
2021-11-02 07:06:46 +01:00
Rob Clark 7e998783db freedreno/ir3: xfb fix for duplicate outputs
We can't rely on regid to be unique, shaders can have multiple varyings
with the same output value.  Normally shader linking deduplicates these,
but we still need to handle the case for xfb.  So use slot instead as
the unique identifier.

Fixes KHR-GLES31.core.gpu_shader5.fma_precision_*

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13605>
2021-10-31 16:30:13 +00:00
Rob Clark f6f760a98d freedreno/ir3/print: Show end's outidxs
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13605>
2021-10-31 16:30:13 +00:00
Connor Abbott 68a62226e4 ir3: Don't emit barriers for make_available/make_visible
When looking at the output of some CTS tests, I realized that the
barriers vtn currently inserts to emulate coherent memory accesses
were being turned into fences, even though we never needed to do
anything special for coherent accesses before so presumably accesses are
already cache-coherent by default. Ignore make_visible/make_available
semantics to get us back to parity with the old path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13599>
2021-10-29 23:38:10 +00:00
Jason Ekstrand 4108fda426 vulkan: Move all the common object code to runtime/
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13156>
2021-10-29 23:12:32 +00:00
Connor Abbott 8d0b508d91 ir3: Emit barriers for images again
This was accidentally broken with the nir_var_image work.

Fixes: e87dbfd3 ("ir3: Check for nir_var_mem_image in shared_barrier handling")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13593>
2021-10-29 16:33:04 +00:00
Connor Abbott 98c1448509 tu: Always write GRAS_LRZ_MRT_BUF_INFO_0
This fixes flakes in dEQP-VK.pipeline.stencil.nocolor.format.* when run
after ycbcr tests. Apparently LRZ needs to know if there's a media
format enabled even if there are no color attachments, so we need to
write something here. Presumably any "normal" format would work but 0
seems like a good neutral choice.

Fixes: 9c895e13 ("tu: Emit GRAS_LRZ_MRT_BUF_INFO_0")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13578>
2021-10-28 22:19:09 +00:00
Danylo Piliaiev aa264ded94 ir3/ra: Check register file upper bound when updating preferred_reg
Otherwise we could get invalid reg in get_reg()

Would fix many dEQP-VK.ssbo.phys.layout.*

Fixes: 0ffcb19b9d "ir3: Rewrite register allocation"

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13546>
2021-10-28 14:08:43 +00:00
Emma Anholt bfbc41a9fa ci/piglit-runner: Merge piglit-driver-*.txt files into driver-*.txt.
The test names are definitely unique (deqp has specific prefixes, piglit
uses '@' as a separator instead of '.'), so we can just have a single file
regardless of test type.  Merges the two groups of xfails together so you
can't mix up which file to edit (I certainly have), and so that we don't
need to introduce yet another set of files when we add gtest for libva.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13517>
2021-10-27 20:54:11 +00:00
Emma Anholt 38dff02bfb ci/deqp-runner: Rename the deqp-drivername-*.txt files to drivername-*.txt
We have two testsuites with the same format for fails/flakes/skips files,
and test names that are definitely unique.  As I'm about to add a third
testsuite (gtest for libva-utils), so let's have just one file each for
fails/flakes/skips instead of one per type of testsuite.  This starts the
move with just the bulk rename of deqp.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13517>
2021-10-27 20:54:11 +00:00
Ilia Mirkin 6c61494771 freedreno: support lua54
This is the default version in gentoo, and it apparently uses the lua54
variant rather than lua.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13510>
2021-10-26 00:33:31 +00:00
Rob Clark d2a7afe34d freedreno/drm: Move suballoc_bo to device
Having it in msm_pipe isn't saving any locking.  But it does mean that
cleanup_fences() can drop the last pipe reference, which in turn drops
the last suballoc_bo reference, which can cause recursion back into the
bo cache.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5562
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13521>
2021-10-26 00:12:02 +00:00
Rob Clark 2c6fb9780c freedreno/drm: Add some asserts
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13521>
2021-10-26 00:12:02 +00:00
Emma Anholt ebe9494b61 turnip: Drop the assertion about the temporary bit in sync fd imports.
Khronos's conclusion was that you only need the bit when you want
temporary and there's a choice between temporary and permanent.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13473>
2021-10-22 21:44:44 +00:00
Matt Turner 2822b1345c tu: Expose required VK_FORMAT_FEATURE bits for planar YUV formats
Specifically this enables these VK_FORMAT_FEATURE bits:

  VK_FORMAT_FEATURE_TRANSFER_SRC_BIT
  VK_FORMAT_FEATURE_TRANSFER_DST_BIT
  VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT
  VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT
  VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
  VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT
  VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT
  VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT

Fixes the following tests:
  dEQP-VK.api.info.format_properties.g8_b8_r8_3plane_420_unorm
  dEQP-VK.api.info.format_properties.g8_b8r8_2plane_420_unorm
  dEQP-VK.api.info.image_format_properties.2d.optimal.g8_b8_r8_3plane_420_unorm
  dEQP-VK.api.info.image_format_properties.2d.optimal.g8_b8r8_2plane_420_unorm

Additionally allows 339 tests in dEQP-VK.ycbcr.* to go from Skip to
Pass.

[ Connor: Fake support for 3-plane formats, fixup modifiers path ]

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6792>
2021-10-22 11:25:31 +00:00