summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/svga
AgeCommit message (Collapse)AuthorFilesLines
2024-03-22treewide: Replace usage of macro DEBUG with MESA_DEBUG when possibleYonggang Luo7-18/+18
This is achieved by the following steps: #ifndef DEBUG => #if !MESA_DEBUG defined(DEBUG) => MESA_DEBUG #ifdef DEBUG => #if MESA_DEBUG This is done by replace in vscode excludes docs,*.rs,addrlib,src/imgui,*.sh,src/intel/vulkan/grl/gpu These are safe because those files should keep DEBUG macro is already excluded; and not directly replace DEBUG, as we have some symbols around it. Use debug or NDEBUG instead of DEBUG in comments when proper This for reduce the usage of DEBUG, so it's easier migrating to MESA_DEBUG These are found when migrating DEBUG to MESA_DEBUG, these are all comment update, so it's safe Replace comment /* DEBUG */ and /* !DEBUG */ with proper /* MESA_DEBUG */ or /* !MESA_DEBUG */ manually DEBUG || !NDEBUG -> MESA_DEBUG || !NDEBUG !DEBUG && NDEBUG -> !(MESA_DEBUG || !NDEBUG) Replace the DEBUG present in comment with proper new MESA_DEBUG manually Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28092>
2024-01-11svga: Cleanup duplicate ALIGN macro definesYonggang Luo1-2/+0
Use ALIGN function instead Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23932>
2024-01-06gallium/pb_buffer: define pb_buffer_lean without vtbl, inherit it by pb_bufferMarek Olšák3-24/+24
amdgpu doesn't need vtbl. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26643>
2024-01-05util: Add align_uintptr and use it treewide to replace ALIGN that works on ↵Yonggang Luo1-5/+5
size_t and uintptr_t Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26866>
2023-10-20svga: Unify gmr and mob surface pool managersMaaz Mombasawala10-215/+144
The svga driver contains several buffer managers with gmr* and mob* prefixes, but they are of similar functionality. The underlying vmwgfx kernel driver allocates memory of one type - mobs if supported by the virtual hardware, and gmrs otherwise - and returns an opaque pointer to userspace, so several managers are reduntant. This patch reduces the number of buffer managers by unifying similar managers and performing refactors where necessary. Signed-off-by: Maaz Mombasawala <mombasawalam@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com> Reviewed-by: Zack Rusin <zackr@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25832>
2023-10-20svga: Make surfaces shareable at creation.Maaz Mombasawala1-6/+3
There is no need to have a separate shareable pool of surfaces, we can make all surfaces shareable. This change makes all surfaces shareable when creating them. Signed-off-by: Maaz Mombasawala <mombasawalam@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com> Reviewed-by: Martin Krastev <krastevm@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25832>
2023-08-09svga: use alignas over struct MKSGuestStatInfoEntryYonggang Luo1-2/+3
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24571>
2023-06-27util: include "util/compiler.h" instead of "pipe/p_compiler.h"Yonggang Luo9-9/+9
And pipe/p_compiler.h are removed as it not used any more Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577>
2023-06-27treewide: Replace the usage of TRUE/FALSE with true/falseYonggang Luo9-99/+99
this is a separate patch as it's won't affect the code style Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577>
2023-06-27treewide: replace usage of boolean to boolYonggang Luo12-77/+77
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Acked-by: Marek Olšák <marek.olsak@amd.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577>
2023-06-05util: Replace all usage of PIPE_TIMEOUT_INFINITE with OS_TIMEOUT_INFINITEYonggang Luo1-1/+1
They are exactly the same, so it's safe to do the replace Also gen OS_TIMEOUT_INFINITE var with rusticl_mesa_bindings_rs by OS_ prefix and include "util/os_time.h" in rusticl/rusticl_mesa_bindings.h Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23401>
2023-05-01svga: Make vmw_svga_winsys_buffer_map definition match declarationMichel Dänzer1-1/+1
Pointed out by GCC 13: ../src/gallium/winsys/svga/drm/vmw_buffer.c:355:1: warning: conflicting types for ‘vmw_svga_winsys_buffer_map’ due to enum/integer mismatch; have ‘void *(struct svga_winsys_screen *, struct svga_winsys_buffer *, enum pipe_map_flags)’ [-Wenum-int-mismatch] 355 | vmw_svga_winsys_buffer_map(struct svga_winsys_screen *sws, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/gallium/winsys/svga/drm/vmw_buffer.c:52: ../src/gallium/winsys/svga/drm/vmw_buffer.h:82:1: note: previous declaration of ‘vmw_svga_winsys_buffer_map’ with type ‘void *(struct svga_winsys_screen *, struct svga_winsys_buffer *, unsigned int)’ 82 | vmw_svga_winsys_buffer_map(struct svga_winsys_screen *sws, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22718>
2023-03-31svga: Add support for `get_screen_fd`Lucas Fryzek1-0/+9
Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21654>
2022-11-22gallium: Replace the usage of __FUNCTION__ with __func__ in all gallium codeYonggang Luo4-22/+22
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19861>
2022-11-15tree-wide: Convert all usage of PIPE_(OS|ARCH|CC)_* to DETECT_(OS|ARCH|CC)_* ↵Yonggang Luo1-2/+2
by use grep This should be the last commit, and should be take care that can only in comment block or version Exclude files: src/util/detect_*.h From: PIPE_(OS|ARCH|CC)_([0-9A-Z_]+) To: DETECT_$1_$2 Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>
2022-11-15tree-wide: Convert all usage of defined(PIPE_(OS|ARCH|CC)_*) to ↵Yonggang Luo2-4/+4
DETECT_(OS|ARCH|CC)_* by use grep From: defined[\s]*\([\s]*PIPE_(OS|ARCH|CC)_([0-9A-Z_]+)[\s]*\) To: DETECT_$1_$2 Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>
2022-11-15util: Rename src/gallium/include/pipe/p_config.h to src/util/detect_arch.hYonggang Luo1-1/+1
Even though the defines in p_config.h are stared with PIPE_, they are indeed are generic detecting mechanics, we will rename them to DETECT_* in latter MR We rename src/gallium/include/pipe/p_config.h src/util/detect_arch.h because the detect code in src/gallium/include/pipe/p_config.h are most about processor architecture detecting. The file util/detect.h is added to replace functional of src/gallium/include/pipe/p_config.h So we replace of #include "pipe/p_config.h" with #include "util/detect.h" The file util/detect_cc.h is added as a placeholder for moving compiler related macro defines from p_config.h into it in following commits Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19674>
2022-11-15util: Move src/gallium/auxiliary/os/os_mman.h to src/util/os_mman.hYonggang Luo1-1/+1
Use "util/detect_os.h" instead of "pipe/p_config.h" and "pipe/p_compiler.h" in src/util/os_mman.h This is a prepare to implement os_mman on windows Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19645>
2022-11-08util: Remove os/os_thread.h and replace #include "os/os_thread.h" with ↵Yonggang Luo4-4/+4
#include "util/u_thread.h" 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/19557>
2022-07-28util/list: rename LIST_ENTRY() to list_entry()Eric Engestrom1-3/+3
This follows the Linux kernel convention, and avoids collision with macOS header macro. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6751 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6840 Cc: mesa-stable Signed-off-by: Eric Engestrom <eric@igalia.com> Acked-by: David Heidelberg <david.heidelberg@collabora.com> Reviewed-by: Yonggang Luo <luoyonggang@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17772>
2022-06-15c11: Implement thread_local in c11/threads.hYonggang Luo1-1/+2
Use thread_local when possible 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/15087>
2022-04-26svga: Add support for SVGAv3Zack Rusin2-1/+18
SVGAv3 changes the PCI id due to differences in how PCI configuration is handled - removal of VRAM and FIFO PCI resources, switch to MMIO registers and MSI/MSI-X IRQ support but the 3D commands remain largely the same. This enables 3D/graphics acceleration support on SVGAv3. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16061>
2022-04-26svga: Don't try to build x86/x64 assembly on different arch'sZack Rusin1-7/+7
svga used to use vmx backdoor directly to send logs to the host. This functionality has been implemented in vmwgfx 2.17, but to make sure we still work with old kernels the functionality to use the backdoor directly has been kept. There's no reason to port that code to arm since vmwgfx implements it and arm64 (or other new platforms) would depend on vmwgfx versions a lot newer than 2.17, so everywhere but on x86/x64 it's fine to assume vmwgfx always support the host logging ioctls. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Reviewed-by: Neha Bhende <bhenden@vmware.com> Reviewed-by: Martin Krastev <krastevm@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16061>
2022-01-18svga: add GL43 resource validation at draw timeNeha Bhende1-1/+6
This patch adds GL43 tracked states stack and supports GL43 resource validation at draw time. This patch is squash of in house patches to support GL43 on VMware driver. Reviewed-by: Charmaine Lee <charmainel@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14270>
2022-01-18svga: Add utility to check for GL43 supportNeha Bhende3-1/+15
GL43 support in SVGA driver requires vmwgfx kernel version 2.20 and GL43 capable SVGA device. Reviewed-by: Charmaine Lee <charmainel@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14270>
2021-09-21svga: enable DRM mks-stats via hooking to the corresponding DRM ioctlsMartin Krastev5-7/+539
SVGA DRM stat calls were situated but did not actually register with the mks-stats mechanism due to absence of corresponding ioctls. The employed new ioctls in vmwgfx are DRM_VMW_MKSSTAT_ADD and DRM_VMW_MKSSTAT_REMOVE, subject to version check. Reviewed-by: Charmaine Lee <charmainel@vmware.com> (cherry picked from commit be47c077cc927c27a8c36342b47697aa81719677) (cherry picked from commit 0388afc67b830f6ab916d0839c33eb1d91d6353f) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12873>
2021-08-30svga/drm: use pb_usage_flags instead of pipe_map_flags in ↵Neha Bhende1-18/+16
vmw_svga_winsys_buffer_map This patch basically maps pipe_map_flags to pb_flags. Since we are mapping it, STATIC_ASSERTS won't be required. Fixes: 00c30dad78b0 ("gallium: renumber PIPE_MAP_* enums to remove holes") Reviewed-by: Charmaine Lee <charmainel@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12606>
2021-07-08android: Drop the Android.mk build systemJason Ekstrand2-66/+0
Android.mk files haven't really been supported by Mesa devs for a long time. Most of us have been willing to update Makefile.sources if we remember and sometimes we try to blind code some Android.mk for a new generator. However, the reality is that it breaks regularly and ends up being maintained by the Android community. To address this problem another approach was implemented in !10183 utilizing the maintained meson build system. The old Android.mk files are no longer required. This commit was created with the following commands: git rm **/Android.mk git rm **/Android.*.mk git rm **/Makefile.sources git rm CleanSpec.mk Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4487 Acked-by: Roman Stratiienko <r.stratiienko@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9728>
2021-04-06gallium/pb: remove 8 bytes from pb_buffer by packing variablesMarek Olšák1-2/+2
Only svga used usages beyond 16 bits. All other drivers are OK with 16 bits. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809>
2021-04-06gallium/pb: change pb_buffer::alignment to alignment_log2Marek Olšák2-2/+2
Alignments are always 2^n, so store n = log2(alignment). The next commit will take advantage of the saved space. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809>
2021-04-06gallium/pb: pass an optional winsys pointer to the buffer destroy functionMarek Olšák2-2/+2
This will allow removing the winsys pointer from buffers. Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9809>
2020-11-24meson: add idep_mesautil to components using simple_mtx.hMark Janes1-1/+1
If valgrind is installed, these components need to find valgrind.h. Fixes: 53f7d539cd9 ("util: Add helgrind support for simple_mtx") Closes: #3876 Acked-by: Rob Clark <robclark@freedesktop.org>
2020-09-22gallium: rename pipe_transfer_usage -> pipe_map_flagsMarek Olšák1-1/+1
Acked-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5749>
2020-09-22gallium: rename PIPE_TRANSFER_* -> PIPE_MAP_*Marek Olšák6-31/+31
Acked-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5749>
2020-08-21winsys/svga: fix display corruption after surface_initCharmaine Lee1-15/+18
When we initialize the buffer surface, do not map the existing storage with DONTBLOCK, leave it as a synchronized map. This patch also sets the surface rebind flag after it is bound to a new buffer and sets the surface buffer pointer accordingly. This fixes display corruption issue seen with running steam. Reviewed-by: Neha Bhende <bhenden@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6415>
2020-06-18svga: replace all dup() with os_dupfd_cloexec()Eric Engestrom1-2/+3
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>
2020-06-18replace all F_DUPFD_CLOEXEC with os_dupfd_cloexec()Eric Engestrom1-1/+2
All squashed into a single commit because it shouldn't have any behaviour change, except that it might work now on platforms where it was broken because F_DUPFD_CLOEXEC is not supported but FD_CLOEXEC is. Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5369>
2020-06-05svga: Performance fixesNeha Bhende4-0/+69
This is a squash commit of in house performance fixes and misc bug fixes for GL4.1 support. Performance fixes: * started using system memory for constant buffer to gain 3X performance boost with metro redux Misc bug fixes: * fixed usage of vertexid in shader * added empty control point phase in hull shader for zero ouput control point * misc shader signature fixes * fixed clip_distance input declaration * clearing the dirty bit for the surface while using direct map if surface is already flushed and there is no pending primitive This patch also uses SVGA_RETRY macro for commands retries. Part of it is already used in previous patch. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com> Signed-off-by: Neha Bhende <bhenden@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5317>
2020-06-05svga: Add GL4.1(compatibility profile) support in svga driverNeha Bhende3-8/+69
This patch is a squash commit of a very long in-house patch series. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com> Signed-off-by: Neha Bhende <bhenden@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5317>
2020-06-05winsys/drm: Add GL4.1 support in drm winsysNeha Bhende3-6/+31
This is to check whether virtual hardware has SM5 support Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com> Signed-off-by: Neha Bhende <bhenden@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5317>
2020-06-01meson: use gnu_symbol_visibility argumentDylan Baker1-1/+2
This uses a meson builtin to handle -fvisibility=hidden. This is nice because we don't need to track which languages are used, if C++ is suddenly added meson just does the right thing. Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
2020-05-13gallium: rename 'state tracker' to 'frontend'Marek Olšák2-2/+2
Acked-by: Eric Anholt <eric@anholt.net> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
2020-04-29winsys/svga: Optionally avoid caching buffer mapsThomas Hellstrom4-12/+22
Mapping of graphics kernel buffers is quite costly. Therefore the svga drm winsys caches all kernel buffer maps. However, that may lead to less testing coverage of the unmap paths and (possibly) processes running out of virtual memory space. Introduce a possibility to avoid that caching by setting the environment variable SVGA_FORCE_KERNEL_UNMAPS to 1. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Matthew McClure <mcclurem@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4804>
2020-04-29gallium/pipebuffer: Use persistent maps for slabsThomas Hellstrom1-0/+2
Instead of the ugly practice of relying on the provider caching maps, introduce and use persistent pipebuffer maps. Providers that can't handle persistent maps can't use the slab manager. The only current user is the svga drm winsys which always maps persistently. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4804>
2020-04-13svga: fix build on FreeBSDGreg V1-0/+3
MADV_HUGEPAGE only exists on Linux Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3966>
2020-04-01svga, winsys/svga: Fix persistent memory discard mapsThomas Hellstrom2-3/+12
The kernel driver requires immediate notification using a BindGBSurface command when a graphics coherent memory resource changes backing MOB, so that it can start dirty-tracking the new MOB. Since we always use graphics coherent memory for persistent memory, enqueue and flush a BindGBSurface commmand at map time rather than at unmap time. Since we're dealing with persistent memory, It's OK to flush while mapped. This fixes an issue with gnome-shell / Wayland which uses persistent memory together with discard maps when we advertise ARB_buffer_storage. XWayland clients will render incorrectly. Fixes: 71b43490dd ("svga: Support ARB_buffer_storage") Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Neha Bhende <bhenden@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4399>
2020-03-30scons: Prune out unnecessary targets.Jose Fonseca1-23/+0
This prunes out all targets except libgl-gdi, libgl-xlib, and svga, as suggested by Marek Olšák. libgl-xlib will be remove once I have had time to confirm no automated tests we have rely upon it. There are also a bunch of Makefile.sources which become orphaned as result, that are not taken care of in this change. v2: Prune remainders of swr support. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4348>
2020-02-26gallium/hash_table: remove some function wrappersMarek Olšák2-19/+9
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3722> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3722>
2020-02-26gallium/hash_table: turn it into a wrapper around util/hash_tableMarek Olšák2-2/+2
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3722>
2020-02-26gallium/hash_table: use the same callback signatures as util/hash_tableMarek Olšák1-3/+3
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3722>