mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added patches to implement additional d3d11 deferred context functions.
This commit is contained in:
parent
a8eca598ce
commit
141768861c
@ -0,0 +1,88 @@
|
||||
From eab748f0faa9adfb18eec8a6d7b92b5d517581da Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Thu, 31 Aug 2017 20:24:35 +0200
|
||||
Subject: d3d11: Implement CopyResource for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 37 ++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 36 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 15935b4e7aa..2e6126b434f 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -40,6 +40,8 @@ enum deferred_cmd
|
||||
DEFERRED_OMSETBLENDSTATE, /* blend_state_info */
|
||||
DEFERRED_OMSETRENDERTARGETS, /* render_target_info */
|
||||
|
||||
+ DEFERRED_COPYRESOURCE, /* copy_resource_info */
|
||||
+
|
||||
DEFERRED_CSSETSHADER, /* cs_info */
|
||||
DEFERRED_DSSETSHADER, /* ds_info */
|
||||
DEFERRED_GSSETSHADER, /* gs_info */
|
||||
@@ -140,6 +142,11 @@ struct deferred_call
|
||||
ID3D11DepthStencilView *depth_stencil;
|
||||
} render_target_info;
|
||||
struct
|
||||
+ {
|
||||
+ ID3D11Resource *dst_resource;
|
||||
+ ID3D11Resource *src_resource;
|
||||
+ } copy_resource_info;
|
||||
+ struct
|
||||
{
|
||||
ID3D11ComputeShader *shader;
|
||||
/* FIXME: add class instances */
|
||||
@@ -416,6 +423,14 @@ static void free_deferred_calls(struct list *commands)
|
||||
ID3D11DepthStencilView_Release(call->render_target_info.depth_stencil);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_COPYRESOURCE:
|
||||
+ {
|
||||
+ if (call->copy_resource_info.dst_resource)
|
||||
+ ID3D11Resource_Release(call->copy_resource_info.dst_resource);
|
||||
+ if (call->copy_resource_info.src_resource)
|
||||
+ ID3D11Resource_Release(call->copy_resource_info.src_resource);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CSSETSHADER:
|
||||
{
|
||||
if (call->cs_info.shader)
|
||||
@@ -613,6 +628,13 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->render_target_info.render_targets, call->render_target_info.depth_stencil);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_COPYRESOURCE:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_CopyResource(iface,
|
||||
+ call->copy_resource_info.dst_resource,
|
||||
+ call->copy_resource_info.src_resource);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CSSETSHADER:
|
||||
{
|
||||
ID3D11DeviceContext_CSSetShader(iface, call->cs_info.shader, NULL, 0);
|
||||
@@ -4343,7 +4365,20 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CopySubresourceRegion(ID3D1
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CopyResource(ID3D11DeviceContext *iface,
|
||||
ID3D11Resource *dst_resource, ID3D11Resource *src_resource)
|
||||
{
|
||||
- FIXME("iface %p, dst_resource %p, src_resource %p stub!\n", iface, dst_resource, src_resource);
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, dst_resource %p, src_resource %p.\n", iface, dst_resource, src_resource);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ if (dst_resource) ID3D11Resource_AddRef(dst_resource);
|
||||
+ if (src_resource) ID3D11Resource_AddRef(src_resource);
|
||||
+
|
||||
+ call->cmd = DEFERRED_COPYRESOURCE;
|
||||
+ call->copy_resource_info.dst_resource = dst_resource;
|
||||
+ call->copy_resource_info.src_resource = src_resource;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_UpdateSubresource(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,83 @@
|
||||
From 611e27f46305b4291a915d997ab9775e2e165703 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Mon, 4 Sep 2017 02:19:00 +0200
|
||||
Subject: d3d11: Implement SetResourceMinLOD for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 32 +++++++++++++++++++++++++++++++-
|
||||
1 file changed, 31 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 2e6126b434f..8937d4f4088 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -41,6 +41,7 @@ enum deferred_cmd
|
||||
DEFERRED_OMSETRENDERTARGETS, /* render_target_info */
|
||||
|
||||
DEFERRED_COPYRESOURCE, /* copy_resource_info */
|
||||
+ DEFERRED_SETRESOURCEMINLOD, /* set_resource_min_lod_info */
|
||||
|
||||
DEFERRED_CSSETSHADER, /* cs_info */
|
||||
DEFERRED_DSSETSHADER, /* ds_info */
|
||||
@@ -147,6 +148,11 @@ struct deferred_call
|
||||
ID3D11Resource *src_resource;
|
||||
} copy_resource_info;
|
||||
struct
|
||||
+ {
|
||||
+ ID3D11Resource *resource;
|
||||
+ FLOAT min_lod;
|
||||
+ } set_resource_min_lod_info;
|
||||
+ struct
|
||||
{
|
||||
ID3D11ComputeShader *shader;
|
||||
/* FIXME: add class instances */
|
||||
@@ -431,6 +437,12 @@ static void free_deferred_calls(struct list *commands)
|
||||
ID3D11Resource_Release(call->copy_resource_info.src_resource);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_SETRESOURCEMINLOD:
|
||||
+ {
|
||||
+ if (call->set_resource_min_lod_info.resource)
|
||||
+ ID3D11Resource_Release(call->set_resource_min_lod_info.resource);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CSSETSHADER:
|
||||
{
|
||||
if (call->cs_info.shader)
|
||||
@@ -635,6 +647,13 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->copy_resource_info.src_resource);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_SETRESOURCEMINLOD:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_SetResourceMinLOD(iface,
|
||||
+ call->set_resource_min_lod_info.resource,
|
||||
+ call->set_resource_min_lod_info.min_lod);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CSSETSHADER:
|
||||
{
|
||||
ID3D11DeviceContext_CSSetShader(iface, call->cs_info.shader, NULL, 0);
|
||||
@@ -4459,7 +4478,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GenerateMips(ID3D11DeviceCo
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_SetResourceMinLOD(ID3D11DeviceContext *iface,
|
||||
ID3D11Resource *resource, FLOAT min_lod)
|
||||
{
|
||||
- FIXME("iface %p, resource %p, min_lod %f stub!\n", iface, resource, min_lod);
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, resource %p, min_lod %f.\n", iface, resource, min_lod);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_SETRESOURCEMINLOD;
|
||||
+ if (resource) ID3D11Resource_AddRef(resource);
|
||||
+ call->set_resource_min_lod_info.resource = resource;
|
||||
+ call->set_resource_min_lod_info.min_lod = min_lod;
|
||||
}
|
||||
|
||||
static FLOAT STDMETHODCALLTYPE d3d11_deferred_context_GetResourceMinLOD(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,117 @@
|
||||
From 48325d31b132a05f60547853585f99fe2996a589 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Mon, 4 Sep 2017 02:21:30 +0200
|
||||
Subject: d3d11: Implement CopySubresourceRegion for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 62 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 8937d4f4088..c41f8ce7619 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -42,6 +42,7 @@ enum deferred_cmd
|
||||
|
||||
DEFERRED_COPYRESOURCE, /* copy_resource_info */
|
||||
DEFERRED_SETRESOURCEMINLOD, /* set_resource_min_lod_info */
|
||||
+ DEFERRED_COPYSUBRESOURCEREGION, /* copy_subresource_region_info */
|
||||
|
||||
DEFERRED_CSSETSHADER, /* cs_info */
|
||||
DEFERRED_DSSETSHADER, /* ds_info */
|
||||
@@ -153,6 +154,17 @@ struct deferred_call
|
||||
FLOAT min_lod;
|
||||
} set_resource_min_lod_info;
|
||||
struct
|
||||
+ {
|
||||
+ ID3D11Resource *dst_resource;
|
||||
+ UINT dst_subresource_idx;
|
||||
+ UINT dst_x;
|
||||
+ UINT dst_y;
|
||||
+ UINT dst_z;
|
||||
+ ID3D11Resource *src_resource;
|
||||
+ UINT src_subresource_idx;
|
||||
+ D3D11_BOX *src_box;
|
||||
+ } copy_subresource_region_info;
|
||||
+ struct
|
||||
{
|
||||
ID3D11ComputeShader *shader;
|
||||
/* FIXME: add class instances */
|
||||
@@ -443,6 +455,14 @@ static void free_deferred_calls(struct list *commands)
|
||||
ID3D11Resource_Release(call->set_resource_min_lod_info.resource);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_COPYSUBRESOURCEREGION:
|
||||
+ {
|
||||
+ if (call->copy_subresource_region_info.dst_resource)
|
||||
+ ID3D11Resource_Release(call->copy_subresource_region_info.dst_resource);
|
||||
+ if (call->copy_subresource_region_info.src_resource)
|
||||
+ ID3D11Resource_Release(call->copy_subresource_region_info.src_resource);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CSSETSHADER:
|
||||
{
|
||||
if (call->cs_info.shader)
|
||||
@@ -654,6 +674,19 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->set_resource_min_lod_info.min_lod);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_COPYSUBRESOURCEREGION:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_CopySubresourceRegion(iface,
|
||||
+ call->copy_subresource_region_info.dst_resource,
|
||||
+ call->copy_subresource_region_info.dst_subresource_idx,
|
||||
+ call->copy_subresource_region_info.dst_x,
|
||||
+ call->copy_subresource_region_info.dst_y,
|
||||
+ call->copy_subresource_region_info.dst_z,
|
||||
+ call->copy_subresource_region_info.src_resource,
|
||||
+ call->copy_subresource_region_info.src_subresource_idx,
|
||||
+ call->copy_subresource_region_info.src_box);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CSSETSHADER:
|
||||
{
|
||||
ID3D11DeviceContext_CSSetShader(iface, call->cs_info.shader, NULL, 0);
|
||||
@@ -4375,10 +4408,37 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CopySubresourceRegion(ID3D1
|
||||
ID3D11Resource *dst_resource, UINT dst_subresource_idx, UINT dst_x, UINT dst_y, UINT dst_z,
|
||||
ID3D11Resource *src_resource, UINT src_subresource_idx, const D3D11_BOX *src_box)
|
||||
{
|
||||
- FIXME("iface %p, dst_resource %p, dst_subresource_idx %u, dst_x %u, dst_y %u, dst_z %u, "
|
||||
- "src_resource %p, src_subresource_idx %u, src_box %p stub!\n",
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, dst_resource %p, dst_subresource_idx %u, dst_x %u, dst_y %u, dst_z %u, "
|
||||
+ "src_resource %p, src_subresource_idx %u, src_box %p.\n",
|
||||
iface, dst_resource, dst_subresource_idx, dst_x, dst_y, dst_z,
|
||||
src_resource, src_subresource_idx, src_box);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, src_box ? sizeof(D3D11_BOX) : 0)))
|
||||
+ return;
|
||||
+
|
||||
+ if (dst_resource) ID3D11Resource_AddRef(dst_resource);
|
||||
+ if (src_resource) ID3D11Resource_AddRef(src_resource);
|
||||
+
|
||||
+ call->cmd = DEFERRED_COPYSUBRESOURCEREGION;
|
||||
+ call->copy_subresource_region_info.dst_resource = dst_resource;
|
||||
+ call->copy_subresource_region_info.dst_subresource_idx = dst_subresource_idx;
|
||||
+ call->copy_subresource_region_info.dst_x = dst_x;
|
||||
+ call->copy_subresource_region_info.dst_y = dst_y;
|
||||
+ call->copy_subresource_region_info.dst_z = dst_z;
|
||||
+ call->copy_subresource_region_info.src_resource = src_resource;
|
||||
+ call->copy_subresource_region_info.src_subresource_idx = src_subresource_idx;
|
||||
+ if (src_box)
|
||||
+ {
|
||||
+ call->copy_subresource_region_info.src_box = (void *)(call + 1);
|
||||
+ *call->copy_subresource_region_info.src_box = *src_box;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ call->copy_subresource_region_info.src_box = NULL;
|
||||
+ }
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CopyResource(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,100 @@
|
||||
From d9105362c97b8ee7123bb3d711893f0ee15e81e4 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Mon, 4 Sep 2017 02:30:32 +0200
|
||||
Subject: d3d11: Implement ResolveSubresource for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 47 +++++++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 45 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index c41f8ce7619..65e729030a9 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -43,6 +43,7 @@ enum deferred_cmd
|
||||
DEFERRED_COPYRESOURCE, /* copy_resource_info */
|
||||
DEFERRED_SETRESOURCEMINLOD, /* set_resource_min_lod_info */
|
||||
DEFERRED_COPYSUBRESOURCEREGION, /* copy_subresource_region_info */
|
||||
+ DEFERRED_RESOLVESUBRESOURCE, /* resolve_subresource_info */
|
||||
|
||||
DEFERRED_CSSETSHADER, /* cs_info */
|
||||
DEFERRED_DSSETSHADER, /* ds_info */
|
||||
@@ -165,6 +166,14 @@ struct deferred_call
|
||||
D3D11_BOX *src_box;
|
||||
} copy_subresource_region_info;
|
||||
struct
|
||||
+ {
|
||||
+ ID3D11Resource *dst_resource;
|
||||
+ UINT dst_subresource_idx;
|
||||
+ ID3D11Resource *src_resource;
|
||||
+ UINT src_subresource_idx;
|
||||
+ DXGI_FORMAT format;
|
||||
+ } resolve_subresource_info;
|
||||
+ struct
|
||||
{
|
||||
ID3D11ComputeShader *shader;
|
||||
/* FIXME: add class instances */
|
||||
@@ -463,6 +472,14 @@ static void free_deferred_calls(struct list *commands)
|
||||
ID3D11Resource_Release(call->copy_subresource_region_info.src_resource);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_RESOLVESUBRESOURCE:
|
||||
+ {
|
||||
+ if (call->resolve_subresource_info.dst_resource)
|
||||
+ ID3D11Resource_Release(call->resolve_subresource_info.dst_resource);
|
||||
+ if (call->resolve_subresource_info.src_resource)
|
||||
+ ID3D11Resource_Release(call->resolve_subresource_info.src_resource);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CSSETSHADER:
|
||||
{
|
||||
if (call->cs_info.shader)
|
||||
@@ -687,6 +704,16 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->copy_subresource_region_info.src_box);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_RESOLVESUBRESOURCE:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_ResolveSubresource(iface,
|
||||
+ call->resolve_subresource_info.dst_resource,
|
||||
+ call->resolve_subresource_info.dst_subresource_idx,
|
||||
+ call->resolve_subresource_info.src_resource,
|
||||
+ call->resolve_subresource_info.src_subresource_idx,
|
||||
+ call->resolve_subresource_info.format);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CSSETSHADER:
|
||||
{
|
||||
ID3D11DeviceContext_CSSetShader(iface, call->cs_info.shader, NULL, 0);
|
||||
@@ -4565,10 +4592,26 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_ResolveSubresource(ID3D11De
|
||||
ID3D11Resource *src_resource, UINT src_subresource_idx,
|
||||
DXGI_FORMAT format)
|
||||
{
|
||||
- FIXME("iface %p, dst_resource %p, dst_subresource_idx %u, src_resource %p, src_subresource_idx %u, "
|
||||
- "format %s stub!\n",
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, dst_resource %p, dst_subresource_idx %u, src_resource %p, src_subresource_idx %u, "
|
||||
+ "format %s.\n",
|
||||
iface, dst_resource, dst_subresource_idx, src_resource, src_subresource_idx,
|
||||
debug_dxgi_format(format));
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ if (dst_resource) ID3D11Resource_AddRef(dst_resource);
|
||||
+ if (src_resource) ID3D11Resource_AddRef(src_resource);
|
||||
+
|
||||
+ call->cmd = DEFERRED_RESOLVESUBRESOURCE;
|
||||
+ call->resolve_subresource_info.dst_resource = dst_resource;
|
||||
+ call->resolve_subresource_info.dst_subresource_idx = dst_subresource_idx;
|
||||
+ call->resolve_subresource_info.src_resource = src_resource;
|
||||
+ call->resolve_subresource_info.src_subresource_idx = src_subresource_idx;
|
||||
+ call->resolve_subresource_info.format = format;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ExecuteCommandList(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,92 @@
|
||||
From 02b50e3745fdbff6e9a16ae9ff5674b86d98fe52 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Mon, 4 Sep 2017 02:33:19 +0200
|
||||
Subject: d3d11: Implement CopyStructureCount for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 41 +++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 39 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 65e729030a9..9413f9c77f7 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -44,6 +44,7 @@ enum deferred_cmd
|
||||
DEFERRED_SETRESOURCEMINLOD, /* set_resource_min_lod_info */
|
||||
DEFERRED_COPYSUBRESOURCEREGION, /* copy_subresource_region_info */
|
||||
DEFERRED_RESOLVESUBRESOURCE, /* resolve_subresource_info */
|
||||
+ DEFERRED_COPYSTRUCTURECOUNT, /* copy_structure_count_info */
|
||||
|
||||
DEFERRED_CSSETSHADER, /* cs_info */
|
||||
DEFERRED_DSSETSHADER, /* ds_info */
|
||||
@@ -174,6 +175,12 @@ struct deferred_call
|
||||
DXGI_FORMAT format;
|
||||
} resolve_subresource_info;
|
||||
struct
|
||||
+ {
|
||||
+ ID3D11Buffer *dst_buffer;
|
||||
+ UINT dst_offset;
|
||||
+ ID3D11UnorderedAccessView *src_view;
|
||||
+ } copy_structure_count_info;
|
||||
+ struct
|
||||
{
|
||||
ID3D11ComputeShader *shader;
|
||||
/* FIXME: add class instances */
|
||||
@@ -480,6 +487,14 @@ static void free_deferred_calls(struct list *commands)
|
||||
ID3D11Resource_Release(call->resolve_subresource_info.src_resource);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_COPYSTRUCTURECOUNT:
|
||||
+ {
|
||||
+ if (call->copy_structure_count_info.dst_buffer)
|
||||
+ ID3D11Buffer_Release(call->copy_structure_count_info.dst_buffer);
|
||||
+ if (call->copy_structure_count_info.src_view)
|
||||
+ ID3D11UnorderedAccessView_Release(call->copy_structure_count_info.src_view);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CSSETSHADER:
|
||||
{
|
||||
if (call->cs_info.shader)
|
||||
@@ -714,6 +729,14 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->resolve_subresource_info.format);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_COPYSTRUCTURECOUNT:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_CopyStructureCount(iface,
|
||||
+ call->copy_structure_count_info.dst_buffer,
|
||||
+ call->copy_structure_count_info.dst_offset,
|
||||
+ call->copy_structure_count_info.src_view);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CSSETSHADER:
|
||||
{
|
||||
ID3D11DeviceContext_CSSetShader(iface, call->cs_info.shader, NULL, 0);
|
||||
@@ -4498,8 +4521,22 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_UpdateSubresource(ID3D11Dev
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CopyStructureCount(ID3D11DeviceContext *iface,
|
||||
ID3D11Buffer *dst_buffer, UINT dst_offset, ID3D11UnorderedAccessView *src_view)
|
||||
{
|
||||
- FIXME("iface %p, dst_buffer %p, dst_offset %u, src_view %p stub!\n",
|
||||
- iface, dst_buffer, dst_offset, src_view);
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, dst_buffer %p, dst_offset %u, src_view %p.\n",
|
||||
+ iface, dst_buffer, dst_offset, src_view);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ if (dst_buffer) ID3D11Buffer_AddRef(dst_buffer);
|
||||
+ if (src_view) ID3D11UnorderedAccessView_AddRef(src_view);
|
||||
+
|
||||
+ call->cmd = DEFERRED_COPYSTRUCTURECOUNT;
|
||||
+ call->copy_structure_count_info.dst_buffer = dst_buffer;
|
||||
+ call->copy_structure_count_info.dst_offset = dst_offset;
|
||||
+ call->copy_structure_count_info.src_view = src_view;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearRenderTargetView(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,64 @@
|
||||
From d044057772b2e3dbf96703295001993b161c58a1 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Thu, 31 Aug 2017 20:40:30 +0200
|
||||
Subject: d3d11: Implement DrawAuto for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 20 +++++++++++++++++++-
|
||||
1 file changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 9413f9c77f7..04e02376f54 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -79,6 +79,7 @@ enum deferred_cmd
|
||||
DEFERRED_DRAW, /* draw_info */
|
||||
DEFERRED_DRAWINDEXED, /* draw_indexed_info */
|
||||
DEFERRED_DRAWINDEXEDINSTANCED, /* draw_indexed_inst_info */
|
||||
+ DEFERRED_DRAWAUTO,
|
||||
|
||||
DEFERRED_MAP, /* map_info */
|
||||
DEFERRED_DISPATCH, /* dispatch_info */
|
||||
@@ -588,6 +589,10 @@ static void free_deferred_calls(struct list *commands)
|
||||
{
|
||||
break; /* nothing to do */
|
||||
}
|
||||
+ case DEFERRED_DRAWAUTO:
|
||||
+ {
|
||||
+ break; /* nothing to do */
|
||||
+ }
|
||||
case DEFERRED_MAP:
|
||||
{
|
||||
ID3D11Resource_Release(call->map_info.resource);
|
||||
@@ -899,6 +904,11 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->draw_indexed_inst_info.base_vertex, call->draw_indexed_inst_info.start_instance);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_DRAWAUTO:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_DrawAuto(iface);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_MAP:
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE mapped;
|
||||
@@ -4376,7 +4386,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_SOSetTargets(ID3D11DeviceCo
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DrawAuto(ID3D11DeviceContext *iface)
|
||||
{
|
||||
- FIXME("iface %p stub!\n", iface);
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p.\n", iface);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_DRAWAUTO;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexedInstancedIndirect(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,90 @@
|
||||
From df5c13cd1fcaa356b5835d73573e832e9dd100fe Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Mon, 4 Sep 2017 02:41:23 +0200
|
||||
Subject: d3d11: Implement DrawInstanced for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 37 +++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 35 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 04e02376f54..2b3b3cf37af 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -80,6 +80,7 @@ enum deferred_cmd
|
||||
DEFERRED_DRAWINDEXED, /* draw_indexed_info */
|
||||
DEFERRED_DRAWINDEXEDINSTANCED, /* draw_indexed_inst_info */
|
||||
DEFERRED_DRAWAUTO,
|
||||
+ DEFERRED_DRAWINSTANCED, /* draw_instanced_info */
|
||||
|
||||
DEFERRED_MAP, /* map_info */
|
||||
DEFERRED_DISPATCH, /* dispatch_info */
|
||||
@@ -256,6 +257,13 @@ struct deferred_call
|
||||
UINT start_instance;
|
||||
} draw_indexed_inst_info;
|
||||
struct
|
||||
+ {
|
||||
+ UINT instance_vertex_count;
|
||||
+ UINT instance_count;
|
||||
+ UINT start_vertex_location;
|
||||
+ UINT start_instance_location;
|
||||
+ } draw_instanced_info;
|
||||
+ struct
|
||||
{
|
||||
ID3D11Resource *resource;
|
||||
UINT subresource_idx;
|
||||
@@ -593,6 +601,10 @@ static void free_deferred_calls(struct list *commands)
|
||||
{
|
||||
break; /* nothing to do */
|
||||
}
|
||||
+ case DEFERRED_DRAWINSTANCED:
|
||||
+ {
|
||||
+ break; /* nothing to do */
|
||||
+ }
|
||||
case DEFERRED_MAP:
|
||||
{
|
||||
ID3D11Resource_Release(call->map_info.resource);
|
||||
@@ -909,6 +921,15 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
ID3D11DeviceContext_DrawAuto(iface);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_DRAWINSTANCED:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_DrawInstanced(iface,
|
||||
+ call->draw_instanced_info.instance_vertex_count,
|
||||
+ call->draw_instanced_info.instance_count,
|
||||
+ call->draw_instanced_info.start_vertex_location,
|
||||
+ call->draw_instanced_info.start_instance_location);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_MAP:
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE mapped;
|
||||
@@ -4153,10 +4174,22 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexedInstanced(ID3D11
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstanced(ID3D11DeviceContext *iface,
|
||||
UINT instance_vertex_count, UINT instance_count, UINT start_vertex_location, UINT start_instance_location)
|
||||
{
|
||||
- FIXME("iface %p, instance_vertex_count %u, instance_count %u, start_vertex_location %u, "
|
||||
- "start_instance_location %u stub!\n",
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, instance_vertex_count %u, instance_count %u, start_vertex_location %u, "
|
||||
+ "start_instance_location %u.\n",
|
||||
iface, instance_vertex_count, instance_count, start_vertex_location,
|
||||
start_instance_location);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_DRAWINSTANCED;
|
||||
+ call->draw_instanced_info.instance_vertex_count = instance_vertex_count;
|
||||
+ call->draw_instanced_info.instance_count = instance_count;
|
||||
+ call->draw_instanced_info.start_vertex_location = start_vertex_location;
|
||||
+ call->draw_instanced_info.start_instance_location = start_instance_location;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,83 @@
|
||||
From a285bbb03bf2763611274915eb86f32567a70388 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Mon, 4 Sep 2017 02:44:05 +0200
|
||||
Subject: d3d11: Implement DrawInstancedIndirect for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 32 +++++++++++++++++++++++++++++++-
|
||||
1 file changed, 31 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 2b3b3cf37af..9a78856f577 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -81,6 +81,7 @@ enum deferred_cmd
|
||||
DEFERRED_DRAWINDEXEDINSTANCED, /* draw_indexed_inst_info */
|
||||
DEFERRED_DRAWAUTO,
|
||||
DEFERRED_DRAWINSTANCED, /* draw_instanced_info */
|
||||
+ DEFERRED_DRAWINSTANCEDINDIRECT, /* draw_instanced_indirect_info */
|
||||
|
||||
DEFERRED_MAP, /* map_info */
|
||||
DEFERRED_DISPATCH, /* dispatch_info */
|
||||
@@ -264,6 +265,11 @@ struct deferred_call
|
||||
UINT start_instance_location;
|
||||
} draw_instanced_info;
|
||||
struct
|
||||
+ {
|
||||
+ ID3D11Buffer *buffer;
|
||||
+ UINT offset;
|
||||
+ } draw_instanced_indirect_info;
|
||||
+ struct
|
||||
{
|
||||
ID3D11Resource *resource;
|
||||
UINT subresource_idx;
|
||||
@@ -605,6 +611,12 @@ static void free_deferred_calls(struct list *commands)
|
||||
{
|
||||
break; /* nothing to do */
|
||||
}
|
||||
+ case DEFERRED_DRAWINSTANCEDINDIRECT:
|
||||
+ {
|
||||
+ if (call->draw_instanced_indirect_info.buffer)
|
||||
+ ID3D11Buffer_Release(call->draw_instanced_indirect_info.buffer);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_MAP:
|
||||
{
|
||||
ID3D11Resource_Release(call->map_info.resource);
|
||||
@@ -930,6 +942,13 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->draw_instanced_info.start_instance_location);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_DRAWINSTANCEDINDIRECT:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_DrawInstancedIndirect(iface,
|
||||
+ call->draw_instanced_indirect_info.buffer,
|
||||
+ call->draw_instanced_indirect_info.offset);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_MAP:
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE mapped;
|
||||
@@ -4439,7 +4458,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexedInstancedIndirec
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstancedIndirect(ID3D11DeviceContext *iface,
|
||||
ID3D11Buffer *buffer, UINT offset)
|
||||
{
|
||||
- FIXME("iface %p, buffer %p, offset %u stub!\n", iface, buffer, offset);
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, buffer %p, offset %u.\n", iface, buffer, offset);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_DRAWINSTANCEDINDIRECT;
|
||||
+ if (buffer) ID3D11Buffer_AddRef(buffer);
|
||||
+ call->draw_instanced_indirect_info.buffer = buffer;
|
||||
+ call->draw_instanced_indirect_info.offset = offset;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Dispatch(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,66 @@
|
||||
From 5a2a795e07aad217abddabd31e05f72e5267334d Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Mon, 4 Sep 2017 02:49:31 +0200
|
||||
Subject: d3d11: Implement DrawIndexedInstancedIndirect for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 22 +++++++++++++++++++++-
|
||||
1 file changed, 21 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 9a78856f577..fc7423d3dda 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -82,6 +82,7 @@ enum deferred_cmd
|
||||
DEFERRED_DRAWAUTO,
|
||||
DEFERRED_DRAWINSTANCED, /* draw_instanced_info */
|
||||
DEFERRED_DRAWINSTANCEDINDIRECT, /* draw_instanced_indirect_info */
|
||||
+ DEFERRED_DRAWINDEXEDINSTANCEDINDIRECT, /* draw_instanced_indirect_info */
|
||||
|
||||
DEFERRED_MAP, /* map_info */
|
||||
DEFERRED_DISPATCH, /* dispatch_info */
|
||||
@@ -612,6 +613,7 @@ static void free_deferred_calls(struct list *commands)
|
||||
break; /* nothing to do */
|
||||
}
|
||||
case DEFERRED_DRAWINSTANCEDINDIRECT:
|
||||
+ case DEFERRED_DRAWINDEXEDINSTANCEDINDIRECT:
|
||||
{
|
||||
if (call->draw_instanced_indirect_info.buffer)
|
||||
ID3D11Buffer_Release(call->draw_instanced_indirect_info.buffer);
|
||||
@@ -949,6 +951,13 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->draw_instanced_indirect_info.offset);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_DRAWINDEXEDINSTANCEDINDIRECT:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_DrawIndexedInstancedIndirect(iface,
|
||||
+ call->draw_instanced_indirect_info.buffer,
|
||||
+ call->draw_instanced_indirect_info.offset);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_MAP:
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE mapped;
|
||||
@@ -4452,7 +4461,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DrawAuto(ID3D11DeviceContex
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexedInstancedIndirect(ID3D11DeviceContext *iface,
|
||||
ID3D11Buffer *buffer, UINT offset)
|
||||
{
|
||||
- FIXME("iface %p, buffer %p, offset %u stub!\n", iface, buffer, offset);
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, buffer %p, offset %u.\n", iface, buffer, offset);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_DRAWINDEXEDINSTANCEDINDIRECT;
|
||||
+ if (buffer) ID3D11Buffer_AddRef(buffer);
|
||||
+ call->draw_instanced_indirect_info.buffer = buffer;
|
||||
+ call->draw_instanced_indirect_info.offset = offset;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstancedIndirect(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,86 @@
|
||||
From 55943ff7d7ed4c29c3202f0f22c2fd5d0ee29830 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Thu, 31 Aug 2017 20:49:47 +0200
|
||||
Subject: d3d11: Implement ClearUnorderedAccessViewUint for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 34 +++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 33 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index fc7423d3dda..50f56fad7f7 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -90,6 +90,7 @@ enum deferred_cmd
|
||||
DEFERRED_CLEARSTATE,
|
||||
DEFERRED_CLEARRENDERTARGETVIEW, /* clear_rtv_info */
|
||||
DEFERRED_CLEARDEPTHSTENCILVIEW, /* clear_depth_info */
|
||||
+ DEFERRED_CLEARUNORDEREDACCESSVIEWUINT, /* clear_unordered_access_view_uint */
|
||||
|
||||
DEFERRED_BEGIN, /* async_info */
|
||||
DEFERRED_END, /* async_info */
|
||||
@@ -298,6 +299,11 @@ struct deferred_call
|
||||
UINT8 stencil;
|
||||
} clear_depth_info;
|
||||
struct
|
||||
+ {
|
||||
+ ID3D11UnorderedAccessView *unordered_access_view;
|
||||
+ UINT values[4];
|
||||
+ } clear_unordered_access_view_uint;
|
||||
+ struct
|
||||
{
|
||||
ID3D11Asynchronous *asynchronous;
|
||||
} async_info;
|
||||
@@ -644,6 +650,12 @@ static void free_deferred_calls(struct list *commands)
|
||||
ID3D11DepthStencilView_Release(call->clear_depth_info.view);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_CLEARUNORDEREDACCESSVIEWUINT:
|
||||
+ {
|
||||
+ if (call->clear_unordered_access_view_uint.unordered_access_view)
|
||||
+ ID3D11UnorderedAccessView_Release(call->clear_unordered_access_view_uint.unordered_access_view);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_BEGIN:
|
||||
case DEFERRED_END:
|
||||
{
|
||||
@@ -999,6 +1011,13 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->clear_depth_info.stencil);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_CLEARUNORDEREDACCESSVIEWUINT:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_ClearUnorderedAccessViewUint(iface,
|
||||
+ call->clear_unordered_access_view_uint.unordered_access_view,
|
||||
+ call->clear_unordered_access_view_uint.values);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_BEGIN:
|
||||
{
|
||||
ID3D11DeviceContext_Begin(iface, call->async_info.asynchronous);
|
||||
@@ -4663,8 +4682,21 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_ClearRenderTargetView(ID3D1
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearUnorderedAccessViewUint(ID3D11DeviceContext *iface,
|
||||
ID3D11UnorderedAccessView *unordered_access_view, const UINT values[4])
|
||||
{
|
||||
- FIXME("iface %p, unordered_access_view %p, values {%u %u %u %u} stub!\n",
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+ int i;
|
||||
+
|
||||
+ TRACE("iface %p, unordered_access_view %p, values {%u %u %u %u}.\n",
|
||||
iface, unordered_access_view, values[0], values[1], values[2], values[3]);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_CLEARUNORDEREDACCESSVIEWUINT;
|
||||
+ if (unordered_access_view) ID3D11UnorderedAccessView_AddRef(unordered_access_view);
|
||||
+ call->clear_unordered_access_view_uint.unordered_access_view = unordered_access_view;
|
||||
+ for (i = 0; i < 4; i++)
|
||||
+ call->clear_unordered_access_view_uint.values[i] = values[i];
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearUnorderedAccessViewFloat(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,86 @@
|
||||
From 527fe98683420cd9a7f8277d4042a9d8473571c2 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Mon, 4 Sep 2017 02:56:57 +0200
|
||||
Subject: d3d11: Implement ClearUnorderedAccessViewFloat for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 34 +++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 33 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 50f56fad7f7..d676b0c3f8e 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -91,6 +91,7 @@ enum deferred_cmd
|
||||
DEFERRED_CLEARRENDERTARGETVIEW, /* clear_rtv_info */
|
||||
DEFERRED_CLEARDEPTHSTENCILVIEW, /* clear_depth_info */
|
||||
DEFERRED_CLEARUNORDEREDACCESSVIEWUINT, /* clear_unordered_access_view_uint */
|
||||
+ DEFERRED_CLEARUNORDEREDACCESSVIEWFLOAT, /* clear_unordered_access_view_float */
|
||||
|
||||
DEFERRED_BEGIN, /* async_info */
|
||||
DEFERRED_END, /* async_info */
|
||||
@@ -304,6 +305,11 @@ struct deferred_call
|
||||
UINT values[4];
|
||||
} clear_unordered_access_view_uint;
|
||||
struct
|
||||
+ {
|
||||
+ ID3D11UnorderedAccessView *unordered_access_view;
|
||||
+ float values[4];
|
||||
+ } clear_unordered_access_view_float;
|
||||
+ struct
|
||||
{
|
||||
ID3D11Asynchronous *asynchronous;
|
||||
} async_info;
|
||||
@@ -656,6 +662,12 @@ static void free_deferred_calls(struct list *commands)
|
||||
ID3D11UnorderedAccessView_Release(call->clear_unordered_access_view_uint.unordered_access_view);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_CLEARUNORDEREDACCESSVIEWFLOAT:
|
||||
+ {
|
||||
+ if (call->clear_unordered_access_view_float.unordered_access_view)
|
||||
+ ID3D11UnorderedAccessView_Release(call->clear_unordered_access_view_float.unordered_access_view);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_BEGIN:
|
||||
case DEFERRED_END:
|
||||
{
|
||||
@@ -1018,6 +1030,13 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->clear_unordered_access_view_uint.values);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_CLEARUNORDEREDACCESSVIEWFLOAT:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_ClearUnorderedAccessViewFloat(iface,
|
||||
+ call->clear_unordered_access_view_float.unordered_access_view,
|
||||
+ call->clear_unordered_access_view_float.values);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_BEGIN:
|
||||
{
|
||||
ID3D11DeviceContext_Begin(iface, call->async_info.asynchronous);
|
||||
@@ -4702,8 +4721,21 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_ClearUnorderedAccessViewUin
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearUnorderedAccessViewFloat(ID3D11DeviceContext *iface,
|
||||
ID3D11UnorderedAccessView *unordered_access_view, const float values[4])
|
||||
{
|
||||
- FIXME("iface %p, unordered_access_view %p, values %s stub!\n",
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+ int i;
|
||||
+
|
||||
+ TRACE("iface %p, unordered_access_view %p, values %s.\n",
|
||||
iface, unordered_access_view, debug_float4(values));
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_CLEARUNORDEREDACCESSVIEWFLOAT;
|
||||
+ if (unordered_access_view) ID3D11UnorderedAccessView_AddRef(unordered_access_view);
|
||||
+ call->clear_unordered_access_view_float.unordered_access_view = unordered_access_view;
|
||||
+ for (i = 0; i < 4; i++)
|
||||
+ call->clear_unordered_access_view_float.values[i] = values[i];
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearDepthStencilView(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,81 @@
|
||||
From 26bfdd29ea248ac066174096d8879545429a6e89 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Thu, 31 Aug 2017 20:57:55 +0200
|
||||
Subject: d3d11: Implement RsSetScissorRects for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 30 +++++++++++++++++++++++++++++-
|
||||
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index d676b0c3f8e..4a159a2ff7b 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -35,6 +35,7 @@ enum deferred_cmd
|
||||
|
||||
DEFERRED_RSSETSTATE, /* rstate_info */
|
||||
DEFERRED_RSSETVIEWPORTS, /* viewport_info */
|
||||
+ DEFERRED_RSSETSCISSORRECTS, /* rs_set_scissor_rects_info */
|
||||
|
||||
DEFERRED_OMSETDEPTHSTENCILSTATE, /* stencil_state_info */
|
||||
DEFERRED_OMSETBLENDSTATE, /* blend_state_info */
|
||||
@@ -130,6 +131,11 @@ struct deferred_call
|
||||
ID3D11RasterizerState *state;
|
||||
} rstate_info;
|
||||
struct
|
||||
+ {
|
||||
+ UINT rect_count;
|
||||
+ D3D11_RECT *rects;
|
||||
+ } rs_set_scissor_rects_info;
|
||||
+ struct
|
||||
{
|
||||
UINT num_viewports;
|
||||
D3D11_VIEWPORT *viewports;
|
||||
@@ -462,6 +468,10 @@ static void free_deferred_calls(struct list *commands)
|
||||
{
|
||||
break; /* nothing to do */
|
||||
}
|
||||
+ case DEFERRED_RSSETSCISSORRECTS:
|
||||
+ {
|
||||
+ break; /* nothing to do */
|
||||
+ }
|
||||
case DEFERRED_OMSETDEPTHSTENCILSTATE:
|
||||
{
|
||||
if (call->stencil_state_info.state)
|
||||
@@ -729,6 +739,13 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->viewport_info.viewports);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_RSSETSCISSORRECTS:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_RSSetScissorRects(iface,
|
||||
+ call->rs_set_scissor_rects_info.rect_count,
|
||||
+ call->rs_set_scissor_rects_info.rects);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_OMSETDEPTHSTENCILSTATE:
|
||||
{
|
||||
ID3D11DeviceContext_OMSetDepthStencilState(iface, call->stencil_state_info.state,
|
||||
@@ -4590,7 +4607,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetViewports(ID3D11Device
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetScissorRects(ID3D11DeviceContext *iface,
|
||||
UINT rect_count, const D3D11_RECT *rects)
|
||||
{
|
||||
- FIXME("iface %p, rect_count %u, rects %p stub!\n", iface, rect_count, rects);
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, rect_count %u, rects %p.\n", iface, rect_count, rects);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, sizeof(D3D11_RECT) * rect_count)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_RSSETSCISSORRECTS;
|
||||
+ call->rs_set_scissor_rects_info.rects = (void *)(call + 1);
|
||||
+ call->rs_set_scissor_rects_info.rect_count = rect_count;
|
||||
+ memcpy(call->rs_set_scissor_rects_info.rects, rects, sizeof(D3D11_RECT) * rect_count);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CopySubresourceRegion(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,133 @@
|
||||
From 1aa986214da6fd1cd63daa9868ff21609881f560 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Mon, 4 Sep 2017 03:07:13 +0200
|
||||
Subject: d3d11: Implement OMSetRenderTargetsAndUnorderedAccessViews for
|
||||
deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 75 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 4a159a2ff7b..34f646231a5 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -40,6 +40,7 @@ enum deferred_cmd
|
||||
DEFERRED_OMSETDEPTHSTENCILSTATE, /* stencil_state_info */
|
||||
DEFERRED_OMSETBLENDSTATE, /* blend_state_info */
|
||||
DEFERRED_OMSETRENDERTARGETS, /* render_target_info */
|
||||
+ DEFERRED_OMSETRENDERTARGETSANDUNORDEREDACCESVIEWS, /* render_targets_and_unordered_access_views_info */
|
||||
|
||||
DEFERRED_COPYRESOURCE, /* copy_resource_info */
|
||||
DEFERRED_SETRESOURCEMINLOD, /* set_resource_min_lod_info */
|
||||
@@ -193,6 +194,16 @@ struct deferred_call
|
||||
ID3D11UnorderedAccessView *src_view;
|
||||
} copy_structure_count_info;
|
||||
struct
|
||||
+ {
|
||||
+ UINT render_target_view_count;
|
||||
+ ID3D11RenderTargetView **render_target_views;
|
||||
+ ID3D11DepthStencilView *depth_stencil_view;
|
||||
+ UINT unordered_access_view_start_slot;
|
||||
+ UINT unordered_access_view_count;
|
||||
+ ID3D11UnorderedAccessView **unordered_access_views;
|
||||
+ UINT *initial_counts;
|
||||
+ } render_targets_and_unordered_access_views_info;
|
||||
+ struct
|
||||
{
|
||||
ID3D11ComputeShader *shader;
|
||||
/* FIXME: add class instances */
|
||||
@@ -495,6 +506,22 @@ static void free_deferred_calls(struct list *commands)
|
||||
ID3D11DepthStencilView_Release(call->render_target_info.depth_stencil);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_OMSETRENDERTARGETSANDUNORDEREDACCESVIEWS:
|
||||
+ {
|
||||
+ for (i = 0; i < call->render_targets_and_unordered_access_views_info.render_target_view_count; i++)
|
||||
+ {
|
||||
+ if (call->render_targets_and_unordered_access_views_info.render_target_views[i])
|
||||
+ ID3D11RenderTargetView_Release(call->render_targets_and_unordered_access_views_info.render_target_views[i]);
|
||||
+ }
|
||||
+ if (call->render_targets_and_unordered_access_views_info.depth_stencil_view)
|
||||
+ ID3D11DepthStencilView_Release(call->render_targets_and_unordered_access_views_info.depth_stencil_view);
|
||||
+ for (i = 0; i < call->render_targets_and_unordered_access_views_info.unordered_access_view_count; i++)
|
||||
+ {
|
||||
+ if (call->render_targets_and_unordered_access_views_info.unordered_access_views[i])
|
||||
+ ID3D11UnorderedAccessView_Release(call->render_targets_and_unordered_access_views_info.unordered_access_views[i]);
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_COPYRESOURCE:
|
||||
{
|
||||
if (call->copy_resource_info.dst_resource)
|
||||
@@ -764,6 +791,18 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->render_target_info.render_targets, call->render_target_info.depth_stencil);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_OMSETRENDERTARGETSANDUNORDEREDACCESVIEWS:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(iface,
|
||||
+ call->render_targets_and_unordered_access_views_info.render_target_view_count,
|
||||
+ call->render_targets_and_unordered_access_views_info.render_target_views,
|
||||
+ call->render_targets_and_unordered_access_views_info.depth_stencil_view,
|
||||
+ call->render_targets_and_unordered_access_views_info.unordered_access_view_start_slot,
|
||||
+ call->render_targets_and_unordered_access_views_info.unordered_access_view_count,
|
||||
+ call->render_targets_and_unordered_access_views_info.unordered_access_views,
|
||||
+ call->render_targets_and_unordered_access_views_info.initial_counts);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_COPYRESOURCE:
|
||||
{
|
||||
ID3D11DeviceContext_CopyResource(iface,
|
||||
@@ -4443,12 +4482,46 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
|
||||
UINT unordered_access_view_start_slot, UINT unordered_access_view_count,
|
||||
ID3D11UnorderedAccessView *const *unordered_access_views, const UINT *initial_counts)
|
||||
{
|
||||
- FIXME("iface %p, render_target_view_count %u, render_target_views %p, depth_stencil_view %p, "
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+ UINT i;
|
||||
+
|
||||
+ TRACE("iface %p, render_target_view_count %u, render_target_views %p, depth_stencil_view %p, "
|
||||
"unordered_access_view_start_slot %u, unordered_access_view_count %u, unordered_access_views %p, "
|
||||
- "initial_counts %p stub!\n",
|
||||
+ "initial_counts %p.\n",
|
||||
iface, render_target_view_count, render_target_views, depth_stencil_view,
|
||||
unordered_access_view_start_slot, unordered_access_view_count, unordered_access_views,
|
||||
initial_counts);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, sizeof(ID3D11RenderTargetView *) * render_target_view_count +
|
||||
+ (sizeof(ID3D11UnorderedAccessView *) + sizeof(UINT)) * unordered_access_view_count)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_OMSETRENDERTARGETSANDUNORDEREDACCESVIEWS;
|
||||
+ call->render_targets_and_unordered_access_views_info.render_target_view_count = render_target_view_count;
|
||||
+ call->render_targets_and_unordered_access_views_info.unordered_access_view_start_slot = unordered_access_view_start_slot;
|
||||
+ call->render_targets_and_unordered_access_views_info.unordered_access_view_count = unordered_access_view_count;
|
||||
+
|
||||
+ if (depth_stencil_view) ID3D11DepthStencilView_AddRef(depth_stencil_view);
|
||||
+ call->render_targets_and_unordered_access_views_info.depth_stencil_view = depth_stencil_view;
|
||||
+
|
||||
+ call->render_targets_and_unordered_access_views_info.render_target_views = (void *)(call + 1);
|
||||
+ call->render_targets_and_unordered_access_views_info.unordered_access_views =
|
||||
+ (void *)&call->render_targets_and_unordered_access_views_info.render_target_views[render_target_view_count];
|
||||
+ call->render_targets_and_unordered_access_views_info.initial_counts =
|
||||
+ (void *)&call->render_targets_and_unordered_access_views_info.unordered_access_views[unordered_access_view_count];
|
||||
+
|
||||
+ for (i = 0; i < render_target_view_count; i++)
|
||||
+ {
|
||||
+ if (render_target_views[i]) ID3D11RenderTargetView_AddRef(render_target_views[i]);
|
||||
+ call->render_targets_and_unordered_access_views_info.render_target_views[i] = render_target_views[i];
|
||||
+ }
|
||||
+ for (i = 0; i < unordered_access_view_count; i++)
|
||||
+ {
|
||||
+ if (unordered_access_views[i]) ID3D11UnorderedAccessView_AddRef(unordered_access_views[i]);
|
||||
+ call->render_targets_and_unordered_access_views_info.unordered_access_views[i] = unordered_access_views[i];
|
||||
+ call->render_targets_and_unordered_access_views_info.initial_counts[i] = initial_counts[i];
|
||||
+ }
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetBlendState(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,100 @@
|
||||
From 03dc0deedf202014089c67329cdf4796cd723bf0 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Mon, 4 Sep 2017 04:15:31 +0200
|
||||
Subject: d3d11: Implement SOSetTargets for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 48 +++++++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 45 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 34f646231a5..24761aab105 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -77,6 +77,7 @@ enum deferred_cmd
|
||||
DEFERRED_VSSETCONSTANTBUFFERS, /* constant_buffers_info */
|
||||
|
||||
DEFERRED_CSSETUNORDEREDACCESSVIEWS, /* unordered_view */
|
||||
+ DEFERRED_SOSETTARGETS, /* so_set_targets_info */
|
||||
|
||||
DEFERRED_DRAW, /* draw_info */
|
||||
DEFERRED_DRAWINDEXED, /* draw_indexed_info */
|
||||
@@ -204,6 +205,12 @@ struct deferred_call
|
||||
UINT *initial_counts;
|
||||
} render_targets_and_unordered_access_views_info;
|
||||
struct
|
||||
+ {
|
||||
+ UINT buffer_count;
|
||||
+ ID3D11Buffer **buffers;
|
||||
+ UINT *offsets;
|
||||
+ } so_set_targets_info;
|
||||
+ struct
|
||||
{
|
||||
ID3D11ComputeShader *shader;
|
||||
/* FIXME: add class instances */
|
||||
@@ -647,6 +654,15 @@ static void free_deferred_calls(struct list *commands)
|
||||
}
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_SOSETTARGETS:
|
||||
+ {
|
||||
+ for (i = 0; i < call->so_set_targets_info.buffer_count; i++)
|
||||
+ {
|
||||
+ if (call->so_set_targets_info.buffers[i])
|
||||
+ ID3D11Buffer_Release(call->so_set_targets_info.buffers[i]);
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_DRAW:
|
||||
case DEFERRED_DRAWINDEXED:
|
||||
case DEFERRED_DRAWINDEXEDINSTANCED:
|
||||
@@ -992,6 +1008,14 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->unordered_view.num_views, call->unordered_view.views, call->unordered_view.initial_counts);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_SOSETTARGETS:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_SOSetTargets(iface,
|
||||
+ call->so_set_targets_info.buffer_count,
|
||||
+ call->so_set_targets_info.buffers,
|
||||
+ call->so_set_targets_info.offsets);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_DRAW:
|
||||
{
|
||||
ID3D11DeviceContext_Draw(iface, call->draw_info.count, call->draw_info.start);
|
||||
@@ -4567,10 +4591,28 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetDepthStencilState(ID3D
|
||||
call->stencil_state_info.stencil_ref = stencil_ref;
|
||||
}
|
||||
|
||||
-static void STDMETHODCALLTYPE d3d11_deferred_context_SOSetTargets(ID3D11DeviceContext *iface, UINT buffer_count,
|
||||
- ID3D11Buffer *const *buffers, const UINT *offsets)
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_SOSetTargets(ID3D11DeviceContext *iface,
|
||||
+ UINT buffer_count, ID3D11Buffer *const *buffers, const UINT *offsets)
|
||||
{
|
||||
- FIXME("iface %p, buffer_count %u, buffers %p, offsets %p stub!\n", iface, buffer_count, buffers, offsets);
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+ UINT i;
|
||||
+
|
||||
+ TRACE("iface %p, buffer_count %u, buffers %p, offsets %p.\n", iface, buffer_count, buffers, offsets);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, (sizeof(ID3D11Buffer *) + sizeof(UINT)) * buffer_count)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_SOSETTARGETS;
|
||||
+ call->so_set_targets_info.buffers = (void *)(call + 1);
|
||||
+ call->so_set_targets_info.offsets = (void *)&call->so_set_targets_info.buffers[buffer_count];
|
||||
+
|
||||
+ for (i = 0; i < buffer_count; i++)
|
||||
+ {
|
||||
+ if (buffers[i]) ID3D11Buffer_AddRef(buffers[i]);
|
||||
+ call->so_set_targets_info.buffers[i] = buffers[i];
|
||||
+ call->so_set_targets_info.offsets[i] = offsets[i];
|
||||
+ }
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DrawAuto(ID3D11DeviceContext *iface)
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,80 @@
|
||||
From 1d3919ae00962c215562a5f37033d87b461c33bd Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Mon, 4 Sep 2017 04:19:55 +0200
|
||||
Subject: d3d11: Implement GenerateMips for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 29 ++++++++++++++++++++++++++++-
|
||||
1 file changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 24761aab105..e0a65d5fc60 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -78,6 +78,7 @@ enum deferred_cmd
|
||||
|
||||
DEFERRED_CSSETUNORDEREDACCESSVIEWS, /* unordered_view */
|
||||
DEFERRED_SOSETTARGETS, /* so_set_targets_info */
|
||||
+ DEFERRED_GENERATEMIPS, /* generate_mips_info */
|
||||
|
||||
DEFERRED_DRAW, /* draw_info */
|
||||
DEFERRED_DRAWINDEXED, /* draw_indexed_info */
|
||||
@@ -312,6 +313,10 @@ struct deferred_call
|
||||
UINT count_z;
|
||||
} dispatch_info;
|
||||
struct
|
||||
+ {
|
||||
+ ID3D11ShaderResourceView *view;
|
||||
+ } generate_mips_info;
|
||||
+ struct
|
||||
{
|
||||
ID3D11RenderTargetView *rtv;
|
||||
float color[4];
|
||||
@@ -663,6 +668,12 @@ static void free_deferred_calls(struct list *commands)
|
||||
}
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_GENERATEMIPS:
|
||||
+ {
|
||||
+ if (call->generate_mips_info.view)
|
||||
+ ID3D11ShaderResourceView_Release(call->generate_mips_info.view);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_DRAW:
|
||||
case DEFERRED_DRAWINDEXED:
|
||||
case DEFERRED_DRAWINDEXEDINSTANCED:
|
||||
@@ -1016,6 +1027,12 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->so_set_targets_info.offsets);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_GENERATEMIPS:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_GenerateMips(iface,
|
||||
+ call->generate_mips_info.view);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_DRAW:
|
||||
{
|
||||
ID3D11DeviceContext_Draw(iface, call->draw_info.count, call->draw_info.start);
|
||||
@@ -4904,7 +4921,17 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_ClearDepthStencilView(ID3D1
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_GenerateMips(ID3D11DeviceContext *iface,
|
||||
ID3D11ShaderResourceView *view)
|
||||
{
|
||||
- FIXME("iface %p, view %p stub!\n", iface, view);
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, view %p.\n", iface, view);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_GENERATEMIPS;
|
||||
+ if (view) ID3D11ShaderResourceView_AddRef(view);
|
||||
+ call->generate_mips_info.view = view;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_SetResourceMinLOD(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,83 @@
|
||||
From f35990fe3eaccfbccf458b79f814018e126a46c5 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Mon, 4 Sep 2017 04:22:04 +0200
|
||||
Subject: d3d11: Implement DispatchIndirect for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 32 +++++++++++++++++++++++++++++++-
|
||||
1 file changed, 31 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index e0a65d5fc60..5a4fd13d611 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -90,6 +90,7 @@ enum deferred_cmd
|
||||
|
||||
DEFERRED_MAP, /* map_info */
|
||||
DEFERRED_DISPATCH, /* dispatch_info */
|
||||
+ DEFERRED_DISPATCHINDIRECT, /* dispatch_indirect_info */
|
||||
|
||||
DEFERRED_CLEARSTATE,
|
||||
DEFERRED_CLEARRENDERTARGETVIEW, /* clear_rtv_info */
|
||||
@@ -313,6 +314,11 @@ struct deferred_call
|
||||
UINT count_z;
|
||||
} dispatch_info;
|
||||
struct
|
||||
+ {
|
||||
+ ID3D11Buffer *buffer;
|
||||
+ UINT offset;
|
||||
+ } dispatch_indirect_info;
|
||||
+ struct
|
||||
{
|
||||
ID3D11ShaderResourceView *view;
|
||||
} generate_mips_info;
|
||||
@@ -704,6 +710,12 @@ static void free_deferred_calls(struct list *commands)
|
||||
{
|
||||
break; /* nothing to do */
|
||||
}
|
||||
+ case DEFERRED_DISPATCHINDIRECT:
|
||||
+ {
|
||||
+ if (call->dispatch_indirect_info.buffer)
|
||||
+ ID3D11Buffer_Release(call->dispatch_indirect_info.buffer);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CLEARSTATE:
|
||||
{
|
||||
break; /* nothing to do */
|
||||
@@ -1102,6 +1114,13 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->dispatch_info.count_y, call->dispatch_info.count_z);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_DISPATCHINDIRECT:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_DispatchIndirect(iface,
|
||||
+ call->dispatch_indirect_info.buffer,
|
||||
+ call->dispatch_indirect_info.offset);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CLEARSTATE:
|
||||
{
|
||||
ID3D11DeviceContext_ClearState(iface);
|
||||
@@ -4700,7 +4719,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Dispatch(ID3D11DeviceContex
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11DeviceContext *iface,
|
||||
ID3D11Buffer *buffer, UINT offset)
|
||||
{
|
||||
- FIXME("iface %p, buffer %p, offset %u stub!\n", iface, buffer, offset);
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, buffer %p, offset %u.\n", iface, buffer, offset);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_DISPATCHINDIRECT;
|
||||
+ if (buffer) ID3D11Buffer_AddRef(buffer);
|
||||
+ call->dispatch_indirect_info.buffer = buffer;
|
||||
+ call->dispatch_indirect_info.offset = offset;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetState(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,83 @@
|
||||
From 28981beff516369645e80375e6e29b4a6d806dcb Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Specht <jojos_band@gmx.net>
|
||||
Date: Mon, 4 Sep 2017 04:24:37 +0200
|
||||
Subject: d3d11: Implement SetPredication for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 32 +++++++++++++++++++++++++++++++-
|
||||
1 file changed, 31 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 5a4fd13d611..eb32c50ea8b 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -91,6 +91,7 @@ enum deferred_cmd
|
||||
DEFERRED_MAP, /* map_info */
|
||||
DEFERRED_DISPATCH, /* dispatch_info */
|
||||
DEFERRED_DISPATCHINDIRECT, /* dispatch_indirect_info */
|
||||
+ DEFERRED_SETPREDICATION, /* set_predication_info */
|
||||
|
||||
DEFERRED_CLEARSTATE,
|
||||
DEFERRED_CLEARRENDERTARGETVIEW, /* clear_rtv_info */
|
||||
@@ -319,6 +320,11 @@ struct deferred_call
|
||||
UINT offset;
|
||||
} dispatch_indirect_info;
|
||||
struct
|
||||
+ {
|
||||
+ ID3D11Predicate *predicate;
|
||||
+ BOOL value;
|
||||
+ } set_predication_info;
|
||||
+ struct
|
||||
{
|
||||
ID3D11ShaderResourceView *view;
|
||||
} generate_mips_info;
|
||||
@@ -716,6 +722,12 @@ static void free_deferred_calls(struct list *commands)
|
||||
ID3D11Buffer_Release(call->dispatch_indirect_info.buffer);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_SETPREDICATION:
|
||||
+ {
|
||||
+ if (call->set_predication_info.predicate)
|
||||
+ ID3D11Predicate_Release(call->set_predication_info.predicate);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CLEARSTATE:
|
||||
{
|
||||
break; /* nothing to do */
|
||||
@@ -1121,6 +1133,13 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->dispatch_indirect_info.offset);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_SETPREDICATION:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_SetPredication(iface,
|
||||
+ call->set_predication_info.predicate,
|
||||
+ call->set_predication_info.value);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CLEARSTATE:
|
||||
{
|
||||
ID3D11DeviceContext_ClearState(iface);
|
||||
@@ -4483,7 +4502,18 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_GetData(ID3D11DeviceCont
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_SetPredication(ID3D11DeviceContext *iface,
|
||||
ID3D11Predicate *predicate, BOOL value)
|
||||
{
|
||||
- FIXME("iface %p, predicate %p, value %#x stub!\n", iface, predicate, value);
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, predicate %p, value %#x.\n", iface, predicate, value);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_SETPREDICATION;
|
||||
+ if (predicate) ID3D11Predicate_AddRef(predicate);
|
||||
+ call->set_predication_info.predicate = predicate;
|
||||
+ call->set_predication_info.value = value;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -0,0 +1,259 @@
|
||||
From c252dab70a66866545221059544881116b49cd08 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 31 Aug 2017 05:04:15 +0200
|
||||
Subject: d3d11: Implement d3d11_deferred_context_UpdateSubresource.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 75 +++++++++++++++++++++++++++++++++++++-
|
||||
dlls/wined3d/resource.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/wined3d/wined3d.spec | 1 +
|
||||
include/wine/wined3d.h | 2 +
|
||||
4 files changed, 170 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index eb32c50ea8b..6812a608856 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -45,6 +45,7 @@ enum deferred_cmd
|
||||
DEFERRED_COPYRESOURCE, /* copy_resource_info */
|
||||
DEFERRED_SETRESOURCEMINLOD, /* set_resource_min_lod_info */
|
||||
DEFERRED_COPYSUBRESOURCEREGION, /* copy_subresource_region_info */
|
||||
+ DEFERRED_UPDATESUBRESOURCE, /* update_subresource_info */
|
||||
DEFERRED_RESOLVESUBRESOURCE, /* resolve_subresource_info */
|
||||
DEFERRED_COPYSTRUCTURECOUNT, /* copy_structure_count_info */
|
||||
|
||||
@@ -184,6 +185,15 @@ struct deferred_call
|
||||
D3D11_BOX *src_box;
|
||||
} copy_subresource_region_info;
|
||||
struct
|
||||
+ {
|
||||
+ ID3D11Resource *resource;
|
||||
+ UINT subresource_idx;
|
||||
+ D3D11_BOX *box;
|
||||
+ void *data;
|
||||
+ UINT row_pitch;
|
||||
+ UINT depth_pitch;
|
||||
+ } update_subresource_info;
|
||||
+ struct
|
||||
{
|
||||
ID3D11Resource *dst_resource;
|
||||
UINT dst_subresource_idx;
|
||||
@@ -568,6 +578,12 @@ static void free_deferred_calls(struct list *commands)
|
||||
ID3D11Resource_Release(call->copy_subresource_region_info.src_resource);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_UPDATESUBRESOURCE:
|
||||
+ {
|
||||
+ if (call->update_subresource_info.resource)
|
||||
+ ID3D11Resource_Release(call->update_subresource_info.resource);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_RESOLVESUBRESOURCE:
|
||||
{
|
||||
if (call->resolve_subresource_info.dst_resource)
|
||||
@@ -899,6 +915,17 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->copy_structure_count_info.src_view);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_UPDATESUBRESOURCE:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_UpdateSubresource(iface,
|
||||
+ call->update_subresource_info.resource,
|
||||
+ call->update_subresource_info.subresource_idx,
|
||||
+ call->update_subresource_info.box,
|
||||
+ call->update_subresource_info.data,
|
||||
+ call->update_subresource_info.row_pitch,
|
||||
+ call->update_subresource_info.depth_pitch);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CSSETSHADER:
|
||||
{
|
||||
ID3D11DeviceContext_CSSetShader(iface, call->cs_info.shader, NULL, 0);
|
||||
@@ -4873,8 +4900,54 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_UpdateSubresource(ID3D11Dev
|
||||
ID3D11Resource *resource, UINT subresource_idx, const D3D11_BOX *box,
|
||||
const void *data, UINT row_pitch, UINT depth_pitch)
|
||||
{
|
||||
- FIXME("iface %p, resource %p, subresource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u stub!\n",
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct wined3d_resource *wined3d_resource;
|
||||
+ struct wined3d_box wined3d_box;
|
||||
+ struct deferred_call *call;
|
||||
+ UINT size;
|
||||
+
|
||||
+ TRACE("iface %p, resource %p, subresource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u.\n",
|
||||
iface, resource, subresource_idx, box, data, row_pitch, depth_pitch);
|
||||
+
|
||||
+ if (box)
|
||||
+ wined3d_box_set(&wined3d_box, box->left, box->top, box->right, box->bottom, box->front, box->back);
|
||||
+
|
||||
+ wined3d_resource = wined3d_resource_from_d3d11_resource(resource);
|
||||
+ wined3d_mutex_lock();
|
||||
+ size = wined3d_resource_update_info(wined3d_resource, subresource_idx,
|
||||
+ box ? &wined3d_box : NULL, row_pitch, depth_pitch);
|
||||
+ wined3d_mutex_unlock();
|
||||
+
|
||||
+ if (!size)
|
||||
+ {
|
||||
+ FIXME("Failed to calculate size of data\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, size + (box ? sizeof(D3D11_BOX) : 0))))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_UPDATESUBRESOURCE;
|
||||
+ call->update_subresource_info.resource = resource;
|
||||
+ call->update_subresource_info.subresource_idx = subresource_idx;
|
||||
+ call->update_subresource_info.row_pitch = row_pitch;
|
||||
+ call->update_subresource_info.depth_pitch = depth_pitch;
|
||||
+
|
||||
+ ID3D11Resource_AddRef(resource);
|
||||
+
|
||||
+ if (box)
|
||||
+ {
|
||||
+ call->update_subresource_info.box = (void *)(call + 1);
|
||||
+ call->update_subresource_info.data = (void *)(call->update_subresource_info.box + 1);
|
||||
+ *call->update_subresource_info.box = *box;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ call->update_subresource_info.box = NULL;
|
||||
+ call->update_subresource_info.data = (void *)(call + 1);
|
||||
+ }
|
||||
+
|
||||
+ memcpy(call->update_subresource_info.data, data, size);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CopyStructureCount(ID3D11DeviceContext *iface,
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index ce522ddc944..78deb5078b1 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -382,6 +382,99 @@ HRESULT CDECL wined3d_resource_unmap(struct wined3d_resource *resource, unsigned
|
||||
return wined3d_cs_unmap(resource->device->cs, resource, sub_resource_idx);
|
||||
}
|
||||
|
||||
+UINT CDECL wined3d_resource_update_info(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
+ const struct wined3d_box *box, unsigned int row_pitch, unsigned int depth_pitch)
|
||||
+{
|
||||
+ unsigned int width, height, depth;
|
||||
+ struct wined3d_box b;
|
||||
+ UINT data_size;
|
||||
+
|
||||
+ TRACE("resource %p, sub_resource_idx %u, box %s, row_pitch %u, depth_pitch %u.\n",
|
||||
+ resource, sub_resource_idx, debug_box(box), row_pitch, depth_pitch);
|
||||
+
|
||||
+ if (resource->type == WINED3D_RTYPE_BUFFER)
|
||||
+ {
|
||||
+ if (sub_resource_idx > 0)
|
||||
+ {
|
||||
+ WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ width = resource->size;
|
||||
+ height = 1;
|
||||
+ depth = 1;
|
||||
+ }
|
||||
+ else if (resource->type == WINED3D_RTYPE_TEXTURE_1D ||
|
||||
+ resource->type == WINED3D_RTYPE_TEXTURE_2D || resource->type == WINED3D_RTYPE_TEXTURE_3D)
|
||||
+ {
|
||||
+ struct wined3d_texture *texture = texture_from_resource(resource);
|
||||
+ unsigned int level;
|
||||
+
|
||||
+ if (sub_resource_idx >= texture->level_count * texture->layer_count)
|
||||
+ {
|
||||
+ WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ level = sub_resource_idx % texture->level_count;
|
||||
+ width = wined3d_texture_get_level_width(texture, level);
|
||||
+ height = wined3d_texture_get_level_height(texture, level);
|
||||
+ depth = wined3d_texture_get_level_depth(texture, level);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ FIXME("Not implemented for %s resources.\n", debug_d3dresourcetype(resource->type));
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (!box)
|
||||
+ {
|
||||
+ wined3d_box_set(&b, 0, 0, width, height, 0, depth);
|
||||
+ box = &b;
|
||||
+ }
|
||||
+ else if (box->left >= box->right || box->right > width
|
||||
+ || box->top >= box->bottom || box->bottom > height
|
||||
+ || box->front >= box->back || box->back > depth)
|
||||
+ {
|
||||
+ WARN("Invalid box %s specified.\n", debug_box(box));
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (resource->format_flags & WINED3DFMT_FLAG_BLOCKS)
|
||||
+ {
|
||||
+ if (resource->type != WINED3D_RTYPE_TEXTURE_2D)
|
||||
+ {
|
||||
+ FIXME("Calculation of block formats not implemented for %s resources.\n", debug_d3dresourcetype(resource->type));
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ height = (box->bottom - box->top + resource->format->block_height - 1) / resource->format->block_height;
|
||||
+ width = (box->right - box->left + resource->format->block_width - 1) / resource->format->block_width;
|
||||
+ return (height - 1) * row_pitch + width * resource->format->block_byte_count;
|
||||
+ }
|
||||
+
|
||||
+ data_size = 0;
|
||||
+ switch (resource->type)
|
||||
+ {
|
||||
+ case WINED3D_RTYPE_TEXTURE_3D:
|
||||
+ data_size += (box->back - box->front - 1) * depth_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:
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return data_size;
|
||||
+}
|
||||
+
|
||||
void CDECL wined3d_resource_preload(struct wined3d_resource *resource)
|
||||
{
|
||||
wined3d_cs_emit_preload_resource(resource->device->cs, resource);
|
||||
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
|
||||
index e8e96bdedb6..e4d5f2ed9ac 100644
|
||||
--- a/dlls/wined3d/wined3d.spec
|
||||
+++ b/dlls/wined3d/wined3d.spec
|
||||
@@ -226,6 +226,7 @@
|
||||
@ cdecl wined3d_resource_set_parent(ptr ptr)
|
||||
@ cdecl wined3d_resource_set_priority(ptr long)
|
||||
@ cdecl wined3d_resource_unmap(ptr long)
|
||||
+@ cdecl wined3d_resource_update_info(ptr long ptr long long)
|
||||
|
||||
@ cdecl wined3d_rendertarget_view_create(ptr ptr ptr ptr ptr)
|
||||
@ cdecl wined3d_rendertarget_view_create_from_sub_resource(ptr long ptr ptr ptr)
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index df587733b20..905f43dbc5a 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -2591,6 +2591,8 @@ void __cdecl wined3d_resource_preload(struct wined3d_resource *resource);
|
||||
void __cdecl wined3d_resource_set_parent(struct wined3d_resource *resource, void *parent);
|
||||
DWORD __cdecl wined3d_resource_set_priority(struct wined3d_resource *resource, DWORD priority);
|
||||
HRESULT __cdecl wined3d_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx);
|
||||
+UINT __cdecl wined3d_resource_update_info(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
+ const struct wined3d_box *box, unsigned int row_pitch, unsigned int depth_pitch);
|
||||
|
||||
HRESULT __cdecl wined3d_rendertarget_view_create(const struct wined3d_view_desc *desc,
|
||||
struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops,
|
||||
--
|
||||
2.14.1
|
||||
|
@ -3798,6 +3798,24 @@ if test "$enable_d3d11_Deferred_Context" -eq 1; then
|
||||
patch_apply d3d11-Deferred_Context/0019-d3d11-Implement-HSSetSamplers-for-deferred-contexts.patch
|
||||
patch_apply d3d11-Deferred_Context/0020-d3d11-Implement-VSSetSamplers-for-deferred-contexts.patch
|
||||
patch_apply d3d11-Deferred_Context/0021-d3d11-Implement-Begin-and-End-for-deferred-contexts.patch
|
||||
patch_apply d3d11-Deferred_Context/0022-d3d11-Implement-CopyResource-for-deferred-contexts.patch
|
||||
patch_apply d3d11-Deferred_Context/0023-d3d11-Implement-SetResourceMinLOD-for-deferred-conte.patch
|
||||
patch_apply d3d11-Deferred_Context/0024-d3d11-Implement-CopySubresourceRegion-for-deferred-c.patch
|
||||
patch_apply d3d11-Deferred_Context/0025-d3d11-Implement-ResolveSubresource-for-deferred-cont.patch
|
||||
patch_apply d3d11-Deferred_Context/0026-d3d11-Implement-CopyStructureCount-for-deferred-cont.patch
|
||||
patch_apply d3d11-Deferred_Context/0027-d3d11-Implement-DrawAuto-for-deferred-contexts.patch
|
||||
patch_apply d3d11-Deferred_Context/0028-d3d11-Implement-DrawInstanced-for-deferred-contexts.patch
|
||||
patch_apply d3d11-Deferred_Context/0029-d3d11-Implement-DrawInstancedIndirect-for-deferred-c.patch
|
||||
patch_apply d3d11-Deferred_Context/0030-d3d11-Implement-DrawIndexedInstancedIndirect-for-def.patch
|
||||
patch_apply d3d11-Deferred_Context/0031-d3d11-Implement-ClearUnorderedAccessViewUint-for-def.patch
|
||||
patch_apply d3d11-Deferred_Context/0032-d3d11-Implement-ClearUnorderedAccessViewFloat-for-de.patch
|
||||
patch_apply d3d11-Deferred_Context/0033-d3d11-Implement-RsSetScissorRects-for-deferred-conte.patch
|
||||
patch_apply d3d11-Deferred_Context/0034-d3d11-Implement-OMSetRenderTargetsAndUnorderedAccess.patch
|
||||
patch_apply d3d11-Deferred_Context/0035-d3d11-Implement-SOSetTargets-for-deferred-contexts.patch
|
||||
patch_apply d3d11-Deferred_Context/0036-d3d11-Implement-GenerateMips-for-deferred-contexts.patch
|
||||
patch_apply d3d11-Deferred_Context/0037-d3d11-Implement-DispatchIndirect-for-deferred-contex.patch
|
||||
patch_apply d3d11-Deferred_Context/0038-d3d11-Implement-SetPredication-for-deferred-contexts.patch
|
||||
patch_apply d3d11-Deferred_Context/0039-d3d11-Implement-d3d11_deferred_context_UpdateSubreso.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Kimmo Myllyvirta", "d3d11: Add stub deferred rendering context.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "wined3d: Add wined3d_resource_map_info function.", 1 },';
|
||||
@ -3820,6 +3838,24 @@ if test "$enable_d3d11_Deferred_Context" -eq 1; then
|
||||
printf '%s\n' '+ { "Kimmo Myllyvirta", "d3d11: Implement HSSetSamplers for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Kimmo Myllyvirta", "d3d11: Implement VSSetSamplers for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Kimmo Myllyvirta", "d3d11: Implement Begin and End for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement CopyResource for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement SetResourceMinLOD for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement CopySubresourceRegion for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement ResolveSubresource for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement CopyStructureCount for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement DrawAuto for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement DrawInstanced for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement DrawInstancedIndirect for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement DrawIndexedInstancedIndirect for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement ClearUnorderedAccessViewUint for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement ClearUnorderedAccessViewFloat for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement RsSetScissorRects for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement OMSetRenderTargetsAndUnorderedAccessViews for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement SOSetTargets for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement GenerateMips for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement DispatchIndirect for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Johannes Specht", "d3d11: Implement SetPredication for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement d3d11_deferred_context_UpdateSubresource.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user