mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against fb4d36c66131d1c45ebdcb5d56151e8f7782ebd1.
This commit is contained in:
parent
e5cf862a14
commit
a88d536fba
@ -1,4 +1,4 @@
|
||||
From 3c2f30734ab4ab7a602f1f66d415a245063ee6d8 Mon Sep 17 00:00:00 2001
|
||||
From dbd70302047bc3c592882cb6d93f6251f49e27c7 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Thu, 16 Jan 2014 20:56:49 -0700
|
||||
Subject: [PATCH] ntdll: Add support for creating reparse points.
|
||||
@ -13,10 +13,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
5 files changed, 447 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c4f34e9e851..ec76805b3e6 100644
|
||||
index 0b57210400b..e2f8d2ddfe3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2025,6 +2025,8 @@ AC_CHECK_FUNCS(\
|
||||
@@ -2044,6 +2044,8 @@ AC_CHECK_FUNCS(\
|
||||
prctl \
|
||||
proc_pidinfo \
|
||||
sched_yield \
|
||||
@ -39,7 +39,7 @@ index 2e862c68b7e..f8ca3e689ec 100644
|
||||
EXTRADLLFLAGS = -nodefaultlibs
|
||||
i386_EXTRADLLFLAGS = -Wl,--image-base,0x7bc00000
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 6186afdfb63..7f753caef47 100644
|
||||
index d4d80efe13b..592d7815026 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -38,6 +38,7 @@
|
||||
@ -50,7 +50,7 @@ index 6186afdfb63..7f753caef47 100644
|
||||
|
||||
#ifndef IO_COMPLETION_ALL_ACCESS
|
||||
#define IO_COMPLETION_ALL_ACCESS 0x001F0003
|
||||
@@ -5406,32 +5407,154 @@ static void test_mailslot_name(void)
|
||||
@@ -5574,32 +5575,154 @@ static void test_mailslot_name(void)
|
||||
CloseHandle( device );
|
||||
}
|
||||
|
||||
@ -101,9 +101,7 @@ index 6186afdfb63..7f753caef47 100644
|
||||
+ INT buffer_len;
|
||||
+ HANDLE handle;
|
||||
+ BOOL bret;
|
||||
|
||||
- pRtlInitUnicodeString( &nameW, L"\\??\\C:\\" );
|
||||
- InitializeObjectAttributes( &attr, &nameW, 0, NULL, NULL );
|
||||
+
|
||||
+ /* Create a temporary folder for the junction point tests */
|
||||
+ GetTempFileNameW(dotW, fooW, 0, path);
|
||||
+ DeleteFileW(path);
|
||||
@ -112,9 +110,7 @@ index 6186afdfb63..7f753caef47 100644
|
||||
+ win_skip("Unable to create a temporary junction point directory.\n");
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
- status = pNtOpenFile( &handle, READ_CONTROL, &attr, &io, 0, 0 );
|
||||
- ok( !status, "open %s failed %#lx\n", wine_dbgstr_w(nameW.Buffer), status );
|
||||
+
|
||||
+ /* Check that the volume this folder is located on supports junction points */
|
||||
+ pRtlDosPathNameToNtPathName_U(path, &nameW, NULL, NULL);
|
||||
+ volW[0] = nameW.Buffer[4];
|
||||
@ -131,17 +127,15 @@ index 6186afdfb63..7f753caef47 100644
|
||||
+ RemoveDirectoryW(path);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
- status = pNtFsControlFile( handle, NULL, NULL, NULL, &io, FSCTL_GET_REPARSE_POINT, NULL, 0, NULL, 0 );
|
||||
- ok( status == STATUS_INVALID_USER_BUFFER, "expected %#lx, got %#lx\n", STATUS_INVALID_USER_BUFFER, status );
|
||||
+
|
||||
+ /* Create the folder to be replaced by a junction point */
|
||||
+ lstrcpyW(reparse_path, path);
|
||||
+ lstrcatW(reparse_path, reparseW);
|
||||
+ bret = CreateDirectoryW(reparse_path, NULL);
|
||||
+ ok(bret, "Failed to create junction point directory.\n");
|
||||
|
||||
- status = pNtFsControlFile( handle, NULL, NULL, NULL, &io, FSCTL_GET_REPARSE_POINT, NULL, 0, reparse_data, 0 );
|
||||
- ok( status == STATUS_INVALID_USER_BUFFER, "expected %#lx, got %#lx\n", STATUS_INVALID_USER_BUFFER, status );
|
||||
- pRtlInitUnicodeString( &nameW, L"\\??\\C:\\" );
|
||||
- InitializeObjectAttributes( &attr, &nameW, 0, NULL, NULL );
|
||||
+ /* Create a destination folder for the junction point to target */
|
||||
+ lstrcpyW(target_path, path);
|
||||
+ for (int i=0; i<1; i++)
|
||||
@ -154,9 +148,8 @@ index 6186afdfb63..7f753caef47 100644
|
||||
+ ok(bret, "Failed to create junction point target directory.\n");
|
||||
+ pRtlDosPathNameToNtPathName_U(path, &nameW, NULL, NULL);
|
||||
|
||||
- /* a volume cannot be a reparse point by definition */
|
||||
- status = pNtFsControlFile( handle, NULL, NULL, NULL, &io, FSCTL_GET_REPARSE_POINT, NULL, 0, reparse_data, 1 );
|
||||
- ok( status == STATUS_NOT_A_REPARSE_POINT, "expected %#lx, got %#lx\n", STATUS_NOT_A_REPARSE_POINT, status );
|
||||
- status = pNtOpenFile( &handle, READ_CONTROL, &attr, &io, 0, 0 );
|
||||
- ok( !status, "open %s failed %#lx\n", wine_dbgstr_w(nameW.Buffer), status );
|
||||
+ /* construct a too long pathname (resulting reparse buffer over 16 kiB limit) */
|
||||
+ long_path = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 32767);
|
||||
+ lstrcpyW(long_path, nameW.Buffer);
|
||||
@ -166,8 +159,7 @@ index 6186afdfb63..7f753caef47 100644
|
||||
+ lstrcatW(long_path, path);
|
||||
+ }
|
||||
+ lstrcatW(long_path, targetW);
|
||||
|
||||
- CloseHandle( handle );
|
||||
+
|
||||
+ /* Create the junction point */
|
||||
+ handle = CreateFileW(reparse_path, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING,
|
||||
+ FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0);
|
||||
@ -181,7 +173,9 @@ index 6186afdfb63..7f753caef47 100644
|
||||
+ ok(!bret && GetLastError()==ERROR_INVALID_REPARSE_DATA, "Unexpected error (0x%lx)\n", GetLastError());
|
||||
+ HeapFree(GetProcessHeap(), 0, buffer);
|
||||
+ CloseHandle(handle);
|
||||
+
|
||||
|
||||
- status = pNtFsControlFile( handle, NULL, NULL, NULL, &io, FSCTL_GET_REPARSE_POINT, NULL, 0, NULL, 0 );
|
||||
- ok( status == STATUS_INVALID_USER_BUFFER, "expected %#lx, got %#lx\n", STATUS_INVALID_USER_BUFFER, status );
|
||||
+ /* construct a long pathname to demonstrate correct behavior with very large reparse points */
|
||||
+ pRtlDosPathNameToNtPathName_U(path, &nameW, NULL, NULL);
|
||||
+ lstrcpyW(long_path, nameW.Buffer);
|
||||
@ -191,11 +185,16 @@ index 6186afdfb63..7f753caef47 100644
|
||||
+ lstrcatW(long_path, path);
|
||||
+ }
|
||||
+ lstrcatW(long_path, targetW);
|
||||
+
|
||||
|
||||
- status = pNtFsControlFile( handle, NULL, NULL, NULL, &io, FSCTL_GET_REPARSE_POINT, NULL, 0, reparse_data, 0 );
|
||||
- ok( status == STATUS_INVALID_USER_BUFFER, "expected %#lx, got %#lx\n", STATUS_INVALID_USER_BUFFER, status );
|
||||
+ /* use a sane (not obscenely long) target for the rest of testing */
|
||||
+ pRtlFreeUnicodeString(&nameW);
|
||||
+ pRtlDosPathNameToNtPathName_U(target_path, &nameW, NULL, NULL);
|
||||
+
|
||||
|
||||
- /* a volume cannot be a reparse point by definition */
|
||||
- status = pNtFsControlFile( handle, NULL, NULL, NULL, &io, FSCTL_GET_REPARSE_POINT, NULL, 0, reparse_data, 1 );
|
||||
- ok( status == STATUS_NOT_A_REPARSE_POINT, "expected %#lx, got %#lx\n", STATUS_NOT_A_REPARSE_POINT, status );
|
||||
+ /* Create the junction point */
|
||||
+ handle = CreateFileW(reparse_path, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING,
|
||||
+ FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0);
|
||||
@ -208,7 +207,8 @@ index 6186afdfb63..7f753caef47 100644
|
||||
+ bret = DeviceIoControl(handle, FSCTL_SET_REPARSE_POINT, (LPVOID)buffer, buffer_len, NULL, 0, &dwret, 0);
|
||||
+ ok(bret, "Failed to create junction point! (0x%lx)\n", GetLastError());
|
||||
+ CloseHandle(handle);
|
||||
+
|
||||
|
||||
- CloseHandle( handle );
|
||||
+cleanup:
|
||||
+ /* Cleanup */
|
||||
+ pRtlFreeUnicodeString(&nameW);
|
||||
@ -222,7 +222,7 @@ index 6186afdfb63..7f753caef47 100644
|
||||
}
|
||||
|
||||
START_TEST(file)
|
||||
@@ -5506,6 +5629,6 @@ START_TEST(file)
|
||||
@@ -5675,6 +5798,6 @@ START_TEST(file)
|
||||
test_ioctl();
|
||||
test_query_ea();
|
||||
test_flush_buffers_file();
|
||||
@ -231,7 +231,7 @@ index 6186afdfb63..7f753caef47 100644
|
||||
+ test_mailslot_name();
|
||||
}
|
||||
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
|
||||
index eca75b2d4fb..0cef6438c7e 100644
|
||||
index eef21e12ceb..fbb33442460 100644
|
||||
--- a/dlls/ntdll/unix/file.c
|
||||
+++ b/dlls/ntdll/unix/file.c
|
||||
@@ -36,6 +36,8 @@
|
||||
@ -243,7 +243,7 @@ index eca75b2d4fb..0cef6438c7e 100644
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_MNTENT_H
|
||||
@@ -125,6 +127,7 @@
|
||||
@@ -124,6 +126,7 @@
|
||||
#include "wine/list.h"
|
||||
#include "wine/debug.h"
|
||||
#include "unix_private.h"
|
||||
@ -251,7 +251,7 @@ index eca75b2d4fb..0cef6438c7e 100644
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(file);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
||||
@@ -136,6 +139,12 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
||||
@@ -135,6 +138,12 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
||||
#undef EXT2_IOC_GETFLAGS
|
||||
#undef EXT4_CASEFOLD_FL
|
||||
|
||||
@ -264,7 +264,7 @@ index eca75b2d4fb..0cef6438c7e 100644
|
||||
#ifdef linux
|
||||
|
||||
/* We want the real kernel dirent structure, not the libc one */
|
||||
@@ -247,6 +256,95 @@ static const BOOL is_case_sensitive = FALSE;
|
||||
@@ -246,6 +255,95 @@ static const BOOL is_case_sensitive = FALSE;
|
||||
static pthread_mutex_t dir_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
static pthread_mutex_t mnt_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
@ -360,7 +360,7 @@ index eca75b2d4fb..0cef6438c7e 100644
|
||||
/* check if a given Unicode char is OK in a DOS short name */
|
||||
static inline BOOL is_invalid_dos_char( WCHAR ch )
|
||||
{
|
||||
@@ -1562,6 +1660,28 @@ static int parse_samba_dos_attrib_data( char *data, int len )
|
||||
@@ -1565,6 +1663,28 @@ static int parse_samba_dos_attrib_data( char *data, int len )
|
||||
}
|
||||
|
||||
|
||||
@ -389,7 +389,7 @@ index eca75b2d4fb..0cef6438c7e 100644
|
||||
static BOOL fd_is_mount_point( int fd, const struct stat *st )
|
||||
{
|
||||
struct stat parent;
|
||||
@@ -3335,6 +3455,181 @@ done:
|
||||
@@ -3339,6 +3459,181 @@ done:
|
||||
}
|
||||
|
||||
|
||||
@ -571,7 +571,7 @@ index eca75b2d4fb..0cef6438c7e 100644
|
||||
/******************************************************************************
|
||||
* lookup_unix_name
|
||||
*
|
||||
@@ -6099,6 +6394,13 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
@@ -6127,6 +6422,13 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap
|
||||
break;
|
||||
}
|
||||
|
||||
@ -586,17 +586,17 @@ index eca75b2d4fb..0cef6438c7e 100644
|
||||
TRACE("FSCTL_SET_SPARSE: Ignoring request\n");
|
||||
io->Information = 0;
|
||||
diff --git a/include/Makefile.in b/include/Makefile.in
|
||||
index f52314e745d..2ec4d835743 100644
|
||||
index 5fd20858aee..53561e66c3e 100644
|
||||
--- a/include/Makefile.in
|
||||
+++ b/include/Makefile.in
|
||||
@@ -572,6 +572,7 @@ SOURCES = \
|
||||
@@ -576,6 +576,7 @@ SOURCES = \
|
||||
ntdef.h \
|
||||
ntdsapi.h \
|
||||
ntgdi.h \
|
||||
+ ntifs.h \
|
||||
ntioring_x.h \
|
||||
ntlsa.h \
|
||||
ntquery.h \
|
||||
ntsecapi.h \
|
||||
--
|
||||
2.39.2
|
||||
2.40.1
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
From 009a7b9e0b6be6fc559078b9544d4ca7b505a186 Mon Sep 17 00:00:00 2001
|
||||
From 14e979a3f3623a580b592ebaff952445307b87c5 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 13 Mar 2019 16:02:05 -0600
|
||||
Subject: kernel32: Implement CreateSymbolicLink[A|W] with ntdll reparse
|
||||
points.
|
||||
Subject: [PATCH] kernel32: Implement CreateSymbolicLink[A|W] with ntdll
|
||||
reparse points.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@ -14,10 +14,10 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
5 files changed, 266 insertions(+), 81 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index 2dd3eac3c26..97428dd4d95 100644
|
||||
index f4bdc08b87e..49c4c6437a8 100644
|
||||
--- a/dlls/kernel32/path.c
|
||||
+++ b/dlls/kernel32/path.c
|
||||
@@ -352,8 +352,16 @@ WCHAR * CDECL wine_get_dos_file_name( LPCSTR str )
|
||||
@@ -463,8 +463,16 @@ WCHAR * CDECL wine_get_dos_file_name( LPCSTR str )
|
||||
*/
|
||||
BOOLEAN WINAPI CreateSymbolicLinkA(LPCSTR link, LPCSTR target, DWORD flags)
|
||||
{
|
||||
@ -37,7 +37,7 @@ index 2dd3eac3c26..97428dd4d95 100644
|
||||
|
||||
/*************************************************************************
|
||||
diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c
|
||||
index 3c57e81f4c6..fa143cb4e48 100644
|
||||
index 7e122780602..2ce175e1749 100644
|
||||
--- a/dlls/kernel32/tests/path.c
|
||||
+++ b/dlls/kernel32/tests/path.c
|
||||
@@ -83,6 +83,9 @@ static NTSTATUS (WINAPI *pLdrGetDllPath)(LPCWSTR,ULONG,LPWSTR*,LPWSTR*);
|
||||
@ -58,7 +58,7 @@ index 3c57e81f4c6..fa143cb4e48 100644
|
||||
mod = GetModuleHandleA("ntdll.dll");
|
||||
MAKEFUNC(LdrGetDllPath);
|
||||
MAKEFUNC(RtlGetExePath);
|
||||
@@ -2692,6 +2696,95 @@ static void test_LdrGetDllPath(void)
|
||||
@@ -2691,6 +2695,95 @@ static void test_LdrGetDllPath(void)
|
||||
SetEnvironmentVariableW( pathW, old_path );
|
||||
}
|
||||
|
||||
@ -154,25 +154,25 @@ index 3c57e81f4c6..fa143cb4e48 100644
|
||||
START_TEST(path)
|
||||
{
|
||||
CHAR origdir[MAX_PATH],curdir[MAX_PATH], curDrive, otherDrive;
|
||||
@@ -2721,4 +2814,5 @@ START_TEST(path)
|
||||
@@ -2720,4 +2813,5 @@ START_TEST(path)
|
||||
test_RtlGetSearchPath();
|
||||
test_RtlGetExePath();
|
||||
test_LdrGetDllPath();
|
||||
+ test_CreateSymbolicLink();
|
||||
}
|
||||
diff --git a/dlls/kernelbase/file.c b/dlls/kernelbase/file.c
|
||||
index 53b9651a8fa..bf6e9e17c9e 100644
|
||||
index 2c261e0f57d..562440f4f8b 100644
|
||||
--- a/dlls/kernelbase/file.c
|
||||
+++ b/dlls/kernelbase/file.c
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "shlwapi.h"
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "ddk/ntddk.h"
|
||||
#include "ddk/ntddser.h"
|
||||
#include "ioringapi.h"
|
||||
+#include "ntifs.h"
|
||||
|
||||
#include "kernelbase.h"
|
||||
#include "wine/exception.h"
|
||||
@@ -948,8 +949,106 @@ done:
|
||||
@@ -946,8 +947,106 @@ done:
|
||||
*/
|
||||
BOOLEAN WINAPI /* DECLSPEC_HOTPATCH */ CreateSymbolicLinkW( LPCWSTR link, LPCWSTR target, DWORD flags )
|
||||
{
|
||||
@ -424,7 +424,7 @@ index 44c0a3f0fe0..e5561636584 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/msvcp140/tests/msvcp140.c b/dlls/msvcp140/tests/msvcp140.c
|
||||
index 640e44e5b7c..6e9727f5854 100644
|
||||
index 6affa2f9c29..b830bab160e 100644
|
||||
--- a/dlls/msvcp140/tests/msvcp140.c
|
||||
+++ b/dlls/msvcp140/tests/msvcp140.c
|
||||
@@ -857,16 +857,15 @@ static void test_Stat(void)
|
||||
@ -535,5 +535,5 @@ index 640e44e5b7c..6e9727f5854 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
2.40.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 474a1f4337afc7d612dda95b607fd01652aae8f1 Mon Sep 17 00:00:00 2001
|
||||
From 665645589e51105d02d95507d00eb1d464cdc716 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Mon, 25 Feb 2019 14:24:50 +0300
|
||||
Subject: [PATCH] d3d9: Support SWVP vertex shader float constants limits.
|
||||
@ -10,7 +10,7 @@ Subject: [PATCH] d3d9: Support SWVP vertex shader float constants limits.
|
||||
3 files changed, 29 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h
|
||||
index 50c3b38d795..13e93316c6f 100644
|
||||
index 81a37e7dffc..97c3532c2f4 100644
|
||||
--- a/dlls/d3d9/d3d9_private.h
|
||||
+++ b/dlls/d3d9/d3d9_private.h
|
||||
@@ -40,6 +40,7 @@
|
||||
@ -25,13 +25,13 @@ index 50c3b38d795..13e93316c6f 100644
|
||||
};
|
||||
|
||||
void d3d9_caps_from_wined3dcaps(const struct d3d9 *d3d9, unsigned int adapter_ordinal,
|
||||
- D3DCAPS9 *caps, const struct wined3d_caps *wined3d_caps) DECLSPEC_HIDDEN;
|
||||
+ D3DCAPS9 *caps, const struct wined3d_caps *wined3d_caps, DWORD flags) DECLSPEC_HIDDEN;
|
||||
BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended) DECLSPEC_HIDDEN;
|
||||
- D3DCAPS9 *caps, const struct wined3d_caps *wined3d_caps);
|
||||
+ D3DCAPS9 *caps, const struct wined3d_caps *wined3d_caps, DWORD flags);
|
||||
BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended);
|
||||
|
||||
struct fvf_declaration
|
||||
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
|
||||
index c8b906a981f..b271d8385b8 100644
|
||||
index b4bf51f9426..33306a76e32 100644
|
||||
--- a/dlls/d3d9/device.c
|
||||
+++ b/dlls/d3d9/device.c
|
||||
@@ -367,7 +367,7 @@ static BOOL wined3d_swapchain_desc_from_d3d9(struct wined3d_swapchain_desc *swap
|
||||
@ -55,7 +55,7 @@ index c8b906a981f..b271d8385b8 100644
|
||||
caps->NumSimultaneousRTs = min(D3D_MAX_SIMULTANEOUS_RENDERTARGETS, caps->NumSimultaneousRTs);
|
||||
|
||||
if (caps->PixelShaderVersion > 3)
|
||||
@@ -755,6 +758,7 @@ static HRESULT WINAPI d3d9_device_GetDirect3D(IDirect3DDevice9Ex *iface, IDirect
|
||||
@@ -753,6 +756,7 @@ static HRESULT WINAPI d3d9_device_GetDirect3D(IDirect3DDevice9Ex *iface, IDirect
|
||||
static HRESULT WINAPI d3d9_device_GetDeviceCaps(IDirect3DDevice9Ex *iface, D3DCAPS9 *caps)
|
||||
{
|
||||
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
|
||||
@ -63,7 +63,7 @@ index c8b906a981f..b271d8385b8 100644
|
||||
struct wined3d_caps wined3d_caps;
|
||||
HRESULT hr;
|
||||
|
||||
@@ -763,13 +767,15 @@ static HRESULT WINAPI d3d9_device_GetDeviceCaps(IDirect3DDevice9Ex *iface, D3DCA
|
||||
@@ -761,13 +765,15 @@ static HRESULT WINAPI d3d9_device_GetDeviceCaps(IDirect3DDevice9Ex *iface, D3DCA
|
||||
if (!caps)
|
||||
return D3DERR_INVALIDCALL;
|
||||
|
||||
@ -80,7 +80,7 @@ index c8b906a981f..b271d8385b8 100644
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -3654,14 +3660,20 @@ static HRESULT WINAPI d3d9_device_SetVertexShaderConstantF(IDirect3DDevice9Ex *i
|
||||
@@ -3655,14 +3661,20 @@ static HRESULT WINAPI d3d9_device_SetVertexShaderConstantF(IDirect3DDevice9Ex *i
|
||||
UINT reg_idx, const float *data, UINT count)
|
||||
{
|
||||
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
|
||||
@ -103,7 +103,7 @@ index c8b906a981f..b271d8385b8 100644
|
||||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
@@ -3677,14 +3689,21 @@ static HRESULT WINAPI d3d9_device_GetVertexShaderConstantF(IDirect3DDevice9Ex *i
|
||||
@@ -3678,14 +3690,21 @@ static HRESULT WINAPI d3d9_device_GetVertexShaderConstantF(IDirect3DDevice9Ex *i
|
||||
UINT start_idx, float *constants, UINT count)
|
||||
{
|
||||
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
|
||||
@ -126,7 +126,7 @@ index c8b906a981f..b271d8385b8 100644
|
||||
{
|
||||
WARN("Trying to access %u constants, but d3d9 only supports %u\n",
|
||||
start_idx + count, device->vs_uniform_count);
|
||||
@@ -4742,7 +4761,7 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine
|
||||
@@ -4702,7 +4721,7 @@ HRESULT device_init(struct d3d9_device *device, struct d3d9 *parent, struct wine
|
||||
|
||||
device->immediate_context = wined3d_device_get_immediate_context(device->wined3d_device);
|
||||
wined3d_get_device_caps(wined3d_adapter, wined3d_device_type_from_d3d(device_type), &wined3d_caps);
|
||||
@ -136,10 +136,10 @@ index c8b906a981f..b271d8385b8 100644
|
||||
device->vs_uniform_count = caps.MaxVertexShaderConst;
|
||||
if (flags & D3DCREATE_ADAPTERGROUP_DEVICE)
|
||||
diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c
|
||||
index b6cb25cf8ea..72e86f95f0c 100644
|
||||
index 2a7a0ff3368..59b6b9910b9 100644
|
||||
--- a/dlls/d3d9/directx.c
|
||||
+++ b/dlls/d3d9/directx.c
|
||||
@@ -450,7 +450,7 @@ static HRESULT WINAPI d3d9_GetDeviceCaps(IDirect3D9Ex *iface, UINT adapter, D3DD
|
||||
@@ -447,7 +447,7 @@ static HRESULT WINAPI d3d9_GetDeviceCaps(IDirect3D9Ex *iface, UINT adapter, D3DD
|
||||
hr = wined3d_get_device_caps(wined3d_adapter, wined3d_device_type_from_d3d(device_type), &wined3d_caps);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
@ -149,5 +149,5 @@ index b6cb25cf8ea..72e86f95f0c 100644
|
||||
return hr;
|
||||
}
|
||||
--
|
||||
2.30.2
|
||||
2.40.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4c505cb4e69ee0d1b44a115e7d1ce5d03e546283 Mon Sep 17 00:00:00 2001
|
||||
From e7fcc9144f7244b87d44062263791350290f39b8 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Wesie <awesie@gmail.com>
|
||||
Date: Tue, 2 Oct 2018 23:28:01 -0500
|
||||
Subject: [PATCH] wined3d: Use bindless textures for GLSL shaders.
|
||||
@ -19,7 +19,7 @@ Signed-off-by: Andrew Wesie <awesie@gmail.com>
|
||||
10 files changed, 261 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
|
||||
index 521e3a044bc..9c3c430194b 100644
|
||||
index 4d55655e7bf..938fd4b4f02 100644
|
||||
--- a/dlls/wined3d/adapter_gl.c
|
||||
+++ b/dlls/wined3d/adapter_gl.c
|
||||
@@ -56,6 +56,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
|
||||
@ -30,7 +30,7 @@ index 521e3a044bc..9c3c430194b 100644
|
||||
{"GL_ARB_blend_func_extended", ARB_BLEND_FUNC_EXTENDED },
|
||||
{"GL_ARB_buffer_storage", ARB_BUFFER_STORAGE },
|
||||
{"GL_ARB_clear_buffer_object", ARB_CLEAR_BUFFER_OBJECT },
|
||||
@@ -2120,6 +2121,11 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
|
||||
@@ -2121,6 +2122,11 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
|
||||
/* GL_ARB_base_instance */
|
||||
USE_GL_FUNC(glDrawArraysInstancedBaseInstance)
|
||||
USE_GL_FUNC(glDrawElementsInstancedBaseVertexBaseInstance)
|
||||
@ -43,10 +43,10 @@ index 521e3a044bc..9c3c430194b 100644
|
||||
USE_GL_FUNC(glBindFragDataLocationIndexed)
|
||||
USE_GL_FUNC(glGetFragDataIndex)
|
||||
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
|
||||
index db70a9853d4..82240b65019 100644
|
||||
index 592216051c2..64782f7c286 100644
|
||||
--- a/dlls/wined3d/arb_program_shader.c
|
||||
+++ b/dlls/wined3d/arb_program_shader.c
|
||||
@@ -5639,6 +5639,12 @@ static BOOL shader_arb_has_ffp_proj_control(void *shader_priv)
|
||||
@@ -5631,6 +5631,12 @@ static BOOL shader_arb_has_ffp_proj_control(void *shader_priv)
|
||||
return priv->ffp_proj_control;
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ index db70a9853d4..82240b65019 100644
|
||||
static void shader_arb_precompile(void *shader_priv, struct wined3d_shader *shader) {}
|
||||
|
||||
static uint64_t shader_arb_shader_compile(struct wined3d_context *context, const struct wined3d_shader_desc *shader_desc,
|
||||
@@ -5667,6 +5673,7 @@ const struct wined3d_shader_backend_ops arb_program_shader_backend =
|
||||
@@ -5659,6 +5665,7 @@ const struct wined3d_shader_backend_ops arb_program_shader_backend =
|
||||
shader_arb_get_caps,
|
||||
shader_arb_color_fixup_supported,
|
||||
shader_arb_has_ffp_proj_control,
|
||||
@ -68,10 +68,10 @@ index db70a9853d4..82240b65019 100644
|
||||
};
|
||||
|
||||
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c
|
||||
index af46cd9dfd7..14a2e52bee8 100644
|
||||
index a8c5160a5b3..3cf56c321d1 100644
|
||||
--- a/dlls/wined3d/context_gl.c
|
||||
+++ b/dlls/wined3d/context_gl.c
|
||||
@@ -3986,6 +3986,12 @@ static void wined3d_context_gl_bind_shader_resources(struct wined3d_context_gl *
|
||||
@@ -4006,6 +4006,12 @@ static void wined3d_context_gl_bind_shader_resources(struct wined3d_context_gl *
|
||||
if (!(shader = state->shader[shader_type]))
|
||||
return;
|
||||
|
||||
@ -85,7 +85,7 @@ index af46cd9dfd7..14a2e52bee8 100644
|
||||
&shader->reg_maps.shader_version, &base, &count);
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 909b3f7961c..138e35883d7 100644
|
||||
index ca3f9394342..d31dc4d9ff9 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -578,6 +578,59 @@ void wined3d_device_destroy_default_samplers(struct wined3d_device *device)
|
||||
@ -148,7 +148,7 @@ index 909b3f7961c..138e35883d7 100644
|
||||
static bool wined3d_null_image_vk_init(struct wined3d_image_vk *image, struct wined3d_context_vk *context_vk,
|
||||
VkCommandBuffer vk_command_buffer, VkImageType type, unsigned int layer_count, unsigned int sample_count)
|
||||
{
|
||||
@@ -1283,6 +1336,7 @@ void wined3d_device_gl_create_primary_opengl_context_cs(void *object)
|
||||
@@ -1288,6 +1341,7 @@ void wined3d_device_gl_create_primary_opengl_context_cs(void *object)
|
||||
|
||||
wined3d_device_gl_create_dummy_textures(device_gl, context_gl);
|
||||
wined3d_device_create_default_samplers(device, context);
|
||||
@ -157,10 +157,10 @@ index 909b3f7961c..138e35883d7 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index abbbf407f33..d0be8f975db 100644
|
||||
index 5d878857ae8..dc50dc1858c 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -744,6 +744,113 @@ static void shader_glsl_append_sampler_binding_qualifier(struct wined3d_string_b
|
||||
@@ -742,6 +742,113 @@ static void shader_glsl_append_sampler_binding_qualifier(struct wined3d_string_b
|
||||
ERR("Unmapped sampler %u.\n", sampler_idx);
|
||||
}
|
||||
|
||||
@ -274,7 +274,7 @@ index abbbf407f33..d0be8f975db 100644
|
||||
/* Context activation is done by the caller. */
|
||||
static void shader_glsl_load_samplers(const struct wined3d_context *context,
|
||||
struct shader_glsl_priv *priv, GLuint program_id, const struct wined3d_shader_reg_maps *reg_maps)
|
||||
@@ -2551,7 +2658,9 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
|
||||
@@ -2549,7 +2656,9 @@ static void shader_generate_glsl_declarations(const struct wined3d_context_gl *c
|
||||
break;
|
||||
}
|
||||
|
||||
@ -285,7 +285,7 @@ index abbbf407f33..d0be8f975db 100644
|
||||
shader_glsl_append_sampler_binding_qualifier(buffer, &context_gl->c, version, entry->bind_idx);
|
||||
shader_addline(buffer, "uniform %s%s %s_sampler%u;\n",
|
||||
sampler_type_prefix, sampler_type, prefix, entry->bind_idx);
|
||||
@@ -7652,6 +7761,8 @@ static void shader_glsl_generate_colour_key_test(struct wined3d_string_buffer *b
|
||||
@@ -7631,6 +7740,8 @@ static void shader_glsl_generate_colour_key_test(struct wined3d_string_buffer *b
|
||||
static void shader_glsl_enable_extensions(struct wined3d_string_buffer *buffer,
|
||||
const struct wined3d_gl_info *gl_info)
|
||||
{
|
||||
@ -294,7 +294,7 @@ index abbbf407f33..d0be8f975db 100644
|
||||
if (gl_info->supported[ARB_CULL_DISTANCE])
|
||||
shader_addline(buffer, "#extension GL_ARB_cull_distance : enable\n");
|
||||
if (gl_info->supported[ARB_GPU_SHADER5])
|
||||
@@ -11792,6 +11903,7 @@ const struct wined3d_shader_backend_ops glsl_shader_backend =
|
||||
@@ -11771,6 +11882,7 @@ const struct wined3d_shader_backend_ops glsl_shader_backend =
|
||||
shader_glsl_get_caps,
|
||||
shader_glsl_color_fixup_supported,
|
||||
shader_glsl_has_ffp_proj_control,
|
||||
@ -303,10 +303,10 @@ index abbbf407f33..d0be8f975db 100644
|
||||
};
|
||||
|
||||
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
|
||||
index 68f9fe4cb90..132a1213518 100644
|
||||
index 3d60af16359..2d3614f67d5 100644
|
||||
--- a/dlls/wined3d/shader.c
|
||||
+++ b/dlls/wined3d/shader.c
|
||||
@@ -3292,6 +3292,12 @@ static BOOL shader_none_has_ffp_proj_control(void *shader_priv)
|
||||
@@ -2047,6 +2047,12 @@ static BOOL shader_none_has_ffp_proj_control(void *shader_priv)
|
||||
return priv->ffp_proj_control;
|
||||
}
|
||||
|
||||
@ -319,7 +319,7 @@ index 68f9fe4cb90..132a1213518 100644
|
||||
static uint64_t shader_none_shader_compile(struct wined3d_context *context, const struct wined3d_shader_desc *shader_desc,
|
||||
enum wined3d_shader_type shader_type)
|
||||
{
|
||||
@@ -3317,6 +3323,7 @@ const struct wined3d_shader_backend_ops none_shader_backend =
|
||||
@@ -2072,6 +2078,7 @@ const struct wined3d_shader_backend_ops none_shader_backend =
|
||||
shader_none_get_caps,
|
||||
shader_none_color_fixup_supported,
|
||||
shader_none_has_ffp_proj_control,
|
||||
@ -328,7 +328,7 @@ index 68f9fe4cb90..132a1213518 100644
|
||||
};
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index ae188ba4290..684d355bf8f 100644
|
||||
index 32923349c6b..d422d6027cd 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -1258,7 +1258,7 @@ void wined3d_gl_texture_swizzle_from_color_fixup(GLint swizzle[4], struct color_
|
||||
@ -378,10 +378,10 @@ index ae188ba4290..684d355bf8f 100644
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
|
||||
index 65d7bd67ada..90df50e2e7f 100644
|
||||
index a95ff13410f..eedcf94377d 100644
|
||||
--- a/dlls/wined3d/view.c
|
||||
+++ b/dlls/wined3d/view.c
|
||||
@@ -1248,6 +1248,36 @@ void wined3d_shader_resource_view_gl_bind(struct wined3d_shader_resource_view_gl
|
||||
@@ -1259,6 +1259,36 @@ void wined3d_shader_resource_view_gl_bind(struct wined3d_shader_resource_view_gl
|
||||
wined3d_sampler_gl_bind(sampler_gl, unit, texture_gl, context_gl);
|
||||
}
|
||||
|
||||
@ -431,18 +431,18 @@ index 75c4cd732ab..ccc1ce2f0ff 100644
|
||||
ARB_BUFFER_STORAGE,
|
||||
ARB_CLEAR_BUFFER_OBJECT,
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index bb6dcf78ae6..8a5ea778b3e 100644
|
||||
index 07a9c7978a3..70c5b9f4e1e 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -88,6 +88,7 @@ struct wined3d_adapter;
|
||||
struct wined3d_buffer_vk;
|
||||
@@ -114,6 +114,7 @@ struct wined3d_fragment_pipe_ops;
|
||||
struct wined3d_adapter;
|
||||
struct wined3d_context;
|
||||
struct wined3d_context_vk;
|
||||
+struct wined3d_context_gl;
|
||||
struct wined3d_gl_info;
|
||||
struct wined3d_state;
|
||||
struct wined3d_swapchain_gl;
|
||||
@@ -1612,6 +1613,8 @@ struct wined3d_shader_backend_ops
|
||||
@@ -1610,6 +1611,8 @@ struct wined3d_shader_backend_ops
|
||||
void (*shader_get_caps)(const struct wined3d_adapter *adapter, struct shader_caps *caps);
|
||||
BOOL (*shader_color_fixup_supported)(struct color_fixup_desc fixup);
|
||||
BOOL (*shader_has_ffp_proj_control)(void *shader_priv);
|
||||
@ -451,7 +451,7 @@ index bb6dcf78ae6..8a5ea778b3e 100644
|
||||
uint64_t (*shader_compile)(struct wined3d_context *context, const struct wined3d_shader_desc *shader_desc,
|
||||
enum wined3d_shader_type shader_type);
|
||||
};
|
||||
@@ -3962,6 +3965,21 @@ struct wined3d_dummy_textures
|
||||
@@ -3525,6 +3528,21 @@ struct wined3d_dummy_textures
|
||||
GLuint tex_2d_ms_array;
|
||||
};
|
||||
|
||||
@ -473,7 +473,7 @@ index bb6dcf78ae6..8a5ea778b3e 100644
|
||||
#define WINED3D_UNMAPPED_STAGE ~0u
|
||||
|
||||
/* Multithreaded flag. Removed from the public header to signal that
|
||||
@@ -4037,6 +4055,9 @@ struct wined3d_device
|
||||
@@ -3600,6 +3618,9 @@ struct wined3d_device
|
||||
struct wined3d_sampler *default_sampler;
|
||||
struct wined3d_sampler *null_sampler;
|
||||
|
||||
@ -483,7 +483,7 @@ index bb6dcf78ae6..8a5ea778b3e 100644
|
||||
/* Command stream */
|
||||
struct wined3d_cs *cs;
|
||||
|
||||
@@ -4735,6 +4756,8 @@ void wined3d_texture_download_from_texture(struct wined3d_texture *dst_texture,
|
||||
@@ -4178,6 +4199,8 @@ void wined3d_texture_download_from_texture(struct wined3d_texture *dst_texture,
|
||||
void wined3d_texture_get_bo_address(const struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx, struct wined3d_bo_address *data, uint32_t location) DECLSPEC_HIDDEN;
|
||||
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture) DECLSPEC_HIDDEN;
|
||||
@ -492,15 +492,15 @@ index bb6dcf78ae6..8a5ea778b3e 100644
|
||||
void wined3d_texture_invalidate_location(struct wined3d_texture *texture,
|
||||
unsigned int sub_resource_idx, uint32_t location) DECLSPEC_HIDDEN;
|
||||
void wined3d_texture_load(struct wined3d_texture *texture,
|
||||
@@ -5547,6 +5570,8 @@ HRESULT wined3d_shader_resource_view_gl_init(struct wined3d_shader_resource_view
|
||||
@@ -4890,6 +4913,8 @@ HRESULT wined3d_shader_resource_view_gl_init(struct wined3d_shader_resource_view
|
||||
void *parent, const struct wined3d_parent_ops *parent_ops) DECLSPEC_HIDDEN;
|
||||
void wined3d_shader_resource_view_gl_update(struct wined3d_shader_resource_view_gl *srv_gl,
|
||||
struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
|
||||
+GLuint64 wined3d_shader_resource_view_handle(struct wined3d_shader_resource_view *view,
|
||||
+ struct wined3d_sampler *sampler, struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
|
||||
|
||||
struct wined3d_view_vk
|
||||
struct wined3d_unordered_access_view
|
||||
{
|
||||
--
|
||||
2.38.1
|
||||
2.40.1
|
||||
|
||||
|
@ -1 +1 @@
|
||||
aaf304f2441ebe52834fdda2b8a02a5349d2ca43
|
||||
fb4d36c66131d1c45ebdcb5d56151e8f7782ebd1
|
||||
|
Loading…
Reference in New Issue
Block a user