Timur Kristóf
e10cbb5d98
radv: Refactor predication for compute queues.
...
Initialize the inverted predication VA only when it is used
for the first time.
This is needed to get conditional rendering work correctly with
task shaders because the internal compute cmdbuf may not exist
yet when conditional rendering starts.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16531 >
2022-07-20 19:00:30 +00:00
Juan A. Suarez Romero
7131a05f92
v3d/ci: update expected list
...
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17660 >
2022-07-20 18:37:26 +00:00
Mike Blumenkrantz
ea92421298
zink: scale number of shader cache-get threads
...
this should improve startup times for short tests
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17659 >
2022-07-20 18:19:10 +00:00
Mike Blumenkrantz
153983328d
zink: handle null samplerview/image rebinds more gracefully
...
fixes a crash in nine
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17656 >
2022-07-20 17:48:03 +00:00
Mike Blumenkrantz
3c66617213
zink: move layout-setting for dynamic render attachments after no-op case
...
this avoids unnecessarily terminating a renderpass to insert unnecessary barriers
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
edab34f68d
zink: allow no-op renderpass updates in zink_batch_rp()
...
in some cases it becomes desirable to "maybe" stop and start the current
renderpass, such as when updates MAY result in layout changes for attachments
for such cases, avoid splitting the renderpass unless it actually needs to
be split
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
4aec761596
zink: improve granularity of renderpass switching
...
this should ensure that (future) renderpass recalcs will never split
a renderpass unnecessarily
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
f78919d36d
zink: add a bits union for zink_render_pass_state comparisons
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
13951385b3
zink: reuse rt layout functions to refactor zink_render_pass_attachment_get_barrier_info()
...
maybe slightly easier to read?
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
c602e877a3
zink: break out color rt layout calc
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
903060787e
zink: break out zs renderpass layout calc
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
1ff18f0879
zink: break out renderpass attachment load op calc
...
no functional changes
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
1bc9db6879
zink: split out rp_changed to be more granular for dynamic render
...
sometimes a state change MAY require a renderpass change, but this change
will not require splitting the current renderpass
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
9b087dcccd
zink: add an assert to verify that deferred clears aren't added in renderpass
...
this would be very, very broken
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
d9a320b62c
zink: remove redundant renderpass update check for clears
...
this should be handled already in the clear code
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
06b04a5c71
zink: unflag ctx->rp_changed after dynamic render update
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
b31a8dfc85
zink: do dynamic render implicit clear updates on rp_changed
...
this should be flagged correctly now
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:19 +00:00
Mike Blumenkrantz
5ae1c76baa
zink: flag renderpass change if renderpass clears change
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:18 +00:00
Mike Blumenkrantz
ca3d696f80
zink: don't flag renderpass change on depth write change as often
...
this is only "sometimes" required and only if dynamic render isn't being
used
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:18 +00:00
Mike Blumenkrantz
d079e3c9b6
zink: don't try to start a renderpass before CmdClearAttachments
...
it should be impossible to reach this point if a renderpass is not active
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17640 >
2022-07-20 17:30:18 +00:00
Mike Blumenkrantz
644f059a8d
llvmpipe: ignore multisample state for alpha_to_one
...
this is more accurate and fixes usage with lavapipe
cc: mesa-stable
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Roland Scheidegger <sroland@vmware.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17627 >
2022-07-20 15:41:14 +00:00
Mike Blumenkrantz
a884d1eb0e
vulkan/wsi: fix multiple acquires for sw without mit-shm
...
in this case, lying about having multiple images and then returning the
same image every time doesn't work, so use the busy flag
and return an available image when possible
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17590 >
2022-07-20 15:10:15 +00:00
Georg Lehmann
333f056edf
radv, aco: Don't lower 16bit isign.
...
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/17440 >
2022-07-20 14:31:15 +00:00
Georg Lehmann
4be6164ac9
radv: Remove ineg from lower_bit_size_callback callback.
...
It's always lowered to isub.
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/17440 >
2022-07-20 14:31:15 +00:00
Georg Lehmann
b96126ee95
radv,aco: Don't lower and vectorize 16bit iabs.
...
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/17440 >
2022-07-20 14:31:15 +00:00
Rhys Perry
37dda55f46
aco: remove unnecessary exp_cnt increments
...
update_counters() already does this.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17257 >
2022-07-20 14:04:15 +00:00
Vinson Lee
7384aab3ee
aco: Initialize spill_ctx members in constructor.
...
Fix defects reported by Coverity Scan.
Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member sgpr_spill_slots is not
initialized in this constructor nor in any functions that it calls.
uninit_member: Non-static class member vgpr_spill_slots is not
initialized in this constructor nor in any functions that it calls.
Fixes: 7d34044908 ("aco: refactor VGPR spill/reload lowering")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17583 >
2022-07-20 13:39:12 +00:00
Mike Blumenkrantz
687a5d8690
zink: use gfx_barrier for synchronization when binding buffer descriptors
...
this will preserve existing shader stages in the access mask and avoid desync
later on
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17639 >
2022-07-20 09:21:30 -04:00
Mike Blumenkrantz
268011e8c6
zink: fix viewport count tracking
...
the number of viewports in use is based on the outputs of the last vertex
stage, not the viewports passed by the state tracker
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17639 >
2022-07-20 09:21:30 -04:00
Mike Blumenkrantz
eaf11d3cd9
zink: call bind_last_vertex_stage() when binding vs
...
ensure all the necessary updates are flagged
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17639 >
2022-07-20 09:21:30 -04:00
Mike Blumenkrantz
011c02ce3c
zink: improve oom error message
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17639 >
2022-07-20 09:21:30 -04:00
Mike Blumenkrantz
2aab0a9c16
zink: fix crashing on bo allocation failure
...
list init occurs after mem allocation, so check this first
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17639 >
2022-07-20 09:21:30 -04:00
Mike Blumenkrantz
19eddeb226
zink: handle null samplerview in get_imageview_for_binding()
...
this is legal
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17639 >
2022-07-20 09:21:30 -04:00
Mike Blumenkrantz
5b58f8df53
zink: handle max_vertices=0 in geometry shader
...
this is a weird corner case where glsl permits a zero value, so clamp to 1
and then don't emit any vertices to avoid driver hangs
affects:
dEQP-GL45-ES31.functional.geometry_shading.emit.points_emit_0_end_0
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17639 >
2022-07-20 09:21:30 -04:00
Alejandro Piñeiro
efc827ceea
v3d/v3dv: use NIR_PASS(_
...
Instead of NIR_PASS_V, when possible.
This was done recently on anv (see commit ce60195ec and MR#17014)
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17609 >
2022-07-20 11:35:25 +00:00
Alejandro Piñeiro
0a50330c3d
broadcom/compiler: make several passes to return a progress
...
Two advantages:
* When using NIR_DEBUG=nir_print_xx, will print outcome only if
there is a change
* We can use NIR_PASS(_, ...) instead of NIR_PASS_V, that has
slightly more validation checks.
This includes:
* v3d_nir_lower_image_load_store
* v3d_nir_lower_io
* v3d_nir_lower_line_smooth
* v3d_nir_lower_load_store_bitsize
* v3d_nir_lower_robust_buffer_access
* v3d_nir_lower_scratch
* v3d_nir_lower_txf_ms
As we are here we also simplify some of them by using the
nir_shader_instructions_pass helper.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17609 >
2022-07-20 11:35:25 +00:00
Alejandro Piñeiro
81ca0b4191
broadcom/compiler: removed unused function
...
It is not even implemented.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17609 >
2022-07-20 11:35:25 +00:00
Alejandro Piñeiro
22022dfa04
v3dv/pipeline: use nir_shader_instructions_pass when lowering layout
...
The trigger for this commit was when we found that we were not calling
nir_metadata_preserve when lowering the layout code. But then I found
that it would be better to just update the code to use
nir_shader_instructions_pass, so we can avoid to manually:
* Initialize the nir_builder
* Call nir_foreach functions (we pass the callback)
* Call nir_metadata_preserve functions (that as mentioned we were not calling)
We also get a nice cleanup of several functions by reducing the number
of parameters (we pass a state struct).
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17609 >
2022-07-20 11:35:24 +00:00
Alejandro Piñeiro
8d3ce4eb06
nir: call nir_metadata_preserve at nir_remove_unused_io_vars
...
Without it we got a metadata assert:
deqp-vk: ../src/compiler/nir/nir_metadata.c:108: nir_metadata_check_validation_flag: Assertion `!(function->impl->valid_metadata & nir_metadata_not_properly_reset)' failed
if we try to use NIR_PASS(_, instead of NIR_PASS_V (that among other
things, do more validations).
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17609 >
2022-07-20 11:35:24 +00:00
Alejandro Piñeiro
d8fee4cdaa
broadcom/compiler: use NIR_PASS for nir_lower_vars_to_ssa at v3d_optimize_nir
...
There's no reason to not take into account progress at that point.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17609 >
2022-07-20 11:35:24 +00:00
Alejandro Piñeiro
dea0fe8a06
broadcom/compiler: wrap nir_convert_to_lcssa with NIR_PASS_V
...
So we get it included with the NIR_DEBUG=print_xx debug options.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17609 >
2022-07-20 11:35:24 +00:00
Alejandro Piñeiro
72cc268858
broadcom: document which debug options are specific for a given driver
...
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17609 >
2022-07-20 11:35:24 +00:00
Alejandro Piñeiro
e4d7c3b179
broadcom: add no_merge_jobs debug option
...
To avoid having a custom getenv on v3dv.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17609 >
2022-07-20 11:35:24 +00:00
Alejandro Piñeiro
bdf23805ab
v3dv/device: add comment on depthClamp feature
...
As we can't support it, and I need to recheck now and then when I read
that code.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17609 >
2022-07-20 11:35:24 +00:00
Ricardo Garcia
4058984b63
vulkan: allow null descriptor set layouts in pipeline layouts
...
VK_NULL_HANDLE descriptor set layouts are allowed when creating pipeline
layouts without VK_PIPELINE_LAYOUT_CREATE_INDEPENDENT_SETS_BIT_EXT.
From VUID-VkPipelineLayoutCreateInfo-graphicsPipelineLibrary-06753:
> If graphicsPipelineLibrary is not enabled, elements of pSetLayouts
> must be valid VkDescriptorSetLayout objects
From VUID-VkPipelineLayoutCreateInfo-pSetLayouts-parameter:
> If setLayoutCount is not 0, pSetLayouts must be a valid pointer to an
> array of setLayoutCount valid or VK_NULL_HANDLE VkDescriptorSetLayout
> handles
Signed-off-by: Ricardo Garcia <rgarcia@igalia.com >
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17629 >
2022-07-20 10:59:56 +00:00
Iago Toral Quiroga
b54544852c
v3dv: fix offset reported by vkGetImageSubresourceLayout
...
This represents an offset from the actual start of the image data,
not from the start of the memory allocation bound to the image.
Fixes:
dEQP-VK.image.subresource_layout.*
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17648 >
2022-07-20 10:33:57 +00:00
Iago Toral Quiroga
d2d2fdf934
v3dv: remove assert that poolSizeCount must be larger than 0
...
From the Vulkan spec:
"If poolSizeCount is not 0, pPoolSizes must be a valid pointer to an
array of poolSizeCount valid VkDescriptorPoolSize structures"
So 0 is actually allowed and there is a CTS to check it is handled gracefully.
Fixes:
dEQP-VK.api.descriptor_pool.zero_pool_size_count
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17648 >
2022-07-20 10:33:57 +00:00
Iago Toral Quiroga
19ef41b181
v3dv: handle VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT
...
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17616 >
2022-07-20 10:05:59 +00:00
Marcin Ślusarz
5e14445430
nir: convert unused mesh outputs to shared memory
...
Otherwise reads from output in one subgroup may not see
writes from other subgroups. Temp variables are later converted
to scratch, so even within one subgroup we may not see correct values.
Test case in https://gitlab.freedesktop.org/mesa/crucible/-/merge_requests/115
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17517 >
2022-07-20 09:22:06 +00:00
David Heidelberg
e3e43cebff
ci: wine-apitrace bump to 11.1
...
In the future, bump will be needed to update non-VK tags as wine traces get
used elsewhere.
Reviewed-by: Andres Gomez <agomez@igalia.com >
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17623 >
2022-07-20 08:35:01 +00:00