25#define VKD3D_NO_VULKAN_H
26#define VKD3D_NO_WIN32_TYPES
31#define VK_NO_PROTOTYPES
90 0, 0, {(
DWORD_PTR)(__FILE__
": wined3d_cs")}
100 0, 0, {(
DWORD_PTR)(__FILE__
": wined3d_wndproc_cs")}
110 0, 0, {(
DWORD_PTR)(__FILE__
": wined3d_command_cs")}
122 .multisample_textures =
TRUE,
149 ERR(
"Failed to allocate wined3d object memory.\n");
158 WARN(
"Failed to initialize wined3d object, hr %#lx.\n",
hr);
163 TRACE(
"Created wined3d object %p.\n",
object);
170 return c ==
',' ||
c ==
';' ||
c ==
'\0';
183 prev_char =
p >
string ?
p[-1] : 0;
202 const char *env_value;
219 const char *env_value;
226 if (
end != env_value)
258 if (app_name_size <
len)
281 unsigned int tmpvalue;
288 ERR(
"Failed to allocate context TLS index, err %#x.\n",
err);
309 ERR(
"Failed to register window class 'WineD3D_OpenGL'!\n");
313 ERR(
"Failed to free context TLS index, err %#x.\n",
err);
343 if (hkey || appkey ||
env)
349 ERR_(winediag)(
"Setting maximum allowed wined3d GL version to %u.%u.\n",
350 tmpvalue >> 16, tmpvalue & 0xffff);
357 ERR_(winediag)(
"Using the vkd3d-shader GLSL shader backend.\n");
362 ERR_(winediag)(
"Using the GLSL shader backend.\n");
368 int pci_device_id = tmpvalue;
371 if(pci_device_id > 0xffff)
373 ERR(
"Invalid value for VideoPciDeviceID. The value should be smaller or equal to 65535 or 0xffff\n");
377 TRACE(
"Using PCI Device ID %04x\n", pci_device_id);
383 int pci_vendor_id = tmpvalue;
386 if(pci_vendor_id > 0xffff)
388 ERR(
"Invalid value for VideoPciVendorID. The value should be smaller or equal to 65535 or 0xffff\n");
392 TRACE(
"Using PCI Vendor ID %04x\n", pci_vendor_id);
399 if(TmpVideoMemorySize > 0)
402 TRACE(
"Use %iMiB = 0x%s bytes for emulated_textureram\n",
407 ERR(
"VideoMemorySize is %i but must be >0\n", TmpVideoMemorySize);
414 ERR(
"Failed to allocate logo path memory.\n");
421 ERR_(winediag)(
"Forcing sample count to %u. This may not be compatible with all applications.\n",
426 TRACE(
"Checking relative addressing indices in float constants.\n");
447 ERR_(winediag)(
"Using the Vulkan renderer.\n");
452 ERR_(winediag)(
"Using the OpenGL renderer.\n");
457 ERR_(winediag)(
"Disabling 3D support.\n");
463 TRACE(
"Forcing all constant buffers to be write-mappable.\n");
468 ERR_(winediag)(
"Using the HLSL-based FFP backend.\n");
476 if (!
getenv(
"VKD3D_DEBUG" ))
482 else putenv(
"VKD3D_DEBUG=none" );
484 if (!
getenv(
"VKD3D_SHADER_DEBUG" ))
487 else if (
WARN_ON(vkd3d))
putenv(
"VKD3D_SHADER_DEBUG=warn" );
489 else if (
ERR_ON(vkd3d))
putenv(
"VKD3D_SHADER_DEBUG=err" );
490 else putenv(
"VKD3D_SHADER_DEBUG=none" );
506 ERR(
"Failed to free context TLS index, err %#x.\n",
err);
562 unsigned int adapter_idx, output_idx;
580 for (output_idx = 0; output_idx <
adapter->output_count; ++output_idx)
583 return &
adapter->outputs[output_idx];
638 ERR(
"Window %p is not registered with wined3d.\n",
window);
643 unicode =
entry->unicode;
652 TRACE(
"Filtering message: window %p, message %#x, wparam %#Ix, lparam %#Ix.\n",
686 if (
state->device_window !=
msg->hwnd)
694 swapchain_desc =
state->desc;
698 ERR(
"Failed to get output from window %p.\n",
state->device_window);
701 swapchain_desc.
output = output;
727 WARN(
"Window %p is already registered with wined3d.\n",
window);
737 ERR(
"Failed to grow table.\n");
799 ERR(
"Window %p is not registered with wined3d.\n",
window);
806 WARN(
"Not unregistering window %p, current window proc doesn't match wined3d window proc.\n",
window);
839 WARN(
"Not unregistering window %p, current window proc doesn't match wined3d window proc.\n",
928 if (
hook != last_hook)
963 ERR(
"Failed to clear current context.\n");
COMPILER_DEPENDENT_UINT64 UINT64
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define RegCloseKey(hKey)
void context_set_tls_idx(DWORD idx)
BOOL wined3d_context_gl_set_current(struct wined3d_context_gl *context_gl)
static DWORD wined3d_context_tls_idx
DWORD context_get_tls_idx(void)
static LPCWSTR LPCWSTR LPCWSTR env
LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL unicode, UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc)
BOOL wined3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size)
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
#define DLL_THREAD_DETACH
#define DLL_PROCESS_ATTACH
#define DLL_PROCESS_DETACH
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define stricmp(_String1, _String2)
#define WINE_DECLARE_DEBUG_CHANNEL(x)
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
BOOL WINAPI TlsFree(IN DWORD Index)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
DWORD WINAPI DECLSPEC_HOTPATCH TlsAlloc(void)
char *CDECL getenv(const char *name)
_ACRTIMP int __cdecl atoi(const char *)
_ACRTIMP __msvcrt_ulong __cdecl strtoul(const char *, char **, int)
static int putenv(const char *str)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP char *__cdecl strstr(const char *, const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
_ACRTIMP char *__cdecl strpbrk(const char *, const char *)
_ACRTIMP char *__cdecl strrchr(const char *, int)
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
#define memcpy(s1, s2, n)
#define ERROR_FILE_NOT_FOUND
static const LARGE_INTEGER *static const HANDLE const LARGE_INTEGER *static PSLIST_ENTRY PSLIST_ENTRY last
static IHTMLWindow2 * window
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
#define SetWindowLongPtrA
#define GetWindowLongPtrW
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HHOOK WINAPI SetWindowsHookExW(_In_ int, _In_ HOOKPROC, _In_opt_ HINSTANCE, _In_ DWORD)
#define GetWindowLongPtrA
BOOL WINAPI IsWindowUnicode(_In_ HWND)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
BOOL WINAPI UnhookWindowsHookEx(_In_ HHOOK)
HICON WINAPI LoadIconA(_In_opt_ HINSTANCE hInstance, _In_ LPCSTR lpIconName)
LRESULT WINAPI CallNextHookEx(_In_opt_ HHOOK, _In_ int, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
#define SetWindowLongPtrW
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
const char int int __cdecl __wine_dbg_output(const char *str)
LIST_ENTRY ProcessLocksList
IDirectMusicSegmentState * state
struct wined3d_swapchain_state * state
unsigned int max_gl_version
bool check_float_constants
enum wined3d_shader_backend shader_backend
unsigned int cs_multithreaded
unsigned int multisample_textures
unsigned int strict_shader_math
unsigned int sample_count
unsigned short pci_vendor_id
UINT64 emulated_textureram
enum wined3d_renderer renderer
unsigned short pci_device_id
struct wined3d_output * output
struct wined3d_registered_swapchain_state * states
struct wined3d_window_hook * hooks
struct wined3d_wndproc * entries
struct wined3d_device * device
unsigned int adapter_count
struct wined3d_adapter * adapters[1]
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define FIELD_OFFSET(t, f)
VKD3D_API void vkd3d_set_log_callback(PFN_vkd3d_log callback)
#define success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define TLS_OUT_OF_INDEXES
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
HRESULT wined3d_init(struct wined3d *wined3d, uint32_t flags)
HRESULT CDECL wined3d_swapchain_state_set_fullscreen(struct wined3d_swapchain_state *state, const struct wined3d_swapchain_desc *swapchain_desc, const struct wined3d_display_mode *mode)
@ WINED3D_RENDERER_VULKAN
@ WINED3D_RENDERER_OPENGL
#define WINED3D_REGISTER_WINDOW_NO_WINDOW_CHANGES
#define WINED3D_REGISTER_WINDOW_NO_ALT_ENTER
static struct wined3d_swapchain_state_table swapchain_state_table
static CRITICAL_SECTION_DEBUG wined3d_cs_debug
static DWORD get_config_key_dword(HKEY defkey, HKEY appkey, const char *env, const char *name, unsigned int *value)
static CRITICAL_SECTION_DEBUG wined3d_command_cs_debug
void WINAPI wined3d_mutex_unlock(void)
BOOL wined3d_filter_messages(HWND window, BOOL filter)
static void wined3d_swapchain_state_unregister(struct wined3d_swapchain_state *state)
void wined3d_swapchain_state_cleanup(struct wined3d_swapchain_state *state)
static bool is_option_separator(char c)
void WINAPI wined3d_mutex_lock(void)
struct wined3d *CDECL wined3d_create(uint32_t flags)
BOOL wined3d_get_app_name(char *app_name, unsigned int app_name_size)
static void vkd3d_log_callback(const char *fmt, va_list args)
BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)
BOOL CDECL wined3d_register_window(struct wined3d *wined3d, HWND window, struct wined3d_device *device, unsigned int flags)
static DWORD get_config_key(HKEY defkey, HKEY appkey, const char *env, const char *name, char *buffer, DWORD size)
static CRITICAL_SECTION_DEBUG wined3d_wndproc_cs_debug
CRITICAL_SECTION wined3d_command_cs
void wined3d_swapchain_state_register(struct wined3d_swapchain_state *state)
static struct wined3d_wndproc * wined3d_find_wndproc(HWND window, struct wined3d *wined3d)
static struct wined3d_wndproc_table wndproc_table
static const char * config_list_get_value(const char *string, const char *key, size_t *len)
static BOOL wined3d_dll_destroy(HINSTANCE hInstDLL)
static LRESULT CALLBACK wined3d_hook_proc(int code, WPARAM wparam, LPARAM lparam)
static CRITICAL_SECTION wined3d_wndproc_cs
static void wined3d_wndproc_mutex_lock(void)
void CDECL wined3d_unregister_windows(struct wined3d *wined3d)
static struct wined3d_output * wined3d_get_output_from_window(const struct wined3d *wined3d, HWND hwnd)
static CRITICAL_SECTION wined3d_cs
static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
static void wined3d_wndproc_mutex_unlock(void)
void wined3d_unregister_window(HWND window)
enum wined3d_renderer CDECL wined3d_get_renderer(void)
static struct wined3d_window_hook * wined3d_find_hook(DWORD thread_id)
static BOOL restore_wndproc(struct wined3d_wndproc *entry)
#define WINED3D_OPENGL_WINDOW_CLASS_NAME
#define MAKEDWORD_VERSION(maj, min)
#define WINED3D_CSMT_ENABLE
@ WINED3D_SHADER_BACKEND_AUTO
@ WINED3D_SHADER_BACKEND_GLSL
@ WINED3D_SHADER_BACKEND_GLSL_VKD3D
#define HKEY_CURRENT_USER