Commit Graph

171882 Commits

Author SHA1 Message Date
Eric Engestrom
b61c9cde91 docs: document clang-format and how to use it
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23269>
2023-05-29 11:57:08 +00:00
Eric Engestrom
3ea2c1cb32 ci: use meson to run clang-format
This will allow us to easily exclude vendored code when we enforce the
formatting of more components later on.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23269>
2023-05-29 11:57:08 +00:00
Eric Engestrom
2f78ec7d37 meson: enable the clang-format target
.clang-format needs to exist in the root of the project for the target
to be generated, but since we don't have a global config it's a dummy,
empty file.

.clang-format-include lists the files (files! not folders) that are to
be formatted.

.clang-format-ignore lists the files to exclude, even if they are in the
include list above. Useful for vendored code for instance.

See https://mesonbuild.com/Code-formatting.html

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23269>
2023-05-29 11:57:08 +00:00
Eric Engestrom
059ee4ff8d ci: color the diff for clang-format
Suggested-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23269>
2023-05-29 11:57:08 +00:00
Eric Engestrom
6364511837 ci/zink+radv: document recent regressions
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23274>
2023-05-29 09:30:49 +00:00
Eric Engestrom
14adc62ef2 ci/zink+radv: mark all spec@arb_copy_image@arb_copy_image-targets* as flaky after getting a bunch more of them
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23274>
2023-05-29 09:30:49 +00:00
Eric Engestrom
950cd75dda ci/zink+radv: fix flakes definition
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23274>
2023-05-29 09:30:49 +00:00
Juan A. Suarez Romero
75d59df41f v3d/v3dv/ci: adjust job fractions
So far we have 12 jobs for v3d-gl (OpenGL/ES and piglit), 1 job for
v3d-traces, and 10 jobs for v3dv-vulkan, but we only have 21 rpi4
devices for testing.

So let's reduce from 12 to 10 jobs in v3d-gl, so all jobs can run
simultaneously.

Also, as the ideal goal is that each job doesn't take more than 15
minutes, let's increase a little bit the fraction for v3dv, and include
a fraction for v3d-gl as well, so all jobs are ideally under the time
limit.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23285>
2023-05-29 09:11:27 +00:00
Samuel Pitoiset
efc807aac4 radv/ci: skip tests that timeout since Vulkan loader 1.3
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23261>
2023-05-29 08:46:04 +00:00
Samuel Pitoiset
bf9699a768 radv/ci: update list of expected failures since Vulkan loader 1.3
Updating Debian to 12 also updated Vulkan loader 1.3 and these are
fixed now.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23261>
2023-05-29 08:46:04 +00:00
Juan A. Suarez Romero
ceb923bc2a vc4: add specific stencil blit path
This implementation reinterprets the stencil data as a RGBA8888 texture.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23136>
2023-05-29 08:21:39 +00:00
Juan A. Suarez Romero
2232320fe9 vc4: allow tile-based blit for Z/S
Besides blitting color-based buffer, we can use the tile buffers to blit
also depth and stencil buffers.

This also fixes several piglit tests.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23136>
2023-05-29 08:21:39 +00:00
Juan A. Suarez Romero
d13da7782c vc4: call blit paths in chain
Let each of the different blit paths to decide if they need to do the
blit operation based on the blit mask, and update the mask once the
operation is done.

This allows to call all the different versions without needing to check
if they success or not.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23136>
2023-05-29 08:21:39 +00:00
Juan A. Suarez Romero
5b3c61db65 vc4: set blit mask correctly
Drivers expect either color or stencil/depth blit to be done, but not
both at the same time.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23136>
2023-05-29 08:21:39 +00:00
Juan A. Suarez Romero
8fb16b8814 v3d: enable NIR compact arrays
Now that it is exposing GLSL 1.30, and we can read clipdistance arrays
in the fragment shader, let's enable this capability.

It fixes
`spec@glsl-1.30@execution@clipping@fs-clip-distance-interpolated,Crash`.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23232>
2023-05-29 07:52:11 +00:00
Samuel Pitoiset
55df7b6415 radv: rework configuring VGT_SHADER_STAGES_EN
For shader objects.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22991>
2023-05-29 07:27:11 +00:00
Tatsuyuki Ishi
978d80fbe2 radv: Make shader related destruction happen before hw_ctx.
radv_destroy_shader_upload_queue waits for a semaphore, which will in turn
call query_reset_status on hw_ctx that will fail due to being already
destroyed.

Fix radv/amdgpu: amdgpu_cs_query_reset_state2 failed. (-9) spam in the logs
with RADV_PERFTEST=dmashaders.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23276>
2023-05-29 06:53:05 +00:00
Samuel Pitoiset
01bd012edd amd: fix 64-bit integer color image clears
Fixes recent CTS dEQP-VK.api.image_clearing.*r64* since the Vulkan
specification has been clarified.

Only VK_FORMAT_R64_{UINT,SINT} are supported.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23250>
2023-05-29 07:54:38 +02:00
Víctor Manuel Jáquez Leal
0e886a93ce vulkan: complete the usage flags for video layouts
Otherwise Vulkan decoding with FFmpeg crashes on anv.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23184>
2023-05-29 02:59:05 +00:00
Francisco Jerez
9c26a6b3bb anv: Fix calculation of guardband clipping region.
The existing guardband region calculation was mixing up x/y_min with
x/y_max in cmd_buffer_emit_viewport(), causing the calculated viewport
area to always be an empty region.  Luckily intel_calculate_guardband_size()
returns a non-empty but bogus guardband region in that case, so this
doesn't seem to have led to conformance regressions, but the
off-center guardbands could potentially impact performance in
geometry-heavy rendering.

Fixes: 893fa30afe ("anv: Include scissors in viewport calculations")
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/23174>
2023-05-28 15:43:29 -07:00
David Heidelberg
744e9cb213 gitlab: add template for merge requests
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22078>
2023-05-28 15:26:53 +02:00
David Heidelberg
b3b883ca00 bin/ci: mention requirements.txt
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22078>
2023-05-28 15:19:42 +02:00
Christopher Snowhill
92a7cba4f2 intel: Sync xe_drm.h
My second attempt at a minimally invasive reshuffle of the uAPI,
this time only forcibly aligning structures to 32-bits or 64-bits
depending on the members which follow, so that 64-bit userspace
is identical to the current unmerged kernel module, and the 32-bit
compat userspace aligns with that, and functions rather than
crashing.

Should work just fine with the current drm-xe-next Git tree, which
is rebased on 6.3.0-1, with a few extra changes, as of this commit.

Based on commit 2cd469458fcc24c5f345ad39721a1aedaf70ec0f ("drm/xe: Add explicit padding to uAPI definition")

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22652>
2023-05-27 03:56:18 +00:00
Marek Olšák
264cf37348 radeonsi: re-enable fp16_rtz for compute blits to fix PBO tests on gfx11
Fixes: bcdde99675 - radeonsi: don't convert to fp16 in the compute blit if not testing

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:59 -04:00
Marek Olšák
cc199c2baa radeonsi: update test results and flakes
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:59 -04:00
Marek Olšák
c5806422a5 radeonsi: reduce the supported compute grid size
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:59 -04:00
Marek Olšák
ebb784f268 radeonsi/gfx11: use DISABLE_FOR_AUTO_INDEX to disable non-indexed prim restart
DISABLE_FOR_AUTO_INDEX disables primitive restart for non-indexed draws.
We set it in the preamble first, so that non-indexed draws can completely
ignore the primitive restart state.

There is a little bit of duplication that's needed to enclose the primitive
restart code in "if (index_size)" for indexed draws.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:59 -04:00
Marek Olšák
1f90a2be60 radeonsi: move emitting draws states out of si_emit_all_states
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:59 -04:00
Marek Olšák
9d7eab2ab1 radeonsi: don't enable WGP_MODE because of high cost of workgroup mem coherency
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:59 -04:00
Marek Olšák
038fb6573a radeonsi: remove the gl_SampleMask FS output if MSAA is disabled
It's better to remove the output than what the previous code did,
which only unset MASK_EXPORT_ENABLE.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:59 -04:00
Marek Olšák
7b95be3575 radeonsi: cosmetic changes in si_shader.h
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:59 -04:00
Marek Olšák
b914c2601c radeonsi: reorder code in si_texture_create_object as preparation for the future
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:59 -04:00
Marek Olšák
dcbe4b89ea radeonsi/gfx11: fix alpha-to-coverage with blending
Bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8222

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:59 -04:00
Marek Olšák
2f6665efc5 ac/llvm: use LLVM 0/1 constants from ac_llvm_context instead of LLVMConstInt
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:59 -04:00
Marek Olšák
39da12b7c7 ac/llvm: clean up visit_load_local_invocation_index and visit_load_subgroup_id
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:59 -04:00
Marek Olšák
1dd2fa01c7 ac/llvm: clean up translation of nir_intrinsic_load_invocation_id
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:59 -04:00
Marek Olšák
ea7c89d1f5 ac/surface: move determing ADDR_FMT_* into a helper function
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:59 -04:00
Marek Olšák
78d5626d17 ac/surface: move CB format translation helpers here
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:27:50 -04:00
Marek Olšák
8642740aef ac/gpu_info: give has_msaa_sample_loc_bug a more accurate name
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216>
2023-05-26 23:17:40 -04:00
Jesse Natalie
587ad3430d ci/windows: Update WARP to 1.0.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23267>
2023-05-26 22:50:50 +00:00
Jesse Natalie
0373b02cf6 dxil: Don't run opt_remove_phis before lower_returns
nir_lower_returns will run nir_opt_remove_phis as part of its work

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22913>
2023-05-26 18:31:30 +00:00
Jesse Natalie
cc136cacfa radv: Don't run opt_remove_phis before lower_returns
nir_lower_returns will run nir_opt_remove_phis as part of its work

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22913>
2023-05-26 18:31:30 +00:00
Jesse Natalie
505b81b8c1 nir: Add undef phi srcs when adding successors
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22913>
2023-05-26 18:31:30 +00:00
Jesse Natalie
5d238c0c2c nir_lower_returns: Optimize phis before beginning the pass
This adds a little extra work, since now dominance is computed and
blocks that don't just have then-return or else-return are looked at.
However it means that nir_lower_returns can now keep phis up to date
by inserting undefs without causing some phis to become non-trivial.

This ends up obviating a couple of tests for lower_returns.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22913>
2023-05-26 18:31:30 +00:00
Eric Engestrom
a1b27c364f panfrost: rename *.cc files to *.cpp
This extension caused them to be missed by clang-format.

Suggested-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23264>
2023-05-26 18:07:38 +01:00
Eric Engestrom
63c3768cf3 panfrost: fix formatting of a couple of files that were missed
Signed-off-by: Eric Engestrom <eric@igalia.com>
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23264>
2023-05-26 18:07:36 +01:00
Eric Engestrom
480204aeed ci: show diff when clang-format check fails
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23258>
2023-05-26 16:04:57 +00:00
Eric Engestrom
648b5f3070 ci: split clang-format list of folders for easier maintenance
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23258>
2023-05-26 16:04:57 +00:00
Mykhailo Skorokhodov
564562eb05 mesa: Implement GL_CLEAR_TEXTURE flag
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7455
Signed-off-by: Mykhailo Skorokhodov <mykhailo.skorokhodov@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21682>
2023-05-26 15:13:54 +00:00
Eric Engestrom
d240a630e7 wsi/display: drop unused parameters from local functions
These are all local functions, so it's trivial to add back any parameter
should they become useful.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20566>
2023-05-26 14:34:17 +00:00