Commit Graph

157974 Commits

Author SHA1 Message Date
Pierre-Eric Pelloux-Prayer
50e6a80b5e radeonsi/tests: cosmetic changes
Reviewed-by: Ganesh Belgur Ramachandra <ganesh.belgurramachandra@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17907>
2022-08-11 11:01:31 +00:00
Pierre-Eric Pelloux-Prayer
7d7275dd88 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>
2022-08-11 11:01:31 +00:00
Pierre-Eric Pelloux-Prayer
b4b7162e23 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>
2022-08-11 11:01:31 +00:00
Pierre-Eric Pelloux-Prayer
4d7637bb73 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>
2022-08-11 11:01:31 +00:00
Pierre-Eric Pelloux-Prayer
62d3f799de 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>
2022-08-11 11:01:31 +00:00
Feng Jiang
6b5aecb195 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>
2022-08-11 10:21:03 +00:00
Feng Jiang
15c210649d 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>
2022-08-11 10:21:03 +00:00
Feng Jiang
e2199651b8 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>
2022-08-11 10:21:03 +00:00
Feng Jiang
a7366d68ae 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>
2022-08-11 10:21:03 +00:00
Karmjit Mahil
04d192fccb 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>
2022-08-11 09:59:05 +00:00
Yusuf Khan
4e9cce39d3 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>
2022-08-10 22:22:06 +00:00
Jesse Natalie
17eda68df3 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>
2022-08-10 21:00:43 +00:00
Jesse Natalie
efd2ae6c0c 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>
2022-08-10 21:00:43 +00:00
Jesse Natalie
35e9c7e082 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>
2022-08-10 21:00:43 +00:00
Jesse Natalie
aeb3147a96 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>
2022-08-10 21:00:43 +00:00
Jesse Natalie
e08d2dde22 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>
2022-08-10 21:00:43 +00:00
Jesse Natalie
52e663959e 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>
2022-08-10 21:00:43 +00:00
Jesse Natalie
c512b68816 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>
2022-08-10 21:00:43 +00:00
Jesse Natalie
250bdcbfbe 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>
2022-08-10 21:00:43 +00:00
Jesse Natalie
f5b1824ce3 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>
2022-08-10 21:00:43 +00:00
Jesse Natalie
d57a4abcf8 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>
2022-08-10 21:00:43 +00:00
Jesse Natalie
76756ea4c6 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>
2022-08-10 21:00:42 +00:00
Jesse Natalie
0e8271b27a 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>
2022-08-10 21:00:42 +00:00
Jesse Natalie
1d9e0a4ab0 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>
2022-08-10 21:00:42 +00:00
Jesse Natalie
501154b4ed 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>
2022-08-10 21:00:42 +00:00
Jesse Natalie
0f533b3640 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>
2022-08-10 21:00:42 +00:00
Jesse Natalie
1d0757e2e3 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>
2022-08-10 21:00:42 +00:00
Jesse Natalie
87931cdb1f 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>
2022-08-10 21:00:42 +00:00
Jesse Natalie
c205641ccf 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>
2022-08-10 21:00:42 +00:00
Jesse Natalie
11ee16493d 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>
2022-08-10 21:00:42 +00:00
Jesse Natalie
8cab2ae240 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>
2022-08-10 21:00:42 +00:00
Yonggang Luo
e7b4af434b 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>
2022-08-10 20:14:15 +00:00
Yonggang Luo
125a952b66 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>
2022-08-10 20:14:15 +00:00
Yonggang Luo
e819f71379 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>
2022-08-10 20:14:15 +00:00
Mike Blumenkrantz
c37c6ac613 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>
2022-08-10 19:44:59 +00:00
Mike Blumenkrantz
b7eda568a4 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>
2022-08-10 19:44:59 +00:00
Mike Blumenkrantz
632e1b66f5 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>
2022-08-10 19:44:58 +00:00
Samuel Pitoiset
524f173c03 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>
2022-08-10 19:21:12 +00:00
Samuel Pitoiset
95232bf261 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>
2022-08-10 19:21:12 +00:00
Juston Li
95b0b2bea0 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>
2022-08-10 19:07:22 +00:00
Chad Versace
56f3319519 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>
2022-08-10 18:17:52 +00:00
Chad Versace
e643173cc5 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>
2022-08-10 18:17:52 +00:00
Chad Versace
33e791bc02 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>
2022-08-10 18:17:52 +00:00
Chad Versace
d39e202dac 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>
2022-08-10 18:17:52 +00:00
Chad Versace
d6f2915ae5 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>
2022-08-10 18:17:52 +00:00
Chad Versace
4ab3b40f2e 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>
2022-08-10 18:17:52 +00:00
Chad Versace
661fc52c90 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>
2022-08-10 18:17:52 +00:00
Chad Versace
5f70e08ed7 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>
2022-08-10 18:17:52 +00:00
Chad Versace
cf6099e425 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>
2022-08-10 18:17:52 +00:00
Chad Versace
063a13d67e 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>
2022-08-10 18:17:52 +00:00