Rob Clark
77a5778836
freedreno: Move driconf settings into sub-struct
...
Organize all one of them in a single place before adding more.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224 >
2023-04-01 13:53:31 +00:00
Rob Clark
8620b64930
freedreno: Avoid looping shader stages if nothing dirty
...
We have corresponding global dirty bits for each of the per-stage dirty
bits. We can use this to skip iterating over shader stages when there
is no per-stage dirty state to handle.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224 >
2023-04-01 13:53:31 +00:00
Rob Clark
0a62a874fc
freedreno: Re-work dirty-resource tracking
...
If a resource is dirty but already tracked by the current batch, no need
to process it at draw time.
Note that the batch could change (ie. new fb state bound, etc) after the
check if we need resource dirty tracking, but in these cases all the
dirty-resource state is marked dirty.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224 >
2023-04-01 13:53:31 +00:00
Rob Clark
4c0fdef42c
freedreno: Inline single-use helpers
...
bind_sampler_states() / set_sampler_views() have just a single caller.
So inline them. Needed for next commit.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224 >
2023-04-01 13:53:31 +00:00
Rob Clark
7099f628c5
freedreno: Extract out a helper
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224 >
2023-04-01 13:53:31 +00:00
Rob Clark
0408ddcda9
freedreno: Hoist dirty vars
...
Prep to re-work how we track dirty-resource.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224 >
2023-04-01 13:53:31 +00:00
Rob Clark
19a138adcf
freedreno: Stop being too clever by half
...
This wasn't taking into account a change in corresponding bit in
writeable_bitmask, causing problem if an SSBO was first bound for
read, and then rebound for write, we wouldn't update the buffers
valid range. Instead just drop the premature optimization.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224 >
2023-04-01 13:53:31 +00:00
Connor Abbott
b123ee707d
freedreno: Fix or/and'ing two BitmaskEnums
...
Previously when there was an & or | with two BitmaskEnums, the compiler
would try to cast the RHS and find a matching overload, but there were
many different casts (to the enum itself, to an integer, to a boolean,
etc.) each with a matching overload which meant that it couldn't pick
one and errored out due to an ambiguous overload. Fix this by
explicitly providing an overload that takes a BitmaskEnum on the RHS.
It has to also provide a BitmaskEnum output, so that subsequent
operators with the result on the LHS (e.g. when or'ing together three
BitmaskEnums without any parentheses tricks) also get the right
overload.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224 >
2023-04-01 13:53:31 +00:00
Pavel Ondračka
5825f9dd68
nine: use separate register for aL emulation
...
NIR loop unrolling is only working if the loop counter is a scalar.
So keep the loop counter separate and move the aL emulation and
the aL increment to a new register.
This allows loop unrolling with vec4 backends where unconditional
scalarizing of phi nodes is undesirable, like for example r300.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com >
Reviewed-by: Axel Davy <davyaxel0@gmail.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7222
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21243 >
2023-04-01 11:12:55 +00:00
Karol Herbst
ac993ae828
rusticl/kernel: make use of cso info
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855 >
2023-03-31 20:29:00 +00:00
Karol Herbst
c7dd3677dc
panfrost: implement get_compute_state_info
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855 >
2023-03-31 20:29:00 +00:00
Karol Herbst
87aeea20ac
panfrost: move max_thread_count and take reg_count into account
...
We'll need it to report proper thread counts for OpenCL.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855 >
2023-03-31 20:29:00 +00:00
Karol Herbst
3212ac4658
nvc0: implement get_compute_state_info
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855 >
2023-03-31 20:29:00 +00:00
Karol Herbst
52f03f63e7
nv50: implement get_compute_state_info
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855 >
2023-03-31 20:29:00 +00:00
Karol Herbst
c1c0362d34
iris: implement get_compute_state_info
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855 >
2023-03-31 20:29:00 +00:00
Karol Herbst
5fa297dadd
lp: implement get_compute_state_info
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855 >
2023-03-31 20:29:00 +00:00
Karol Herbst
6305d1cb1c
gallium: add get_compute_state_info
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855 >
2023-03-31 20:29:00 +00:00
Karol Herbst
87147e2b09
rusticl/kernel: set has_variable_shared_mem on the nir
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855 >
2023-03-31 20:29:00 +00:00
Karol Herbst
0e5722cd22
nir: track existence of variable shared memory
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19855 >
2023-03-31 20:29:00 +00:00
Sil Vilerino
1995762d68
Revert "d3d12: Honor suggested driver profile/level for H264/HEVC encode"
...
This reverts commit 37652da616 .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22239 >
2023-03-31 20:13:20 +00:00
Rhys Perry
0f60c18f29
aco: don't optimize s_or_b64(v_cmp_u_f32(a, b), cmp(a, a))
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22214 >
2023-03-31 19:41:54 +00:00
Charlie Birks
46e7a127d9
docs: add a few vulkan extensions supported by multiple drivers
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11445 >
2023-03-31 19:35:36 +00:00
Konstantin Seurer
7b837531e8
radv/ci: Update ray tracing pipeline fail/skip lists
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22018 >
2023-03-31 19:05:17 +00:00
Samuel Pitoiset
e98aded527
radv: fix binding raytracing/compute pipelines
...
If a compute pipeline is bound after a raytracing pipeline, the
computes shader slot (aka RT prolog) will be overwritten.
To fix this, move the RT prolog outside of the compute shader slot.
Fixes: d109362a3d ("radv: copy bound shaders to the cmdbuf state")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22235 >
2023-03-31 18:29:05 +00:00
Samuel Pitoiset
56493a5f8a
radv: add the raygen shader BO to the cmdbuf list
...
Found by inspection.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22235 >
2023-03-31 18:29:05 +00:00
Timur Kristóf
115958b6f0
ac/nir/ngg: Slightly improve attribute ring offset calculation.
...
Inspired by Nicolai Hähnle's commit in LLPC.
Instead of using a SALU instruction to add to the scalar
offset, rely on the buffer swizzling and use constant offset.
Fossil DB stats on GFX1100:
Totals from 47910 (35.51% of 134913) affected shaders:
CodeSize: 87927612 -> 86968136 (-1.09%)
Instrs: 17584007 -> 17440094 (-0.82%)
Latency: 97232173 -> 97126311 (-0.11%)
InvThroughput: 9904586 -> 9905288 (+0.01%); split: -0.02%, +0.02%
VClause: 544430 -> 542566 (-0.34%)
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22227 >
2023-03-31 17:02:17 +00:00
Timur Kristóf
61003e3600
radv: Use radv_get_shader to get vertex shader when binding pipeline.
...
The shaders[MESA_SHADER_VERTEX] can be NULL for merged shaders.
Fixes: b2ac40e734
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8749
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22229 >
2023-03-31 16:42:39 +00:00
Samuel Pitoiset
f8558d1fb5
radv: configure PA_SC_MODE_CNTL_1 during cmdbuf recording
...
Two graphics pipeline parameters need to be copied to the cmdbuf
state.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22218 >
2023-03-31 16:07:11 +00:00
Samuel Pitoiset
66da73e863
radv: set PS_ITER_SAMPLE(1) for sample shading during cmdbuf recording
...
This shouldn't be configured in the pipeline.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22218 >
2023-03-31 16:07:11 +00:00
Samuel Pitoiset
b750fe4c6a
radv: copy db_render_control to the cmdbuf state
...
This register is only used for meta operations.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22218 >
2023-03-31 16:07:11 +00:00
José Roberto de Souza
e6c9b6eddc
iris: Implement Xe version of bo_madvise() and bo_set_caching()
...
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060 >
2023-03-31 15:40:27 +00:00
Maarten Lankhorst
c10ff19704
iris: Place scanout buffers only into lmem for discrete GPUs
...
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060 >
2023-03-31 15:40:27 +00:00
José Roberto de Souza
d72705ce43
iris: Handle allocation of scanout buffers in Xe
...
Bos that will be scanout in display need to be allocated with
flags = XE_GEM_CREATE_FLAG_SCANOUT in Xe and that implies to different
caching rules for this buffer.
So here not allowing to get scanout buffer from cache or allow it
to be placed in a cache bucket for reuse.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060 >
2023-03-31 15:40:27 +00:00
José Roberto de Souza
ccffcec03e
iris: Handle allocation of exported buffers in Xe kmd
...
Bos that will be exported need to be allocated with vm_id = 0 in Xe,
so don't try to get a bo from cache that was allocated with a
valid vm_id.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060 >
2023-03-31 15:40:27 +00:00
José Roberto de Souza
41ddecc8b2
iris: Add BO_ALLOC_SHARED
...
Xe KMD requires special handling for exported buffers during creation.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22060 >
2023-03-31 15:40:27 +00:00
Faith Ekstrand
4b0b75c27a
anv: Use the new vk_device_memory base struct
...
Reviewed-by: Lina Versace <lina@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038 >
2023-03-31 14:57:03 +00:00
Faith Ekstrand
c0cc508cd0
vulkan: Add a vk_device_memory base struct
...
This lets us provide a vk_device_memory_range helper similar to what's
provided for buffers for dealing with VK_WHOLE_SIZE. We can also handle
flags and some annoyance around Android hardware buffer import.
Reviewed-by: Lina Versace <lina@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038 >
2023-03-31 14:57:03 +00:00
Faith Ekstrand
b16cfe23ef
vulkan,anv,hasvk,radv: Unify Android hardware buffer creation
...
Reviewed-by: Lina Versace <lina@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038 >
2023-03-31 14:57:03 +00:00
Faith Ekstrand
d75f797246
radv: Set vk_image.ahardware_buffer_format
...
Reviewed-by: Lina Versace <lina@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038 >
2023-03-31 14:57:03 +00:00
Faith Ekstrand
0a86df21d0
anv,hasvk: Set vk_image.ahardware_buffer_format
...
This effectively just modifies it for YCbCr images where the common code
doesn't have a useable format mapping.
Reviewed-by: Lina Versace <lina@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038 >
2023-03-31 14:57:03 +00:00
Faith Ekstrand
906944b210
vulkan: Add an ahardware_buffer_format field to vk_image
...
Reviewed-by: Lina Versace <lina@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038 >
2023-03-31 14:57:03 +00:00
Faith Ekstrand
dc0749adab
vulkan/android: Fix hardware buffer usage flags
...
We now add the correct usage flags for input attachments, storage
images, and depth/stencil attachments.
Reviewed-by: Lina Versace <lina@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038 >
2023-03-31 14:57:03 +00:00
Faith Ekstrand
41f88be282
vulkan,anv,hasvk,radv: Add a common vk_image_usage_to_ahb_usage helper
...
Reviewed-by: Lina Versace <lina@kiwitree.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22038 >
2023-03-31 14:57:03 +00:00
Felix DeGrood
49f34675f3
anv: set CFE_STATE.OverDispatchControl to default
...
BSpec specifies default value for CFE_STATE.OverDispatchControl
is 2, or 50% overdispatch. No observed performance impact.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179 >
2023-03-31 14:18:59 +00:00
Felix DeGrood
ecb709c853
anv: only emit CFE_STATE when scratch space increases
...
On Gen12.5+, we only need to emit CFE_STATE when scratch space
has changed, not on every pipeline binding. Also, only grow the
scratch space, never shrink it. Need to reset after secondary buf.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179 >
2023-03-31 14:18:58 +00:00
Lionel Landwerlin
c88de6c18c
anv: move queue check helpers to anv_private
...
Also fix missing trace point stuff in command buffer begin/end
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179 >
2023-03-31 14:18:58 +00:00
Lionel Landwerlin
546a6752ac
anv: compute the largest GRL kernel scratch size
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179 >
2023-03-31 14:18:58 +00:00
Felix DeGrood
97e64aef60
anv: cs_stall during compute state flush on < gen12.5
...
The CS Stall in cmd_buffer_flush_compute_state is only required
on HW that uses MEDIA_VFE_STATE, gen12 and previous.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22179 >
2023-03-31 14:18:58 +00:00
Lucas Fryzek
cffa67af01
gallium: Modify default path for DMABUF to use DRM
...
Modify the code path taken in `u_pipe_screen_get_param_defaults`
to call DRM to check if `PIPE_CAP_DMABUF` is supported. This is
required for overriding the behavior in `dri2_init_screen_extensions`
to support importing DMA bufs on drivers that don't support DRM, by
simply changing how `PIPE_CAP_DMABUF` is handled in their driver.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654 >
2023-03-31 13:39:07 +00:00
Lucas Fryzek
59efea9f63
d3d12/llvmpipe/softpipe: Add support for get_screen_fd
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654 >
2023-03-31 13:39:07 +00:00