Connor Abbott [Wed, 29 Jun 2022 09:33:56 +0000 (11:33 +0200)]
tu/lrz: Do not use framebuffer when inheriting LRZ
The only thing it's used for is to get the image view, and we can't rely
on it existing anyway. With dynamic rendering, we only have the format
of the attachments and sample count, so moving forward we can't rely on
anything other than that.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17378>
Georg Lehmann [Tue, 26 Jul 2022 18:14:34 +0000 (20:14 +0200)]
nir/fold_16bit_tex_image: Default to only_fold_all.
No driver doesn't use this option.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17757>
Georg Lehmann [Tue, 26 Jul 2022 17:55:36 +0000 (19:55 +0200)]
radeonsi: Stop using nir_legalize_16bit_sampler_srcs.
This pass is problematic because it truncates sources when there are type
mismatches. With the right nir_fold_16bit_tex_image options we can ensure
that there is never a mismatch.
Other changes: bias is affected by A16 https://reviews.llvm.org/D111754
And enable G16 as we recently confirmed that it's fully independent from A16.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17757>
Danylo Piliaiev [Wed, 27 Jul 2022 10:23:13 +0000 (13:23 +0300)]
zink/turnip: Add comments to already triaged failures for tu baseline
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17762>
Chia-I Wu [Fri, 22 Jul 2022 17:33:20 +0000 (10:33 -0700)]
ir3: set UL flag before ir3_lower_subgroups
ir3_legalize_relative, extracted from ir3_legalize, assumes a0 is loaded
first in each block if there is any user in the block.
ir3_lower_subgroups breaks the assumption. We need to do
ir3_legalize_relative first.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6902
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17720>
Brian Paul [Mon, 25 Jul 2022 17:39:12 +0000 (11:39 -0600)]
llvmpipe: fix texcoord analysis regression
The texcoord component can be specifed by the src registers swizzle
or the variable's location_frac field.
Signed-off-by: Brian Paul <brianp@vmware.com>
Fixes:
90d011de8ee ("llvmpipe: fix texcoord analysis in llvmpipe_nir_fn_is_linear_compat()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6889
Reviewed-by: Emma Anholt <emma@anholt.net>
Tested-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17743>
Georg Lehmann [Wed, 27 Jul 2022 10:43:31 +0000 (12:43 +0200)]
aco/ir: Add swapped opcode for v_cmp_u/v_cmp_o.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17763>
Georg Lehmann [Wed, 27 Jul 2022 10:34:27 +0000 (12:34 +0200)]
aco/ir: Add v_cmp_class to get_cmp_info.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17763>
Georg Lehmann [Wed, 27 Jul 2022 10:27:07 +0000 (12:27 +0200)]
aco/ir: Add vcmpx opcode to get_cmp_info.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17763>
Georg Lehmann [Wed, 27 Jul 2022 10:04:58 +0000 (12:04 +0200)]
aco/ir: Fix swapped nle.
Cc: mesa-stable
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17763>
Georg Lehmann [Wed, 27 Jul 2022 10:03:22 +0000 (12:03 +0200)]
aco/ir: Add integer get_cmp_info.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17763>
Georg Lehmann [Wed, 27 Jul 2022 09:43:03 +0000 (11:43 +0200)]
aco/ir: Generalize (un)ordered_swapped.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17763>
Sarah Walker [Mon, 4 Jul 2022 09:05:30 +0000 (10:05 +0100)]
pvr: Move BRN 44079, 48492 and 66011 code into pvrsrvkm specific directory
The new kernel mode driver will provide the relevant information directly to
userspace, so this code is only required for pvrsrvkm.
Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17595>
Jordan Justen [Wed, 27 Jul 2022 03:20:24 +0000 (20:20 -0700)]
anv: Fix PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES with large BAR
Reported-by: Dave Airlie <airlied@redhat.com>
Fixes:
fae88d8791b ("anv: make use of the new smallbar uAPI")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6937
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17761>
Timur Kristóf [Tue, 17 May 2022 17:18:37 +0000 (19:18 +0200)]
radv: Use NIR-based NGG lowering with LLVM.
Also cleanup some unused code.
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/12792>
Timur Kristóf [Tue, 17 May 2022 16:51:54 +0000 (18:51 +0200)]
radv: Properly set LDS size for LLVM NGG shaders.
Update the esgs_ring_size after ac_nir_lower_ngg.
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/12792>
Timur Kristóf [Thu, 9 Sep 2021 13:11:43 +0000 (15:11 +0200)]
radv/llvm: Remove incorrect hardcoded workgroup size from NGG GS.
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/12792>
Timur Kristóf [Wed, 8 Sep 2021 08:14:09 +0000 (10:14 +0200)]
ac/llvm: Implement GDS atomic add NIR intrinsic.
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/12792>
Manuel Stoeckl [Tue, 18 Jan 2022 03:03:20 +0000 (22:03 -0500)]
dri: add [ax]bgr16161616 to format lookup tables
Note: The format __DRI_IMAGE_FORMAT_ABGR16161616 was already
in the dri2_format_table, but had been hidden from outside view,
for lack of an official DRM fourcc. Since its fourcc has now been
assigned, it is safe to reveal the format.
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14580>
Manuel Stoeckl [Tue, 18 Jan 2022 03:02:48 +0000 (22:02 -0500)]
dri: fix incorrect fourcc for R16G16B16A16_UNORM format
The DRM fourcc for this format is DRM_FORMAT_ABGR16161616 = 'AB48', not
__DRI_IMAGE_FOURCC_RGBA16161616 = 'RA48'. This should have no outward
effect for clients, since the format does not get revealed by
dri2_query_dma_buf_formats, and is otherwise only used within the
library.
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14580>
Manuel Stoeckl [Mon, 10 Jan 2022 02:30:29 +0000 (21:30 -0500)]
gbm: add GBM_FORMAT_[AX]BGR16161616
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14580>
Manuel Stoeckl [Mon, 10 Jan 2022 02:28:36 +0000 (21:28 -0500)]
dri_interface: add XBGR16161616 format
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14580>
Marek Olšák [Mon, 11 Jul 2022 04:48:51 +0000 (00:48 -0400)]
ac/gpu_info: require amdgpu DRM 3.15.0 (kernel 4.12) from July 2017
to match the radeon requirement
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Mon, 11 Jul 2022 04:43:07 +0000 (00:43 -0400)]
gallium/radeon: require radeon DRM 2.50.0 (kernel 4.12) from July 2017
This is the latest radeon DRM version.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Mon, 11 Jul 2022 04:38:43 +0000 (00:38 -0400)]
ac/gpu_info: remove unused has_unaligned_shader_loads
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Mon, 11 Jul 2022 04:27:59 +0000 (00:27 -0400)]
ac/gpu_info: remove amdgpu_gpu_info parameter from ac_query_gpu_info
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Mon, 11 Jul 2022 04:24:46 +0000 (00:24 -0400)]
ac/gpu_info: use drm_amdgpu_device_info instead of amdgpu_gpu_info
These fields are identical but the latter is from libdrm.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Fri, 8 Jul 2022 00:33:40 +0000 (20:33 -0400)]
radeonsi: remove workarounds for radeon DRM < 2.45.0
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Fri, 8 Jul 2022 00:08:43 +0000 (20:08 -0400)]
gallium/radeon: require radeon DRM 2.45.0 from April 2016
This removes most non-radeonsi workarounds.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Fri, 8 Jul 2022 00:08:43 +0000 (20:08 -0400)]
amd: require amdgpu DRM 3.2.0 from April 2016
This removes an early bug workaround.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Thu, 7 Jul 2022 23:46:33 +0000 (19:46 -0400)]
ac/gpu_info: remove redundant vcn_encode
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Thu, 7 Jul 2022 23:46:33 +0000 (19:46 -0400)]
ac/gpu_info: remove redundant vce_encode
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Thu, 7 Jul 2022 23:46:33 +0000 (19:46 -0400)]
ac/gpu_info: remove redundant uvd_encode
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Thu, 7 Jul 2022 23:46:33 +0000 (19:46 -0400)]
ac/gpu_info: remove redundant jpeg_decode
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Thu, 7 Jul 2022 23:46:33 +0000 (19:46 -0400)]
ac/gpu_info: remove redundant uvd_decode
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Thu, 7 Jul 2022 23:22:31 +0000 (19:22 -0400)]
ac/gpu_info: remove vram_size and gtt_size in favor of *_kb variants
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Thu, 7 Jul 2022 23:00:16 +0000 (19:00 -0400)]
ac/gpu_info: use the kernel-reported GFX IP version to set gfx_level
hopefully this won't break the world.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Thu, 7 Jul 2022 22:54:04 +0000 (18:54 -0400)]
ac/gpu_info: use hw_ip::ip_discovery_version to set IP versions
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Sun, 3 Jul 2022 19:27:59 +0000 (15:27 -0400)]
ac/gpu_info: rework and extend device info to be more informative
This is the result with AMD_DEBUG=info:
Device info:
name = NAVI23
marketing_name = AMD Radeon RX 6600
num_se = 2
num_rb = 8
num_cu = 28
max_gpu_freq = 2750 MHz
max_gflops = 9856 GFLOPS
l0_cache_size = 16 KB
l1_cache_size = 128 KB
l2_cache_size = 2048 KB
l3_cache_size = 32 MB
memory_channels = 8 (TCC blocks)
memory_size = 8 GB (8192 MB)
memory_freq = 14 GHz
memory_bus_width = 128 bits
memory_bandwidth = 224 GB/s
clock_crystal_freq = 100000 KHz
IP GFX 10.3 queues:1
IP COMP 10.3 queues:4
IP SDMA 5.2 queues:2
IP VCN_DEC 3.0 queues:1
IP VCN_ENC 3.0 queues:1
IP VCN_JPG 3.0 queues:1
It might not be 100% correct with other chips.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Sun, 3 Jul 2022 19:10:15 +0000 (15:10 -0400)]
ac/gpu_info: remove tabs
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Marek Olšák [Sun, 3 Jul 2022 19:09:16 +0000 (15:09 -0400)]
ac/gpu_info: rename info fields to num_cu, memory_bus_width, memory_freq_mhz
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
Dave Airlie [Mon, 25 Jul 2022 03:28:08 +0000 (13:28 +1000)]
llvmpipe: keep context list and use to track resource usage.
Just check across all contexts if a resource is referenced.
Fixes:
6bbbe15a783a ("Reinstate: llvmpipe: allow vertex processing and fragment processing in parallel")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17702>
Dave Airlie [Fri, 22 Jul 2022 01:12:58 +0000 (11:12 +1000)]
llvmpipe: make last_fence a screen/rast object not a context one.
When a flush happens the per-context setup is used to hold the fence
for the last scene sent to the rasterizer. However when multiple
contexts are in use, this fence won't get returned to be blocked on.
Instead move the last fence to the rasterizer object, and return
that instead as it should be valid across contexts.
Fixes gtk4 bugs on llvmpipe since overlapping vertex/fragment.
Fixes:
6bbbe15a783a ("Reinstate: llvmpipe: allow vertex processing and fragment processing in parallel")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17702>
Jordan Justen [Sat, 30 Apr 2022 09:30:57 +0000 (02:30 -0700)]
intel/dev: Enable remaining DG2 and ATS-M device IDs
Mostly Matt Roper's kernel patch commit message:
The device IDs here are associated with DG2 add-in cards. We need to
wait for some additional functionality (e.g., small BAR recovery) to
land before we're ready to upstream these.
Ref: https://patchwork.freedesktop.org/patch/483381/?series=103098&rev=1
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12706>
Iago Toral Quiroga [Mon, 18 Jul 2022 09:12:11 +0000 (11:12 +0200)]
v3dv: only check binning sync for semaphores for the first CL job
Semaphore waits in a command buffer only affect the first jobs we execute
in each hardware queue since jobs in the same queue are serialized against
each other. Binning syncs in particular, only affect CL jobs.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17594>
Iago Toral Quiroga [Mon, 18 Jul 2022 08:21:46 +0000 (10:21 +0200)]
v3d,v3dv: add a common v3d_hw_prim_type helper
We had this replicated in both drivers.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17594>
Iago Toral Quiroga [Mon, 18 Jul 2022 08:12:11 +0000 (10:12 +0200)]
v3dv: remove unnecesary FIXME comment
We only want to cleant BCL barrier flags if we consume a BCL barrier.
For example, if the client records a barrier for an index buffer
it should apply to the next draw call that uses an index buffer
which may not be the current draw call but one coming after it.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17594>
Mike Blumenkrantz [Fri, 15 Jul 2022 02:27:22 +0000 (22:27 -0400)]
zink: enable unordered blit/resolve ops
can't do swapchain or u_blitter ops, but these should be fine
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17667>
Mike Blumenkrantz [Fri, 15 Jul 2022 02:22:48 +0000 (22:22 -0400)]
zink: make get_cmdbuf() public
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17667>
Mike Blumenkrantz [Fri, 15 Jul 2022 01:52:44 +0000 (21:52 -0400)]
zink: expand unordered_exec
track read+write
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17667>
Mike Blumenkrantz [Fri, 15 Jul 2022 01:51:01 +0000 (21:51 -0400)]
zink: move buffer/image functions down in file
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17667>
Mike Blumenkrantz [Thu, 14 Jul 2022 15:46:43 +0000 (11:46 -0400)]
zink: promote image/buffer copy operations to unordered
if the src and dst for these operations can both be promoted, then the
entire operation can be promoted to potentially avoid splitting renderpasses
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17667>
Mike Blumenkrantz [Thu, 14 Jul 2022 15:37:56 +0000 (11:37 -0400)]
zink: add a second resource param to get_cmdbuf() for unordered promotion
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17667>
Mike Blumenkrantz [Thu, 14 Jul 2022 15:23:18 +0000 (11:23 -0400)]
zink: rework unordered_exec handling
previously this would opportunistically promote barriers to the unordered
cmdbuf only if a renderpass was active or there was no access, which
was the wrong approach
instead, opportunistically promote barriers to the unordered cmdbuf
any time it's possible to do so, which is when one of these conditions is true:
* when there is no access to the resource on the current cmdbuf
* when the only access to the resource is in the unordered cmdbuf
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17667>
Mike Blumenkrantz [Thu, 14 Jul 2022 16:26:55 +0000 (12:26 -0400)]
zink: explicitly unset unordered_exec when resource can't be unordered
ensure that subsequent commands can't be promoted
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17667>
Mike Blumenkrantz [Thu, 14 Jul 2022 15:20:46 +0000 (11:20 -0400)]
zink: zink_resource::unordered_barrier -> unordered_exec
this is a bit more clear
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17667>
Mike Blumenkrantz [Fri, 15 Jul 2022 15:09:04 +0000 (11:09 -0400)]
zink: add ZINK_DEBUG=noreorder
this will be useful for debugging
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17667>
Mike Blumenkrantz [Fri, 15 Jul 2022 15:08:25 +0000 (11:08 -0400)]
zink: add doc for ZINK_DEBUG=compact
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17667>
Mike Blumenkrantz [Fri, 15 Jul 2022 15:05:50 +0000 (11:05 -0400)]
zink: convert ZINK_DEBUG to enum
more readable/debuggable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17667>
Mike Blumenkrantz [Thu, 14 Jul 2022 15:20:26 +0000 (11:20 -0400)]
zink: stop ORing unordered barrier access
this doesn't make any sense and is confusing
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17667>
Jordan Justen [Sat, 11 Jun 2022 01:20:30 +0000 (18:20 -0700)]
intel/dev: Determine the amount of free vram using small BAR uapi
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16739>
Jordan Justen [Mon, 16 May 2022 09:33:11 +0000 (02:33 -0700)]
intel/dev: Use i915 region probed_cpu_visible_size when non-zero
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16739>
Jordan Justen [Mon, 16 May 2022 17:43:15 +0000 (10:43 -0700)]
iris/bufmgr: Add I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS for vram mappable buffers
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16739>
Lionel Landwerlin [Mon, 2 May 2022 09:38:16 +0000 (12:38 +0300)]
anv: make use of the new smallbar uAPI
Instead of having 2 VkMemoryType pointing to the same VkMemoryHeap, we
have each VkMemoryType with VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT (one
host visible, the other not) point to its own VkMemoryHeap. For the
local heap that is host visible, we'll use the
I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS flag at GEM BO creation.
When the smallbar uAPI is not available we fallback to a single heap
and do not use I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS.
v2: Handle probed_cpu_visible_size == probed_size (Matthew)
v3:
* Jordan: Use region info from devinfo
v4: Also make the vram host visible heap as local (Ken)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16739>
Jordan Justen [Fri, 22 Jul 2022 17:30:14 +0000 (10:30 -0700)]
drm-uapi/i915_drm.h: Update from drm-next (2022-07-22)
git://anongit.freedesktop.org/drm/drm
417c1c1963549e9a48b83ada59d90258e38c6594
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16739>
Mike Blumenkrantz [Tue, 26 Jul 2022 18:42:22 +0000 (14:42 -0400)]
lavapipe: fix shader access stage conversion from mesa -> pipe
ok ok but this time it's fixed and works I promise
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17758>
Gert Wollny [Tue, 26 Jul 2022 10:18:07 +0000 (12:18 +0200)]
r600/sb: fall back to unoptimized shader if RA fails
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17755>
Benjamin Cheng [Sat, 14 May 2022 01:24:12 +0000 (21:24 -0400)]
radv: expose disjoint image support
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16510>
Benjamin Cheng [Fri, 6 May 2022 19:54:18 +0000 (15:54 -0400)]
radv: implement disjoint memory for multiplane images
For descriptor binding, we need to allow up to three buffers to be
referenced by any image.
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16510>
Benjamin Cheng [Mon, 6 Jun 2022 17:31:25 +0000 (13:31 -0400)]
radv: consolidate descriptor set buffer counts
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16510>
Benjamin Cheng [Sun, 8 May 2022 18:24:41 +0000 (14:24 -0400)]
radv: refactor image binding into struct
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16510>
Mike Blumenkrantz [Fri, 22 Jul 2022 13:33:21 +0000 (09:33 -0400)]
util/blitter: respect PIPE_TEXTURE_RECT
if this isn't supported, don't use rect-related sampling
cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17714>
Emma Anholt [Mon, 25 Jul 2022 02:06:31 +0000 (19:06 -0700)]
ci/virgl: Make the VM-based virgl tests report to #virgl-ci, too.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17730>
Emma Anholt [Sun, 24 Jul 2022 15:11:49 +0000 (08:11 -0700)]
gallivm: Optimize single-invocation SSBO stores.
The CTS does a lot of 1x1x1 compute shaders (all that stuff like
dEQP-GLES31.functional.shaders.builtin_functions.precision.mul.highp_compute.scalar)
which finish with store_ssbos. Instead of doing the invocation loop in
that case (which LLVM has to later unroll), just emit the single
invocation's store.
Fixes timeouts running
dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.36, which does
a spectacular number of SSBO stores in a long 1x1x1 compute shader.
Reduces runtime of on llvmpipe from 66s to 29s locally, and virgl from
1:38 to 43s. virgl
dEQP-GLES31.functional.ssbo.layout.random.nested_structs_arrays_instance_arrays.22
goes down to 7 seconds.
Fixes: #6797
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17730>
Emma Anholt [Sun, 24 Jul 2022 15:29:25 +0000 (08:29 -0700)]
gallivm: Refactor a bit of UBO/SSBO range checking.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17730>
Kenneth Graunke [Tue, 12 Jul 2022 23:44:41 +0000 (16:44 -0700)]
mesa: Mark render-to-texture as unsafe if there's no pipe_resource
Let's be slightly more defensive here. If a texture image doesn't have
an associated pipe_resource allocated, then render_texture() will pass
that along to _mesa_update_renderbuffer_surface(), which will crash on a
NULL pointer dereference. So, if there isn't a pipe_resource, then we
should just skip this altogteher.
Today, this isn't an issue, because each gl_texture_image always
allocates a pipe_resource up front. On a branch of mine, I prototyped
some improvements to the compressed texture fallback handling, where it
would defer resource allocation, examine the source image's block data,
and dynamically select a format based on that, then allocate it later.
With that prototype in place, we saw crashes the Android "My Talking
Tom" series of games, which appear to be attaching ASTC textures to a
framebuffer color attachment. That FBO would be incomplete anyway, as
ASTC textures aren't renderable, but we got into a situation where the
render-to-texture code was crashing due to the lack of pt before it
could properly signal that it was incomplete and bailing.
Technically, we don't need this now, but I figure that being defensive
won't hurt and this would probably save whoever encounters such an issue
in the future a bunch of frustrating debugging.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17508>
Danylo Piliaiev [Tue, 26 Jul 2022 12:49:41 +0000 (15:49 +0300)]
tu: Do not dereference descriptorSetLayout in push descriptors tmpl
Fixes crash when capturing with RenderDoc.
From VK spec:
descriptorSetLayout [...] This parameter is ignored if templateType
is not VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17751>
Jason Ekstrand [Mon, 25 Jul 2022 22:05:12 +0000 (17:05 -0500)]
vulkan: Include self-dep info in rendering continues
Fixes:
3a204d5cf370 ("vulkan/render_pass: Add a better helper for render pass inheritance")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17748>
Jason Ekstrand [Tue, 26 Jul 2022 00:52:22 +0000 (19:52 -0500)]
vulkan: Append subpass structures to VkRenderingInfo last
If we don't append subpass->self_dep_info last, other __vk_append_struct()
calls will update its pNext chain which lives in the subpass which
should be treated as immutable. This is easily fixable by just making
it the last thing we append to the chain.
Fixes:
7e11cdc77a6a ("vulkan/render_pass: Pass sample locations to barriers")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17748>
Ian Romanick [Tue, 21 Jun 2022 17:37:53 +0000 (10:37 -0700)]
intel/fs: Use canonical form for "work around" tags
Trivial. Also clean up some weird whitespace.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17605>
Ian Romanick [Tue, 12 Jul 2022 22:52:31 +0000 (15:52 -0700)]
intel/fs: Eliminate "masked" and "per slot offset" URB messages
All of this information can be inferred from the sources.
v2: Fix "error: unused variable 'opcode'" detected by marge-bot.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17605>
Ian Romanick [Tue, 12 Jul 2022 22:34:23 +0000 (15:34 -0700)]
intel/fs: Don't pass flags to lower_urb_read_logical_send or lower_urb_write_logical_send
...because the flags can be inferred from the sources.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17605>
Ian Romanick [Thu, 14 Jul 2022 18:57:03 +0000 (11:57 -0700)]
intel/fs: Make logical URB read instructions more like other logical instructions
No shader-db changes on any Intel platform
Fossil-db results:
Tiger Lake
Instructions in all programs:
156926440 ->
156926470 (+0.0%)
Instructions hurt: 15
Cycles in all programs:
7513099349 ->
7513099402 (+0.0%)
Cycles hurt: 15
Ice Lake and Skylake had similar results. (Ice Lake shown)
Cycles in all programs:
9099036492 ->
9099036489 (-0.0%)
Cycles helped: 1
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17605>
Ian Romanick [Tue, 12 Jul 2022 22:32:01 +0000 (15:32 -0700)]
intel/fs: Make logical URB write instructions more like other logical instructions
The changes to fs_visitor::validate() helped track down a place where I
initially forgot to convert a message to the new sources layout. This
had caused a different validation failure in
dEQP-GLES31.functional.tessellation.tesscoord.triangles_equal_spacing,
but this were not detected until after SENDs were lowered.
Tiger Lake, Ice Lake, and Skylake had similar results. (Ice Lake shown)
total instructions in shared programs:
19951145 ->
19951133 (<.01%)
instructions in affected programs: 2429 -> 2417 (-0.49%)
helped: 8 / HURT: 0
total cycles in shared programs:
858904152 ->
858862331 (<.01%)
cycles in affected programs: 5702652 -> 5660831 (-0.73%)
helped: 2138 / HURT: 1255
Broadwell
total cycles in shared programs:
904869459 ->
904835501 (<.01%)
cycles in affected programs: 7686744 -> 7652786 (-0.44%)
helped: 2861 / HURT: 2050
Tiger Lake, Ice Lake, and Skylake had similar results. (Ice Lake shown)
Instructions in all programs:
141442369 ->
141442032 (-0.0%)
Instructions helped: 337
Cycles in all programs:
9099270231 ->
9099036492 (-0.0%)
Cycles helped: 40661
Cycles hurt: 28606
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17605>
Georg Lehmann [Tue, 26 Jul 2022 11:56:29 +0000 (13:56 +0200)]
aco: Add a note about G16 without A16 to README-ISA.md.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16979>
Georg Lehmann [Wed, 6 Jul 2022 15:13:30 +0000 (17:13 +0200)]
radv: Fold 16bit tex sources.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16979>
Georg Lehmann [Mon, 6 Jun 2022 15:04:14 +0000 (17:04 +0200)]
aco: Support 16bit sources for texture ops.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16979>
Georg Lehmann [Sat, 4 Jun 2022 17:50:00 +0000 (19:50 +0200)]
aco: Add G16 opcodes.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16979>
Connor Abbott [Thu, 21 Jul 2022 15:25:41 +0000 (17:25 +0200)]
tu: Fix resolving d32s8 into s8 on fast path
The code assumed that if the source was d32s8 then the destination would
also be d32s8, in particular that depth_base_addr/stencil_base_addr
would also be filled out. Move the destination and source handling into
two different ifs with different conditions.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17684>
Connor Abbott [Wed, 20 Jul 2022 15:33:09 +0000 (17:33 +0200)]
tu: Support resolving D24S8 -> S8
This was missed when we added support for VK_KHR_depth_stencil_resolve.
There is a similar feature where the stencil aspect of a D24S8 can be
copied "tightly" in CopyImageToBuffer, but it used the texture swizzle
and so required the 3d path. To get it to work with the 2D path, which
is required for resolves, we have to instead use the A8_UNORM format,
which works for texture sampling even for tiled images. We also have to
reuse the pre-existing image views because subpass resolves work on
image views rather than images, whereas before the fixup was applied
while creating the image view. This means threading through the
corresponding "opposite" format through setup, src, and dst functions,
doing the fixup there (through some shared helpers), and then getting
every user to specify the right format. As a bonus, we no longer need to
force the 3d path for the CopyImageToBuffer and CopyBufferToImage
special cases.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17684>
Erik Faye-Lund [Mon, 25 Jul 2022 14:09:08 +0000 (16:09 +0200)]
llvmpipe: remove unused function
Fixes:
a1846e39269 ("llvmpipe: merge all rasterizer-bind functions")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17735>
Chia-I Wu [Fri, 15 Jul 2022 21:21:38 +0000 (14:21 -0700)]
ir3: fix tess param allocation
primitive_param takes up 2 vec4's. Remove an align that I don't
understand.
The align upset
Test case 'dEQP-VK.subgroups.ballot_broadcast.graphics.subgroupbroadcast_vec4'..
deqp-vk: ../src/freedreno/ir3/ir3_nir.c:1039:
void ir3_setup_const_state(nir_shader *, struct ir3_shader_variant *, struct ir3_const_state *):
Assertion `constoff <= ir3_max_const(v)' failed.
with an older version (android11-tests-dev branch) of deqp-vk. This is
because ir3_nir_opt_preamble uses the function for the worst case but
the function fails to replace the align by the worst case.
No regression with dEQP-VK.*tess*.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17570>
Chia-I Wu [Fri, 15 Jul 2022 21:18:58 +0000 (14:18 -0700)]
ir3: increment constoff right after it is assigned
Minor improvement to readability. No real change.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17570>
Chia-I Wu [Fri, 15 Jul 2022 21:17:47 +0000 (14:17 -0700)]
ir3: remove unused patch_vertices_in
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17570>
Chia-I Wu [Sat, 23 Jul 2022 01:17:44 +0000 (18:17 -0700)]
ir3: fix output_loc size
It was off-by-one.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17570>
Chia-I Wu [Fri, 22 Jul 2022 23:51:35 +0000 (16:51 -0700)]
ir3: copy req_local_mem for MESA_SHADER_KERNEL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17570>
Chia-I Wu [Fri, 22 Jul 2022 20:49:59 +0000 (13:49 -0700)]
ir3: update ir3_const_state comment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17570>
Jason Ekstrand [Wed, 20 Jul 2022 02:33:41 +0000 (21:33 -0500)]
lavapipe: Use the vk_graphics_pipeline_state
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17669>
Jason Ekstrand [Wed, 20 Jul 2022 16:44:21 +0000 (11:44 -0500)]
lavapipe: Use shader_info::uses_sample_shading
This is more accurate because it's computed directly in spirv_to_nir and
takes even unused SampleID and SamplePos builtings into account.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17669>
Mike Blumenkrantz [Fri, 22 Jul 2022 05:05:21 +0000 (01:05 -0400)]
lavapipe: advertise VK_EXT_multisampled_render_to_single_sampled
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17705>