Turnip has to build/munge descriptors in a bunch of places. Extract out
helpers so we don't have to duplicate the gen8 vs earlier descriptor
format changes everywhere.
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39141>
The descriptor format changes in gen8, which is mostly abstracted by
the fdl helpers. But to utilize that we need to plumb the CHIP thru
12 layers for different ways of vk doing the same thing.
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39141>
DEPTH field is actually STRUCTSIZETEXELS. And for buffers the iova only
needs to be byte aligned, replacing STARTOFFSETTEXELS on a6xx/a7xx.
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39141>
Since commit e8c81652c9 ("vulkan/wsi/headless: do not destroy images
that are never created"), the CTS failure that prevents headless surface
from being advertised is already solved.
Re-advertise VK_EXT_headless_surface for pvr driver.
Running `dEQP-VK.wsi.headless.*` with VK CTS 1.4.5.0 results in no
failure on BXM-4-64 .
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39038>
It's allowed in the specification that a graphics pipeline being created
with either a render pass or a VkPipelineRenderingCreateInfo , in this
case the multiview mask should be set to 0. However, currently the code
in pvr_early_init_shader_data() tries to access RenderingCreateInfo w/o
checking for NULL, which leads to potential crash.
Set multiview to disabled if no RenderingCreateInfo is available.
This fixes crash of Vulkan CTS 1.4.4.0 / 1.4.5.0 test case
dEQP-VK.pipeline.monolithic.misc.no_rendering .
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39050>
Otherwise, issues like:
tessellator/tessellator.cpp:385:1:
note: declare 'static' if the function is not intended to be used
outside of this translation unit
385 | FXP floatToFixed(const float& input)
| ^
| static
are observed.
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
v3: add declaration for GetMSB since it's unused but desirable to keep
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39162>
When this flag is set, it gives a hint to KMD to skip some operations around
compressed buffers, like copying the auxiliary buffer to smem during eviction.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38425>
The sample mask test instructions were only being added if the sample
mask was an input or no other discard test was being done.
In the failing test cases, instructions to handle alpha to one and/or
alpha to coverage were being added and the program marked as having
a discard test. This would lead to the instructions for the sample
mask test to not be added.
The fix is to specifically check for whether the instructions for sample mask
have been added instead of check for any discard test.
Fix deqp:
dEQP-VK.pipeline.monolithic.extended_dynamic_state.after_pipelines.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.after_pipelines.single_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.before_draw.large_static_rasterization_samples_off
dEQP-VK.pipeline.monolithic.extended_dynamic_state.before_draw.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.before_draw.single_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.before_good_static.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.before_good_static.single_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.between_pipelines.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.between_pipelines.single_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.cmd_buffer_start.large_static_rasterization_samples_off
dEQP-VK.pipeline.monolithic.extended_dynamic_state.cmd_buffer_start.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.cmd_buffer_start.single_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.three_draws_dynamic.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.three_draws_dynamic.single_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.two_draws_dynamic.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.two_draws_dynamic.single_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.two_draws_static.multi_sample_sample_mask_disable
dEQP-VK.pipeline.monolithic.extended_dynamic_state.two_draws_static.single_sample_sample_mask_disable
Signed-off-by: Nick Hamilton <nick.hamilton@imgtec.com>
Tested-by: Icenowy Zheng <uwu@icenowy.me>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39040>
The implementation of this extension is part of the common Mesa WSI
code, and it's used by Zink without checking for the presence.
Advertise it for PowerVR open source driver.
With Headless WSI advertised, Tests in Vulkan CTS that is
incremental_present related can pass.
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39037>
fmin/fmax are not signed zero correct.
The name is taken from RDNA4's ISA, because the full IEEE name is a bit long.
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39137>
Otherwise we will have width of -1 later in null_fill_state_s.
Fixes: 2eb45daa9c ("gallium: de-pointerize pipe_surface")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38872>
In the case where we have a device that we want to choose after
probing, there is no point in asking the device select layer to do
any reordering at all.
This helps avoid a deadlock inside compositors where we don't need
device selection anyways.
Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38252>
There are cases like zink where we have a file descriptors we are searching
for devices for, so we don't need device selecting reordering, we just want
the fastest path to get the devices so we can match them.
This also helps avoid some cases of deadlock inside compositors where
zink/vulkan initialises later and tries to connect to the compositor.
This uses a VK_EXT_layer_setting to add a bypass setting.
Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38252>
Store the original HDC along with the HWND if we can get an HWND. If we
have the HWND, then the original HDC is basically useless, but if we don't,
we can use the HDC as a lookup key for the framebuffer.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39077>