mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Remove several d3d patchsets:
* wined3d-Core_Context: fixed by 62651d65f4f8e4dc6e1f4fb5d589526613d419aa * wined3d-Limit_Vram: This patch is a no-op; LONG_MAX is 0x7fffffffffffffff on 64-bit. * wined3d-Revert_Surface_Blt: fixed by d38076fd57a50452b17d61f771688bbfcd3a5563 * wined3d-WINED3DFMT_R32G32_UINT: fixed by af1be967a0b0262a980e9bfbdff107c1d6db7e8d * wined3d-sample_c_lz: fixed by ce8610cea58ed1ba9d8f17857e507d9d6c30132d * wined3d-CSMT_Helper, wined3d-CSMT_Main: Remove CSMT_Helper and remove toggle for CSMT_Main. CSMT is in Wine and configurable. Also remove patches 0008, 0019, 0034, which are no-ops and not useful. * makedep-PARENTSPEC: Remove patch which was only needed for wined3d-csmt.
This commit is contained in:
parent
b7119079a3
commit
5876a3f782
@ -1,46 +0,0 @@
|
||||
From 9f17847454bf81d335a318bb38464be636c5d8f1 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 17 Dec 2014 04:11:58 +0100
|
||||
Subject: [PATCH] makedep: Add support for PARENTSPEC Makefile variable.
|
||||
|
||||
---
|
||||
tools/makedep.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tools/makedep.c b/tools/makedep.c
|
||||
index 6cb7570..09fc2de 100644
|
||||
--- a/tools/makedep.c
|
||||
+++ b/tools/makedep.c
|
||||
@@ -175,6 +175,7 @@ struct makefile
|
||||
const char *top_src_dir;
|
||||
const char *top_obj_dir;
|
||||
const char *parent_dir;
|
||||
+ const char *parent_spec;
|
||||
const char *module;
|
||||
const char *testdll;
|
||||
const char *sharedlib;
|
||||
@@ -2913,7 +2914,12 @@ static void output_module( struct makefile *make )
|
||||
unsigned int i;
|
||||
|
||||
if (!make->appmode.count)
|
||||
- spec_file = src_dir_path( make, replace_extension( make->module, ".dll", ".spec" ));
|
||||
+ {
|
||||
+ if (!make->parent_spec)
|
||||
+ spec_file = src_dir_path( make, replace_extension( make->module, ".dll", ".spec" ));
|
||||
+ else
|
||||
+ spec_file = src_dir_path( make, make->parent_spec );
|
||||
+ }
|
||||
strarray_addall( &all_libs, add_import_libs( make, &dep_libs, make->delayimports, 0 ));
|
||||
strarray_addall( &all_libs, add_import_libs( make, &dep_libs, make->imports, 0 ));
|
||||
add_import_libs( make, &dep_libs, get_default_imports( make ), 0 ); /* dependencies only */
|
||||
@@ -3693,6 +3699,7 @@ static void load_sources( struct makefile *make )
|
||||
strarray_set_value( &make->vars, "srcdir", src_dir_path( make, "" ));
|
||||
|
||||
make->parent_dir = get_expanded_make_variable( make, "PARENTSRC" );
|
||||
+ make->parent_spec = get_expanded_make_variable( make, "PARENTSPEC" );
|
||||
make->module = get_expanded_make_variable( make, "MODULE" );
|
||||
make->testdll = get_expanded_make_variable( make, "TESTDLL" );
|
||||
make->sharedlib = get_expanded_make_variable( make, "SHAREDLIB" );
|
||||
--
|
||||
1.9.1
|
||||
|
@ -194,7 +194,6 @@ patch_enable_all ()
|
||||
enable_libs_Debug_Channel="$1"
|
||||
enable_libs_Unicode_Collation="$1"
|
||||
enable_loader_OSX_Preloader="$1"
|
||||
enable_makedep_PARENTSPEC="$1"
|
||||
enable_mmsystem_dll16_MIDIHDR_Refcount="$1"
|
||||
enable_mountmgr_DosDevices="$1"
|
||||
enable_mscoree_CorValidateImage="$1"
|
||||
@ -391,21 +390,15 @@ patch_enable_all ()
|
||||
enable_winecfg_Staging="$1"
|
||||
enable_winecfg_Unmounted_Devices="$1"
|
||||
enable_wined3d_Accounting="$1"
|
||||
enable_wined3d_CSMT_Helper="$1"
|
||||
enable_wined3d_CSMT_Main="$1"
|
||||
enable_wined3d_Core_Context="$1"
|
||||
enable_wined3d_DXTn="$1"
|
||||
enable_wined3d_Dual_Source_Blending="$1"
|
||||
enable_wined3d_Indexed_Vertex_Blending="$1"
|
||||
enable_wined3d_Limit_Vram="$1"
|
||||
enable_wined3d_QUERY_Stubs="$1"
|
||||
enable_wined3d_Revert_Surface_Blt="$1"
|
||||
enable_wined3d_Silence_FIXMEs="$1"
|
||||
enable_wined3d_UAV_Counters="$1"
|
||||
enable_wined3d_Viewports="$1"
|
||||
enable_wined3d_WINED3DFMT_R32G32_UINT="$1"
|
||||
enable_wined3d_WINED3D_RS_COLORWRITEENABLE="$1"
|
||||
enable_wined3d_sample_c_lz="$1"
|
||||
enable_wined3d_wined3d_guess_gl_vendor="$1"
|
||||
enable_winedbg_Process_Arguments="$1"
|
||||
enable_winedevice_Default_Drivers="$1"
|
||||
@ -787,9 +780,6 @@ patch_enable ()
|
||||
loader-OSX_Preloader)
|
||||
enable_loader_OSX_Preloader="$2"
|
||||
;;
|
||||
makedep-PARENTSPEC)
|
||||
enable_makedep_PARENTSPEC="$2"
|
||||
;;
|
||||
mmsystem.dll16-MIDIHDR_Refcount)
|
||||
enable_mmsystem_dll16_MIDIHDR_Refcount="$2"
|
||||
;;
|
||||
@ -1378,15 +1368,9 @@ patch_enable ()
|
||||
wined3d-Accounting)
|
||||
enable_wined3d_Accounting="$2"
|
||||
;;
|
||||
wined3d-CSMT_Helper)
|
||||
enable_wined3d_CSMT_Helper="$2"
|
||||
;;
|
||||
wined3d-CSMT_Main)
|
||||
enable_wined3d_CSMT_Main="$2"
|
||||
;;
|
||||
wined3d-Core_Context)
|
||||
enable_wined3d_Core_Context="$2"
|
||||
;;
|
||||
wined3d-DXTn)
|
||||
enable_wined3d_DXTn="$2"
|
||||
;;
|
||||
@ -1396,15 +1380,9 @@ patch_enable ()
|
||||
wined3d-Indexed_Vertex_Blending)
|
||||
enable_wined3d_Indexed_Vertex_Blending="$2"
|
||||
;;
|
||||
wined3d-Limit_Vram)
|
||||
enable_wined3d_Limit_Vram="$2"
|
||||
;;
|
||||
wined3d-QUERY_Stubs)
|
||||
enable_wined3d_QUERY_Stubs="$2"
|
||||
;;
|
||||
wined3d-Revert_Surface_Blt)
|
||||
enable_wined3d_Revert_Surface_Blt="$2"
|
||||
;;
|
||||
wined3d-Silence_FIXMEs)
|
||||
enable_wined3d_Silence_FIXMEs="$2"
|
||||
;;
|
||||
@ -1414,15 +1392,9 @@ patch_enable ()
|
||||
wined3d-Viewports)
|
||||
enable_wined3d_Viewports="$2"
|
||||
;;
|
||||
wined3d-WINED3DFMT_R32G32_UINT)
|
||||
enable_wined3d_WINED3DFMT_R32G32_UINT="$2"
|
||||
;;
|
||||
wined3d-WINED3D_RS_COLORWRITEENABLE)
|
||||
enable_wined3d_WINED3D_RS_COLORWRITEENABLE="$2"
|
||||
;;
|
||||
wined3d-sample_c_lz)
|
||||
enable_wined3d_sample_c_lz="$2"
|
||||
;;
|
||||
wined3d-wined3d_guess_gl_vendor)
|
||||
enable_wined3d_wined3d_guess_gl_vendor="$2"
|
||||
;;
|
||||
@ -1939,13 +1911,6 @@ if test "$enable_winedevice_Default_Drivers" -eq 1; then
|
||||
enable_dxva2_Video_Decoder=1
|
||||
fi
|
||||
|
||||
if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
if test "$enable_wined3d_CSMT_Helper" -gt 1; then
|
||||
abort "Patchset wined3d-CSMT_Helper disabled, but wined3d-CSMT_Main depends on that."
|
||||
fi
|
||||
enable_wined3d_CSMT_Helper=1
|
||||
fi
|
||||
|
||||
if test "$enable_wined3d_Indexed_Vertex_Blending" -eq 1; then
|
||||
if test "$enable_wined3d_WINED3D_RS_COLORWRITEENABLE" -gt 1; then
|
||||
abort "Patchset wined3d-WINED3D_RS_COLORWRITEENABLE disabled, but wined3d-Indexed_Vertex_Blending depends on that."
|
||||
@ -1960,44 +1925,40 @@ if test "$enable_wined3d_WINED3D_RS_COLORWRITEENABLE" -eq 1; then
|
||||
enable_d3d11_Depth_Bias=1
|
||||
fi
|
||||
|
||||
if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
if test "$enable_d3d11_Deferred_Context" -gt 1; then
|
||||
abort "Patchset d3d11-Deferred_Context disabled, but wined3d-CSMT_Helper depends on that."
|
||||
abort "Patchset d3d11-Deferred_Context disabled, but wined3d-CSMT_Main depends on that."
|
||||
fi
|
||||
if test "$enable_d3d11_ID3D11Texture1D_Rebased" -gt 1; then
|
||||
abort "Patchset d3d11-ID3D11Texture1D_Rebased disabled, but wined3d-CSMT_Helper depends on that."
|
||||
abort "Patchset d3d11-ID3D11Texture1D_Rebased disabled, but wined3d-CSMT_Main depends on that."
|
||||
fi
|
||||
if test "$enable_d3d9_Tests" -gt 1; then
|
||||
abort "Patchset d3d9-Tests disabled, but wined3d-CSMT_Helper depends on that."
|
||||
fi
|
||||
if test "$enable_makedep_PARENTSPEC" -gt 1; then
|
||||
abort "Patchset makedep-PARENTSPEC disabled, but wined3d-CSMT_Helper depends on that."
|
||||
abort "Patchset d3d9-Tests disabled, but wined3d-CSMT_Main depends on that."
|
||||
fi
|
||||
if test "$enable_ntdll_DllRedirects" -gt 1; then
|
||||
abort "Patchset ntdll-DllRedirects disabled, but wined3d-CSMT_Helper depends on that."
|
||||
abort "Patchset ntdll-DllRedirects disabled, but wined3d-CSMT_Main depends on that."
|
||||
fi
|
||||
if test "$enable_wined3d_Accounting" -gt 1; then
|
||||
abort "Patchset wined3d-Accounting disabled, but wined3d-CSMT_Helper depends on that."
|
||||
abort "Patchset wined3d-Accounting disabled, but wined3d-CSMT_Main depends on that."
|
||||
fi
|
||||
if test "$enable_wined3d_DXTn" -gt 1; then
|
||||
abort "Patchset wined3d-DXTn disabled, but wined3d-CSMT_Helper depends on that."
|
||||
abort "Patchset wined3d-DXTn disabled, but wined3d-CSMT_Main depends on that."
|
||||
fi
|
||||
if test "$enable_wined3d_Dual_Source_Blending" -gt 1; then
|
||||
abort "Patchset wined3d-Dual_Source_Blending disabled, but wined3d-CSMT_Helper depends on that."
|
||||
abort "Patchset wined3d-Dual_Source_Blending disabled, but wined3d-CSMT_Main depends on that."
|
||||
fi
|
||||
if test "$enable_wined3d_QUERY_Stubs" -gt 1; then
|
||||
abort "Patchset wined3d-QUERY_Stubs disabled, but wined3d-CSMT_Helper depends on that."
|
||||
abort "Patchset wined3d-QUERY_Stubs disabled, but wined3d-CSMT_Main depends on that."
|
||||
fi
|
||||
if test "$enable_wined3d_Silence_FIXMEs" -gt 1; then
|
||||
abort "Patchset wined3d-Silence_FIXMEs disabled, but wined3d-CSMT_Helper depends on that."
|
||||
abort "Patchset wined3d-Silence_FIXMEs disabled, but wined3d-CSMT_Main depends on that."
|
||||
fi
|
||||
if test "$enable_wined3d_UAV_Counters" -gt 1; then
|
||||
abort "Patchset wined3d-UAV_Counters disabled, but wined3d-CSMT_Helper depends on that."
|
||||
abort "Patchset wined3d-UAV_Counters disabled, but wined3d-CSMT_Main depends on that."
|
||||
fi
|
||||
enable_d3d11_Deferred_Context=1
|
||||
enable_d3d11_ID3D11Texture1D_Rebased=1
|
||||
enable_d3d9_Tests=1
|
||||
enable_makedep_PARENTSPEC=1
|
||||
enable_ntdll_DllRedirects=1
|
||||
enable_wined3d_Accounting=1
|
||||
enable_wined3d_DXTn=1
|
||||
@ -2019,15 +1980,8 @@ if test "$enable_wined3d_Dual_Source_Blending" -eq 1; then
|
||||
fi
|
||||
|
||||
if test "$enable_wined3d_Viewports" -eq 1; then
|
||||
if test "$enable_wined3d_Core_Context" -gt 1; then
|
||||
abort "Patchset wined3d-Core_Context disabled, but wined3d-Viewports depends on that."
|
||||
fi
|
||||
enable_wined3d_Core_Context=1
|
||||
fi
|
||||
|
||||
if test "$enable_wined3d_Core_Context" -eq 1; then
|
||||
if test "$enable_d3d11_Depth_Bias" -gt 1; then
|
||||
abort "Patchset d3d11-Depth_Bias disabled, but wined3d-Core_Context depends on that."
|
||||
abort "Patchset d3d11-Depth_Bias disabled, but wined3d-Viewports depends on that."
|
||||
fi
|
||||
enable_d3d11_Depth_Bias=1
|
||||
fi
|
||||
@ -4671,18 +4625,6 @@ if test "$enable_loader_OSX_Preloader" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset makedep-PARENTSPEC
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * tools/makedep.c
|
||||
# |
|
||||
if test "$enable_makedep_PARENTSPEC" -eq 1; then
|
||||
patch_apply makedep-PARENTSPEC/0001-makedep-Add-support-for-PARENTSPEC-Makefile-variable.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "makedep: Add support for PARENTSPEC Makefile variable.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset mmsystem.dll16-MIDIHDR_Refcount
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -8113,25 +8055,10 @@ if test "$enable_wined3d_Accounting" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Core_Context
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * d3d11-Depth_Bias
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/dxgi/factory.c, dlls/wined3d/directx.c, include/wine/wined3d.h
|
||||
# |
|
||||
if test "$enable_wined3d_Core_Context" -eq 1; then
|
||||
patch_apply wined3d-Core_Context/0001-wined3d-Use-OpenGL-core-context-for-D3D10-11-when-ne.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Use OpenGL core context for D3D10/11 when necessary.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Viewports
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * d3d11-Depth_Bias, wined3d-Core_Context
|
||||
# | * d3d11-Depth_Bias
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d11/tests/d3d11.c, dlls/d3d8/directx.c, dlls/d3d9/directx.c, dlls/ddraw/ddraw_private.h, dlls/wined3d/state.c,
|
||||
@ -8147,7 +8074,7 @@ fi
|
||||
# Patchset wined3d-Dual_Source_Blending
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * d3d11-ID3D11Texture1D_Rebased, d3d11-Depth_Bias, wined3d-Core_Context, wined3d-Viewports
|
||||
# | * d3d11-ID3D11Texture1D_Rebased, d3d11-Depth_Bias, wined3d-Viewports
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d11/tests/d3d11.c, dlls/wined3d/context.c, dlls/wined3d/directx.c, dlls/wined3d/glsl_shader.c,
|
||||
@ -8207,20 +8134,24 @@ if test "$enable_wined3d_UAV_Counters" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-CSMT_Helper
|
||||
# Patchset wined3d-CSMT_Main
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * d3d11-ID3D11Texture1D_Rebased, d3d11-Deferred_Context, d3d9-Tests, makedep-PARENTSPEC, ntdll-DllOverrides_WOW64, ntdll-
|
||||
# | Loader_Machine_Type, ntdll-DllRedirects, wined3d-Accounting, wined3d-DXTn, d3d11-Depth_Bias, wined3d-Core_Context,
|
||||
# | wined3d-Viewports, wined3d-Dual_Source_Blending, wined3d-QUERY_Stubs, wined3d-Silence_FIXMEs, wined3d-UAV_Counters
|
||||
# | * d3d11-ID3D11Texture1D_Rebased, d3d11-Deferred_Context, d3d9-Tests, ntdll-DllOverrides_WOW64, ntdll-Loader_Machine_Type,
|
||||
# | ntdll-DllRedirects, wined3d-Accounting, wined3d-DXTn, d3d11-Depth_Bias, wined3d-Viewports, wined3d-Dual_Source_Blending,
|
||||
# | wined3d-QUERY_Stubs, wined3d-Silence_FIXMEs, wined3d-UAV_Counters
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * configure.ac, dlls/wined3d-csmt/Makefile.in, dlls/wined3d-csmt/version.rc
|
||||
# | * dlls/wined3d/cs.c, dlls/wined3d/device.c, dlls/wined3d/view.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
patch_apply wined3d-CSMT_Helper/0001-wined3d-Add-second-dll-with-STAGING_CSMT-definition-.patch
|
||||
if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
patch_apply wined3d-CSMT_Main/0001-wined3d-Add-additional-synchronization-CS-ops.patch
|
||||
patch_apply wined3d-CSMT_Main/0042-wined3d-Reset-context-before-destruction.patch
|
||||
patch_apply wined3d-CSMT_Main/0045-wined3d-Improve-wined3d_cs_emit_update_sub_resource.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Add second dll with STAGING_CSMT definition set.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Add additional synchronization CS ops.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Reset context before destruction.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Improve wined3d_cs_emit_update_sub_resource.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
@ -8276,59 +8207,6 @@ if test "$enable_wined3d_Indexed_Vertex_Blending" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Limit_Vram
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/directx.c
|
||||
# |
|
||||
if test "$enable_wined3d_Limit_Vram" -eq 1; then
|
||||
patch_apply wined3d-Limit_Vram/0001-wined3d-Limit-the-vram-memory-to-LONG_MAX-only-on-32.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Limit the vram memory to LONG_MAX only on 32 bit.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Revert_Surface_Blt
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#43627] Revert patch which causes rendering issue in AoE2
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/surface.c
|
||||
# |
|
||||
if test "$enable_wined3d_Revert_Surface_Blt" -eq 1; then
|
||||
patch_apply wined3d-Revert_Surface_Blt/0001-Revert-wined3d-Drop-the-special-case-for-converted-s.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "Revert \"wined3d: Drop the special case for \"converted\" surfaces in wined3d_surface_blt().\".", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-WINED3DFMT_R32G32_UINT
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/utils.c
|
||||
# |
|
||||
if test "$enable_wined3d_WINED3DFMT_R32G32_UINT" -eq 1; then
|
||||
patch_apply wined3d-WINED3DFMT_R32G32_UINT/0002-wined3d-Add-hack-for-WINED3DFMT_R24_UNORM_X8_TYPELES.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Add hack for WINED3DFMT_R24_UNORM_X8_TYPELESS.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-sample_c_lz
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/glsl_shader.c
|
||||
# |
|
||||
if test "$enable_wined3d_sample_c_lz" -eq 1; then
|
||||
patch_apply wined3d-sample_c_lz/0001-wined3d-Emulate-sample_c_lz-using-textureGradOffset-.patch
|
||||
patch_apply wined3d-sample_c_lz/0002-wined3d-Emulate-textureLod-samplerCubeShadow-.-using.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Emulate sample_c_lz using textureGradOffset for sampler2DArrayShadow.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Emulate textureLod(samplerCubeShadow, ...) using shadowCubeGrad.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-wined3d_guess_gl_vendor
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
@ -8344,33 +8222,6 @@ if test "$enable_wined3d_wined3d_guess_gl_vendor" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-CSMT_Main
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
# | * d3d11-ID3D11Texture1D_Rebased, d3d11-Deferred_Context, d3d9-Tests, makedep-PARENTSPEC, ntdll-DllOverrides_WOW64, ntdll-
|
||||
# | Loader_Machine_Type, ntdll-DllRedirects, wined3d-Accounting, wined3d-DXTn, d3d11-Depth_Bias, wined3d-Core_Context,
|
||||
# | wined3d-Viewports, wined3d-Dual_Source_Blending, wined3d-QUERY_Stubs, wined3d-Silence_FIXMEs, wined3d-UAV_Counters,
|
||||
# | wined3d-CSMT_Helper
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#11674] Support for CSMT (command stream) to increase graphic performance
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/cs.c, dlls/wined3d/device.c, dlls/wined3d/surface.c, dlls/wined3d/swapchain.c, dlls/wined3d/texture.c,
|
||||
# | dlls/wined3d/view.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_CSMT_Main" -eq 1; then
|
||||
patch_apply wined3d-CSMT_Main/9999-IfDefined.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Add additional synchronization CS ops.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Send blits through the command stream.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Wrap GL BOs in a structure.", 1 },';
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Don'\''t call glFinish before swapping.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Reset context before destruction.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Improve wined3d_cs_emit_update_sub_resource.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winedbg-Process_Arguments
|
||||
# |
|
||||
# | Modified files:
|
||||
|
@ -1,103 +0,0 @@
|
||||
From 6420a142c91174e9553960a3340ca6f38ba3c643 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 14 Dec 2014 20:49:28 +0100
|
||||
Subject: [PATCH] wined3d: Add second dll with STAGING_CSMT definition set.
|
||||
|
||||
---
|
||||
configure.ac | 1 +
|
||||
dlls/wined3d-csmt/Makefile.in | 36 ++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d-csmt/version.rc | 27 +++++++++++++++++++++++++++
|
||||
3 files changed, 64 insertions(+)
|
||||
create mode 100644 dlls/wined3d-csmt/Makefile.in
|
||||
create mode 100644 dlls/wined3d-csmt/version.rc
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a45d5b8..fda7c09 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3804,6 +3804,7 @@ WINE_CONFIG_MAKEFILE(dlls/winebus.sys)
|
||||
WINE_CONFIG_MAKEFILE(dlls/winecoreaudio.drv)
|
||||
WINE_CONFIG_MAKEFILE(dlls/winecrt0)
|
||||
WINE_CONFIG_MAKEFILE(dlls/wined3d)
|
||||
+WINE_CONFIG_MAKEFILE(dlls/wined3d-csmt)
|
||||
WINE_CONFIG_MAKEFILE(dlls/winegstreamer)
|
||||
WINE_CONFIG_MAKEFILE(dlls/winehid.sys)
|
||||
WINE_CONFIG_MAKEFILE(dlls/winejoystick.drv)
|
||||
diff --git a/dlls/wined3d-csmt/Makefile.in b/dlls/wined3d-csmt/Makefile.in
|
||||
new file mode 100644
|
||||
index 0000000..1d0458e
|
||||
--- /dev/null
|
||||
+++ b/dlls/wined3d-csmt/Makefile.in
|
||||
@@ -0,0 +1,36 @@
|
||||
+EXTRADEFS = -DSTAGING_CSMT
|
||||
+MODULE = wined3d-csmt.dll
|
||||
+IMPORTS = uuid opengl32 user32 gdi32 advapi32
|
||||
+PARENTSRC = ../wined3d
|
||||
+PARENTSPEC = ../wined3d/wined3d.spec
|
||||
+
|
||||
+C_SRCS = \
|
||||
+ arb_program_shader.c \
|
||||
+ ati_fragment_shader.c \
|
||||
+ buffer.c \
|
||||
+ context.c \
|
||||
+ cs.c \
|
||||
+ device.c \
|
||||
+ directx.c \
|
||||
+ dxtn.c \
|
||||
+ gl_compat.c \
|
||||
+ glsl_shader.c \
|
||||
+ nvidia_texture_shader.c \
|
||||
+ palette.c \
|
||||
+ query.c \
|
||||
+ resource.c \
|
||||
+ sampler.c \
|
||||
+ shader.c \
|
||||
+ shader_sm1.c \
|
||||
+ shader_sm4.c \
|
||||
+ state.c \
|
||||
+ stateblock.c \
|
||||
+ surface.c \
|
||||
+ swapchain.c \
|
||||
+ texture.c \
|
||||
+ utils.c \
|
||||
+ vertexdeclaration.c \
|
||||
+ view.c \
|
||||
+ wined3d_main.c
|
||||
+
|
||||
+RC_SRCS = version.rc
|
||||
diff --git a/dlls/wined3d-csmt/version.rc b/dlls/wined3d-csmt/version.rc
|
||||
new file mode 100644
|
||||
index 0000000..2fa8710
|
||||
--- /dev/null
|
||||
+++ b/dlls/wined3d-csmt/version.rc
|
||||
@@ -0,0 +1,27 @@
|
||||
+/*
|
||||
+ * Copyright 2009 Austin English
|
||||
+ *
|
||||
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#include "config.h" /* Needed to get PACKAGE_VERSION */
|
||||
+
|
||||
+#define WINE_FILEDESCRIPTION_STR "Wine D3D"
|
||||
+#define WINE_FILENAME_STR "wined3d-csmt.dll"
|
||||
+#define WINE_FILEVERSION_STR PACKAGE_VERSION
|
||||
+#define WINE_PRODUCTVERSION_STR PACKAGE_VERSION
|
||||
+#define WINE_PRODUCTNAME_STR "Wine D3D"
|
||||
+
|
||||
+#include "wine/wine_common_ver.rc"
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1,11 +0,0 @@
|
||||
Depends: wined3d-Accounting
|
||||
Depends: wined3d-DXTn
|
||||
Depends: wined3d-QUERY_Stubs
|
||||
Depends: d3d11-ID3D11Texture1D_Rebased
|
||||
Depends: wined3d-Silence_FIXMEs
|
||||
Depends: wined3d-UAV_Counters
|
||||
Depends: wined3d-Dual_Source_Blending
|
||||
Depends: d3d9-Tests
|
||||
Depends: d3d11-Deferred_Context
|
||||
Depends: makedep-PARENTSPEC
|
||||
Depends: ntdll-DllRedirects
|
@ -1,67 +0,0 @@
|
||||
From 443951f5ef3359b18334b50d72724f99ce77f72e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Mon, 29 Apr 2013 18:49:53 +0200
|
||||
Subject: wined3d: Send blits through the command stream.
|
||||
|
||||
This needs more work. This patch breaks error handling, and the split
|
||||
between surface_blt and surface_blt_ugly isn't particularly nice.
|
||||
---
|
||||
dlls/wined3d/device.c | 19 ++++++++++---------
|
||||
dlls/wined3d/texture.c | 10 ++++++++--
|
||||
2 files changed, 18 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index cf446c7cd17..b3fea23c821 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -4241,16 +4241,17 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
- if (dst_texture->sub_resources[dst_sub_resource_idx].map_count)
|
||||
+ if (dst_texture->sub_resources[dst_sub_resource_idx].map_count ||
|
||||
+ src_texture->sub_resources[src_sub_resource_idx].map_count)
|
||||
{
|
||||
- WARN("Destination sub-resource %u is mapped.\n", dst_sub_resource_idx);
|
||||
- return WINED3DERR_INVALIDCALL;
|
||||
- }
|
||||
-
|
||||
- if (src_texture->sub_resources[src_sub_resource_idx].map_count)
|
||||
- {
|
||||
- WARN("Source sub-resource %u is mapped.\n", src_sub_resource_idx);
|
||||
- return WINED3DERR_INVALIDCALL;
|
||||
+ struct wined3d_device *device = dst_texture->resource.device;
|
||||
+ device->cs->ops->finish(device->cs, WINED3D_CS_QUEUE_DEFAULT);
|
||||
+ if (dst_texture->sub_resources[dst_sub_resource_idx].map_count ||
|
||||
+ src_texture->sub_resources[src_sub_resource_idx].map_count)
|
||||
+ {
|
||||
+ WARN("Destination or source sub-resource is mapped.\n");
|
||||
+ return WINEDDERR_SURFACEBUSY;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!src_box)
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index a77c9835bbb..55cc49be5e0 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -3231,8 +3231,14 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
|
||||
if (dst_texture->sub_resources[dst_sub_resource_idx].map_count
|
||||
|| src_texture->sub_resources[src_sub_resource_idx].map_count)
|
||||
{
|
||||
- WARN("Sub-resource is busy, returning WINEDDERR_SURFACEBUSY.\n");
|
||||
- return WINEDDERR_SURFACEBUSY;
|
||||
+ struct wined3d_device *device = dst_texture->resource.device;
|
||||
+ device->cs->ops->finish(device->cs, WINED3D_CS_QUEUE_DEFAULT);
|
||||
+ if (dst_texture->sub_resources[dst_sub_resource_idx].map_count
|
||||
+ || (src_texture && src_texture->sub_resources[src_sub_resource_idx].map_count))
|
||||
+ {
|
||||
+ WARN("Sub-resource is busy, returning WINEDDERR_SURFACEBUSY.\n");
|
||||
+ return WINEDDERR_SURFACEBUSY;
|
||||
+ }
|
||||
}
|
||||
|
||||
if ((src_format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
--
|
||||
2.12.2
|
||||
|
@ -1,293 +0,0 @@
|
||||
From fda0041ebe98a2da3a43dad2443812406f2eafd4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Fri, 30 Aug 2013 17:00:35 +0200
|
||||
Subject: [PATCH] wined3d: Wrap GL BOs in a structure
|
||||
|
||||
The idea is to use those structures for mapping through the command stream and caching
|
||||
them for DISCARD maps.
|
||||
---
|
||||
dlls/wined3d/device.c | 53 ++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/surface.c | 2 +-
|
||||
dlls/wined3d/texture.c | 55 ++++++++++++++++++++----------------------
|
||||
dlls/wined3d/wined3d_private.h | 14 ++++++++++-
|
||||
4 files changed, 93 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
index 9472ffa..656febf 100644
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -5307,3 +5307,56 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
else
|
||||
return CallWindowProcA(proc, window, message, wparam, lparam);
|
||||
}
|
||||
+
|
||||
+/* Context activation is done by the caller */
|
||||
+struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT size, GLenum gl_usage,
|
||||
+ GLenum type_hint, struct wined3d_context *context)
|
||||
+{
|
||||
+ struct wined3d_gl_bo *ret;
|
||||
+ const struct wined3d_gl_info *gl_info;
|
||||
+
|
||||
+ TRACE("device %p, size %u, gl_usage %u, type_hint %u\n", device, size, gl_usage,
|
||||
+ type_hint);
|
||||
+
|
||||
+ ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ret));
|
||||
+ if(!ret)
|
||||
+ return NULL;
|
||||
+ ret->type_hint = type_hint;
|
||||
+ ret->size = size;
|
||||
+ ret->usage = gl_usage;
|
||||
+
|
||||
+ gl_info = context->gl_info;
|
||||
+
|
||||
+ GL_EXTCALL(glGenBuffers(1, &ret->name));
|
||||
+ if (type_hint == GL_ELEMENT_ARRAY_BUFFER)
|
||||
+ context_invalidate_state(context, STATE_INDEXBUFFER);
|
||||
+ GL_EXTCALL(glBindBuffer(type_hint, ret->name));
|
||||
+ GL_EXTCALL(glBufferData(type_hint, size, NULL, gl_usage));
|
||||
+ GL_EXTCALL(glBindBuffer(type_hint, 0));
|
||||
+ checkGLcall("Create buffer object");
|
||||
+
|
||||
+ TRACE("Successfully created and set up buffer %u\n", ret->name);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+/* Context activation is done by the caller */
|
||||
+static void wined3d_device_destroy_bo(struct wined3d_device *device, const struct wined3d_context *context,
|
||||
+ struct wined3d_gl_bo *bo)
|
||||
+{
|
||||
+ const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
+ TRACE("device %p, bo %p, GL bo %u\n", device, bo, bo->name);
|
||||
+
|
||||
+ GL_EXTCALL(glDeleteBuffers(1, &bo->name));
|
||||
+ checkGLcall("glDeleteBuffers");
|
||||
+
|
||||
+ HeapFree(GetProcessHeap(), 0, bo);
|
||||
+}
|
||||
+
|
||||
+/* Context activation is done by the caller */
|
||||
+void wined3d_device_release_bo(struct wined3d_device *device, struct wined3d_gl_bo *bo,
|
||||
+ const struct wined3d_context *context)
|
||||
+{
|
||||
+ TRACE("device %p, bo %p, GL bo %u\n", device, bo, bo->name);
|
||||
+
|
||||
+ wined3d_device_destroy_bo(device, context, bo);
|
||||
+}
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index 30f4936..a27b623 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -2232,7 +2232,7 @@ BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_re
|
||||
/* Don't use PBOs for converted surfaces. During PBO conversion we look at
|
||||
* WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is
|
||||
* getting called. */
|
||||
- if (conversion && sub_resource->buffer_object)
|
||||
+ if (conversion && sub_resource->buffer)
|
||||
{
|
||||
TRACE("Removing the pbo attached to texture %p, %u.\n", texture, sub_resource_idx);
|
||||
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 526bfb1..89313ca 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -321,7 +321,7 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
|
||||
if (locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
data->addr = NULL;
|
||||
- data->buffer_object = sub_resource->buffer_object;
|
||||
+ data->buffer_object = sub_resource->buffer->name;
|
||||
return;
|
||||
}
|
||||
if (locations & WINED3D_LOCATION_USER_MEMORY)
|
||||
@@ -345,18 +345,17 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture,
|
||||
- unsigned int sub_resource_idx, const struct wined3d_gl_info *gl_info)
|
||||
+ unsigned int sub_resource_idx, struct wined3d_context *context)
|
||||
{
|
||||
- GLuint *buffer_object = &texture->sub_resources[sub_resource_idx].buffer_object;
|
||||
+ struct wined3d_gl_bo *buffer = texture->sub_resources[sub_resource_idx].buffer;
|
||||
+ GLuint name = buffer->name;
|
||||
|
||||
- GL_EXTCALL(glDeleteBuffers(1, buffer_object));
|
||||
- checkGLcall("glDeleteBuffers");
|
||||
+ wined3d_device_release_bo(texture->resource.device, buffer, context);
|
||||
+ texture->sub_resources[sub_resource_idx].buffer = NULL;
|
||||
+ wined3d_texture_invalidate_location(texture, sub_resource_idx, WINED3D_LOCATION_BUFFER);
|
||||
|
||||
TRACE("Deleted buffer object %u for texture %p, sub-resource %u.\n",
|
||||
- *buffer_object, texture, sub_resource_idx);
|
||||
-
|
||||
- wined3d_texture_invalidate_location(texture, sub_resource_idx, WINED3D_LOCATION_BUFFER);
|
||||
- *buffer_object = 0;
|
||||
+ name, texture, sub_resource_idx);
|
||||
}
|
||||
|
||||
static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
|
||||
@@ -376,7 +375,7 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
|
||||
&& !wined3d_texture_load_location(texture, i, context, map_binding))
|
||||
ERR("Failed to load location %s.\n", wined3d_debug_location(map_binding));
|
||||
if (texture->resource.map_binding == WINED3D_LOCATION_BUFFER)
|
||||
- wined3d_texture_remove_buffer_object(texture, i, context->gl_info);
|
||||
+ wined3d_texture_remove_buffer_object(texture, i, context);
|
||||
}
|
||||
|
||||
if (context)
|
||||
@@ -719,17 +718,17 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
const struct wined3d_gl_info *gl_info = NULL;
|
||||
struct wined3d_context *context = NULL;
|
||||
struct wined3d_dc_info *dc_info;
|
||||
- GLuint buffer_object;
|
||||
+ struct wined3d_gl_bo *buffer;
|
||||
unsigned int i;
|
||||
|
||||
TRACE("texture %p.\n", texture);
|
||||
|
||||
for (i = 0; i < sub_count; ++i)
|
||||
{
|
||||
- if (!(buffer_object = texture->sub_resources[i].buffer_object))
|
||||
+ if (!(buffer = texture->sub_resources[i].buffer))
|
||||
continue;
|
||||
|
||||
- TRACE("Deleting buffer object %u.\n", buffer_object);
|
||||
+ TRACE("Deleting buffer object %u.\n", buffer->name);
|
||||
|
||||
/* We may not be able to get a context in wined3d_texture_cleanup() in
|
||||
* general, but if a buffer object was previously created we can. */
|
||||
@@ -739,7 +738,8 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
gl_info = context->gl_info;
|
||||
}
|
||||
|
||||
- GL_EXTCALL(glDeleteBuffers(1, &buffer_object));
|
||||
+ wined3d_device_release_bo(device, buffer, context);
|
||||
+ texture->sub_resources[i].buffer = NULL;
|
||||
}
|
||||
|
||||
if (!context && !list_empty(&texture->renderbuffers))
|
||||
@@ -1545,22 +1545,19 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *texture,
|
||||
- unsigned int sub_resource_idx, const struct wined3d_gl_info *gl_info)
|
||||
+ unsigned int sub_resource_idx, struct wined3d_context *context)
|
||||
{
|
||||
struct wined3d_texture_sub_resource *sub_resource;
|
||||
|
||||
sub_resource = &texture->sub_resources[sub_resource_idx];
|
||||
- if (sub_resource->buffer_object)
|
||||
+ if (sub_resource->buffer)
|
||||
return;
|
||||
|
||||
- GL_EXTCALL(glGenBuffers(1, &sub_resource->buffer_object));
|
||||
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, sub_resource->buffer_object));
|
||||
- GL_EXTCALL(glBufferData(GL_PIXEL_UNPACK_BUFFER, sub_resource->size, NULL, GL_STREAM_DRAW));
|
||||
- GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0));
|
||||
- checkGLcall("Create buffer object");
|
||||
+ sub_resource->buffer = wined3d_device_get_bo(texture->resource.device,
|
||||
+ sub_resource->size, GL_STREAM_DRAW, GL_PIXEL_UNPACK_BUFFER, context);
|
||||
|
||||
TRACE("Created buffer object %u for texture %p, sub-resource %u.\n",
|
||||
- sub_resource->buffer_object, texture, sub_resource_idx);
|
||||
+ sub_resource->buffer->name, texture, sub_resource_idx);
|
||||
}
|
||||
|
||||
static void wined3d_texture_force_reload(struct wined3d_texture *texture)
|
||||
@@ -1695,7 +1692,7 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
return TRUE;
|
||||
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
- wined3d_texture_prepare_buffer_object(texture, sub_resource_idx, context->gl_info);
|
||||
+ wined3d_texture_prepare_buffer_object(texture, sub_resource_idx, context);
|
||||
return TRUE;
|
||||
|
||||
case WINED3D_LOCATION_TEXTURE_RGB:
|
||||
@@ -2073,8 +2070,8 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
wined3d_texture_invalidate_location(texture, i, ~WINED3D_LOCATION_DISCARDED);
|
||||
}
|
||||
|
||||
- if (sub_resource->buffer_object)
|
||||
- wined3d_texture_remove_buffer_object(texture, i, context->gl_info);
|
||||
+ if (sub_resource->buffer)
|
||||
+ wined3d_texture_remove_buffer_object(texture, i, context);
|
||||
}
|
||||
|
||||
LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &texture->renderbuffers, struct wined3d_renderbuffer_entry, entry)
|
||||
@@ -2372,7 +2369,7 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
}
|
||||
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
- struct wined3d_const_bo_address data = {sub_resource->buffer_object, NULL};
|
||||
+ struct wined3d_const_bo_address data = {sub_resource->buffer->name, NULL};
|
||||
struct wined3d_box src_box;
|
||||
|
||||
wined3d_texture_bind_and_dirtify(texture, context,
|
||||
@@ -2414,7 +2411,7 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
{
|
||||
- struct wined3d_bo_address data = {sub_resource->buffer_object, NULL};
|
||||
+ struct wined3d_bo_address data = {sub_resource->buffer->name, NULL};
|
||||
|
||||
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
@@ -2871,7 +2868,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
}
|
||||
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
- struct wined3d_const_bo_address data = {sub_resource->buffer_object, NULL};
|
||||
+ struct wined3d_const_bo_address data = {sub_resource->buffer->name, NULL};
|
||||
struct wined3d_box src_box;
|
||||
|
||||
wined3d_texture_bind_and_dirtify(texture, context,
|
||||
@@ -2921,7 +2918,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
{
|
||||
- struct wined3d_bo_address data = {sub_resource->buffer_object, NULL};
|
||||
+ struct wined3d_bo_address data = {sub_resource->buffer->name, NULL};
|
||||
|
||||
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index e98a100..af58836 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2896,6 +2896,14 @@ struct wined3d_dummy_textures
|
||||
GLuint tex_2d_ms_array;
|
||||
};
|
||||
|
||||
+struct wined3d_gl_bo
|
||||
+{
|
||||
+ GLuint name;
|
||||
+ GLenum usage;
|
||||
+ GLenum type_hint;
|
||||
+ UINT size;
|
||||
+};
|
||||
+
|
||||
#define WINED3D_UNMAPPED_STAGE ~0u
|
||||
|
||||
/* Multithreaded flag. Removed from the public header to signal that
|
||||
@@ -2995,6 +3003,10 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
+struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT size, GLenum gl_usage,
|
||||
+ GLenum type_hint, struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
+void wined3d_device_release_bo(struct wined3d_device *device, struct wined3d_gl_bo *bo,
|
||||
+ const struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -3194,7 +3206,7 @@ struct wined3d_texture
|
||||
|
||||
unsigned int map_count;
|
||||
DWORD locations;
|
||||
- GLuint buffer_object;
|
||||
+ struct wined3d_gl_bo *buffer;
|
||||
} sub_resources[1];
|
||||
};
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 9567ce39176fd1299f204ecc7a5254cbbe6b5484 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
|
||||
Date: Thu, 4 Jul 2013 23:50:20 +0200
|
||||
Subject: [PATCH] wined3d: Don't call glFinish before swapping
|
||||
|
||||
The code is probably not ready yet, so delay this patch until everything
|
||||
is CSified. Right now I need it for performance testing.
|
||||
---
|
||||
dlls/wined3d/swapchain.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
index 26cd61e..610cc28 100644
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -475,7 +475,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain,
|
||||
if (swapchain->render_to_fbo)
|
||||
swapchain_blit(swapchain, context, src_rect, dst_rect);
|
||||
|
||||
- if (swapchain->num_contexts > 1)
|
||||
+ if (swapchain->num_contexts > 1 && !wined3d_settings.cs_multithreaded)
|
||||
gl_info->gl_ops.gl.p_glFinish();
|
||||
|
||||
/* call wglSwapBuffers through the gl table to avoid confusing the Steam overlay */
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,625 +0,0 @@
|
||||
From: Wine Staging Team <webmaster@fds-team.de>
|
||||
Subject: Autogenerated #ifdef patch for wined3d-CSMT_Main.
|
||||
|
||||
Based on patches by:
|
||||
Michael Müller <michael@fds-team.de>
|
||||
Sebastian Lackner <sebastian@fds-team.de>
|
||||
Stefan Dösinger <stefan@codeweavers.com>
|
||||
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -406,6 +406,9 @@ struct wined3d_cs_update_sub_resource
|
||||
unsigned int sub_resource_idx;
|
||||
struct wined3d_box box;
|
||||
struct wined3d_sub_resource_data data;
|
||||
+#if defined(STAGING_CSMT)
|
||||
+ BYTE copy_data[1];
|
||||
+#endif /* STAGING_CSMT */
|
||||
};
|
||||
|
||||
struct wined3d_cs_add_dirty_texture_region
|
||||
@@ -2238,6 +2241,53 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
unsigned int slice_pitch)
|
||||
{
|
||||
struct wined3d_cs_update_sub_resource *op;
|
||||
+#if defined(STAGING_CSMT)
|
||||
+ size_t data_size, size;
|
||||
+
|
||||
+ if (resource->type != WINED3D_RTYPE_BUFFER && resource->format_flags & WINED3DFMT_FLAG_BLOCKS)
|
||||
+ goto no_async;
|
||||
+
|
||||
+ data_size = 0;
|
||||
+ switch (resource->type)
|
||||
+ {
|
||||
+ case WINED3D_RTYPE_TEXTURE_3D:
|
||||
+ data_size += (box->back - box->front - 1) * slice_pitch;
|
||||
+ /* fall-through */
|
||||
+ case WINED3D_RTYPE_TEXTURE_2D:
|
||||
+ data_size += (box->bottom - box->top - 1) * row_pitch;
|
||||
+ /* fall-through */
|
||||
+ case WINED3D_RTYPE_TEXTURE_1D:
|
||||
+ data_size += (box->right - box->left) * resource->format->byte_count;
|
||||
+ break;
|
||||
+ case WINED3D_RTYPE_BUFFER:
|
||||
+ data_size = box->right - box->left;
|
||||
+ break;
|
||||
+ case WINED3D_RTYPE_NONE:
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ size = FIELD_OFFSET(struct wined3d_cs_update_sub_resource, copy_data[data_size]);
|
||||
+ if (!cs->ops->check_space(cs, size, WINED3D_CS_QUEUE_DEFAULT))
|
||||
+ goto no_async;
|
||||
+
|
||||
+ op = cs->ops->require_space(cs, size, WINED3D_CS_QUEUE_DEFAULT);
|
||||
+ op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE;
|
||||
+ op->resource = resource;
|
||||
+ op->sub_resource_idx = sub_resource_idx;
|
||||
+ op->box = *box;
|
||||
+ op->data.row_pitch = row_pitch;
|
||||
+ op->data.slice_pitch = slice_pitch;
|
||||
+ op->data.data = op->copy_data;
|
||||
+ memcpy(op->copy_data, data, data_size);
|
||||
+
|
||||
+ wined3d_resource_acquire(resource);
|
||||
+
|
||||
+ cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
|
||||
+ return;
|
||||
+
|
||||
+no_async:
|
||||
+ wined3d_resource_wait_idle(resource);
|
||||
+#endif /* STAGING_CSMT */
|
||||
|
||||
op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP);
|
||||
op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE;
|
||||
@@ -2251,8 +2301,10 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
|
||||
wined3d_resource_acquire(resource);
|
||||
|
||||
cs->ops->submit(cs, WINED3D_CS_QUEUE_MAP);
|
||||
+#if !defined(STAGING_CSMT)
|
||||
/* The data pointer may go away, so we need to wait until it is read.
|
||||
* Copying the data may be faster if it's small. */
|
||||
+#endif /* STAGING_CSMT */
|
||||
cs->ops->finish(cs, WINED3D_CS_QUEUE_MAP);
|
||||
}
|
||||
|
||||
@@ -2435,6 +2487,13 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
|
||||
/* WINED3D_CS_OP_GENERATE_MIPMAPS */ wined3d_cs_exec_generate_mipmaps,
|
||||
};
|
||||
|
||||
+#if defined(STAGING_CSMT)
|
||||
+static BOOL wined3d_cs_st_check_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
|
||||
+{
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+#endif /* STAGING_CSMT */
|
||||
static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
|
||||
{
|
||||
if (size > (cs->data_size - cs->end))
|
||||
@@ -2488,6 +2547,9 @@ static void wined3d_cs_st_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
|
||||
|
||||
static const struct wined3d_cs_ops wined3d_cs_st_ops =
|
||||
{
|
||||
+#if defined(STAGING_CSMT)
|
||||
+ wined3d_cs_st_check_space,
|
||||
+#endif /* STAGING_CSMT */
|
||||
wined3d_cs_st_require_space,
|
||||
wined3d_cs_st_submit,
|
||||
wined3d_cs_st_finish,
|
||||
@@ -2521,6 +2583,21 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs, enum wined3d_cs_queue_id
|
||||
wined3d_cs_queue_submit(&cs->queue[queue_id], cs);
|
||||
}
|
||||
|
||||
+#if defined(STAGING_CSMT)
|
||||
+static BOOL wined3d_cs_queue_check_space(struct wined3d_cs_queue *queue, size_t size)
|
||||
+{
|
||||
+ size_t queue_size = ARRAY_SIZE(queue->data);
|
||||
+ size_t header_size, packet_size, remaining;
|
||||
+
|
||||
+ header_size = FIELD_OFFSET(struct wined3d_cs_packet, data[0]);
|
||||
+ size = (size + header_size - 1) & ~(header_size - 1);
|
||||
+ packet_size = FIELD_OFFSET(struct wined3d_cs_packet, data[size]);
|
||||
+
|
||||
+ remaining = queue_size - queue->head;
|
||||
+ return (remaining >= packet_size);
|
||||
+}
|
||||
+
|
||||
+#endif /* STAGING_CSMT */
|
||||
static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size_t size, struct wined3d_cs *cs)
|
||||
{
|
||||
size_t queue_size = ARRAY_SIZE(queue->data);
|
||||
@@ -2582,6 +2659,16 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size
|
||||
return packet->data;
|
||||
}
|
||||
|
||||
+#if defined(STAGING_CSMT)
|
||||
+static BOOL wined3d_cs_mt_check_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
|
||||
+{
|
||||
+ if (cs->thread_id == GetCurrentThreadId())
|
||||
+ return wined3d_cs_st_check_space(cs, size, queue_id);
|
||||
+
|
||||
+ return wined3d_cs_queue_check_space(&cs->queue[queue_id], size);
|
||||
+}
|
||||
+
|
||||
+#endif /* STAGING_CSMT */
|
||||
static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id)
|
||||
{
|
||||
if (cs->thread_id == GetCurrentThreadId())
|
||||
@@ -2601,6 +2688,9 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
|
||||
|
||||
static const struct wined3d_cs_ops wined3d_cs_mt_ops =
|
||||
{
|
||||
+#if defined(STAGING_CSMT)
|
||||
+ wined3d_cs_mt_check_space,
|
||||
+#endif /* STAGING_CSMT */
|
||||
wined3d_cs_mt_require_space,
|
||||
wined3d_cs_mt_submit,
|
||||
wined3d_cs_mt_finish,
|
||||
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
|
||||
--- a/dlls/wined3d/device.c
|
||||
+++ b/dlls/wined3d/device.c
|
||||
@@ -1219,6 +1219,9 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
||||
|
||||
wine_rb_clear(&device->samplers, device_free_sampler, NULL);
|
||||
|
||||
+#if defined(STAGING_CSMT)
|
||||
+ context_set_current(NULL);
|
||||
+#endif /* STAGING_CSMT */
|
||||
wined3d_device_delete_opengl_contexts(device);
|
||||
|
||||
if (device->fb.depth_stencil)
|
||||
@@ -4212,6 +4215,7 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
if (dst_texture->sub_resources[dst_sub_resource_idx].map_count)
|
||||
{
|
||||
WARN("Destination sub-resource %u is mapped.\n", dst_sub_resource_idx);
|
||||
@@ -4222,6 +4226,19 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev
|
||||
{
|
||||
WARN("Source sub-resource %u is mapped.\n", src_sub_resource_idx);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
+#else /* STAGING_CSMT */
|
||||
+ if (dst_texture->sub_resources[dst_sub_resource_idx].map_count ||
|
||||
+ src_texture->sub_resources[src_sub_resource_idx].map_count)
|
||||
+ {
|
||||
+ struct wined3d_device *device = dst_texture->resource.device;
|
||||
+ device->cs->ops->finish(device->cs, WINED3D_CS_QUEUE_DEFAULT);
|
||||
+ if (dst_texture->sub_resources[dst_sub_resource_idx].map_count ||
|
||||
+ src_texture->sub_resources[src_sub_resource_idx].map_count)
|
||||
+ {
|
||||
+ WARN("Destination or source sub-resource is mapped.\n");
|
||||
+ return WINEDDERR_SURFACEBUSY;
|
||||
+ }
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
if (!src_box)
|
||||
@@ -4314,8 +4331,10 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str
|
||||
return;
|
||||
}
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
wined3d_resource_wait_idle(resource);
|
||||
|
||||
+#endif /* STAGING_CSMT */
|
||||
wined3d_cs_emit_update_sub_resource(device->cs, resource, sub_resource_idx, box, data, row_pitch, depth_pitch);
|
||||
}
|
||||
|
||||
@@ -5306,3 +5325,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
else
|
||||
return CallWindowProcA(proc, window, message, wparam, lparam);
|
||||
}
|
||||
+#if defined(STAGING_CSMT)
|
||||
+
|
||||
+/* Context activation is done by the caller */
|
||||
+struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT size, GLenum gl_usage,
|
||||
+ GLenum type_hint, struct wined3d_context *context)
|
||||
+{
|
||||
+ struct wined3d_gl_bo *ret;
|
||||
+ const struct wined3d_gl_info *gl_info;
|
||||
+
|
||||
+ TRACE("device %p, size %u, gl_usage %u, type_hint %u\n", device, size, gl_usage,
|
||||
+ type_hint);
|
||||
+
|
||||
+ ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ret));
|
||||
+ if(!ret)
|
||||
+ return NULL;
|
||||
+ ret->type_hint = type_hint;
|
||||
+ ret->size = size;
|
||||
+ ret->usage = gl_usage;
|
||||
+
|
||||
+ gl_info = context->gl_info;
|
||||
+
|
||||
+ GL_EXTCALL(glGenBuffers(1, &ret->name));
|
||||
+ if (type_hint == GL_ELEMENT_ARRAY_BUFFER)
|
||||
+ context_invalidate_state(context, STATE_INDEXBUFFER);
|
||||
+ GL_EXTCALL(glBindBuffer(type_hint, ret->name));
|
||||
+ GL_EXTCALL(glBufferData(type_hint, size, NULL, gl_usage));
|
||||
+ GL_EXTCALL(glBindBuffer(type_hint, 0));
|
||||
+ checkGLcall("Create buffer object");
|
||||
+
|
||||
+ TRACE("Successfully created and set up buffer %u\n", ret->name);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+/* Context activation is done by the caller */
|
||||
+static void wined3d_device_destroy_bo(struct wined3d_device *device, const struct wined3d_context *context,
|
||||
+ struct wined3d_gl_bo *bo)
|
||||
+{
|
||||
+ const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
+ TRACE("device %p, bo %p, GL bo %u\n", device, bo, bo->name);
|
||||
+
|
||||
+ GL_EXTCALL(glDeleteBuffers(1, &bo->name));
|
||||
+ checkGLcall("glDeleteBuffers");
|
||||
+
|
||||
+ HeapFree(GetProcessHeap(), 0, bo);
|
||||
+}
|
||||
+
|
||||
+/* Context activation is done by the caller */
|
||||
+void wined3d_device_release_bo(struct wined3d_device *device, struct wined3d_gl_bo *bo,
|
||||
+ const struct wined3d_context *context)
|
||||
+{
|
||||
+ TRACE("device %p, bo %p, GL bo %u\n", device, bo, bo->name);
|
||||
+
|
||||
+ wined3d_device_destroy_bo(device, context, bo);
|
||||
+}
|
||||
+#endif /* STAGING_CSMT */
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -2232,7 +2232,11 @@ BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_re
|
||||
/* Don't use PBOs for converted surfaces. During PBO conversion we look at
|
||||
* WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is
|
||||
* getting called. */
|
||||
+#if !defined(STAGING_CSMT)
|
||||
if (conversion && sub_resource->buffer_object)
|
||||
+#else /* STAGING_CSMT */
|
||||
+ if (conversion && sub_resource->buffer)
|
||||
+#endif /* STAGING_CSMT */
|
||||
{
|
||||
TRACE("Removing the pbo attached to texture %p, %u.\n", texture, sub_resource_idx);
|
||||
|
||||
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
|
||||
--- a/dlls/wined3d/swapchain.c
|
||||
+++ b/dlls/wined3d/swapchain.c
|
||||
@@ -472,7 +472,11 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain,
|
||||
if (swapchain->render_to_fbo)
|
||||
swapchain_blit(swapchain, context, src_rect, dst_rect);
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
if (swapchain->num_contexts > 1)
|
||||
+#else /* STAGING_CSMT */
|
||||
+ if (swapchain->num_contexts > 1 && !wined3d_settings.cs_multithreaded)
|
||||
+#endif /* STAGING_CSMT */
|
||||
gl_info->gl_ops.gl.p_glFinish();
|
||||
|
||||
/* call wglSwapBuffers through the gl table to avoid confusing the Steam overlay */
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -321,7 +321,11 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
|
||||
if (locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
data->addr = NULL;
|
||||
+#if !defined(STAGING_CSMT)
|
||||
data->buffer_object = sub_resource->buffer_object;
|
||||
+#else /* STAGING_CSMT */
|
||||
+ data->buffer_object = sub_resource->buffer->name;
|
||||
+#endif /* STAGING_CSMT */
|
||||
return;
|
||||
}
|
||||
if (locations & WINED3D_LOCATION_USER_MEMORY)
|
||||
@@ -345,6 +349,7 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture,
|
||||
+#if !defined(STAGING_CSMT)
|
||||
unsigned int sub_resource_idx, const struct wined3d_gl_info *gl_info)
|
||||
{
|
||||
GLuint *buffer_object = &texture->sub_resources[sub_resource_idx].buffer_object;
|
||||
@@ -357,6 +362,19 @@ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture
|
||||
|
||||
wined3d_texture_invalidate_location(texture, sub_resource_idx, WINED3D_LOCATION_BUFFER);
|
||||
*buffer_object = 0;
|
||||
+#else /* STAGING_CSMT */
|
||||
+ unsigned int sub_resource_idx, struct wined3d_context *context)
|
||||
+{
|
||||
+ struct wined3d_gl_bo *buffer = texture->sub_resources[sub_resource_idx].buffer;
|
||||
+ GLuint name = buffer->name;
|
||||
+
|
||||
+ wined3d_device_release_bo(texture->resource.device, buffer, context);
|
||||
+ texture->sub_resources[sub_resource_idx].buffer = NULL;
|
||||
+ wined3d_texture_invalidate_location(texture, sub_resource_idx, WINED3D_LOCATION_BUFFER);
|
||||
+
|
||||
+ TRACE("Deleted buffer object %u for texture %p, sub-resource %u.\n",
|
||||
+ name, texture, sub_resource_idx);
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
|
||||
@@ -376,7 +394,11 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
|
||||
&& !wined3d_texture_load_location(texture, i, context, map_binding))
|
||||
ERR("Failed to load location %s.\n", wined3d_debug_location(map_binding));
|
||||
if (texture->resource.map_binding == WINED3D_LOCATION_BUFFER)
|
||||
+#if !defined(STAGING_CSMT)
|
||||
wined3d_texture_remove_buffer_object(texture, i, context->gl_info);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ wined3d_texture_remove_buffer_object(texture, i, context);
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
if (context)
|
||||
@@ -719,17 +741,28 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
const struct wined3d_gl_info *gl_info = NULL;
|
||||
struct wined3d_context *context = NULL;
|
||||
struct wined3d_dc_info *dc_info;
|
||||
+#if !defined(STAGING_CSMT)
|
||||
GLuint buffer_object;
|
||||
+#else /* STAGING_CSMT */
|
||||
+ struct wined3d_gl_bo *buffer;
|
||||
+#endif /* STAGING_CSMT */
|
||||
unsigned int i;
|
||||
|
||||
TRACE("texture %p.\n", texture);
|
||||
|
||||
for (i = 0; i < sub_count; ++i)
|
||||
{
|
||||
+#if !defined(STAGING_CSMT)
|
||||
if (!(buffer_object = texture->sub_resources[i].buffer_object))
|
||||
continue;
|
||||
|
||||
TRACE("Deleting buffer object %u.\n", buffer_object);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ if (!(buffer = texture->sub_resources[i].buffer))
|
||||
+ continue;
|
||||
+
|
||||
+ TRACE("Deleting buffer object %u.\n", buffer->name);
|
||||
+#endif /* STAGING_CSMT */
|
||||
|
||||
/* We may not be able to get a context in wined3d_texture_cleanup() in
|
||||
* general, but if a buffer object was previously created we can. */
|
||||
@@ -739,7 +772,12 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
|
||||
gl_info = context->gl_info;
|
||||
}
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
GL_EXTCALL(glDeleteBuffers(1, &buffer_object));
|
||||
+#else /* STAGING_CSMT */
|
||||
+ wined3d_device_release_bo(device, buffer, context);
|
||||
+ texture->sub_resources[i].buffer = NULL;
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
if (!context && !list_empty(&texture->renderbuffers))
|
||||
@@ -1545,11 +1583,16 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *texture,
|
||||
+#if !defined(STAGING_CSMT)
|
||||
unsigned int sub_resource_idx, const struct wined3d_gl_info *gl_info)
|
||||
+#else /* STAGING_CSMT */
|
||||
+ unsigned int sub_resource_idx, struct wined3d_context *context)
|
||||
+#endif /* STAGING_CSMT */
|
||||
{
|
||||
struct wined3d_texture_sub_resource *sub_resource;
|
||||
|
||||
sub_resource = &texture->sub_resources[sub_resource_idx];
|
||||
+#if !defined(STAGING_CSMT)
|
||||
if (sub_resource->buffer_object)
|
||||
return;
|
||||
|
||||
@@ -1561,6 +1604,16 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur
|
||||
|
||||
TRACE("Created buffer object %u for texture %p, sub-resource %u.\n",
|
||||
sub_resource->buffer_object, texture, sub_resource_idx);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ if (sub_resource->buffer)
|
||||
+ return;
|
||||
+
|
||||
+ sub_resource->buffer = wined3d_device_get_bo(texture->resource.device,
|
||||
+ sub_resource->size, GL_STREAM_DRAW, GL_PIXEL_UNPACK_BUFFER, context);
|
||||
+
|
||||
+ TRACE("Created buffer object %u for texture %p, sub-resource %u.\n",
|
||||
+ sub_resource->buffer->name, texture, sub_resource_idx);
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
static void wined3d_texture_force_reload(struct wined3d_texture *texture)
|
||||
@@ -1695,7 +1748,11 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
|
||||
return TRUE;
|
||||
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
+#if !defined(STAGING_CSMT)
|
||||
wined3d_texture_prepare_buffer_object(texture, sub_resource_idx, context->gl_info);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ wined3d_texture_prepare_buffer_object(texture, sub_resource_idx, context);
|
||||
+#endif /* STAGING_CSMT */
|
||||
return TRUE;
|
||||
|
||||
case WINED3D_LOCATION_TEXTURE_RGB:
|
||||
@@ -2073,8 +2130,13 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
|
||||
wined3d_texture_invalidate_location(texture, i, ~WINED3D_LOCATION_DISCARDED);
|
||||
}
|
||||
|
||||
+#if !defined(STAGING_CSMT)
|
||||
if (sub_resource->buffer_object)
|
||||
wined3d_texture_remove_buffer_object(texture, i, context->gl_info);
|
||||
+#else /* STAGING_CSMT */
|
||||
+ if (sub_resource->buffer)
|
||||
+ wined3d_texture_remove_buffer_object(texture, i, context);
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &texture->renderbuffers, struct wined3d_renderbuffer_entry, entry)
|
||||
@@ -2372,7 +2434,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
}
|
||||
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
+#if !defined(STAGING_CSMT)
|
||||
struct wined3d_const_bo_address data = {sub_resource->buffer_object, NULL};
|
||||
+#else /* STAGING_CSMT */
|
||||
+ struct wined3d_const_bo_address data = {sub_resource->buffer->name, NULL};
|
||||
+#endif /* STAGING_CSMT */
|
||||
struct wined3d_box src_box;
|
||||
|
||||
wined3d_texture_bind_and_dirtify(texture, context,
|
||||
@@ -2414,7 +2480,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
{
|
||||
+#if !defined(STAGING_CSMT)
|
||||
struct wined3d_bo_address data = {sub_resource->buffer_object, NULL};
|
||||
+#else /* STAGING_CSMT */
|
||||
+ struct wined3d_bo_address data = {sub_resource->buffer->name, NULL};
|
||||
+#endif /* STAGING_CSMT */
|
||||
|
||||
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
@@ -2871,7 +2941,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
}
|
||||
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
|
||||
{
|
||||
+#if !defined(STAGING_CSMT)
|
||||
struct wined3d_const_bo_address data = {sub_resource->buffer_object, NULL};
|
||||
+#else /* STAGING_CSMT */
|
||||
+ struct wined3d_const_bo_address data = {sub_resource->buffer->name, NULL};
|
||||
+#endif /* STAGING_CSMT */
|
||||
struct wined3d_box src_box;
|
||||
|
||||
wined3d_texture_bind_and_dirtify(texture, context,
|
||||
@@ -2921,7 +2995,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
{
|
||||
+#if !defined(STAGING_CSMT)
|
||||
struct wined3d_bo_address data = {sub_resource->buffer_object, NULL};
|
||||
+#else /* STAGING_CSMT */
|
||||
+ struct wined3d_bo_address data = {sub_resource->buffer->name, NULL};
|
||||
+#endif /* STAGING_CSMT */
|
||||
|
||||
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
|
||||
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
|
||||
@@ -2987,8 +3065,19 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
|
||||
if (dst_texture->sub_resources[dst_sub_resource_idx].map_count
|
||||
|| src_texture->sub_resources[src_sub_resource_idx].map_count)
|
||||
{
|
||||
+#if !defined(STAGING_CSMT)
|
||||
WARN("Sub-resource is busy, returning WINEDDERR_SURFACEBUSY.\n");
|
||||
return WINEDDERR_SURFACEBUSY;
|
||||
+#else /* STAGING_CSMT */
|
||||
+ struct wined3d_device *device = dst_texture->resource.device;
|
||||
+ device->cs->ops->finish(device->cs, WINED3D_CS_QUEUE_DEFAULT);
|
||||
+ if (dst_texture->sub_resources[dst_sub_resource_idx].map_count
|
||||
+ || (src_texture && src_texture->sub_resources[src_sub_resource_idx].map_count))
|
||||
+ {
|
||||
+ WARN("Sub-resource is busy, returning WINEDDERR_SURFACEBUSY.\n");
|
||||
+ return WINEDDERR_SURFACEBUSY;
|
||||
+ }
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
if ((src_format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
|
||||
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
|
||||
--- a/dlls/wined3d/view.c
|
||||
+++ b/dlls/wined3d/view.c
|
||||
@@ -750,6 +750,10 @@ static void wined3d_shader_resource_view_cs_init(void *object)
|
||||
debug_d3dformat(resource->format->id), debug_d3dformat(view_format->id));
|
||||
}
|
||||
}
|
||||
+#if defined(STAGING_CSMT)
|
||||
+
|
||||
+ wined3d_resource_release(resource);
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_view *view,
|
||||
@@ -766,6 +770,9 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_
|
||||
|
||||
wined3d_resource_incref(view->resource = resource);
|
||||
|
||||
+#if defined(STAGING_CSMT)
|
||||
+ wined3d_resource_acquire(resource);
|
||||
+#endif /* STAGING_CSMT */
|
||||
wined3d_cs_init_object(resource->device->cs, wined3d_shader_resource_view_cs_init, view);
|
||||
|
||||
return WINED3D_OK;
|
||||
@@ -1118,6 +1125,10 @@ static void wined3d_unordered_access_view_cs_init(void *object)
|
||||
desc, texture, view->format);
|
||||
}
|
||||
}
|
||||
+#if defined(STAGING_CSMT)
|
||||
+
|
||||
+ wined3d_resource_release(resource);
|
||||
+#endif /* STAGING_CSMT */
|
||||
}
|
||||
|
||||
static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_access_view *view,
|
||||
@@ -1134,6 +1145,9 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces
|
||||
|
||||
wined3d_resource_incref(view->resource = resource);
|
||||
|
||||
+#if defined(STAGING_CSMT)
|
||||
+ wined3d_resource_acquire(resource);
|
||||
+#endif /* STAGING_CSMT */
|
||||
wined3d_cs_init_object(resource->device->cs, wined3d_unordered_access_view_cs_init, view);
|
||||
|
||||
return WINED3D_OK;
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -2896,6 +2896,16 @@ struct wined3d_dummy_textures
|
||||
GLuint tex_2d_ms_array;
|
||||
};
|
||||
|
||||
+#if defined(STAGING_CSMT)
|
||||
+struct wined3d_gl_bo
|
||||
+{
|
||||
+ GLuint name;
|
||||
+ GLenum usage;
|
||||
+ GLenum type_hint;
|
||||
+ UINT size;
|
||||
+};
|
||||
+
|
||||
+#endif /* STAGING_CSMT */
|
||||
#define WINED3D_UNMAPPED_STAGE ~0u
|
||||
|
||||
/* Multithreaded flag. Removed from the public header to signal that
|
||||
@@ -2995,6 +3005,12 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL
|
||||
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN;
|
||||
void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN;
|
||||
+#if defined(STAGING_CSMT)
|
||||
+struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT size, GLenum gl_usage,
|
||||
+ GLenum type_hint, struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
+void wined3d_device_release_bo(struct wined3d_device *device, struct wined3d_gl_bo *bo,
|
||||
+ const struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
+#endif /* STAGING_CSMT */
|
||||
|
||||
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
|
||||
{
|
||||
@@ -3194,7 +3210,11 @@ struct wined3d_texture
|
||||
|
||||
unsigned int map_count;
|
||||
DWORD locations;
|
||||
+#if !defined(STAGING_CSMT)
|
||||
GLuint buffer_object;
|
||||
+#else /* STAGING_CSMT */
|
||||
+ struct wined3d_gl_bo *buffer;
|
||||
+#endif /* STAGING_CSMT */
|
||||
} sub_resources[1];
|
||||
};
|
||||
|
||||
@@ -3509,6 +3529,9 @@ struct wined3d_cs_queue
|
||||
|
||||
struct wined3d_cs_ops
|
||||
{
|
||||
+#if defined(STAGING_CSMT)
|
||||
+ BOOL (*check_space)(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id);
|
||||
+#endif /* STAGING_CSMT */
|
||||
void *(*require_space)(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id);
|
||||
void (*submit)(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id);
|
||||
void (*finish)(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id);
|
@ -1,10 +1,10 @@
|
||||
# based on https://github.com/stefand/wine
|
||||
# sha1: 7309d0b07294bbceac28162201690b2132cc70fc
|
||||
|
||||
Fixes: [11674] Support for CSMT (command stream) to increase graphic performance
|
||||
Apply-After: dlls/wined3d/*
|
||||
Depends: wined3d-CSMT_Helper
|
||||
IfDefined: STAGING_CSMT
|
||||
|
||||
# Known issues:
|
||||
# https://bugs.wine-staging.com/buglist.cgi?component=Bugs&keywords=csmt%2C%20&keywords_type=allwords&list_id=3690&query_format=advanced&resolution=---
|
||||
Depends: wined3d-Accounting
|
||||
Depends: wined3d-DXTn
|
||||
Depends: wined3d-QUERY_Stubs
|
||||
Depends: d3d11-ID3D11Texture1D_Rebased
|
||||
Depends: wined3d-Silence_FIXMEs
|
||||
Depends: wined3d-UAV_Counters
|
||||
Depends: wined3d-Dual_Source_Blending
|
||||
Depends: d3d9-Tests
|
||||
Depends: d3d11-Deferred_Context
|
||||
Depends: ntdll-DllRedirects
|
||||
|
@ -1,80 +0,0 @@
|
||||
From e9287323cc0cb911c4cfae5410d1f8e3e44eeb99 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 9 Jul 2017 17:04:05 +0200
|
||||
Subject: wined3d: Use OpenGL core context for D3D10/11 when necessary.
|
||||
|
||||
---
|
||||
dlls/dxgi/factory.c | 2 +-
|
||||
dlls/wined3d/directx.c | 23 +++++++++++++++++++++++
|
||||
include/wine/wined3d.h | 1 +
|
||||
3 files changed, 25 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/dxgi/factory.c b/dlls/dxgi/factory.c
|
||||
index 7fc3279..cc6ba0d 100644
|
||||
--- a/dlls/dxgi/factory.c
|
||||
+++ b/dlls/dxgi/factory.c
|
||||
@@ -549,7 +549,7 @@ static HRESULT dxgi_factory_init(struct dxgi_factory *factory, BOOL extended)
|
||||
wined3d_private_store_init(&factory->private_store);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
- factory->wined3d = wined3d_create(0);
|
||||
+ factory->wined3d = wined3d_create(WINED3D_REQUEST_D3D10);
|
||||
wined3d_mutex_unlock();
|
||||
if (!factory->wined3d)
|
||||
{
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
index 93e4fc3..a2ea3f3 100644
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -6584,6 +6584,18 @@ static DWORD get_max_gl_version(const struct wined3d_gl_info *gl_info, DWORD fla
|
||||
return MAKEDWORD_VERSION(4, 4);
|
||||
}
|
||||
|
||||
+static BOOL has_extension(const char *list, const char *ext)
|
||||
+{
|
||||
+ size_t len = strlen(ext);
|
||||
+ while (list)
|
||||
+ {
|
||||
+ while (*list == ' ') list++;
|
||||
+ if (!strncmp(list, ext, len) && (!list[len] || list[len] == ' ')) return TRUE;
|
||||
+ list = strchr(list, ' ');
|
||||
+ }
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
static BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, UINT ordinal, DWORD wined3d_creation_flags)
|
||||
{
|
||||
static const DWORD supported_gl_versions[] =
|
||||
@@ -6642,6 +6654,17 @@ static BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, UINT ordinal,
|
||||
}
|
||||
|
||||
max_gl_version = get_max_gl_version(gl_info, wined3d_creation_flags);
|
||||
+
|
||||
+ if (wined3d_creation_flags & WINED3D_REQUEST_D3D10)
|
||||
+ {
|
||||
+ const char *gl_extensions = (const char *)gl_info->gl_ops.gl.p_glGetString(GL_EXTENSIONS);
|
||||
+ if (!has_extension(gl_extensions, "GL_ARB_compatibility"))
|
||||
+ {
|
||||
+ ERR_(winediag)("GL_ARB_compatibility not supported, requesting context with GL version 3.2.\n");
|
||||
+ max_gl_version = MAKEDWORD_VERSION(3, 2);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
for (i = 0; i < ARRAY_SIZE(supported_gl_versions); ++i)
|
||||
{
|
||||
if (supported_gl_versions[i] <= max_gl_version)
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index 8864965..f555d1d 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -1311,6 +1311,7 @@ enum wined3d_shader_byte_code_format
|
||||
#define WINED3D_NO_PRIMITIVE_RESTART 0x00000800
|
||||
#define WINED3D_LEGACY_CUBEMAP_FILTERING 0x00001000
|
||||
#define WINED3D_NORMALIZED_DEPTH_BIAS 0x00002000
|
||||
+#define WINED3D_REQUEST_D3D10 0x00004000
|
||||
|
||||
#define WINED3D_RESZ_CODE 0x7fa05000
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,2 +0,0 @@
|
||||
Fixes: Use OpenGL core context for D3D10/11 when necessary
|
||||
Depends: d3d11-Depth_Bias
|
@ -1,35 +0,0 @@
|
||||
From 27719db1f039616a553e64234ec887b5681ae3e1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 20 Mar 2016 22:34:03 +0100
|
||||
Subject: wined3d: Limit the vram memory to LONG_MAX only on 32 bit.
|
||||
|
||||
Unlike the author of the original patch pretends, this code also affects 64 bit
|
||||
versions of Windows. Windows XP 64 bit uses 5.2 as verison number and is in
|
||||
fact the default version used by Wine. This patch compiles the limitation only
|
||||
on 32 bit and therefore does not affect a default 64 bit wine prefix when using
|
||||
64 bit software.
|
||||
---
|
||||
dlls/wined3d/directx.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
|
||||
index f57f326..06f79ae 100644
|
||||
--- a/dlls/wined3d/directx.c
|
||||
+++ b/dlls/wined3d/directx.c
|
||||
@@ -1533,11 +1533,13 @@ static void init_driver_info(struct wined3d_driver_info *driver_info,
|
||||
* In order to avoid this application bug we limit the amount of video memory
|
||||
* to LONG_MAX for older Windows versions.
|
||||
*/
|
||||
+#ifdef __i386__
|
||||
if (driver_model < DRIVER_MODEL_NT6X && driver_info->vram_bytes > LONG_MAX)
|
||||
{
|
||||
TRACE("Limiting amount of video memory to %#lx bytes for OS version older than Vista.\n", LONG_MAX);
|
||||
driver_info->vram_bytes = LONG_MAX;
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* Try to obtain driver version information for the current Windows version. This fails in
|
||||
* some cases:
|
||||
--
|
||||
2.7.1
|
||||
|
@ -1,35 +0,0 @@
|
||||
From 82328a507f971e459e0a005b4f9975388a136ac3 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 1 Sep 2017 05:08:54 +0200
|
||||
Subject: Revert "wined3d: Drop the special case for "converted" surfaces in
|
||||
wined3d_surface_blt()."
|
||||
|
||||
This reverts commit 56128d18d4dfcd306beda6aacb69836938c1a2bf.
|
||||
---
|
||||
dlls/wined3d/surface.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
|
||||
index e90ef042323..aacdb07ad4a 100644
|
||||
--- a/dlls/wined3d/surface.c
|
||||
+++ b/dlls/wined3d/surface.c
|
||||
@@ -3778,6 +3778,16 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
|
||||
goto cpu;
|
||||
}
|
||||
|
||||
+ /* We want to avoid invalidating the sysmem location for converted
|
||||
+ * surfaces, since otherwise we'd have to convert the data back when
|
||||
+ * locking them. */
|
||||
+ if (dst_texture->flags & WINED3D_TEXTURE_CONVERTED || dst_texture->resource.format->conv_byte_count
|
||||
+ || wined3d_format_get_color_key_conversion(dst_texture, TRUE))
|
||||
+ {
|
||||
+ WARN_(d3d_perf)("Converted surface, using CPU blit.\n");
|
||||
+ goto cpu;
|
||||
+ }
|
||||
+
|
||||
if (flags & ~simple_blit)
|
||||
{
|
||||
WARN_(d3d_perf)("Using fallback for complex blit (%#x).\n", flags);
|
||||
--
|
||||
2.14.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [!43627] Revert patch which causes rendering issue in AoE2
|
@ -1,4 +1,4 @@
|
||||
From 2ff2aaf55df96d6dade866d11f273630a2fcbf90 Mon Sep 17 00:00:00 2001
|
||||
From 9e3fd02b6ba9494fd9433fef92cbf6cbcfb39ff6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 17 Aug 2017 19:29:30 +0200
|
||||
Subject: wined3d: Allow arbitrary viewports for d3d11.
|
||||
@ -112,7 +112,7 @@ index cdce669..644766c 100644
|
||||
if (!extended)
|
||||
flags |= WINED3D_VIDMEM_ACCOUNTING;
|
||||
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
|
||||
index 3cf9b76..d744a5c 100644
|
||||
index a9632de..fe3301e 100644
|
||||
--- a/dlls/ddraw/ddraw_private.h
|
||||
+++ b/dlls/ddraw/ddraw_private.h
|
||||
@@ -65,7 +65,7 @@ struct FvfToDecl
|
||||
@ -125,10 +125,10 @@ index 3cf9b76..d744a5c 100644
|
||||
enum ddraw_device_state
|
||||
{
|
||||
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
|
||||
index 9753186..486d22a 100644
|
||||
index f20507b..c234758 100644
|
||||
--- a/dlls/wined3d/state.c
|
||||
+++ b/dlls/wined3d/state.c
|
||||
@@ -4696,10 +4696,13 @@ static void get_viewport(struct wined3d_context *context, const struct wined3d_s
|
||||
@@ -4559,10 +4559,13 @@ static void get_viewport(struct wined3d_context *context, const struct wined3d_s
|
||||
|
||||
if (target)
|
||||
{
|
||||
@ -147,14 +147,14 @@ index 9753186..486d22a 100644
|
||||
|
||||
/*
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index f555d1d..2184a00 100644
|
||||
index 5921646..d4abb29 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -1312,6 +1312,7 @@ enum wined3d_shader_byte_code_format
|
||||
@@ -1314,6 +1314,7 @@ enum wined3d_shader_byte_code_format
|
||||
#define WINED3D_NO_PRIMITIVE_RESTART 0x00000800
|
||||
#define WINED3D_LEGACY_CUBEMAP_FILTERING 0x00001000
|
||||
#define WINED3D_NORMALIZED_DEPTH_BIAS 0x00002000
|
||||
#define WINED3D_REQUEST_D3D10 0x00004000
|
||||
+#define WINED3D_LIMIT_VIEWPORT 0x00008000
|
||||
+#define WINED3D_LIMIT_VIEWPORT 0x00004000
|
||||
|
||||
#define WINED3D_RESZ_CODE 0x7fa05000
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
Fixes: Allow arbitrary viewports for d3d11 in wined3d
|
||||
Depends: wined3d-Core_Context
|
||||
Depends: d3d11-Depth_Bias
|
||||
# For Overwatch; see https://www.winehq.org/pipermail/wine-devel/2016-November/115312.html
|
@ -1,27 +0,0 @@
|
||||
From 41dabd934d1afb8160622f13d95b83ef63beacd0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 4 Sep 2016 20:58:52 +0200
|
||||
Subject: wined3d: Add hack for WINED3DFMT_R24_UNORM_X8_TYPELESS.
|
||||
|
||||
---
|
||||
dlls/wined3d/utils.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
|
||||
index cf909de..d31b002 100644
|
||||
--- a/dlls/wined3d/utils.c
|
||||
+++ b/dlls/wined3d/utils.c
|
||||
@@ -1517,6 +1517,10 @@ static const struct wined3d_format_texture_info format_texture_info[] =
|
||||
GL_RGBA_INTEGER, GL_INT, 0,
|
||||
WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET,
|
||||
EXT_TEXTURE_INTEGER, NULL},
|
||||
+ {WINED3DFMT_R24_UNORM_X8_TYPELESS, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
+ GL_DEPTH_COMPONENT, GL_UNSIGNED_INT_24_8, 0,
|
||||
+ WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_DEPTH,
|
||||
+ ARB_DEPTH_TEXTURE, NULL},
|
||||
/* Vendor-specific formats */
|
||||
{WINED3DFMT_ATI1N, GL_COMPRESSED_RED_RGTC1, GL_COMPRESSED_RED_RGTC1, 0,
|
||||
GL_RED, GL_UNSIGNED_BYTE, 0,
|
||||
--
|
||||
2.9.0
|
||||
|
@ -1,66 +0,0 @@
|
||||
From a48ac71b79ca398816a306e1fb455a773de17e45 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 25 Jun 2017 04:13:57 +0200
|
||||
Subject: wined3d: Emulate sample_c_lz using textureGradOffset for
|
||||
sampler2DArrayShadow.
|
||||
|
||||
---
|
||||
dlls/wined3d/glsl_shader.c | 21 +++++++++++++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index b813cf3aaf8..82cca841475 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -91,6 +91,7 @@ struct glsl_sample_function
|
||||
enum wined3d_data_type data_type;
|
||||
BOOL output_single_component;
|
||||
unsigned int offset_size;
|
||||
+ BOOL emulate_lod;
|
||||
};
|
||||
|
||||
enum heap_node_op
|
||||
@@ -3439,6 +3440,18 @@ static void shader_glsl_get_sample_function(const struct wined3d_shader_context
|
||||
if (resource_type == WINED3D_SHADER_RESOURCE_TEXTURE_CUBE)
|
||||
projected = FALSE;
|
||||
|
||||
+ /* emulate textureLod(sampler2DArrayShadow, ...) using textureGradOffset */
|
||||
+ if (shadow && lod && resource_type == WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY)
|
||||
+ {
|
||||
+ sample_function->emulate_lod = TRUE;
|
||||
+ grad = offset = TRUE;
|
||||
+ lod = FALSE;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ sample_function->emulate_lod = FALSE;
|
||||
+ }
|
||||
+
|
||||
if (needs_legacy_glsl_syntax(gl_info))
|
||||
{
|
||||
if (shadow)
|
||||
@@ -3600,6 +3613,7 @@ static void PRINTF_ATTR(9, 10) shader_glsl_gen_sample_code(const struct wined3d_
|
||||
const char *dx, const char *dy, const char *bias, const struct wined3d_shader_texel_offset *offset,
|
||||
const char *coord_reg_fmt, ...)
|
||||
{
|
||||
+ static const struct wined3d_shader_texel_offset dummy_offset = {0, 0, 0};
|
||||
const struct wined3d_shader_version *version = &ins->ctx->reg_maps->shader_version;
|
||||
char dst_swizzle[6];
|
||||
struct color_fixup_desc fixup;
|
||||
@@ -3668,6 +3682,13 @@ static void PRINTF_ATTR(9, 10) shader_glsl_gen_sample_code(const struct wined3d_
|
||||
break;
|
||||
}
|
||||
}
|
||||
+ if (sample_function->emulate_lod)
|
||||
+ {
|
||||
+ if (strcmp(bias, "0")) FIXME("Don't know how to emulate lod level %s\n", bias);
|
||||
+ if (!dx) dx = "vec2(0.0, 0.0)";
|
||||
+ if (!dy) dy = "vec2(0.0, 0.0)";
|
||||
+ if (!offset) offset = &dummy_offset;
|
||||
+ }
|
||||
if (dx && dy)
|
||||
shader_addline(ins->ctx->buffer, ", %s, %s", dx, dy);
|
||||
else if (bias)
|
||||
--
|
||||
2.13.1
|
||||
|
@ -1,116 +0,0 @@
|
||||
From d905b0fdca811863cb7966259cb2efe173a63fd5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 11 Jul 2017 22:17:55 +0200
|
||||
Subject: wined3d: Emulate textureLod(samplerCubeShadow, ...) using
|
||||
shadowCubeGrad.
|
||||
|
||||
---
|
||||
dlls/wined3d/glsl_shader.c | 54 ++++++++++++++++++++++++++++++++++------------
|
||||
1 file changed, 40 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
|
||||
index 82cca841475..1a446fe62a4 100644
|
||||
--- a/dlls/wined3d/glsl_shader.c
|
||||
+++ b/dlls/wined3d/glsl_shader.c
|
||||
@@ -91,7 +91,7 @@ struct glsl_sample_function
|
||||
enum wined3d_data_type data_type;
|
||||
BOOL output_single_component;
|
||||
unsigned int offset_size;
|
||||
- BOOL emulate_lod;
|
||||
+ enum wined3d_shader_resource_type emulate_lod;
|
||||
};
|
||||
|
||||
enum heap_node_op
|
||||
@@ -3417,6 +3417,7 @@ static void shader_glsl_get_sample_function(const struct wined3d_shader_context
|
||||
enum wined3d_shader_resource_type resource_type = ctx->reg_maps->resource_info[resource_idx].type;
|
||||
struct shader_glsl_ctx_priv *priv = ctx->backend_data;
|
||||
const struct wined3d_gl_info *gl_info = ctx->gl_info;
|
||||
+ BOOL legacy_syntax = needs_legacy_glsl_syntax(gl_info);
|
||||
BOOL shadow = glsl_is_shadow_sampler(ctx->shader, priv->cur_ps_args, resource_idx, sampler_idx);
|
||||
BOOL projected = flags & WINED3D_GLSL_SAMPLE_PROJECTED;
|
||||
BOOL texrect = ctx->reg_maps->shader_version.type == WINED3D_SHADER_TYPE_PIXEL
|
||||
@@ -3429,6 +3430,7 @@ static void shader_glsl_get_sample_function(const struct wined3d_shader_context
|
||||
unsigned int coord_size, deriv_size;
|
||||
|
||||
sample_function->data_type = ctx->reg_maps->resource_info[resource_idx].data_type;
|
||||
+ sample_function->emulate_lod = WINED3D_SHADER_RESOURCE_NONE;
|
||||
|
||||
if (resource_type >= ARRAY_SIZE(resource_type_info))
|
||||
{
|
||||
@@ -3440,19 +3442,30 @@ static void shader_glsl_get_sample_function(const struct wined3d_shader_context
|
||||
if (resource_type == WINED3D_SHADER_RESOURCE_TEXTURE_CUBE)
|
||||
projected = FALSE;
|
||||
|
||||
- /* emulate textureLod(sampler2DArrayShadow, ...) using textureGradOffset */
|
||||
- if (shadow && lod && resource_type == WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY)
|
||||
+ if (shadow && lod)
|
||||
{
|
||||
- sample_function->emulate_lod = TRUE;
|
||||
- grad = offset = TRUE;
|
||||
- lod = FALSE;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- sample_function->emulate_lod = FALSE;
|
||||
+ switch (resource_type)
|
||||
+ {
|
||||
+ /* emulate textureLod(sampler2DArrayShadow, ...) using textureGradOffset */
|
||||
+ case WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY:
|
||||
+ sample_function->emulate_lod = resource_type;
|
||||
+ grad = offset = TRUE;
|
||||
+ lod = FALSE;
|
||||
+ break;
|
||||
+
|
||||
+ /* emulate textureLod(samplerCubeShadow, ...) using shadowCubeGrad */
|
||||
+ case WINED3D_SHADER_RESOURCE_TEXTURE_CUBE:
|
||||
+ sample_function->emulate_lod = resource_type;
|
||||
+ grad = legacy_syntax = TRUE;
|
||||
+ lod = FALSE;
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
- if (needs_legacy_glsl_syntax(gl_info))
|
||||
+ if (legacy_syntax)
|
||||
{
|
||||
if (shadow)
|
||||
base = "shadow";
|
||||
@@ -3492,7 +3505,7 @@ static void shader_glsl_get_sample_function(const struct wined3d_shader_context
|
||||
sample_function->offset_size = offset ? deriv_size : 0;
|
||||
sample_function->coord_mask = (1u << coord_size) - 1;
|
||||
sample_function->deriv_mask = (1u << deriv_size) - 1;
|
||||
- sample_function->output_single_component = shadow && !needs_legacy_glsl_syntax(gl_info);
|
||||
+ sample_function->output_single_component = shadow && !legacy_syntax;
|
||||
}
|
||||
|
||||
static void shader_glsl_release_sample_function(const struct wined3d_shader_context *ctx,
|
||||
@@ -3685,8 +3698,21 @@ static void PRINTF_ATTR(9, 10) shader_glsl_gen_sample_code(const struct wined3d_
|
||||
if (sample_function->emulate_lod)
|
||||
{
|
||||
if (strcmp(bias, "0")) FIXME("Don't know how to emulate lod level %s\n", bias);
|
||||
- if (!dx) dx = "vec2(0.0, 0.0)";
|
||||
- if (!dy) dy = "vec2(0.0, 0.0)";
|
||||
+ switch (sample_function->emulate_lod)
|
||||
+ {
|
||||
+ case WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY:
|
||||
+ if (!dx) dx = "vec2(0.0, 0.0)";
|
||||
+ if (!dy) dy = "vec2(0.0, 0.0)";
|
||||
+ break;
|
||||
+
|
||||
+ case WINED3D_SHADER_RESOURCE_TEXTURE_CUBE:
|
||||
+ if (!dx) dx = "vec3(0.0, 0.0, 0.0)";
|
||||
+ if (!dy) dy = "vec3(0.0, 0.0, 0.0)";
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
if (!offset) offset = &dummy_offset;
|
||||
}
|
||||
if (dx && dy)
|
||||
--
|
||||
2.13.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user