Commit Graph

168443 Commits

Author SHA1 Message Date
Alyssa Rosenzweig
86c4a72767 asahi: rm compact image atomic descriptors
these cause robustness problems -- since the target type might not match the
shader for invalid apps -- and are a dubious microoptimization. can revisit
later. for now, fixes imageAtomic*/target mismatch test.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
b13e3adb04 asahi: fix imageSize of null image
Fixes faulting in imageAtomicAdd/unbound image test.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
0cd032e4bb asahi: Be robust with arrays of images
fixes imageLoad/index bounds test subcase.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
b0f4b0a9ef asahi: handle null PBE
fixes some subcases of arb_shader_image_load_store-invalid

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
c73d7d042c asahi: fix dirty tracking fail with point sprites
fixes arb_point_sprite-checkerboard

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
683dac24b2 asahi: be robust about null xfb
fixes arb_enhanced_layouts-transform-feedback-layout-qualifiers tests.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
3ac44d8c5e asahi: remove bogus assertion
replace with optional debug flag for retaining debugability but getting
conformant behaviour by default. fixes piles of piglit crashes.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
e3c528068f asahi: bump limits
fixes gl-3.3-minmax.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
84a8324c55 asahi: handle self blits
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
de6336381b asahi: clamp clear colours
fixes arb_texture_view-rendering-formats_gles3

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
acd095f03d asahi: init clear colour between batches
should be a noop, but safer

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Janne Grunau
2cceacdb8e asahi: Fix typo in arch check in agx_get_gpu_timestamp
Signed-off-by: Janne Grunau <janne-fdr@jannau.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
4ff78407f7 asahi: Sync heap size
Hot fix... gpu alloc needs bigger reworks but that's probably not going to
happen until tess is done & we can see the whole picture.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
afb60d7707 asahi: fix index bias with GS/XFB
noticed when bringing up mdi.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Asahi Lina
45ef977481 asahi: Add extra barrier for texture atomics on G13X
Found experimentally. Fixes
KHR-GLES31.core.texture_buffer.texture_buffer_atomic_functions on G13D.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Asahi Lina
376c2697dc asahi: Add more memory barrier opcodes
These are used by the helper program, and at least one experimentally
fixes texture atomics on G13X.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
c507f4a330 asahi: Identify bicubic filtering mode
Officially undocumented but supported by MSL.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
58d6374b4c asahi: Identify Primitive ID frag input
With a name from powervr :)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
0cb6a993a8 asahi: Add XML for hw tessellation
AFAICT, there's no way to use this with...

* transform feedback
* geometry shaders
* isolines
* points mode

...so it's not terribly useful to us. But worth knowing it exists.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
2c328f4f8a asahi: Add half float type to genxml
Used with the tessellator.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
3da3b18d0c asahi: Quiet clang warning
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
033bb91468 asahi/decode: Decode multiple macOS commands
We get a CDM+VDM pair for OpenGL tess, decode them all for better r/e.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Asahi Lina
1b1a0e0ce7 asahi: Move USC cache flush to agx_batch_init_state
This shouldn't make a difference, but it's cleaner to do it here, since
then we don't have to check whether we have any draws.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Asahi Lina
5a9136a0ef asahi: Add extra CDM barrier bit for G13X
I don't know if we need the other bits yet. I'm assuming the logic here
is the same as we used to use for VDM...

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Asahi Lina
c20210c643 asahi: Fix CDM Launch/Barrier naming
"Launch" is actually just a barrier, and it seems likely to use the same
bit assignments as in VDM...

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Alyssa Rosenzweig
412922ed73 agx: Hotfix for stack_adjust in GS
Spurious, turn this off for now, it's inert rn anyway.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
2023-12-09 10:56:17 -04:00
Rhys Perry
33f4e947d8 vulkan/wsi: fix win32 compilation
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Fixes: d7938de8fe ("vulkan/wsi: don't support present with queues where blit is unsupported")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26610>
2023-12-09 11:56:32 +00:00
Eric Engestrom
48b410731d freedreno/ci: move hang-y a630 jobs from pre-merge to nightly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26609>
2023-12-09 09:49:56 +00:00
Eric Engestrom
40bdb757af a630/ci: add another flake
Failed in https://gitlab.freedesktop.org/mesa/mesa/-/jobs/52554248

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26602>
2023-12-09 09:13:23 +00:00
Rhys Perry
d7938de8fe vulkan/wsi: don't support present with queues where blit is unsupported
Since we might have to perform a copy, video and sparse queues cannot be
used to present.

Attempting to create a command buffer on RADV for the sparse binding queue
causes a crash.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 748b7f80ef ("radv: Move sparse binding into a dedicated queue.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26523>
2023-12-09 07:37:44 +00:00
Qiang Yu
43d83cfcf9 radeonsi: fix legacy merged LS/ES workgroup size for aco compilation
This is for ACO handling of nir_load_local_invocation_index, which will not
add (wave_id * wave_size) if workgroup size <= wave size. So merged shader
LS/ES need to set workgroup size too.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26560>
2023-12-09 06:19:49 +00:00
Marek Olšák
e6b723ccce mesa: fix _mesa_matrix_is_identity
Fixes: d321b1500b - mesa: optimize _mesa_matrix_is_identity

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26599>
2023-12-09 02:08:18 +00:00
Timur Kristóf
8e77da1f21 radv: Implement vkCmdUpdateBuffer on transfer queues.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26580>
2023-12-09 01:49:13 +00:00
Timur Kristóf
635c81f723 radv: Implement buffer copies on transfer queues.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26580>
2023-12-09 01:49:13 +00:00
Timur Kristóf
a632024700 radv: Implement vkCmdWriteBufferMarker2AMD on transfer queues.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26580>
2023-12-09 01:49:13 +00:00
Timur Kristóf
7a4f535145 radv: Implement vkCmdWriteTimestamp2 on transfer queues.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26580>
2023-12-09 01:49:13 +00:00
Timur Kristóf
32dd77ea2d radv: Implement vkCmdFillBuffer on transfer queues.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26580>
2023-12-09 01:49:13 +00:00
Timur Kristóf
23590a4e98 radv: Implement barriers for transfer queues.
The current flush flags in RADV don't really match the SDMA HW,
so just always emit a NOP packet, for now.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26580>
2023-12-09 01:49:13 +00:00
Juston Li
4f2b4b81d1 venus: fix query feedback copy sanitize off by 1
Copy sanitization incorrectly included +1 range of the reset.

Eg Reset Query=0 QueryCount=5 is [0,5) exclusive, not [0,5] inclusive.

Fixes: 5b24ab91e4 ("venus: switch to unconditionally deferred query feedback")

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26603>
2023-12-09 01:32:05 +00:00
Marek Olšák
57e658d041 radeonsi: rework how guardband registers are updated to decrease overhead
See the code comments.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26307>
2023-12-09 00:05:28 +00:00
Pierre-Eric Pelloux-Prayer
2e50b6677b radeonsi: update guardband if vs_disables_clipping_viewport changes
Because the guardband state depends on this value.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26307>
2023-12-09 00:05:28 +00:00
Marek Olšák
2f281b39ab ac/gpu_info: fix printing radeon_info after adding VPE
Fixes: 3ec397819e - amd: add new hardware ip for vpe

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26307>
2023-12-09 00:05:28 +00:00
Marek Olšák
11fcd58957 radeonsi: convert rasterizer state to tracked registers
Most of these registers don't change, so we should not set them when they
don't. This reworks the rasterizer state to use a custom emit function and
eliminate redundant register changes. This required merging the poly_offset
state into the rasterizer state and change how the poly offset state is
updated.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26307>
2023-12-09 00:05:27 +00:00
Marek Olšák
cabf927765 radeonsi: convert depth-stencil-alpha state to tracked registers
Some of these registers don't change, so we should not set them when they
don't. This reworks the DSA state to use a custom emit function and
eliminate redundant register changes.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26307>
2023-12-09 00:05:27 +00:00
Marek Olšák
17e01a9a9b radeonsi: merge context_reg_saved_mask and other_reg_saved_mask into a BITSET
There will be more than 64 context registers that we'll need to track,
so use BITSET for all of them.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26307>
2023-12-09 00:05:27 +00:00
Marek Olšák
fb994f44d9 util: make BITSET_TEST_RANGE_INSIDE_WORD take a value to compare with
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26307>
2023-12-09 00:05:27 +00:00
Marek Olšák
6d2a7f53ac radeonsi: decrease NUM_INTERP if export formats/colormask eliminated PS inputs
This adds a pass that removes output stores. It's called before NIR
optimizations that are before PS lowering, which will cause it to remove
PS inputs from register settings.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26307>
2023-12-09 00:05:27 +00:00
Marek Olšák
bd700bace5 radeonsi: update comments about uniform inlining
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26307>
2023-12-09 00:05:27 +00:00
Marek Olšák
dbea0f51a3 radeonsi: decrease NUM_INTERP if uniform inlining eliminated PS inputs
This should improve performance when that happens.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26307>
2023-12-09 00:05:27 +00:00
Marek Olšák
1d4402b02a radeonsi: don't include the PARAM_GEN input in si_shader_info
It's only produced by lowering point smoothing.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26307>
2023-12-09 00:05:27 +00:00