platform/upstream/mesa.git
2 years agoradeonsi/tests: cosmetic changes
Pierre-Eric Pelloux-Prayer [Mon, 8 Aug 2022 14:07:08 +0000 (16:07 +0200)]
radeonsi/tests: cosmetic changes

Reviewed-by: Ganesh Belgur Ramachandra <ganesh.belgurramachandra@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17907>

2 years agoradeonsi/tests: update navi21 expected results
Pierre-Eric Pelloux-Prayer [Mon, 8 Aug 2022 14:00:29 +0000 (16:00 +0200)]
radeonsi/tests: update navi21 expected results

Reviewed-by: Ganesh Belgur Ramachandra <ganesh.belgurramachandra@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17907>

2 years agoradeonsi/tests: update raven expected results
Pierre-Eric Pelloux-Prayer [Fri, 5 Aug 2022 08:56:07 +0000 (10:56 +0200)]
radeonsi/tests: update raven expected results

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ganesh Belgur Ramachandra <ganesh.belgurramachandra@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17907>

2 years agoradeonsi/tests: add testing of the khr-single tests
Pierre-Eric Pelloux-Prayer [Fri, 5 Aug 2022 08:55:04 +0000 (10:55 +0200)]
radeonsi/tests: add testing of the khr-single tests

This is similar to what's done in !17876.

KHR-Single-GL46.arrays_of_arrays_gl.AtomicUsage is only executed when
--slow is used because it takes about 200 seconds.

Reviewed-by: Ganesh Belgur Ramachandra <ganesh.belgurramachandra@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17907>

2 years agoradeonsi/tests: remove left-over debug print
Pierre-Eric Pelloux-Prayer [Fri, 5 Aug 2022 08:54:26 +0000 (10:54 +0200)]
radeonsi/tests: remove left-over debug print

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ganesh Belgur Ramachandra <ganesh.belgurramachandra@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17907>

2 years agovirgl: add support for hardware video acceleration
Feng Jiang [Mon, 20 Jun 2022 07:10:58 +0000 (15:10 +0800)]
virgl: add support for hardware video acceleration

Currently H.264 and H.265 decoding is supported, and other profiles
and encodings will be added in the future.

This function relies on the virglrenderer commit:
a92fed821f5ac173ca82c011a5d7e5b25e7bd0eb

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Ming Xie <xieming@kylinos.cn>
Signed-off-by: Liming Sun <sunliming@kylinos.cn>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17157>

2 years agogallium/util: add a new helper function pipe_buffer_size()
Feng Jiang [Mon, 20 Jun 2022 06:35:35 +0000 (14:35 +0800)]
gallium/util: add a new helper function pipe_buffer_size()

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Liming Sun <sunliming@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17157>

2 years agovl: change vl_video_buffer_destroy() to non-static
Feng Jiang [Mon, 20 Jun 2022 06:30:08 +0000 (14:30 +0800)]
vl: change vl_video_buffer_destroy() to non-static

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Ming Xie <xieming@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17157>

2 years agogallium: add key size to the structure pipe_picture_desc
Feng Jiang [Mon, 20 Jun 2022 06:22:28 +0000 (14:22 +0800)]
gallium: add key size to the structure pipe_picture_desc

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Liming Sun <sunliming@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17157>

2 years agopvr: Fix bo mapping on alloc with PVR_BO_ALLOC_FLAG_CPU_ACCESS.
Karmjit Mahil [Mon, 8 Aug 2022 15:24:41 +0000 (16:24 +0100)]
pvr: Fix bo mapping on alloc with PVR_BO_ALLOC_FLAG_CPU_ACCESS.

If PVR_BO_ALLOC_FLAG_CPU_ACCESS was specified when calling
pvr_bo_alloc() the new bo was also being cpu mapped while this
was not the intention as the PVR_BO_ALLOC_FLAG_CPU_MAPPED is meant
to be used for that purpose. Fixed in this commit.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17984>

2 years agonouveau: implement and enable PIPE_CAP_QUERY_MEMORY_INFO
Yusuf Khan [Sun, 7 Aug 2022 21:35:11 +0000 (17:35 -0400)]
nouveau: implement and enable PIPE_CAP_QUERY_MEMORY_INFO

Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17931>

2 years agoegl/wgl: Fix some awkward sizeof formatting
Jesse Natalie [Wed, 10 Aug 2022 20:16:45 +0000 (13:16 -0700)]
egl/wgl: Fix some awkward sizeof formatting

Fixes: 3415bf02 ("egl: Add a basic Windows driver")
Suggested-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoegl/wgl: Delete unused variables/code
Jesse Natalie [Thu, 28 Apr 2022 17:41:12 +0000 (10:41 -0700)]
egl/wgl: Delete unused variables/code

Fixes: 3415bf02 ("egl: Add a basic Windows driver")
Suggested-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agowgl: Use pfi instead of iPixelFormat more often
Jesse Natalie [Tue, 21 Sep 2021 22:33:26 +0000 (15:33 -0700)]
wgl: Use pfi instead of iPixelFormat more often

Also, support config-less contexts, and surface-less contexts.

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoegl/wgl: Support sync objects
Jesse Natalie [Tue, 21 Sep 2021 17:43:07 +0000 (10:43 -0700)]
egl/wgl: Support sync objects

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoegl/wgl: Support EGL_MESA_query_driver
Jesse Natalie [Tue, 21 Sep 2021 16:42:16 +0000 (09:42 -0700)]
egl/wgl: Support EGL_MESA_query_driver

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoegl/wgl: Hook up image validate/get in smapi
Jesse Natalie [Tue, 21 Sep 2021 16:21:42 +0000 (09:21 -0700)]
egl/wgl: Hook up image validate/get in smapi

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoegl/wgl: Use a per-display st_manager
Jesse Natalie [Tue, 21 Sep 2021 16:00:29 +0000 (09:00 -0700)]
egl/wgl: Use a per-display st_manager

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agowgl: Pass smapi explicitly to framebuffer creation
Jesse Natalie [Tue, 21 Sep 2021 15:45:04 +0000 (08:45 -0700)]
wgl: Pass smapi explicitly to framebuffer creation

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agowgl: Pass smapi explicitly to context creation
Jesse Natalie [Tue, 21 Sep 2021 15:39:23 +0000 (08:39 -0700)]
wgl: Pass smapi explicitly to context creation

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoegl,wgl: Support eglCreateImageKHR
Jesse Natalie [Mon, 20 Sep 2021 22:24:19 +0000 (15:24 -0700)]
egl,wgl: Support eglCreateImageKHR

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoegl/wgl: Support eglWaitNative
Jesse Natalie [Mon, 20 Sep 2021 16:51:01 +0000 (09:51 -0700)]
egl/wgl: Support eglWaitNative

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoegl/wgl: Support eglWaitClient
Jesse Natalie [Mon, 20 Sep 2021 16:49:48 +0000 (09:49 -0700)]
egl/wgl: Support eglWaitClient

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoegl/wgl: Support eglSwapInterval
Jesse Natalie [Mon, 20 Sep 2021 16:41:52 +0000 (09:41 -0700)]
egl/wgl: Support eglSwapInterval

Note, eglSwapInterval spec says "The default swap interval is 1."

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agowgl: Allow per-framebuffer swap interval overrides
Jesse Natalie [Mon, 20 Sep 2021 16:39:55 +0000 (09:39 -0700)]
wgl: Allow per-framebuffer swap interval overrides

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoegl/wgl: Implement bind/release texture buffer
Jesse Natalie [Sat, 18 Sep 2021 01:54:19 +0000 (18:54 -0700)]
egl/wgl: Implement bind/release texture buffer

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoegl/wgl: Set YInvert attribute to always true
Jesse Natalie [Sat, 18 Sep 2021 01:54:02 +0000 (18:54 -0700)]
egl/wgl: Set YInvert attribute to always true

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoegl/wgl: Implement PBuffer surfaces
Jesse Natalie [Thu, 16 Sep 2021 21:43:02 +0000 (14:43 -0700)]
egl/wgl: Implement PBuffer surfaces

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agowgl: Split pbuffer creation into two functions
Jesse Natalie [Thu, 16 Sep 2021 20:31:04 +0000 (13:31 -0700)]
wgl: Split pbuffer creation into two functions

One creates a window and framebuffer, the other deals with
wgl-specific attribute parsing and GDI interactions.

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoegl/wgl: Implement QuerySurface
Jesse Natalie [Thu, 16 Sep 2021 18:52:05 +0000 (11:52 -0700)]
egl/wgl: Implement QuerySurface

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoegl/wgl: Don't require a native display to support window surfaces
Jesse Natalie [Fri, 24 Sep 2021 15:41:05 +0000 (08:41 -0700)]
egl/wgl: Don't require a native display to support window surfaces

Found a Windows EGL/GLES app that inits EGL without a native display,
and then creates a window surface from that EGL display:
https://github.com/danginsburg/opengles3-book/

Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Acked-by: Sidney Just <justsid@x-plane.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Tested-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12964>

2 years agoc11: Implement and use of thrd_current properly on win32
Yonggang Luo [Tue, 19 Apr 2022 20:13:25 +0000 (04:13 +0800)]
c11: Implement and use of thrd_current properly on win32

Now thrd_t are a struct that contains both thread handle and thread id.
For threads that not created by thrd_create, thrd_current are returning pseudo thread handle;
but we can still compare threads differences by using thread id.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17071>

2 years agoc11: call impl_tss_dtor_invoke with tls callback for win32
Yonggang Luo [Tue, 9 Aug 2022 17:32:33 +0000 (01:32 +0800)]
c11: call impl_tss_dtor_invoke with tls callback for win32

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17071>

2 years agoc11: It's should detect PTHREAD_DESTRUCTOR_ITERATIONS when define TSS_DTOR_ITERATIONS
Yonggang Luo [Thu, 16 Jun 2022 05:56:10 +0000 (13:56 +0800)]
c11: It's should detect PTHREAD_DESTRUCTOR_ITERATIONS when define TSS_DTOR_ITERATIONS

INIT_ONCE_STATIC_INIT looks like miscopied from Win32's init once macro
Correct implementation for reference
https://gitlab.inria.fr/gustedt/p99/-/blob/master/p99/p99_threads_posix.h#L64

C11 standard:
https://en.cppreference.com/w/c/thread/TSS_DTOR_ITERATIONS

As TSS_DTOR_ITERATIONS didn't used in mesa codebase, so it's won't affect anything in mesa

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17071>

2 years agonir/validate: add some (light) validation for sampler type matching
Mike Blumenkrantz [Wed, 3 Aug 2022 14:58:03 +0000 (10:58 -0400)]
nir/validate: add some (light) validation for sampler type matching

this adds minimal validation for tex ops with derefs to check that the
dest type integer-ness matches the sampled type's integer-ness

the aim is to provide the most basic validation that nir is being modified
and created consistently, not to perform exact verification that
the types are identical

fix #6985

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17874>

2 years agonir/validate: clamp unsized tex dests to 32bit
Mike Blumenkrantz [Tue, 9 Aug 2022 21:58:01 +0000 (17:58 -0400)]
nir/validate: clamp unsized tex dests to 32bit

this is the "default" size that's expected

cc: mesa-stable

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17874>

2 years agoradv: fix return type for meta resolve shaders
Mike Blumenkrantz [Tue, 9 Aug 2022 22:30:41 +0000 (18:30 -0400)]
radv: fix return type for meta resolve shaders

this should match the image type

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17874>

2 years agoradv: explain why radv_invariant_geom is still needed for SotTR DX
Samuel Pitoiset [Wed, 10 Aug 2022 12:30:40 +0000 (14:30 +0200)]
radv: explain why radv_invariant_geom is still needed for SotTR DX

It's disabled by DXVK and vkd3d because it breaks NV.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17951>

2 years agoradv: remove radv_invariant_geom workarounds for DX games
Samuel Pitoiset [Tue, 9 Aug 2022 08:25:53 +0000 (10:25 +0200)]
radv: remove radv_invariant_geom workarounds for DX games

DXVK (v1.8+, Feb 19, 2021) enabled invariant position with:
    "[d3d11] Enable d3d11.invariantPosition by default"
    (8de9dc93781b61a902a2dc15cc4192514a821237)

vkd3d-proton (v2.5+, Oct 18, 2021) enabled invariant position with:
    "vkd3d-shader: Add INVARIANT_POSITION quirk."
    (32c5abf4963e07b3d7cbf1c95a9249dce16473d7)

It's recommanded to use Proton 7 or newer to ensure DXVK/vkd3d-proton
contain the invariant position fixes. Otherwise this change might
introduce regressions with older Proton versions.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17951>

2 years agovenus: Enable VK_EXT_texture_compression_astc_hdr
Juston Li [Mon, 8 Aug 2022 21:36:17 +0000 (14:36 -0700)]
venus: Enable VK_EXT_texture_compression_astc_hdr

See: virgl/virglrenderer!874

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17967>

2 years agovenus/pipeline: Fix ignore rules for VK_EXT_extended_dynamic_state
Chad Versace [Mon, 25 Jul 2022 23:19:09 +0000 (16:19 -0700)]
venus/pipeline: Fix ignore rules for VK_EXT_extended_dynamic_state

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>

2 years agovenus/pipeline: Fix ignore rules for VK_KHR_dynamic_rendering
Chad Versace [Mon, 25 Jul 2022 23:11:15 +0000 (16:11 -0700)]
venus/pipeline: Fix ignore rules for VK_KHR_dynamic_rendering

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>

2 years agovenus/pipeline: Ignore basePipelineHandle
Chad Versace [Mon, 25 Jul 2022 21:50:55 +0000 (14:50 -0700)]
venus/pipeline: Ignore basePipelineHandle

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>

2 years agovenus/pipeline: Ignore pViewportState::pScissors
Chad Versace [Mon, 25 Jul 2022 21:32:25 +0000 (14:32 -0700)]
venus/pipeline: Ignore pViewportState::pScissors

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>

2 years agovenus/pipeline: Ignore pViewportState::pViewports
Chad Versace [Mon, 25 Jul 2022 21:26:24 +0000 (14:26 -0700)]
venus/pipeline: Ignore pViewportState::pViewports

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>

2 years agovenus/pipeline: Fix ignore rule for pColorBlendState
Chad Versace [Mon, 23 May 2022 23:53:24 +0000 (16:53 -0700)]
venus/pipeline: Fix ignore rule for pColorBlendState

The ignore logic was too eager. We must inspect the subpass.

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>

2 years agovenus/pipeline: Fix ignore rule for pDepthStencilState
Chad Versace [Mon, 23 May 2022 23:53:24 +0000 (16:53 -0700)]
venus/pipeline: Fix ignore rule for pDepthStencilState

The ignore logic was too eager. We must inspect the subpass.

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>

2 years agovenus/pipeline: Split ignore rules for pViewportState, pMultisampleState
Chad Versace [Mon, 23 May 2022 23:53:24 +0000 (16:53 -0700)]
venus/pipeline: Split ignore rules for pViewportState, pMultisampleState

The ignore rules for VkGraphicsPipelineCreateInfo::pViewportState,
pMultisampleState, pDepthStencilState, and pColorBlendState, they were
all lumped together under a single ignore rule. Split them out because
the rules for pDepthStencilState and pColorBlendState should be
different.

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>

2 years agovenus/pipeline: Add pipeline state bools for ignore rules
Chad Versace [Fri, 29 Jul 2022 21:17:09 +0000 (14:17 -0700)]
venus/pipeline: Add pipeline state bools for ignore rules

For each pipeline state category, we define a bool.

The Vulkan spec (1.3.223) says:
   The state required for a graphics pipeline is divided into vertex
   input state, pre-rasterization shader state, fragment shader state,
   and fragment output state.

This patch merely defines the bools and does a minor refactor. It does
not add new ignore rules.

Without VK_EXT_graphics_pipeline_library, most states are
unconditionally included in the pipeline. Despite that, we still
reference the state bools in the ignore rules because (a) it makes the
ignore condition easier to validate against the text of the relevant
VUs; and (b) it makes it easier to enable
VK_EXT_graphics_pipeline_library because we won't need to carefully
revisit the text of each VU to add the missing pipeline state bools.

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>

2 years agovenus/pipeline: Refactor vn_fix_graphics_pipeline_create_info
Chad Versace [Thu, 28 Jul 2022 17:16:15 +0000 (10:16 -0700)]
venus/pipeline: Refactor vn_fix_graphics_pipeline_create_info

- Instead of deferring all fixes until we inspect all pCreateInfos, fix
  each pCreateInfo immediately after we inspect it.
- Do not allocate vn_graphics_pipeline_create_info_fix.
- Add a struct to hold the temporary allocation of fixed pCreateInfos.
  Later commits will place more vk structs here.

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>

2 years agovenus: Track subpass properties
Chad Versace [Mon, 25 Jul 2022 20:09:16 +0000 (13:09 -0700)]
venus: Track subpass properties

Needed to fix the ignore rules for
VkGraphicsPipelineCreateInfo::pColorBlendState and ::pDepthStencilState.

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>

2 years agovenus: Drop vn_present_src_attachment::acquire
Chad Versace [Thu, 4 Aug 2022 19:42:30 +0000 (12:42 -0700)]
venus: Drop vn_present_src_attachment::acquire

The field is redundant.

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>

2 years agovenus: Remove cryptic pointer arithmetic on present attachments
Chad Versace [Mon, 23 May 2022 23:53:23 +0000 (16:53 -0700)]
venus: Remove cryptic pointer arithmetic on present attachments

Each time some code wanted to access in vn_render_pass the present
acquire attachments or the present release attachments, it needed to
know the memory layout of vn_render_pass and do pointer arithmetic.
It's fragile to handroll this layout knowledge and pointer arithmetic
throughout the code, so add a pointer in vn_render_pass for each
attachment type.

The new pointers are:
  - present_attachments: all present attachments
  - present_acquire_attachments: a subslice of present_attachments
  - present_release_attachments: a subslice of present_attachments

Signed-off-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16681>

2 years agosvga: fix SetConstantBufferOffset command opcode
Charmaine Lee [Wed, 10 Aug 2022 02:39:29 +0000 (19:39 -0700)]
svga: fix SetConstantBufferOffset command opcode

This patch fixes the SetConstantBufferOffset command opcode which is
not mapped correctly after the reordering of the pipe shader type defines.

Acked-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17977>

2 years agoradv: do not set registers for PSO states that are dynamic
Samuel Pitoiset [Thu, 21 Jul 2022 08:35:53 +0000 (10:35 +0200)]
radv: do not set registers for PSO states that are dynamic

Dynamic states are emitted from the cmdbuf, setting them from the
pipeline has no effects because they should be ignored anyways.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17677>

2 years agoradv: simplify dynamic states uses when determining NGG culling settings
Samuel Pitoiset [Thu, 21 Jul 2022 15:47:32 +0000 (17:47 +0200)]
radv: simplify dynamic states uses when determining NGG culling settings

Looking at the dynamic states is enough.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17677>

2 years agoradv: remove one useless check about line width and dynamic state
Samuel Pitoiset [Thu, 21 Jul 2022 10:50:28 +0000 (12:50 +0200)]
radv: remove one useless check about line width and dynamic state

It's now checked when the rasterization state is initialized.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17677>

2 years agoradv: properly ignore PSO states that are dynamic
Samuel Pitoiset [Thu, 21 Jul 2022 10:50:26 +0000 (12:50 +0200)]
radv: properly ignore PSO states that are dynamic

They should be ignored because it's allowed to have garbage in there.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17677>

2 years agoiris: return failure if iris_resource_configure_main fail
Shuicheng Lin [Tue, 19 Jul 2022 08:23:59 +0000 (08:23 +0000)]
iris: return failure if iris_resource_configure_main fail

For surface created by eglCreatePbufferSurface with attrib_list is NULL
or empty, the width/height info is 0. Then in the next eglMakeCurrent
call, it will try to allocate the buffer with the 0 width/height, then
call surf_fill_state_s with 0 width/height, so the isl_extent3d returned
by isl_get_image_alignment is (0, 0, 0), and the unreachable code will
cause process crash with:
"stack corruption detected (-fstack-protector)".

As the width is 0, it causes row_pitch_B is 0 in isl_calc_row_pitch.
And it leads to iris_resource_configure_main return fail. Update code
to return fail to avoid the crash.

Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17621>

2 years agolavapipe: Remove st_shader_stage_to_ptarget
Konstantin Seurer [Sun, 7 Aug 2022 18:13:10 +0000 (20:13 +0200)]
lavapipe: Remove st_shader_stage_to_ptarget

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17930>

2 years agonir: add a nir_opt_if_options enum
Pierre-Eric Pelloux-Prayer [Mon, 8 Aug 2022 15:12:14 +0000 (17:12 +0200)]
nir: add a nir_opt_if_options enum

And don't enable nir_opt_if_optimize_phi_true_false on radeonsi with
LLVM 14 because it crashes Blender.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6976
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17949>

2 years agollvmpipe: Double number of SSBOs
Gert Wollny [Wed, 10 Aug 2022 08:27:33 +0000 (10:27 +0200)]
llvmpipe: Double number of SSBOs

llvmpipe doesn't define atomics, and therefore, gallium uses half of the
available SSBOs as atomic buffers. When virgl runs with llvmpipe as GLES
host we also report no atomic buffers to the guest so as to lower
atomics to SSBOs to work around ARB_shader_counter_ops not being
available on GLES. With the current value of 16 SSBOs in llvmpipe, only
eight SSBOs and eight atomic shader buffers are reported and with
virglrenderer not reporting atomics these numbers will be reduced to
four, being below the required minimum for ARB_compute_shaders.

By doubling the number of available SSBOs in llvmpipe, this limitation
is worked around and using llvmpipe as GLES host for virgl in the CI
allows testing ARB_compute_shaders and ARB_shader_counter_ops properly.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17979>

2 years agoaco: fix hash statistic
Rhys Perry [Tue, 9 Aug 2022 10:42:10 +0000 (11:42 +0100)]
aco: fix hash statistic

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 897561b7b98 ("aco: add aco_postprocess_shader() helper")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17954>

2 years agoradeonsi-raven/ci: Move spec@arb_timer_query@timestamp-get to flakes
Gert Wollny [Wed, 10 Aug 2022 10:29:05 +0000 (12:29 +0200)]
radeonsi-raven/ci: Move spec@arb_timer_query@timestamp-get to flakes

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17982>

2 years agoamd/common: move ac_memory_ops_per_clock into ac_gpu_info.h
Friedrich Vock [Tue, 14 Jun 2022 10:01:10 +0000 (12:01 +0200)]
amd/common: move ac_memory_ops_per_clock into ac_gpu_info.h

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17973>

2 years agozink: do not use VK_FORMAT_D32_SFLOAT_S8_UINT without checking
Erik Faye-Lund [Mon, 8 Aug 2022 14:10:54 +0000 (16:10 +0200)]
zink: do not use VK_FORMAT_D32_SFLOAT_S8_UINT without checking

Without this, we might end up trying to use VK_FORMAT_D32_SFLOAT_S8_UINT
even when it's not supported...

Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17953>

2 years agozink: add have_D32_SFLOAT_S8_UINT boolean
Erik Faye-Lund [Tue, 9 Aug 2022 10:23:26 +0000 (12:23 +0200)]
zink: add have_D32_SFLOAT_S8_UINT boolean

This will be reused in the following commit.

Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17953>

2 years agoradv: fix cleaning the meta query state if an error occured
Samuel Pitoiset [Tue, 9 Aug 2022 08:53:02 +0000 (10:53 +0200)]
radv: fix cleaning the meta query state if an error occured

It's already correctly cleaned in radv_device_init_meta().

This fixes a recent regression with
dEQP-VK.api.device_init.create_instance_device_intentional_alloc_fail.

Fixes: 1a95d43e550 ("radv: Simplify the meta init fail path")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17952>

2 years agoradv: respect the render area for depth/stencil resolves
Samuel Pitoiset [Tue, 9 Aug 2022 07:42:51 +0000 (09:42 +0200)]
radv: respect the render area for depth/stencil resolves

Subpass resolves don't necessarily start from 0,0.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17950>

2 years agosvga: fix mksstats build
Charmaine Lee [Wed, 3 Aug 2022 18:40:32 +0000 (11:40 -0700)]
svga: fix mksstats build

Trivial.

Fixes: ed77ac1eef7 ("svga: add a helper function for common shader creation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17971>

2 years agoci/windows: Setup proper MESA_IMAGE_TAG for Windows build/test image
Yonggang Luo [Thu, 4 Aug 2022 19:59:37 +0000 (03:59 +0800)]
ci/windows: Setup proper MESA_IMAGE_TAG for Windows build/test image

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17600>

2 years agoci/windows: Install Graphics-Tools package on the base image
Jesse Natalie [Mon, 18 Jul 2022 16:44:38 +0000 (09:44 -0700)]
ci/windows: Install Graphics-Tools package on the base image

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17600>

2 years agoegl/x11: implement ANGLE_sync_control_rate
Yonggang Luo [Sat, 30 Jul 2022 09:59:33 +0000 (17:59 +0800)]
egl/x11: implement ANGLE_sync_control_rate

Implement EGL_ANGLE_sync_control_rate for running Chromium Linux on Wayland with EGL backend.

Chromium works with this patch using(with videos playing smoothly):
/usr/bin/google-chrome-stable --use-gl=egl --enable-features=VaapiVideoDecoder --ignore-gpu-blocklist

Closes #2930

Signed-off-by: KJ Liew <liewkj@yahoo.com>
Signed-off-by: Térence Clastres <t.clastres@gmail.com>
Signed-off-by: Satadru Pramanik <satadru@gmail.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17815>

2 years agoegl/x11: Split declaration of dri2_format_for_depth into header platform_x11.h
Yonggang Luo [Thu, 4 Aug 2022 16:00:08 +0000 (00:00 +0800)]
egl/x11: Split declaration of dri2_format_for_depth into header platform_x11.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17815>

2 years agoegl: wire up ANGLE_sync_control_rate
Yonggang Luo [Sat, 30 Jul 2022 09:28:54 +0000 (17:28 +0800)]
egl: wire up ANGLE_sync_control_rate

Add eglGetMscRateANGLE prototype into generate file

Signed-off-by: KJ Liew <liewkj@yahoo.com>
Signed-off-by: Térence Clastres <t.clastres@gmail.com>
Signed-off-by: Satadru Pramanik <satadru@gmail.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17815>

2 years agoegl: Remove eglextchromium.h and import eglext_angle.h
Yonggang Luo [Sat, 30 Jul 2022 09:44:16 +0000 (17:44 +0800)]
egl: Remove eglextchromium.h and import eglext_angle.h

The upstream eglextchromium.h in https://chromium.googlesource.com/chromium/src/+/refs/heads/master/ui/gl/EGL/eglextchromium.h
are broken, so remove it and using eglext_angle.h instead.

By running "python bin/khronos-update.py egl" to update EGL files,
then discard changes other than eglext_angle.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17815>

2 years agoci/windows: Windows runner is back online
Jesse Natalie [Tue, 9 Aug 2022 17:00:36 +0000 (10:00 -0700)]
ci/windows: Windows runner is back online

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17962>

2 years agoanv: emit scissors when the pipeline changes
Iván Briano [Tue, 9 Aug 2022 18:41:31 +0000 (11:41 -0700)]
anv: emit scissors when the pipeline changes

With the switch to common dynamic state tracking, something got lost
that made the scissors not always be emitted when they are not dynamic
and the pipeline is marked dirty.

Since both viewport and scissors make use of each other to calculate
their values, just stick the scissor emit in the same if block as
viewport for now.
I'd rather have them decoupled, and at least the Vulkan CTS didn't
complain when I tried it, but I don't know what other effects that
may have, especially when it comes to the guardband.

Fixes a bunch of tests under
dEQP-VK.pipeline.*.multisample.misc.*

Fixes: 7d25c04236b ("anv: Switch to using common dynamic state tracking")

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17964>

2 years agoci/lavapipe: wine flakes, switch to manual for now
David Heidelberg [Tue, 9 Aug 2022 19:33:43 +0000 (21:33 +0200)]
ci/lavapipe: wine flakes, switch to manual for now

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

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17965>

2 years agogallium/u_blitter: make the bilinear filter for MSAA resolving conformant
Marek Olšák [Sun, 17 Jul 2022 16:21:17 +0000 (12:21 -0400)]
gallium/u_blitter: make the bilinear filter for MSAA resolving conformant

This implements the bilinear filter exactly like OpenGL.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17692>

2 years agogallium/u_blitter: make nearest filtering emulation using TXF conformant
Marek Olšák [Sun, 17 Jul 2022 12:25:23 +0000 (08:25 -0400)]
gallium/u_blitter: make nearest filtering emulation using TXF conformant

This is required by glBlitFramebuffer.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17692>

2 years agogallium/u_blitter: clean up IMMs in util_make_fs_blit_msaa_gen
Marek Olšák [Mon, 18 Jul 2022 12:04:00 +0000 (08:04 -0400)]
gallium/u_blitter: clean up IMMs in util_make_fs_blit_msaa_gen

Always declare IMM[0].

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17692>

2 years agogallium/u_blitter: treat Z scaling as scaled blits
Marek Olšák [Sat, 23 Jul 2022 17:20:44 +0000 (13:20 -0400)]
gallium/u_blitter: treat Z scaling as scaled blits

Hopefully this didn't break anything.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17692>

2 years agogallium/u_blitter: fix the has_txf support condition
Marek Olšák [Wed, 3 Aug 2022 14:54:03 +0000 (10:54 -0400)]
gallium/u_blitter: fix the has_txf support condition

GLSL 1.30 has it too.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17692>

2 years agogallium/u_blitter: remove unused code for integer MSAA resolve
Marek Olšák [Sun, 17 Jul 2022 12:06:14 +0000 (08:06 -0400)]
gallium/u_blitter: remove unused code for integer MSAA resolve

GL doesn't have it.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17692>

2 years agogallivm: initialize texture_unit_offset in emit_size_query
Marek Olšák [Wed, 3 Aug 2022 21:19:42 +0000 (17:19 -0400)]
gallivm: initialize texture_unit_offset in emit_size_query

this fixes a crash, suggested by Dave Airlie

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17692>

2 years agogallivm: fix TXQ crash with MSAA samplers
Marek Olšák [Wed, 3 Aug 2022 18:03:07 +0000 (14:03 -0400)]
gallivm: fix TXQ crash with MSAA samplers

suggested by Dave Airlie

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17692>

2 years agottn: set the correct sampler declaration type in the presense of txs and lod
Marek Olšák [Wed, 3 Aug 2022 14:49:51 +0000 (10:49 -0400)]
ttn: set the correct sampler declaration type in the presense of txs and lod

We used the result type of lod and txs for sampler declarations,
which broke following instructions that are not lod and txs.

Use the sampler type from TGSI if it's present, not the result type
of lod and txs.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17692>

2 years agoci/tu+zink: Re-enable the traces that were asserting about UBWC compatibility.
Emma Anholt [Mon, 8 Aug 2022 00:18:31 +0000 (17:18 -0700)]
ci/tu+zink: Re-enable the traces that were asserting about UBWC compatibility.

The tu and zink fixes have made them work now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17900>

2 years agotu: Use the format list to decide whether we can do UBWC with MUTABLE.
Emma Anholt [Thu, 4 Aug 2022 22:33:35 +0000 (15:33 -0700)]
tu: Use the format list to decide whether we can do UBWC with MUTABLE.

The goal here is to allow zink and ANGLE to switch sRGB on and off, but
keep UBWC enabled for most textures.

This doesn't quite work yet for zink on gbm, where zink asks the device if
it supports a UBWC-modifier image with unorm+sRGB mutable formats (yes),
but then doesn't pass the unorm+sRGB format list to vkImageCreate(), which
then asserts because it couldn't make a general
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT UBWC image.

The format list here comes from Danylo's testing in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17278#note_1447812

Reduces frame times in Genshin Impact GLES AoV 2.02063% +/- 0.207575% (n=5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17900>

2 years agotu: Treat viewFormatCount==0 as no format list.
Emma Anholt [Fri, 5 Aug 2022 03:28:40 +0000 (20:28 -0700)]
tu: Treat viewFormatCount==0 as no format list.

"If viewFormatCount is zero, pViewFormats is ignored and the image is
 created as if the VkImageFormatListCreateInfo structure were not included
 in the pNext chain of VkImageCreateInfo."

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17900>

2 years agotu: Move the vkCreateImage format list checks to helper functions.
Emma Anholt [Fri, 5 Aug 2022 03:21:20 +0000 (20:21 -0700)]
tu: Move the vkCreateImage format list checks to helper functions.

Mixing up the two checks made them both harder to read.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17900>

2 years agozink: Make sure that we keep the existing ici pNext chain on inserts.
Emma Anholt [Mon, 8 Aug 2022 00:10:40 +0000 (17:10 -0700)]
zink: Make sure that we keep the existing ici pNext chain on inserts.

For external image imports, we'd lose the mutable image format list,
causing turnip to get angry that we try to do UBWC despite not having a
UBWC-compatible format list.

Cc: mesa-stable
Fixes: 28ee911ad671 ("zink: handle mutable swapchain images with dmabuf")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17900>

2 years agoc11: Fixes the declaration of timespec_get in time.h for macOS
Yonggang Luo [Sun, 12 Jun 2022 02:02:23 +0000 (10:02 +0800)]
c11: Fixes the declaration of timespec_get in time.h for macOS

../src/util/tests/timespec_test.cpp:327:4: error: use of undeclared identifier 'timespec_get'; did you mean 'timespec_eq'?
   timespec_get(&a, TIME_UTC);
   ^~~~~~~~~~~~
   timespec_eq
../src/util/timespec.h:299:1: note: 'timespec_eq' declared here
timespec_eq(const struct timespec *a, const struct timespec *b)

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16995>

2 years agoutil: open_memstream also support on MacOS
Yonggang Luo [Sun, 7 Aug 2022 05:21:26 +0000 (13:21 +0800)]
util: open_memstream also support on MacOS

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16995>

2 years agomicrosoft/clc: Fixes compiling errors with clang/mingw64 in clc/clc_compiler_test.cpp
Yonggang Luo [Sat, 6 Aug 2022 17:26:10 +0000 (01:26 +0800)]
microsoft/clc: Fixes compiling errors with clang/mingw64 in clc/clc_compiler_test.cpp

clc_compiler_test.cpp:1322:67: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list
      log(0.0f) / log(2), log(1.0f) / log(2), log(2.0f) / log(2), log(3.0f) / log(2)
clc_compiler_test.cpp:2306:25: error: non-constant-expression cannot be narrowed from type 'std::vector<unsigned int>::size_type' (aka 'unsigned long long') to 'unsigned int' in initializer list
   CompileArgs args = { inout.size(), 1, 1 };

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17926>

2 years agomeson: clc compiler test only works on win32
Yonggang Luo [Sun, 7 Aug 2022 17:57:34 +0000 (01:57 +0800)]
meson: clc compiler test only works on win32

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17934>

2 years agoradv: fix gathering XFB info if there is dead outputs
Samuel Pitoiset [Mon, 8 Aug 2022 13:18:18 +0000 (15:18 +0200)]
radv: fix gathering XFB info if there is dead outputs

The driver should still gather XFB info even if all XFB outputs are
dead, otherwise the pipeline can't find the streamout shader.

RADV should use vk_spirv_to_nir() at some point to reduce code
duplication during SPIRV->NIR compilation.

This fixes new dEQP-VK.transform_feedback.simple.*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17939>

2 years agoradv/ci: Put one more board to run the CTS on Stoney Ridge
Tomeu Vizoso [Mon, 8 Aug 2022 08:59:56 +0000 (10:59 +0200)]
radv/ci: Put one more board to run the CTS on Stoney Ridge

These jobs were taking more than 20 minutes to run, slowing the pipeline
down.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17935>

2 years agoradeonsi/ci: Move libva and piglit jobs to Raven Ridge boards
Tomeu Vizoso [Mon, 8 Aug 2022 08:57:38 +0000 (10:57 +0200)]
radeonsi/ci: Move libva and piglit jobs to Raven Ridge boards

As we have some free, and then we can reassign two Stoney Ridge boards
to reduce the duration for some jobs that are taking too long currently.

Also, these machines are much faster so we are able to run all of the
Piglit tests and a bigger portion of the VA tests.

Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17935>