Commit Graph

145667 Commits

Author SHA1 Message Date
Chia-I Wu ba461f897b 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>
2022-07-26 01:04:56 +00:00
Chia-I Wu e3ba8a2f07 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>
2022-07-26 01:04:56 +00:00
Chia-I Wu 4ae2966616 ir3: remove unused patch_vertices_in
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17570>
2022-07-26 01:04:56 +00:00
Chia-I Wu 74c96af71d ir3: fix output_loc size
It was off-by-one.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17570>
2022-07-26 01:04:56 +00:00
Chia-I Wu 9c106f3ee7 ir3: copy req_local_mem for MESA_SHADER_KERNEL
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17570>
2022-07-26 01:04:56 +00:00
Chia-I Wu 76ea28b9d0 ir3: update ir3_const_state comment
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17570>
2022-07-26 01:04:56 +00:00
Jason Ekstrand 23220c86d9 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>
2022-07-26 00:45:26 +00:00
Jason Ekstrand 33092faef1 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>
2022-07-26 00:45:26 +00:00
Mike Blumenkrantz 27c97dc0d1 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>
2022-07-26 00:02:26 +00:00
Mike Blumenkrantz f2d5ff1c3a lavapipe: VK_EXT_multisampled_render_to_single_sampled
this works by doing a replicate at renderpass start and an in-place
resolve on renderpass end

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17705>
2022-07-26 00:02:26 +00:00
Mike Blumenkrantz d2990b6599 vulkan: hook up VK_EXT_multisampled_render_to_single_sampled
this adds support for the extension to common renderpass

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17705>
2022-07-26 00:02:26 +00:00
Mike Blumenkrantz f1ae6523b1 llvmpipe: add a shortcut for blitter resolves
if this is only going to do a sample0 resolve, the functionality is
equivalent to just copying the first sample, and in llvmpipe terms,
this just means doing a direct copy at offset=0

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17705>
2022-07-26 00:02:26 +00:00
Mike Blumenkrantz 6064d838e7 lavapipe: fix stencil clears
this uses the value from the stencil attachment

Fixes: 8068c68b1f ("lavapipe: Delete render passes")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17705>
2022-07-26 00:02:26 +00:00
Mike Blumenkrantz f2f517b315 llvmpipe: allow resource_copy_region to perform replicate operations
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17705>
2022-07-26 00:02:26 +00:00
Mike Blumenkrantz 8563a95bd7 llvmpipe: remove weird clamping for format support with sample counts
this breaks u_blitter

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17705>
2022-07-26 00:02:26 +00:00
Mike Blumenkrantz 725cdfb0ad lavapipe: set image access on pipeline bind, not descriptor bind
this is where the access originates, so set it here

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17739>
2022-07-25 22:08:53 +00:00
Mike Blumenkrantz a18708e5ce lavapipe: use 64bit masks for shader access
ensure that all descriptors are tracked for this

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17739>
2022-07-25 22:08:53 +00:00
Mike Blumenkrantz 2fd930f95b lavapipe: use correct offset calculation for flagging ssbo/image write access
var->data.binding has no relation to the actual index of the resource,
which must be separately calculated based on the layout

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17739>
2022-07-25 22:08:53 +00:00
Mike Blumenkrantz 825e5f6482 lavapipe: make binding/layout helper functions static inline
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17739>
2022-07-25 22:08:53 +00:00
Adam Jackson 295a8b4464 mesa: Remove Purgeable fields from texture/buffer/renderbuffer objects
These are unused since !17425.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17745>
2022-07-25 16:28:40 -04:00
Erik Faye-Lund ba2146f93f gallium/hud: do not use texture-rect for font
RECT textures used to be required to be supported by drivers. But since
the state-tracker learned how to lower these to 2D textures, some
drivers no longer support them.

While we have lowering in place for this, lowering it involves some
needless overhead. So let's just use a 2D texture instead of a RECT
texture.

Because having two versions and switching between them is more
complicated than it needs to be, let's just always use a 2D texture.
Similarly, let's just always multiply the reciprocal here, so we don't
have to test for PIPE_CAP_TGSI_DIV first.

Cc: mesa-stable
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17707>
2022-07-25 18:12:05 +00:00
Mike Blumenkrantz 7ef76dec73 lavapipe: move vertex input dynamic states into vertex input block
these states were erroneously assigned to the pre-rasterization stage
for pipeline libraries when they instead belong to the vertex input stage

cc: mesa-stable

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17738>
2022-07-25 17:26:43 +00:00
Mike Blumenkrantz fbb4b90d7d zink: add a ci flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17722>
2022-07-25 16:38:25 +00:00
Mike Blumenkrantz 5e600afa33 lavapipe: remove some skips
these should all be fast enough now

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17722>
2022-07-25 16:38:25 +00:00
Mike Blumenkrantz d23a9380dd lavapipe: implement extreme uniform inlining
this adds a mangled variation on nir_inline_uniforms that enables inlining
from any uniform buffer in order to try inlining every possible load

if the shader is too small or the ssa_alloc delta from inlining is too small,
then inlining is disabled for that shader to avoid pointlessly churning
the same shaders for no gain

with certain types of shaders, the speedup is astronomical

before:
dEQP-VK.graphicsfuzz.cov-int-initialize-from-multiple-large-arrays (4750.76s)

after:
dEQP-VK.graphicsfuzz.cov-int-initialize-from-multiple-large-arrays (0.505s)

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17722>
2022-07-25 16:38:25 +00:00
David Heidelberg 1a244e1394 ci/freedreno: 3 pixel change in Raven restricted trace
Acked-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17732>
2022-07-25 18:14:40 +02:00
Adam Jackson 2b3b7b692b wsi/x11: Synchronously check for error from xcb_present_pixmap
Yes this is a round trip, but X_PresentPixmap is not itself a blocking
operation, it just instructs the server to do the next presentation at
some time. More importantly, if _we_ don't catch the presentation error,
xlib's error queue will, and the calling code is certainly not prepared
to handle errors from Present.

Forcing the round trip here is also a bit more correct semantically.
This is the end of the Vulkan client part of the present queue, and the
X_PresentPixmap request transfers the queue operation to the server, so
we should not return until we are sure the handoff has happened.

Fixes some flakiness with piglit@glx-visuals-* with zink+radv.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17685>
2022-07-25 10:54:46 -04:00
Erik Faye-Lund 747913377f zink: fix EXT_color_write_enable check
Checking for the extension isn't enough, we also need to check for the
feature-bit.

Fixes: 49a20e0981 ("zink: start a unified driver workarounds struct")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17709>
2022-07-25 15:57:42 +02:00
Erik Faye-Lund 32b9e639b7 zink: warn about missing image2DViewOf3D feature
While we're at it, let's store zink_screen in a temp varaible for reuse.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17709>
2022-07-25 15:57:37 +02:00
Boyuan Zhang fef2004b11 radeonsi/vcn/enc: enable cabac entropy mode
Set cabac entropy mode if enabled.

v2: add extra check on radeon driver side, disable cabac if profile is
baseline or extended.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16113>
2022-07-25 13:17:18 +00:00
Boyuan Zhang dea360dcf9 frontends/va: get entropy mode info for h264 encode
Get entropy mode and cabac init idc from VAAPI interface.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16113>
2022-07-25 13:17:18 +00:00
Boyuan Zhang ea9e8e776a vl: add cabac init idc for h264 encode
Add interface to store cabac init idc value.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16113>
2022-07-25 13:17:18 +00:00
Rajnesh Kanwal e13a450bf2 pvr: Add support for input attachment descriptor.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17719>
2022-07-25 11:57:48 +01:00
Rajnesh Kanwal b562d29196 pvr: Add support for storage and uniform texel descriptor.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17719>
2022-07-25 11:57:48 +01:00
Rajnesh Kanwal 08c867972f pvr: Add support for image descriptor.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17719>
2022-07-25 11:57:48 +01:00
Rajnesh Kanwal ecfea72c73 pvr: Add support for combined image and sampler descriptor.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17719>
2022-07-25 11:57:48 +01:00
Rajnesh Kanwal 290b9a953a pvr: Add support for sampler descriptor.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17719>
2022-07-25 11:57:48 +01:00
Rajnesh Kanwal 1bf883a8ae pvr: Move binding related checks in common code.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17719>
2022-07-25 11:57:48 +01:00
Rajnesh Kanwal f044676dbb pvr: Implement vkCreateBufferView and vkDestroyBufferView.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17719>
2022-07-25 11:57:48 +01:00
Rajnesh Kanwal 8ef42c25a6 pvr: Use common vk_buffer implementation.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17719>
2022-07-25 11:57:48 +01:00
Rajnesh Kanwal 405a407d42 pvr: Init and store default sampler in pvr_device.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17719>
2022-07-25 11:57:48 +01:00
Erik Faye-Lund dbc8290656 llvmpipe: clean up bresenham implementation
This moves some common code into shared locations, limits the scope of
some variables, switches some booleans for bools, and cleans up some
whitespace.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17653>
2022-07-25 12:39:47 +02:00
Erik Faye-Lund 8f99bab70c llvmpipe: consolidate legacy_points and multisample state
This just makes the code a bit easier to follow.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17653>
2022-07-25 12:39:47 +02:00
Erik Faye-Lund a1846e3926 llvmpipe: merge all rasterizer-bind functions
This makes it more obivous when what state changes, and they are always
just called in order.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17653>
2022-07-25 12:39:42 +02:00
Mike Blumenkrantz 4ff28bd5d8 lavapipe: accurately set image/ssbo access based on shader usage
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15286>
2022-07-25 01:57:49 +00:00
Dave Airlie 878784dbec crocus: fix leak in query code.
Fixes: f3630548f1 ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17731>
2022-07-25 01:34:11 +00:00
Mike Blumenkrantz ad09694cba lavapipe: EXT_non_seamless_cube_map
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17711>
2022-07-25 00:50:14 +00:00
Mike Blumenkrantz a2f97bd88a zink: avoid crashing when bindless texture updates aren't used
some apps trigger the texture update path far in advance of when the
texture will be used, so don't crash and wait to do the update

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17665>
2022-07-25 00:11:54 +00:00
Mike Blumenkrantz 992cd1ae2b zink: assert !rp_changed after renderpass has started
avoid weirdness

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17665>
2022-07-25 00:11:54 +00:00
Mike Blumenkrantz c24c5972a8 zink: only flag fbfetch as rp update if fbfetch wasn't already configured
otherwise this is probably just a swapchain acquire which needs to update
the descriptor during begin_renderpass

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17665>
2022-07-25 00:11:54 +00:00
Gert Wollny 1468cd82de r600/dri-tweak: Disable ARB_shader_image_load_store for "Tomb Raider 2013"
When "Depth of Field" is set to Ultra, a compute shader is emitted that
results in Hardware hangs when OpenGL > 4.3 is available.

If the option is enabled, the game will hang at the menu screen so that
it is no longer possible to simply change the option back. To avoid this
disable the extension for this game until the shader emission can be fixed.

Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6857

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17728>
2022-07-24 19:32:10 +00:00
Gert Wollny a3dda55c0a r600ß/sfn: Don't fall through with VS outputs
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17729>
2022-07-24 18:39:13 +00:00
Gert Wollny 8166be0e83 r600: don't clone the nir shader, just use it
The nir shader passed in with the shader state has to be released by
the backe-end, so don't clone it, just use it.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17729>
2022-07-24 18:39:13 +00:00
Gert Wollny 97d4e98501 r600: Delete possible old NIR variant when translating from TGSI
With shader variants it may happen that we already translated a TGSI
shader for the current selector, so delete the old nir shader if we
already had one.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17729>
2022-07-24 18:39:13 +00:00
Gert Wollny 92feb77bbb r600/sfn: lower the right shader variant
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17729>
2022-07-24 18:39:13 +00:00
Gert Wollny 99e4a23290 r600/sfn: make sure the memory pool is released after shader translation
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17729>
2022-07-24 18:39:13 +00:00
Constantine Shablya 85c3cea96f anv: set image_read_without_format NIR option on Vulkan 1.3
VK_KHR_format_feature_flags2 is core and implicitly enabled in 1.3.

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17442>
2022-07-24 17:27:10 +00:00
Konstantin Seurer 2861d1ff8a radv: Fix out of bounds access in RTPSO creation
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17723>
2022-07-24 14:59:44 +00:00
Hyunjun Ko 0c787d57e6 tu: increase maxPushConstantsSize to 256.
Now there are two paths for push constants.

When it's range is under 128b, we can use shared consts.
When it's over 128b, we can instead do loading data through
regular path, which is same as the previous way.

Now we can satisfy emulations like vkd3d that requires 256b for
its root signatures and we think it fairly maps to push constants
rather than inline uniform blocks that requires one indirection.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15503>
2022-07-24 09:03:47 +00:00
Hyunjun Ko e1f2cabc5e turnip: Change to use shared consts for PushConstants
Follow the way blob is doing for PushConstants though it supports only
128b, same as previous.

v1. Rename tu_push_constant_range.count into dwords to redue confusion.
( Danylo Piliaiev <dpiliaiev@igalia.com> )

v2. Enable shared constants only if necessary.

v3. Merge the two draw states TU_DRAW_STATE_SHADER_GEOM_CONST and
TU_DRAW_STATE_FS_CONST as shared constants are used.

Note that this leaves tu_push_constant_range in tu_shader so we could
use it again in the following patch.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15503>
2022-07-24 09:03:47 +00:00
Hyunjun Ko ce8e8051af turnip: clean up unused parameters for user consts.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15503>
2022-07-24 09:03:47 +00:00
Hyunjun Ko e6556b72fb ir3: handle shared consts.
Adds a shared consts base offset and a size of it(dwords) to ir3_compiler
since they might be depending on gpu generations. (Danylo Piliaiev <dpiliaiev@igalia.com> )

Adds a flag to present whether shared consts are enabled to
ir3_shader_options and then it sets to ir3_const_state when creating
an ir3 variant. Although this state is not per-shader state, this is
necessary when figureing out real constlens.

v1. Define a hw quirk for geometry shared const files and use it when
calculating const length.

v2. Don't hardcode when calculating a safe const length.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15503>
2022-07-24 09:03:47 +00:00
Hyunjun Ko b35c4bd050 ir3: change maximum size of const files.
According to the observation on a630/a650/a660, max_const_pipeline has
to be 512 when all geometry stages are present. Otherwise a gpu hang
happens. Acoordingly maximum safe size for each stage should be under
(max_const_pipeline / 5 (stages)).

Only when VS and FS stages are present, the limit is 640.

v1. Align max_const_safe to 4 vec4's.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15503>
2022-07-24 09:03:47 +00:00
Marek Olšák 3e94d498b3 gallium: add pipe_blit_info::dst_sample, update u_blitter to write that sample
A new radeonsi blit test will use it to upload different sample values
into MSAA textures.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17694>
2022-07-23 18:21:31 +00:00
Pierre-Eric Pelloux-Prayer af7c2ff842 radeonsi: check last_dirty_buf_counter and dirty_tex_counter
Check both counters in draw and compute, otherwise compute dispatches may
miss buffers invalidation.
This fixes the test case from https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/702
(both with and without GALLIUM_THREAD=0).

cc: mesa-stable

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17394>
2022-07-23 18:03:22 +00:00
Mihai Preda da9feae735 gallivm: push LLVM version guard into assert
The asserts that check the pointer element type can't be used on LLVM >= 15.
Instead of using precompiler #if, use boolean shortcut in assert.

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17650>
2022-07-23 17:34:08 +00:00
Mihai Preda f0fda08739 gallivm: add lp_build_struct_get() variants that take the LLVM type
This is needed for LLVM-15 opaque pointers.
The new variants taking the type are named with the suffix "2", using
the same naming pattern LLVM (e.g. LLVMBuildGEP2 vs. LLVMBuildGEP).

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17650>
2022-07-23 17:34:08 +00:00
Mihai Preda 8c4aef2abb gallivm: refactor a bit the cache access in view of LLVM opaque pointers
LLVM 15 requires transition to opaque pointers; factorize a bit the cache
memthods to help this transition.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17650>
2022-07-23 17:34:08 +00:00
Mihai Preda b549394992 gallivm: fix a few llvm non-opaque pointers
As LLVM 15 transitions to opaque pointers, we need to update
the deprecated methods dealing with non-opaque pointers.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17650>
2022-07-23 17:34:08 +00:00
Jesse Natalie bdf91b25d9 dzn: Retrieve validator version
For platforms where there's no validator available, leave the field zero-initialized
to let the DXIL backend choose whatever target validator version it wants.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie ef7635b1cb d3d12: Retrieve validator version
For platforms where there's no validator available, leave the field zero-initialized
to let the DXIL backend choose whatever target validator version it wants.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie b8328c9664 microsoft/compiler: Blacklist DXIL validator 1.6 from 20348 SDK
This version claims to support validator version 1.6, but doesn't
actually have the 1.6 changes (PSV v2, PSV resource v1, barycentrics).

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie 8fcd506178 microsoft/compiler: Add a getter for a validator version from DXIL.dll
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie 46335debf6 microsoft/compiler: Support DXIL validator 1.7
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie 4abe781a0b microsoft/compiler: Support DXIL validator 1.6
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie 9dbaece312 microsoft/compiler: DXIL validator 1.6 uses a new PSV resource struct
This is a huge pain because it's an array, meaning that accessing
an entry in the array now depends on the validator version to use
the right element stride.

We could always just store the v1 and downconvert if needed... but
this isn't *that* bad that I felt I had to do it that way.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie d9e575d4d7 microsoft/compiler: DXIL validator 1.6 uses a new PSV struct version
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie 4d257929da microsoft/compiler: Set the barycentrics flag for attribute_at_vertex
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie 271c8d7a8c microsoft/compiler: DXIL validator 1.6 counts UAVs differently
Instead of counting the number of UAV arrays, it counts the
number of actual UAVs declared. This is more correct, but we
need to do the same accounting to set the 64 UAVs flag.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie 494af9db04 microsoft/compiler: Correctly compute dynamic indexing I/O masks
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie 31d09d2f77 microsoft/compiler: Compute correct usage masks
This starts actually updating the always-read/never-written
masks while processing the shader. Note that we follow DXC's
lead here and treat "always read" as "sometimes read."

This isn't strictly required, but might help drivers out.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie c26b28f711 microsoft/compiler: Support DXIL validator version 1.5
This version of the validator starts adding usage masks into
the DXIL, which then are expected to match the PSV and signature
data. The usage masks are "correct" meaning that the never-writes
mask no longer includes bits outside of components 0-3.

A future change will actually compute useful masks.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie 170d428887 microsoft/compiler: Lower I/O to scalar
A future change will start computing component masks while
processing I/O instructions, and only having to compute
a mask for one component per instruction simplifies things.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie 80d35739ff microsoft/compiler: Ensure 4-component position writes via NIR
We're about to lower I/O to scalar, which means we'll end up with
multiple writes to position, and none of them has enough info to
fill in the blanks.

This causes a test that previously crashed on WARP (due to
StoreOutput with an undef not being handled) to fail more
gracefully - but that failure means that the test spends
forever just outputting errors, so explicitly skip it.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie 252c3c409d microsoft/compiler: Split signature processing into two parts
First, preprocess the signatures, strictly based on the variables
in the nir shader. Then, later, after the actual shader contents
have been processed, we emit the metadata.

This lets shader processing rely on the pre-processed data (e.g.
the row -> ID mapping needed for large VS inputs) while also allowing
the signature data to rely on data gathered during the shader traversal
(e.g. which components are actually used).

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie e4c927545d microsoft/compiler: Emit metadata based on long-lived signature data
Instead of using the short-lived semantic structure (that's used to
fill out the long-lived signature and PSV data), use the long-lived
ones. This is staging so we can hold off on emitting the metadata
until later.

Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie 6af22121cf microsoft/compiler: Add a max validator version
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie c8f63e07da microsoft/compiler: Add a max shader model option
Reviewed-by: Enrico Galli <enrico.galli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Jesse Natalie d216d32756 nir_lower_io_to_scalar: Support arrayed (per-vertex) I/O
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17603>
2022-07-23 14:48:17 +00:00
Gert Wollny 36c000484d r600: don't dump shader info to files on debug
This was useful to bring up the NIR backend, but is not needed
anymore.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>
2022-07-23 13:10:45 +00:00
Gert Wollny dcfb047e11 r600/sfn: Fix streamout with non-zero component write
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>
2022-07-23 13:10:45 +00:00
Gert Wollny d92ce8566b r600/sfn: Fix used of local shared write mask
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>
2022-07-23 13:10:45 +00:00
Gert Wollny ca1c78e885 r600/sfn: Fix emmision of LDS instructions
Assert to catch more possible erros with LDS fecth/read
groups.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>
2022-07-23 13:10:45 +00:00
Gert Wollny 8a7d34e3bd r600/sfn: Fix the kcache failure handling
Instead of starting a new block when the kcache handling failed,
try to continue scheduling instructions until kcache allocation
fails for all ready instruction.
With that we avoid a CF split withing an LDS fetch/read group.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>
2022-07-23 13:10:45 +00:00
Gert Wollny 8db31e0fe6 r600/sfn: count LDS queue pop reads separately in assembler
Otherwise the check whether the fetches and reads are balanced
could fail.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>
2022-07-23 13:10:45 +00:00
Gert Wollny 233f246bdf r600/sfn: lower undef to zero
It's what the backend would do anyway, so let's do it in nir and
give the optimizer some chance to profit from possible improvements.

Fixes a bad shader with "The Raven Remastered"

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>
2022-07-23 13:10:45 +00:00
Gert Wollny 982effcd4e r600/sfn: fix storing shader output array locations
When lowering gl_Clipertex the driver_location may no longer correspond
to the array index, so fill the array by counting the array index up
according to outputs that need to be handled by the state setup.

Fixes: 3340c7ce35
    r600/sfn: lower CLIPVERTEX to clip planes

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>
2022-07-23 13:10:45 +00:00
Gert Wollny 2e03dd1bef r600/sfn: clean up some commented out code
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17678>
2022-07-23 13:10:45 +00:00
Vinson Lee 6b3af02a6f r600/sfn: Initialize TestShaderFromString member m_instr_factory.
Fix defect reported by Coverity Scan.

Uninitialized pointer field (UNINIT_CTOR)
uninit_member: Non-static class member m_instr_factory is not
initialized in this constructor nor in any functions that it calls.

Fixes: 79ca456b48 ("r600/sfn: rewrite NIR backend")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17584>
2022-07-23 05:36:34 +00:00
Ryan Neph 1f28d221d9 venus: add support for VK_KHR_dynamic_rendering
Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17668>
2022-07-23 01:14:22 +00:00
Ryan Neph 6f5289df53 venus: refactor VkCommandBufferBeginInfo fixups to function
Signed-off-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17668>
2022-07-23 01:14:22 +00:00
Icecream95 d6c574f423 panfrost: Allow NULL streamout targets
Fixes Piglit test
arb_enhanced_layouts-transform-feedback-layout-qualifiers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>
2022-07-23 00:56:10 +00:00
Icecream95 a0851f1cc4 panfrost: Don't unbind recently bound streamout targets
When unbinding extra targets, start after the last new target.

Fixes: 5ff7973560 ("panfrost: Import streamout data structures")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>
2022-07-23 00:56:10 +00:00
Icecream95 a8dbf61b46 panfrost: Add a debug option for checking overflows on pool uploads
PAN_MESA_DEBUG=overflow will place objects as close as possible to a
protected region at the end of the buffer, so that overflows segfault.

Caught the bugs in all four of the preceding commits.

v2: memset the BO to 0xbb to catch code expecting zeroed allocations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>
2022-07-23 00:56:10 +00:00
Icecream95 537f67f053 panfrost: Correctly calculate prefetch suppresion varying index
The xfb_base is a base index, it makes no sense to multiply that with
the number of streamout targets. Use addition instead to fix a buffer
overflow.

Fixes: 557633b142 ("panfrost: Suppress Bifrost prefetching")
Reported-by: Luc Ma <onion0709@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>
2022-07-23 00:56:10 +00:00
Icecream95 37ab45079d panfrost: Clear the GENERAL varying buffer field if unused
Otherwise the indirect draw shader can read uninitialised data for the
stride, and the position varying buffer may be outside the heap BO.

The next commit fixes a bug that masked this one.

Fixes: 2e6d94c198 ("panfrost: Add helpers to support indirect draws")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>
2022-07-23 00:56:10 +00:00
Icecream95 379ae6d823 panfrost: Emit the correct number of attributes
create_vertex_elements_state is sometimes called with a too large
num_elements argument, for example with util_blitter, which causes a
buffer overflow.

There is no documentation to forbid this practice, so don't rely on
so->num_elements being correct and instead use the vertex shader
attribute count, which matches the value used to allocate the
descriptors.

Use attributes_read_count rather than attribute_count because the
latter also includes images and PAN_VERTEX_ID/PAN_INSTANCE_ID.

Fixes: 76de3e691c ("panfrost: Merge attribute packing routines")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>
2022-07-23 00:56:10 +00:00
Icecream95 fe613a8de9 panfrost: Only emit images when they are present
nr_images is the trigger for allocating double the number of buffers
for attributes. When there are no images, there is not always enough
space for ALIGN_POT(k, 2) to not move k out of bounds, so don't
execute the line in that case.

Fixes: dc85f65e05 ("panfrost: emit shader image attribute descriptors")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>
2022-07-23 00:56:10 +00:00
Mike Blumenkrantz 240835cfb0 zink: remove deqp fails for lavapipe
these are all broken tests, so ignore whatever results there were for now

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17721>
2022-07-22 16:13:57 -04:00
Mike Blumenkrantz 65c1504045 lavapipe: propagate xfb info for pipeline library rasterization stages
Fixes: 202bbedc55 ("lavapipe: streamline xfb shader setup")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17716>
2022-07-22 19:27:49 +00:00
Ian Romanick 430d1a20eb spirv: Fix array length of buffers larger than INT32_MAX.
Like 90a8fb0355.

fossil-db results:

All Skylake and newer Intel platforms had similar results. (Ice Lake shown)
Instructions in all programs: 141442369 -> 141442363 (-0.0%)
Instructions helped: 1

Cycles in all programs: 9099270231 -> 9099270187 (-0.0%)
Cycles helped: 1

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17637>
2022-07-22 17:54:28 +00:00
Emma Anholt 254076f3fc ci/crocus: Fix the commented YML for blender-demo-cube_diorama.
Fixes: c0930b552d ("ci/crocus: Disable the blender trace.")
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17637>
2022-07-22 17:54:28 +00:00
Ian Romanick 95e50d198f intel/vec4: Set lower_usub_sat
Reviewed-by: Emma Anholt <emma@anholt.net>
Closes: #6900
Fixes: 90a8fb03 ("nir/lower_io: Fix array length of buffers larger than INT32_MAX.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17637>
2022-07-22 17:54:28 +00:00
Emma Anholt f6c5b1d6c6 nir: Split usub_sat lowering flag from uadd_sat.
Intel vec4 would like to do uadd_sat, but use lowering for usub_sat.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17637>
2022-07-22 17:54:28 +00:00
Mike Blumenkrantz aed433833f anv: disable dev.i915.perf_stream_paranoid=0 warning
this is spammed constantly even if ANV isn't used

fixes #6731

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17661>
2022-07-22 17:24:04 +00:00
Nanley Chery bec82bb436 iris: Use fill_surface_states for compressed resources
In iris_create_surface, use the fill_surface_states helper function instead of
an open-coded solution for compressed resources.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17598>
2022-07-22 16:33:37 +00:00
Nanley Chery 6c65e990b6 iris: Don't leak compressed resources in iris_create_surface
Before this patch, we were leaking compressed resources in iris_create_surface.
Specifically, when we failed to create an uncompressed ISL surface and view for
a compressed resource, we didn't unreference the resource pointer we referenced
into the pipe_surface.

Fix this by delaying the pipe_surface initialization code to after attempting
to create the uncompressed surface and view.

Cc: 22.1 <mesa-stable>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17598>
2022-07-22 16:33:36 +00:00
Nanley Chery bca601ffe9 iris: Don't leak surface states for compressed resources
Before this patch, we were leaking surface states in iris_create_surface.
Specifically, when we failed to create an uncompressed ISL surface and view for
a compressed resource, we didn't free surface states we allocated for it.

Fix this by attempting to create the uncompressed surface and view before we
allocate the surface states.

Cc: 22.1 <mesa-stable>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17598>
2022-07-22 16:33:36 +00:00
Eric Engestrom 96a79a5f3a vk/util: simplify extensions gen code
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17713>
2022-07-22 15:56:28 +00:00
Eric Engestrom e4199322ee vk/util: handful of pythonic cleanups
No functional changes.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17713>
2022-07-22 15:56:28 +00:00
Daniel Schürmann 5b196716cf radv/rt: simplify lower_rt_instructions()
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>
2022-07-22 15:31:23 +00:00
Daniel Schürmann f7c318901d radv/rt: fix nir_builder cursor in lower_rt_instructions()
Fixes: 207ce6d658 ('radv: Add helper to inline shaders into the main shader.')
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>
2022-07-22 15:31:23 +00:00
Daniel Schürmann c0945f70df radv/rt: Don't load ClosestHit SBT on every hit, but only once after traversal
Quake II RTX:
Totals from 7 (0.01% of 134913) affected shaders:
CodeSize: 217592 -> 215956 (-0.75%)
Instrs: 39468 -> 39341 (-0.32%)
Latency: 761581 -> 746802 (-1.94%)
InvThroughput: 507721 -> 497870 (-1.94%)
Copies: 4621 -> 4585 (-0.78%)
Branches: 1598 -> 1584 (-0.88%)

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>
2022-07-22 15:31:23 +00:00
Daniel Schürmann c39cccec9c radv/rt: use stage ID as handle for general and closestHit shaders
This avoids some code duplication and divergence.

Quake II RTX:
Totals from 7 (0.01% of 134913) affected shaders:
CodeSize: 218880 -> 217592 (-0.59%)
Instrs: 39692 -> 39468 (-0.56%)
Latency: 789091 -> 761581 (-3.49%)
InvThroughput: 526061 -> 507721 (-3.49%)
VClause: 1202 -> 1188 (-1.16%)
Copies: 4649 -> 4621 (-0.60%)
Branches: 1605 -> 1598 (-0.44%)

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>
2022-07-22 15:31:23 +00:00
Daniel Schürmann 3750663c72 radv/rt: use derefs for the traversal stack
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>
2022-07-22 15:31:23 +00:00
Daniel Schürmann 076ea8b35a radv: create RT traversal as separate shader
This will help in future to keep the main shader slim
when we have actual function calls.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>
2022-07-22 15:31:23 +00:00
Daniel Schürmann 8e056af399 radv: Only create noop-fs for graphics pipelines
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17301>
2022-07-22 15:31:23 +00:00
Tapani Pälli a6857ee43e anv: implement Wa_14015264727 for DG2
On DG2 we need to flush data cache before fast clear operation.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17218>
2022-07-22 14:59:06 +00:00
Tapani Pälli da7a7c9bbc iris: implement Wa_14015264727 for DG2
On DG2 we need to flush data cache before fast clear operation.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17218>
2022-07-22 14:59:06 +00:00
Jesse Natalie 9c5d8dcf6c d3d12: Remove state tracking implementation details from header
Now that the old state tracking code is removed, implementation details
no longer need to be leaked out of this single source file. Remove structs,
function declarations, 'd3d12_' prefixes, and add static when possible.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie 74a811382f d3d12: Add a transition flag indicating that state accumulation is needed
Most call sites for transitions will only apply transitions to one or two
resources, and don't need to use the bo set, where each call is guaranteed
to insert the bo, only to walk the set immediately afterwards. Instead, they
can just append the barriers to the dynarray directly and skip the bo set.

Draws and dispatches still use the append approach, to accumulate the full
set of state needed for each subresource for the case where a single
[sub]resource is bound to the pipeline in multiple places.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie fa570bda08 d3d12: Optimize transition_subresource_states that covers a whole resource
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie a3813505ce d3d12: Extract core barrier logic
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie aa94e0b37c d3d12: Rename bind invalidate options to transition flags
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie c6f01d6c45 d3d12: Swap the remainder of state tracking to new method
Uses a set of d3d12_bo on the context to track which bos are pending
a transition instead of an intrusive linked list, since the bo may
need to be pending on multiple contexts at once.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie 05d04c7a54 d3d12: Record a state fixup command list when necessary
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie 70e7cb444e d3d12: Track a global resource state for non-simultaneous-access resources
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie 6acab47d7f d3d12: Create/free context state entries
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie f972a57b0b d3d12: Treat depth/stencil as planar for plane count helper
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie 6bc5df76d3 d3d12: Add a context state tracking structure
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie 6a8070bcef d3d12: Notify contexts about deletion of bos
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie 375e8b2f4b d3d12: Hold lock when removing resources from residency list
Also, remove them from the list before releasing the ID3D12Resource.

Fixes: 671deb54 ("d3d12: Add residency info to d3d12_bo")
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie b72ec453bd d3d12: Add a list of contexts alive for the current screen
When a resource is destroyed, we'll need to let the contexts know.
This is guarded by the submit mutex, because we'll already be holding
that for at least one place where we want to iterate this list, and
it's low-frequency enough that re-using it is simpler than adding more
locks and creating confusing lock ordering.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie 17c3f4f3e1 d3d12: Give bos a unique identifier to be used for state tracking
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie bc9616129e d3d12: Move current resource state to new files
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie 2016dec6a4 d3d12: Move desired resource state to new files
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Jesse Natalie a277dbf1f4 d3d12: Add a blank d3d12_resource_state.h/cpp
This will host some code that's moving and ported to match style
with the rest of the driver, and other code that will be re-written.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17688>
2022-07-22 14:42:56 +00:00
Mike Blumenkrantz 6b07893b31 util/vbuf: handle multidraws
this moves the handling from cso_conext to vbuf, which reduces overhead
for draws that aren't rewritten

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17686>
2022-07-22 12:40:56 +00:00
Timothy Arceri 7c484b0c1c glsl: correctly track cross slot component packing
Otherwise we will mix and match mesa's custom cross slot packing
with arb_enhanced_layouts style packing and we won't correctly
handle the size of the vars needed for the mesa custom packing.

The code was working correctly if the shader interface had both
a matching input and output but when we only had one side of
the interface we were only marking a single slot location as
packed.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Fixes: e5122a5543 ("glsl: add a NIR based varying linker")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6853
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17550>
2022-07-22 10:43:18 +00:00
Lucas Stach 00955a644e etnaviv: remove etna_align_up() function
It does the same thing as align() from u_math.h, no need to
have a etnaviv specific version.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17695>
2022-07-22 09:08:29 +00:00
Erik Faye-Lund 89f77144d7 zink: drop pointless comment
We're already handling all the meaningful types here. The other types
like samplers, images, structs etc aren't really appropriate here.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17676>
2022-07-22 08:45:34 +00:00
Erik Faye-Lund d3dca05d53 zink: remove pointless assert
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17676>
2022-07-22 08:45:34 +00:00
Erik Faye-Lund 02de4a509c zink: remove pointless test
These are already all the bitsizes there are. No need to test for them.

Besides, get_uvec_type already contains an assert for the same
condition anyway.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17676>
2022-07-22 08:45:34 +00:00
Timur Kristóf 8d7ca7783b ac/nir/ngg: Remember proper bit sizes of GS output variables.
The LLVM backend keeps track of 16-bit output variables and it will
miscompile shaders when these outputs aren't the correct bitsize.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17706>
2022-07-22 08:17:39 +00:00
Timur Kristóf e60fbb4dc9 ac/nir/ngg: Copy comment about LDS layout for NGG GS.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17706>
2022-07-22 08:17:39 +00:00
Timur Kristóf b5abf4fb3d ac/llvm: Use gs_prim_id for NGG VS.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17706>
2022-07-22 08:17:39 +00:00
Timur Kristóf 1e2663b62c ac/llvm: Add LLVM bug workaround to ac_build_mbcnt_add.
LLVM always believes that this instruction's upper bound is the wave
size, regardless of ac_set_range_metadata and regardless of whether
the add source is used.

As a workaround, emit an extra add instruction.

Cc: mesa-stable
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17706>
2022-07-22 08:17:39 +00:00
Timur Kristóf c9f8be9d58 ac/llvm: Implement load_num_subgroups for NGG shaders.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17706>
2022-07-22 08:17:39 +00:00
Konstantin Seurer 1a95d43e55 radv: Simplify the meta init fail path
Move most of the the cleanup into radv_device_init_meta.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17652>
2022-07-22 07:51:14 +00:00
Konstantin Seurer b06e5535c0 radv: Use RADV_META_SUSPEND_PREDICATING
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17625>
2022-07-22 07:25:09 +00:00
Konstantin Seurer fdeca2ca0b radv: Add meta saving/restoring for predicating
There are a bunch of places, where this is done manually.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17625>
2022-07-22 07:25:09 +00:00
Dave Airlie 21dd305694 llvmpipe: fix aniso cube map arrays.
There was a coordinate missing when you have cube map arrays,
and aniso sampling.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fixes: ce2b711c0a ("gallivm: add support for anisotropic sampling.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17704>
2022-07-22 14:18:39 +10:00
Yiwei Zhang 02d6d43f54 Revert "venus: suballocate more for layering"
This reverts commit f96e25ae05.

It's causing vkbench oom failure on radv.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17701>
2022-07-22 03:09:12 +00:00
Jason Ekstrand 2b4e34d9b0 zink: Mark depth/stencil visual tests as flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>
2022-07-22 02:36:17 +00:00
Jason Ekstrand a5952c362e vulkan: Don't assert VkGraphicsPipelineLibraryCreateInfoEXT::Flags == 0
There are VUs that imply that this is a requirement but the CTS seems to
ignore it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>
2022-07-22 02:36:17 +00:00
Jason Ekstrand 0415d66c97 vulkan: Input assembly and depth/stencil can also be fully dynamic
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>
2022-07-22 02:36:17 +00:00
Jason Ekstrand ceccbc01f5 vulkan: Fix pipeline libraries with dynamic-only VI or FSR state
When we initialize the graphics pipeline state, we skip VI and FSR state
if they're 100% dynamic.  We need to do this if the current set of
dynamic things contains VI/FSR or if the set of dynamic state already in
the vk_graphics_pipeline_state has them dynamic.  Look state->dynamic
after we've merged instead of just looking at the dynamic set from the
VkGraphicsPipelineCreateInfo we were passed.

Also, when we validate, we need to assume that VI and FSR exist or else
we'll assert if dynamic VI or FSR are set.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>
2022-07-22 02:36:17 +00:00
Jason Ekstrand e5e828e91d vulkan: Add a fully_dynamic_state_groups() helper
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>
2022-07-22 02:36:17 +00:00
Jason Ekstrand 00269c09d6 vulkan: Depth/stencil isn't fragment output state but multisample is
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>
2022-07-22 02:36:17 +00:00
Jason Ekstrand cc84d4ca66 vulkan: Multisample state isn't always included in fragment shader state
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>
2022-07-22 02:36:17 +00:00
Jason Ekstrand 50411bd786 vulkan: Record shader stages in vk_graphics_pipeline_state
Some of our asserts and other checks depend on the total set of stages,
not just the stages set in the current pCreateInfo.  Recording the stage
mask lets us combine them in vk_graphics_pipeline_state_merge().

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>
2022-07-22 02:36:17 +00:00
Jason Ekstrand eb1f00aaac vulkan: Allow up to 12 pointers in multialloc
vk_graphics_pipeline_state_init() may allocate up to 12 things so expand
vk_multialloc accordingly.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17696>
2022-07-22 02:36:17 +00:00
Chia-I Wu 8ec81a4b11 turnip: fix an assertion with drm-shim
Fixes

  deqp-vk: ../src/vulkan/runtime/vk_device.c:49:
  get_timeline_mode: Assertion `timeline_type == NULL' failed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17571>
2022-07-22 02:11:14 +00:00
Chia-I Wu 2d2912f18a freedreno/drm-shim: add a660
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17571>
2022-07-22 02:11:14 +00:00
Emma Anholt 7f4df969c9 Revert "ci/freedreno: Switch a630 to manual/disabled for lab maintenance."
This reverts commit 7e381ba9fc.  2 new
boards are in place, bringing us from 7 to 9.  We hoped for 12, but have
ongoing power stability issues.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17662>
2022-07-22 00:57:23 +00:00
Emma Anholt 94b4c0bc39 ci/turnip: Add a couple of missing a630 fails.
Same as a618.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17662>
2022-07-22 00:57:23 +00:00
Emma Anholt 8a7c4f4202 ci/turnip: Bump up the a630 full run timeout.
Test runtime has crept up with more CTS tests and more features.  The last
vk_full 1/2 run I tried timed out at:

Pass: 268488, Fail: 2, ExpectedFail: 7, Warn: 1, Skip: 602571, Duration: 1:29:29, Remaining: 45

Rude.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17662>
2022-07-22 00:57:23 +00:00
Emma Anholt d8fb219b2f ci/freedreno: Add some more known flakes for a630 from our IRC logs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17662>
2022-07-22 00:57:23 +00:00
Jesse Natalie fccd6e275c d3d12: Support clip halfz
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17567>
2022-07-22 00:00:54 +00:00
Sil Vilerino 948c03bf58 d3d12: Enable VPP rotation, flip, alpha blend, crop, scaling via pipe_video_codec::process_frame
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17557>
2022-07-21 22:40:31 +00:00
Sil Vilerino 323cf5a68d d3d12: Add pipe_video_codec::process_frame implementation
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17557>
2022-07-21 22:40:31 +00:00
Sil Vilerino 345fd92092 va: Add support for VPP rotation, flip, alpha blend, crop, scaling
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17557>
2022-07-21 22:40:30 +00:00
Sil Vilerino d09cf4333c gallium/video: Add video post processing interface
Add process_frame to pipe_video codec
Add new structures/caps for video post-processing with rotation,
flip, alpha blending, crop, and scaling, via the video engine.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17557>
2022-07-21 22:40:30 +00:00
Sil Vilerino 721d9eea81 va: Replace usage of entrypoint UNKNOWN with PROCESSING for VP
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17557>
2022-07-21 22:40:30 +00:00
Sil Vilerino 74c5d01169 vl: Replace usage of entrypoint UNKNOWN with PROCESSING for VP
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17557>
2022-07-21 22:40:30 +00:00
Sil Vilerino f5ab2ffd4e pipe/video: Add PIPE_VIDEO_ENTRYPOINT_PROCESSING
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17557>
2022-07-21 22:40:30 +00:00
Sil Vilerino 6bf8798ecb d3d12: Video - Remove unused spCopyQueues from enc/dec objects
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17557>
2022-07-21 22:40:30 +00:00
Lionel Landwerlin 1aa4a91dbf anv: allocate RT scratch in local memory
Like a 100x (not joking) improvement.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17674>
2022-07-21 22:19:41 +00:00
Timur Kristóf dd781c1ccb ac/nir/ngg: Create output variable for primitive ID export.
This makes the RADV/LLVM backend happy and mitigates a crash.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17581>
2022-07-21 21:53:29 +00:00
Timur Kristóf 22796d91ea aco: Remove hack for primitive ID export.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17581>
2022-07-21 21:53:29 +00:00
Timur Kristóf b0a7db1d3b ac/nir/ngg: Move primitive ID workgroup barrier to proper place.
Previously, it was in a divergent branch, therefore
it could hang the GPU when a workgroup had a primitive-only wave.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17581>
2022-07-21 21:53:29 +00:00
Qiang Yu 754e43369d ac/nir/ngg: Decouple primitive ID store and primitive export.
There's no dependency between them.

This can simplify the compiler backend translation by
always storing prim id before vertex export, which also
benefits the LLVM backend in latter changes.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17581>
2022-07-21 21:53:29 +00:00
Jason Ekstrand 9965863a13 lavapipe: Use more Vulkan NIR heleprs
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17644>
2022-07-21 21:18:48 +00:00
Jason Ekstrand 8e99a7f5e3 vulkan: Call gather_xfb_info in vk_spirv_to_nir
In particular, we now call it before running dead variables so we get
the XFB info even for things which are never written.  This fixes a 102
Vulkan CTS tests on ANV and probably turnip as well.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17644>
2022-07-21 21:18:48 +00:00
Jason Ekstrand bd93d6f693 vulkan/nir: Don't remove dead XFB outputs
Fixes: 21b405fbbc ("vulkan: Add a vk_shader_module_to_nir() helper")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17644>
2022-07-21 21:18:48 +00:00
Jason Ekstrand 87ab287436 vulkan: Call lower_clip_cull_distance_arrays in vk_spirv_to_nir
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17644>
2022-07-21 21:18:48 +00:00
Jordan Justen 85099804bf iris/bufmgr: Add assert and TODO comment for future small BAR uapi
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/17349>
2022-07-21 20:27:10 +00:00
Jordan Justen d9ce788641 anv/allocator: Add assert and TODO comment for future small BAR uapi
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-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/17349>
2022-07-21 20:27:10 +00:00
Jordan Justen 7cf67e9da3 iris: Set clear_color_unknown if the bo is not mappable
Rework:
 * Ken: Check bo for IRIS_MMAP_NONE rather than the global
   intel_vram_all_mappable

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/17349>
2022-07-21 20:27:10 +00:00
Jordan Justen 180aa4f3b2 iris/bufmgr: Set mmap_mode to IRIS_MMAP_NONE for lmem in small-BAR mode
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Suggested-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17349>
2022-07-21 20:27:10 +00:00
Jordan Justen 49b1b8b853 iris/bufmgr: Add all_vram_mappable which is currently always true
This can be false on systems where the PCI Base Address Register (BAR)
is too small for the amount of VRAM. Eventually the kernel will be
able to tell us that a system can't map all of VRAM, and
`all_vram_mappable` will then be false.

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/17349>
2022-07-21 20:27:10 +00:00
Jordan Justen 618c871a23 iris/resource: Avoid mapping when not needed in iris_resource_init_aux_buf()
We might not be able to map all vram buffers in the future, so only
map the buffer when actually required.

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/17349>
2022-07-21 20:27:10 +00:00
Jordan Justen b79da470f2 iris/resource: Assert that DG2 CCS buffers don't also try to set BO_ALLOC_SMEM
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/17349>
2022-07-21 20:27:10 +00:00
Jordan Justen 7bd3a6b757 intel/dev: Add intel_vram_all_mappable()
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/17349>
2022-07-21 20:27:10 +00:00
Jordan Justen a3316d38d1 intel/tools: Print unmappable region info in intel_dev_info
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/17349>
2022-07-21 20:27:10 +00:00
Jordan Justen d2829ffe4e intel/dev: Add vram.unmappable.size region info
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/17349>
2022-07-21 20:27:10 +00:00
Lionel Landwerlin 09ba5c2b43 intel/dev: deal with i915 unallocated_size on smem
We cannot rely on unallocated_size on system memory for
VK_EXT_memory_budget.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4aecfbf0f4 ("intel/dev: Add devinfo::mem to store i915 regions information")
Reviewed-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/17349>
2022-07-21 20:27:10 +00:00
Marek Olšák 2474d92071 ttn: set dest_type for TXQ
It was failing an assertion in tgsi_to_nir and NIR validation.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17691>
2022-07-21 20:05:12 +00:00
Georg Lehmann 775578b885 ir3: Stop using nir_legalize_16bit_sampler_srcs.
nir_fold_16bit_tex_image's only_fold_all option ensures that there is never
a mix of bit sizes.

Closes https://gitlab.freedesktop.org/mesa/mesa/-/issues/6899

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16978>
2022-07-21 19:15:04 +00:00
Georg Lehmann a93786fc26 nir/lower_mediump: Add an option to only fold if all tex sources can be folded.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16978>
2022-07-21 19:15:03 +00:00
Georg Lehmann 87e3277b82 nir: Rewrite and merge 16bit tex folding pass with 16bit image folding pass.
Allow folding constants/undef sources by sharing more code with the image_store
16bit folding pass.

Allow more than one set of sources because RADV wants two, one for
G16 (ddx/ddy) and one for A16 (all other sources).

Allow folding cube sampling destination conversions on radeonsi/radv because
I think the limitation only applies to sources.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16978>
2022-07-21 19:15:03 +00:00
Georg Lehmann 06b33770b6 ir3: Lower alu to scalar if nir_legalize_16bit_sampler_srcs made progress.
Fixes: 003327dd95 ("freedreno/ir3: Pass 16-bit sampler coordinates when possible.")
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16978>
2022-07-21 19:15:03 +00:00
Georg Lehmann 9fe382ba96 ir3: Only run 16bit tex NIR passes on a5xx+.
16bit types aren't yet supported on older hardware.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16978>
2022-07-21 19:15:03 +00:00
Mike Blumenkrantz 2ea0d735d4 zink: add env var to abort on device-lost if no reset callback is set
the alternative here is to just spin aimlessly until the process ooms,
which causes problems when trying to detect failures in cts caselists

a separate env var is used so that it can be exported without affecting
ZINK_DEBUG

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17525>
2022-07-21 14:02:27 +00:00
Konstantin Seurer fe5c7f1418 gallium/tests: Remove format desc null checks
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer c48497593a util/format: Remove format desc null checks
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer 7c79399597 pvr: Remove format desc null check
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer 55a12036f6 virgl: Remove format desc null checks
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer 90030469dd softpipe: Remove format desc null check
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer 435cb21e11 radeonsi: Remove format desc null checks
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer 66344fae4d r600: Remove format desc null checks
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer ad6553eae9 r300: Remove format desc null check
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer b07b359428 panfrost: Remove format desc null check
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer 0dbec9c059 llvmpipe: Remove format desc null checks
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer c23c8f18ca etnaviv: Remove format desc null check
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer b52215ae56 agx: Remove format desc null check
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer 74fe2c805f util: Remove format desc null check
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer f10b9563dd tgsi: Remove format desc null check
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer 927f863364 gallivm: Remove format desc null checks
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer 630df88a74 turnip: Remove format desc null assert
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer 61dfccae79 v3dv: Remove format desc null asserts
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer 7e7e01fe0c radv: Use desc->format
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer ae67294479 radv: Remove format desc null checks
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer e342081c37 util/format: Assert that formats are valid
It should be the responsibility of the driver to make sure, that "format" is a valid pipe_format.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Konstantin Seurer 2b02ac2779 util/format: Use an explicit length for the descs
The script that generates the format tables does not set every pipe_format.
In practice, the length of the format tables is equal to PIPE_FORMAT_COUNT.
I just added the explicit size to future-proof it.

(If the largest valid format is not part of the format tables,
 there will be a mismatch between the array length and PIPE_FORMAT_COUNT)

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17490>
2022-07-21 12:48:01 +00:00
Samuel Pitoiset 85e859ac5f radv: only force 1x sample for Bresenham lines when pipeline draws lines
Otherwise, this would affect non-line draws. While we are at it,
adjust a comment.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6303
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17657>
2022-07-21 08:05:35 +02:00
Emma Anholt 6e819585da ci/turnip: Add a bit of spilling-vs-ballot testing on a618.
The shared reg usage involved in the subgroup-related macros can cause
trouble for the spiller, and spilling may be implicated in CTS failures
with old versions of the subgroup tests, so let's make sure we get some
coverage.  It does seem to catch a couple of failures.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17642>
2022-07-21 01:25:33 +00:00
Konrad Dybcio d3b38213e5 freedreno: Enable A619
Enable A619 as found in various SKUs of the SM Lagoon SoC, such as
SM6350 and SM7225.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17495>
2022-07-21 00:16:32 +00:00
Alyssa Rosenzweig f7e1eccf5e util: Gate simple_mtx_assert_locked on !NDEBUG
..Instead of DEBUG so these work in debugoptimized builds.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17408>
2022-07-20 23:37:13 +00:00
Alyssa Rosenzweig ed06b3dd49 util: Enable list_assert in debugoptimized builds
In debugoptimized builds, DEBUG is not set (and neither is NDEBUG). The
intention of NDEBUG is to disable assertions. As such, list assertions should be
gated on !NDEBUG as opposed to on DEBUG.

But assert() is already disabled in that case, so we don't need our own special
assert (Eric).

This would have caught an assertion failure (due to the wrong iterator used)
sooner for the Valhall compiler.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17408>
2022-07-20 23:37:13 +00:00
Mike Blumenkrantz 6139493ae3 vulkan/wsi: return VK_SUBOPTIMAL_KHR for sw/x11 on window resize
the other codepaths all end up checking geometry in one way or another
in order to validate the extents, so add a check here to do the same

fixes #6893

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17638>
2022-07-20 21:37:02 +00:00
Emma Anholt 74aea0b840 glsl: Remove optimize_swizzles.
It will get turned into SSA and copy-propagated in NIR, no need to walk
the IR collapsing it here.

iris shader-db results appear to be noise:

total instructions in shared programs: 8932195 -> 8932147 (<.01%)
instructions in affected programs: 537 -> 489 (-8.94%)
LOST:   12
GAINED: 11

lost/gained are simd32 switches in unigine, l4d2, portal2, asphalt9.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17613>
2022-07-20 20:45:09 +00:00
Mike Blumenkrantz 4123ee3c71 zink: invoke descriptor_program_deinit for programs on context destroy
this should make multi-context shutdown more stable

affects:
glx@glx-visuals-depth -pixmap
glx@glx-visuals-stencil

cc: mesa-stable

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17658>
2022-07-20 19:58:16 +00:00
Emma Anholt f075376823 glsl: Use the same NIR path for shared mem lowering as SPIRV does.
Now that we have no non-NIR drivers, we can retire the old code.  We just
need to pass the variable accesses through to it.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17610>
2022-07-20 19:32:48 +00:00
Timur Kristóf 4eb7e53963 radv: Enable task shader feature for NV_mesh_shader.
Still hidden behind RADV_PERFTEST=nv_ms but now advertises
task shader support too.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16531>
2022-07-20 19:00:31 +00:00
Timur Kristóf 28db493cdc radv: Copy BO list to ACE internal CS.
This is necessary to make sure the ACE internal cmdbuf
can access the same memory as the GFX cmdbuf.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16531>
2022-07-20 19:00:30 +00:00
Timur Kristóf 5a1cbafd9d radv: Submit internal compute cmdbuf.
Use scheduled dependencies to create two submissions:
first we submit ACE then GFX.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16531>
2022-07-20 19:00:30 +00:00
Timur Kristóf eeb8366bbd radv: Workaround MEC taskmesh dispatch hang when count buffer has zero.
The DISPATCH_TASKMESH_INDIRECT_MULTI_ACE packet has a firmware bug,
it hangs the GPU when the draw count is zero.

This commit adds a workaround sequence using COND_EXEC packets
which make sure that this indirect packet is never executed when
the draw count is zero.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16531>
2022-07-20 19:00:30 +00:00
Timur Kristóf 7b8f087f6b radv: Support task shaders in secondary cmd buffers.
Special consideration is needed to keep ACE and GFX in sync.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16531>
2022-07-20 19:00:30 +00:00
Timur Kristóf 4c6f83006d radv: Synchronization for task shaders.
Add a separate flush_bits field for tracking cache
flushes in the ACE internal cmdbuf.
In barriers and image transitions we add these flush bits to ACE.

Create a semaphore in the upload BO which makes it possible
for ACE to wait for GFX for the purpose of synchronization.
This is necessary when a barrier needs to block task shaders.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16531>
2022-07-20 19:00:30 +00:00