mesa/src/gallium/drivers
Charmaine Lee 75b7296fc3 svga: fix resource_get_handle from resource created without SHARED bind flag
When an EGLImage is created from a 2D texture and used for texture sharing,
the texture surface might not have been created with the SHARED bind flag.
To allow these surfaces for sharing, this patch sets the USAGE SHARED bit
for surfaces that can be potentially used for sharing even when the SHARED
bind flag is not originally set. Instead of unconditionally enabling the
SHARED bind flag for all surfaces and unnecessarily bypass the surface cache
optimization, this patch only enables the USAGE SHARED bit for surfaces
that also have the RENDER TARGET bind flag.
When the surface handle is inquired and if the surface is currently
marked as cachable, we will need to unset the cachable bit so
the surface handle will not be recycled again.

This patch fixes an assertion in svga_resource_get_handle() when the
EGL_MESA_image_dma_buf_export extension is used in webgl benchamrk running
from firefox in Fedora 37.

Cc: mesa-stable

Reviewed-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21393>
2023-02-21 09:48:23 -08:00
..
asahi asahi: Make shader-db work again 2023-02-21 08:24:58 +00:00
crocus intel: Use common helpers for TCS passthrough shaders 2023-02-20 03:54:24 +00:00
d3d12 d3d12: Don't clear d3d12_shader_key 2023-02-13 22:57:03 +00:00
etnaviv nir: add assertions that loops don't have a Continue Construct 2023-02-21 10:41:11 +00:00
freedreno nir: add assertions that loops don't have a Continue Construct 2023-02-21 10:41:11 +00:00
i915 ci: Disable systems in my farm that haven't recovered. 2023-02-10 02:53:09 +00:00
iris iris: Export num_fences() 2023-02-20 18:29:47 +00:00
lima nir: add assertions that loops don't have a Continue Construct 2023-02-21 10:41:11 +00:00
llvmpipe llvmpipe: only use accurate_a0 hack if there are no textures bound 2023-02-21 17:15:34 +00:00
nouveau nvc0/nv50: support and enable EXT_memory_object* 2023-02-13 12:03:13 +00:00
panfrost panfrost: Disable CRC by default 2023-02-17 14:36:01 +00:00
r300 r300: set register file to none if swizzles are constant only 2023-02-06 20:31:56 +00:00
r600 nir: add assertions that loops don't have a Continue Construct 2023-02-21 10:41:11 +00:00
radeonsi nir: add assertions that loops don't have a Continue Construct 2023-02-21 10:41:11 +00:00
softpipe gallium: create query_memory_info implementation for sw drivers 2023-02-20 04:26:28 +00:00
svga svga: fix resource_get_handle from resource created without SHARED bind flag 2023-02-21 09:48:23 -08:00
tegra gallium: fixup some inconsistent uses of enum pipe_shader_type. 2022-08-04 08:17:39 +00:00
v3d v3d: support r{g,gba}16f formats for vertex buffers 2023-02-20 07:45:58 +00:00
vc4 nir: add assertions that loops don't have a Continue Construct 2023-02-21 10:41:11 +00:00
virgl virgl: add more formats to conv table 2023-02-17 09:23:27 +00:00
zink nir: add assertions that loops don't have a Continue Construct 2023-02-21 10:41:11 +00:00