mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
d3d11-Deferred_Context: Update patchset.
This commit is contained in:
parent
fa1d5938f2
commit
b6f7d83896
@ -0,0 +1,81 @@
|
||||
From d9227039538ab84f28787ab5ca7fa74a8755740f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 24 Jan 2017 04:10:12 +0100
|
||||
Subject: d3d11: Implement CSSetShader 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 4ee9d500802..0bb973e3933 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -40,6 +40,7 @@ enum deferred_cmd
|
||||
DEFERRED_OMSETBLENDSTATE, /* blend_state_info */
|
||||
DEFERRED_OMSETRENDERTARGETS, /* render_target_info */
|
||||
|
||||
+ DEFERRED_CSSETSHADER, /* cs_info */
|
||||
DEFERRED_DSSETSHADER, /* ds_info */
|
||||
DEFERRED_HSSETSHADER, /* hs_info */
|
||||
DEFERRED_PSSETSHADER, /* ps_info */
|
||||
@@ -120,6 +121,11 @@ struct deferred_call
|
||||
} render_target_info;
|
||||
struct
|
||||
{
|
||||
+ ID3D11ComputeShader *shader;
|
||||
+ /* FIXME: add class instances */
|
||||
+ } cs_info;
|
||||
+ struct
|
||||
+ {
|
||||
ID3D11DomainShader *shader;
|
||||
/* FIXME: add class instances */
|
||||
} ds_info;
|
||||
@@ -349,6 +355,12 @@ static void free_deferred_calls(struct list *commands)
|
||||
ID3D11DepthStencilView_Release(call->render_target_info.depth_stencil);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_CSSETSHADER:
|
||||
+ {
|
||||
+ if (call->cs_info.shader)
|
||||
+ ID3D11ComputeShader_Release(call->cs_info.shader);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_DSSETSHADER:
|
||||
{
|
||||
if (call->ds_info.shader)
|
||||
@@ -491,6 +503,11 @@ 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_CSSETSHADER:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_CSSetShader(iface, call->cs_info.shader, NULL, 0);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_DSSETSHADER:
|
||||
{
|
||||
ID3D11DeviceContext_DSSetShader(iface, call->ds_info.shader, NULL, 0);
|
||||
@@ -3636,8 +3653,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetUnorderedAccessViews(I
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShader(ID3D11DeviceContext *iface,
|
||||
ID3D11ComputeShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
|
||||
{
|
||||
- FIXME("iface %p, shader %p, class_instances %p, class_instance_count %u stub!\n",
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
|
||||
iface, shader, class_instances, class_instance_count);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_CSSETSHADER;
|
||||
+ if (shader) ID3D11ComputeShader_AddRef(shader);
|
||||
+ call->cs_info.shader = shader;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetSamplers(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.11.0
|
||||
|
@ -0,0 +1,68 @@
|
||||
From 56e9fa8ef7ccfd0d98e29bfac9ee44c08bb8e891 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 24 Jan 2017 04:21:47 +0100
|
||||
Subject: d3d11: Implement CSSetConstantBuffers for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 16 ++++++++++++++--
|
||||
1 file changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 0bb973e3933..38b407b22ee 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -52,6 +52,7 @@ enum deferred_cmd
|
||||
DEFERRED_DSSETSAMPLERS, /* samplers_info */
|
||||
DEFERRED_PSSETSAMPLERS, /* samplers_info */
|
||||
|
||||
+ DEFERRED_CSSETCONSTANTBUFFERS, /* constant_buffers_info */
|
||||
DEFERRED_DSSETCONSTANTBUFFERS, /* constant_buffers_info */
|
||||
DEFERRED_HSSETCONSTANTBUFFERS, /* constant_buffers_info */
|
||||
DEFERRED_PSSETCONSTANTBUFFERS, /* constant_buffers_info */
|
||||
@@ -266,7 +267,7 @@ static void add_deferred_set_samplers(struct d3d11_deferred_context *context, en
|
||||
}
|
||||
}
|
||||
|
||||
-/* for DEFERRED_DSSETCONSTANTBUFFERS, DEFERRED_HSSETCONSTANTBUFFERS,
|
||||
+/* for DEFERRED_CSSETCONSTANTBUFFERS. DEFERRED_DSSETCONSTANTBUFFERS, DEFERRED_HSSETCONSTANTBUFFERS,
|
||||
* DEFERRED_PSSETCONSTANTBUFFERS and DEFERRED_VSSETCONSTANTBUFFERS */
|
||||
static void add_deferred_set_constant_buffers(struct d3d11_deferred_context *context, enum deferred_cmd cmd,
|
||||
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
@@ -405,6 +406,7 @@ static void free_deferred_calls(struct list *commands)
|
||||
}
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_CSSETCONSTANTBUFFERS:
|
||||
case DEFERRED_DSSETCONSTANTBUFFERS:
|
||||
case DEFERRED_HSSETCONSTANTBUFFERS:
|
||||
case DEFERRED_PSSETCONSTANTBUFFERS:
|
||||
@@ -552,6 +554,12 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->samplers_info.num_samplers, call->samplers_info.samplers);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_CSSETCONSTANTBUFFERS:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_CSSetConstantBuffers(iface, call->constant_buffers_info.start_slot,
|
||||
+ call->constant_buffers_info.num_buffers, call->constant_buffers_info.buffers);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_DSSETCONSTANTBUFFERS:
|
||||
{
|
||||
ID3D11DeviceContext_DSSetConstantBuffers(iface, call->constant_buffers_info.start_slot,
|
||||
@@ -3677,8 +3685,12 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetSamplers(ID3D11DeviceC
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
{
|
||||
- FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+
|
||||
+ TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
|
||||
iface, start_slot, buffer_count, buffers);
|
||||
+
|
||||
+ add_deferred_set_constant_buffers(context, DEFERRED_CSSETCONSTANTBUFFERS, start_slot, buffer_count, buffers);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_VSGetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.11.0
|
||||
|
@ -0,0 +1,82 @@
|
||||
From aab89808ea9387070c3ac1a1be56ac498538c80e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 24 Jan 2017 04:29:10 +0100
|
||||
Subject: d3d11: Implement Dispatch 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 38b407b22ee..644728f178a 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -62,6 +62,7 @@ enum deferred_cmd
|
||||
DEFERRED_DRAWINDEXEDINSTANCED, /* draw_indexed_inst_info */
|
||||
|
||||
DEFERRED_MAP, /* map_info */
|
||||
+ DEFERRED_DISPATCH, /* dispatch_info */
|
||||
|
||||
DEFERRED_CLEARSTATE,
|
||||
};
|
||||
@@ -186,6 +187,12 @@ struct deferred_call
|
||||
void *buffer;
|
||||
UINT size;
|
||||
} map_info;
|
||||
+ struct
|
||||
+ {
|
||||
+ UINT count_x;
|
||||
+ UINT count_y;
|
||||
+ UINT count_z;
|
||||
+ } dispatch_info;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -429,6 +436,10 @@ static void free_deferred_calls(struct list *commands)
|
||||
ID3D11Resource_Release(call->map_info.resource);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_DISPATCH:
|
||||
+ {
|
||||
+ break; /* nothing to do */
|
||||
+ }
|
||||
case DEFERRED_CLEARSTATE:
|
||||
{
|
||||
break; /* nothing to do */
|
||||
@@ -614,6 +625,12 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_DISPATCH:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_Dispatch(iface, call->dispatch_info.count_x,
|
||||
+ call->dispatch_info.count_y, call->dispatch_info.count_z);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_CLEARSTATE:
|
||||
{
|
||||
ID3D11DeviceContext_ClearState(iface);
|
||||
@@ -3407,8 +3424,19 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstancedIndirect(ID3D1
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Dispatch(ID3D11DeviceContext *iface,
|
||||
UINT thread_group_count_x, UINT thread_group_count_y, UINT thread_group_count_z)
|
||||
{
|
||||
- FIXME("iface %p, thread_group_count_x %u, thread_group_count_y %u, thread_group_count_z %u stub!\n",
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, thread_group_count_x %u, thread_group_count_y %u, thread_group_count_z %u.\n",
|
||||
iface, thread_group_count_x, thread_group_count_y, thread_group_count_z);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_DISPATCH;
|
||||
+ call->dispatch_info.count_x = thread_group_count_x;
|
||||
+ call->dispatch_info.count_y = thread_group_count_y;
|
||||
+ call->dispatch_info.count_z = thread_group_count_z;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.11.0
|
||||
|
@ -0,0 +1,97 @@
|
||||
From a36710e9b8b7c3bef157b29baac3911c633f8e38 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 24 Jan 2017 04:48:56 +0100
|
||||
Subject: d3d11: Implement CSSetUnorderedAccessViews for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 45 ++++++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 44 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 644728f178a..8dd19910b7c 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -58,6 +58,8 @@ enum deferred_cmd
|
||||
DEFERRED_PSSETCONSTANTBUFFERS, /* constant_buffers_info */
|
||||
DEFERRED_VSSETCONSTANTBUFFERS, /* constant_buffers_info */
|
||||
|
||||
+ DEFERRED_CSSETUNORDEREDACCESSVIEWS, /* unordered_view */
|
||||
+
|
||||
DEFERRED_DRAWINDEXED, /* draw_indexed_info */
|
||||
DEFERRED_DRAWINDEXEDINSTANCED, /* draw_indexed_inst_info */
|
||||
|
||||
@@ -166,6 +168,13 @@ struct deferred_call
|
||||
} constant_buffers_info;
|
||||
struct
|
||||
{
|
||||
+ UINT start_slot;
|
||||
+ UINT num_views;
|
||||
+ ID3D11UnorderedAccessView **views;
|
||||
+ UINT *initial_counts;
|
||||
+ } unordered_view;
|
||||
+ struct
|
||||
+ {
|
||||
UINT count;
|
||||
UINT start_index;
|
||||
INT base_vertex;
|
||||
@@ -426,6 +435,15 @@ static void free_deferred_calls(struct list *commands)
|
||||
}
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_CSSETUNORDEREDACCESSVIEWS:
|
||||
+ {
|
||||
+ for (i = 0; i < call->unordered_view.num_views; i++)
|
||||
+ {
|
||||
+ if (call->unordered_view.views[i])
|
||||
+ ID3D11UnorderedAccessView_Release(call->unordered_view.views[i]);
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_DRAWINDEXED:
|
||||
case DEFERRED_DRAWINDEXEDINSTANCED:
|
||||
{
|
||||
@@ -595,6 +613,12 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->constant_buffers_info.num_buffers, call->constant_buffers_info.buffers);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_CSSETUNORDEREDACCESSVIEWS:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_CSSetUnorderedAccessViews(iface, call->unordered_view.start_slot,
|
||||
+ call->unordered_view.num_views, call->unordered_view.views, call->unordered_view.initial_counts);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_DRAWINDEXED:
|
||||
{
|
||||
ID3D11DeviceContext_DrawIndexed(iface, call->draw_indexed_info.count,
|
||||
@@ -3682,8 +3706,27 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShaderResources(ID3D11
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetUnorderedAccessViews(ID3D11DeviceContext *iface,
|
||||
UINT start_slot, UINT view_count, ID3D11UnorderedAccessView *const *views, const UINT *initial_counts)
|
||||
{
|
||||
- FIXME("iface %p, start_slot %u, view_count %u, views %p, initial_counts %p stub!\n",
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+ int i;
|
||||
+
|
||||
+ TRACE("iface %p, start_slot %u, view_count %u, views %p, initial_counts %p.\n",
|
||||
iface, start_slot, view_count, views, initial_counts);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, view_count * (sizeof(*views) + sizeof(UINT)))))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_CSSETUNORDEREDACCESSVIEWS;
|
||||
+ call->unordered_view.start_slot = start_slot;
|
||||
+ call->unordered_view.num_views = view_count;
|
||||
+ call->unordered_view.views = (void *)(call + 1);
|
||||
+ call->unordered_view.initial_counts = (void *)&call->unordered_view.views[view_count];
|
||||
+ for (i = 0; i < view_count; i++)
|
||||
+ {
|
||||
+ if (views[i]) ID3D11UnorderedAccessView_AddRef(views[i]);
|
||||
+ call->unordered_view.views[i] = views[i];
|
||||
+ call->unordered_view.initial_counts[i] = initial_counts[i];
|
||||
+ }
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShader(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.11.0
|
||||
|
@ -0,0 +1,85 @@
|
||||
From 8adc88c6d9ab48d4014486775fcff6d869ae44ed Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 24 Jan 2017 05:06:12 +0100
|
||||
Subject: d3d11: Implement ClearRenderTargetView for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 33 ++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 32 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 8dd19910b7c..46dddbd4d6c 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -67,6 +67,7 @@ enum deferred_cmd
|
||||
DEFERRED_DISPATCH, /* dispatch_info */
|
||||
|
||||
DEFERRED_CLEARSTATE,
|
||||
+ DEFERRED_CLEARRENDERTARGETVIEW, /* clear_rtv_info */
|
||||
};
|
||||
|
||||
struct deferred_call
|
||||
@@ -202,6 +203,11 @@ struct deferred_call
|
||||
UINT count_y;
|
||||
UINT count_z;
|
||||
} dispatch_info;
|
||||
+ struct
|
||||
+ {
|
||||
+ ID3D11RenderTargetView *rtv;
|
||||
+ float color[4];
|
||||
+ } clear_rtv_info;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -462,6 +468,12 @@ static void free_deferred_calls(struct list *commands)
|
||||
{
|
||||
break; /* nothing to do */
|
||||
}
|
||||
+ case DEFERRED_CLEARRENDERTARGETVIEW:
|
||||
+ {
|
||||
+ if (call->clear_rtv_info.rtv)
|
||||
+ ID3D11RenderTargetView_Release(call->clear_rtv_info.rtv);
|
||||
+ break;
|
||||
+ }
|
||||
default:
|
||||
{
|
||||
FIXME("Unimplemented command type %u\n", call->cmd);
|
||||
@@ -660,6 +672,12 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
ID3D11DeviceContext_ClearState(iface);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_CLEARRENDERTARGETVIEW:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_ClearRenderTargetView(iface, call->clear_rtv_info.rtv,
|
||||
+ call->clear_rtv_info.color);
|
||||
+ break;
|
||||
+ }
|
||||
default:
|
||||
{
|
||||
FIXME("Unimplemented command type %u\n", call->cmd);
|
||||
@@ -3542,8 +3560,21 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CopyStructureCount(ID3D11De
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearRenderTargetView(ID3D11DeviceContext *iface,
|
||||
ID3D11RenderTargetView *render_target_view, const float color_rgba[4])
|
||||
{
|
||||
- FIXME("iface %p, render_target_view %p, color_rgba %s stub!\n",
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+ int i;
|
||||
+
|
||||
+ TRACE("iface %p, render_target_view %p, color_rgba %s.\n",
|
||||
iface, render_target_view, debug_float4(color_rgba));
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_CLEARRENDERTARGETVIEW;
|
||||
+ if (render_target_view) ID3D11RenderTargetView_AddRef(render_target_view);
|
||||
+ call->clear_rtv_info.rtv = render_target_view;
|
||||
+ for (i = 0; i < 4; i++)
|
||||
+ call->clear_rtv_info.color[i] = color_rgba[i];
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearUnorderedAccessViewUint(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.11.0
|
||||
|
@ -0,0 +1,76 @@
|
||||
From de1e3912b0b481e70ab6a4f739e8b2441f741be7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 24 Jan 2017 05:13:46 +0100
|
||||
Subject: d3d11: Implement Draw for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 24 +++++++++++++++++++++++-
|
||||
1 file changed, 23 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 46dddbd4d6c..1dfd6de7bde 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -60,6 +60,7 @@ enum deferred_cmd
|
||||
|
||||
DEFERRED_CSSETUNORDEREDACCESSVIEWS, /* unordered_view */
|
||||
|
||||
+ DEFERRED_DRAW, /* draw_info */
|
||||
DEFERRED_DRAWINDEXED, /* draw_indexed_info */
|
||||
DEFERRED_DRAWINDEXEDINSTANCED, /* draw_indexed_inst_info */
|
||||
|
||||
@@ -177,6 +178,11 @@ struct deferred_call
|
||||
struct
|
||||
{
|
||||
UINT count;
|
||||
+ UINT start;
|
||||
+ } draw_info;
|
||||
+ struct
|
||||
+ {
|
||||
+ UINT count;
|
||||
UINT start_index;
|
||||
INT base_vertex;
|
||||
} draw_indexed_info;
|
||||
@@ -450,6 +456,7 @@ static void free_deferred_calls(struct list *commands)
|
||||
}
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_DRAW:
|
||||
case DEFERRED_DRAWINDEXED:
|
||||
case DEFERRED_DRAWINDEXEDINSTANCED:
|
||||
{
|
||||
@@ -631,6 +638,11 @@ 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_DRAW:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_Draw(iface, call->draw_info.count, call->draw_info.start);
|
||||
+ break;
|
||||
+ }
|
||||
case DEFERRED_DRAWINDEXED:
|
||||
{
|
||||
ID3D11DeviceContext_DrawIndexed(iface, call->draw_indexed_info.count,
|
||||
@@ -3090,8 +3102,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexed(ID3D11DeviceCon
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *iface,
|
||||
UINT vertex_count, UINT start_vertex_location)
|
||||
{
|
||||
- FIXME("iface %p, vertex_count %u, start_vertex_location %u stub!\n",
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, vertex_count %u, start_vertex_location %u.\n",
|
||||
iface, vertex_count, start_vertex_location);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_DRAW;
|
||||
+ call->draw_info.count = vertex_count;
|
||||
+ call->draw_info.start = start_vertex_location;
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_Map(ID3D11DeviceContext *iface, ID3D11Resource *resource,
|
||||
--
|
||||
2.11.0
|
||||
|
@ -0,0 +1,88 @@
|
||||
From da527f6e90d4f3725882e7501199b0645e52685c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 24 Jan 2017 05:29:10 +0100
|
||||
Subject: d3d11: Implement ClearDepthStencilView for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 36 +++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 35 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 1dfd6de7bde..83d97665ed5 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -69,6 +69,7 @@ enum deferred_cmd
|
||||
|
||||
DEFERRED_CLEARSTATE,
|
||||
DEFERRED_CLEARRENDERTARGETVIEW, /* clear_rtv_info */
|
||||
+ DEFERRED_CLEARDEPTHSTENCILVIEW, /* clear_depth_info */
|
||||
};
|
||||
|
||||
struct deferred_call
|
||||
@@ -214,6 +215,13 @@ struct deferred_call
|
||||
ID3D11RenderTargetView *rtv;
|
||||
float color[4];
|
||||
} clear_rtv_info;
|
||||
+ struct
|
||||
+ {
|
||||
+ ID3D11DepthStencilView *view;
|
||||
+ UINT flags;
|
||||
+ FLOAT depth;
|
||||
+ UINT8 stencil;
|
||||
+ } clear_depth_info;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -481,6 +489,12 @@ static void free_deferred_calls(struct list *commands)
|
||||
ID3D11RenderTargetView_Release(call->clear_rtv_info.rtv);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_CLEARDEPTHSTENCILVIEW:
|
||||
+ {
|
||||
+ if (call->clear_depth_info.view)
|
||||
+ ID3D11DepthStencilView_Release(call->clear_depth_info.view);
|
||||
+ break;
|
||||
+ }
|
||||
default:
|
||||
{
|
||||
FIXME("Unimplemented command type %u\n", call->cmd);
|
||||
@@ -690,6 +704,13 @@ static void exec_deferred_calls(ID3D11DeviceContext *iface, struct list *command
|
||||
call->clear_rtv_info.color);
|
||||
break;
|
||||
}
|
||||
+ case DEFERRED_CLEARDEPTHSTENCILVIEW:
|
||||
+ {
|
||||
+ ID3D11DeviceContext_ClearDepthStencilView(iface, call->clear_depth_info.view,
|
||||
+ call->clear_depth_info.flags, call->clear_depth_info.depth,
|
||||
+ call->clear_depth_info.stencil);
|
||||
+ break;
|
||||
+ }
|
||||
default:
|
||||
{
|
||||
FIXME("Unimplemented command type %u\n", call->cmd);
|
||||
@@ -3616,8 +3637,21 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_ClearUnorderedAccessViewFlo
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearDepthStencilView(ID3D11DeviceContext *iface,
|
||||
ID3D11DepthStencilView *depth_stencil_view, UINT flags, FLOAT depth, UINT8 stencil)
|
||||
{
|
||||
- FIXME("iface %p, depth_stencil_view %p, flags %#x, depth %.8e, stencil %u stub!\n",
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
+ struct deferred_call *call;
|
||||
+
|
||||
+ TRACE("iface %p, depth_stencil_view %p, flags %#x, depth %.8e, stencil %u.\n",
|
||||
iface, depth_stencil_view, flags, depth, stencil);
|
||||
+
|
||||
+ if (!(call = add_deferred_call(context, 0)))
|
||||
+ return;
|
||||
+
|
||||
+ call->cmd = DEFERRED_CLEARDEPTHSTENCILVIEW;
|
||||
+ if (depth_stencil_view) ID3D11DepthStencilView_AddRef(depth_stencil_view);
|
||||
+ call->clear_depth_info.view = depth_stencil_view;
|
||||
+ call->clear_depth_info.flags = flags;
|
||||
+ call->clear_depth_info.depth = depth;
|
||||
+ call->clear_depth_info.stencil = stencil;
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_GenerateMips(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.11.0
|
||||
|
@ -0,0 +1,38 @@
|
||||
From a911b0d8c83dae701997bbbc476b55376727c647 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 24 Jan 2017 11:52:50 +0100
|
||||
Subject: d3d11: Simplify d3d11_deferred_context_IASetVertexBuffers.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 10 ++++------
|
||||
1 file changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 83d97665ed5..7cd16c37470 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -3252,17 +3252,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_IASetVertexBuffers(ID3D11De
|
||||
call->vbuffer_info.num_buffers = buffer_count;
|
||||
|
||||
call->vbuffer_info.buffers = (void *)(call + 1);
|
||||
+ call->vbuffer_info.strides = (void *)&call->vbuffer_info.buffers[buffer_count];
|
||||
+ call->vbuffer_info.offsets = (void *)&call->vbuffer_info.strides[buffer_count];
|
||||
for (i = 0; i < buffer_count; i++)
|
||||
{
|
||||
if (buffers[i]) ID3D11Buffer_AddRef(buffers[i]);
|
||||
call->vbuffer_info.buffers[i] = buffers[i];
|
||||
+ call->vbuffer_info.strides[i] = strides[i];
|
||||
+ call->vbuffer_info.offsets[i] = offsets[i];
|
||||
}
|
||||
-
|
||||
- call->vbuffer_info.strides = (void *)((char *)call->vbuffer_info.buffers + buffer_count * sizeof(*buffers));
|
||||
- memcpy(call->vbuffer_info.strides, strides, sizeof(UINT) * buffer_count);
|
||||
-
|
||||
- call->vbuffer_info.offsets = (void *)((char *)call->vbuffer_info.strides + buffer_count * sizeof(UINT));
|
||||
- memcpy(call->vbuffer_info.offsets, offsets, sizeof(UINT) * buffer_count);
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_IASetIndexBuffer(ID3D11DeviceContext *iface,
|
||||
--
|
||||
2.11.0
|
||||
|
@ -3127,10 +3127,26 @@ if test "$enable_d3d11_Deferred_Context" -eq 1; then
|
||||
patch_apply d3d11-Deferred_Context/0001-d3d11-Add-stub-deferred-rendering-context.patch
|
||||
patch_apply d3d11-Deferred_Context/0002-wined3d-Add-wined3d_resource_map_info-function.patch
|
||||
patch_apply d3d11-Deferred_Context/0003-d3d11-Initial-implementation-for-deferred-contexts.patch
|
||||
patch_apply d3d11-Deferred_Context/0004-d3d11-Implement-CSSetShader-for-deferred-contexts.patch
|
||||
patch_apply d3d11-Deferred_Context/0005-d3d11-Implement-CSSetConstantBuffers-for-deferred-co.patch
|
||||
patch_apply d3d11-Deferred_Context/0006-d3d11-Implement-Dispatch-for-deferred-contexts.patch
|
||||
patch_apply d3d11-Deferred_Context/0007-d3d11-Implement-CSSetUnorderedAccessViews-for-deferr.patch
|
||||
patch_apply d3d11-Deferred_Context/0008-d3d11-Implement-ClearRenderTargetView-for-deferred-c.patch
|
||||
patch_apply d3d11-Deferred_Context/0009-d3d11-Implement-Draw-for-deferred-contexts.patch
|
||||
patch_apply d3d11-Deferred_Context/0010-d3d11-Implement-ClearDepthStencilView-for-deferred-c.patch
|
||||
patch_apply d3d11-Deferred_Context/0011-d3d11-Simplify-d3d11_deferred_context_IASetVertexBuf.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 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "d3d11: Initial implementation for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement CSSetShader for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement CSSetConstantBuffers for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement Dispatch for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement CSSetUnorderedAccessViews for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement ClearRenderTargetView for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement Draw for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement ClearDepthStencilView for deferred contexts.", 1 },';
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "d3d11: Simplify d3d11_deferred_context_IASetVertexBuffers.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user