Commit graph

190422 commits

Author SHA1 Message Date
Marcin Ślusarz
1fa343c38b intel/genxml/xe2: update MESH_CONTROL
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29617>
2024-06-10 15:21:34 +00:00
Alyssa Rosenzweig
ba20cc1c72 mesa: fix duplicate initializer
fixes warning with clang:

../src/mesa/main/spirv_capabilities.c:98:45: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
   98 |       .TransformFeedback                  = gl_exts->ARB_transform_feedback3,
      |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/mesa/main/spirv_capabilities.c:72:45: note: previous initialization is here
   72 |       .TransformFeedback                  = true,

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29613>
2024-06-10 14:19:02 +00:00
Lionel Landwerlin
e6efe2e3fe anv: support setting CFE_STATE::StackIDControl per application
This is a performance tuning value, recommended value is 512 on DG2.
On DG2 this was in the privileged register RT_CTRL.

Minor CFE_STATE defintion fixes from Jose.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29616>
2024-06-10 14:08:03 +00:00
José Roberto de Souza
62a25f0649 anv/xe2: Add STATE_COMPUTE_MODE individual masks
So we can enable each mask individually when programming registers.
Also setting Mask2/mask of the second double word so all registers in
it are also zeored during state init.

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/29616>
2024-06-10 14:08:03 +00:00
José Roberto de Souza
a472d415bc anv/xe2: Enable compute walker and BTD thread preemption
GFX versions older than GFX 20 have 'Thread Preemption disable' while
GFX 20 has 'Thread Preemption' with value flipped in compute walker
instruction.
So here by default enabling thread preemption, only disabling it
when BTD mode is enabled as instructed in Wa_14017794102.

Similar for 3DSTATE_BTD, enabling preemption by default and
only disabling when platform is affected by Wa_14017794102.

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/29616>
2024-06-10 14:08:02 +00:00
José Roberto de Souza
6e03ddd95d intel/genxml/gfx20: Sync POSTSYNC_DATA struct with spec
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/29616>
2024-06-10 14:08:02 +00:00
Alejandro Piñeiro
f017beb29c v3dv/pipeline: ensure vk_graphics_pipeline_all_state alive when still needed
Right now we have a statically allocated vk_graphics_pipeline_state,
that we declare at pipeline_init, and fill at
pipeline_init_dynamic_state. This one can be static as right now it is
only needed during pipeline_init lifetime.

But to fill it, we need a vk_graphics_pipeline_all_state structure,
that right now we declare at pipeline_init_dynamic_state. But that one
become part of that vk_graphics_pipeline_state, so still needed at
pipeline_init.

This was detected when trying to refactor the code to use the
pipeline_state later on, but it raises an "invalid read" error using
valgrind with the current code. It is surprising that didn't cause any
problem.

Fixes: f2236065b7 ("v3dv: port dynamic state tracking to use Mesa Vulkan")
Cc: mesa-stable

Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29603>
2024-06-10 13:47:50 +00:00
Ruijing Dong
8cd53d95fe radesonsi/vcn: update vcn4 tile processing logic
Vcn4 tile number calculation doesn't consider
some input case, which could result in output
bitstream corruption, this fixed the issue.

Not using the number_of_tiles directly but from
calculation. Also change to re-use some macros
from local vcn_5_0.c to ac_vcn_enc.h header file.

Updated vcn4 spec_misc_av1 ip package.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29556>
2024-06-10 13:12:20 +00:00
Ruijing Dong
53f6cf29e9 radeonsi/vcn: remove tile_config_flag
The tile config structure will be used in vcn4 as well.

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29556>
2024-06-10 13:12:20 +00:00
David Rosca
0d21aa4a08 frontends/va: Fix crash in vaRenderPicture when decoder is NULL
Fixes: d1b794685f ("frontends/va: Send all bitstream buffers to driver at once")
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29599>
2024-06-10 12:58:18 +00:00
Sergi Blanch Torne
6cde457ab6 ci: disable Collabora's farm due to runners maintenance
The downtime should be small, as this would only mean to stop/start services.
After some test, the reenable (revert this commit) will serve as final
verification.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29647>
2024-06-10 14:03:09 +02:00
Eric Engestrom
86ee97801b egl/device: drop unnecessary intermediate variable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29459>
2024-06-10 10:51:57 +00:00
Eric Engestrom
0c58e8b893 egl: ensure future platforms get their teardown implemented
surfaceless & device platforms don't need anything special here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29459>
2024-06-10 10:51:57 +00:00
Eric Engestrom
20cae414ed egl: move android-specific code into an android branch
Android is almost never compiled at the same time as another platform so
it doesn't change anything, but having that android branch is desirable
by the end of this series anyway, so let's do this :P

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29459>
2024-06-10 10:51:57 +00:00
Eric Engestrom
54dd83e736 egl: fix teardown when using xcb
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29459>
2024-06-10 10:51:57 +00:00
Eric Engestrom
99af53c6fd driconf: drop param for setting default gpu vendor id in DRI_CONF_FORCE_VK_VENDOR()
The macro was ignoring the param and hard-coding 0, and it doesn't make
much sense to allow drivers to override it by default, so remove the
appearance of the ability to do so.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29632>
2024-06-10 10:11:56 +00:00
Erik Faye-Lund
53b99d766e mesa/main: merge identical checks
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
2024-06-10 09:40:38 +00:00
Erik Faye-Lund
e154c403fd mesa/main: simplify conditions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
2024-06-10 09:40:38 +00:00
Erik Faye-Lund
9648bab4b6 mesa/main: remove needless check
EXT_color_buffer_half_float is only exposed in GLES contexts, so this
check is needless.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
2024-06-10 09:40:38 +00:00
Erik Faye-Lund
e5bd74b775 mesa/main: use _mesa_is_gles1()-helper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
2024-06-10 09:40:38 +00:00
Erik Faye-Lund
53fb085ebd mesa/main: tighten rg/half-float interaction
The GL_HALF_FLOAT_OES-enum is about OES_texture_float, not e.g
ARB_texture_float. EXT_texture_rg does have an interaction that allows
this, but the other specs doesn't.

So let's tighten this. In reality, this shouldn't change any real
behavior, because we only support OES_texture_float in GLES contexts,
and in those we'd support EXT_texture_rg if we support RG textures in
the first place. But it makes the logic a bit clearer.

And just to be clear, the non-GLES version of the half-float enum does
not need the same check, because desktop GL supports all converions
here, and GLES 3 and later also requires RG-texture support in the first
place.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
2024-06-10 09:40:38 +00:00
Erik Faye-Lund
75645387b6 mesa/main: use extension-helper
This is only allowed if the extension is supported, so let's actually
check for it, instead of checking for GLES2 support.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
2024-06-10 09:40:38 +00:00
Erik Faye-Lund
d2817013ba mesa/main: factor out format/type enum checking
Checking if the format and type enums are valid while checking that the
combinations are valid makes the code hard to modify when there's
complex conditions at play. Let's factor these checks out so we can
stricten up this code in a more maintainable way.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
2024-06-10 09:40:38 +00:00
Erik Faye-Lund
227c6627cb mesa/main: do not allow RGBA_INTEGER et al in gles3
GLES3 doesn't allow all the format/type combinations that
ARB_texture_rgb10_a2ui does, so let's tighten the error-checking here a
bit.

Fixes: b5a370dc25 ("mesa/main: do not allow ARB_texture_rgb10_a2ui enums before gles3")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
2024-06-10 09:40:38 +00:00
Erik Faye-Lund
5e5b0b0532 mesa/main: require EXT_texture_integer for GL 3.0
The GL enums from this extension got promoted to GL 3.0, so we need to
test for it before we bump the GL version. If not, bad things will
happen when people try using them.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
2024-06-10 09:40:38 +00:00
Erik Faye-Lund
b6c2d9a911 mesa/main: remove duplicate error-checks
We've already verified that both of these enums are valid earlier in this
function, so let's remove the duplicate checks here.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
2024-06-10 09:40:38 +00:00
Erik Faye-Lund
c0285f29ff mesa/main: remove stale prototype
This function was removed a long time ago.

Fixes: 8e581747d2 ("mesa/formats: make format testing a gtest")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29528>
2024-06-10 09:40:38 +00:00
Erik Faye-Lund
4be89d7ad1 panfrost: lower maxVertexInputStride to match vulkan runtime
Since we now use the common vulkan runtime to handle pipeline state and
this sets a limit for this at MESA_VK_MAX_VERTEX_BINDING_STRIDE we should
do the same, or else we can run into an assert-fail in the runtime code.

Basically the same as !29454, but for Panfrost.

Fixes: 214761bdfe ("panvk: Fully transition to vk_vertex_binding_state")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29461>
2024-06-10 09:20:10 +00:00
Erik Faye-Lund
8fe554c2bf mesa/main: remove unused function
Whoops, seems I left this function unused!

Fixes: dd8fb7139d ("mesa/main: rewrite mipmap generation code")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29582>
2024-06-10 08:44:19 +00:00
Iago Toral Quiroga
d5e2f66314 v3dv: disable some TLB paths for cases of linear depth/stencil stores
In the case of buffer to image stores, we work around the limitation
for linear images by loading D/S data into a the color tile buffer
using a compatible format, however, this only works for formats with
a single aspect, for combined depth/stencil formats, since the copies
are specified to only copy a single aspect, we need to be able to
preserve the contents of the other aspect in the destination image,
and for that we still use the depth/stencil buffer, so we are affected
by the restriction.

Fixes some VK_KHR_maintenance5 CTS tests that hit this scenario,
such as some tests in:
dEQP-VK.api.copy_and_blit.core.image_to_image.all_formats.depth_stencil.2d_to_1d.*

In the case of image to image copies, we don't have any workarounds for
linear depth/stencil so we always want to skip the TLB path. I have not
seen any tests hit this scenario.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29597>
2024-06-10 07:25:04 +02:00
Iago Toral Quiroga
993ba4135c v3dv: remove blit shader restriction on depth/stencil not being linear
We can't render to linear depth/stencil formats but the blit shader
automatically converts D/S blits to compatible color blits where we
don't have this restriction.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29597>
2024-06-10 07:25:04 +02:00
Eric Engestrom
467230e7e4 freedreno/ci: disable mid-testing reboot on a750
Once testing has started, there won't be enough time left to try
rebooting and restarting if something went wrong, so instead just error
out of the job immediately.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29637>
2024-06-10 02:01:05 +02:00
Eric Engestrom
bbe9cf47bf nvk+zink/ci: consider all the double tests in spec@glsl-4.00@execution@built-in-functions to be flaky
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29636>
2024-06-10 01:10:46 +02:00
Eric Engestrom
c2dc60751b nvk+zink/ci: add flakes seen in nightly pipeline
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29635>
2024-06-09 22:51:37 +00:00
Eric Engestrom
9f4c0d2a71 nvk+zink/ci: mark KHR-GL46.sparse_texture2_tests.SparseTexture2* as fixed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29635>
2024-06-09 22:51:37 +00:00
Eric Engestrom
b92ce1b0d6 panfrost/ci: remove duplicate path
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29634>
2024-06-10 00:20:55 +02:00
Eric Engestrom
9c2e2b7a2e turnip/ci: add a750 flakes seen in the latest nightly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29633>
2024-06-09 21:04:18 +00:00
Eric Engestrom
04c939113f turnip+zink/ci: mark a dEQP-GLES(2|3).functional.rasterization.(fbo|primitives).line_(strip_|)wide as fixed
Fixes: 07fa635f11 ("gallium/u_blitter: add option to override fragment shader for util_blitter_blit")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29633>
2024-06-09 21:04:18 +00:00
Eric Engestrom
95ca41bef9 radv/ci: drop duplicate navi31-aco flakes line
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29631>
2024-06-09 22:31:30 +02:00
Eric Engestrom
ef0f926aff radv/ci: drop duplicate navi21-aco flakes line
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29631>
2024-06-09 22:31:23 +02:00
Eric Engestrom
f4f30ed826 radeonsi/ci: mark a bunch of tests as fixed on vangogh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29631>
2024-06-09 22:30:36 +02:00
Pavel Ondračka
ae06e018fa r300: fix RC_OMOD_DIV_2 modifier
Backend only recognizes the MUL a*0.5 pattern if there is an immediate
as one of the sources, however by then the source would we already
coverted to RC_FILE_NONE with constant half swizzles. So teach
peephole_omod to recognize this pattern as well.

RV530:
total instructions in shared programs: 128860 -> 128750 (-0.09%)
instructions in affected programs: 11942 -> 11832 (-0.92%)
helped: 106
HURT: 17
total presub in shared programs: 8739 -> 8736 (-0.03%)
presub in affected programs: 32 -> 29 (-9.38%)
helped: 3
HURT: 0
total omod in shared programs: 427 -> 1212 (183.84%)
omod in affected programs: 38 -> 823 (2065.79%)
helped: 0
HURT: 160
total temps in shared programs: 17544 -> 17554 (0.06%)
temps in affected programs: 70 -> 80 (14.29%)
helped: 0
HURT: 10
total lits in shared programs: 3153 -> 3159 (0.19%)
lits in affected programs: 9 -> 15 (66.67%)
helped: 0
HURT: 6
total cycles in shared programs: 191334 -> 191253 (-0.04%)
cycles in affected programs: 21240 -> 21159 (-0.38%)
helped: 101
HURT: 27

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28784>
2024-06-09 09:07:32 +02:00
Pavel Ondračka
d94d2a05b2 r300: fix for ouput modifier and DDX/DDX
Empirical testing shows that output modifiers are not working if the
DDX/DDY is writing directly to output.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28784>
2024-06-09 09:07:32 +02:00
Pavel Ondračka
472c64c90e r300: fix writemask rewrite when converting to omod
Consider the following case:
  0: MUL temp[1].y, input[0]._x__, input[1]._y__;
  1: MOV temp[1].x, input[0].x___;
  2: MOV temp[1].z, const[0].__x_;
  3: MUL temp[2].xyz, const[1].xxx_, temp[1].yxz_;
  ...

We correctly recognize that we can convert mul into omod for all three
instructions, however the mul swizzle was not handled correctly:
  0: MUL temp[2].y / 2, input[0]._x__, input[1]._y__;
  1: MOV temp[2].x / 2, input[0].x___;
  2: MOV temp[2].z / 2, const[0].__x_;
  ...

Just create the conversion swizzle from the initial mul swizzle when rewriting
the original instruction writemasks.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28784>
2024-06-09 09:07:31 +02:00
Pavel Ondračka
32cc2c2812 r300: fix cycles counting for KIL
We add a cycles penalty when we see a begin tex and than subtract from
it based on when first alu comes that needs the results. However if the
only instruction in the TEX block is just KIL, we don't have to add any
penalty as nothing waits for it.

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28784>
2024-06-09 09:07:31 +02:00
Pavel Ondračka
fcc97bd6c3 r300/ci: fails list update
shaders@glsl-bug-110796 skips since https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/921

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29626>
2024-06-09 08:04:59 +02:00
Georg Lehmann
05ca6e2478 amd/common: set COMPUTE_STATIC_THREAD_MGMT_SE2-3 correctly on gfx10-11
There is a hole between SE1 and SE2 occupied by COMPUTE_TMPRING_SIZE.

Fixes: 3c8b48e310 ("ac,radeonsi: add a function to initialize compute preambles")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29622>
2024-06-08 19:18:53 +00:00
Karol Herbst
5d013da038 rusticl/memory: copies might overlap for host ptrs
We can't really gurantee there is no overlap, because applications might
pass in arbitrary host pointers.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29604>
2024-06-08 17:03:31 +00:00
Karol Herbst
e522c91d5c rusticl/spirv: do not pass a NULL pointer to slice::from_raw_parts
Fixes: e8de580998 ("rusticl/kernel: basic implementation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29604>
2024-06-08 17:03:31 +00:00
Kenneth Graunke
3da444b79e intel/brw: Refactor code to commute immediates into legal positions
This will let us reuse this in a new pass shortly.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29624>
2024-06-08 02:19:12 -07:00