Lionel Landwerlin [Wed, 29 Sep 2021 16:59:30 +0000 (19:59 +0300)]
meson: extract libversion checks from clc & clover
The src/microsoft/clc/meson.build was assuming to be run only on
Windows. That's about to change.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9156>
Lionel Landwerlin [Wed, 29 Sep 2021 16:52:41 +0000 (19:52 +0300)]
microsoft/clc: fix compiler warning on uninitiailzed variable use
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9156>
Lionel Landwerlin [Wed, 29 Sep 2021 11:25:26 +0000 (14:25 +0300)]
microsoft/clc: drop MSVC specific function
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9156>
Stéphane Marchesin [Sat, 26 Jun 2021 01:02:42 +0000 (03:02 +0200)]
virgl: Flush context before waiting on fences
The logic behind this change is intuitive: if we are waiting for
something, we should probably flush all pending rendering so that it
starts executing in the meantime. This prevents the GPU from sitting
idle for long periods of time while we are also blocked in the app.
With the gun3d trace:
Before: 79 fps After: 215 fps
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13096>
Yiwei Zhang [Tue, 28 Sep 2021 04:45:03 +0000 (04:45 +0000)]
util: fix sign comparison
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13074>
Jason Ekstrand [Tue, 29 Jun 2021 17:17:08 +0000 (12:17 -0500)]
st/texture: Fall back to single-slice uploads in st_CompressedTexSubImage
Currently, if we ever fail to create a re-interpreted uncompressed view
of the resource, we fall back to a SW path. On some Intel hardware,
this happens whenever LOD > 0. Instead, we should fall back to
attempting to upload one slice at a time and only fall back to SW as a
last resort.
v2 [by Ken]: Fix buf_offset calculation and loop over layers.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> [v1]
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11737>
Jason Ekstrand [Tue, 29 Jun 2021 16:44:01 +0000 (11:44 -0500)]
st/texture: Dedent surface setup in CompressedTexSubImage
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11737>
Qiang Yu [Fri, 24 Sep 2021 07:47:50 +0000 (15:47 +0800)]
loader/dri3: fix swap out of order when changing swap interval
This fixes SPECVIEWPERF13 creo test case hang:
1. Client: send present pixmap request (serial=1) when swap_interval==1
and increase send_sbc=1
2. Server: pend the request before vblank arrives
3. Client: set swap_interval=0 (so set XCB_PRESENT_OPTION_ASYNC),
send another present pixmap request (serial=2), increase send_sbc=2
4. Server: handle the async request immediately and send complete event
(serial=2)
5. Client: handle the event and set recv_sbc=event->serial=2
6. Server: vblank arrives so handle pending request and send complete
event (serial=1)
7. Client: handle the event and set recv_sbc=event->serial=1
8. Client: someone call loader_dri3_swapbuffer_barrier() and waiting
on recv_sbc==send_sbc, but no one will set recv_sbc=2 again
So basically it's caused by swap happens out of order. This commit
fixes the problem by waiting on the pending sync swaps all done when
switching to async mode, so move 6&7 before 3.
Attach the xtrace when problem happens:
005:<:003e: 72: Present-Request(148,1): Pixmap window=0x03000002 pixmap=0x0300000b serial=1 valid=0x00000000 update=0x00000000 x_off=0 y_off=0 target_crtc=0x00000000 wait_fence=0x00000000 idle_fence=0x0300000c options=0 target_msc=
4294967296 divisor=0 remainder=0 notifies=;
...
005:<:0041: 72: Present-Request(148,1): Pixmap window=0x03000002 pixmap=0x03000011 serial=2 valid=0x00000000 update=0x00000000 x_off=0 y_off=0 target_crtc=0x00000000 wait_fence=0x00000000 idle_fence=0x03000012 options=Async target_msc=0 divisor=0 remainder=0 notifies=;
005:>:0041: Event Generic(35) Present(148) IdleNotify(2) event=0x03000006 window=0x03000002 serial=2 pixmap=0x03000011 idle_fence=0x03000012
005:>:0041: Event Generic(35) Present(148) CompleteNotify(1) kind=Pixmap(0x00) mode=Copy(0x00) event=0x03000006 window=0x03000002 serial=2 ust=
7505462213117739011 msc=
3565046193979392
005:>:0041: Event Generic(35) Present(148) IdleNotify(2) event=0x03000006 window=0x03000002 serial=1 pixmap=0x0300000b idle_fence=0x0300000c
005:>:0041: Event Generic(35) Present(148) CompleteNotify(1) kind=Pixmap(0x00) mode=Copy(0x00) event=0x03000006 window=0x03000002 serial=1 ust=
7505533793042694147 msc=
3565050488946688
Cc: mesa-stable
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13019>
Chia-I Wu [Tue, 28 Sep 2021 17:33:29 +0000 (10:33 -0700)]
venus: keep layouts of descriptor sets alive
We might reorder vkCmdBindDescriptorSets after
vkDestroyDescriptorSetLayout due to batching, which is likely invalid.
Keep the layouts alive with the sets to defer
vkDestroyDescriptorSetLayout.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13090>
Chia-I Wu [Tue, 28 Sep 2021 16:07:13 +0000 (09:07 -0700)]
venus: add vn_refcount to vn_descriptor_set_layout
The reference count does not go beyond 1 yet.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13090>
Chia-I Wu [Tue, 28 Sep 2021 17:27:42 +0000 (10:27 -0700)]
venus: add a helper to destroy vn_descriptor_set
Add vn_descriptor_set_destroy.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13090>
Chia-I Wu [Tue, 28 Sep 2021 17:04:47 +0000 (10:04 -0700)]
venus: convert bo and shmem to use vn_refcount
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13090>
Chia-I Wu [Tue, 28 Sep 2021 17:03:04 +0000 (10:03 -0700)]
venus: add vn_refcount
Memory ordering is hard. Add vn_refcount to take care of the details.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13090>
Jason Ekstrand [Wed, 29 Sep 2021 13:30:24 +0000 (08:30 -0500)]
v3dv: Use VK_DEFINE_*HANDLE_CASTS instead of rolling our own
The core ones have some nifty stuff like asserts that it's a valid
vk_object_base and has the right type. We don't have real type safety
with Vulkan handles but this is as close as we can get. The core ones
also track when we've started handing out handles for logging purposes
which we want.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13101>
Jason Ekstrand [Wed, 29 Sep 2021 13:15:24 +0000 (08:15 -0500)]
vulkan/shader_module: Fix the lifetime of temporary shader modules
The vk_shader_module_handle_from_nir() macro was constructing a
temporary vk_shader_module and passing it through
vk_shader_module_to_handle(). Since this is a function and not a macro,
it means that the lifetime of the temporary vk_shader_module will end
once the to_handle() function is called. Technically, this is a
use-after-free. I really don't know why no one has been bitten by this
yet....
Fixes:
a41e98ddcae0 "vk/util: add a util macro for initializing stack..."
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13101>
Rob Clark [Sat, 25 Sep 2021 18:48:29 +0000 (11:48 -0700)]
isaspec: De-duplicate bitset encoding
bitset encoding tends to have a lot of duplication, for ex. many
instructions with the same encoding modulo the fixed pattern. Now that
encode_bitset is split out into it's own template, so that we can
capture the result, use a hash table to de-duplicate the bitset encoding
into "snippet" functions so that bitset cases with identical encoding
can re-use the same generated code.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13049>
Rob Clark [Sat, 25 Sep 2021 19:09:29 +0000 (12:09 -0700)]
isaspec: Split encode_bitset() into it's own template
In the next patch, we are going to want to be able to capture the result
of rendering the template as a py variable, which I don't think you can
do otherwise with a <%def>.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13049>
Rob Clark [Sat, 25 Sep 2021 18:13:03 +0000 (11:13 -0700)]
isaspec: Fix comment
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13049>
Rob Clark [Sat, 25 Sep 2021 16:16:16 +0000 (09:16 -0700)]
isaspec: Remove unused leftovers
These were never used, leftovers from an earlier iteration of isaspec
which used an RPN based thing for expressions.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13049>
Dylan Baker [Wed, 29 Sep 2021 20:26:17 +0000 (13:26 -0700)]
docs: update calendar and link releases notes for 21.2.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13109>
Dylan Baker [Wed, 29 Sep 2021 20:17:23 +0000 (13:17 -0700)]
docs" Add SHA256 sum for mesa 21.2.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13109>
Dylan Baker [Wed, 29 Sep 2021 19:40:49 +0000 (12:40 -0700)]
docs: add release notes for 21.2.3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13109>
Chia-I Wu [Tue, 28 Sep 2021 23:05:31 +0000 (16:05 -0700)]
venus: copy VkPhysicalDeviceImageDrmFormatModifierInfoEXT
We should not drop VkPhysicalDeviceImageDrmFormatModifierInfoEXT when it
is provided.
Fixes dEQP-VK.drm_format_modifiers.export_import.*.
Fixes:
efa185ed5cd ("venus: rework external memory capability queries")
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13094>
Dave Airlie [Tue, 28 Sep 2021 04:39:37 +0000 (14:39 +1000)]
gallivm: use pmulhrsw to make aos sampling more accurate.
This uses pmulhrsw avx2 and ssse3 variants. It fixes the
precision of texture filtering calculations.
However it does leave these paths inaccurate on platforms
that don't support it.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13075>
Rhys Perry [Tue, 28 Sep 2021 12:57:05 +0000 (13:57 +0100)]
radv: workaround incorrect image format with World War Z
The image format in a FSR-related shader is incorrect.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5407
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13084>
Jason Ekstrand [Wed, 15 Sep 2021 21:24:22 +0000 (16:24 -0500)]
intel/fs: Emit URB fences when we have LSC
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tested-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13092>
Jason Ekstrand [Wed, 15 Sep 2021 21:21:14 +0000 (16:21 -0500)]
intel/fs: Add the URB fence message
When they re-arranged all the dataport stuff and added the LSC, doing
URB fencing through the dataport no longer makes sense. Instead, there
is now a fence message on the URB shared function.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tested-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13092>
Jason Ekstrand [Fri, 17 Sep 2021 12:45:46 +0000 (07:45 -0500)]
intel/fs: Ignore SLM fences if shared is unused
Found this nugget while looking at the ACO driver. It seems sensible to
avoid SLM fences if there is no SLM. This also makes the check depend
on SLM usage rather than just shader stage which will be useful if we
ever implement task/mesh because task shaders also have SLM.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13092>
Jason Ekstrand [Wed, 15 Sep 2021 17:58:04 +0000 (12:58 -0500)]
intel/fs: Rework fence handling in brw_fs_nir.cpp
Start off making everything look like LSC where we have three types of
fences: TGM, UGM, and SLM. Then, emit the actual code in a generation-
aware way. There are three HW generation cases we care about:
XeHP+ (LSC), ICL-TGL, and IVB-SKL. Even though it looks like there's a
lot to deduplicate, it only increases the number of ubld.emit() calls
from 5 to 7 and entirely gets rid of the SFID juggling and other
weirdness we've introduced along the way to make those cases "general".
While we're here, also clean up the code for stalling after fences and
clearly document every case where we insert a stall.
There are only three known functional changes from this commit:
1. We now avoid the render cache fence on IVB if we don't need image
barriers.
2. On ICL+, we no longer unconditionally stall on barriers. We still
stall if we have more than one to help tie them together but
independent barriers are independent. Barrier instructions will
still operate in write-commit mode and still be scheduling barriers
but won't necessarily stall.
3. We now assert-fail for URB fences on LSC platforms. We'll be adding
in the new URB fence message for those platforms in a follow-on
commit.
It is a big enough refactor, however, that other minor changes may be
present.
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13092>
Dave Airlie [Fri, 24 Sep 2021 03:01:16 +0000 (13:01 +1000)]
llvmpipe: overhaul fs/cs variant keys to be simpler.
These currently always had one sampler state embedded, but got messy
when images was 1 and samplers was 0.
This should fix some undefined reads seen
Fixes:
e639e311a1a7 ("llvmpipe/cs: overhaul cs variant key state.")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13012>
Joshua Ashton [Tue, 7 Sep 2021 12:39:17 +0000 (13:39 +0100)]
radv: Define extern "C" linkage if C++
I am working on a project that uses radv_private.h from C++ code which needs this.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13103>
Joshua Ashton [Tue, 7 Sep 2021 12:40:58 +0000 (13:40 +0100)]
radv: Rename radv_subpass_barrier function to radv_emit_subpass_barrier
Otherwise this shadows the name of the structure, which is problematic for C++ code due to constructors.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13103>
Joshua Ashton [Wed, 29 Sep 2021 16:01:41 +0000 (17:01 +0100)]
vulkan/util: Cast vk_alloc pointers
Fixes errors when trying to use vk_alloc.h from C++ code.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13103>
Lionel Landwerlin [Tue, 28 Sep 2021 10:01:53 +0000 (13:01 +0300)]
spirv: switch Groups capability to non AMD specific field
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13081>
Timur Kristóf [Wed, 1 Sep 2021 10:47:47 +0000 (12:47 +0200)]
aco: Don't write m0 register for LDS instructions on GFX9+.
Fossil DB stats on Sienna Cichlid:
Totals from 2691 (2.09% of 128647) affected shaders:
VGPRs: 124392 -> 124376 (-0.01%)
CodeSize: 8192352 -> 8174620 (-0.22%); split: -0.22%, +0.00%
MaxWaves: 61516 -> 61524 (+0.01%)
Instrs: 1519774 -> 1514958 (-0.32%); split: -0.32%, +0.00%
Latency:
14767555 ->
14766145 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 3394282 -> 3394173 (-0.00%); split: -0.01%, +0.00%
VClause: 31985 -> 32002 (+0.05%); split: -0.02%, +0.07%
SClause: 47581 -> 47539 (-0.09%); split: -0.14%, +0.05%
Copies: 127533 -> 122709 (-3.78%); split: -3.80%, +0.02%
Branches: 39395 -> 39390 (-0.01%)
PreSGPRs: 84389 -> 82702 (-2.00%)
PreVGPRs: 87520 -> 87519 (-0.00%)
Fossil DB stats on Sienna Cichlid with NGGC on:
Totals from 60930 (47.36% of 128647) affected shaders:
VGPRs: 2180712 -> 2180696 (-0.00%)
CodeSize:
169122736 ->
167474304 (-0.97%); split: -0.97%, +0.00%
MaxWaves: 1703698 -> 1703706 (+0.00%)
Instrs:
32301234 ->
31888743 (-1.28%); split: -1.28%, +0.00%
Latency:
152526083 ->
152367301 (-0.10%); split: -0.10%, +0.00%
InvThroughput:
25090218 ->
25089812 (-0.00%); split: -0.00%, +0.00%
VClause: 577302 -> 577319 (+0.00%); split: -0.00%, +0.00%
SClause: 801614 -> 801572 (-0.01%); split: -0.01%, +0.00%
Copies: 3399700 -> 2987201 (-12.13%); split: -12.13%, +0.00%
Branches: 1262859 -> 1262854 (-0.00%)
PreSGPRs: 2175752 -> 2141331 (-1.58%)
PreVGPRs: 1785088 -> 1785087 (-0.00%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11224>
mwezdeck [Mon, 27 Sep 2021 08:53:13 +0000 (10:53 +0200)]
mesa: validate texture format against GL/ES ctx
GL_ALPHA, GL_LUMINANCE and GL_LUMINANCE_ALPHA
texture formats are supported in:
1. GL Compatibility spec
2. GLES 1.0 - GLES 3.2 spec
However, these formats are not supported in:
1. GL Core spec
This patch changes a logic of validation
texture formats in calls like glTexImage2D.
If the context is CORE and these formats were
selected, then return "-1" and in upper layer
return GL_INVALID_ENUM.
If the context is not CORE, return appropriate
format.
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13059>
Samuel Pitoiset [Mon, 27 Sep 2021 13:17:59 +0000 (15:17 +0200)]
radv: remove radv_shader_variant_key completely
Die radv_shader_variant_key, die!
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085>
Samuel Pitoiset [Fri, 24 Sep 2021 11:34:06 +0000 (13:34 +0200)]
radv: stop using vs_common_out.{as_es/as_ls/as_ngg*} shader keys
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085>
Samuel Pitoiset [Mon, 27 Sep 2021 11:18:32 +0000 (13:18 +0200)]
radv: use the pipeline key more when possible
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085>
Samuel Pitoiset [Mon, 27 Sep 2021 11:23:48 +0000 (13:23 +0200)]
radv: pass the pipeline key to the shader info pass
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085>
Samuel Pitoiset [Mon, 27 Sep 2021 13:11:15 +0000 (15:11 +0200)]
radv: remove vs_common_out:export_clip_dists
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13085>
Pierre-Eric Pelloux-Prayer [Tue, 14 Sep 2021 08:57:58 +0000 (10:57 +0200)]
radeonsi: disable PIPE_CAP_PREFER_BACK_BUFFER_REUSE
With https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12763,
the DRI_PRIME dGPU -> iGPU copy will be done by the SDMA hw.
Since it's asynchronous, it's better to always use at least 2 back
buffers to get the next frame rendering started during the copy.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12788>
Pierre-Eric Pelloux-Prayer [Wed, 8 Sep 2021 18:08:57 +0000 (20:08 +0200)]
loader/dri3: avoid reusing the same back buffer with DRI_PRIME
For DRI_PRIME setup where the dGPU -> iGPU copy can happen asynchronously,
we need to ensure that we're not continuously reusing the same back buffer.
The existing code relies on XCB_PRESENT_EVENT_IDLE_NOTIFY to decide if
a buffer is busy or idle. If this event is received before the hardware
is done using the buffer, then it will reuse the same buffer and introduce
a dependency between the copy and the next frame.
This commit mitigates this by trying to allocate a different back buffer
when called from dri3_get_buffer (not from dri3_find_back_alloc, because it
seems that it expects dri3_get_buffer - see
0cc4c7e33ed).
An alternative would be to query the busy-ness using is_resource_busy
but this complicates the code to achieve the same result.
One affected app is Unigine Superposition, and this change improves the
score by 0% - 5% depending on the settings.
This behavior is enabled if PIPE_CAP_PREFER_BACK_BUFFER_REUSE is 0.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12788>
Pierre-Eric Pelloux-Prayer [Tue, 14 Sep 2021 08:57:39 +0000 (10:57 +0200)]
gallium: add PIPE_CAP_PREFER_BACK_BUFFER_REUSE
This will be used in the next commit.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12788>
Corentin Noël [Tue, 14 Sep 2021 12:38:42 +0000 (14:38 +0200)]
virgl: Set GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION to 1
The resulting quads are actually already following the provoking vertex convention.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12851>
Vinson Lee [Sun, 15 Aug 2021 09:14:41 +0000 (02:14 -0700)]
pps: Avoid duplicate elements in with_datasources array.
Setting -Dperfetto=true and -Ddatasources=intel,panfrost to the
meson command line resulted in duplicate elements.
Fixes:
92180a43763 ("pps: Intel pps driver")
Fixes:
513d1baaea5 ("pps: Panfrost pps driver")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12379>
Guilherme Gallo [Tue, 28 Sep 2021 15:46:05 +0000 (12:46 -0300)]
ci: Uprev deqp-runner to 0.9.0
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13088>
Marek Olšák [Sun, 26 Sep 2021 14:18:28 +0000 (10:18 -0400)]
radeonsi: don't set DX10_DIAMOND_TEST_ENA for better performance
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13093>
Alejandro Piñeiro [Mon, 27 Sep 2021 22:37:49 +0000 (00:37 +0200)]
v3d/v3dv: add unlikely for any V3D_DEBUG check
We had some with unlikely, some without it. Let's just put unlikely to
all of them.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13071>
Alejandro Piñeiro [Mon, 27 Sep 2021 22:33:59 +0000 (00:33 +0200)]
broadcom/common: remove unused debug helper
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13071>
Dave Airlie [Tue, 28 Sep 2021 21:31:54 +0000 (07:31 +1000)]
lavapipe: fixup image binding flags.
This removes a bunch of warnings in the debug logs on CI
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13091>
Dave Airlie [Tue, 28 Sep 2021 21:44:07 +0000 (07:44 +1000)]
lavapipe: cleanup image create function.
drop the wrapper as it's unused and make things static.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13091>
Jason Ekstrand [Thu, 23 Sep 2021 17:49:09 +0000 (12:49 -0500)]
panvk: Switch to common GetDeviceQueue and DeviceWaitIdle
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 17:46:28 +0000 (12:46 -0500)]
lavapipe: Switch to common GetDeviceQueue and DeviceWaitIdle
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 17:52:12 +0000 (12:52 -0500)]
lavapipe: Simplify DeviceWaitIdle
No reason to duplicate the guts of QueueWaitIdle inside DeviceWaitIdle.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 17:45:28 +0000 (12:45 -0500)]
v3dv: Use the common GetDeviceQueue implementation
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 17:44:31 +0000 (12:44 -0500)]
turnip: Switch to common GetDeviceQueues2 and DeviceWaitIdle
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 17:43:12 +0000 (12:43 -0500)]
radv: Switch to common GetDeviceQueues2 and DeviceWaitIdle
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 17:41:06 +0000 (12:41 -0500)]
anv: Switch to common GetDeviceQueues2 and DeviceWaitIdle
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 17:40:19 +0000 (12:40 -0500)]
vulkan/device: Add a common DeviceWaitIdle implementation
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 17:18:08 +0000 (12:18 -0500)]
vulkan/device: Add a common GetDeviceQueue2 implementation
If we store the queues in a linked list in the device as vk_queue_init
is called then we can handle enumeration in common code.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Tue, 28 Sep 2021 15:11:42 +0000 (10:11 -0500)]
panvk: Drop panvk_queue::flags/queue_family_index
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 16:43:29 +0000 (11:43 -0500)]
v3dv: Drop v3dv_queue::flags
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 16:39:53 +0000 (11:39 -0500)]
turnip: Drop tu_queue::flags/queue_family_index/queue_idx
They're now part of vk_queue.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 16:38:35 +0000 (11:38 -0500)]
lavapipe: Drop lvp_queue::flags
It's now part of vk_queue
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 16:37:40 +0000 (11:37 -0500)]
radv: Drop radv_queue::flags/queue_family_index/queue_idx
They're now part of vk_queue.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 16:34:15 +0000 (11:34 -0500)]
anv: Drop anv_queue::flags
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 16:14:36 +0000 (11:14 -0500)]
vulkan: Add the pCreateInfo to vk_queue_init()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 16:57:20 +0000 (11:57 -0500)]
panvk: Use vk_command_buffer
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Thu, 23 Sep 2021 16:49:21 +0000 (11:49 -0500)]
panvk: Use vk_queue
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
Jason Ekstrand [Mon, 27 Sep 2021 23:52:56 +0000 (18:52 -0500)]
iris: Return 1 for PIPE_COMPUTE_CAP_IMAGES_SUPPORTED
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13072>
Jason Ekstrand [Mon, 27 Sep 2021 23:52:09 +0000 (18:52 -0500)]
iris: Handle states=NULL in iris_bind_sampler_states
Clover likes to do this to clear our a bunch of samplers without
actually passing an array of NULL pointers. It's easy enough to
handle in iris.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13072>
Yiwei Zhang [Tue, 28 Sep 2021 07:00:13 +0000 (07:00 +0000)]
venus: properly check and fill ahb buffer properties
When it comes to AHB, pExternalBufferInfo->handleType is already
overridden to the renderer handle type. Thus the AHB buffer prop path is
not used. However, this is not caught by cts, vvl or apps because the
host renderer memory features so far satisfy the ahb requirement.
Fixes:
ebf0e455063 ("venus: add ahb image and buffer properties query support")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13076>
Luis Felipe Strano Moraes [Fri, 24 Sep 2021 19:57:05 +0000 (12:57 -0700)]
docs: Add documentation regarding INTEL_MEASURE to envvars doc.
This was initially written by Mark Janes, and was part of MR 7354.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Mike Blumenkrantz <michael.b.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13043>
Luis Felipe Strano Moraes [Fri, 24 Sep 2021 19:55:23 +0000 (12:55 -0700)]
docs: Clean up environment variable docs for Intel drivers.
- Change section name to be more general
- Remove INTEL_SCALAR_VS (dropped as part of release 20.3)
- Sort alphabetically
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Mike Blumenkrantz <michael.b.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13043>
Daniel Schürmann [Tue, 28 Sep 2021 16:11:28 +0000 (17:11 +0100)]
aco: clang-format
No changes, just formatting.
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13087>
Boris Brezillon [Mon, 20 Sep 2021 10:39:12 +0000 (12:39 +0200)]
panfrost: Use an identity swizzle for RAW formats
When the render target format is raw, the swizzle is ignored. Let's
set it to identity to avoid misleading the pandecode reader into
thinking the swizzle is applied.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Suggested-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>
Boris Brezillon [Mon, 6 Sep 2021 12:27:01 +0000 (14:27 +0200)]
pan/lower_fb: Add support for rgb10a2 _SINT variants
It's just a matter of taking the sign bit into account in the
pack/unpack routines.
Needed for panvk rgb10a2_sint blits.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>
Boris Brezillon [Mon, 6 Sep 2021 12:19:28 +0000 (14:19 +0200)]
pan/lower_fb: Add support for B10G10R10A2_UINT variants
The components are re-ordered before packing/unpacking, so nothing to
do here except adding the missing case in the switch statements.
Needed for panvk bgr10a2_uint blits.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>
Boris Brezillon [Mon, 6 Sep 2021 12:16:58 +0000 (14:16 +0200)]
pan/lower_fb: Re-order components when dealing with raw formats
The output swizzle defined in the render-target descriptor is ignored
when the format is RAW. In that case, we have to swap the components
when lowering FB stores/loads if we want to get the right color.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>
Boris Brezillon [Mon, 17 May 2021 12:53:05 +0000 (14:53 +0200)]
pan/lower_fb: Support SNORM8 unpacking
Needed for panvk blend lowering.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>
Boris Brezillon [Fri, 24 Sep 2021 14:10:03 +0000 (16:10 +0200)]
pan/bi: Fix 1DArray image coordinate retrieval
In NIR image instructions, the array index always follows the last
image coordinate, meaning that array index is in coord.y for 1D
arrays. But the current panfrost ABI wants it in coord.z regardless of
the image dimension.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13078>
Timur Kristóf [Fri, 27 Aug 2021 13:45:59 +0000 (15:45 +0200)]
aco: Omit p_extract after ds_read with matching bit size.
Fossil DB stats on Sienna Cichlid:
Totals from 135 (0.10% of 128647) affected shaders:
CodeSize: 525184 -> 523704 (-0.28%)
Instrs: 92835 -> 92684 (-0.16%)
Latency: 311528 -> 311055 (-0.15%)
InvThroughput: 86572 -> 86455 (-0.14%)
Copies: 7666 -> 7650 (-0.21%)
Fossil DB stats on Sienna Cichlid with NGGC on:
Totals from 58374 (45.38% of 128647) affected shaders:
CodeSize:
160322912 ->
159622564 (-0.44%)
Instrs:
30755822 ->
30639193 (-0.38%)
Latency:
136713768 ->
136690360 (-0.02%)
InvThroughput:
21739219 ->
21658151 (-0.37%)
Copies: 3297969 -> 3297953 (-0.00%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11560>
Timur Kristóf [Wed, 23 Jun 2021 16:28:18 +0000 (18:28 +0200)]
aco: Implement integer conversions using p_extract.
Fossil DB stats on Sienna Cichlid:
Totals from 563 (0.44% of 128647) affected shaders:
SpillSGPRs: 1381 -> 1382 (+0.07%)
SpillVGPRs: 1606 -> 1552 (-3.36%)
CodeSize: 2474724 -> 2446612 (-1.14%); split: -1.15%, +0.02%
Scratch: 181248 -> 180224 (-0.56%)
Instrs: 440973 -> 435091 (-1.33%); split: -1.35%, +0.01%
Latency: 9123609 -> 8517830 (-6.64%); split: -6.66%, +0.02%
InvThroughput: 3685256 -> 3383293 (-8.19%); split: -8.22%, +0.02%
VClause: 8425 -> 8372 (-0.63%)
Copies: 66553 -> 66681 (+0.19%); split: -0.49%, +0.68%
Branches: 13824 -> 13825 (+0.01%); split: -0.01%, +0.01%
PreSGPRs: 21816 -> 21824 (+0.04%)
Fossil DB stats on Sienna Cichlid with NGGC on:
Totals from 58802 (45.71% of 128647) affected shaders:
SpillSGPRs: 6541 -> 6542 (+0.02%)
SpillVGPRs: 1606 -> 1552 (-3.36%)
CodeSize:
162976608 ->
162244340 (-0.45%); split: -0.45%, +0.00%
Scratch: 181248 -> 180224 (-0.56%)
Instrs:
31163521 ->
31098078 (-0.21%); split: -0.21%, +0.00%
Latency:
146893569 ->
144920070 (-1.34%); split: -1.34%, +0.00%
InvThroughput:
25384324 ->
25035940 (-1.37%); split: -1.38%, +0.00%
VClause: 552310 -> 552257 (-0.01%)
Copies: 3356856 -> 3356984 (+0.00%); split: -0.01%, +0.01%
Branches: 1237314 -> 1237315 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 2185339 -> 2185347 (+0.00%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11560>
Timur Kristóf [Wed, 23 Jun 2021 16:27:19 +0000 (18:27 +0200)]
aco: Allow p_extract to have different definition and operand sizes.
Makes p_extract more flexible and prepares it to be usable
for other use cases.
No Fossil DB changes.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11560>
Marek Olšák [Sun, 26 Sep 2021 18:18:45 +0000 (14:18 -0400)]
radeonsi: implement shader-based culling for lines
This helps some viewperf subtests.
Only view XY culling is done. Edgeflags are always disabled with lines.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
Marek Olšák [Sun, 26 Sep 2021 19:21:34 +0000 (15:21 -0400)]
ac/llvm: rename ac_cull_triangle -> ac_cull_primitive
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
Marek Olšák [Sun, 26 Sep 2021 16:49:00 +0000 (12:49 -0400)]
radeonsi: add gfx10 helpers for determining whether edgeflags are enabled
They will return false when culling lines.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
Marek Olšák [Sun, 26 Sep 2021 14:17:28 +0000 (10:17 -0400)]
radeonsi: always use the correct number of vertices in NGG shader code
This is always 3 now, but it will be 2 for lines.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
Marek Olšák [Sun, 26 Sep 2021 16:06:19 +0000 (12:06 -0400)]
ac/llvm: pass cull options into cull_bbox directly
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
Marek Olšák [Sun, 26 Sep 2021 12:45:19 +0000 (08:45 -0400)]
radeonsi: disallow NGG fast launch on Navi1x because VGT_FLUSH makes it slower
This improves viewperf performance on Navi1x.
All Navi1x fast launch workarounds are removed and all fast launch
codepaths are disabled.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
Marek Olšák [Sun, 26 Sep 2021 12:40:18 +0000 (08:40 -0400)]
radeonsi: fix clearing index_size for NGG fast launch
Cc: 21.1 21.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
Marek Olšák [Sun, 26 Sep 2021 08:29:57 +0000 (04:29 -0400)]
radeonsi: strenthen the ngg->legacy hw workaround, fix fast launch hangs too
Cc: 20.1 20.2 <mesa-stable@lists.freedesktop.org>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
Marek Olšák [Sun, 26 Sep 2021 08:29:07 +0000 (04:29 -0400)]
ac/gpu_info: fix the comment for the NGG->legacy transition bug
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
Marek Olšák [Sun, 26 Sep 2021 07:19:40 +0000 (03:19 -0400)]
radeonsi: don't check ngg_culling != 0 for fast launch because it's tautology
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
Marek Olšák [Sat, 25 Sep 2021 17:15:37 +0000 (13:15 -0400)]
radeonsi: clean prefer_mono for the blit VS
This was missed when I was reworking shader key updates.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
Marek Olšák [Thu, 23 Sep 2021 12:06:34 +0000 (08:06 -0400)]
radeonsi: reduce NGG culling on/off transitions by keeping it enabled
When it's enabled, it stays enabled until the next shader change
or an incompatible primitive type, etc.
This improves performance for viewperf/snx.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
Marek Olšák [Sun, 26 Sep 2021 06:20:52 +0000 (02:20 -0400)]
radeonsi: use the optimal draw packet sequence for VGT_FLUSH
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
Marek Olšák [Thu, 23 Sep 2021 12:05:04 +0000 (08:05 -0400)]
radeonsi: set vs_uses_base_instance using C++ template arguments
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
Marek Olšák [Sat, 25 Sep 2021 16:47:28 +0000 (12:47 -0400)]
radeonsi: decrease vertex count threshold for shader culling to 128
to match radv
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>