Kenneth Graunke
e703ff5e02
brw: Only consider components read for UBO loads
...
This will matter more with overfetching, where we may suggest loading
additional data that we don't actually need for vectorization purposes.
We want to make sure that push ranges have the data we actually need;
any extra padding is irrelevant.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315 >
2024-12-03 02:02:33 +00:00
Kenneth Graunke
da93b13f8b
brw: Use nir_combined_align in brw_nir_should_vectorize_mem
...
Better than open-coding this.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315 >
2024-12-03 02:02:32 +00:00
Kenneth Graunke
8c795af0b8
brw: Drop a few crocus references in comments
...
crocus no longer uses brw. It uses elk.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315 >
2024-12-03 02:02:32 +00:00
Kenneth Graunke
46af23649c
brw: Drop "regular uniform" concept from UBO push analysis
...
i965 used to upload its own regular GL uniforms and push those in
addition to UBO ranges. st/mesa instead uploads regular uniforms
and presents those to use as UBO 0. So this really isn't a thing
anymore.
nir_intrinsic_load_uniform is still used today but it represents
Vulkan push constants. anv_nir_compute_push_layout already takes
care of ensuring too many ranges aren't present, so it doesn't need
the pass to do so. iris doesn't use this intrinsic at all.
We can also drop the compute shader check, because neither iris nor
anv use UBO push analysis for compute shaders - except for anv's
internal kernels, which already have well specified push layouts.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315 >
2024-12-03 02:02:32 +00:00
Kenneth Graunke
586a470a00
brw: Drop image deref handling from brw_analyze_ubo_ranges
...
This was for pre-Skylake image load/store handling with image params.
We don't support that in brw anymore.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32315 >
2024-12-03 02:02:32 +00:00
Marek Olšák
8752401e03
nir/algebraic: optimize (a & b) | (a | c) => a | c, (a & b) & (a | c) => a & b
...
No change in shader-db with ACO, but it doesn't seem to be optimized by
any other patterns.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32449 >
2024-12-03 01:24:27 +00:00
Marek Olšák
3670d42c74
nir/algebraic: optimize (a | b) | (a | c) ==> (a | b) | c
...
shader-db with ACO:
3 shaders have -0.11% average decrease in the code size
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32449 >
2024-12-03 01:24:27 +00:00
Marek Olšák
978ad93375
nir/algebraic: optimize (a & b) & (a & c) ==> (a & b) & c
...
shader-db with ACO:
3 shaders have -0.57% average decrease in the code size
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32449 >
2024-12-03 01:24:27 +00:00
Marek Olšák
83b093f95e
nir/algebraic: use is_used_once in a few iand/ior patterns
...
shader-db with ACO:
1 shader has -4 decrease in the code size
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32449 >
2024-12-03 01:24:27 +00:00
Antonino Maniscalco
2b9738ce6d
nir,zink,asahi: support passing through gl_PrimitiveID
...
When this pass is used with Zink, gl_PrimitiveID needs to be passed
through, however this is unnecessary for other divers.
Analogous to previous commit
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Fixes: d0342e28b3 ("nir: Add helper to create passthrough GS shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32397 >
2024-12-03 00:24:04 +00:00
Alyssa Rosenzweig
23601d6632
zink: fix gl_PrimitiveID reads with quads
...
Zink emulates quads with a GS, which imposes requirements for gl_PrimitiveID.
Handle them here. Previously Zink went out of spec.
Fixes spec@glsl-1.50 @execution@primitive-id-no-gs-quads and
spec@glsl-1.50 @execution@primitive-id-no-gs-quad-strip.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Antonino Maniscalco <antomani103@gmail.com >
Fixes: e2220ee55e ("zink: filled quad emulation gs generation function")
Closes : #12214
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32397 >
2024-12-03 00:24:04 +00:00
Dylan Baker
845f5eca27
maintainer-scripts: Bump Vulkan release version to 1.4
...
Since support is landed or landing for several drivers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32442 >
2024-12-03 00:20:05 +00:00
Faith Ekstrand
69bce622e9
nvk: Move Vulkan 1.4 properties to the 1.4 section
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32443 >
2024-12-02 23:20:07 +00:00
Faith Ekstrand
cf4e10e466
nvk: Move Vulkan 1.4 features to the 1.4 section
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32443 >
2024-12-02 23:20:07 +00:00
Faith Ekstrand
01046afae5
nvk: Only support Vulkan 1.4 on Turing+
...
It needs hostImageCopy which we don't have working pre-Turing yet.
Fixes: 173171f73e ("nvk: Advertise Vulkan 1.4")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32443 >
2024-12-02 23:20:07 +00:00
Jesse Natalie
128caf94ca
microsoft/compiler: Put holes in driver_location based on I/O variable sizes
...
DXIL requires that each I/O variable has a unique semantic name, but when
dealing with semantics that take up multiple slots, that variable implicitly
takes up multiple names. So when assigning driver_location, we need to do
the same.
That means also updating outputs and patch constants to have a mapping from
driver_location to a compacted index, since the metadata arrays *can't* have
holes.
This would be simpler if we could hang it off the nir_variable but there's
not really any free fields to be able to do that. We only need this compacted
mapping inside the DXIL backend anyway so we can just store the array in the
module.
Tested-by: Benjamin Otte <otte@gnome.org >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12128
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32047 >
2024-12-02 22:40:39 +00:00
Dylan Baker
5a6531b5d6
anv: bump conformance version to 1.4
...
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32441 >
2024-12-02 21:56:40 +00:00
Dylan Baker
212565f42e
anv: Add new Vulkan 1.4 features and properties
...
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32441 >
2024-12-02 21:56:39 +00:00
Dylan Baker
953d8a61f8
anv: bump max number of push constants to 256
...
As is required by Vulkan 1.4
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32441 >
2024-12-02 21:56:39 +00:00
Dylan Baker
8105f80244
anv: advertise Vulkan 1.4
...
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32441 >
2024-12-02 21:56:39 +00:00
Connor Abbott
0c55770b3e
tu: Expose Vulkan 1.4 on a7xx
...
Vulkan 1.4 can only be exposed on a7xx devices due to a number of bumps
in the required limits, including bumping maxDescriptorSets to 7. a7xx
bumped the number of bindless bases from 5 to 8, with one reserved for
the driver.
I've followed what we've already done and exposed a conformanceVersion
of 1.4.0.0 for all a7xx devices, even though I've only submitted
conformance for X1-85. I'm not sure if we want to change this, but at
least for now a618 on Chromebooks and X1-85 on laptops are the only
cases where turnip is being "shipped" to users in some official
capacity, so it shouldn't be a huge deal.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32437 >
2024-12-02 21:22:44 +00:00
Connor Abbott
21838dcbb6
tu: Add Vulkan 1.4 features and properties
...
Only add features and properties new to Vulkan 1.4.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32437 >
2024-12-02 21:22:44 +00:00
Caterina Shablia
2cac1389e5
panvk: enable shaderInt8, VK_KHR_8bit_storage and VK_KHR_shader_float16_int8
...
We already could handle int8 load/stores and arithmetic.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361 >
2024-12-02 20:58:23 +00:00
Caterina Shablia
d9ce6b266f
panvk: implement vkGetDeviceImageMemoryRequirements
...
Vulkan runtime doesn't layer vkGetImageMemoryRequirements2
on top of vkGetDeviceImageMemoryRequirements, as that would
require initializing a full image, which is expensive on
certain drivers such as NVK, so it's up to us to implement
both functions.
In our implementation of vkGetDeviceImageMemoryRequirements,
we initialize a slimmed down image and then forward everything
to vkGetImageMemoryRequirements2.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361 >
2024-12-02 20:58:23 +00:00
Caterina Shablia
110f5edf7a
panvk: add panvk_image_init helper
...
This factors out the initialization of panvk_image, so we can reuse the
logic for computing requirements without crating an actual VkImage
object first.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361 >
2024-12-02 20:58:23 +00:00
Constantine Shablia
dbdaefb6ed
panvk: never require dedicated allocation for images
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361 >
2024-12-02 20:58:23 +00:00
Constantine Shablia
ed64fa034b
panvk: never prefer or require dedicated allocation for buffers
...
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361 >
2024-12-02 20:58:23 +00:00
Constantine Shablia
ef120460e7
panvk: replace vkGetBufferMemoryRequirements2 with vkGetDeviceBufferMemoryRequirements
...
Mesa's Vulkan runtime will implement the former in terms of the
latter for us.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32361 >
2024-12-02 20:58:22 +00:00
Rebecca Mckeever
07b8ce4351
panvk: Support D32_S8 as a multiplanar format
...
This format was already supported on Bifrost as a single
plane format. Valhall doesn't support this interleaved D32_S8,
so we add support for multiplanar D32_S8 and move Bifrost to
this layout too, as it's more memory efficient than the
interleaved layout.
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32275 >
2024-12-02 20:18:43 +00:00
Boris Brezillon
cc2cb69e2e
pan/texture: Pass pan_image_section_info around
...
Pass pan_image_section_info around instead of passing each field
of the struct separately.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32275 >
2024-12-02 20:18:43 +00:00
Boris Brezillon
0dfb28cebc
pan/texture: Stop passing a layout to panfrost_emit_plane()
...
The layout can be extracted from the iview and plane_index arguments.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32275 >
2024-12-02 20:18:43 +00:00
Boris Brezillon
d731abb17a
pan/texture: s/index/plane_index/ in panfrost_emit_plane()
...
Index is vague as it could refer to the array index too. Let's clarify
the situation by renaming the argument plane_index.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32275 >
2024-12-02 20:18:43 +00:00
Boris Brezillon
3cf2658a9a
pan/texture: Stop passing the view format around
...
The format is never adjusted, and can thus be extracted from the view.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32275 >
2024-12-02 20:18:43 +00:00
Boris Brezillon
726dec5abd
pan/texture: Move the plane info retrieval logic to a helper function
...
This allows us to properly split the multiplanar and single plane cases
in panfrost_emit_surface(), which makes the code easier to follow.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32275 >
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
a8ed53881e
pan/desc: Add a pan_image_view_get_s_plane() helper and use it
...
The depth and stencil planes might be different. Let's add a specific
helper to retrieve the stencil plane. We keep using
pan_image_view_get_zs_plane() for the depth plane, because it's
guaranteed to always be on the first plane.
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32275 >
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
c9b4030f33
pan/desc: Pass an image to pan_force_clean_write_rt()
...
Pass an image to pan_force_clean_write_rt() so we can easily
support the multiplanar depth-stencil case, and rename the
function pan_force_clean_write_on() to avoid the confusion.
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32275 >
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
878a7d6de0
pan/texture: Accept holes in the pan_image_view::planes array
...
We are about to add multiplanar depth/stencil support. A stencil
only view of a multiplanar d32_s8 format will have NULL depth plane
(plane0), so we need to prepare the texture logic to deal with that.
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32275 >
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
5df95a97f1
pan/texture: s/pan_image_view_get_rt_image/pan_image_view_get_color_plane/
...
Pick a name that's consistent with pan_image_view_get_plane().
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32275 >
2024-12-02 20:18:43 +00:00
Rebecca Mckeever
c0140148f1
pan/texture: s/pan_image_view_get_zs_image/pan_image_view_get_zs_plane/
...
Pick a name that's consistent with pan_image_view_get_plane().
Signed-off-by: Rebecca Mckeever <rebecca.mckeever@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32275 >
2024-12-02 20:18:43 +00:00
Eric R. Smith
a0dd108b8a
panfrost: convert resources before binding them to images
...
pan_resource_modifier_convert can use a blit to convert images
from AFBC. If we call this from panfrost_set_shader_images then
we end up crashing due to using an inconsistent set of images.
Fix this by doing the AFBC/AFRC conversion before the image
bindings.
This fixes a crash in piglit oes_egl_image_external_essl3 tests.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30243 >
2024-12-02 19:49:58 +00:00
Eric R. Smith
fc3cfaa4aa
panfrost: add a perf warning when resources need to be converted
...
This is a minor debugging aid.
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30243 >
2024-12-02 19:49:58 +00:00
Alyssa Rosenzweig
56acdca86d
hk: claim 1.4
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:47 +00:00
Alyssa Rosenzweig
3f5086016b
hk: implement timestamps
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:47 +00:00
Alyssa Rosenzweig
55cd987de2
asahi: fix agxdecode memory mapping
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:47 +00:00
Asahi Lina
fbb38a30a6
asahi: Add timestamp buffer ops
...
TODO: virt support (needs virglrenderer changes & virt ABI break)
Signed-off-by: Asahi Lina <lina@asahilina.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Asahi Lina
6697fb26ed
asahi: UAPI update to add support for user timestamp buffers
...
Signed-off-by: Asahi Lina <lina@asahilina.net >
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
751bd986fb
asahi: add =bodump debug help
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
8caddd2ca1
asahi: fix agx_batch_add_bo
...
when we have exactly POT BOs. fixes crash in portal 2. oh lord.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
f34cd9e966
asahi: add more asserts around bo add
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00
Alyssa Rosenzweig
f98971e776
asahi,hk: mmap BO on first use
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32434 >
2024-12-02 19:26:46 +00:00