You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
81425de332 | ||
|
c2d96a3c91 | ||
|
292830fa82 | ||
|
6912feaf65 | ||
|
aa0c8391eb | ||
|
36020b4a0e | ||
|
4fa7fcd631 | ||
|
ebf36e4717 |
@@ -1,231 +0,0 @@
|
||||
From e6c1c1fe3fe2f4fe7d3e421b94d925c40063af22 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 5 Jul 2019 13:20:23 +0800
|
||||
Subject: [PATCH] cryptext: Implement CryptExtOpenCER.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
configure | 1 +
|
||||
configure.ac | 1 +
|
||||
dlls/cryptext/Makefile.in | 3 +-
|
||||
dlls/cryptext/cryptext.spec | 4 +--
|
||||
dlls/cryptext/cryptext_main.c | 64 +++++++++++++++++++++++++++++++++
|
||||
dlls/cryptext/tests/Makefile.in | 4 +++
|
||||
dlls/cryptext/tests/cryptext.c | 61 +++++++++++++++++++++++++++++++
|
||||
7 files changed, 135 insertions(+), 3 deletions(-)
|
||||
create mode 100644 dlls/cryptext/tests/Makefile.in
|
||||
create mode 100644 dlls/cryptext/tests/cryptext.c
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index ca6e87d4740..7033499399f 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -21660,6 +21660,7 @@ wine_fn_config_makefile dlls/crypt32/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptdlg enable_cryptdlg
|
||||
wine_fn_config_makefile dlls/cryptdll enable_cryptdll
|
||||
wine_fn_config_makefile dlls/cryptext enable_cryptext
|
||||
+wine_fn_config_makefile dlls/cryptext/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptnet enable_cryptnet
|
||||
wine_fn_config_makefile dlls/cryptnet/tests enable_tests
|
||||
wine_fn_config_makefile dlls/cryptowinrt enable_cryptowinrt
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index cba55126869..57064a05fe5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2477,6 +2477,7 @@ WINE_CONFIG_MAKEFILE(dlls/crypt32/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdlg)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptdll)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptext)
|
||||
+WINE_CONFIG_MAKEFILE(dlls/cryptext/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptnet)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptnet/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/cryptowinrt)
|
||||
diff --git a/dlls/cryptext/Makefile.in b/dlls/cryptext/Makefile.in
|
||||
index 5598bfb78e0..acda4e4ac6d 100644
|
||||
--- a/dlls/cryptext/Makefile.in
|
||||
+++ b/dlls/cryptext/Makefile.in
|
||||
@@ -1,4 +1,5 @@
|
||||
-MODULE = cryptext.dll
|
||||
+MODULE = cryptext.dll
|
||||
+IMPORTS = crypt32 cryptui user32
|
||||
|
||||
EXTRADLLFLAGS = -Wb,--prefer-native
|
||||
|
||||
diff --git a/dlls/cryptext/cryptext.spec b/dlls/cryptext/cryptext.spec
|
||||
index ee3e155f457..24b4794c198 100644
|
||||
--- a/dlls/cryptext/cryptext.spec
|
||||
+++ b/dlls/cryptext/cryptext.spec
|
||||
@@ -12,8 +12,8 @@
|
||||
@ stub CryptExtAddSPCW
|
||||
@ stub CryptExtOpenCAT
|
||||
@ stub CryptExtOpenCATW
|
||||
-@ stub CryptExtOpenCER
|
||||
-@ stub CryptExtOpenCERW
|
||||
+@ stdcall CryptExtOpenCER(long ptr str long)
|
||||
+@ stdcall CryptExtOpenCERW(long ptr wstr long)
|
||||
@ stub CryptExtOpenCRL
|
||||
@ stub CryptExtOpenCRLW
|
||||
@ stub CryptExtOpenCTL
|
||||
diff --git a/dlls/cryptext/cryptext_main.c b/dlls/cryptext/cryptext_main.c
|
||||
index 537ba66cd3b..a4314518eac 100644
|
||||
--- a/dlls/cryptext/cryptext_main.c
|
||||
+++ b/dlls/cryptext/cryptext_main.c
|
||||
@@ -22,10 +22,29 @@
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
+#include "winnls.h"
|
||||
+#include "wincrypt.h"
|
||||
+#include "winuser.h"
|
||||
+#include "cryptuiapi.h"
|
||||
+
|
||||
+#include "wine/heap.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(cryptext);
|
||||
|
||||
+static WCHAR *heap_strdupAtoW(const char *str)
|
||||
+{
|
||||
+ WCHAR *ret;
|
||||
+ INT len;
|
||||
+
|
||||
+ if (!str) return NULL;
|
||||
+ len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
||||
+ ret = heap_alloc(len * sizeof(WCHAR));
|
||||
+ if (ret)
|
||||
+ MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/***********************************************************************
|
||||
* CryptExtAddPFX (CRYPTEXT.@)
|
||||
*/
|
||||
@@ -43,3 +62,48 @@ HRESULT WINAPI CryptExtAddPFXW(LPCWSTR filename)
|
||||
FIXME("stub: %s\n", debugstr_w(filename));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * CryptExtOpenCERW (CRYPTEXT.@)
|
||||
+ */
|
||||
+HRESULT WINAPI CryptExtOpenCERW(HWND hwnd, HINSTANCE hinst, LPCWSTR filename, DWORD showcmd)
|
||||
+{
|
||||
+ PCCERT_CONTEXT ctx;
|
||||
+ CRYPTUI_VIEWCERTIFICATE_STRUCTW info;
|
||||
+
|
||||
+ TRACE("(%p, %p, %s, %lu)\n", hwnd, hinst, debugstr_w(filename), showcmd);
|
||||
+
|
||||
+ if (!CryptQueryObject(CERT_QUERY_OBJECT_FILE, filename, CERT_QUERY_CONTENT_FLAG_CERT,
|
||||
+ CERT_QUERY_FORMAT_FLAG_ALL, 0, NULL, NULL, NULL, NULL, NULL,
|
||||
+ (const void **)&ctx))
|
||||
+ {
|
||||
+ /* FIXME: move to the resources */
|
||||
+ static const WCHAR msg[] = {'T','h','i','s',' ','i','s',' ','n','o','t',' ','a',' ','v','a','l','i','d',' ','c','e','r','t','i','f','i','c','a','t','e',0};
|
||||
+ MessageBoxW(NULL, msg, filename, MB_OK | MB_ICONERROR);
|
||||
+ return S_OK; /* according to the tests */
|
||||
+ }
|
||||
+
|
||||
+ memset(&info, 0, sizeof(info));
|
||||
+ info.dwSize = sizeof(info);
|
||||
+ info.pCertContext = ctx;
|
||||
+ CryptUIDlgViewCertificateW(&info, NULL);
|
||||
+ CertFreeCertificateContext(ctx);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * CryptExtOpenCER (CRYPTEXT.@)
|
||||
+ */
|
||||
+HRESULT WINAPI CryptExtOpenCER(HWND hwnd, HINSTANCE hinst, LPCSTR filename, DWORD showcmd)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ LPWSTR filenameW;
|
||||
+
|
||||
+ TRACE("(%p, %p, %s, %lu)\n", hwnd, hinst, debugstr_a(filename), showcmd);
|
||||
+
|
||||
+ filenameW = heap_strdupAtoW(filename);
|
||||
+ hr = CryptExtOpenCERW(hwnd, hinst, filenameW, showcmd);
|
||||
+ heap_free(filenameW);
|
||||
+ return hr;
|
||||
+}
|
||||
diff --git a/dlls/cryptext/tests/Makefile.in b/dlls/cryptext/tests/Makefile.in
|
||||
new file mode 100644
|
||||
index 00000000000..c3f4551fc00
|
||||
--- /dev/null
|
||||
+++ b/dlls/cryptext/tests/Makefile.in
|
||||
@@ -0,0 +1,4 @@
|
||||
+TESTDLL = cryptext.dll
|
||||
+
|
||||
+SOURCES = \
|
||||
+ cryptext.c
|
||||
diff --git a/dlls/cryptext/tests/cryptext.c b/dlls/cryptext/tests/cryptext.c
|
||||
new file mode 100644
|
||||
index 00000000000..ab1007dbd82
|
||||
--- /dev/null
|
||||
+++ b/dlls/cryptext/tests/cryptext.c
|
||||
@@ -0,0 +1,61 @@
|
||||
+/*
|
||||
+ * Copyright 2019 Dmitry Timoshkov
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+ */
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+#include <assert.h>
|
||||
+#include <windef.h>
|
||||
+#include <winbase.h>
|
||||
+#include <winuser.h>
|
||||
+#include <winerror.h>
|
||||
+
|
||||
+#include "wine/test.h"
|
||||
+
|
||||
+static HRESULT (WINAPI *pCryptExtOpenCER)(HWND,HINSTANCE,LPCSTR,DWORD);
|
||||
+
|
||||
+static void test_CryptExtOpenCER(void)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ if (!pCryptExtOpenCER)
|
||||
+ {
|
||||
+ win_skip("CryptExtOpenCER is not available on this platform\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (!winetest_interactive)
|
||||
+ {
|
||||
+ skip("CryptExtOpenCER test needs user interaction\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ hr = pCryptExtOpenCER(0, 0, "dead.beef", SW_HIDE);
|
||||
+ ok(hr == S_OK, "got %#lx\n", hr);
|
||||
+
|
||||
+ hr = pCryptExtOpenCER(0, 0, "VeriSign Class 3 Public Primary Certification Authority - G4.txt", SW_SHOW);
|
||||
+ ok(hr == S_OK, "got %#lx\n", hr);
|
||||
+}
|
||||
+
|
||||
+START_TEST(cryptext)
|
||||
+{
|
||||
+ HMODULE hmod = LoadLibraryA("cryptext.dll");
|
||||
+
|
||||
+ pCryptExtOpenCER = (void *)GetProcAddress(hmod, "CryptExtOpenCER");
|
||||
+
|
||||
+ test_CryptExtOpenCER();
|
||||
+}
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -1,2 +0,0 @@
|
||||
# Taken from the mailing list - July 2019.
|
||||
Fixes: cryptext: Implement CryptExtOpenCER.
|
@@ -1,118 +0,0 @@
|
||||
From 71d1c176af87bdc48326d5883fbea608314ee0a4 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sun, 11 Jan 2015 16:29:30 +0100
|
||||
Subject: [PATCH] d3dx9_36: Improve D3DXSaveTextureToFile to save simple
|
||||
texture to dds file.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/d3dx9_private.h | 2 ++
|
||||
dlls/d3dx9_36/surface.c | 63 +++++++++++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/texture.c | 5 +--
|
||||
3 files changed, 66 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/d3dx9_private.h b/dlls/d3dx9_36/d3dx9_private.h
|
||||
index 6a9b3e12b7b..0c6374f35ca 100644
|
||||
--- a/dlls/d3dx9_36/d3dx9_private.h
|
||||
+++ b/dlls/d3dx9_36/d3dx9_private.h
|
||||
@@ -316,6 +316,8 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
|
||||
IDirect3DSurface9 **temp_surface, BOOL write);
|
||||
HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect,
|
||||
IDirect3DSurface9 *temp_surface, BOOL update);
|
||||
+HRESULT save_dds_texture_to_memory(ID3DXBuffer **dst_buffer, IDirect3DBaseTexture9 *src_texture,
|
||||
+ const PALETTEENTRY *src_palette);
|
||||
HRESULT d3dx_pixels_init(const void *data, uint32_t row_pitch, uint32_t slice_pitch,
|
||||
const PALETTEENTRY *palette, enum d3dx_pixel_format_id format, uint32_t left, uint32_t top, uint32_t right,
|
||||
uint32_t bottom, uint32_t front, uint32_t back, struct d3dx_pixels *pixels);
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index 9d2dc96a979..912a3e3c849 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -628,6 +628,69 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
+static HRESULT get_surface(D3DRESOURCETYPE type, struct IDirect3DBaseTexture9 *tex,
|
||||
+ int face, UINT level, struct IDirect3DSurface9 **surf)
|
||||
+{
|
||||
+ switch (type)
|
||||
+ {
|
||||
+ case D3DRTYPE_TEXTURE:
|
||||
+ return IDirect3DTexture9_GetSurfaceLevel((IDirect3DTexture9*) tex, level, surf);
|
||||
+ case D3DRTYPE_CUBETEXTURE:
|
||||
+ return IDirect3DCubeTexture9_GetCubeMapSurface((IDirect3DCubeTexture9*) tex, face, level, surf);
|
||||
+ default:
|
||||
+ ERR("Unexpected texture type\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+HRESULT save_dds_texture_to_memory(ID3DXBuffer **dst_buffer, IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ D3DRESOURCETYPE type;
|
||||
+ UINT mip_levels;
|
||||
+ IDirect3DSurface9 *surface;
|
||||
+
|
||||
+ type = IDirect3DBaseTexture9_GetType(src_texture);
|
||||
+
|
||||
+ if ((type != D3DRTYPE_TEXTURE) && (type != D3DRTYPE_CUBETEXTURE) && (type != D3DRTYPE_VOLUMETEXTURE))
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ if (type == D3DRTYPE_CUBETEXTURE)
|
||||
+ {
|
||||
+ FIXME("Cube texture not supported yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+ else if (type == D3DRTYPE_VOLUMETEXTURE)
|
||||
+ {
|
||||
+ FIXME("Volume texture not supported yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+
|
||||
+ mip_levels = IDirect3DTexture9_GetLevelCount(src_texture);
|
||||
+
|
||||
+ if (mip_levels > 1)
|
||||
+ {
|
||||
+ FIXME("Mipmap not supported yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+
|
||||
+ if (src_palette)
|
||||
+ {
|
||||
+ FIXME("Saving surfaces with palettized pixel formats not implemented yet\n");
|
||||
+ return E_NOTIMPL;
|
||||
+ }
|
||||
+
|
||||
+ hr = get_surface(type, src_texture, D3DCUBEMAP_FACE_POSITIVE_X, 0, &surface);
|
||||
+
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ {
|
||||
+ hr = save_dds_surface_to_memory(dst_buffer, surface, NULL, NULL);
|
||||
+ IDirect3DSurface9_Release(surface);
|
||||
+ }
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
+
|
||||
static const uint8_t bmp_file_signature[] = { 'B', 'M' };
|
||||
static const uint8_t jpg_file_signature[] = { 0xff, 0xd8 };
|
||||
static const uint8_t png_file_signature[] = { 0x89, 'P', 'N', 'G', 0x0d, 0x0a, 0x1a, 0x0a };
|
||||
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
|
||||
index 719a2787445..3f76ec209f9 100644
|
||||
--- a/dlls/d3dx9_36/texture.c
|
||||
+++ b/dlls/d3dx9_36/texture.c
|
||||
@@ -1866,10 +1866,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
|
||||
if (!dst_buffer || !src_texture) return D3DERR_INVALIDCALL;
|
||||
|
||||
if (file_format == D3DXIFF_DDS)
|
||||
- {
|
||||
- FIXME("DDS file format isn't supported yet\n");
|
||||
- return E_NOTIMPL;
|
||||
- }
|
||||
+ return save_dds_texture_to_memory(dst_buffer, src_texture, src_palette);
|
||||
|
||||
type = IDirect3DBaseTexture9_GetType(src_texture);
|
||||
switch (type)
|
||||
--
|
||||
2.47.2
|
||||
|
@@ -1,2 +0,0 @@
|
||||
Fixes: [26898] Support for DDS file format in D3DXSaveTextureToFileInMemory
|
||||
Disabled: True
|
@@ -1,4 +1,4 @@
|
||||
From 2d897946980e67f742b9f39f5f548cf0e2340510 Mon Sep 17 00:00:00 2001
|
||||
From f16a96be2b219f8e7733a36dc147f5247b618870 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 17 Jul 2024 21:55:20 +1000
|
||||
Subject: [PATCH] odbc32: SQLGetData support ODBC v2.0
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] odbc32: SQLGetData support ODBC v2.0
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 3b3b198eaa8..c2748cd33d7 100644
|
||||
index c16c9a6da69..18d3df1007f 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -2450,11 +2450,35 @@ static SQLRETURN get_data_unix( struct statement *stmt, SQLUSMALLINT column, SQL
|
||||
@@ -2468,11 +2468,35 @@ static SQLRETURN get_data_unix( struct statement *stmt, SQLUSMALLINT column, SQL
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ index 3b3b198eaa8..c2748cd33d7 100644
|
||||
if (stmt->hdr.win32_funcs->SQLGetData)
|
||||
+ {
|
||||
+ struct environment *env = (struct environment *)find_object_type(SQL_HANDLE_ENV, stmt->hdr.parent);
|
||||
+ if (env && env->attr_version == SQL_OV_ODBC2)
|
||||
+ if (env && env->driver_ver == SQL_OV_ODBC2)
|
||||
+ {
|
||||
+ if (type == SQL_C_TYPE_TIME)
|
||||
+ type = SQL_C_TIME;
|
||||
@@ -48,5 +48,5 @@ index 3b3b198eaa8..c2748cd33d7 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.45.2
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,26 +1,27 @@
|
||||
From 6b7448e5ebdc0b16f3af606a62e2ca465f3ae026 Mon Sep 17 00:00:00 2001
|
||||
From 5874cf0a309a0ecfa97206b8b15734485920c325 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 17 Jul 2024 22:03:03 +1000
|
||||
Subject: [PATCH] odbc32: SQLColAttributesW support ODBC v2.0
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 18 ++++++++++++++++--
|
||||
1 file changed, 16 insertions(+), 2 deletions(-)
|
||||
dlls/odbc32/proxyodbc.c | 19 +++++++++++++++++--
|
||||
1 file changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 71c853013fd..b5c0edb119e 100644
|
||||
index 18d3df1007f..8d51ad37176 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -6195,6 +6195,8 @@ static SQLRETURN col_attribute_win32_w( struct statement *stmt, SQLUSMALLINT col
|
||||
@@ -6256,6 +6256,9 @@ static SQLRETURN col_attribute_win32_w( struct statement *stmt, SQLUSMALLINT col
|
||||
SQLPOINTER char_attr, SQLSMALLINT buflen, SQLSMALLINT *retlen,
|
||||
SQLLEN *num_attr )
|
||||
{
|
||||
+ struct environment *env;
|
||||
+ SQLRETURN ret = SQL_ERROR;
|
||||
+
|
||||
if (stmt->hdr.win32_funcs->SQLColAttributeW)
|
||||
return stmt->hdr.win32_funcs->SQLColAttributeW( stmt->hdr.win32_handle, col, field_id, char_attr, buflen,
|
||||
retlen, num_attr );
|
||||
@@ -6237,11 +6239,23 @@ static SQLRETURN col_attribute_win32_w( struct statement *stmt, SQLUSMALLINT col
|
||||
@@ -6315,11 +6318,23 @@ static SQLRETURN col_attribute_win32_w( struct statement *stmt, SQLUSMALLINT col
|
||||
return SQL_ERROR;
|
||||
}
|
||||
|
||||
@@ -28,9 +29,9 @@ index 71c853013fd..b5c0edb119e 100644
|
||||
+ ret = stmt->hdr.win32_funcs->SQLColAttributesW( stmt->hdr.win32_handle, col, field_id, char_attr, buflen,
|
||||
retlen, num_attr );
|
||||
+ /* Convert back for ODBC2 drivers */
|
||||
+ env = (struct environment *)find_object_type(SQL_HANDLE_ENV, stmt->hdr.parent);
|
||||
+ if (SQL_SUCCEEDED(ret) && num_attr && field_id == SQL_COLUMN_TYPE &&
|
||||
+ ((struct environment*)(stmt->hdr.parent))->attr_version == SQL_OV_ODBC2 &&
|
||||
+ ((struct environment*)(stmt->hdr.parent))->driver_ver == SQL_OV_ODBC2)
|
||||
+ env && env->attr_version == SQL_OV_ODBC3 && env->driver_ver == SQL_OV_ODBC2)
|
||||
+ {
|
||||
+ if (*num_attr == SQL_TIME)
|
||||
+ *num_attr = SQL_TYPE_TIME;
|
||||
@@ -47,5 +48,5 @@ index 71c853013fd..b5c0edb119e 100644
|
||||
|
||||
/*************************************************************************
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 578afa6089ac629fca4aec814cba2b534aabbf28 Mon Sep 17 00:00:00 2001
|
||||
From 27709a4b0e9aa604d2936f8cf79c8958e9d94763 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 26 Feb 2015 23:21:26 +0100
|
||||
Subject: [PATCH] shell32: Pass FILE_INFORMATION into SHNotify* functions.
|
||||
@@ -9,12 +9,12 @@ Preparation of the progressbar work. Based on a patch by Huw Campbell.
|
||||
1 file changed, 104 insertions(+), 110 deletions(-)
|
||||
|
||||
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
|
||||
index 9d2d4dc3f82..4bd486a7426 100644
|
||||
index 40cc93eb53d..94e5ab45b37 100644
|
||||
--- a/dlls/shell32/shlfileop.c
|
||||
+++ b/dlls/shell32/shlfileop.c
|
||||
@@ -55,16 +55,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||
#define DE_SAMEFILE 0x71
|
||||
#define DE_DESTSAMETREE 0x7D
|
||||
@@ -68,16 +68,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||
#define DE_FLDDESTISFILE 0x7E
|
||||
#define DE_FILEDESTISFLD 0x80
|
||||
|
||||
-static DWORD SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec);
|
||||
-static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec);
|
||||
@@ -29,7 +29,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
typedef struct
|
||||
{
|
||||
SHFILEOPSTRUCTW *req;
|
||||
@@ -73,6 +63,42 @@ typedef struct
|
||||
@@ -86,6 +76,42 @@ typedef struct
|
||||
BOOL bCancelled;
|
||||
} FILE_OPERATION;
|
||||
|
||||
@@ -72,7 +72,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
/* Confirm dialogs with an optional "Yes To All" as used in file operations confirmations
|
||||
*/
|
||||
struct confirm_msg_info
|
||||
@@ -336,7 +362,7 @@ HRESULT WINAPI SHIsFileAvailableOffline(LPCWSTR path, LPDWORD status)
|
||||
@@ -349,7 +375,7 @@ HRESULT WINAPI SHIsFileAvailableOffline(LPCWSTR path, LPDWORD status)
|
||||
* Asks for confirmation when bShowUI is true and deletes the directory and
|
||||
* all its subdirectories and files if necessary.
|
||||
*/
|
||||
@@ -81,7 +81,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
{
|
||||
DWORD ret = 0;
|
||||
HANDLE hFind;
|
||||
@@ -346,16 +372,18 @@ static DWORD SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
|
||||
@@ -359,16 +385,18 @@ static DWORD SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
|
||||
PathCombineW(szTemp, pszDir, L"*");
|
||||
hFind = FindFirstFileW(szTemp, &wfd);
|
||||
|
||||
@@ -104,7 +104,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
} while (!ret && FindNextFileW(hFind, &wfd));
|
||||
}
|
||||
FindClose(hFind);
|
||||
@@ -486,22 +514,9 @@ BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path)
|
||||
@@ -499,22 +527,9 @@ BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path)
|
||||
return (SHNotifyRemoveDirectoryA(path) == ERROR_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
{
|
||||
LPWSTR wPath;
|
||||
DWORD retCode;
|
||||
@@ -511,7 +526,7 @@ static DWORD SHNotifyDeleteFileA(LPCSTR path)
|
||||
@@ -524,7 +539,7 @@ static DWORD SHNotifyDeleteFileA(LPCSTR path)
|
||||
retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0);
|
||||
if (!retCode)
|
||||
{
|
||||
@@ -139,7 +139,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
free(wPath);
|
||||
}
|
||||
return retCode;
|
||||
@@ -519,12 +534,14 @@ static DWORD SHNotifyDeleteFileA(LPCSTR path)
|
||||
@@ -532,12 +547,14 @@ static DWORD SHNotifyDeleteFileA(LPCSTR path)
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
@@ -155,7 +155,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
ret = DeleteFileW(path);
|
||||
if (!ret)
|
||||
{
|
||||
@@ -547,8 +564,8 @@ static DWORD SHNotifyDeleteFileW(LPCWSTR path)
|
||||
@@ -560,8 +577,8 @@ static DWORD SHNotifyDeleteFileW(LPCWSTR path)
|
||||
DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
|
||||
{
|
||||
if (SHELL_OsIsUnicode())
|
||||
@@ -166,7 +166,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
@@ -557,18 +574,21 @@ DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
|
||||
@@ -570,18 +587,21 @@ DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
|
||||
* Moves a file. Also triggers a change notify if one exists.
|
||||
*
|
||||
* PARAMS
|
||||
@@ -189,7 +189,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
ret = MoveFileExW(src, dest, MOVEFILE_REPLACE_EXISTING);
|
||||
|
||||
/* MOVEFILE_REPLACE_EXISTING fails with dirs, so try MoveFile */
|
||||
@@ -603,6 +623,7 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
|
||||
@@ -616,6 +636,7 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
|
||||
* Copies a file. Also triggers a change notify if one exists.
|
||||
*
|
||||
* PARAMS
|
||||
@@ -197,7 +197,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
* src [I] path to source file to move
|
||||
* dest [I] path to target file to move to
|
||||
* bFailIfExists [I] if TRUE, the target file will not be overwritten if
|
||||
@@ -611,13 +632,15 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
|
||||
@@ -624,13 +645,15 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
|
||||
* RETURNS
|
||||
* ERROR_SUCCESS if successful
|
||||
*/
|
||||
@@ -214,7 +214,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
/* Destination file may already exist with read only attribute */
|
||||
attribs = GetFileAttributesW(dest);
|
||||
if (IsAttrib(attribs, FILE_ATTRIBUTE_READONLY))
|
||||
@@ -897,30 +920,6 @@ int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
|
||||
@@ -910,30 +933,6 @@ int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
|
||||
return retCode;
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
static inline void grow_list(FILE_LIST *list)
|
||||
{
|
||||
FILE_ENTRY *new = _recalloc(list->feFiles, list->num_alloc * 2, sizeof(*new));
|
||||
@@ -1085,7 +1084,7 @@ static void destroy_file_list(FILE_LIST *flList)
|
||||
@@ -1099,7 +1098,7 @@ static void destroy_file_list(FILE_LIST *flList)
|
||||
static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPCWSTR szDestPath)
|
||||
{
|
||||
WCHAR szFrom[MAX_PATH], szTo[MAX_PATH];
|
||||
@@ -254,7 +254,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
|
||||
if (IsDotDir(feFrom->szFilename))
|
||||
return;
|
||||
@@ -1111,17 +1110,16 @@ static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPCWST
|
||||
@@ -1125,17 +1124,16 @@ static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPCWST
|
||||
PathCombineW(szFrom, feFrom->szFullPath, L"*.*");
|
||||
szFrom[lstrlenW(szFrom) + 1] = '\0';
|
||||
|
||||
@@ -264,8 +264,8 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
- fileOp.fFlags &= ~FOF_MULTIDESTFILES; /* we know we're copying to one dir */
|
||||
+ ZeroMemory(&flFromNew, sizeof(FILE_LIST));
|
||||
+ ZeroMemory(&flToNew, sizeof(FILE_LIST));
|
||||
+ parse_file_list(&flFromNew, szFrom);
|
||||
+ parse_file_list(&flToNew, szTo);
|
||||
+ parse_file_list(&flFromNew, szFrom, TRUE);
|
||||
+ parse_file_list(&flToNew, szTo, TRUE);
|
||||
|
||||
- /* Don't ask the user about overwriting files when he accepted to overwrite the
|
||||
- folder. FIXME: this is not exactly what Windows does - e.g. there would be
|
||||
@@ -280,7 +280,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
}
|
||||
|
||||
static BOOL copy_file_to_file(FILE_OPERATION *op, const WCHAR *szFrom, const WCHAR *szTo)
|
||||
@@ -1132,7 +1130,7 @@ static BOOL copy_file_to_file(FILE_OPERATION *op, const WCHAR *szFrom, const WCH
|
||||
@@ -1146,7 +1144,7 @@ static BOOL copy_file_to_file(FILE_OPERATION *op, const WCHAR *szFrom, const WCH
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
}
|
||||
|
||||
/* copy a file or directory to another directory */
|
||||
@@ -1172,7 +1170,7 @@ static void create_dest_dirs(LPCWSTR szDestDir)
|
||||
@@ -1186,7 +1184,7 @@ static void create_dest_dirs(LPCWSTR szDestDir)
|
||||
}
|
||||
|
||||
/* the FO_COPY operation */
|
||||
@@ -298,7 +298,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
{
|
||||
DWORD i;
|
||||
const FILE_ENTRY *entryToCopy;
|
||||
@@ -1195,7 +1193,7 @@ static int copy_files(FILE_OPERATION *op, const FILE_LIST *flFrom, FILE_LIST *fl
|
||||
@@ -1209,7 +1207,7 @@ static int copy_files(FILE_OPERATION *op, const FILE_LIST *flFrom, FILE_LIST *fl
|
||||
fileDest = &flTo->feFiles[0];
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
{
|
||||
if (flFrom->bAnyFromWildcard)
|
||||
return ERROR_CANCELLED;
|
||||
@@ -1247,8 +1245,7 @@ static int copy_files(FILE_OPERATION *op, const FILE_LIST *flFrom, FILE_LIST *fl
|
||||
@@ -1261,8 +1259,7 @@ static int copy_files(FILE_OPERATION *op, const FILE_LIST *flFrom, FILE_LIST *fl
|
||||
{
|
||||
entryToCopy = &flFrom->feFiles[i];
|
||||
|
||||
@@ -317,7 +317,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
{
|
||||
fileDest = &flTo->feFiles[i];
|
||||
}
|
||||
@@ -1319,7 +1316,7 @@ static BOOL confirm_delete_list(HWND hWnd, DWORD fFlags, BOOL fTrash, const FILE
|
||||
@@ -1333,7 +1330,7 @@ static BOOL confirm_delete_list(HWND hWnd, DWORD fFlags, BOOL fTrash, const FILE
|
||||
}
|
||||
|
||||
/* the FO_DELETE operation */
|
||||
@@ -326,7 +326,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
{
|
||||
const FILE_ENTRY *fileEntry;
|
||||
DWORD i;
|
||||
@@ -1330,12 +1327,12 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
@@ -1344,12 +1341,12 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
return ERROR_SUCCESS;
|
||||
|
||||
/* Windows also checks only the first item */
|
||||
@@ -343,7 +343,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1344,7 +1341,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
@@ -1358,7 +1355,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
fileEntry = &flFrom->feFiles[i];
|
||||
|
||||
if (!IsAttribFile(fileEntry->attributes) &&
|
||||
@@ -352,7 +352,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
continue;
|
||||
|
||||
if (bTrash)
|
||||
@@ -1354,14 +1351,14 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
@@ -1368,14 +1365,14 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
continue;
|
||||
|
||||
/* Note: Windows silently deletes the file in such a situation, we show a dialog */
|
||||
@@ -370,7 +370,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1371,7 +1368,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
@@ -1385,7 +1382,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
ret = DeleteFileW(fileEntry->szFullPath) ?
|
||||
ERROR_SUCCESS : GetLastError();
|
||||
else
|
||||
@@ -379,7 +379,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -1381,12 +1378,12 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
@@ -1395,12 +1392,12 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
}
|
||||
|
||||
/* move a directory to another directory */
|
||||
@@ -394,7 +394,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
lstrcpyW(to, feTo->szFullPath);
|
||||
else
|
||||
PathCombineW(to, feTo->szFullPath, feFrom->szFilename);
|
||||
@@ -1397,15 +1394,14 @@ static void move_dir_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom
|
||||
@@ -1411,15 +1408,14 @@ static void move_dir_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom
|
||||
with wildcard and restart SHFileOperationW */
|
||||
if (PathFileExistsW(to))
|
||||
{
|
||||
@@ -412,7 +412,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
|
||||
/* Don't ask the user about overwriting files when he accepted to overwrite the
|
||||
folder. FIXME: this is not exactly what Windows does - e.g. there would be
|
||||
@@ -1418,22 +1414,22 @@ static void move_dir_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom
|
||||
@@ -1432,22 +1428,22 @@ static void move_dir_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -439,7 +439,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
{
|
||||
DWORD i;
|
||||
INT mismatched = 0;
|
||||
@@ -1447,14 +1443,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
@@ -1461,14 +1457,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
if (!flTo->dwNumFiles)
|
||||
return ERROR_FILE_NOT_FOUND;
|
||||
|
||||
@@ -456,7 +456,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
flFrom->dwNumFiles > flTo->dwNumFiles)
|
||||
{
|
||||
return ERROR_CANCELLED;
|
||||
@@ -1464,7 +1458,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
@@ -1478,7 +1472,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
if (ret && ret != ERROR_ALREADY_EXISTS)
|
||||
return ret;
|
||||
|
||||
@@ -465,7 +465,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
mismatched = flFrom->dwNumFiles - flTo->dwNumFiles;
|
||||
|
||||
fileDest = &flTo->feFiles[0];
|
||||
@@ -1475,7 +1469,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
@@ -1489,7 +1483,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
if (!PathFileExistsW(fileDest->szDirectory))
|
||||
return ERROR_CANCELLED;
|
||||
|
||||
@@ -474,7 +474,7 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
{
|
||||
if (i >= flTo->dwNumFiles)
|
||||
break;
|
||||
@@ -1491,12 +1485,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
@@ -1505,12 +1499,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
if (fileDest->bExists && IsAttribDir(fileDest->attributes))
|
||||
{
|
||||
if (IsAttribDir(entryToMove->attributes))
|
||||
@@ -490,25 +490,25 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
}
|
||||
|
||||
if (mismatched > 0)
|
||||
@@ -1511,7 +1505,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
@@ -1525,7 +1519,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
}
|
||||
|
||||
/* the FO_RENAME files */
|
||||
-static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const FILE_LIST *flTo)
|
||||
+static int rename_files(FILE_OPERATION *op, const FILE_LIST *flFrom, const FILE_LIST *flTo)
|
||||
/* The FO_RENAME operation of SHFileOperation. */
|
||||
-static DWORD rename_files(SHFILEOPSTRUCTW *op, const FILE_LIST *from, const FILE_LIST *to)
|
||||
+static DWORD rename_files(FILE_OPERATION *op, const FILE_LIST *from, const FILE_LIST *to)
|
||||
{
|
||||
const FILE_ENTRY *feFrom;
|
||||
const FILE_ENTRY *feTo;
|
||||
@@ -1533,7 +1527,7 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con
|
||||
if (feTo->bExists)
|
||||
return ERROR_ALREADY_EXISTS;
|
||||
const FILE_ENTRY *entry_from, *entry_to;
|
||||
|
||||
- return SHNotifyMoveFileW(feFrom->szFullPath, feTo->szFullPath);
|
||||
+ return SHNotifyMoveFileW(op, feFrom->szFullPath, feTo->szFullPath);
|
||||
@@ -1550,7 +1544,7 @@ static DWORD rename_files(SHFILEOPSTRUCTW *op, const FILE_LIST *from, const FILE
|
||||
if (entry_to->bExists && IsAttribDir(entry_from->attributes) != IsAttribDir(entry_to->attributes))
|
||||
return IsAttribDir(entry_to->attributes) ? DE_FILEDESTISFLD : DE_FLDDESTISFILE;
|
||||
|
||||
- return SHNotifyMoveFileW(entry_from->szFullPath, entry_to->szFullPath);
|
||||
+ return SHNotifyMoveFileW(op, entry_from->szFullPath, entry_to->szFullPath);
|
||||
}
|
||||
|
||||
/* alert the user if an unsupported flag is used */
|
||||
@@ -1580,16 +1574,16 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1597,16 +1591,16 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
switch (lpFileOp->wFunc)
|
||||
{
|
||||
case FO_COPY:
|
||||
@@ -530,5 +530,5 @@ index 9d2d4dc3f82..4bd486a7426 100644
|
||||
default:
|
||||
ret = ERROR_INVALID_PARAMETER;
|
||||
--
|
||||
2.43.0
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,24 +0,0 @@
|
||||
From 3407a396a86366b81b243fde01e191aa1a2f7f5a Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 26 Sep 2014 20:24:50 +0200
|
||||
Subject: [PATCH] user32: Call UpdateWindow() during DIALOG_CreateIndirect.
|
||||
|
||||
---
|
||||
dlls/user32/dialog.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c
|
||||
index a226c764c49..91ce53f8297 100644
|
||||
--- a/dlls/user32/dialog.c
|
||||
+++ b/dlls/user32/dialog.c
|
||||
@@ -703,6 +703,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
|
||||
if (template.style & WS_VISIBLE && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
|
||||
{
|
||||
NtUserShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */
|
||||
+ UpdateWindow( hwnd );
|
||||
}
|
||||
return hwnd;
|
||||
}
|
||||
--
|
||||
2.35.1
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [35652] Send WM_PAINT event during dialog creation
|
@@ -1,4 +1,4 @@
|
||||
From d5389dd8bb868076b75675719d529d0507a90815 Mon Sep 17 00:00:00 2001
|
||||
From af732e026343d613cccbab91f7cae3787191ebef Mon Sep 17 00:00:00 2001
|
||||
From: katahiromz <katayama.hirofumi.mz@gmail.com>
|
||||
Date: Thu, 11 Oct 2018 13:47:02 +0900
|
||||
Subject: [PATCH] user32: Implement CascadeWindows.
|
||||
@@ -11,11 +11,11 @@ Use stanard heap_ functions.
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45968
|
||||
Signed-off-by: Hirofumi Katayama <katayama.hirofumi.mz@gmail.com>
|
||||
---
|
||||
dlls/user32/mdi.c | 216 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/user32/mdi.c | 216 +++++++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 214 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c
|
||||
index 10a3882..2e93056 100644
|
||||
index 05725a29914..e9ec37b0063 100644
|
||||
--- a/dlls/user32/mdi.c
|
||||
+++ b/dlls/user32/mdi.c
|
||||
@@ -2,6 +2,7 @@
|
||||
@@ -26,7 +26,7 @@ index 10a3882..2e93056 100644
|
||||
*
|
||||
* This file contains routines to support MDI (Multiple Document
|
||||
* Interface) features .
|
||||
@@ -1846,12 +1847,223 @@ done:
|
||||
@@ -1795,12 +1796,223 @@ done:
|
||||
* Success: Number of cascaded windows.
|
||||
* Failure: 0
|
||||
*/
|
||||
@@ -174,7 +174,7 @@ index 10a3882..2e93056 100644
|
||||
+ work_rect = mi.rcWork;
|
||||
+ }
|
||||
+
|
||||
+ hDWP = BeginDeferWindowPos(info.wnd_count);
|
||||
+ hDWP = NtUserBeginDeferWindowPos( info.wnd_count );
|
||||
+ if (hDWP == NULL)
|
||||
+ goto cleanup;
|
||||
+
|
||||
@@ -243,7 +243,7 @@ index 10a3882..2e93056 100644
|
||||
+ EndDeferWindowPos(hDWP);
|
||||
+
|
||||
+ if (prev)
|
||||
+ SetForegroundWindow(prev);
|
||||
+ NtUserSetForegroundWindow( prev );
|
||||
+
|
||||
+cleanup:
|
||||
+ heap_free(info.wnd_array);
|
||||
@@ -253,5 +253,5 @@ index 10a3882..2e93056 100644
|
||||
|
||||
|
||||
--
|
||||
1.9.1
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 3f238e248fc4fc4415b3ce5e420c798d516d24ee Mon Sep 17 00:00:00 2001
|
||||
From 4469bff76a8408ca91dbdd1ebeba5f37f146f854 Mon Sep 17 00:00:00 2001
|
||||
From: Hirofumi Katayama <katayama.hirofumi.mz@gmail.com>
|
||||
Date: Mon, 26 Nov 2018 09:09:52 +0900
|
||||
Subject: [PATCH] user32: Implement TileWindows
|
||||
@@ -13,10 +13,10 @@ Signed-off-by: Hirofumi Katayama <katayama.hirofumi.mz@gmail.com>
|
||||
1 file changed, 175 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c
|
||||
index 9679be895ed..c752f967b4d 100644
|
||||
index e9ec37b0063..3bf0f28a04f 100644
|
||||
--- a/dlls/user32/mdi.c
|
||||
+++ b/dlls/user32/mdi.c
|
||||
@@ -144,6 +144,10 @@ typedef struct
|
||||
@@ -132,6 +132,10 @@ typedef struct
|
||||
|
||||
static HBITMAP hBmpClose = 0;
|
||||
|
||||
@@ -27,7 +27,7 @@ index 9679be895ed..c752f967b4d 100644
|
||||
/* ----------------- declarations ----------------- */
|
||||
static void MDI_UpdateFrameText( HWND, HWND, BOOL, LPCWSTR);
|
||||
static BOOL MDI_AugmentFrameMenu( HWND, HWND );
|
||||
@@ -1929,8 +1933,6 @@ WORD WINAPI
|
||||
@@ -1881,8 +1885,6 @@ WORD WINAPI
|
||||
CascadeWindows (HWND hwndParent, UINT wFlags, const RECT *lpRect,
|
||||
UINT cKids, const HWND *lpKids)
|
||||
{
|
||||
@@ -36,7 +36,7 @@ index 9679be895ed..c752f967b4d 100644
|
||||
CASCADE_INFO info;
|
||||
HWND hwnd, top, prev;
|
||||
HMONITOR monitor;
|
||||
@@ -2084,8 +2086,177 @@ WORD WINAPI
|
||||
@@ -2036,8 +2038,177 @@ WORD WINAPI
|
||||
TileWindows (HWND hwndParent, UINT wFlags, const RECT *lpRect,
|
||||
UINT cKids, const HWND *lpKids)
|
||||
{
|
||||
@@ -135,7 +135,7 @@ index 9679be895ed..c752f967b4d 100644
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ hDWP = BeginDeferWindowPos(info.wnd_count);
|
||||
+ hDWP = NtUserBeginDeferWindowPos( info.wnd_count );
|
||||
+ if (hDWP == NULL)
|
||||
+ goto cleanup;
|
||||
+
|
||||
@@ -206,7 +206,7 @@ index 9679be895ed..c752f967b4d 100644
|
||||
+ EndDeferWindowPos(hDWP);
|
||||
+
|
||||
+ if (hwndPrev)
|
||||
+ SetForegroundWindow(hwndPrev);
|
||||
+ NtUserSetForegroundWindow( hwndPrev );
|
||||
+
|
||||
+cleanup:
|
||||
+ if (cKids == 0 || lpKids == NULL)
|
||||
@@ -217,5 +217,5 @@ index 9679be895ed..c752f967b4d 100644
|
||||
|
||||
|
||||
--
|
||||
2.24.1
|
||||
2.47.2
|
||||
|
||||
|
@@ -1,26 +0,0 @@
|
||||
From ecc14aeb2e510520705e98ebb39e9b2fcb62b453 Mon Sep 17 00:00:00 2001
|
||||
From: David Torok <dt@zeroitlab.com>
|
||||
Date: Sun, 17 Nov 2019 19:08:12 +0100
|
||||
Subject: [PATCH] Send WM_NCPOINTERUP on focus regain
|
||||
|
||||
---
|
||||
dlls/win32u/input.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
|
||||
index a4834b740d8..5d14779538c 100644
|
||||
--- a/dlls/win32u/input.c
|
||||
+++ b/dlls/win32u/input.c
|
||||
@@ -2045,6 +2045,9 @@ BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus, DWORD new
|
||||
send_message( hwnd, WM_ACTIVATE,
|
||||
MAKEWPARAM( mouse ? WA_CLICKACTIVE : WA_ACTIVE, is_iconic(hwnd) ),
|
||||
(LPARAM)previous );
|
||||
+
|
||||
+ send_message( hwnd, WM_NCPOINTERUP, 0, 0);
|
||||
+
|
||||
if (NtUserGetAncestor( hwnd, GA_PARENT ) == get_desktop_window())
|
||||
NtUserPostMessage( get_desktop_window(), WM_PARENTNOTIFY, WM_NCACTIVATE, (LPARAM)hwnd );
|
||||
}
|
||||
--
|
||||
2.47.2
|
||||
|
@@ -1,5 +0,0 @@
|
||||
Fixes: [48121] Improve Alt+tab for unity games.
|
||||
|
||||
# The other patches on this bug are other solutions but
|
||||
# might cause errors if they dont recieve the HTCAPTION
|
||||
# message.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,213 @@
|
||||
From 32c6084506f963100eb55be8df149437b5e8d4f0 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 10 Apr 2025 07:44:42 +1000
|
||||
Subject: [PATCH] Updated vkd3d to cbce3a8631116ec10895e6c9c4a00b89b051f6b0.
|
||||
|
||||
---
|
||||
libs/vkd3d/libs/vkd3d-shader/fx.c | 44 ++++++++++++++++-----
|
||||
libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c | 10 ++++-
|
||||
libs/vkd3d/libs/vkd3d-shader/msl.c | 2 +-
|
||||
libs/vkd3d/libs/vkd3d-shader/tpf.c | 20 +++++++---
|
||||
4 files changed, 58 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/fx.c b/libs/vkd3d/libs/vkd3d-shader/fx.c
|
||||
index debcb261811..c93f01039ef 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/fx.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/fx.c
|
||||
@@ -2420,6 +2420,23 @@ static inline enum hlsl_base_type hlsl_type_from_fx_type(enum state_property_com
|
||||
}
|
||||
}
|
||||
|
||||
+static inline bool hlsl_type_state_compatible(struct hlsl_type *lhs, enum hlsl_base_type rhs)
|
||||
+{
|
||||
+ if (!hlsl_is_numeric_type(lhs))
|
||||
+ return false;
|
||||
+ switch (lhs->e.numeric.type)
|
||||
+ {
|
||||
+ case HLSL_TYPE_INT:
|
||||
+ case HLSL_TYPE_UINT:
|
||||
+ return rhs == HLSL_TYPE_INT || rhs == HLSL_TYPE_UINT;
|
||||
+
|
||||
+ default:
|
||||
+ return lhs->e.numeric.type == rhs;
|
||||
+ }
|
||||
+
|
||||
+ vkd3d_unreachable();
|
||||
+}
|
||||
+
|
||||
static const struct rhs_named_value filter_values[] =
|
||||
{
|
||||
{ "MIN_MAG_MIP_POINT", 0x00 },
|
||||
@@ -2664,9 +2681,9 @@ static void resolve_fx_4_state_block_values(struct hlsl_ir_var *var, struct hlsl
|
||||
struct replace_state_context replace_context;
|
||||
const struct fx_4_state *state = NULL;
|
||||
struct hlsl_type *state_type = NULL;
|
||||
- struct hlsl_ir_node *node, *cast;
|
||||
struct hlsl_ctx *ctx = fx->ctx;
|
||||
enum hlsl_base_type base_type;
|
||||
+ struct hlsl_ir_node *node;
|
||||
unsigned int i;
|
||||
|
||||
if (type->class == HLSL_CLASS_BLEND_STATE && ctx->profile->major_version == 5)
|
||||
@@ -2803,9 +2820,15 @@ static void resolve_fx_4_state_block_values(struct hlsl_ir_var *var, struct hlsl
|
||||
if (state_type)
|
||||
{
|
||||
node = entry->args->node;
|
||||
- if (!(cast = hlsl_new_cast(ctx, node, state_type, &var->loc)))
|
||||
- return;
|
||||
- list_add_after(&node->entry, &cast->entry);
|
||||
+ if (state->type == FX_UINT8 || !hlsl_type_state_compatible(node->data_type, base_type))
|
||||
+ {
|
||||
+ struct hlsl_ir_node *cast;
|
||||
+
|
||||
+ if (!(cast = hlsl_new_cast(ctx, node, state_type, &var->loc)))
|
||||
+ return;
|
||||
+ list_add_after(&node->entry, &cast->entry);
|
||||
+ node = cast;
|
||||
+ }
|
||||
|
||||
/* FX_UINT8 values are using 32-bits in the binary. Mask higher 24 bits for those. */
|
||||
if (state->type == FX_UINT8)
|
||||
@@ -2814,15 +2837,18 @@ static void resolve_fx_4_state_block_values(struct hlsl_ir_var *var, struct hlsl
|
||||
|
||||
if (!(mask = hlsl_new_uint_constant(ctx, 0xff, &var->loc)))
|
||||
return;
|
||||
- list_add_after(&cast->entry, &mask->entry);
|
||||
+ list_add_after(&node->entry, &mask->entry);
|
||||
|
||||
- if (!(cast = hlsl_new_binary_expr(ctx, HLSL_OP2_BIT_AND, cast, mask)))
|
||||
+ if (!(node = hlsl_new_binary_expr(ctx, HLSL_OP2_BIT_AND, node, mask)))
|
||||
return;
|
||||
- list_add_after(&mask->entry, &cast->entry);
|
||||
+ list_add_after(&mask->entry, &node->entry);
|
||||
}
|
||||
|
||||
- hlsl_src_remove(entry->args);
|
||||
- hlsl_src_from_node(entry->args, cast);
|
||||
+ if (node != entry->args->node)
|
||||
+ {
|
||||
+ hlsl_src_remove(entry->args);
|
||||
+ hlsl_src_from_node(entry->args, node);
|
||||
+ }
|
||||
|
||||
hlsl_run_const_passes(ctx, entry->instrs);
|
||||
}
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c
|
||||
index ba56ba90403..dc7607a1393 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c
|
||||
@@ -6407,7 +6407,9 @@ static void allocate_semantic_register(struct hlsl_ctx *ctx, struct hlsl_ir_var
|
||||
|| semantic == VKD3D_SHADER_SV_PRIMITIVE_ID)
|
||||
vip_allocation = true;
|
||||
|
||||
- if (semantic == VKD3D_SHADER_SV_IS_FRONT_FACE || semantic == VKD3D_SHADER_SV_SAMPLE_INDEX)
|
||||
+ if (semantic == VKD3D_SHADER_SV_IS_FRONT_FACE || semantic == VKD3D_SHADER_SV_SAMPLE_INDEX
|
||||
+ || (version.type == VKD3D_SHADER_TYPE_DOMAIN && !output && !is_primitive)
|
||||
+ || (ctx->is_patch_constant_func && output))
|
||||
special_interpolation = true;
|
||||
}
|
||||
|
||||
@@ -6443,6 +6445,8 @@ static void allocate_semantic_registers(struct hlsl_ctx *ctx, struct hlsl_ir_fun
|
||||
bool is_pixel_shader = ctx->profile->type == VKD3D_SHADER_TYPE_PIXEL;
|
||||
struct hlsl_ir_var *var;
|
||||
|
||||
+ in_prim_allocator.prioritize_smaller_writemasks = true;
|
||||
+ patch_constant_out_patch_allocator.prioritize_smaller_writemasks = true;
|
||||
input_allocator.prioritize_smaller_writemasks = true;
|
||||
output_allocator.prioritize_smaller_writemasks = true;
|
||||
|
||||
@@ -6470,6 +6474,8 @@ static void allocate_semantic_registers(struct hlsl_ctx *ctx, struct hlsl_ir_fun
|
||||
allocate_semantic_register(ctx, var, &output_allocator, true, !is_pixel_shader);
|
||||
}
|
||||
|
||||
+ vkd3d_free(in_prim_allocator.allocations);
|
||||
+ vkd3d_free(patch_constant_out_patch_allocator.allocations);
|
||||
vkd3d_free(input_allocator.allocations);
|
||||
vkd3d_free(output_allocator.allocations);
|
||||
}
|
||||
@@ -9770,7 +9776,7 @@ static void sm4_generate_vsir_instr_dcl_semantic(struct hlsl_ctx *ctx, struct vs
|
||||
else
|
||||
{
|
||||
if (semantic == VKD3D_SHADER_SV_NONE || version->type == VKD3D_SHADER_TYPE_PIXEL
|
||||
- || version->type == VKD3D_SHADER_TYPE_HULL)
|
||||
+ || (version->type == VKD3D_SHADER_TYPE_HULL && !ctx->is_patch_constant_func))
|
||||
opcode = VKD3DSIH_DCL_OUTPUT;
|
||||
else
|
||||
opcode = VKD3DSIH_DCL_OUTPUT_SIV;
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/msl.c b/libs/vkd3d/libs/vkd3d-shader/msl.c
|
||||
index a5d952cd525..d477bfa1c1b 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/msl.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/msl.c
|
||||
@@ -1292,7 +1292,7 @@ static int msl_generator_init(struct msl_generator *gen, struct vsir_program *pr
|
||||
{
|
||||
msl_compiler_error(gen, VKD3D_SHADER_ERROR_MSL_INTERNAL,
|
||||
"Internal compiler error: Unhandled shader type %#x.", type);
|
||||
- return VKD3D_ERROR_INVALID_SHADER;
|
||||
+ gen->prefix = "unknown";
|
||||
}
|
||||
gen->interface_info = vkd3d_find_struct(compile_info->next, INTERFACE_INFO);
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/tpf.c b/libs/vkd3d/libs/vkd3d-shader/tpf.c
|
||||
index 23dab35a288..3be1d743acf 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/tpf.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/tpf.c
|
||||
@@ -3116,8 +3116,12 @@ bool sm4_sysval_semantic_from_semantic_name(enum vkd3d_shader_sysval_semantic *s
|
||||
{"sv_domainlocation", false, VKD3D_SHADER_TYPE_DOMAIN, ~0u},
|
||||
{"sv_position", false, VKD3D_SHADER_TYPE_DOMAIN, VKD3D_SHADER_SV_NONE},
|
||||
{"sv_primitiveid", false, VKD3D_SHADER_TYPE_DOMAIN, ~0u},
|
||||
+ {"sv_rendertargetarrayindex", false, VKD3D_SHADER_TYPE_DOMAIN, VKD3D_SHADER_SV_NONE},
|
||||
+ {"sv_viewportarrayindex", false, VKD3D_SHADER_TYPE_DOMAIN, VKD3D_SHADER_SV_NONE},
|
||||
|
||||
{"sv_position", true, VKD3D_SHADER_TYPE_DOMAIN, VKD3D_SHADER_SV_POSITION},
|
||||
+ {"sv_rendertargetarrayindex", true, VKD3D_SHADER_TYPE_DOMAIN, VKD3D_SHADER_SV_RENDER_TARGET_ARRAY_INDEX},
|
||||
+ {"sv_viewportarrayindex", true, VKD3D_SHADER_TYPE_DOMAIN, VKD3D_SHADER_SV_VIEWPORT_ARRAY_INDEX},
|
||||
|
||||
{"sv_primitiveid", false, VKD3D_SHADER_TYPE_GEOMETRY, VKD3D_SHADER_SV_PRIMITIVE_ID},
|
||||
{"sv_gsinstanceid", false, VKD3D_SHADER_TYPE_GEOMETRY, ~0u},
|
||||
@@ -3131,6 +3135,8 @@ bool sm4_sysval_semantic_from_semantic_name(enum vkd3d_shader_sysval_semantic *s
|
||||
{"sv_primitiveid", false, VKD3D_SHADER_TYPE_HULL, ~0u},
|
||||
|
||||
{"sv_position", true, VKD3D_SHADER_TYPE_HULL, VKD3D_SHADER_SV_POSITION},
|
||||
+ {"sv_rendertargetarrayindex", true, VKD3D_SHADER_TYPE_HULL, VKD3D_SHADER_SV_RENDER_TARGET_ARRAY_INDEX},
|
||||
+ {"sv_viewportarrayindex", true, VKD3D_SHADER_TYPE_HULL, VKD3D_SHADER_SV_VIEWPORT_ARRAY_INDEX},
|
||||
|
||||
{"position", false, VKD3D_SHADER_TYPE_PIXEL, VKD3D_SHADER_SV_POSITION},
|
||||
{"sv_position", false, VKD3D_SHADER_TYPE_PIXEL, VKD3D_SHADER_SV_POSITION},
|
||||
@@ -3164,6 +3170,10 @@ bool sm4_sysval_semantic_from_semantic_name(enum vkd3d_shader_sysval_semantic *s
|
||||
if (!ascii_strcasecmp(semantic_name, "sv_position")
|
||||
|| (semantic_compat_mapping && !ascii_strcasecmp(semantic_name, "position")))
|
||||
*sysval_semantic = VKD3D_SHADER_SV_POSITION;
|
||||
+ else if (!ascii_strcasecmp(semantic_name, "sv_rendertargetarrayindex"))
|
||||
+ *sysval_semantic = VKD3D_SHADER_SV_RENDER_TARGET_ARRAY_INDEX;
|
||||
+ else if (!ascii_strcasecmp(semantic_name, "sv_viewportarrayindex"))
|
||||
+ *sysval_semantic = VKD3D_SHADER_SV_VIEWPORT_ARRAY_INDEX;
|
||||
else if (has_sv_prefix)
|
||||
return false;
|
||||
else
|
||||
@@ -3179,11 +3189,6 @@ bool sm4_sysval_semantic_from_semantic_name(enum vkd3d_shader_sysval_semantic *s
|
||||
return get_tessfactor_sysval_semantic(sysval_semantic, domain, semantic_idx);
|
||||
if (!ascii_strcasecmp(semantic_name, "sv_insidetessfactor"))
|
||||
return get_insidetessfactor_sysval_semantic(sysval_semantic, domain, semantic_idx);
|
||||
- if (!ascii_strcasecmp(semantic_name, "sv_position"))
|
||||
- {
|
||||
- *sysval_semantic = VKD3D_SHADER_SV_NONE;
|
||||
- return true;
|
||||
- }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3214,7 +3219,10 @@ bool sm4_sysval_semantic_from_semantic_name(enum vkd3d_shader_sysval_semantic *s
|
||||
&& (semantic_compat_mapping || has_sv_prefix)
|
||||
&& version->type == semantics[i].shader_type)
|
||||
{
|
||||
- *sysval_semantic = semantics[i].semantic;
|
||||
+ if (is_patch_constant_func && output && semantics[i].semantic != ~0u)
|
||||
+ *sysval_semantic = VKD3D_SHADER_SV_NONE;
|
||||
+ else
|
||||
+ *sysval_semantic = semantics[i].semantic;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
--
|
||||
2.47.2
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,304 @@
|
||||
From 98ac96121b2336a832083bfdd833e93265291739 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 17 Apr 2025 08:02:13 +1000
|
||||
Subject: [PATCH] Updated vkd3d to c764f71cf58e3a8327b44c588ad3696b422cf8a3.
|
||||
|
||||
---
|
||||
libs/vkd3d/include/vkd3d_shader.h | 5 ++
|
||||
libs/vkd3d/libs/vkd3d-shader/hlsl.y | 44 ++++++++++++------
|
||||
libs/vkd3d/libs/vkd3d-shader/ir.c | 46 ++++++++++++++++++-
|
||||
.../libs/vkd3d-shader/vkd3d_shader_main.c | 10 +++-
|
||||
.../libs/vkd3d-shader/vkd3d_shader_private.h | 5 ++
|
||||
5 files changed, 92 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/libs/vkd3d/include/vkd3d_shader.h b/libs/vkd3d/include/vkd3d_shader.h
|
||||
index 2e1f37f12e6..6b2805e8759 100644
|
||||
--- a/libs/vkd3d/include/vkd3d_shader.h
|
||||
+++ b/libs/vkd3d/include/vkd3d_shader.h
|
||||
@@ -2076,6 +2076,11 @@ enum vkd3d_shader_resource_type
|
||||
*/
|
||||
enum vkd3d_shader_resource_data_type
|
||||
{
|
||||
+ /**
|
||||
+ * The descriptor has no relevant data type. This value is returned for
|
||||
+ * samplers. \since 1.16
|
||||
+ */
|
||||
+ VKD3D_SHADER_RESOURCE_DATA_NONE = 0x0,
|
||||
/** Unsigned normalized integer. */
|
||||
VKD3D_SHADER_RESOURCE_DATA_UNORM = 0x1,
|
||||
/** Signed normalized integer. */
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/hlsl.y b/libs/vkd3d/libs/vkd3d-shader/hlsl.y
|
||||
index 6086d018fdc..40fd142f58d 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/hlsl.y
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/hlsl.y
|
||||
@@ -997,10 +997,24 @@ static void free_parse_variable_def(struct parse_variable_def *v)
|
||||
vkd3d_free(v->arrays.sizes);
|
||||
vkd3d_free(v->name);
|
||||
hlsl_cleanup_semantic(&v->semantic);
|
||||
- VKD3D_ASSERT(!v->state_blocks);
|
||||
+ if (v->state_block_count)
|
||||
+ {
|
||||
+ for (unsigned int i = 0; i < v->state_block_count; ++i)
|
||||
+ hlsl_free_state_block(v->state_blocks[i]);
|
||||
+ vkd3d_free(v->state_blocks);
|
||||
+ }
|
||||
vkd3d_free(v);
|
||||
}
|
||||
|
||||
+static void destroy_parse_variable_defs(struct list *defs)
|
||||
+{
|
||||
+ struct parse_variable_def *v, *v_next;
|
||||
+
|
||||
+ LIST_FOR_EACH_ENTRY_SAFE(v, v_next, defs, struct parse_variable_def, entry)
|
||||
+ free_parse_variable_def(v);
|
||||
+ vkd3d_free(defs);
|
||||
+}
|
||||
+
|
||||
static bool gen_struct_fields(struct hlsl_ctx *ctx, struct parse_fields *fields,
|
||||
struct hlsl_type *type, uint32_t modifiers, struct list *defs)
|
||||
{
|
||||
@@ -2618,11 +2632,7 @@ static struct hlsl_block *initialize_vars(struct hlsl_ctx *ctx, struct list *var
|
||||
|
||||
if (!(initializers = make_empty_block(ctx)))
|
||||
{
|
||||
- LIST_FOR_EACH_ENTRY_SAFE(v, v_next, var_list, struct parse_variable_def, entry)
|
||||
- {
|
||||
- free_parse_variable_def(v);
|
||||
- }
|
||||
- vkd3d_free(var_list);
|
||||
+ destroy_parse_variable_defs(var_list);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -6551,7 +6561,6 @@ static void validate_uav_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim dim,
|
||||
bool boolval;
|
||||
char *name;
|
||||
uint32_t modifiers;
|
||||
- struct hlsl_ir_node *instr;
|
||||
struct hlsl_block *block;
|
||||
struct list *list;
|
||||
struct parse_fields fields;
|
||||
@@ -6723,6 +6732,8 @@ static void validate_uav_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim dim,
|
||||
%type <list> variables_def
|
||||
%type <list> variables_def_typed
|
||||
%type <list> switch_cases
|
||||
+%destructor { destroy_parse_variable_defs($$); } type_specs variables_def variables_def_typed;
|
||||
+%destructor { destroy_switch_cases($$); } switch_cases;
|
||||
|
||||
%token <name> VAR_IDENTIFIER
|
||||
%token <name> NEW_IDENTIFIER
|
||||
@@ -6766,9 +6777,9 @@ static void validate_uav_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim dim,
|
||||
%type <block> selection_statement
|
||||
%type <block> statement
|
||||
%type <block> statement_list
|
||||
-%type <block> struct_declaration_without_vars
|
||||
%type <block> switch_statement
|
||||
%type <block> unary_expr
|
||||
+%destructor { destroy_block($$); } <block>
|
||||
|
||||
%type <boolval> boolean
|
||||
|
||||
@@ -6819,6 +6830,7 @@ static void validate_uav_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim dim,
|
||||
%type <state_block_index> state_block_index_opt
|
||||
|
||||
%type <switch_case> switch_case
|
||||
+%destructor { hlsl_free_ir_switch_case($$); } <switch_case>
|
||||
|
||||
%type <type> base_optional
|
||||
%type <type> field_type
|
||||
@@ -6835,6 +6847,7 @@ static void validate_uav_type(struct hlsl_ctx *ctx, enum hlsl_sampler_dim dim,
|
||||
%type <variable_def> variable_decl
|
||||
%type <variable_def> variable_def
|
||||
%type <variable_def> variable_def_typed
|
||||
+%destructor { free_parse_variable_def($$); } <variable_def>
|
||||
|
||||
%%
|
||||
|
||||
@@ -6988,6 +7001,9 @@ buffer_type:
|
||||
declaration_statement_list:
|
||||
%empty
|
||||
| declaration_statement_list declaration_statement
|
||||
+ {
|
||||
+ destroy_block($2);
|
||||
+ }
|
||||
|
||||
preproc_directive:
|
||||
PRE_LINE STRING
|
||||
@@ -7021,9 +7037,6 @@ struct_declaration_without_vars:
|
||||
if ($1)
|
||||
hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_INVALID_MODIFIER,
|
||||
"Modifiers are not allowed on struct type declarations.");
|
||||
-
|
||||
- if (!($$ = make_empty_block(ctx)))
|
||||
- YYABORT;
|
||||
}
|
||||
|
||||
struct_spec:
|
||||
@@ -8144,6 +8157,10 @@ type:
|
||||
declaration_statement:
|
||||
declaration
|
||||
| struct_declaration_without_vars
|
||||
+ {
|
||||
+ if (!($$ = make_empty_block(ctx)))
|
||||
+ YYABORT;
|
||||
+ }
|
||||
| typedef
|
||||
{
|
||||
if (!($$ = make_empty_block(ctx)))
|
||||
@@ -8157,15 +8174,12 @@ typedef_type:
|
||||
typedef:
|
||||
KW_TYPEDEF var_modifiers typedef_type type_specs ';'
|
||||
{
|
||||
- struct parse_variable_def *v, *v_next;
|
||||
uint32_t modifiers = $2;
|
||||
struct hlsl_type *type;
|
||||
|
||||
if (!(type = apply_type_modifiers(ctx, $3, &modifiers, false, &@2)))
|
||||
{
|
||||
- LIST_FOR_EACH_ENTRY_SAFE(v, v_next, $4, struct parse_variable_def, entry)
|
||||
- free_parse_variable_def(v);
|
||||
- vkd3d_free($4);
|
||||
+ destroy_parse_variable_defs($4);
|
||||
YYABORT;
|
||||
}
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/ir.c b/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
index d25485ab004..95093102552 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
@@ -8357,8 +8357,11 @@ static void vsir_validate_src_param(struct validation_context *ctx,
|
||||
break;
|
||||
|
||||
case VKD3DSPR_NULL:
|
||||
+ case VKD3DSPR_DEPTHOUT:
|
||||
+ case VKD3DSPR_DEPTHOUTGE:
|
||||
+ case VKD3DSPR_DEPTHOUTLE:
|
||||
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_REGISTER_TYPE,
|
||||
- "Invalid NULL register used as source parameter.");
|
||||
+ "Invalid register of type %#x used as source parameter.", src->reg.type);
|
||||
break;
|
||||
|
||||
case VKD3DSPR_INPUT:
|
||||
@@ -8857,6 +8860,45 @@ static void vsir_validate_signature(struct validation_context *ctx, const struct
|
||||
}
|
||||
}
|
||||
|
||||
+static void vsir_validate_descriptors(struct validation_context *ctx)
|
||||
+{
|
||||
+ const struct vkd3d_shader_scan_descriptor_info1 *descriptors = &ctx->program->descriptors;
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ for (i = 0; i < descriptors->descriptor_count; ++i)
|
||||
+ {
|
||||
+ const struct vkd3d_shader_descriptor_info1 *descriptor = &descriptors->descriptors[i];
|
||||
+
|
||||
+ if (descriptor->type >= VKD3D_SHADER_DESCRIPTOR_TYPE_COUNT)
|
||||
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DESCRIPTOR_TYPE,
|
||||
+ "Descriptor %u has invalid type %#x.", i, descriptor->type);
|
||||
+
|
||||
+ if (descriptor->resource_type >= VKD3D_SHADER_RESOURCE_TYPE_COUNT)
|
||||
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_RESOURCE_TYPE,
|
||||
+ "Descriptor %u has invalid resource type %#x.", i, descriptor->resource_type);
|
||||
+ else if ((descriptor->resource_type == VKD3D_SHADER_RESOURCE_NONE)
|
||||
+ != (descriptor->type == VKD3D_SHADER_DESCRIPTOR_TYPE_SAMPLER))
|
||||
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_RESOURCE_TYPE,
|
||||
+ "Descriptor %u has invalid resource type %#x for descriptor type %#x.",
|
||||
+ i, descriptor->resource_type, descriptor->type);
|
||||
+
|
||||
+ if (descriptor->resource_data_type >= VKD3D_DATA_COUNT)
|
||||
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DATA_TYPE,
|
||||
+ "Descriptor %u has invalid resource data type %#x.", i, descriptor->resource_data_type);
|
||||
+ else if ((descriptor->resource_data_type == VKD3D_DATA_UNUSED)
|
||||
+ != (descriptor->type == VKD3D_SHADER_DESCRIPTOR_TYPE_SAMPLER))
|
||||
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DATA_TYPE,
|
||||
+ "Descriptor %u has invalid resource data type %#x for descriptor type %#x.",
|
||||
+ i, descriptor->resource_data_type, descriptor->type);
|
||||
+
|
||||
+ if (!descriptor->count || (descriptor->count > UINT_MAX - descriptor->register_index
|
||||
+ && descriptor->count != UINT_MAX))
|
||||
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DESCRIPTOR_COUNT,
|
||||
+ "Descriptor %u has invalid descriptor count %u starting at index %u.",
|
||||
+ i, descriptor->count, descriptor->register_index);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static const char *name_from_cf_type(enum vsir_control_flow_type type)
|
||||
{
|
||||
switch (type)
|
||||
@@ -9823,6 +9865,8 @@ enum vkd3d_result vsir_program_validate(struct vsir_program *program, uint64_t c
|
||||
}
|
||||
}
|
||||
|
||||
+ vsir_validate_descriptors(&ctx);
|
||||
+
|
||||
if (!(ctx.temps = vkd3d_calloc(ctx.program->temp_count, sizeof(*ctx.temps))))
|
||||
goto fail;
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
||||
index a0c24eaf18a..4103cdc1ef9 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
||||
@@ -1111,7 +1111,7 @@ static void vkd3d_shader_scan_sampler_declaration(struct vkd3d_shader_scan_conte
|
||||
struct vkd3d_shader_descriptor_info1 *d;
|
||||
|
||||
if (!(d = vkd3d_shader_scan_add_descriptor(context, VKD3D_SHADER_DESCRIPTOR_TYPE_SAMPLER,
|
||||
- &sampler->src.reg, &sampler->range, VKD3D_SHADER_RESOURCE_NONE, VKD3D_DATA_UINT)))
|
||||
+ &sampler->src.reg, &sampler->range, VKD3D_SHADER_RESOURCE_NONE, VKD3D_DATA_UNUSED)))
|
||||
return;
|
||||
|
||||
if (instruction->flags & VKD3DSI_SAMPLER_COMPARISON_MODE)
|
||||
@@ -1122,7 +1122,7 @@ static void vkd3d_shader_scan_combined_sampler_declaration(
|
||||
struct vkd3d_shader_scan_context *context, const struct vkd3d_shader_semantic *semantic)
|
||||
{
|
||||
vkd3d_shader_scan_add_descriptor(context, VKD3D_SHADER_DESCRIPTOR_TYPE_SAMPLER, &semantic->resource.reg.reg,
|
||||
- &semantic->resource.range, VKD3D_SHADER_RESOURCE_NONE, VKD3D_DATA_UINT);
|
||||
+ &semantic->resource.range, VKD3D_SHADER_RESOURCE_NONE, VKD3D_DATA_UNUSED);
|
||||
vkd3d_shader_scan_add_descriptor(context, VKD3D_SHADER_DESCRIPTOR_TYPE_SRV, &semantic->resource.reg.reg,
|
||||
&semantic->resource.range, semantic->resource_type, VKD3D_DATA_FLOAT);
|
||||
}
|
||||
@@ -1520,6 +1520,8 @@ static enum vkd3d_shader_resource_data_type vkd3d_resource_data_type_from_data_t
|
||||
return VKD3D_SHADER_RESOURCE_DATA_DOUBLE;
|
||||
case VKD3D_DATA_CONTINUED:
|
||||
return VKD3D_SHADER_RESOURCE_DATA_CONTINUED;
|
||||
+ case VKD3D_DATA_UNUSED:
|
||||
+ return VKD3D_SHADER_RESOURCE_DATA_NONE;
|
||||
default:
|
||||
ERR("Invalid resource data type %#x.\n", data_type);
|
||||
return VKD3D_SHADER_RESOURCE_DATA_FLOAT;
|
||||
@@ -1547,6 +1549,10 @@ static enum vkd3d_result convert_descriptor_info(struct vkd3d_shader_scan_contex
|
||||
dst->flags = src->flags;
|
||||
dst->count = src->count;
|
||||
|
||||
+ if (context->api_version <= VKD3D_SHADER_API_VERSION_1_15
|
||||
+ && dst->type == VKD3D_SHADER_DESCRIPTOR_TYPE_SAMPLER)
|
||||
+ dst->resource_data_type = VKD3D_SHADER_RESOURCE_DATA_UINT;
|
||||
+
|
||||
if (context->api_version < VKD3D_SHADER_API_VERSION_1_3
|
||||
&& dst->resource_data_type >= VKD3D_SHADER_RESOURCE_DATA_MIXED)
|
||||
{
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
||||
index 05ef8beeb9c..3b4fb626fcc 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
||||
@@ -61,6 +61,8 @@
|
||||
|
||||
#define VKD3D_SHADER_COMPONENT_TYPE_COUNT (VKD3D_SHADER_COMPONENT_INT16 + 1)
|
||||
#define VKD3D_SHADER_MINIMUM_PRECISION_COUNT (VKD3D_SHADER_MINIMUM_PRECISION_UINT_16 + 1)
|
||||
+#define VKD3D_SHADER_DESCRIPTOR_TYPE_COUNT (VKD3D_SHADER_DESCRIPTOR_TYPE_SAMPLER + 1)
|
||||
+#define VKD3D_SHADER_RESOURCE_TYPE_COUNT (VKD3D_SHADER_RESOURCE_TEXTURE_CUBEARRAY + 1)
|
||||
|
||||
#define VKD3D_MAX_STREAM_COUNT 4
|
||||
|
||||
@@ -257,6 +259,9 @@ enum vkd3d_shader_error
|
||||
VKD3D_SHADER_ERROR_VSIR_MISSING_SEMANTIC = 9021,
|
||||
VKD3D_SHADER_ERROR_VSIR_INVALID_SIGNATURE = 9022,
|
||||
VKD3D_SHADER_ERROR_VSIR_INVALID_RANGE = 9023,
|
||||
+ VKD3D_SHADER_ERROR_VSIR_INVALID_DESCRIPTOR_TYPE = 9024,
|
||||
+ VKD3D_SHADER_ERROR_VSIR_INVALID_RESOURCE_TYPE = 9025,
|
||||
+ VKD3D_SHADER_ERROR_VSIR_INVALID_DESCRIPTOR_COUNT = 9026,
|
||||
|
||||
VKD3D_SHADER_WARNING_VSIR_DYNAMIC_DESCRIPTOR_ARRAY = 9300,
|
||||
|
||||
--
|
||||
2.47.2
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user