Mike Blumenkrantz [Thu, 10 Aug 2023 13:48:01 +0000 (09:48 -0400)]
zink: use real A8_UNORM when possible
this is tricky because drivers are exposing their native support, but
that support may not fit the specific needs of the format
as such, (almost) every use of format where alpha emulation workarounds are
present now need to add a second layer of workarounds in order to handle
the case of possibly-genuine A8 (which might also be emulated A8 even if
the driver supports A8 for some things)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>
Mike Blumenkrantz [Thu, 10 Aug 2023 12:58:01 +0000 (08:58 -0400)]
zink: use maintenance5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>
Mike Blumenkrantz [Thu, 10 Aug 2023 13:43:00 +0000 (09:43 -0400)]
zink: add maintenance extensions to profile
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>
Mike Blumenkrantz [Thu, 10 Aug 2023 12:50:18 +0000 (08:50 -0400)]
zink: split create_ici to init and eval
no functional changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>
Mike Blumenkrantz [Thu, 10 Aug 2023 12:46:10 +0000 (08:46 -0400)]
zink: remove unused param from create_ici
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>
Alyssa Rosenzweig [Sat, 12 Aug 2023 20:36:52 +0000 (16:36 -0400)]
nir: Assert that nir_ssa_for_src components matches
In prep for removing the helper.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24654>
Alyssa Rosenzweig [Sun, 13 Aug 2023 14:58:02 +0000 (10:58 -0400)]
broadcom/compiler: Use nir_trim_vector explicitly
...when trying to ignore components. Trim functionality with nir_ssa_for_src is
deprecated.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24654>
Alyssa Rosenzweig [Sun, 13 Aug 2023 13:27:28 +0000 (09:27 -0400)]
lvp,nir/lower_input_attachments: Use nir_trim_vector
Make the trimming obvious. We will lock down ssa_for_src soon.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24654>
Mike Blumenkrantz [Mon, 14 Aug 2023 15:38:59 +0000 (11:38 -0400)]
aux/trace: print bindless handles as pointers
this makes traces using bindless ops easier to read/diff
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24679>
Alyssa Rosenzweig [Mon, 14 Aug 2023 20:08:07 +0000 (16:08 -0400)]
panfrost: Pack stride at CSO create time on v9
Now that the stride is in the CSO, there's no merging needed at draw-time. The
whole descriptor could probably be uploaded at CSO create time but I didn't want
to deal with that right now, this isn't even my driver anymore I just like
deleting code.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24680>
Sylvain Munaut [Sun, 13 Aug 2023 06:06:44 +0000 (08:06 +0200)]
mesa: Enable ARB_texture_border_clamp in GL Core
According to the GL3 spec, only the `CLAMP` mode was deprecated,
the `CLAMP_TO_EDGE` and `CLAMP_TO_BORDER_ARB` are not, so this
extension should be advertised.
As a side note, Davinci Resolve uses a Core profile and tests for
that extension so it fixes an issue with that app.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24660>
Mike Blumenkrantz [Tue, 15 Aug 2023 11:22:09 +0000 (07:22 -0400)]
zink: ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
Mike Blumenkrantz [Mon, 7 Aug 2023 17:36:08 +0000 (13:36 -0400)]
zink: remove pipe_stream_output from function params
this is no longer used at all
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
Mike Blumenkrantz [Mon, 7 Aug 2023 14:44:13 +0000 (10:44 -0400)]
zink: stop using pipe_stream_output
nir_xfb_info is much cleaner and simpler to use
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
Mike Blumenkrantz [Fri, 4 Aug 2023 19:47:24 +0000 (15:47 -0400)]
zink: delete all the extra gross xfb handling
xfb outputs should always be inlined into the base variables now,
so there's no need for anything further here
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
Mike Blumenkrantz [Fri, 4 Aug 2023 19:14:21 +0000 (15:14 -0400)]
zink: fix clip/cull dist xfb inlining
these are compact arrays which don't take up slots according to normal
array i/o sizing rules
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
Mike Blumenkrantz [Fri, 4 Aug 2023 18:50:11 +0000 (14:50 -0400)]
zink: delete lower_64bit_vertex_attribs pass
this is no longer useful
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
Mike Blumenkrantz [Fri, 4 Aug 2023 18:43:58 +0000 (14:43 -0400)]
zink: delete split_blocks pass
this is no longer useful
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
Mike Blumenkrantz [Thu, 10 Aug 2023 21:20:16 +0000 (17:20 -0400)]
ntt: handle interp intrinsics as derefs
this fixes usage_mask gathering for fs inputs
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
Mike Blumenkrantz [Fri, 28 Jul 2023 12:18:57 +0000 (08:18 -0400)]
zink: stop lowering indirect derefs
this is no longer necessary
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
Mike Blumenkrantz [Thu, 27 Jul 2023 17:47:13 +0000 (13:47 -0400)]
zink: use lowered io (kinda) for i/o vars
this runs io lowering on shader create, which is a huge pita
and waste of time since it requires then re-creating all the deref io later,
but it also makes the variables simpler by eliminating struct awfulness
(which was already eliminated by the split_blocks pass, but who's keeping
track) and will enable future use of some bizarro inter-stage linker thing
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
Mike Blumenkrantz [Fri, 28 Jul 2023 11:23:25 +0000 (07:23 -0400)]
zink: add a mode param to find_var_with_location_frac
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
Mike Blumenkrantz [Thu, 27 Jul 2023 17:43:58 +0000 (13:43 -0400)]
zink: move fragcolor lowering further along the compile process
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
Mike Blumenkrantz [Mon, 7 Aug 2023 18:18:56 +0000 (14:18 -0400)]
nir/zink: fix gs emulation xfb_info sizing
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
David Heidelberg [Tue, 15 Aug 2023 10:59:27 +0000 (12:59 +0200)]
ci/freedreno: document another a530 flake batch
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24694>
Rhys Perry [Fri, 11 Aug 2023 19:58:32 +0000 (20:58 +0100)]
aco: don't create sendmsg(dealloc_vgprs) if scratch is used
LLVM does something similar: https://reviews.llvm.org/D153295
fossil-db (gfx1100):
Totals from 21 (0.02% of 133461) affected shaders:
Instrs: 147428 -> 147396 (-0.02%)
CodeSize: 797188 -> 797060 (-0.02%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes:
2930317cea53 ("aco/gfx11: deallocate VGPRs at the end of the shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24669>
Konstantin Seurer [Fri, 11 Aug 2023 08:51:47 +0000 (10:51 +0200)]
radv/rt: Rename traversal_shader to traversal_shader_addr
It's more in line with shader_addr and uniform_shader_addr as well as
the user data name.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23565>
Konstantin Seurer [Sat, 10 Jun 2023 09:37:14 +0000 (11:37 +0200)]
radv/rt: Rename shader_pc and next_shader
The names basically had the same meaning. Changing them to
uniform_shader_addr and shader_addr makes it clear, that
uniform_shader_addr is the jump target and shader_addr is the next
shader executed by this invocation.
The next_ prefix is dropped since both are input and output variables.
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23565>
Italo Nicola [Tue, 6 Jun 2023 05:25:46 +0000 (02:25 -0300)]
egl: reenable partial redraw with a warning when using gallium hud
Partial revert of
e516a0a94f ("egl: disable partial redraw when gallium
hud is active").
We shouldn't change the behavior of the application when the hud is
enabled, doing so could make it harder do diagnose issues. Instead, now
we warn and ask the user to manually disable the extension if he
considers it to be worth it.
Fixes:
e516a0a94f ("egl: disable partial redraw when gallium hud is active")
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23456>
Vinson Lee [Sun, 13 Aug 2023 03:42:52 +0000 (20:42 -0700)]
intel/decoder: Fix memory leak on error path
Fix defect reported by Coverity Scan.
Resource leak (RESOURCE_LEAK)
leaked_storage: Variable text_data going out of scope leaks the storage it points to.
Fixes:
b4c8d2dc455 ("intel/decoder: Add intel_spec_load_common()")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24659>
Paul Gofman [Fri, 11 Aug 2023 15:40:35 +0000 (09:40 -0600)]
driconf: add a workaround for Captain Lycop: Invasion of the Heters
CC: mesa-stable
Tested-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24639>
Mike Blumenkrantz [Mon, 14 Aug 2023 17:18:09 +0000 (13:18 -0400)]
zink: drop CWE requirement for renderpass tracking with primgen queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24676>
Mike Blumenkrantz [Mon, 14 Aug 2023 17:05:50 +0000 (13:05 -0400)]
zink: rip out some awkward parts of the old non-cwe path
this is no longer used
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24676>
Mike Blumenkrantz [Mon, 14 Aug 2023 16:34:59 +0000 (12:34 -0400)]
zink: rework rast-discard for primgen queries
I originally used CWE for this case since it nicely avoids a lot of the
"complex" operations while still disabling most effects of a fragment shader
in theory, however, there are some cases where CWE isn't quite the same as actually
disabling the fs, so this adds a new rast-discard mode that can be used for
those cases
it can also be used instead of the dummy surface handling that was previously
used for drivers/hw that didn't support primitivesGeneratedQueryWithRasterizerDiscard,
which enables a bunch of gross conditionals to be simplified
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24676>
Mike Blumenkrantz [Mon, 14 Aug 2023 18:25:35 +0000 (14:25 -0400)]
zink: unset primgen suspended flag when ending a primgen query
this otherwise could result in rast-discard being permanently enabled
in certain corner cases
Fixes:
7f956435a03 ("zink: rework xfb queries for drivers with poor primgen support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24676>
Mike Blumenkrantz [Mon, 14 Aug 2023 17:16:23 +0000 (13:16 -0400)]
zink: require EDS1 for CWE usage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24676>
Mike Blumenkrantz [Mon, 14 Aug 2023 17:04:34 +0000 (13:04 -0400)]
zink: track start/stop of a couple query types
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24676>
Faith Ekstrand [Thu, 10 Aug 2023 21:51:22 +0000 (16:51 -0500)]
gallivm: Drop the Vulkan YUV format hacks
Vulkan is now using the raw formats so we don't need this hack.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
Mohamed Ahmed [Thu, 10 Aug 2023 16:38:39 +0000 (19:38 +0300)]
vulkan/format: Translate G8B8G8R8_422_UNORM and B8G8R8G8_422_UNORM properly
They were being translated to YUYV and UYVY formats which, in
PIPE_FORMAT parlance, are auto-converted formats, not raw data
formats. Use the raw data formats like everything else.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
Faith Ekstrand [Thu, 10 Aug 2023 18:54:40 +0000 (13:54 -0500)]
vulkan/format: Use correct swizzle for 1-plane YCbCr formats
VK_FORMAT_G8B8G8R8_422_UNORM and VK_FORMAT_B8G8R8G8_422_UNORM already
place the luminance channel in the green component which is where we NIR
lowering code for ycbcr expects it. Set an RGBA swizzle in the common
format table and make it the driver's responsibility to re-map the
formats as needed for their hardware.
The only Vulkan drivers affected by this change are the Intel drivers
and lavapipe. None of NVK, RADV, and v3dv support these formats yet and
Turnip has its own lowering that doesn't rely on the YCbCr format table
in util/vk_format.c.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
Faith Ekstrand [Mon, 14 Aug 2023 21:36:18 +0000 (16:36 -0500)]
anv: Disable CCS_E for ISL_FORMAT_YCRCB_*
We're about to start using YCRCB_NORMAL and YCRCB_SWAPUV for 8-bit
interleaved YCbCr and, while ISL claims CCS_E support, it's not well
tested and we don't think it's working yet for all of ANV's use-cases.
Disable it for now in ANV and only for YUV formats.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
Faith Ekstrand [Mon, 14 Aug 2023 18:50:18 +0000 (13:50 -0500)]
blorp: Use R8G8_UINT for YCRCB_* formats with CCS
BLORP uses the get_ccs_compatible_copy_format() based on whether or not
ISL claims the format supports CCS_E, not whether or not CCS_E is used
on the image. This is probably a good thing as it improves consistency.
However, it means that we need CCS-compatible formats for YCRCB_*
formats even if we never use them with CCS_E enabled. In practice,
these do actually seem to work according to the Vulkan CTS but coverage
is likely far less than perfect.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
Faith Ekstrand [Thu, 10 Aug 2023 21:24:08 +0000 (16:24 -0500)]
gallivm: Support G8B8_G8R8_422_UNORM and B8G8_R8G8_422_UNORM
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
Mohamed Ahmed [Thu, 10 Aug 2023 16:37:01 +0000 (19:37 +0300)]
util/format: Add G8B8_G8R8_422_UNORM and B8G8_R8G8_422_UNORM formats
These actually match the Vulkan format enums for single-plane YCbCr
formats, unlike the other PIPE_FORMAT_* enums which put luminance in the
red channel.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
Faith Ekstrand [Thu, 10 Aug 2023 22:05:07 +0000 (17:05 -0500)]
util/format: 8-bit interleaved YUV formats are UNORM
Without this, gallivm doesn't know what to do with the result data of a
texture fetch. We have a bunch of gallivm code to handle these but, as
far as I can tell, none of it works properly without channel types. The
YUYV texturing helpers all consume a 32-bit packed value, unpack it,
shuffle things as needed, and then re-pack into a 32-bit RGBA value,
trusting later code to unpack that as 8-bit UNORM. For the raw formats,
this unpacking never happens.
What saves us is that I also don't think any of this code is ever used.
LLVMpipe supports the actual YUYV formats and we don't use the gallium
lowering pass which lowers to the raw formats.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
Jordan Justen [Thu, 10 Aug 2023 08:35:37 +0000 (01:35 -0700)]
intel/genxml: Update xml with gen_sort_tags.py output
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24605>
Jordan Justen [Thu, 10 Aug 2023 08:14:42 +0000 (01:14 -0700)]
intel/genxml: Add final newline to output when saving xml
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24605>
Jordan Justen [Thu, 10 Aug 2023 08:14:04 +0000 (01:14 -0700)]
intel/genxml: Don't rewrite sorted xml if the contents didn't change
Rework:
* Make better use of pathlib. (Dylan)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24605>
Jordan Justen [Thu, 10 Aug 2023 07:13:51 +0000 (00:13 -0700)]
intel/genxml: Move sorting & writing into GenXml class
Rework:
* Use "all" in is_equivalent_xml() (Dylan)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24605>
Italo Nicola [Fri, 14 Jul 2023 19:01:32 +0000 (19:01 +0000)]
panfrost/ci: updated CI expectations
These tests were crashing because of a pandecode bug that's now been fixed.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24144>
Italo Nicola [Thu, 13 Jul 2023 12:13:19 +0000 (12:13 +0000)]
pan/decode: handle more than one panfrost_device
Before this commit, if an application tried to create more than one
panfrost_device, such as piglit's "ext_image_dma_buf_import" tests,
it would result in a crash when running with PAN_MESA_DEBUG=sync or
PAN_MESA_DEBUG=trace.
This commit fixes that by introducing a pandecode_context, which
encapsulates all the information that is being tracked, and thus
avoiding memory conflicts.
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24144>
Italo Nicola [Mon, 14 Aug 2023 02:32:45 +0000 (02:32 +0000)]
panfrost: fix invalid memory access in get_equation_str()
Fixes:
f55efb4ae68 ("panfrost: Convert to PIPE_BLEND enums internally")
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24144>
Mike Blumenkrantz [Mon, 14 Aug 2023 19:37:58 +0000 (15:37 -0400)]
zink: ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24661>
Konstantin Seurer [Sun, 13 Aug 2023 14:58:46 +0000 (16:58 +0200)]
lavapipe/ci: Remove descriptor_indexing fails
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24661>
Konstantin Seurer [Sun, 13 Aug 2023 12:22:43 +0000 (14:22 +0200)]
gallivm: Run nir_convert_to_lcssa before nir_convert_from_ssa
Without loop exit phis, the code emitted by nir_lower_non_uniform_access
won't be lowered to registers. Therefore, all lanes will have the value
of the last iteration.
Fixes the remaining descriptor indexing fails:
dEQP-VK.descriptor_indexing.storage_texel_buffer
dEQP-VK.descriptor_indexing.storage_texel_buffer_after_bind
dEQP-VK.descriptor_indexing.storage_texel_buffer_after_bind_in_loop
dEQP-VK.descriptor_indexing.storage_texel_buffer_after_bind_in_loop_lifetime
dEQP-VK.descriptor_indexing.storage_texel_buffer_after_bind_lifetime
dEQP-VK.descriptor_indexing.storage_texel_buffer_in_loop
dEQP-VK.descriptor_indexing.storage_texel_buffer_in_loop_lifetime
dEQP-VK.descriptor_indexing.storage_texel_buffer_lifetime
dEQP-VK.descriptor_indexing.storage_texel_buffer_minNonUniform
cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24661>
Faith Ekstrand [Mon, 14 Aug 2023 16:56:00 +0000 (11:56 -0500)]
nir: Drop nir_dest
Instead, we replace every use of it with nir_def. Most of this commit
was generated by sed:
sed -i -e 's/dest.ssa/def/g' src/**/*.h src/**/*.c src/**/*.cpp
A few manual fixups were required in lima and the nir_legacy code.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 16:43:35 +0000 (11:43 -0500)]
nir: Drop nir_alu_dest
Instead, we replace it directly with nir_def. We could replace it with
nir_dest but the next commit gets rid of that so this avoids unnecessary
churn. Most of this commit was generated by sed:
sed -i -e 's/dest.dest.ssa/def/g' src/**/*.h src/**/*.c src/**/*.cpp
There were a few manual fixups required in the nir_legacy.c and
nir_from_ssa.c as nir_legacy_reg and nir_parallel_copy_entry both have a
similar pattern.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 16:33:30 +0000 (11:33 -0500)]
nir: Get rid of nir_dest_is_divergent()
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 16:19:15 +0000 (11:19 -0500)]
nir: Get rid of nir_dest_num_components()
We could add a nir_def_num_components() helper but we use
ssa.num_components about 3x as often as nir_dest_num_components() today
so that's a major Coccinelle refactor anyway and this doesn't make it
much worse. Most of this commit was generated byt the following
semantic patch:
@@
expression D;
@@
<...
-nir_dest_num_components(D)
+D.ssa.num_components
...
Some manual fixup was needed, especially in cpp files where Coccinelle
tends to give up the moment it sees any interesting C++.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 16:08:07 +0000 (11:08 -0500)]
nir: Get rid of nir_dest_bit_size()
We could add a nir_def_bit_size() helper but we use ->bit_size about 3x
as often as nir_dest_bit_size() today so that's a major Coccinelle
refactor anyway and this doesn't make it much worse. Most of this
commit was generated byt the following semantic patch:
@@
expression D;
@@
<...
-nir_dest_bit_size(D)
+D.ssa.bit_size
...
Some manual fixup was needed, especially in cpp files where Coccinelle
tends to give up the moment it sees any interesting C++.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 16:50:22 +0000 (11:50 -0500)]
nir/print: Replace all dest printing with print_def
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 16:41:49 +0000 (11:41 -0500)]
nir/validate: Replace all dest validation with validate_def
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 15:16:23 +0000 (10:16 -0500)]
nir/propagate_invariant: Stop passing around nir_dest
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 15:15:06 +0000 (10:15 -0500)]
nir/dce: Stop passing around nir_dest
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 15:14:54 +0000 (10:14 -0500)]
nir/gather_types: Stop passing around nir_dest
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 15:03:24 +0000 (10:03 -0500)]
nv50/ir: Stop passing around nir_dest and nir_alu_dest
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 14:53:12 +0000 (09:53 -0500)]
r600/sfn: Stop passing around nir_dest and nir_alu_dest
We want to get rid of nir_dest and nir_alu_dest so back-ends need to
stop storing it in structs and passing it through helpers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 14:22:30 +0000 (09:22 -0500)]
etnaviv: Stop passing around nir_dest
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 14:27:55 +0000 (09:27 -0500)]
lima: Stop using nir_dest directly
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 14:03:07 +0000 (09:03 -0500)]
nir,ntt,a2xx,lima: Stop using nir_dest directly
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 15:10:35 +0000 (10:10 -0500)]
vc4: Stop passing around nir_dest
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 13:49:41 +0000 (08:49 -0500)]
broadcom: Stop using nir_dest directly
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 13:34:38 +0000 (08:34 -0500)]
intel/fs: Stop passing around nir_dest and nir_alu_dest
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Faith Ekstrand [Mon, 14 Aug 2023 13:27:34 +0000 (08:27 -0500)]
intel/vec4: Stop passing around nir_dest
We want to get rid of nir_dest so back-ends need to stop storing it
in structs and passing it through helpers.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 13:37:25 +0000 (09:37 -0400)]
nir: Drop nir_dest_init
Unused.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 13:13:40 +0000 (09:13 -0400)]
dxil: Do not reference nir_dest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 13:11:10 +0000 (09:11 -0400)]
ir3: Do not reference nir_dest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 13:03:47 +0000 (09:03 -0400)]
zink: Do not reference nir_dest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 12:59:04 +0000 (08:59 -0400)]
panfrost: Do not reference nir_dest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 12:57:58 +0000 (08:57 -0400)]
asahi: Do not reference nir_dest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 12:55:17 +0000 (08:55 -0400)]
pan/bi: Don't reference nir_dest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 12:51:56 +0000 (08:51 -0400)]
pan/mdg: Don't reference nir_dest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 12:48:11 +0000 (08:48 -0400)]
agx: Remove agx_nir_ssa_index
Deduplicated from agx_def_index.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Alyssa Rosenzweig [Mon, 14 Aug 2023 12:46:28 +0000 (08:46 -0400)]
agx: Stop passing nir_dest around
Towards deleting nir_dest.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
Konstantin Seurer [Sat, 12 Aug 2023 12:32:25 +0000 (14:32 +0200)]
nir/from_ssa: Don't insert store_reg instructions before phis
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9528
Fixes: ae0408b ("nir/from_ssa: Support register intrinsics")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24647>
David Rosca [Thu, 10 Aug 2023 20:05:12 +0000 (22:05 +0200)]
gallium/auxiliary/vl: Set correct csc matrix in set_buffer_layer
Shaders used in set_buffer_layer will apply colorspace conversion,
so we need to set correct matrix depending on the input and output
surface formats.
Use BT.601 (default) for YUV to RGB and identity for RGB to RGB.
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24626>
Mike Blumenkrantz [Fri, 11 Aug 2023 12:57:58 +0000 (08:57 -0400)]
lavapipe: handle VkBufferUsageFlags2KHR
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24633>
Mike Blumenkrantz [Fri, 11 Aug 2023 12:54:03 +0000 (08:54 -0400)]
lavapipe: handle VkPipelineCreateFlagBits2KHR
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24633>
David Heidelberg [Mon, 31 Jul 2023 07:48:09 +0000 (10:48 +0300)]
ci/baremetal: shorten BM_KERNEL to filename and BM_DTB to name only
We don't need the path, not at all when we use external kernel.
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24646>
David Heidelberg [Sun, 30 Jul 2023 17:33:14 +0000 (20:33 +0300)]
ci/baremetal: do not install curl, it's already there
curl is already installed in these images, drop it.
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24646>
Yonggang Luo [Fri, 4 Aug 2023 05:30:07 +0000 (13:30 +0800)]
freedreno: Use shared DIV_ROUND_UP instead div_round_up
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24666>
Mike Blumenkrantz [Fri, 11 Aug 2023 11:24:58 +0000 (07:24 -0400)]
u/draw: skip zero-sized indirect draws
cc: mesa-stable
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24631>
Rhys Perry [Tue, 8 Aug 2023 20:02:21 +0000 (21:02 +0100)]
aco: summarize register demand after handling branches
Fixes various dEQP-VK.ray_query.builtin.rayqueryterminate.* crashes.
fossil-db (gfx1100):
Totals from 196 (0.15% of 133461) affected shaders:
PreSGPRs: 8342 -> 8558 (+2.59%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes:
5a536eca9ca7 ("aco: calculate correct register demand for branch instructions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24579>
Sergi Blanch Torne [Tue, 1 Aug 2023 09:29:34 +0000 (11:29 +0200)]
Revert "ci: disable Collabora's LAVA lab for maintance"
This reverts commit https://gitlab.freedesktop.org/mesa/mesa/-/commit/
0089d4507a4e8d5deb428c2455929d72cf349983
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24425>
Christian Gmeiner [Thu, 27 Jul 2023 13:12:59 +0000 (15:12 +0200)]
etnaviv: switch to S_FIXED(..) macro
In different traces for different GPU models I see the same pattern:
0x00c80000, /* [00A00] PA.VIEWPORT_SCALE_X = 200.000000 */
0xff880000, /* [00A04] PA.VIEWPORT_SCALE_Y = -120.000000 */
etna_f32_to_fixp16(..) handles the negative case differently then blob. In the
concrete example -120 gets converted to 0xff880001. Switch to S_FIXED(..) to
simplify our code and to get the same results as blob.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24364>
Christian Gmeiner [Thu, 27 Jul 2023 10:18:51 +0000 (12:18 +0200)]
etnaviv: switch to U_FIXED(..) macro
Lets have a look at trace from blob (GC3000):
0x000b000b, /* [10080] NTE.SAMPLER[0].SIZE := WIDTH=11,HEIGHT=11 */
0x2001b86e, /* [10100] NTE.SAMPLER[0].LOG_SIZE := WIDTH=3.437500,HEIGHT=3.437500,ASTC=0,INT_FILTER=1,SRGB=0 */
If we ignore the WIDTH and HEIGHT outputs and only look at the raw value (0x2001b86e) we can see that 0x6e is used for WIDTH and HEIGHT.
Lets have a look at an other texutre size 180x180:
0x00b400b4, /* [10080] NTE.SAMPLER[0].SIZE := WIDTH=180,HEIGHT=180 */
0x2003bcef, /* [10100] NTE.SAMPLER[0].LOG_SIZE := WIDTH=7.468750,HEIGHT=7.468750,ASTC=0,INT_FILTER=1,SRGB=0 */
Lets use the same test on a different GPU that uses texture descriptors (GC7000):
[44] SIZE: 0x000b000b WIDTH=11,HEIGHT=11
...
[74] LOG_SIZE_EXT: 0x03750375 WIDTH=3.457031,HEIGHT=3.457031
If we ignore the WIDTH and HEIGHT outputs and only look at the raw value (0x03750375) we can see that 0x375 is used for WIDTH and HEIGHT.
Lets have a look at an other texutre size 180x180:
[44] SIZE: 0x00b400b4 WIDTH=180,HEIGHT=180
..
[74] LOG_SIZE_EXT: 0x077d077d WIDTH=7.488281,HEIGHT=7.488281
etnaviv creates the following values for the two texture sizes:
11 -> 0x6f
180 -> 0xf0
Lets switch to U_FIXED(..) which results in equal values.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24364>
Christian Gmeiner [Thu, 27 Jul 2023 10:12:08 +0000 (12:12 +0200)]
etnaviv: switch to log2f(..)
Drop our custom calculation of the logarithm base 2 and switch
to log2f(..).
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24364>
Mike Blumenkrantz [Fri, 11 Aug 2023 19:16:51 +0000 (15:16 -0400)]
zink: fix crash in lower_pv_mode_gs_store
src->parent can be null
Fixes:
39770c6503a ("zink: fix store subsitution in `lower_pv_mode_gs_store`")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24642>
Mike Blumenkrantz [Fri, 11 Aug 2023 18:40:22 +0000 (14:40 -0400)]
zink: fix null config screen creation
Fixes:
6d60115be7c ("zink: Fix enumerate devices when running compositor")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24641>
Karol Herbst [Tue, 4 Jul 2023 00:15:03 +0000 (02:15 +0200)]
clc: use CLANG_RESOURCE_DIR for clang's resource path
With certain build configuration that value can be a non empty string and
needs to be used.
This will also require distributions to rebuild mesa if and only if
CLANG_RESOURCE_DIR changes between clang rebuilds or updates.
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23981>