platform/upstream/mesa.git
2 years agoradv/ci: move some tests from the vega10 fail to its flake list
Martin Roukala (né Peres) [Mon, 1 Aug 2022 07:17:43 +0000 (10:17 +0300)]
radv/ci: move some tests from the vega10 fail to its flake list

v2:
 - Move the other 2 `sample_texture` tests to the flake list (Ishi)

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17829>

2 years agoradv/ci: document a recent regression
Martin Roukala (né Peres) [Mon, 1 Aug 2022 06:41:12 +0000 (09:41 +0300)]
radv/ci: document a recent regression

This regression may have been introduced by mesa/mesa!17652 or
mesa/mesa!17625.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-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/17829>

2 years agofreedreno: Cap reported video memory by VA size
Rob Clark [Mon, 8 Aug 2022 19:01:58 +0000 (12:01 -0700)]
freedreno: Cap reported video memory by VA size

Don't report that we have more video memory than the GPU's virtual
address space size.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17947>

2 years agofreedreno/drm: Add FD_VA_SIZE param
Rob Clark [Mon, 8 Aug 2022 19:01:37 +0000 (12:01 -0700)]
freedreno/drm: Add FD_VA_SIZE param

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17947>

2 years agodzn: Use D3D12 constants instead of naked numbers for device limits
Jesse Natalie [Fri, 22 Jul 2022 22:48:24 +0000 (15:48 -0700)]
dzn: Use D3D12 constants instead of naked numbers for device limits

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17915>

2 years agodzn: Disable extensions that require multi-view
Jesse Natalie [Fri, 22 Jul 2022 22:48:03 +0000 (15:48 -0700)]
dzn: Disable extensions that require multi-view

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17915>

2 years agodocs: fixup link to virgl docs
Erik Faye-Lund [Thu, 4 Aug 2022 09:04:57 +0000 (11:04 +0200)]
docs: fixup link to virgl docs

Fixes: 6897266ce01 ("docs: import virgl docs")
Acked-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17881>

2 years agowgl: Release the context before deleting it in wglDeleteContext
Caleb Cornett [Thu, 4 Aug 2022 22:33:18 +0000 (18:33 -0400)]
wgl: Release the context before deleting it in wglDeleteContext

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17848>

2 years agowgl: Always release local references in stw_make_current_by_handles
Caleb Cornett [Tue, 2 Aug 2022 01:47:37 +0000 (21:47 -0400)]
wgl: Always release local references in stw_make_current_by_handles

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17848>

2 years agowgl: Homogenize read framebuffer reference counting logic
Caleb Cornett [Tue, 2 Aug 2022 01:44:47 +0000 (21:44 -0400)]
wgl: Homogenize read framebuffer reference counting logic

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17848>

2 years agoradeonsi: use do..while loops and other cosmetic changes in display list path
Marek Olšák [Mon, 8 Aug 2022 07:27:28 +0000 (03:27 -0400)]
radeonsi: use do..while loops and other cosmetic changes in display list path

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17933>

2 years agoradeonsi: use si_cp_dma_prefetch_inline for prefetching VBO descriptors
Marek Olšák [Mon, 8 Aug 2022 06:52:20 +0000 (02:52 -0400)]
radeonsi: use si_cp_dma_prefetch_inline for prefetching VBO descriptors

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17933>

2 years agoradeonsi: remove temporary si_context::vb_descriptor_user_sgprs
Marek Olšák [Sat, 6 Aug 2022 13:55:51 +0000 (09:55 -0400)]
radeonsi: remove temporary si_context::vb_descriptor_user_sgprs

We were writing descriptors into si_context and then copying them into
the command buffer. Just write them into the command buffer directly.
Also set the pointer to VBO descriptors right after them.

When we start a new command buffer or we finish blitting, we no longer
restore precomputed VBO descriptors. Instead, we just reupload them again.
It's a compromise to have the common path simpler and faster (maybe).

This removes a lot of stuff. Now the VBO descriptor upload path looks
very similar to the display list path.

There was an accidental hidden optimization that is now documented as
"last_const_upload_buffer".

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17933>

2 years agoradeonsi: remove vb_descriptors_gpu_list only used for debugging
Marek Olšák [Sat, 6 Aug 2022 13:08:37 +0000 (09:08 -0400)]
radeonsi: remove vb_descriptors_gpu_list only used for debugging

While this is nice to have, it doesn't include VBO descriptors in user
SGPRs, and we need to remove it, so that we can simplify the VBO code.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17933>

2 years agoradeonsi: add vertex buffers into the BO list in set_vertex_buffers
Marek Olšák [Mon, 8 Aug 2022 07:56:02 +0000 (03:56 -0400)]
radeonsi: add vertex buffers into the BO list in set_vertex_buffers

This is more straightforward. Also, radeon_add_to_buffer_list makes
writing VBO descriptors into the command buffer slower after that code
is reordered in following commits. This seems to be the only way that
isn't slower.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17933>

2 years agoradeonsi: merge both fail paths in si_set_vb_descriptor
Marek Olšák [Mon, 8 Aug 2022 07:32:00 +0000 (03:32 -0400)]
radeonsi: merge both fail paths in si_set_vb_descriptor

I removed the assertion because apps are allowed to set an offset greater
than the size.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17933>

2 years agotu: Fix sysmem depth attachment clear flushing
Connor Abbott [Mon, 8 Aug 2022 13:52:49 +0000 (15:52 +0200)]
tu: Fix sysmem depth attachment clear flushing

We can't invalidate CCU if there is any dirty data that hasn't been
flushed yet. In the case where we clear depth, we know that the depth
attachment itself isn't dirty but there may be dirty data from other
renderpasses. Therefore we need to flush before invalidating depth.

Fixes: 487aa80 ("tu: Rewrite flushing to use barriers")
Closes: #6987
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17940>

2 years agodocs: document DRI_PRIME
Pierre-Eric Pelloux-Prayer [Mon, 1 Aug 2022 09:00:41 +0000 (11:00 +0200)]
docs: document DRI_PRIME

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17298>

2 years agovulkan/device_select: allow DRI_PRIME=vendor_id:device_id
Pierre-Eric Pelloux-Prayer [Wed, 29 Jun 2022 08:33:59 +0000 (10:33 +0200)]
vulkan/device_select: allow DRI_PRIME=vendor_id:device_id

To match the GL side.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17298>

2 years agovulkan/device_select: print the dri_prime warning only if needed
Pierre-Eric Pelloux-Prayer [Wed, 29 Jun 2022 08:30:58 +0000 (10:30 +0200)]
vulkan/device_select: print the dri_prime warning only if needed

The next commit will allow a different DRI_PRIME syntax, so move
this printf in the right if block.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17298>

2 years agoloader: allow DRI_PRIME=vendor_id:device_id syntax
Pierre-Eric Pelloux-Prayer [Wed, 29 Jun 2022 08:21:24 +0000 (10:21 +0200)]
loader: allow DRI_PRIME=vendor_id:device_id syntax

This syntax allows to select a specific GPU without depending on
the pci bus information.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17298>

2 years agoloader: don't return empty string in loader_get_dri_config_device_id
Pierre-Eric Pelloux-Prayer [Wed, 29 Jun 2022 08:03:16 +0000 (10:03 +0200)]
loader: don't return empty string in loader_get_dri_config_device_id

The caller expects a NULL return value if the option isn't set.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17298>

2 years agoci/windows: Re-enable Windows runners
Jesse Natalie [Mon, 8 Aug 2022 15:09:39 +0000 (08:09 -0700)]
ci/windows: Re-enable Windows runners

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17942>

2 years agoradv: simplify radv_bind_dynamic_state() slightly
Samuel Pitoiset [Tue, 31 May 2022 07:29:30 +0000 (09:29 +0200)]
radv: simplify radv_bind_dynamic_state() slightly

This adds RADV_CMP_COPY to compact copies. Based on ANV.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17649>

2 years agoradv: remove unused states parameter from some radv_emit_XXX() helpers
Samuel Pitoiset [Tue, 31 May 2022 07:13:12 +0000 (09:13 +0200)]
radv: remove unused states parameter from some radv_emit_XXX() helpers

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17649>

2 years agoradv: simplify saving/restoring all dynamic states
Samuel Pitoiset [Mon, 30 May 2022 20:55:49 +0000 (22:55 +0200)]
radv: simplify saving/restoring all dynamic states

Instead of copying every field individually, just use a whole memcpy.
This could be optimized but that's not the point here.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17649>

2 years agoradv: remove RADV_META_SAVE_SAMPLE_LOCATIONS
Samuel Pitoiset [Tue, 31 May 2022 06:47:19 +0000 (08:47 +0200)]
radv: remove RADV_META_SAVE_SAMPLE_LOCATIONS

We already save/restore all other dynamic states unconditionally, it's
not really useful to make an exception for sample locations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17649>

2 years agoaco: improve VcmpxPermlaneHazard workaround
Rhys Perry [Wed, 13 Jul 2022 18:37:27 +0000 (19:37 +0100)]
aco: improve VcmpxPermlaneHazard workaround

According to LLVM, we only need to care about VOPC which writes exec.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17697>

2 years agoaco: only add vscnt wait when visiting VMEM/DS
Rhys Perry [Thu, 21 Jul 2022 18:59:54 +0000 (19:59 +0100)]
aco: only add vscnt wait when visiting VMEM/DS

This prevents issues where we insert a s_waitcnt_vscnt(0) at the start of
a block or very end of the shader because we're joining two blocks (for
example, one with has_VMEM=true and the other with
has_branch_after_DS=true).

fossil-db (navi10):
Totals from 2441 (1.51% of 161220) affected shaders:
Instrs: 1383964 -> 1384094 (+0.01%); split: -0.07%, +0.08%
CodeSize: 7438212 -> 7438760 (+0.01%); split: -0.05%, +0.06%
Latency: 13780665 -> 13679664 (-0.73%); split: -1.53%, +0.80%
InvThroughput: 2950835 -> 2921511 (-0.99%); split: -1.06%, +0.07%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17697>

2 years agoaco: set has_VMEM,has_DS=false after a branch
Rhys Perry [Thu, 21 Jul 2022 18:24:46 +0000 (19:24 +0100)]
aco: set has_VMEM,has_DS=false after a branch

fossil-db (navi10):
Totals from 161 (0.10% of 161220) affected shaders:
Instrs: 206726 -> 207179 (+0.22%); split: -0.02%, +0.24%
CodeSize: 1114152 -> 1116032 (+0.17%); split: -0.01%, +0.18%
Latency: 2119380 -> 2147403 (+1.32%); split: -0.16%, +1.48%
InvThroughput: 462960 -> 461922 (-0.22%); split: -0.42%, +0.19%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17697>

2 years agoaco: fix LdsBranchVmemWARHazard with 2+ branch chains
Rhys Perry [Thu, 21 Jul 2022 18:23:38 +0000 (19:23 +0100)]
aco: fix LdsBranchVmemWARHazard with 2+ branch chains

For example, "DS -> branch -> VMEM -> branch -> DS".

fossil-db (navi10):
Totals from 639 (0.40% of 161220) affected shaders:
Instrs: 629090 -> 628254 (-0.13%); split: -0.19%, +0.06%
CodeSize: 3410164 -> 3406748 (-0.10%); split: -0.14%, +0.04%
Latency: 7834755 -> 7821011 (-0.18%); split: -0.70%, +0.52%
InvThroughput: 1369698 -> 1374495 (+0.35%); split: -0.12%, +0.47%

A lot of the fossil-db changes are noise.
threekingdoms.8db138826c386a62.1.foz/0b222ed175eebad0 is an example of a
shader that actually has this issue.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: c037ba1bb7a ("aco/gfx10: Mitigate LdsBranchVmemWARHazard.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17697>

2 years agogallium/u_threaded: buffer subdata merging (v2)
Jonathan [Sun, 24 Jul 2022 15:48:46 +0000 (17:48 +0200)]
gallium/u_threaded: buffer subdata merging (v2)

In a scenario where a sequence of calls happens like:
* subdata(buffer_a, offset=0, size=64)
* subdata(buffer_a, offset=64, size=64)
* subdata(buffer_a, offset=128, size=64)
* subdata(buffer_a, offset=192, size=64)

and the buffer can't be directly mapped (e.g., because it has bindings), the
subdata calls will now be merged together into one larger subdata call.

This achieves a 3x perf gain in
KHR-GL46.CommonBugs.CommonBug_SparseBuffersWithCopyOps on radeonsi

Before:
real    0m1,923s
user    0m1,017s
sys     0m0,051s

After:
real    0m0,686s
user    0m0,502s
sys     0m0,071s

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17741>

2 years agotu: Flush depth on depth img transition from undef layout
Danylo Piliaiev [Fri, 5 Aug 2022 12:49:49 +0000 (15:49 +0300)]
tu: Flush depth on depth img transition from undef layout

Same logic as in tu_subpass_barrier.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17911>

2 years agoac/nir/cull: Fix typo in bounding box culling.
Timur Kristóf [Sun, 7 Aug 2022 10:23:10 +0000 (12:23 +0200)]
ac/nir/cull: Fix typo in bounding box culling.

Bounding box culling is only viable when the W of all
vertices are positive. Always accept triangles whose any
W is negative.

Fixes: 0d527bb1aa720bf8e5735afdf8e9b70772e1ec23
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7018
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17929>

2 years agoradv: use ref counting for VS prologs and PS epilogs
Samuel Pitoiset [Tue, 19 Jul 2022 12:36:28 +0000 (14:36 +0200)]
radv: use ref counting for VS prologs and PS epilogs

With GPL, it will be possible to create VS prologs and PS epilogs
from libraries, so reference counting is useful here too.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17628>

2 years agoradv: rework shaders ref counting
Samuel Pitoiset [Tue, 19 Jul 2022 12:26:20 +0000 (14:26 +0200)]
radv: rework shaders ref counting

Introduce helpers like for descriptor set layouts. This will also
help graphics pipeline libraries.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17628>

2 years agoci/radeonsi: Add zork jobs and rules
Guilherme Gallo [Tue, 19 Jul 2022 21:35:29 +0000 (18:35 -0300)]
ci/radeonsi: Add zork jobs and rules

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17835>

2 years agoci/radeonsi: skqp: Add fail test files for raven
Guilherme Gallo [Fri, 29 Jul 2022 12:10:46 +0000 (09:10 -0300)]
ci/radeonsi: skqp: Add fail test files for raven

Lots of models are missing.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17835>

2 years agoci/freedreno: skqp: run with new tests files
Guilherme Gallo [Tue, 2 Aug 2022 23:38:30 +0000 (20:38 -0300)]
ci/freedreno: skqp: run with new tests files

Settings as flakes tests that passed in the exhaustive run, to keep the
same state as it was before

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17835>

2 years agoci/skqp: Add gitlab sections for uncluttering
Guilherme Gallo [Tue, 2 Aug 2022 22:39:31 +0000 (19:39 -0300)]
ci/skqp: Add gitlab sections for uncluttering

skqp output is verbose, as we are running multiple backends at the same
job, normally the trace will surpass the Gitlab UI line limit.

This commit wraps every skqp execution in a Gitlab section and removes
some `set -xtrace` from skqp-runner.sh for a cleaner output.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17835>

2 years agoci/skqp: Remove .baremetal-skqp-test in favor of .skqp-test
Guilherme Gallo [Tue, 2 Aug 2022 22:24:28 +0000 (19:24 -0300)]
ci/skqp: Remove .baremetal-skqp-test in favor of .skqp-test

Both hidden jobs has the same content, let's reuse it.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17835>

2 years agoci/skqp: Supress irrelevant shellcheck warnings
Guilherme Gallo [Tue, 2 Aug 2022 20:35:56 +0000 (17:35 -0300)]
ci/skqp: Supress irrelevant shellcheck warnings

To fix some warnings, one should write a much complex bash code, such as
SC2086, so prefer to be simple and functional.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17835>

2 years agoci/skqp: Put generated tests files in artifacts
Guilherme Gallo [Mon, 1 Aug 2022 03:17:45 +0000 (00:17 -0300)]
ci/skqp: Put generated tests files in artifacts

Showing the resulting test file can help the developer to debug skqp
runs by coping this file locally.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17835>

2 years agoci/skqp: Use SKQP_BIN_DIR instead of hardcoded /skqp dir
Guilherme Gallo [Wed, 27 Jul 2022 01:18:29 +0000 (22:18 -0300)]
ci/skqp: Use SKQP_BIN_DIR instead of hardcoded /skqp dir

This will make skqp-runner.sh more generic, making it easier to test
locally.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17835>

2 years agoci/skqp: Add support for commenting tests files
Guilherme Gallo [Wed, 27 Jul 2022 01:09:44 +0000 (22:09 -0300)]
ci/skqp: Add support for commenting tests files

The files are now separated in three: crashes, fails and flakes.

They should be located inside $INSTALL folder at:

- $GPU_VERSION_$SKQP_BACKEND_rendertests-$MODE.txt
- $GPU_VERSION_unittests-$MODE.txt

Where:

- $MODES can be crashes, fails, and flakes
- $SKQP_BACKEND can be gl, gles and vk

crashes and flakes removes tests from skqp, so they will not be run.
As skqp does not have support for flaky test detection, let's not run
them.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17835>

2 years agoci/skqp: Build list_gpu_unit_tests and list_gms
Guilherme Gallo [Wed, 20 Jul 2022 02:48:34 +0000 (23:48 -0300)]
ci/skqp: Build list_gpu_unit_tests and list_gms

These binaries are used to generate a list of tests that can be run in a
target device and are useful for testing new devices

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17835>

2 years agoci/skqp: Fix Nima-Cpp fetching error
Guilherme Gallo [Wed, 20 Jul 2022 02:47:44 +0000 (23:47 -0300)]
ci/skqp: Fix Nima-Cpp fetching error

Nima-Cpp is not available anymore inside googlesource, revert to github
one

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17835>

2 years agoci/skqp: Fix paths in skqp-runner
Guilherme Gallo [Tue, 2 Aug 2022 20:14:06 +0000 (17:14 -0300)]
ci/skqp: Fix paths in skqp-runner

Default results directory was fixed via $PWD variable, but it is safer
to use the same as init-stage2.sh uses: $CI_PROJECT_DIR to indicate the
results folder.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17835>

2 years agoci/skqp: Show reports on crashes
Guilherme Gallo [Wed, 20 Jul 2022 01:13:20 +0000 (22:13 -0300)]
ci/skqp: Show reports on crashes

Some skqp tests may crash the entire job run, assure that the reports
will be showed to the user after the test started to run.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17835>

2 years agoci/skqp: Add an option to run all tests
Guilherme Gallo [Wed, 20 Jul 2022 00:41:55 +0000 (21:41 -0300)]
ci/skqp: Add an option to run all tests

When the skqp is introduced to a new driver, the best practice is to
run all available tests from skqp and classifying the
failing/crashing/flaking ones.
The default behavior of skqp is to run the tests from the commit where
the skqp built, which may not be adequate for the target driver.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17835>

2 years agoradv: ignore out-of-order rasterization if stencil write mask is dynamic
Samuel Pitoiset [Thu, 21 Jul 2022 08:13:57 +0000 (10:13 +0200)]
radv: ignore out-of-order rasterization if stencil write mask is dynamic

This might break out-of-order rasterization on GFX8-GFX9 because it
relies on the stencil write mask which can be dynamic.

Found by inspection.

Cc: mesa-stable
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/17673>

2 years agoRevert "nir: Preserve offsets in lower_io_to_scalar_early"
Timothy Arceri [Thu, 4 Aug 2022 02:41:35 +0000 (12:41 +1000)]
Revert "nir: Preserve offsets in lower_io_to_scalar_early"

This reverts commit 96fa23bca5ac88e0cd2dd0c45fdef71b2afe888d.

The correct fix to the problem was a1bc1523408a3, making this
change obsolete as the pass skips any vars marked with
always_active_io. There was no real advantage to allowing these
vars to be split because they can't be removed anyway. Also there
is no way to split varying arrays gracefully here due to the xfb
layout rules, and this change didn't handle arrays at all.

Removing this obsolete code also fixes an assert in the new CTS
test KHR-Single-GL45.enhanced_layouts.xfb_all_stages. The test
was legally adding xfb offsets to all vertex stages but since
we only mark the varyings in the final vertex stage with the
always_active_io flag the other stages were correctly lowering
to scalars but when an array with an offset hit this code it
asserted since it couldn't handle it.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fixes: a1bc1523408a3 ("spirv: mark variables decorated with XfbBuffer as always active")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6928
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17878>

2 years agoagx: Only emit the used components of gl_FragCoord
Alyssa Rosenzweig [Sun, 7 Aug 2022 20:25:13 +0000 (16:25 -0400)]
agx: Only emit the used components of gl_FragCoord

In case a shader only use gl_FragCoord.xy, this avoids wasting
coefficient registers for gl_FragCoord.zw which should be a small
optimization. It's also less work for DCE but I'm less worried about
that.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Remove p_extract
Alyssa Rosenzweig [Sun, 7 Aug 2022 18:18:00 +0000 (14:18 -0400)]
agx: Remove p_extract

It's now unused. We didn't have coalescing for it anyway, splits are the
preferred alternative.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Handle type-changing splits
Alyssa Rosenzweig [Sun, 7 Aug 2022 18:16:43 +0000 (14:16 -0400)]
agx: Handle type-changing splits

If we want to break down a 64-bit value into its 32-bit halves, we want
to be able to use a split for this:

   lo, hi = split long

Extend the RA to handle this case.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Stop using broken idiv lowering
Alyssa Rosenzweig [Tue, 2 Aug 2022 16:12:22 +0000 (12:12 -0400)]
agx: Stop using broken idiv lowering

It is, as the name suggests, broken. Instruction count goes from 50->53
on the shader in
dEQP-GLES2.functional.shaders.operator.binary_operator.div.highp_int_fragment.
I'm happy to eat that cost in exchange for correct results!

There are lots more low-hanging opportunities for optimizations to that
shader:

- fuse double icmpsel for the b2i32(cmp) sequences
- promoting big immediates to uniforms
- fusing integer multiply+add

But for now this is acceptable and anyway I'm doing this on "fix broken
NIR lowering" time and not Asahi time.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Implement nir_op_umul_high
Alyssa Rosenzweig [Tue, 2 Aug 2022 17:39:35 +0000 (13:39 -0400)]
agx: Implement nir_op_umul_high

This is crucial to the efficiency of the accurate idiv path.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Extract umul_high implementation
Alyssa Rosenzweig [Tue, 2 Aug 2022 17:38:57 +0000 (13:38 -0400)]
agx: Extract umul_high implementation

We can implement umul_high (for both 16-bit and 32-bit types)
efficiently by multiplying in the next larger type size and extracting
the upper word. We already have such an implementation (for instancing).
Extract it so we can use it for emit_alu too.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Assert that registers are naturally aligned
Alyssa Rosenzweig [Tue, 2 Aug 2022 17:58:23 +0000 (13:58 -0400)]
agx: Assert that registers are naturally aligned

This seems to be an architectural constraint. Ensure that RA satisfies
it, because otherwise we're left with mysterious fails.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Align 64-bit register pairs
Alyssa Rosenzweig [Tue, 2 Aug 2022 18:02:16 +0000 (14:02 -0400)]
agx: Align 64-bit register pairs

This seems to be necessary for correct operation.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Lower more ALU operations
Alyssa Rosenzweig [Tue, 2 Aug 2022 16:07:59 +0000 (12:07 -0400)]
agx: Lower more ALU operations

Noticed while switching idiv lowerings. We could do better on some of these.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Implement noperspective interpolation
Alyssa Rosenzweig [Sun, 7 Aug 2022 17:46:18 +0000 (13:46 -0400)]
agx: Implement noperspective interpolation

We need to get a matching coefficient register and change the encoding
of the iter instruction slightly, but otherwise this is normal.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Use split instead of extract for ldcf
Alyssa Rosenzweig [Sun, 7 Aug 2022 15:56:22 +0000 (11:56 -0400)]
agx: Use split instead of extract for ldcf

For more uniform handling in the RA. This gets rid of the extra moves
with flat shading.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Rename varying load instructions
Alyssa Rosenzweig [Sun, 7 Aug 2022 15:52:38 +0000 (11:52 -0400)]
agx: Rename varying load instructions

Unlike Mali (where I borrowed the old names from), these are not loads
in the memory sense. They are simply register loads and arithmetic.
Rename accordingly, using PowerVR names and public Apple names as a
guide.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Model perspective coefficient reg in the IR
Alyssa Rosenzweig [Sun, 7 Aug 2022 15:45:21 +0000 (11:45 -0400)]
agx: Model perspective coefficient reg in the IR

For perspective-correct interpolation, the W coefficient register is
needed. Instead of hardcoding this to cf0 and special casing, model this
in the IR and let the general handling kick in.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Add AGX_MESA_DEBUG=noopt option
Alyssa Rosenzweig [Wed, 3 Aug 2022 00:59:21 +0000 (20:59 -0400)]
agx: Add AGX_MESA_DEBUG=noopt option

To disable the optimizer. Trying to root cause a Neverball bug, this
gives one less thing to worry.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoasahi,agx: Rewrite varying linking
Alyssa Rosenzweig [Sun, 10 Jul 2022 21:36:20 +0000 (17:36 -0400)]
asahi,agx: Rewrite varying linking

Instead of using driver_location magic and hoping things work, make the
linkage between vertex and fragment shaders explicit. Thanks to the
coefficient register mechanism reverse-engineered and documented earlier
in this series, this does not require any shader keys to support
separable shaders. It just requires that we regenerate the coefficient
register binding tables at draw time, based on the varying layouts
decided by the compiler independently for the VS and FS. This is more
robust in the face of separate shaders.

This also gets us glProvokingVertex() support without shader keys.

After that, we don't need any of the remapping prepasses. For fragment
shaders, any old mapping will do, so we can assign coefficient registers
as we go (based on what the program actually uses, not nir_variable
information that might be stale by this point). We do want to cache
coefficient registers, particularly for fragcoord.w which is used for
perspective interpolation everywhere.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoasahi: Decode Interpolation packets
Alyssa Rosenzweig [Tue, 2 Aug 2022 23:48:18 +0000 (19:48 -0400)]
asahi: Decode Interpolation packets

These have been known, just were missed.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoasahi: Fix varying XML
Alyssa Rosenzweig [Sun, 19 Jun 2022 22:10:09 +0000 (18:10 -0400)]
asahi: Fix varying XML

Lots of changes from reverse-engineering harder the interactions with
fp16 and noperspective and such, and comparing against the PowerVR
driver code in Mesa that's been released since this XML was
originally written.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoasahi: Encode known bits of Linkage in the XML
Alyssa Rosenzweig [Mon, 23 May 2022 17:32:56 +0000 (13:32 -0400)]
asahi: Encode known bits of Linkage in the XML

I'm pretty sure about these. There's too much hex anyway.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoasahi: Correct bind fragment pipeline size
Alyssa Rosenzweig [Mon, 23 May 2022 16:32:37 +0000 (12:32 -0400)]
asahi: Correct bind fragment pipeline size

A number of structures encode their size, but we were ignoring it just
for this fragment pipeline bind. Fix that.

This fix might also apply to bind vertex pipeline. Unsure.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoasahi: Split vertex/fragment pipeline binds
Alyssa Rosenzweig [Mon, 23 May 2022 16:27:39 +0000 (12:27 -0400)]
asahi: Split vertex/fragment pipeline binds

Although these are similar data structures, they are not identical and
trying to cover both in the same struct is causing problems with
aliasing. Split them out to get a more accurate representation.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoasahi: Use a single bind texture/sampler per pipeline
Alyssa Rosenzweig [Mon, 23 May 2022 14:29:58 +0000 (10:29 -0400)]
asahi: Use a single bind texture/sampler per pipeline

Matches what Metal does. This is simpler and in the future could be
better optimized.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoasahi: Fix using multiple textures/samplers
Alyssa Rosenzweig [Wed, 19 Jan 2022 02:54:22 +0000 (21:54 -0500)]
asahi: Fix using multiple textures/samplers

The counts for textures/samplers are specified in the bind
texture/sampler packets. What's in the bind pipeline appear to be...
hints? of some kind? It's a direct function of the numbers of textures
and samplers, but much more coarse. Unknown purpose.

This should be correct for up to 48 textures and at least 8 samplers.
For more than 48 textures, Metal switches to a "bindless" mode, where
the textures are instead bound with a bind uniform packet, ts* is no
longer read in the shader, and instead registers and immediates are used
to index the texture with a substantial preshader. Details TBD. We don't
need to worry about that for a long while, though.

Fixes a number of dEQPs.

   dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.sampler2D_samplerCube_both,Crash
   dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.sampler2D_samplerCube_fragment,Crash
   dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.array_in_struct.sampler2D_samplerCube_vertex,Crash
   dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.nested_structs_arrays.sampler2D_samplerCube_both,Crash
   dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.nested_structs_arrays.sampler2D_samplerCube_fragment,Crash
   dEQP-GLES2.functional.uniform_api.value.assigned.by_pointer.render.nested_structs_arrays.sampler2D_samplerCube_vertex,Crash
   dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.array_in_struct.sampler2D_samplerCube_both,Crash
   dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.array_in_struct.sampler2D_samplerCube_fragment,Crash
   dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.array_in_struct.sampler2D_samplerCube_vertex,Crash
   dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.nested_structs_arrays.sampler2D_samplerCube_both,Crash
   dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.nested_structs_arrays.sampler2D_samplerCube_fragment,Crash
   dEQP-GLES2.functional.uniform_api.value.assigned.by_value.render.nested_structs_arrays.sampler2D_samplerCube_vertex,Crash

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoasahi: Dump all textures&samplers
Alyssa Rosenzweig [Mon, 23 May 2022 03:02:29 +0000 (23:02 -0400)]
asahi: Dump all textures&samplers

This confirms the actual size of the texture descriptor -- 24 bytes.
The last 8 bytes have so far only been zeroed. It also confirms we got
the sampler descriptor size right.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoasahi: Allow large uniform records
Alyssa Rosenzweig [Mon, 23 May 2022 02:41:14 +0000 (22:41 -0400)]
asahi: Allow large uniform records

Now that we've fixed the binding XML, it's obvious how to bind lots of
uniforms in a single record. This is simpler and more efficient.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoasahi: Extend counts in BIND packets
Alyssa Rosenzweig [Mon, 23 May 2022 02:37:51 +0000 (22:37 -0400)]
asahi: Extend counts in BIND packets

We can bind at least 16 textures. Fix the sizes in the XML so this can
be decoded correctly.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoasahi: Plumb through lower_clip_fs
Alyssa Rosenzweig [Wed, 3 Aug 2022 01:18:22 +0000 (21:18 -0400)]
asahi: Plumb through lower_clip_fs

Key to rast->clip_plane_enable and lower. This fixes translucency of one
of the surfaces in the Neverball title screen.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Fix ld_var cf packing
Alyssa Rosenzweig [Sun, 7 Aug 2022 15:17:01 +0000 (11:17 -0400)]
agx: Fix ld_var cf packing

Make it handle larger coefficient registers.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoagx: Fix packing of samplers in texture instrs
Alyssa Rosenzweig [Wed, 3 Aug 2022 19:35:24 +0000 (15:35 -0400)]
agx: Fix packing of samplers in texture instrs

Typo in the handwritten packing code, oof!

Fixes incorrectly repeated shadows in Neverball (among many other bugs,
I assume). Huge thanks to Lina for the idea that this was the
bug -- fixing it was a breeze from there :-)

Fixes: 9f555388342 ("agx: Pack texture ops")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Suggested-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agodocs/asahi: Document varying interpolation
Alyssa Rosenzweig [Tue, 21 Jun 2022 23:21:34 +0000 (19:21 -0400)]
docs/asahi: Document varying interpolation

Varying interpolation is quite involved in the hardware. Now that I
understand how it works, add some documentation. This documentation is
too long and uses too much fancy formatting to put inline with the XML,
so put in our external documentation space.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>

2 years agoradv: Switch to the GLSL leaf implementation
Konstantin Seurer [Thu, 23 Jun 2022 16:57:19 +0000 (18:57 +0200)]
radv: Switch to the GLSL leaf implementation

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>

2 years agoradv: Add a GLSL leaf kernel implementation
Konstantin Seurer [Fri, 5 Aug 2022 18:53:10 +0000 (20:53 +0200)]
radv: Add a GLSL leaf kernel implementation

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>

2 years agoradv: Switch to the GLSL internal implementation
Konstantin Seurer [Tue, 14 Jun 2022 15:12:43 +0000 (17:12 +0200)]
radv: Switch to the GLSL internal implementation

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>

2 years agoradv: Add a GLSL internal kernel implementation
Konstantin Seurer [Tue, 14 Jun 2022 15:12:18 +0000 (17:12 +0200)]
radv: Add a GLSL internal kernel implementation

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>

2 years agoradv: Switch to the GLSL morton implementation
Konstantin Seurer [Sun, 12 Jun 2022 20:13:13 +0000 (22:13 +0200)]
radv: Switch to the GLSL morton implementation

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>

2 years agoradv: Add a GLSL morton kernel implementation
Konstantin Seurer [Sun, 12 Jun 2022 20:11:39 +0000 (22:11 +0200)]
radv: Add a GLSL morton kernel implementation

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>

2 years agoradv: Add the basics for GLSL bvh kerrnels
Konstantin Seurer [Sun, 12 Jun 2022 20:10:53 +0000 (22:10 +0200)]
radv: Add the basics for GLSL bvh kerrnels

Adds a meson build file for compiling GLSL compute shaders and a file with helpers for common acceleration structure build functionality.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>

2 years agoradv: Add create_build_pipeline_spv helper
Konstantin Seurer [Sun, 12 Jun 2022 20:12:30 +0000 (22:12 +0200)]
radv: Add create_build_pipeline_spv helper

Just a copy of the non SPIR-V version that creates the shader module from SPIR-V.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>

2 years agoradv: Remove unused push constant structs
Konstantin Seurer [Sat, 6 Aug 2022 18:47:17 +0000 (20:47 +0200)]
radv: Remove unused push constant structs

Those are left over from !15648 and were never used in the final version.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>

2 years agoradv: Remove accel_struct_build
Konstantin Seurer [Sat, 6 Aug 2022 18:45:27 +0000 (20:45 +0200)]
radv: Remove accel_struct_build

Now that we always use LBVH this is not useful anymore.
In the future, when we have more options, we will use a different approach.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>

2 years agoradv: Always emulate fmin/fmax
Konstantin Seurer [Fri, 5 Aug 2022 18:47:43 +0000 (20:47 +0200)]
radv: Always emulate fmin/fmax

The native path is not faster and float atomics won't be supported by
ancient glslangValidator versions, so just get rid of it.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>

2 years agoradv: Remove acceleration structure host builds
Konstantin Seurer [Sat, 6 Aug 2022 18:29:05 +0000 (20:29 +0200)]
radv: Remove acceleration structure host builds

This code path is unmaintained and barely used.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>

2 years agoradv: Move radv_acceleration_structure
Konstantin Seurer [Fri, 17 Jun 2022 08:42:06 +0000 (10:42 +0200)]
radv: Move radv_acceleration_structure

Moves radv_acceleration_structure from radv_private to radv_acceleration_structure.
If we already have a acceleration structure header, we can also use it instead of radv_private.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>

2 years agoradv: Move accel struct structs to bvh/bvh.h
Konstantin Seurer [Sat, 6 Aug 2022 19:02:32 +0000 (21:02 +0200)]
radv: Move accel struct structs to bvh/bvh.h

Moves all the acceleration structure structs to bvh/bvh.h so that thay can be used in build kernels.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17028>

2 years agoci/lavapipe: implement traces
David Heidelberg [Wed, 13 Jul 2022 14:48:58 +0000 (16:48 +0200)]
ci/lavapipe: implement traces

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17838>

2 years agoci: prepare piglit-traces for WINE and DXVK
David Heidelberg [Mon, 1 Aug 2022 16:07:52 +0000 (18:07 +0200)]
ci: prepare piglit-traces for WINE and DXVK

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17838>

2 years agovulkan: disallow VK_KHR_performance_query on android
Chia-I Wu [Thu, 4 Aug 2022 17:53:22 +0000 (10:53 -0700)]
vulkan: disallow VK_KHR_performance_query on android

It turns out the extension was later blocked by
android.graphics.cts.VulkanFeaturesTest#testVulkanBlockedExtensions.

Fixes: 77b67a747ef ("vulkan: Enable VK_KHR_performance_query on android")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6991
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Tested-by: Roman Stratiienko <r.stratiienko@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17891>

2 years agoci: Upgrade deqp-runner to 0.15.0.
Emma Anholt [Wed, 3 Aug 2022 20:58:00 +0000 (13:58 -0700)]
ci: Upgrade deqp-runner to 0.15.0.

This includes the new timeout fixes so that tests that throw lots of debug
don't delay the timeout triggering, and the fraction vs shuffling behavior
change so that "--fraction 2" doesn't just skip every other test as it
appears in the caselist (every vertex shader variant, for example).

The fraction vs shuffling change does mean we see some different fails on
some drivers now.

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17876>

2 years agoci: Add testing of the khr-single tests.
Emma Anholt [Wed, 3 Aug 2022 20:40:37 +0000 (13:40 -0700)]
ci: Add testing of the khr-single tests.

These got split out from gl4[3456]-master a while back, so we were missing
coverage in CI.

Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17876>