Added d3d11-dynamic-cpu-access patchset

This commit is contained in:
Alistair Leslie-Hughes 2018-05-08 15:35:51 +10:00
parent 9f3d2b6601
commit e9ce651159
3 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,35 @@
From 7596e7792cb59a129f06ff41c4da03baa4d64b96 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 27 Apr 2018 12:34:00 +1000
Subject: [PATCH] d3d11: D3D11_USAGE_DYNAMIC needs to have CPU access
Fix regression of b6f917b1023ea2b9591f6b72d34ff2afa34bd914
Reference (details on D3D11_USAGE_DYNAMIC usage)
https://msdn.microsoft.com/en-us/library/windows/desktop/ff476259(v=vs.85).aspx
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/d3d11/buffer.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/d3d11/buffer.c b/dlls/d3d11/buffer.c
index 09778e2..04d473b 100644
--- a/dlls/d3d11/buffer.c
+++ b/dlls/d3d11/buffer.c
@@ -453,6 +453,11 @@ static HRESULT d3d_buffer_init(struct d3d_buffer *buffer, struct d3d_device *dev
wined3d_desc.usage = wined3d_usage_from_d3d11(0, buffer->desc.Usage);
wined3d_desc.bind_flags = buffer->desc.BindFlags;
wined3d_desc.access = wined3d_access_from_d3d11(buffer->desc.Usage, buffer->desc.CPUAccessFlags);
+ if(buffer->desc.Usage == D3D11_USAGE_DYNAMIC)
+ {
+ TRACE("Setting Dynamic CPU access\n");
+ wined3d_desc.access |= WINED3D_RESOURCE_ACCESS_CPU;
+ }
wined3d_desc.misc_flags = buffer->desc.MiscFlags;
wined3d_desc.structure_byte_stride = buffer->desc.StructureByteStride;
--
1.9.1

View File

@ -0,0 +1 @@
Fixes: [45066] - Enable CPU access for dynamic buffers.

View File

@ -110,6 +110,7 @@ patch_enable_all ()
enable_d2d1_ID2D1Factory1="$1"
enable_d3d11_Deferred_Context="$1"
enable_d3d11_Depth_Bias="$1"
enable_d3d11_dynamic_cpu_access="$1"
enable_d3d11_shader_count="$1"
enable_d3d8_ValidateShader="$1"
enable_d3d9_DesktopWindow="$1"
@ -517,6 +518,9 @@ patch_enable ()
d3d11-Depth_Bias)
enable_d3d11_Depth_Bias="$2"
;;
d3d11-dynamic-cpu-access)
enable_d3d11_dynamic_cpu_access="$2"
;;
d3d11-shader-count)
enable_d3d11_shader_count="$2"
;;
@ -3189,6 +3193,21 @@ if test "$enable_d3d11_Depth_Bias" -eq 1; then
) >> "$patchlist"
fi
# Patchset d3d11-dynamic-cpu-access
# |
# | This patchset fixes the following Wine bugs:
# | * [#45066] - Enable CPU access for dynamic buffers.
# |
# | Modified files:
# | * dlls/d3d11/buffer.c
# |
if test "$enable_d3d11_dynamic_cpu_access" -eq 1; then
patch_apply d3d11-dynamic-cpu-access/0001-d3d11-D3D11_USAGE_DYNAMIC-needs-to-have-CPU-access.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "d3d11: D3D11_USAGE_DYNAMIC needs to have CPU access.", 1 },';
) >> "$patchlist"
fi
# Patchset d3d11-shader-count
# |
# | This patchset fixes the following Wine bugs: