platform/upstream/mesa.git
9 months agoAdd support for ttrace
Xuelian [Tue, 23 Jun 2020 10:26:28 +0000 (18:26 +0800)]
Add support for ttrace

1. Add ttrace link in spec file
2. Add header file for ttrace

Change-Id: Ibfbc44f14f5e4b4e34d954249b2b399335134c4b
Signed-Off-by: Xuelian Bai <xuelian.bai@samsung.com>
9 months agoAdd exception handle for multithread case.
Xuelian [Tue, 12 May 2020 11:00:12 +0000 (19:00 +0800)]
Add exception handle for multithread case.

In some cases, main thread got some problem and exit with calling
_eglAtExit, while another thread may still be running, that will
cause assert in mesa.

Change-Id: I6ee87abcb8c818e8a6808cd6098f4061bf7779b2
Signed-Off-by: Xuelian Bai <xuelian.bai@samsung.com>
9 months agoImplement extension EGL_TIZEN_native_fence_sync
Joonbum Ko [Fri, 20 Mar 2020 05:58:36 +0000 (14:58 +0900)]
Implement extension EGL_TIZEN_native_fence_sync

Merged old commit:
Changed the initial setting of dri2_surface to use out_fence_fd.
Change-Id: Ic51d7e2441927010b5889a2328199428c06d6351
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Fixed to use out_fence_fd to wait render done in twe_thread.
Change-Id: I2bee255bcd5eb2697e49a5e8973c03ea65fe0e30
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
v3d_screen: Fixed to support capability for NATIVE_FENCE_FD.
Change-Id: I3335ee417d88e51a904114869fb5ac287622c526
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
v3d_fence: Added function to get fence_fd from dri2.
Change-Id: Ibd86254f2352a01cd993c61b0ab036c721005be0
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Added new extension EGL_TIZEN_native_fence_sync.

      EGL_TIZEN_native_fence_sync
     - Added EGL_SYNC_NATIVE_FENCE_TIZEN to distinguish EGLSyncKHR.
     - Added EGL_SYNC_NATIVE_FENCE_FD_TIZEN to get tizen's native fence fd
      in the sync attribute.
     - Added EGL_NO_NATIVE_FENCE_FD_TIZEN to indicate no native fence fd.
     - The eglDupNativeFenceFDTIZEN function has been added to get an fd to
      indicate when rendering is complete from the egl core.
Change-Id: I6876572ec04b3d1616f6b7e5018dc6647685b536
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Implemented extension EGL_TIZEN_native_fence_sync.
 - this patch is only for the 'tizen' branch
 - Added new API to get native fence fd from driver.
    eglDupNativeFenceFDTIZEN()
Change-Id: I21d46faedbfc46abd4dde03d36560bf941061d38
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
9 months agoFix to use TPL_BACKEND_WAYLAND_THREAD.
Joonbum Ko [Wed, 18 Mar 2020 10:40:59 +0000 (19:40 +0900)]
Fix to use TPL_BACKEND_WAYLAND_THREAD.

 - It is a valid backend only for wayland clients.

Change-Id: Ifea5a5b5bd03074f267c4be02d325ed544840753
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
9 months agoFix "close object **" error in vc4_bo_free on RPI3
Xuelian [Wed, 4 Mar 2020 16:35:24 +0000 (00:35 +0800)]
Fix "close object **" error in vc4_bo_free on RPI3

When running case dEQP-GLES2.functional.prerequisite.read_pixels
for deqp-gles2, there will be an error "close object **".
This error is caused by invalid fd, so we call
tbm_drm_helper_get_auth_info  in dri2_initialize_tizen.

Change-Id: I959b404daa33c629ea72c38bfe7838e643eb603d
Signed-Off-by: Xuelian Bai <xuelian.bai@samsung.com>
9 months agoFix resize issue
Xuelian Bai [Tue, 28 May 2019 16:01:10 +0000 (00:01 +0800)]
Fix resize issue
Handle 1x1 issue for driimage

When evas resize window after dequeue, then draw and swapbuffers,
window is shown with old size until next makecurrent.
Add validate_drawable function to check if resize happen each time
makecurrent is called.

For RPI4, render node is used, so buffer is allocated on another
device, when 1x1 issue happen, we need to make sure if driimage
size is changed, then created new if yes.

Merged Commit:
commit 2dc471b0e167693b81c24c9a3f89b985cb98249f
Author: Zhaowei Yuan <zhaowei.yuan@samsung.com>
    - Check if stdraw is NULL before access
      Variable "stdraw" could be NULL in some case, check it before access.

commit cc2dc99365906ea52b645be3bb10f50708d67e84
Author: Xuelian Bai <xuelian.bai@samsung.com>
    - Fix 1x1 issue of task-mgr
      Makecurrent is called just before resize callback is called, so we
      have to check if size is changed when drawcall.

commit 670d77331c986a92bcf2459567ccd6dfc181bc66
Author: Xuelian Bai <xuelian.bai@samsung.com>
    - Fix resize issue

Change-Id: Ieaebe72661a081d496ab6214c1c1526f7d16f19b
Signed-Off-by: Xuelian Bai <xuelian.bai@samsung.com>
    - Handle 1x1 issue for driimage

Change-Id: Id5a463a8db290ca5b80c130ebcdcb13c7786d70c
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
9 months agoFix display issue on RPI4
Xuelian Bai [Thu, 31 Oct 2019 17:06:11 +0000 (01:06 +0800)]
Fix display issue on RPI4

RPI4 has seperated devices for display and render, so when init
Tizen, we open /dev/dri/renderD128 and init v3d screen as renderonly.

Merged commit:
commit 50839c47736cbab7db6a9fb25ea0d983434c56cc
Author: Zhaowei Yuan <zhaowei.yuan@samsung.com>
    - platform_tizen: free driver_name if initialization goes wrong
      Mallocated driver_name needs to be freed if following steps for
      initialization goes wrong, whether hw_accel if set or not

Change-Id: Iffac62ac9717f7a4da589fd51f008968615a6321
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
9 months agoAdd Pbuffer support on Tizen platform
Xuelian [Mon, 17 Feb 2020 12:39:44 +0000 (20:39 +0800)]
Add Pbuffer support on Tizen platform

Merged old commit:
commit f409ef598976a4fd4f74ab4695478b1fc1651c06
Author: Zhaowei Yuan <zhaowei.yuan@samsung.com>
    1. Add EGL_PBUFFER_BIT to surface_type if maskes match
    2. Alloc local buffer when render buffer type is
    "FRONT_LEFT" which will be used by Pbuffer

commit b0dec10d0d0fbc7f77623016f3d986122f718f8b
Author: Xuelian Bai <xuelian.bai@samsung.com>
    Fix crash when query a pbuffer surface
    Pbuffer is not created via TPL, so when query a pbuffer surface,
    we can only call _eglQuerySurface instead of TPL APIs.

Change-Id: Ib9990973f228374a95f60157a3b79069529a62b2
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
9 months agoEGL: Add support for weston
Zhaowei Yuan [Mon, 3 Dec 2018 03:08:44 +0000 (11:08 +0800)]
EGL: Add support for weston

Add support for wayland & drm platforms which are used by weston.
Select EGL platform for weston by setting environment variable:
    export EGL_PLATFORM=wayland

Modifications to mesa.spec:
    Add platforms wayland and drm which is needed by weston
    Enable gbm and pack it into RPM package
Modifications to egl_dri2.h
    Since tizen, drm and wayland are all supported now, remove
    the duplicate definition of "color_buffers" and "back" for
    tizen to avoid from building error.

Merged commit:
commit 7c8922c1ead5875fda90106793c2fcfab2feb9f3
Author: Xiaowei Guan <xiaowei.guan@samsung.com>
    - fix weston build error and app launch error

commit 6e7ce80fc524b78980d702549cf5bbc3a641e6ae
Author: Xiaowei Guan <xiaowei.guan@samsung.com>
    - add wayland-egl code for platform_wayland

commit 5cd0256faa43e376dcd5b5f2c2edd2515aff9c04
Author: Zhaowei Yuan <zhaowei.yuan@samsung.com>
    - EGL: Add support for weston

Change-Id: I58272083b7d110d55800d8b9ad7e7c4f0a6f6077
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
9 months agodocs: add Readme for Tizen and Readme RPI3 Setup for Tizen
Mun, Gwan-gyeong [Mon, 10 Apr 2017 10:36:58 +0000 (19:36 +0900)]
docs: add Readme for Tizen and Readme RPI3 Setup for Tizen
docs: Add Tizen Binary Download Instructions for RPI3

Readme_for_Tizen explains howto seting up build environment for tizen and geting
build dependancy packages.
Readme_RPI3_Setup_for_Tizen explains How to building RPI3 kernel for tizen and
downloading to tizen platform binaries to rpi3.

Add Tizen Binary Download Instructions for RPI3. it includes which packages
should be installed with Mesa for tizen.

Merged old commit a8f81f8f9382445f072c616e77ce0da72c028480

Change-Id: I44f8cdca5be8c8860d7f6a162889d534068168c1
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
9 months agoegl_dri2: Add support for Tizen
Xuelian [Wed, 20 Nov 2019 09:38:53 +0000 (17:38 +0800)]
egl_dri2: Add support for Tizen

Re-implement _eglLog based on dlog
Add build support for Tizen platform.
Added missed dri2_fini_surface() at tizen_destroy_surface().

Add platform_tizen.c that supports _EGL_PLATFORM_TIZEN. It works with libtpl-egl
(Tizen Porting Layer for egl), libtbm(Tizen Buffer Manager) where back buffers
of windows are backed by GEM objects.

In Tizen a native window has a queue (tbm_surface_queue) of back buffers
allocated by the WL_TBM(wayland client case, WL_TBM is abbreviation of
wayland-tbm protocol) or gbm ( tizen has implements gbm with tbm) or tbm
through tbm_backend.

For each frame, EGL needs to

    dequeue the next back buffer
    render to the buffer
    enqueue the buffer

After enqueuing, the buffer is no longer valid to EGL.

It supports DRI image loader extension, DRI dri2 loader extension and DRI swrast
loader extension.

It supports EGL_NATIVE_SURFACE_TIZEN  target type for eglCreateImageKHR.
(https://www.khronos.org/registry/EGL/extensions/TIZEN/EGL_TIZEN_image_native_surface.txt)

BindWaylandDisplayWL / UnbindWaylandDisplayWL / QueryWaylandBufferWL are
overloaded because tizen platform has its own instead of WL_DRM.

Referenced documents:
https://www.x.org/wiki/Events/XDC2016/Program/XDC2016_Tizen_Window_System_EGL_Vulkan.pdf
https://wiki.tizen.org/wiki/3.0_Porting_Guide/Graphics_and_UI/libtpl-egl
https://wiki.tizen.org/wiki/TBM

egllog: add unlock call preventing the deadlock
Implement dlog for mesa main

_eglLog is a basic log function for mesa, re-implement
it based on dlog here for debug purpose.
Log level can be changed by setting environment variable
EGL_LOG_LEVEL.

Log API for mesa main module are all implemented in file
src/mesa/main/error.c, re-implement them based on dlog
for debug convenience

add configuration of building and packaging for rpi3 ( vc4 gpu driver )
add udev rule files for rpi3 (vc4 drm device)

Mered old commit:
commit f5205524bf20b63c2efe20e99429c9d55543b711
Author: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Date:   Mon May 6 13:52:32 2019 +0800

commit 704bb72470589ede7246af8c6b0a9210df42f1c7
Author: Xuelian <xuelian.bai@samsung.com>
Date:   Wed Nov 20 19:08:41 2019 +0800

commit 247adc92138ad456f5db39acfe5be69748973df3
Author: Joonbum Ko <joonbum.ko@samsung.com>
Date:   Wed Apr 29 20:01:56 2020 +0900

Change-Id: I83348c1cff5f0f59f79bc3c016623adf6fbba32b
Signed-off-by: Xuelian <xuelian.bai@samsung.com>
10 months agoVERSION: bump for 23.3.3 upstream upstream/23.3.3
Eric Engestrom [Wed, 10 Jan 2024 20:39:55 +0000 (20:39 +0000)]
VERSION: bump for 23.3.3

10 months agodocs: add release notes for 23.3.3
Eric Engestrom [Wed, 10 Jan 2024 20:37:33 +0000 (20:37 +0000)]
docs: add release notes for 23.3.3

10 months agoegl: only check dri3 on X11
antonino [Mon, 8 Jan 2024 12:29:41 +0000 (13:29 +0100)]
egl: only check dri3 on X11

When mesa is built without support for X11 Zink will always refuse to
start unless `LIBGL_KOPPER_DRI2` is set.

Only perform this check on X11 where it is relevant.

Fixes: cedb534a176 ("egl/glx: don't load non-sw zink without dri3 support")
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26929>
(cherry picked from commit 0fd066a1d7f64011fed63c64a1d3e3757ba5a55b)

10 months agovtn: Allow for OpCopyLogical with different but compatible types
Konstantin Seurer [Fri, 17 Nov 2023 12:39:52 +0000 (13:39 +0100)]
vtn: Allow for OpCopyLogical with different but compatible types

> Result Type must not equal the type of Operand (see OpCopyObject),
> but Result Type must logically match the Operand type.

Allow for this by setting the expected type and making sure, that both
types match.

cc: mesa-stable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10163
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26252>
(cherry picked from commit 4c363acf94a04a9a885ed4025e628520354186dc)

10 months ago.pick_status.json: Update to 67ad1142cf6afe61de834cefeddb4be06382899f
Eric Engestrom [Wed, 10 Jan 2024 10:28:47 +0000 (10:28 +0000)]
.pick_status.json: Update to 67ad1142cf6afe61de834cefeddb4be06382899f

10 months agoanv: Increase ANV_MAX_QUEUE_FAMILIES
José Roberto de Souza [Wed, 3 Jan 2024 15:54:45 +0000 (07:54 -0800)]
anv: Increase ANV_MAX_QUEUE_FAMILIES

If ANV_VIDEO_DECODE, ANV_VIDEO_DECODE and INTEL_COPY_CLASS are enabled
it is possible to have 5 different queues, so here increasing
ANV_MAX_QUEUE_FAMILIES.

Fixes: 17b8b2cffdb0 ("anv: Add support for a transfer queue on Alchemist")
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26882>
(cherry picked from commit 0997766069b3e1cc5ecb0eb282ad2e7fa778e9fa)

10 months ago.pick_status.json: Update to f6d2df5a7542025022e69b81dbe3af3e51ea5cd3
Eric Engestrom [Wed, 10 Jan 2024 09:29:24 +0000 (09:29 +0000)]
.pick_status.json: Update to f6d2df5a7542025022e69b81dbe3af3e51ea5cd3

10 months ago.pick_status.json: Mark b38c776690c9c39b04c57d74f9b036de56995aff as denominated
Eric Engestrom [Wed, 10 Jan 2024 09:29:48 +0000 (09:29 +0000)]
.pick_status.json: Mark b38c776690c9c39b04c57d74f9b036de56995aff as denominated

10 months agoac/rgp: Fix single-bit-bitfield-constant-conversion warning
Vinson Lee [Fri, 29 Dec 2023 08:08:24 +0000 (00:08 -0800)]
ac/rgp: Fix single-bit-bitfield-constant-conversion warning

../src/amd/common/ac_rgp.c:119:48: warning: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Wsingle-bit-bitfield-constant-conversion]
  119 |    header->flags.is_semaphore_queue_timing_etw = 1;
      |                                                ^ ~

Fixes: ed0c8522437 ("radv: add initial SQTT files generation support")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26839>
(cherry picked from commit 568f61787a5cd1a69c799d935c364138ff415a1e)

10 months agoradv: don't emit cp dma packets on video rings.
Dave Airlie [Fri, 27 Oct 2023 04:17:56 +0000 (14:17 +1000)]
radv: don't emit cp dma packets on video rings.

Only emit this on the gfx/ace rings.

Fixes hangs with CTS on video decode with navi3x.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26945>
(cherry picked from commit 71bd479a7f43ad80955e2c5043a1229e3fe35e2d)

10 months agoaco: fix applying input modifiers to DPP8
Georg Lehmann [Sun, 7 Jan 2024 10:22:19 +0000 (11:22 +0100)]
aco: fix applying input modifiers to DPP8

Cc: mesa-stable
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26919>
(cherry picked from commit a90d154f62d949e1d2315d7d09975fb1fcbce489)

10 months agovtn: Remove transpose(m0)*m1 fast path
Konstantin Seurer [Wed, 27 Dec 2023 14:19:12 +0000 (15:19 +0100)]
vtn: Remove transpose(m0)*m1 fast path

This is broken for games that rely on invariant geometry since the usage
of matrices can affect how gl_Position is computed. The fdot fastpath
relied on if and how fdot is lowered for correctness.

Totals from 6578 (7.73% of 85071) affected shaders:
MaxWaves: 147190 -> 147170 (-0.01%)
Instrs: 4451406 -> 4438140 (-0.30%); split: -0.31%, +0.01%
CodeSize: 23553020 -> 23541772 (-0.05%); split: -0.07%, +0.03%
VGPRs: 302304 -> 302328 (+0.01%)
SpillSGPRs: 1309 -> 1329 (+1.53%)
Latency: 22509985 -> 22177164 (-1.48%); split: -1.48%, +0.00%
InvThroughput: 4862795 -> 4842951 (-0.41%); split: -0.41%, +0.01%
VClause: 85035 -> 84998 (-0.04%); split: -0.06%, +0.02%
SClause: 131008 -> 131055 (+0.04%); split: -0.02%, +0.05%
Copies: 298935 -> 298060 (-0.29%); split: -0.71%, +0.41%
PreSGPRs: 266833 -> 267292 (+0.17%); split: -0.85%, +1.03%
PreVGPRs: 249511 -> 249601 (+0.04%)

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9562
cc: mesa-stable

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26821>
(cherry picked from commit 4d02543853eb86c6c3cb6dd2a84e9a673b44001f)

10 months agonir/opt_move_discards_to_top: don't schedule discard/demote across subgroup operations
Daniel Schürmann [Wed, 24 Aug 2022 16:05:32 +0000 (18:05 +0200)]
nir/opt_move_discards_to_top: don't schedule discard/demote across subgroup operations

Fixes: b447f5049b6d68fd80b7337bc1f7c79b1b1a4765 ('nir: Add a discard optimization pass')
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18249>
(cherry picked from commit d434a127f9df32f67f901362b8d02ef9b564115e)

10 months agogallium/vl: match YUYV/UYVY swizzle with change of color channels
Leo Liu [Sat, 6 Jan 2024 02:26:21 +0000 (21:26 -0500)]
gallium/vl: match YUYV/UYVY swizzle with change of color channels

Update the sampler views with the color channels, that fixes the issue
caused by: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20815

It fixes the case:
`gst-launch-1.0 -v -v filesrc location=file.jpg ! jpegparse ! vaapijpegdec ! imagefreeze ! vaapisink`

Fixes: dc2119bf3f ("util/format: Fix wrong colors when importing YUYV and UYVY")
Cc: mesa-stable
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26911>
(cherry picked from commit 9eac06521a810ea5e2276cd82be1e21fedfe2710)

10 months agoglthread: don't unroll draws using user VBOs with GLES
Marek Olšák [Sat, 6 Jan 2024 22:57:26 +0000 (17:57 -0500)]
glthread: don't unroll draws using user VBOs with GLES

The unrolling uses glBegin, which is unsupported by GLES and the GL
dispatch fails.

Fixes: 50d791ca73e52c6 - glthread: add a vertex upload path that unrolls indices for glDrawElements

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26916>
(cherry picked from commit 56b4d199a05ef8f9d73ad3215b27238231a477fb)

10 months agoir3/legalize: Fix helper propagation with b.any/b.all/getone
Connor Abbott [Thu, 7 Dec 2023 12:27:12 +0000 (07:27 -0500)]
ir3/legalize: Fix helper propagation with b.any/b.all/getone

We need to set uses_helpers_beginning in order to propagate it to
predecessor blocks.

Fixes: aa322a37fcb ("ir3: Implement helper invocation optimization")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26564>
(cherry picked from commit 862df28f6b1c42ec4b716cdcdd427cd1eab43899)

10 months agointel/fs: fix depth compute state for unchanged depth layout
Lionel Landwerlin [Mon, 8 Jan 2024 10:17:54 +0000 (12:17 +0200)]
intel/fs: fix depth compute state for unchanged depth layout

There is no VK CTS exercising this case. If there was we would run
into hangs as noticed in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26876

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26923>
(cherry picked from commit 4b30b46ffdbc962f09ef87529a71d78cf514f8d8)

10 months agointel/compiler: reemit boolean resolve for inverted if on gen5
Dave Airlie [Thu, 21 Dec 2023 00:39:08 +0000 (10:39 +1000)]
intel/compiler: reemit boolean resolve for inverted if on gen5

Gen5 adds some boolean conversion instructions after nir emits,
but that nir srcs don't line up with them, so reemit the boolean
conversion if we reemit the inot.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 31b5f5a51f3a ("nir/opt_if: Simplify if's with general conditions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26782>
(cherry picked from commit 56a72e014fcda3c52cf119115cb71fce2fad86d8)

10 months agoisl: implement Wa_22015614752
Lionel Landwerlin [Wed, 27 Dec 2023 20:20:22 +0000 (22:20 +0200)]
isl: implement Wa_22015614752

This workaround requires 64Kb alignment for compression with multiple
engine accesses.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8614
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26890>
(cherry picked from commit f12ffc6b0486944c362760e70eb1774cd4fe1950)

10 months agozink: Always fill external_only in zink_query_dmabuf_modifiers
Mary Guillemard [Tue, 21 Nov 2023 08:29:41 +0000 (09:29 +0100)]
zink: Always fill external_only in zink_query_dmabuf_modifiers

Fix piglit.spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers
randomly skipping some tests as external_only content was never initialized.

Cc: mesa-stable
Reviewed-by: default avatarMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26305>
(cherry picked from commit b6d828576e1d561ad49c01f19c1cb5ba39e3832a)

10 months agozink: Initialize pQueueFamilyIndices for image query / create
Mary Guillemard [Tue, 21 Nov 2023 08:17:16 +0000 (09:17 +0100)]
zink: Initialize pQueueFamilyIndices for image query / create

Fixes: d922850e365 ("zink: break out image/buffer create info structs into helper funcs")

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26303>
(cherry picked from commit db0f177edd793f30edee44c101bfdc7f9ea6e788)

10 months agozink: fix heap-use-after-free on batch_state with sub-allocated pipe_resources
Karol Herbst [Thu, 4 Jan 2024 01:42:16 +0000 (02:42 +0100)]
zink: fix heap-use-after-free on batch_state with sub-allocated pipe_resources

zink_bo_create can run into a heap-use-after-free when the bo is still
referencing an batch_state from an older destroyed context. In order to
fix this, every context gives back their batch_states to the zink, where
they can be reused from for new contexts.

Cc: mesa-stable
Suggested-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26889>
(cherry picked from commit b06f6e00fba6e33c28a198a1bb14b89e9dfbb4ae)

10 months ago.pick_status.json: Mark fbe4e16db2d369c3e54067d17f81bdce8661a461 as denominated
Eric Engestrom [Mon, 8 Jan 2024 15:15:06 +0000 (15:15 +0000)]
.pick_status.json: Mark fbe4e16db2d369c3e54067d17f81bdce8661a461 as denominated

10 months ago.pick_status.json: Update to 031978933151e95690e93919e7bfd9f1753f2794
Eric Engestrom [Mon, 8 Jan 2024 15:13:32 +0000 (15:13 +0000)]
.pick_status.json: Update to 031978933151e95690e93919e7bfd9f1753f2794

10 months agoradv/rt: Free traversal NIR after compilation
Friedrich Vock [Thu, 4 Jan 2024 13:37:08 +0000 (14:37 +0100)]
radv/rt: Free traversal NIR after compilation

Could lead to OOM in games that compile RTPSOs often,
like Ghostwire Tokyo.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26892>
(cherry picked from commit 34cc76517286b88c8191a3e10dda0a3293c09127)

10 months agoradv: disable stencil test without a stencil attachment
Samuel Pitoiset [Tue, 2 Jan 2024 10:19:34 +0000 (11:19 +0100)]
radv: disable stencil test without a stencil attachment

Implementations are supposed to do that per the Vulkan spec.

This fixes the following new VKCTS tests
dEQP-VK.pipeline.*.stencil.no_stencil_att.*

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26847>
(cherry picked from commit 8b7b5be98bc28117e6f4ce144a9d2fa087c18782)

10 months agoradv: fix binding partial depth/stencil views with dynamic rendering
Samuel Pitoiset [Tue, 12 Dec 2023 13:55:29 +0000 (14:55 +0100)]
radv: fix binding partial depth/stencil views with dynamic rendering

With dynamic rendering, it's allowed to begin rendering with depth or
stencil only but still with a depth/stencil format. The test below
checks that unbound part of ds isn't modified, if depth is bound and
stencil not and vice versa.

This fixes a recent CTS
dEQP-VK.dynamic_rendering.primary_cmd_buff.basic.partial_binding_depth_stencil.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25350>
(cherry picked from commit 1ef5feac5ef48515bba2fa22c8a2a4e517739519)

10 months agollvmpipe: fix caching for texture shaders.
Dave Airlie [Tue, 10 Oct 2023 06:41:21 +0000 (16:41 +1000)]
llvmpipe: fix caching for texture shaders.

caching only works if you check the size and store the result,
later the size is always set.

Fixes: f675e4ee8231 ("llvmpipe: Pre compile sample functions")
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25648>
(cherry picked from commit c2f79d7fb1c3c4931bee8171750a67d867366fda)

10 months agointel/compiler: fix release build unused variable.
Dave Airlie [Wed, 3 Jan 2024 06:31:23 +0000 (16:31 +1000)]
intel/compiler: fix release build unused variable.

This is only used in an assert.

Fixes: 158ac265dfd0 ("intel/fs: Make helpers for saving/restoring instruction order")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26863>
(cherry picked from commit 37366fef682fbadcfd5d4376008ed0fc5542c8f1)

10 months agogallivm: handle llvm 16 atexit ordering problems.
Dave Airlie [Wed, 3 Jan 2024 20:17:50 +0000 (06:17 +1000)]
gallivm: handle llvm 16 atexit ordering problems.

This is ported from amd ac_llvm_helper.cpp, thanks to Marek for the pointer.

This is needed to avoid crashes due to atexit ordering between some piglit
tests and mesa internals.

Cc: mesa-stable
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26883>
(cherry picked from commit b3cfec2fd824a52023c92fd5928f4f5c1cb449a0)

10 months ago.pick_status.json: Update to e2a7c877ad1fd6bda4032f707eea7646e5229969
Eric Engestrom [Thu, 4 Jan 2024 18:31:24 +0000 (18:31 +0000)]
.pick_status.json: Update to e2a7c877ad1fd6bda4032f707eea7646e5229969

10 months agozink: enforce maxTexelBufferElements for texel buffer sizing
Mike Blumenkrantz [Wed, 3 Jan 2024 15:08:12 +0000 (10:08 -0500)]
zink: enforce maxTexelBufferElements for texel buffer sizing

according to spec, creating larger texel buffers is legal for apps
but the resulting texel buffer must be clamped to device limits

fixes #10068

backport-to: 23.3

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26873>
(cherry picked from commit 49378bc3cda770493c656e0de1b2e2a1e35d79f4)

10 months agozink: lock screen queue on context_destroy and CreateSwapchain
Karol Herbst [Tue, 31 Oct 2023 23:59:55 +0000 (00:59 +0100)]
zink: lock screen queue on context_destroy and CreateSwapchain

Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25985>
(cherry picked from commit 208875516c10f5163d5a7333e2f5fe271fad4ee1)

10 months agoaco/tests: use more raw strings
Rhys Perry [Tue, 2 Jan 2024 12:44:24 +0000 (12:44 +0000)]
aco/tests: use more raw strings

Python 3.12 started giving a SyntaxWarning for unrecognized escapes such
as "\w". This might become a SyntaxError in a future python version.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26850>
(cherry picked from commit cad2c0915d60b2f217aa228e8c4c53d1abf65c21)

10 months agoRevert "d3d12: Fix screen->winsys leak in d3d12_screen"
Sil Vilerino [Wed, 3 Jan 2024 14:23:02 +0000 (09:23 -0500)]
Revert "d3d12: Fix screen->winsys leak in d3d12_screen"

This reverts commit 81c8e89ff8e846839fffc1d103b2080bef5c1b5c.

Fixes: 81c8e89ff8e ("d3d12: Fix screen->winsys leak in d3d12_screen")
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26872>
(cherry picked from commit e11605321aaf94e537751b09f3ec5133c385cc83)

10 months agoRevert "d3d12: Only destroy the winsys during screen destruction, not reset"
Sil Vilerino [Wed, 3 Jan 2024 14:22:52 +0000 (09:22 -0500)]
Revert "d3d12: Only destroy the winsys during screen destruction, not reset"

This reverts commit 325fb6e26b62326c86514d263ffedd241fd36865.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10371
Fixes: 325fb6e26b6 ("d3d12: Only destroy the winsys during screen destruction, not reset")
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26872>
(cherry picked from commit 97cc7ea5a591ed7afaddd00370de3ca62d55cbb4)

10 months ago.pick_status.json: Update to 2c078bfd18cae0ed1a0a3916020e49fb74668504
Eric Engestrom [Wed, 3 Jan 2024 23:02:03 +0000 (23:02 +0000)]
.pick_status.json: Update to 2c078bfd18cae0ed1a0a3916020e49fb74668504

10 months agozink: put sysmacros.h include under #ifdef MAJOR_IN_SYSMACROS
Jonathan Gray [Mon, 18 Dec 2023 11:03:23 +0000 (22:03 +1100)]
zink: put sysmacros.h include under #ifdef MAJOR_IN_SYSMACROS

Fixes the build on OpenBSD, where major() is in sys/types and
sys/sysmacros.h does not exist.  Also include sys/mkdev.h if
MAJOR_IN_MKDEV is defined.

Fixes: 6d60115be7c ("zink: Fix enumerate devices when running compositor")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26735>
(cherry picked from commit 33eecafe757264ed58e33b87e010aacc6a376da8)

10 months agozink: use KHR version of maint5 features
Erik Faye-Lund [Thu, 30 Nov 2023 11:43:47 +0000 (12:43 +0100)]
zink: use KHR version of maint5 features

This is still not in Vulkan core, so we can't refer to it without the
KHR suffix.

Fixes: f501f9453ad ("zink: use maintenance5")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26419>
(cherry picked from commit 5024b212b6224a67d60d472c12062639185a3916)

10 months agozink: update profile schema
Erik Faye-Lund [Thu, 30 Nov 2023 11:42:20 +0000 (12:42 +0100)]
zink: update profile schema

This is needed for VK_KHR_maintenance5 support.

Fixes: f501f9453ad ("zink: use maintenance5")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26419>
(cherry picked from commit 021645ebf5399a8c74f7f895a06d8919215243be)

10 months agomeson: Support for both packaging and distutils
Yonggang Luo [Mon, 18 Dec 2023 10:16:47 +0000 (18:16 +0800)]
meson: Support for both packaging and distutils

distutils was deprecated and is now gone on modern systems.
so the default behavior is to use the supported thing, which is packaging.version, and when on an old system, fallback to the old distutils.version.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9943

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26746>
(cherry picked from commit 670a799ebff9a98daafccf49324c2a01311b0c41)

10 months ago.pick_status.json: Update to 39c8cca34fb72db055df18abf1d473e099f4b05b
Eric Engestrom [Tue, 2 Jan 2024 16:20:06 +0000 (16:20 +0000)]
.pick_status.json: Update to 39c8cca34fb72db055df18abf1d473e099f4b05b

10 months agoanv: Assume that imported bos already have flat CCS requirements satisfied
José Roberto de Souza [Fri, 15 Dec 2023 16:24:26 +0000 (08:24 -0800)]
anv: Assume that imported bos already have flat CCS requirements satisfied

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10291
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26711>
(cherry picked from commit 3465e9f3526c8dbba3ef5ab5bd6158b70422ab83)

10 months ago.pick_status.json: Mark 8d0e70f628b745ad81124e0c3fe5e46ea84f6b46 as denominated
Eric Engestrom [Thu, 28 Dec 2023 12:04:21 +0000 (12:04 +0000)]
.pick_status.json: Mark 8d0e70f628b745ad81124e0c3fe5e46ea84f6b46 as denominated

10 months ago.pick_status.json: Mark 060439bdf0e74f0f2e255d0a81b5356f9a2f5457 as denominated
Eric Engestrom [Thu, 28 Dec 2023 12:04:19 +0000 (12:04 +0000)]
.pick_status.json: Mark 060439bdf0e74f0f2e255d0a81b5356f9a2f5457 as denominated

10 months ago.pick_status.json: Update to ebee672ef87794f3f4201270623a92f34e62b8ff
Eric Engestrom [Thu, 28 Dec 2023 12:04:05 +0000 (12:04 +0000)]
.pick_status.json: Update to ebee672ef87794f3f4201270623a92f34e62b8ff

10 months ago.pick_status.json: Mark eb5bb5c784e97c533e30b348e82e446ac0da59c8 as denominated
Eric Engestrom [Thu, 28 Dec 2023 12:07:15 +0000 (12:07 +0000)]
.pick_status.json: Mark eb5bb5c784e97c533e30b348e82e446ac0da59c8 as denominated

10 months agodocs: add sha256sum for 23.3.2
Eric Engestrom [Wed, 27 Dec 2023 22:34:20 +0000 (22:34 +0000)]
docs: add sha256sum for 23.3.2

10 months agoVERSION: bump for 23.3.2
Eric Engestrom [Wed, 27 Dec 2023 22:27:12 +0000 (22:27 +0000)]
VERSION: bump for 23.3.2

10 months agodocs: add release notes for 23.3.2
Eric Engestrom [Wed, 27 Dec 2023 22:26:11 +0000 (22:26 +0000)]
docs: add release notes for 23.3.2

10 months agoiris: Skip mi_builder init for indirect draws
Kenneth Graunke [Fri, 22 Dec 2023 12:48:20 +0000 (04:48 -0800)]
iris: Skip mi_builder init for indirect draws

We only need it for indirect draws.

Improves performance on an i7-12700 and A770:

- Piglit's drawoverhead base case +150.639% +/- 2.86933% (n=15).
- gfxbench5 gl_driver2_off +19.7219% +/- 1.13778% (n=15)
- SPECviewperf2020 catiav5test1 +1.6831% +/- 0.552052% (n=10).

Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26806>
(cherry picked from commit 55c262898ae7188311c89a60e4ec0fbb67b7a95b)

10 months agoiris: Don't search the exec list if BOs have never been added to one
Kenneth Graunke [Fri, 22 Dec 2023 12:02:47 +0000 (04:02 -0800)]
iris: Don't search the exec list if BOs have never been added to one

Whenever we use a BO in a batch, we need to find its corresponding exec
list entry, either to a) record that it's been used, b) update whether
it's being written, c) check for cross-batch implicit dependencies.

bo->index exists to accelerate these lookups.  If a BO is used multiple
times by a batch, bo->index is its location in the list.  Because the
field is global, and a BO can in theory be used concurrently by multiple
contexts, we need to double-check whether it's still there.  If not, we
fall back to a linear search of all BOs in the list, looking to see if
our index was simply wrong (but presumably right for another context).

However, there's one glaringly obvious case that we missed here.  If
bo->index is -1, then it's wrong for /all/ contexts, and in fact implies
that said BO has never been added to any exec list, ever.  This is quite
common in fact: a new BO, never been used before, say from the BO cache,
or streaming uploaders, gets used for the first time.

In this case we can simply conclude that it's not in the list and skip
the linear walk through all buffers referenced by the batch.

Improves performance on an i7-12700 and A770:

- SPECviewperf2020 catiav5test1: 72.9214% +/- 0.312735% (n=45)

Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26806>
(cherry picked from commit d55b5d4af5d55a25837d8507840f4ab9b1075ea3)

10 months agoiris: Initialize bo->index to -1 when importing buffers
Kenneth Graunke [Fri, 22 Dec 2023 12:00:37 +0000 (04:00 -0800)]
iris: Initialize bo->index to -1 when importing buffers

A value of -1 means that the buffer has never been used in an execbuf
buffer list in any of our contexts.  While setting this isn't critical,
doing so will allow us to short-circuit some looping in the next patch.

Cc: mesa-stable
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26806>
(cherry picked from commit d178334d5cafa9b215d38c7c443c4dbc168e66c5)

10 months ago.pick_status.json: Update to 55c262898ae7188311c89a60e4ec0fbb67b7a95b
Eric Engestrom [Wed, 27 Dec 2023 13:39:24 +0000 (13:39 +0000)]
.pick_status.json: Update to 55c262898ae7188311c89a60e4ec0fbb67b7a95b

10 months agodrirc/anv: disable FCV optimization for Baldur's Gate 3
Tapani Pälli [Tue, 19 Dec 2023 10:45:50 +0000 (12:45 +0200)]
drirc/anv: disable FCV optimization for Baldur's Gate 3

Cc: mesa-stable
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/26754>
(cherry picked from commit 9e88c711a3da96cb633bdc35e009bcb1bd193d74)

10 months agoetnaviv: Remove duplicate initializers
Vinson Lee [Wed, 20 Dec 2023 05:13:16 +0000 (21:13 -0800)]
etnaviv: Remove duplicate initializers

Fix initializer-overrides warnings.

../src/gallium/drivers/etnaviv/etnaviv_compiler.c:62:29: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
   62 |       .lower_extract_byte = true,
      |                             ^~~~
../src/gallium/drivers/etnaviv/etnaviv_compiler.c:63:29: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
   63 |       .lower_extract_word = true,
      |                             ^~~~

Fixes: 9dc4ee91215 ("etnaviv: lower (un)pack_{2x16,2x32}_split and extract_{byte,word}")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26773>
(cherry picked from commit f5d08bdf4e3a0e75a846b76889e234b7c9bbd754)

10 months agomesa: fix enum support for EXT_clip_cull_distance
Tapani Pälli [Thu, 14 Dec 2023 11:12:23 +0000 (13:12 +0200)]
mesa: fix enum support for EXT_clip_cull_distance

Extension was enabled but required enums not.

Fixes: 979bcb9f428 ("glsl: add EXT_clip_cull_distance support based on ARB_cull_distance")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26688>
(cherry picked from commit 629b15f446a41492fc5057c04008c6de9c52b078)

10 months agointel/common: add directory prefix to intel_gem.h include
Jonathan Gray [Tue, 19 Dec 2023 07:27:16 +0000 (18:27 +1100)]
intel/common: add directory prefix to intel_gem.h include

Otherwise common/intel_gem.h may get included instead of
common/i915/intel_gem.h when building in a different directory.

Fixes: e050a00b9f4 ("intel/common: Move i915 files to i915 folder")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26784>
(cherry picked from commit fbb9ce014080edd085b2e998c3e6d7fb569ef0b0)

10 months agorusticl: check rustc version for flags requiring newer rustc/clippy
Karol Herbst [Wed, 20 Dec 2023 22:08:34 +0000 (23:08 +0100)]
rusticl: check rustc version for flags requiring newer rustc/clippy

Fixes: 7e74ee07e3a ("rusticl: silence clippy::arc-with-non-send-sync for now")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26780>
(cherry picked from commit 9643671dae06701fa5ad926b6f30909407d1f8ac)

10 months agorusticl: silence clippy::arc-with-non-send-sync for now
Karol Herbst [Mon, 18 Dec 2023 22:05:58 +0000 (23:05 +0100)]
rusticl: silence clippy::arc-with-non-send-sync for now

Allows compilation with newer clippy

Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26764>
(cherry picked from commit 7e74ee07e3a7aebc46cbd6d724b49790cb9f9c29)

10 months ago.pick_status.json: Update to 1e6fcd6a611574241b1cde306afcc416a03ac76b
Eric Engestrom [Fri, 22 Dec 2023 15:47:28 +0000 (15:47 +0000)]
.pick_status.json: Update to 1e6fcd6a611574241b1cde306afcc416a03ac76b

10 months agoradeonsi/sqtt: use calloc instead of malloc
Pierre-Eric Pelloux-Prayer [Mon, 13 Nov 2023 20:20:12 +0000 (21:20 +0100)]
radeonsi/sqtt: use calloc instead of malloc

This makes sure the record is fully initialized and
fixes RGP crashes or missing shaders.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26774>
(cherry picked from commit af8e6c93473da991abbf588ce24ef409b08e84ce)

10 months agoradeonsi/sqtt: rework pm4.reg_va_low_idx
Pierre-Eric Pelloux-Prayer [Tue, 7 Nov 2023 15:05:52 +0000 (16:05 +0100)]
radeonsi/sqtt: rework pm4.reg_va_low_idx

The initial logic was to remember the place were SPI_SHADER_PGM_LO_*
are written, then assume that we can get the register offset because
the sequence would always be:

   PKT3_SET_SH_REG
   SPI_SHADER_PGM_LO_* register offset
   VA low 32 bits value <- reg_va_low_idx

The problem is that this sequence isn't guaranteed, for instance we
can get this instead:

   0   c0067600 |
   1   00000046 |
   2   003ffffd | SPI_SHADER_PGM_RSRC3_VS
   3   00000020 | SPI_SHADER_LATE_ALLOC_VS
   4 * 00002080 | SPI_SHADER_PGM_LO_VS
   5   00000080 | SPI_SHADER_PGM_HI_VS

So the assert in si_state_draw.cpp would fail as well as the VA
update logic.

So instead remember which the SPI_SHADER_PGM_LO_* offset, and the low
32 bits of the VA in si_update_shaders.

Fixes: 8034a71430b ("radeonsi/sqtt: re-export shaders in a single bo")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26774>
(cherry picked from commit b55a2065e03e0f033217b1b58a0c18e3a5e86136)

10 months agoradeonsi/sqtt: clear record_counts variable
Pierre-Eric Pelloux-Prayer [Mon, 25 Sep 2023 09:21:38 +0000 (11:21 +0200)]
radeonsi/sqtt: clear record_counts variable

This avoids hitting the asserts in ac_sqtt_finish.

Fixes: 94ce6540d8c ("ac/sqtt: add helpers for initializing ac_thread_trace_data")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26774>
(cherry picked from commit e4d537fb84369906d7eda9229f847f5d4cdfb124)

10 months agoradeonsi/sqtt: fix RGP pm4 state emit function
Pierre-Eric Pelloux-Prayer [Mon, 25 Sep 2023 09:14:20 +0000 (11:14 +0200)]
radeonsi/sqtt: fix RGP pm4 state emit function

It was missing in c3129b2b839.

Fixes: c3129b2b839 ("radeonsi: add a simple version of si_pm4_emit_state for non-shader states")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26774>
(cherry picked from commit 77098ec467fae56d3e3885d8e84137ac410e15cc)

10 months agoradv: Use correct writemask for cooperative matrix ordering.
Bas Nieuwenhuizen [Tue, 19 Dec 2023 23:19:55 +0000 (00:19 +0100)]
radv: Use correct writemask for cooperative matrix ordering.

Not expecting this to actually fix anything externally visible,
but reduces some invalid usage when the resulting vector is
not 16 elements long (e.g. the C/result matrix).

Fixes: 9df4703fbb5 ("radv: Add cooperative matrix lowering.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26768>
(cherry picked from commit 07ad6fd34a6ed32b74a3f9697545261a3fd84de2)

10 months agorusticl: do not warn on empty RUSTICL_DEBUG or RUSTICL_FEATURES
Karol Herbst [Mon, 18 Dec 2023 22:05:46 +0000 (23:05 +0100)]
rusticl: do not warn on empty RUSTICL_DEBUG or RUSTICL_FEATURES

Fixes: b90d1cfbfea ("rusticl/platform: add RUSTICL_FEATURES boilerplate")
Fixes: ca1e9917a9b ("rusticl/program: allow dumping compilation logs through RUSTICL_DEBUG")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26764>
(cherry picked from commit 382718e0e1493ae9d654a667f4c5a75ac86422b6)

10 months ago.pick_status.json: Update to e61fae6eb8ae1ae1228d6f89329324310db808ae
Eric Engestrom [Wed, 20 Dec 2023 19:49:29 +0000 (19:49 +0000)]
.pick_status.json: Update to e61fae6eb8ae1ae1228d6f89329324310db808ae

10 months agod3d12: Fix AV1 video encode 32 bits build
Sil Vilerino [Thu, 7 Dec 2023 01:09:44 +0000 (20:09 -0500)]
d3d12: Fix AV1 video encode 32 bits build

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26573>
(cherry picked from commit 096e17b57832e96e36fc27f70e7a0e5ccbb0ac8a)

10 months agointel/fs: Don't optimize DW*1 MUL if it stores value to the accumulator
Sviatoslav Peleshko [Fri, 13 Oct 2023 02:02:22 +0000 (05:02 +0300)]
intel/fs: Don't optimize DW*1 MUL if it stores value to the accumulator

Fixes: a8b86459 ("i965/fs: Optimize a * 1.0 -> a.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9570
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25710>
(cherry picked from commit 8f8cde4c6050d1e91101ec66e8982036da9d7700)

10 months agonir/loop_analyze: Don't test non-positive iterations count
Sviatoslav Peleshko [Mon, 13 Nov 2023 11:40:10 +0000 (13:40 +0200)]
nir/loop_analyze: Don't test non-positive iterations count

Testing negative iterations count makes no sense, and can cause issues
when the unsigned type is used.
Testing 0 iterations is already covered with
will_break_on_first_iteration, so it can be skipped too.

Fixes: 6772a17a ("nir: Add a loop analysis pass")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9913
Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26173>
(cherry picked from commit a6459e0f7bcb662130c79764ccf54ccfa9151182)

10 months agoegl/glx: fallback to software when Zink is forced and fails
José Expósito [Tue, 14 Nov 2023 08:23:23 +0000 (09:23 +0100)]
egl/glx: fallback to software when Zink is forced and fails

When `MESA_LOADER_DRIVER_OVERRIDE` is set to `zink` and the display
initialization fails, fallback to software rendering.

The error was reported in #10123 and it can be reproduced with:

    $ MESA_LOADER_DRIVER_OVERRIDE=zink eglinfo

`eglinfo` would crash in `dri2_display_release()` because of
`assert(dri2_dpy->ref_count > 0)`.

After bisecting the error to commit 8cd44b884387 ("egl/glx: add
autoloading for zink"), I found out that, before this change, the
display was set to initialized even when `_eglDriver.Initialize(disp)`
failed:

    disp->Options.Zink = env && !strcmp(env, "zink");
    // disp->Options.Zink is true

    if (!_eglDriver.Initialize(disp)) {
       [...]
       // Zink initialization has failed at this point
       // However, success is set to true:
       bool success = disp->Options.Zink;
       if (!disp->Options.Zink && !getenv("GALLIUM_DRIVER")) {
          [...]
       }
       // Software initialization is ignored because success is true
       if (!success) {
          [...]
       }
    }

    // The display is set as initialized even though it shouldn't
    disp->Initialized = EGL_TRUE;

Resolves: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10123
Fixes: 8cd44b884387 ("egl/glx: add autoloading for zink")
Signed-off-by: José Expósito <jexposit@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26184>
(cherry picked from commit d913927fe9201f0fea71ef0e614b9c400c122d49)

10 months agod3d12: Only destroy the winsys during screen destruction, not reset
Jesse Natalie [Mon, 18 Dec 2023 18:44:25 +0000 (10:44 -0800)]
d3d12: Only destroy the winsys during screen destruction, not reset

Fixes: 81c8e89f ("d3d12: Fix screen->winsys leak in d3d12_screen")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26744>
(cherry picked from commit 325fb6e26b62326c86514d263ffedd241fd36865)

10 months agoglx: Handle IGNORE_GLX_SWAP_METHOD_OML regardless of GLX_USE_APPLEGL
Michel Dänzer [Thu, 14 Dec 2023 10:43:44 +0000 (11:43 +0100)]
glx: Handle IGNORE_GLX_SWAP_METHOD_OML regardless of GLX_USE_APPLEGL

Avoids tons of

 WARNING: unknown fbconfig attribute from server: tag 0x8060 value 0x8063

messages with LIBGL_DEBUG=verbose.

Fixes: e64ab3e4a94c ("glx: Delete support for GLX_OML_swap_method.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26685>
(cherry picked from commit f0594915e631877bcdf8ce67636143a017b41fb1)

10 months agogallium/dri: Return __DRI_ATTRIB_SWAP_UNDEFINED for _SWAP_METHOD
Michel Dänzer [Thu, 14 Dec 2023 10:32:53 +0000 (11:32 +0100)]
gallium/dri: Return __DRI_ATTRIB_SWAP_UNDEFINED for _SWAP_METHOD

In contrast to __DRI_ATTRIB_SWAP_EXCHANGE, this is compatible with Mesa
< 23.3 on the client side.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10080
Fixes: e64ab3e4a94c ("glx: Delete support for GLX_OML_swap_method.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26685>
(cherry picked from commit 9548f969bda1075b20dd56a73cbf1e35c0cf7aba)

10 months agoiris: use intel_needs_workaround with 14015055625
Tapani Pälli [Fri, 15 Dec 2023 08:15:32 +0000 (10:15 +0200)]
iris: use intel_needs_workaround with 14015055625

This was missing from the FS stage primitive-id check. Also add usage
of macro to avoid running any extra code on platforms where this WA
would not apply.

Fixes: 0f147240398 ("iris: Implement Wa_14015297576")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26709>
(cherry picked from commit 82553774e2d1c3edff4c8e8683808d159846f83d)

10 months agointel/compiler: move gen5 final pass to actually be final pass
Dave Airlie [Mon, 18 Dec 2023 06:47:56 +0000 (16:47 +1000)]
intel/compiler: move gen5 final pass to actually be final pass

This got broken by the register conversion, this pass needs to be
after all the others.

Fixes: ce75c3c3fea9 ("intel: Switch to intrinsic-based registers")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26731>
(cherry picked from commit f76f4be301ef311e6be21486b6a3f5fd5e90240f)

10 months ago.pick_status.json: Update to 670a799ebff9a98daafccf49324c2a01311b0c41
Eric Engestrom [Wed, 20 Dec 2023 00:01:45 +0000 (00:01 +0000)]
.pick_status.json: Update to 670a799ebff9a98daafccf49324c2a01311b0c41

10 months agovulkan/wsi/wayland: ensure drm modifiers stored in chain are immutable
Yiwei Zhang [Sat, 9 Dec 2023 23:31:05 +0000 (23:31 +0000)]
vulkan/wsi/wayland: ensure drm modifiers stored in chain are immutable

Chain stored modifiers point to the mapping of the current feedback
shmem of the surface. The surface tracked feedback mapping will be gone
and replaced with new mapping during surface_dmabuf_feedback_done. There
are two issues here:
1. One issue is that the existing mapping is closed before been used to
   compare against new modifiers in sets_of_modifiers_are_the_same.
2. The other issue is that when the chain is still optimal, the chain
   persists while the mapping is still replaced with the one from the
   new format table shmem.

This change makes a deep copy of the modifiers to store in the chain to
ensure the modifiers used for the current chain are immutable through
the chain lifecycle.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26618>
(cherry picked from commit ddf2ca4faffdd309638aa0ebfcba2c43b4fc439d)

10 months agovulkan: Fix dynamic graphics state enum usage
George Ouzounoudis [Thu, 24 Aug 2023 17:03:02 +0000 (20:03 +0300)]
vulkan: Fix dynamic graphics state enum usage

Simply replace the correct rasterization stream enum

Fixes: 9d0ed9cbcc01 ("vulkan: Add more dynamic rasterizer state")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
(cherry picked from commit d8945dd51e47a026b5219b9f9d89fedb4ace04ca)

10 months agovulkan/wsi: fix build when platform headers are installed in non-standard locations
Eric Engestrom [Fri, 15 Dec 2023 18:21:49 +0000 (18:21 +0000)]
vulkan/wsi: fix build when platform headers are installed in non-standard locations

Anything that uses the platform defines in `vulkan_wsi_list` will need
to be able to resole the includes they trigger, which are provided by
`vulkan_wsi_deps`.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10304
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26715>
(cherry picked from commit 8043e8c4a66673675b2e1018f214e471942c717d)

10 months agoradv/rt: Initialize unused children in PLOC early-exit
Friedrich Vock [Fri, 15 Dec 2023 16:40:35 +0000 (17:40 +0100)]
radv/rt: Initialize unused children in PLOC early-exit

Bad things happen when these aren't initialized.

Fixes GPU hangs when loading Avatar: Frontiers of Pandora savegames.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26712>
(cherry picked from commit f9a394b753b55ccfc869568413b6fc6795dc1636)

10 months agodrirc: setup anv_assume_full_subgroups=16 for UnrealEngine5.1
Tapani Pälli [Tue, 12 Dec 2023 08:40:38 +0000 (10:40 +0200)]
drirc: setup anv_assume_full_subgroups=16 for UnrealEngine5.1

We set max subgroup size as 16 for 'UnrealEngine5.1', this improves a
customer benchmark by 50% on A750.

Cc: mesa-stable
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/26385>
(cherry picked from commit 012b6fbe632e190138f864ae4c6c6abe4c0ee81a)

10 months agoanv/hasvk/drirc: change anv_assume_full_subgroups to have subgroup size
Tapani Pälli [Tue, 12 Dec 2023 08:30:07 +0000 (10:30 +0200)]
anv/hasvk/drirc: change anv_assume_full_subgroups to have subgroup size

Cc: mesa-stable
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/26385>
(cherry picked from commit 7ff8f79a8841d439af449fac8b382070a7b76c9f)

10 months agonir: Scalarize bounds checked loads and stores
Faith Ekstrand [Tue, 5 Dec 2023 18:36:43 +0000 (12:36 -0600)]
nir: Scalarize bounds checked loads and stores

Fixes: 39da1deb497a ("nir/lower_io: Add a bounds-checked 64-bit global address format")
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26526>
(cherry picked from commit 1cf1b9d7412e94f70a5f68f81eed7ac22ad75613)

10 months agoanv: wait for CS write completion before executing secondary
Lionel Landwerlin [Wed, 13 Dec 2023 09:45:31 +0000 (11:45 +0200)]
anv: wait for CS write completion before executing secondary

Got a error state on DG2 with a jump to secondary. The secondary is
empty and padded with MI_NOOPs to workaround the CS prefetching.
According to the error state, the return jump address from the
secondary to the primary is 0x0. The ACTHD register value is 0x10, so
it seems that the command streamer indeed jumped to 0x0 and hanged on
a few dwords after that.

The return address should have been set edited by a previous
MI_STORE_DATA_IMM instruction. So it appears it did not complete in
time for the command stream to catch it. On Gfx12+ this can happend if
we do not set ForceWriteCompletionCheck.

This change also takes the opportunity to remove the padding MI_NOOPs
at the end of secondaries on Gfx12+ by using disabling the prefetching
just before jumping into secondaries and reenabling it at the
beginning of each secondary.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26665>
(cherry picked from commit 6a92af158dc132eee449c175bdee66d92c68d191)

10 months ago.pick_status.json: Updates notes for 6a92af158dc132eee449c175bdee66d92c68d191
Eric Engestrom [Sun, 17 Dec 2023 23:26:48 +0000 (23:26 +0000)]
.pick_status.json: Updates notes for 6a92af158dc132eee449c175bdee66d92c68d191

10 months agoegl/surfaceless: Fix EGL_DEVICE_EXT implementation
Robert Foss [Thu, 9 Nov 2023 14:16:46 +0000 (15:16 +0100)]
egl/surfaceless: Fix EGL_DEVICE_EXT implementation

The native_display checks are incorrect and partially never
executed due to native_display always being NULL.

Fixes: 1efaa858890 ("egl: Fix attrib_list[0] == EGL_NONE check")
Signed-off-by: Robert Foss <rfoss@kernel.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26131>
(cherry picked from commit cda9980f9639093cf86897a760e90c89df7b6c0f)

10 months agoci/b2c: drop passthrough of unset CI_JOB_JWT
Eric Engestrom [Tue, 12 Dec 2023 13:17:16 +0000 (13:17 +0000)]
ci/b2c: drop passthrough of unset CI_JOB_JWT

Fixes: dabc068e6c04dca7800c ("ci: Use ci-fairy minio login via token file")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26653>
(cherry picked from commit 6cc6ebde3a16f76c5fe42aac7136c3384bafe338)