mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
venus: Guard Linux-specific code against being compiled on Windows
v2: - drop most additions except thread id - fix DRM_FORMAT_MOD_LINEAR in a different way Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38969>
This commit is contained in:
parent
d792403f0b
commit
55219167c6
2 changed files with 16 additions and 4 deletions
|
|
@ -20,16 +20,13 @@
|
|||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
#include "c11/threads.h"
|
||||
#include "drm-uapi/drm_fourcc.h"
|
||||
#include "util/bitscan.h"
|
||||
#include "util/bitset.h"
|
||||
#include "util/compiler.h"
|
||||
#include "util/detect_os.h"
|
||||
#include "util/libsync.h"
|
||||
#include "util/list.h"
|
||||
#include "util/macros.h"
|
||||
#include "util/os_time.h"
|
||||
|
|
@ -51,6 +48,15 @@
|
|||
#include "vk_queue.h"
|
||||
#include "vk_util.h"
|
||||
|
||||
#if DETECT_OS_WINDOWS
|
||||
#include <processthreadsapi.h>
|
||||
#else
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#include "drm-uapi/drm_fourcc.h"
|
||||
#include "util/libsync.h"
|
||||
#endif
|
||||
|
||||
#include "vn_entrypoints.h"
|
||||
|
||||
#define VN_DEFAULT_ALIGN 8
|
||||
|
|
@ -614,8 +620,10 @@ vn_gettid(void)
|
|||
{
|
||||
#if DETECT_OS_ANDROID
|
||||
return gettid();
|
||||
#elif defined(__FreeBSD__)
|
||||
#elif DETECT_OS_FREEBSD
|
||||
return syscall(SYS_thr_self);
|
||||
#elif DETECT_OS_WINDOWS
|
||||
return GetCurrentThreadId();
|
||||
#else
|
||||
return syscall(SYS_gettid);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@
|
|||
#include "vn_physical_device.h"
|
||||
#include "vn_queue.h"
|
||||
|
||||
#ifndef DRM_FORMAT_MOD_LINEAR
|
||||
#define DRM_FORMAT_MOD_LINEAR 0
|
||||
#endif
|
||||
|
||||
/* The common WSI support makes some assumptions about the driver.
|
||||
*
|
||||
* In wsi_device_init, it assumes VK_EXT_pci_bus_info is available. In
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue