Commit graph

5192 commits

Author SHA1 Message Date
Job Noorman
455ebcccfb ir3: add encoding for isam.v
isam.v is a version of isam that can load multiple components from IBOs.
It uses some bits that are used for different purposes in other tex
instructions:
- bit 50 (.v): .s elsewhere
- bit 53 (indicates whether an immediate offset is used): .p elsewhere
- bit 18 (.1d when not set, has to be set for .v): 0 elsewhere

For this reason, the bitset hierarchy for cat5 had to be reordered a
bit.

The immediate offset is encoded as an extra (immed) source register and
an instruction flag (to be able to make the distinction between offset
zero and no offset, although this might not be useful).

This also adds a flag for the .1d field. Since this bit is active-low,
this flag has inverted semantics: setting it will make .1d inactive.
Note that some existing disassembler tests for isam had to be updated
because the bit is never set and this is now disassembled as .1d. This
matches the blob's disassembler.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28664>
2024-06-14 17:12:59 +00:00
Job Noorman
c2dbc4a00a ir3: simplify cat5 parsing
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28664>
2024-06-14 17:12:59 +00:00
Danylo Piliaiev
59937f62a6 ir3/a7xx: Fix FS consts corruption when other FS has zero constlen
Having zero consts in one FS may corrupt consts in follow up FSs,
on such GPUs blob never has zero consts in FS. The mechanism of
corruption is unknown.

Fixes geometry flickering in a number of games, including:
 Baldur's Gate 3
 Assasin's Creed Rogue

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29357>
2024-06-14 13:27:01 +00:00
Danylo Piliaiev
98e3b1bc5f freedreno/a7xx: Update TPL1_DBG_ECO_CNTL1 to fix UBWC corruption
Copying UBWC image via BLIT_OP_SCALE may be corrupted if previously
someone copied image with bit 18 set in TPL1_DBG_ECO_CNTL1.

Found by replaying blob's cmdstream on a740, but somehow this issue
doesn't happen on Android.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29358>
2024-06-14 12:21:03 +00:00
Danylo Piliaiev
96ed275a53 turnip: Implement VK_EXT_depth_clamp_zero_one
For A6XX it's a no-op, but A7XX+ doesn't clamp to [0,1] with disabled
depth clamp, to support VK_EXT_depth_clamp_zero_one we have to always
enable clamp and manually set depth range to [0,1] when rs->depth_clamp_enable
is false.

Passes:
 dEQP-VK.depth.*
 dEQP-GLES3.functional.fbo.depth.depth_test_clamp.* (zink)

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29387>
2024-06-12 12:58:32 +00:00
Valentine Burley
47bbaf000d tu: Handle all dependencies of CmdWaitEvents2
The spec describes pDependencyInfos as an array with eventCount elements.

Addresses: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10580

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29630>
2024-06-12 12:28:44 +00:00
Valentine Burley
a6a0730bd5 tu: Move event related related code to tu_event.cc/h
Match the structure of NVK and RADV. Pull all event related code from
tu_device.cc/h and tu_cmd_buffer.cc/h into one location.

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29630>
2024-06-12 12:28:44 +00:00
David Heidelberg
af056baa40 ci/freedreno: some A306 tests now pass/skip since proper GL detection in Piglit
Ref:
 - https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/916
 - https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/921

Signed-off-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29689>
2024-06-12 09:09:15 +00:00
Eric Engestrom
467230e7e4 freedreno/ci: disable mid-testing reboot on a750
Once testing has started, there won't be enough time left to try
rebooting and restarting if something went wrong, so instead just error
out of the job immediately.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29637>
2024-06-10 02:01:05 +02:00
Eric Engestrom
9c2e2b7a2e turnip/ci: add a750 flakes seen in the latest nightly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29633>
2024-06-09 21:04:18 +00:00
Eric Engestrom
c02329ded1 ci: set a common B2C_JOB_SUCCESS_REGEX with the message that's printed for all jobs
Simpler code, and more reliable against serial corruption because that
message is printed 4 times (vs only once for the other ones).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29608>
2024-06-08 07:16:27 +00:00
Mark Collins
cc82f7f8ac tu: Emit GRAS_LRZ_DEPTH_BUFFER_INFO correctly
This register stores the depth format of the underlying depth
buffer, it seemingly doesn't change anything about the LRZ buffer
itself and has no behavioral changes over setting it to 0.

However, it's possible that there's some case where it does matter
so matching the proprietary driver's behavior is safer.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29453>
2024-06-07 10:18:10 +00:00
Mark Collins
a6f08fd69d fd/a7xx: Document LRZ_FLIP_BUFFER event
I found this while reverse engineering A7XX LRZ, it's going to be
relevant when we implement concurrent binning so I've added the
register definition.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29453>
2024-06-07 10:18:10 +00:00
Mark Collins
7ad5bacf7a tu: Enable LRZ fast-clear for A7XX
Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29453>
2024-06-07 10:18:10 +00:00
Mark Collins
9e936d3fde tu: Specify LRZ FC depth clear value on A7XX
A7XX allows setting the FC depth to an arbitrary F32 value rather
than being limited to 0.0/1.0, we use this to match the depth clear
value.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29453>
2024-06-07 10:18:10 +00:00
Mark Collins
15b02f4700 tu: Update LRZ FC dirty clear for A7XX
Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29453>
2024-06-07 10:18:10 +00:00
Mark Collins
db505ea565 tu: Update LRZ FC allocation for A7XX layout
The allocation size is now determined based off the LRFC structure
rather than hardcoding in A6XX's layout.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29453>
2024-06-07 10:18:10 +00:00
Mark Collins
bf5e8fb394 tu/lrz: Add structure for LRZ FC layout
The layout of the LRZ FC section has changed substantially between
A6XX and A7XX so the best way to express the layout was determined
to be a templated structure.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29453>
2024-06-07 10:18:10 +00:00
Mark Collins
c801fd9771 tu: Allow LRZ on A7XX
LRZ without FC should work with all the current changes.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29453>
2024-06-07 10:18:10 +00:00
Mark Collins
e2eda5a9eb fd/a7xx: Initialize magic register 8008 to 0
This can be seen emitted in traces related to FDM on A740, it's set
to zero to ensure there's no side effects from prop writing to it.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29453>
2024-06-07 10:18:10 +00:00
Mark Collins
c85cd9c0b0 fd/a7xx: Initialize magic register 8C34 to 0
This register is set by prop sometimes, functionality is unknown
at the moment.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29453>
2024-06-07 10:18:10 +00:00
Mark Collins
0068e75fc6 tu/lrz: Use actual CHIP rather than hardcoding A6XX
A lot of CHIP template parameters were hardcoded to A6XX rather than
the actual chip which would lead to an incorrect command stream being
generated.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29453>
2024-06-07 10:18:10 +00:00
Mark Collins
895c091cdd tu/lrz: Emit GRAS_LRZ_CNTL2 on A7XX
The functionality of GRAS_LRZ_CNTL on A6XX was split into GRAS_LRZ_CNTL
and GRAS_LRZ_CNTL2 on A7XX. The only new field is for the Z function to
be specified.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29453>
2024-06-07 10:18:10 +00:00
Mark Collins
f592483350 tu/shader: Allow LRZ when write pos with explicit early frag test
This is an exceptional case where any writes to gl_Depth should be
ignored, it means we can use LRZ in this case and don't need to
disable it.

Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29453>
2024-06-07 10:18:10 +00:00
Eric Engestrom
3aafe75471 turnip/ci: add a750 flakes seen in the latest nightly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29569>
2024-06-06 10:47:53 +00:00
Faith Ekstrand
f8290aea48 turnip: Advertise VK_EXT_shader_replicated_composites
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29509>
2024-06-04 16:34:48 +00:00
Rob Clark
3b1b2d9e6d ir3: Add some more missing progress accumulation
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29203>
2024-05-30 21:33:29 +00:00
Mike Blumenkrantz
fc68610f46 ir3: assert that no further optimizations can be done if !progress
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29203>
2024-05-30 21:33:29 +00:00
Mike Blumenkrantz
37057ce691 ir3: flag progress from nir_lower_io_to_scalar
this otherwise fails to revectorize some memory

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29203>
2024-05-30 21:33:29 +00:00
Rob Clark
53df014730 tu: Fix imageview + ahb
With AHB + external format, we might get VK_FORMAT_UNDEFINED.  And at
least with skiavk we might not get a chained VkExternalFormatANDROID.
In this case, just take the format from the image, which will have
already been resolved via VkExternalFormatANDROID when the image was
created.

See VUID-VkImageViewCreateInfo-image-02399

Also see commit 4f7de83110 ("venus: fix view format for ahb image")
for a similar fix.

Fixes the following cts tests:

CtsViewTestCases:
 - android.view.cts.PixelCopyTest#testVideoProducer
CtsMediaDecoderTestCases:
 - android.media.decoder.cts.DecodeAccuracyTest#testSurfaceViewLargerWidthDecodeAccuracy[50(c2.v4l2.avc.decoder_h264_520x360)]
 - android.media.decoder.cts.DecodeAccuracyTest#testSurfaceViewLargerWidthDecodeAccuracy[50(c2.v4l2.avc.decoder_h264_520x360)]
CtsCameraTestCases:
 - android.hardware.camera2.cts.MultiViewTest#testTextureImageWriterReaderOperation[1]

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29490>
2024-05-30 20:59:42 +00:00
Roman Stratiienko
902b142637 turnip/android: Use DETECT_OS_ANDROID in freedreno_rd_output
ANDROID definition is not available in some cases.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29478>
2024-05-30 11:58:46 +00:00
Roman Stratiienko
6fee2715ce turnip/android: Use DETECT_OS_ANDROID in tu_device
ANDROID definition is not available in some cases.

Fixes: 99753001f3 ("turnip: Support AHardwareBuffer")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11242
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29478>
2024-05-30 11:58:46 +00:00
Lionel Landwerlin
3984875792 u_trace: extend tracepoint end_of_pipe bit into flags
We ran into an issue with Intel drivers where it became tricky to tell
whether a timestamp must be recorded with a special end-of-pipe
compute instruction or something else.

We initially tried to deal with that internally by checking some state
in the command buffers but turns out it doesn't work.

This change adds a flag field to the tracepoint to have that
information there and the flags are passed to the record_ts vfunc.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29438>
2024-05-30 06:38:04 +00:00
Karmjit Mahil
7bdcbe11ac turnip: Remove workaround for CTS bug zero-sized inline uniform block
The cts issue was addressed in:
  ae8b8a0711

Affected:
  dEQP-VK.binding_model.descriptorset_random.*.iublimit*

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29414>
2024-05-29 17:36:27 +00:00
Valentine Burley
20f4cd88e1 tu: Advertise VK_KHR_maintenance6
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28360>
2024-05-28 20:02:50 +00:00
Valentine Burley
14d3dd8984 tu: Add support for version 2 of all descriptor binding commands
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28360>
2024-05-28 20:02:50 +00:00
Valentine Burley
94e2c6d000 tu: Add support for NULL index buffer
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28360>
2024-05-28 20:02:50 +00:00
Valentine Burley
7ac6aaf522 tu: Add support for VkBindMemoryStatusKHR
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28360>
2024-05-28 20:02:50 +00:00
Danylo Piliaiev
0954afff5d turnip/msm: Do rd dump only when there are commands in submission
Dumping per-submission RDs when replaying d3d11 capture resulted in a
surprising number of empty RDs.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29359>
2024-05-27 12:29:32 +00:00
David Heidelberg
19a875f7dc ci/freedreno: document new failure after piglit update
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29407>
2024-05-26 22:30:39 -07:00
Valentine Burley
c1a4fcbb4a freedreno/ci: Update expectations
Created by ci-collate from the following pipeline:
https://gitlab.freedesktop.org/Valentine/mesa/-/pipelines/1184168

Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29373>
2024-05-25 09:05:40 +00:00
Martin Roukala (né Peres)
946b1027ef turnip+zink/ci: add more flakes to the expectations
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29381>
2024-05-24 21:05:46 +00:00
Martin Roukala (né Peres)
fed03b9662 turnip/ci: bump the a750_vk timeout
We already managed to hit the timeout once, and since the job is manual
anyway, let's bump it generously so as to also allow for more tests
to be added without having to bump the timeout every time.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29381>
2024-05-24 21:05:46 +00:00
Martin Roukala (né Peres)
8b6ea47020 turnip/ci: document a missing flake from the a750_vk job
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29381>
2024-05-24 21:05:46 +00:00
Valentine Burley
f7a262cd6d freedreno/devices: Fix indentation for Adreno A32
Adjust indentation to match other entries.

Fixes: cd7da3a807 ("freedreno/devices: Add support for Adreno A32 (G3x Gen 2)")
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29347>
2024-05-24 12:21:07 +00:00
Valentine Burley
674d5b54bf tu: Expose VK_EXT_nested_command_buffer
Signed-off-by: Valentine Burley <valentine.burley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29347>
2024-05-24 12:21:07 +00:00
David Heidelberg
fca045f02f ci/freedreno: a3xx will never have Vulkan support
Do not spam CI logs.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29365>
2024-05-24 02:56:47 +00:00
Rob Clark
27ebf58ee8 virgl: Update headers
VIRGL_RENDERER_UNSTABLE_APIS has been dropped upstream

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28777>
2024-05-23 20:02:03 +00:00
Eric Engestrom
3088af9051 turnip/ci: add vkcts jobs on the a750
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29026>
2024-05-23 06:58:01 +00:00
Eric Engestrom
c7cecc1604 ci: rename debian/arm*_test to debian/baremetal_arm*_test to be clear about which infra uses that
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29241>
2024-05-23 06:00:22 +02:00