Commit graph

149838 commits

Author SHA1 Message Date
David Heidelberg
b16df310fd ci/zink: rename zink job to zink-lvp to better describe it
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19321>
2022-10-27 10:32:07 +00:00
Daniel Schürmann
c80137fcba radv/rt: overwrite hit args with undef in case of a miss
This helps some variable coalescing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19188>
2022-10-27 09:45:39 +00:00
Daniel Schürmann
f4270b7659 radv/rt: create traversal shader independent from main shader
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19188>
2022-10-27 09:45:39 +00:00
Daniel Schürmann
22534e0d1a nir: add AMD RT traversal intrinsics
These I/O intrinsics help to create an enclosed traversal shader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19188>
2022-10-27 09:45:39 +00:00
Jordan Justen
c238699afa intel/compiler: Broadcast lower code should check 64-bit int support
This will affect MTL which will have fp64 support without int64
support.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Iván Briano <ivan.briano@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19284>
2022-10-27 09:22:09 +00:00
Lionel Landwerlin
2da7ec0db9 intel/clc: assert when libclc shader is not found
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7483
Reviewed-by: Luis Felipe Strano Moraes <luis.strano@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19091>
2022-10-27 08:53:55 +00:00
Iago Toral Quiroga
24d9a80247 v3dv: implement VK_EXT_pipeline_robustness
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18883>
2022-10-27 08:17:11 +00:00
Iago Toral Quiroga
9deef4cde6 vulkan/runtime: include robustness info when hashing a shader stage
Suggested by Jason Ekstrand.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18883>
2022-10-27 08:17:11 +00:00
Iago Toral Quiroga
c3641f413a broadcom/compiler: trivial code clean-up
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18883>
2022-10-27 08:17:11 +00:00
Iago Toral Quiroga
86503aaba4 v3dv: use enabled features from vk_device
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18883>
2022-10-27 08:17:11 +00:00
Iago Toral Quiroga
1a2ca58aed v3dv: use NIR_PASS with v3d_nir_lower_robust_image_access
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18883>
2022-10-27 08:17:11 +00:00
Qiang Yu
bfb6a5fef1 ac/nir/ngg: add one odd dword to nogs culling pervertex lds
radeonsi use like this.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18832>
2022-10-27 07:35:01 +00:00
Qiang Yu
13fb7f8f2c ac/nir/ngg,ac/llvm,aco: save nogs ngg culling one lds dword
TES rel patch id is <256, so we can use an existing unused LDS
byte instead of extra dword.

To ease the programing, change the index of repacked_arg_vars
for these variables.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18832>
2022-10-27 07:35:01 +00:00
Qiang Yu
66d1fa9666 ac/nir/ngg: save and restore no_varying/no_sysval_output
These are used by radeonsi for param export count, should
be saved and restore.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18832>
2022-10-27 07:35:01 +00:00
Qiang Yu
b197dd0d15 ac/nir/ngg: allow passthrough with vs primitive id output
vertex primtive id and passthrough are not exclusive, just need
to get correct vertex index when passthrough.

radeonsi won't disable passthrough when vs primitive id output,
this is also for fixing the crash of the assertion.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18832>
2022-10-27 07:35:01 +00:00
Qiang Yu
e536d0fe4b ac/nir/ngg,radv: move LDS layout calculation out of nir ngg lowering
Use lds base load intrinsics in nir ngg lowering to get layout, left
its calulation to driver.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18832>
2022-10-27 07:35:01 +00:00
Qiang Yu
3d6cce2e4c nir: add two amd ngg lds base load intrinsics
These two values are not known when compile for radeonsi.
They are relocated when link/upload time.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18832>
2022-10-27 07:35:01 +00:00
Qiang Yu
54eea0e393 ac/nir/ngg: pass primitive_id_location as param for nogs lower
radeonsi need to use packed driver location for all outputs,
while radv need to use VARYING_SLOT_*. To meet both drivers'
needs.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18832>
2022-10-27 07:35:01 +00:00
Qiang Yu
d82b668bc6 ac/nir/ngg: support user edge flags for ngg lower
Pack user edge flag into arg code is ported from radeonsi
gfx10_ngg_build_export_prim.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18832>
2022-10-27 07:35:01 +00:00
Qiang Yu
238eeeacb2 ac/llvm: get back intrinsics used by NGG
Will be used by radeonsi.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18832>
2022-10-27 07:35:01 +00:00
Brian Paul
650597a770 glx: clean-ups in drisw_glx.c
Replace tabs with spaces.  Fix up function pointer calls (don't use
the old style (*foo)(arg) syntax).

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19329>
2022-10-27 03:26:08 +00:00
Brian Paul
421777dd3a glx: clean-ups in create_context.c
Replace tabs w/ spaces, remove trailing whitespace.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19329>
2022-10-27 03:26:08 +00:00
Brian Paul
33944867ae frontends/dri: clean-ups in dri_util.c
Replace tabs with spaces.  Rename __ATTRIB macro to SIMPLE_CASE to
be a bit more readable.

NFC.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19329>
2022-10-27 03:26:08 +00:00
Brian Paul
05a4202dac frontend/dri: assorted clean-ups in dri-screen.c
Replace tabs with spaces, fix indentation.
Move 'format' var decl and type (it's an integer array index, not
actually a mesa format).

NFC.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19329>
2022-10-27 03:26:08 +00:00
Yusuf Khan
d9a257b339 nv50/ir: nir_op_b2i8 and nir_op_b2i16
Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19256>
2022-10-27 02:16:24 +00:00
Yiwei Zhang
a408f5cafe venus: add VK_EXT_depth_clip_control support
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19285>
2022-10-27 00:22:30 +00:00
Yiwei Zhang
8f7b5bf34b venus: add VK_EXT_primitives_generated_query support
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19285>
2022-10-27 00:22:30 +00:00
Yiwei Zhang
4f22fb117d venus: sync to latest venus protocol headers
This brings in:
- VK_KHR_push_descriptor
- VK_EXT_depth_clip_control
- VK_EXT_primitives_generated_query

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19285>
2022-10-27 00:22:30 +00:00
Yiwei Zhang
4f2471e8c6 venus: handle VkAndroidHardwareBufferFormatProperties2ANDROID
Fixes: 4d80ccbf2d ("venus: Enable VK_KHR_format_feature_flags2")

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19287>
2022-10-27 00:08:00 +00:00
Yiwei Zhang
1c010da083 venus: remove redundant codes
This is some left over from prior 1.3 effort.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19287>
2022-10-27 00:08:00 +00:00
Dave Airlie
6a29cb2654 nir/lower_bool_to_int32: add support for lowering functions.
Change the function parameters to 32-bit.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19291>
2022-10-26 21:47:29 +00:00
Lionel Landwerlin
117b32a594 nir/divergence_analysis: add missing desc_set_address_intel
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19320>
2022-10-26 21:09:20 +00:00
Lionel Landwerlin
edda5731c0 nir/divergence_analysis: add some missing RT intrinsics
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19320>
2022-10-26 21:09:20 +00:00
Lionel Landwerlin
db42ed1e04 vulkan/wsi/wl: correctly find whether the compositor uses the same GPU
Using the wl_drm protocol we can check whether the compositor uses the
same GPU as the application.

This allows to run vulkan applications using a DG2 GPU with the
compositor using another card.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19224>
2022-10-26 20:34:15 +00:00
Lionel Landwerlin
93dbd14ed7 anv: init major/minor before WSI
So that we can provide that information to WSI if it asks for it
immediately.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19224>
2022-10-26 20:34:15 +00:00
Lionel Landwerlin
324d945589 anv: disable mesh in memcpy
We can't have streamout and mesh enabled at the same time.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ef04caea9b ("anv: Implement Mesh Shading pipeline")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19323>
2022-10-26 19:55:11 +00:00
Christophe
2ea481b2f0 Zink: add Zink profiles file
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19192>
2022-10-26 19:02:20 +00:00
Mike Blumenkrantz
8dd314d203 zink: handle broken resource mapping deadlocks
some apps (most notably Wolfenstein: The New Order) have broken multi-context
buffer usage in which one context will attempt to write to a buffer while
another context holds unflushed usage, and the unflushed context will never
flush until the buffer write completes

it's impossible to handle this scenario correctly without deadlocking,
so add some handling to try waiting and then yolo the buffer write if
a deadlock would occur

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19141>
2022-10-26 18:29:16 +00:00
Jason Ekstrand
5e05d98848 nir: Unconditionally call nir_trim_vector in nir_lower_readonly_images_to_tex
It will already short-circuit if the number of components matches.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19301>
2022-10-26 17:11:44 +00:00
Jason Ekstrand
d9cf6de4a8 nir: Misc. style fixes to nir_lower_readonly_images_to_tex
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19301>
2022-10-26 17:11:44 +00:00
Jason Ekstrand
b684a603f1 nir: Use nir_shader_instructions_pass in nir_lower_readonly_images_to_tex
nir_shader_lower_instructions is overkill and this makes the pass
generally easier to understand.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19301>
2022-10-26 17:11:44 +00:00
Jason Ekstrand
a3c3d0d287 nir: Reformat a comment
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19301>
2022-10-26 17:11:44 +00:00
Lucas Stach
16e0702ec7 etnaviv: properly reference flush_resources
The flush_resources recorded in the context need to stay alive until
the context is flushed, at which point additional resolve operations
are done to those resources. While the backing BO is alive due to being
referenced in the cmdstream, the resource might already be destroyed
at this point.

Keep a reference to the resource to make sure it is still available at
context flush time.

Fixes: 7b9d8d1936 ("etnaviv: flush used render buffers on context flush when neccessary")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19280>
2022-10-26 17:03:05 +00:00
Michel Dänzer
20b9eece6e winsys/amdgpu: Set RADEON_FLAG_32BIT again
Avoids hang running

 rendercheck -t cacomposite -f a8r8g8b8

via glamor on Navi 14.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7167
Fixes: 7833c5139a ("winsys/amdgpu: use cached GTT for command buffers and don't set the 32BIT flag")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19276>
2022-10-26 16:46:14 +00:00
SoroushIMG
d50db14023 zink: limit gl_Layer clamping to drivers that need it
So far, only IMG drivers cannot handle out of bounds layer values.
Ideally, a vulkan extension will be drafted to detail this behavior.
But for now if KHR-GL46.texture_cube_map_array.color_depth_attachments
fails, then needs_sanitised_layer is probably needed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19163>
2022-10-26 16:36:19 +01:00
SoroushIMG
2562c9c5c6 zink: clamp gl_Layer output to 0, if framebuffer is not layered
GL spec forces driver to ignore gl_Layer, if layered rendering
is not enabled.
Since vulkan doesn't have the same bavior, emulate this by forcing
gl_Layer to 0, based on driver internal state.
This was seen as failure in
KHR-GL46.texture_cube_map_array.color_depth_attachments

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19163>
2022-10-26 16:23:51 +01:00
SoroushIMG
72d18325dd zink: add new framebuffer_is_layered state
This state is needed to make sure gl_Layer values are set to 0,
when the framebuffer is not layered accorfing to GL spec.
Specifically Section 9.8 Layered Framebuffers of GL46 spec:
A layer number written by a geometry shader has no effect if
the framebuffer is not layered.

Vulkan has no carve out for this, so zink must handle this by
sanitising gl_Layer (next commit in the series).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19163>
2022-10-26 16:23:51 +01:00
SoroushIMG
fd89690795 zink: add pushconst only pipeline layout
Now that all gfx pipelines share the same push constant layout,
create a screen wide push const only layout that is compatible
with all future programs.
This layout will be used to update push constant values, so that
the update can happen at any point before draw call.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19163>
2022-10-26 16:23:51 +01:00
SoroushIMG
a0c6286485 zink: cleanup zink_pipeline_layout_create
move the hashing to the caller, since it's not related to this.
Additionally, remove dependance on zink_program argument.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19163>
2022-10-26 16:23:45 +01:00
SoroushIMG
0f070923e8 zink: use unified pushconst layour for passthorugh tcs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19163>
2022-10-26 15:42:42 +01:00