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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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: 1a95d43e55 ("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>
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>
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: 7d25c04236 ("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>