Commit graph

165082 commits

Author SHA1 Message Date
Lionel Landwerlin
a28ff995bb anv: add missing workaround for 3DSTATE_LINE_STIPPLE
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25425>
2023-09-27 20:32:50 +00:00
Lionel Landwerlin
c59179e6bb anv/iris: widen Wa_14015946265 to Gfx11+
We missed out that ICL+ added a programming requiring a CS_STALL.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25426>
2023-09-27 19:56:24 +00:00
Connor Abbott
302907e347 tu: Expose VK_KHR_maintenance5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
b0f1cb8f31 freedreno/ci: Skip dEQP-VK.info.device_extensions
Copied from anv and radv.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
e7d4bc6095 tu: Add maintenance5 properties
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
a86f2132b3 tu: Check for DEVICE_LOST in vkGetEventStatus()
Required by maintenance5.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
b14a8dc2a7 tu: Support VkPipelineCreateFlags2CreateInfoKHR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
53dbfab87b tu: Use new buffer usage flags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
4fd12a18db tu: Implement vkGetRenderingAreaGranularityKHR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
2fb42fbd42 tu: Implement vkGetImageSubresourceLayout2KHR and vkGetDeviceImageSubresourceLayoutKHR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
53e518bcda tu: Implement vkCmdBindIndexBuffer2KHR
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
26a88fc062 tu: Allow VK_WHOLE_SIZE in tu_CmdBindVertexBuffers2EXT pSizes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
9669b48b4a tu/clear_blit: Allow VK_REMAINING_ARRAY_LAYERS as layerCount
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
b9f673e9d4 tu/clear_blit: Fix staging image view layer count
This seems to be a mistake that didn't affect anything.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
c2c39a47a6 freedreno/fdl: Support PIPE_FORMAT_R5G5B5A1_UNORM on a6xx
This is just a different swap of the same format.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
dd99b58aa8 tu: Support clearing A8_UNORM
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
60b1b18eb9 freedreno/fdl: Use A8_UNORM HW format for sampling
We've already been using this for 3d blits on turnip and it works fine.
There's no need to emulate it, and it won't work on turnip where we
can't swizzle the border colors.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Connor Abbott
08581e2e92 zink: Rework color clamping and conversion
Before this commit, zink_format_clamp_channel_color() ignored the format
swizzle, so it was assuming that for emulated formats like alpha,
alpha-luminance etc. that the color had already been swizzled to match
the internal format rather than the emulated one. It's somewhat confusing
that passing in e.g. A8_UNORM actually means R8_UNORM, and led to a bug
when using VK_FORMAT_A8_UNORM for texture border colors because we
didn't swizzle it back. It also wouldn't have worked for media formats
like R10X6G10X6 due to the void channel in the middle.

In order to fix this, we need to untangle the mess in its users.

For convert_color() used when clearing, this means we now need to clamp
and then swizzle instead of swizzle and then clamp, and we can drop the
hack for A8_UNORM.

For texture border colors, the state tracker duplicates colors for the
emulated formats to help drivers, which zink was previously relying on,
but fixing zink_format_clamp_channel_color() breaks this because it
assumes that those duplicated colors are useless and clamps them.
However, because we know the format we can just swizzle the border color
ourself, which convert_color() was already doing. So, we pull that out
into a common zink_convert_color() function that handles both clamping
and format emulation, and have both clearing and border color handling
use it.

This fixes A8_UNORM in turnip+zink once we enable it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25001>
2023-09-27 19:07:22 +00:00
Erico Nunes
e3e64e3dbe v3dv: allow headless device without display device
When trying to create a headless Vulkan instance without a display
device available, device enumeration would fail.
Part of the physical device creation code already accounts for a missing
display device, allow device enumeration to continue in that case too so
headless instances can be created.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25313>
2023-09-27 18:46:31 +00:00
Matt Coster
22bca4a14f pvr: Force compile error on GNU void pointer arithmetic
This GNU extension caused a bug where a void pointer was modified then
interpreted as uint32_t* (instead of the other way round). Force a
compile error to (hopefully) prevent this from happening again.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25327>
2023-09-27 15:25:32 +00:00
Matt Coster
140b3e1f8f pvr: Don't rely on GNU void pointer arithmetic
Besides being not standard C, one instance (in pvr_cmd_buffer.c) was a
bug caused by adding-then-casting, which would likely have been caught
if void pointer arithmetic were not allowed.

All instances detected by -Wpointer-arith have been fixed here.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25327>
2023-09-27 15:25:32 +00:00
Georg Lehmann
b91616e800 aco: implement 64bit div find_lsb
This can be selected for divergent subgroupBallotFindLSB.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25407>
2023-09-27 14:47:42 +00:00
Georg Lehmann
4ea611bca0 aco: fix p_extract with v1 dst and s1 operand
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: f14023666c ("aco: Allow p_extract to have different definition and operand sizes.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25403>
2023-09-27 14:12:29 +00:00
Rhys Perry
ae9a476c42 aco/waitcnt: add print helpers
These may be useful in the future.

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/25373>
2023-09-27 13:43:11 +00:00
Rhys Perry
0d0a8c4365 aco/waitcnt: replace wait_cnt::*_cnt with booleans
Previously, a loop could be revisited until a counter reaches it's
maximum:
loop {
   store()
}
Each visit of that loop would increase vs_cnt until it reaches max.

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/25373>
2023-09-27 13:43:11 +00:00
Karol Herbst
0288cb0a0c zink: lower vec8/16
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25330>
2023-09-27 11:54:13 +00:00
Karol Herbst
807ff7ed01 nir: add nir_lower_alu_vec8_16_srcs pass
This pass is useful for vector based backends as we might end up with alu
instructions referencing vec8/vec16 values even though being vec4 or
smaller themselves.

This new pass intents to clean up any use of vec8/vec16 sources other
passes won't.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25330>
2023-09-27 11:54:13 +00:00
Jose Maria Casanova Crespo
284ab9af99 vc4: Fix mask RGBA validation at YUV blit
Solves regression on video players using GPU for
video decoding that just displays the video in green.

Fixes: d13da7782c ("vc4: call blit paths in chain")
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25412>
2023-09-27 12:14:01 +02:00
Tapani Pälli
09cbced0a3 iris: use intel_needs_workaround for Wa_14014414195 part 2
Commit 3ec953ed75 left couple of extra things, these changes are
based on a patch from Francisco Jerez.

Signed-off-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/25306>
2023-09-27 06:57:26 +00:00
Caio Oliveira
c487ba26ca intel/compiler: Don't store stage name and abbrev
Those are used in the failure paths and are easily retriavable from the
stage itself, so no need to store them.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25367>
2023-09-26 18:12:53 -07:00
Dave Airlie
8791aab20f llvmpipe: reset viewport_index_slot in fb bind
I hit a problem running a set of lvp caselists with
dEQP-VK.transform_feedback.simple.draw_indirect_endqueryindexed_streamid_0_16,Crash

This was crashing due to
 assert(setup->viewport_index_slot < 0);
in try_update_scene_state

This was because a previous draw had set viewport index slot to 2,
but a clear then draw sequence never resets it, so the clear gets
a scene, and when the subsequent flush happens for that scene,
the viewport_index_slot is never updated. It only gets updated on
draws.

This just resets it as lp_setup_update_state will always pick up
the correct one for the next draw.

Cc: mesa-stable
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25387>
2023-09-27 08:25:28 +10:00
Karol Herbst
5b233d5184 rusticl/mesa/context: fix clear_sampler_views
Even though drivers are required by documentation to handle the samplers
being NULL, st/mesa changed enough so it always sets the pointer.

As being similiar to st/mesa is more important than following docs, we
simply mimic st/mesa here and meet the expectations of drivers.

In the future we want to track the set state similiar to st/mesa, so
`clear_sampler_views` will probably go away and we'll just update what
we'll need.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25363>
2023-09-26 21:57:44 +00:00
Charmaine Lee
25c771a778 svga: sync resource content from backing resource before image upload
When a backing resource is created for a render target view when the
same resource is currently bound to a shader resource view, the content
update back to the original resource happens when the associated render
target view is unbound. But state update only happens at clear or draw
time. So if TexSubImage happens after BindFrameBuffer and before Draw,
the original texture resource that is mapped to for subimage update
would not have been updated. As a matter of fact at the subsequent state
update at the next draw, the render target views will be updated, the
content from the previous backing resource will be propogated to the
original resource, hence overwriting the changes from the last TexSubImage.

To fix the problem, this patch validates the texture resource, updates
any pending changes from the backing resource before transfer map upload
occurs.

Fixes the rendering issue demonstrated from the fbo_texsubimage_update trace

Reviewed-by: Martin Krastev <krastevm@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25386>
2023-09-26 21:38:01 +00:00
Italo Nicola
83c76cceaf panfrost: advertise YUV formats for valhall
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24479>
2023-09-26 21:13:51 +00:00
Italo Nicola
3db786c006 panfrost: use centered YUV chroma siting
This is likely a more reasonable default than co-sited samples, and will be
needed for valhall.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24479>
2023-09-26 21:13:51 +00:00
Italo Nicola
144f9324a3 panfrost: prepare v9+ to support YUV sampling
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24479>
2023-09-26 21:13:51 +00:00
Italo Nicola
9d7ca56115 panfrost: rename _needs_multiplanar_descriptor to _is_yuv
This is only really used to condition on YUV formats, even on v7, but
moreso now on v9+.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24479>
2023-09-26 21:13:50 +00:00
Italo Nicola
b134a4fa43 pan/genxml: add Width/Height fields to v9+ Plane descriptor
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24479>
2023-09-26 21:13:50 +00:00
Dave Airlie
3e6938696a llvmpipe/fs: fix regression in sample mask handling from tgsi removal.
This got the bits the wrong way,
dEQP-VK.rasterization.frag_side_effects.color_at_beginning.sample_mask_after

Fixes: a63c2daf7a ("llvmpipe/fs: start using nir info in some places.")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25396>
2023-09-26 20:15:22 +00:00
Konrad Dybcio
b1e851d66c freedreno: Add Adreno 643
Just another funny speedbin of A635

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25408>
2023-09-26 19:18:12 +00:00
Konrad Dybcio
b4d111ab6c freedreno: Include speedbin fallback in 690 chipid to fix probing
The kernel exposes CHIP_ID, which consists of:

[63:48] const 0 / reserved
[47:32] speedbin (default 0xffff)
[31:0 ] actual gpu chip ID

Fix the 690 chip id to make it probe correctly.
Keep the existing entry for the downstream KGSL driver.

This is essentially the same as Commit 6067aba9e6 ("freedreno: Include
speedbin fallback in 740 chipid to fix probing"), except for the older
core.

Fixes: 210c6c11cc ("freedreno+tu: Add a690 support")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25408>
2023-09-26 19:18:12 +00:00
Karol Herbst
2a90ee1693 meson/rusticl: add sha1_h
This ensures this file is generated.

Fixes: 20c90fed5a ("rusticl: added")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25400>
2023-09-26 15:16:33 +00:00
Martin Roukala (né Peres)
07e3eb061a radv/ci/vkcts-navi10: catch all the line-related flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25395>
2023-09-26 13:39:52 +00:00
Martin Roukala (né Peres)
31f852048c radv/ci/vkcts-navi21: document more flakes
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25395>
2023-09-26 13:39:52 +00:00
Martin Roukala (né Peres)
593666182a radv/ci/vkcts-navi21: catch all the line_stipple_(enable|params) flakes
There are so many of these tests, so let's just write a regular
expression to catch them all.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25395>
2023-09-26 13:39:52 +00:00
David Rosca
f7083ae94b gallium/auxiliary/vl: Only map the shader constants buffer in render
Don't map the buffer in vl_compositor_set_csc_matrix.
This avoids mapping the buffer twice with compute shaders.

Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25258>
2023-09-26 13:03:46 +00:00
David Rosca
40487b8e14 gallium/auxiliary/vl: Fix YUV to RGB bob compute shader deinterlacing
This reverts commit ef0d92459c and instead removes the y coordinate
divide by two in weave shaders. The scale ratio now works correctly
with interlaced input.

Also remove the YUV to YUV bob shader and reuse the progressive shader
for bob deinterlacing, same as in YUV to RGB case (video_buffer shader).

Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25258>
2023-09-26 13:03:46 +00:00
David Rosca
09578e141c gallium/auxiliary/vl: Use chroma offset in YUV to RGB weave compute shader
Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25258>
2023-09-26 13:03:46 +00:00
David Rosca
d3d577b768 gallium/auxiliary/vl: Add RGB to YUV compute shader
Compared to fragment shader that was being used before, it supports
chroma location and fixes wrong color at right/bottom edge when scaling.

Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25258>
2023-09-26 13:03:45 +00:00
Corentin Noël
0456f5bad1 mesa: Ensure that the baselevel will never exceed the maximal supported number
GL_TEXTURE_BASE_LEVEL is only supported up to MAX_TEXTURE_LEVELS

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25332>
2023-09-26 08:24:04 +00:00