mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 1649389edca12d2998f72a159b2bbbf247176163.
This commit is contained in:
parent
43a3110e95
commit
9a7b25dfd2
@ -1,20 +1,20 @@
|
||||
From 896b9be78dfd979ddea8f098ae66473956d4147c Mon Sep 17 00:00:00 2001
|
||||
From db0d249ec00a19f9ffbe26ee966eb222921fb36e Mon Sep 17 00:00:00 2001
|
||||
From: Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com>
|
||||
Date: Sat, 24 Sep 2016 06:51:24 +0300
|
||||
Subject: [PATCH] d3d11: Add stub deferred rendering context.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 1268 +++++++++++++++++++++++++++++++++-----
|
||||
dlls/d3d11/device.c | 1270 +++++++++++++++++++++++++++++++++-----
|
||||
dlls/d3d11/tests/d3d11.c | 4 +-
|
||||
2 files changed, 1132 insertions(+), 140 deletions(-)
|
||||
2 files changed, 1133 insertions(+), 141 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 31c7f35fc25..dca5a88caa0 100644
|
||||
index 066bf9880c4..454003128dc 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -22,6 +22,16 @@
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d11);
|
||||
@@ -48,6 +48,16 @@ static BOOL d3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, S
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+/* ID3D11DeviceContext - deferred context */
|
||||
+struct d3d11_deferred_context
|
||||
@ -29,7 +29,7 @@ index 31c7f35fc25..dca5a88caa0 100644
|
||||
static void STDMETHODCALLTYPE d3d_null_wined3d_object_destroyed(void *parent) {}
|
||||
|
||||
static const struct wined3d_parent_ops d3d_null_wined3d_parent_ops =
|
||||
@@ -2883,218 +2893,1186 @@ static void d3d11_immediate_context_destroy(struct d3d11_immediate_context *cont
|
||||
@@ -3114,218 +3124,1186 @@ static void d3d11_immediate_context_destroy(struct d3d11_immediate_context *cont
|
||||
wined3d_private_store_cleanup(&context->private_store);
|
||||
}
|
||||
|
||||
@ -130,11 +130,11 @@ index 31c7f35fc25..dca5a88caa0 100644
|
||||
- HRESULT hr;
|
||||
-
|
||||
- TRACE("iface %p, desc %p, data %p, texture %p.\n", iface, desc, data, texture);
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
|
||||
-
|
||||
- if (FAILED(hr = d3d_texture2d_create(device, desc, data, &object)))
|
||||
- return hr;
|
||||
-
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
|
||||
- *texture = &object->ID3D11Texture2D_iface;
|
||||
+ TRACE("iface %p, device %p.\n", iface, device);
|
||||
|
||||
@ -151,13 +151,13 @@ index 31c7f35fc25..dca5a88caa0 100644
|
||||
- struct d3d_device *device = impl_from_ID3D11Device2(iface);
|
||||
- struct d3d_texture3d *object;
|
||||
- HRESULT hr;
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
|
||||
-
|
||||
- TRACE("iface %p, desc %p, data %p, texture %p.\n", iface, desc, data, texture);
|
||||
-
|
||||
- if (FAILED(hr = d3d_texture3d_create(device, desc, data, &object)))
|
||||
- return hr;
|
||||
-
|
||||
+ struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
|
||||
|
||||
- *texture = &object->ID3D11Texture3D_iface;
|
||||
+ TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
|
||||
|
||||
@ -205,11 +205,14 @@ index 31c7f35fc25..dca5a88caa0 100644
|
||||
- struct d3d_device *device = impl_from_ID3D11Device2(iface);
|
||||
- struct d3d11_unordered_access_view *object;
|
||||
- HRESULT hr;
|
||||
-
|
||||
- TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
|
||||
+ FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
|
||||
+ iface, start_slot, buffer_count, buffers);
|
||||
+}
|
||||
|
||||
- TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
|
||||
- if (FAILED(hr = d3d11_unordered_access_view_create(device, resource, desc, &object)))
|
||||
- return hr;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
+ UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
|
||||
+{
|
||||
@ -217,8 +220,7 @@ index 31c7f35fc25..dca5a88caa0 100644
|
||||
+ iface, start_slot, view_count, views);
|
||||
+}
|
||||
|
||||
- if (FAILED(hr = d3d11_unordered_access_view_create(device, resource, desc, &object)))
|
||||
- return hr;
|
||||
- *view = &object->ID3D11UnorderedAccessView_iface;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetShader(ID3D11DeviceContext *iface,
|
||||
+ ID3D11PixelShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
|
||||
+{
|
||||
@ -226,35 +228,36 @@ index 31c7f35fc25..dca5a88caa0 100644
|
||||
+ iface, shader, class_instances, class_instance_count);
|
||||
+}
|
||||
|
||||
- *view = &object->ID3D11UnorderedAccessView_iface;
|
||||
- return S_OK;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetSamplers(ID3D11DeviceContext *iface,
|
||||
+ UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
|
||||
+{
|
||||
+ FIXME("iface %p, start_slot %u, sampler_count %u, samplers %p stub!\n",
|
||||
+ iface, start_slot, sampler_count, samplers);
|
||||
+}
|
||||
|
||||
- return S_OK;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShader(ID3D11DeviceContext *iface,
|
||||
+ ID3D11VertexShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
|
||||
+{
|
||||
+ FIXME("iface %p, shader %p, class_instances %p, class_instance_count %u stub!\n",
|
||||
+ iface, shader, class_instances, class_instance_count);
|
||||
}
|
||||
|
||||
-static HRESULT STDMETHODCALLTYPE d3d11_device_CreateRenderTargetView(ID3D11Device2 *iface,
|
||||
- ID3D11Resource *resource, const D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3D11RenderTargetView **view)
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexed(ID3D11DeviceContext *iface,
|
||||
+ UINT index_count, UINT start_index_location, INT base_vertex_location)
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShader(ID3D11DeviceContext *iface,
|
||||
+ ID3D11VertexShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
|
||||
{
|
||||
- struct d3d_device *device = impl_from_ID3D11Device2(iface);
|
||||
- struct d3d_rendertarget_view *object;
|
||||
- HRESULT hr;
|
||||
+ FIXME("iface %p, shader %p, class_instances %p, class_instance_count %u stub!\n",
|
||||
+ iface, shader, class_instances, class_instance_count);
|
||||
+}
|
||||
|
||||
- TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexed(ID3D11DeviceContext *iface,
|
||||
+ UINT index_count, UINT start_index_location, INT base_vertex_location)
|
||||
+{
|
||||
+ FIXME("iface %p, index_count %u, start_index_location %u, base_vertex_location %d stub!\n",
|
||||
+ iface, index_count, start_index_location, base_vertex_location);
|
||||
+}
|
||||
|
||||
- TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
|
||||
- if (!resource)
|
||||
- return E_INVALIDARG;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *iface,
|
||||
+ UINT vertex_count, UINT start_vertex_location)
|
||||
+{
|
||||
@ -262,46 +265,46 @@ index 31c7f35fc25..dca5a88caa0 100644
|
||||
+ iface, vertex_count, start_vertex_location);
|
||||
+}
|
||||
|
||||
- if (!resource)
|
||||
- return E_INVALIDARG;
|
||||
- if (FAILED(hr = d3d_rendertarget_view_create(device, resource, desc, &object)))
|
||||
- return hr;
|
||||
+static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_Map(ID3D11DeviceContext *iface, ID3D11Resource *resource,
|
||||
+ UINT subresource_idx, D3D11_MAP map_type, UINT map_flags, D3D11_MAPPED_SUBRESOURCE *mapped_subresource)
|
||||
+{
|
||||
+ FIXME("iface %p, resource %p, subresource_idx %u, map_type %u, map_flags %#x, mapped_subresource %p stub!\n",
|
||||
+ iface, resource, subresource_idx, map_type, map_flags, mapped_subresource);
|
||||
|
||||
- if (FAILED(hr = d3d_rendertarget_view_create(device, resource, desc, &object)))
|
||||
- return hr;
|
||||
- *view = &object->ID3D11RenderTargetView_iface;
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
|
||||
- *view = &object->ID3D11RenderTargetView_iface;
|
||||
- return S_OK;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_Unmap(ID3D11DeviceContext *iface, ID3D11Resource *resource,
|
||||
+ UINT subresource_idx)
|
||||
+{
|
||||
+ FIXME("iface %p, resource %p, subresource_idx %u stub!\n", iface, resource, subresource_idx);
|
||||
+}
|
||||
|
||||
- return S_OK;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
+ UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
+{
|
||||
+ FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
|
||||
+ iface, start_slot, buffer_count, buffers);
|
||||
}
|
||||
|
||||
-static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDepthStencilView(ID3D11Device2 *iface,
|
||||
- ID3D11Resource *resource, const D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3D11DepthStencilView **view)
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_IASetInputLayout(ID3D11DeviceContext *iface,
|
||||
+ ID3D11InputLayout *input_layout)
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
+ UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
{
|
||||
- struct d3d_device *device = impl_from_ID3D11Device2(iface);
|
||||
- struct d3d_depthstencil_view *object;
|
||||
- HRESULT hr;
|
||||
+ FIXME("iface %p, input_layout %p stub!\n", iface, input_layout);
|
||||
+ FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
|
||||
+ iface, start_slot, buffer_count, buffers);
|
||||
+}
|
||||
|
||||
- TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_IASetInputLayout(ID3D11DeviceContext *iface,
|
||||
+ ID3D11InputLayout *input_layout)
|
||||
+{
|
||||
+ FIXME("iface %p, input_layout %p stub!\n", iface, input_layout);
|
||||
+}
|
||||
|
||||
- if (FAILED(hr = d3d_depthstencil_view_create(device, resource, desc, &object)))
|
||||
- return hr;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_IASetVertexBuffers(ID3D11DeviceContext *iface,
|
||||
+ UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers, const UINT *strides, const UINT *offsets)
|
||||
+{
|
||||
@ -309,8 +312,7 @@ index 31c7f35fc25..dca5a88caa0 100644
|
||||
+ iface, start_slot, buffer_count, buffers, strides, offsets);
|
||||
+}
|
||||
|
||||
- if (FAILED(hr = d3d_depthstencil_view_create(device, resource, desc, &object)))
|
||||
- return hr;
|
||||
- *view = &object->ID3D11DepthStencilView_iface;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_IASetIndexBuffer(ID3D11DeviceContext *iface,
|
||||
+ ID3D11Buffer *buffer, DXGI_FORMAT format, UINT offset)
|
||||
+{
|
||||
@ -318,7 +320,7 @@ index 31c7f35fc25..dca5a88caa0 100644
|
||||
+ iface, buffer, debug_dxgi_format(format), offset);
|
||||
+}
|
||||
|
||||
- *view = &object->ID3D11DepthStencilView_iface;
|
||||
- return S_OK;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexedInstanced(ID3D11DeviceContext *iface,
|
||||
+ UINT instance_index_count, UINT instance_count, UINT start_index_location, INT base_vertex_location,
|
||||
+ UINT start_instance_location)
|
||||
@ -327,34 +329,36 @@ index 31c7f35fc25..dca5a88caa0 100644
|
||||
+ "base_vertex_location %d, start_instance_location %u stub!\n",
|
||||
+ iface, instance_index_count, instance_count, start_index_location,
|
||||
+ base_vertex_location, start_instance_location);
|
||||
+}
|
||||
|
||||
- return S_OK;
|
||||
+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",
|
||||
+ iface, instance_vertex_count, instance_count, start_vertex_location,
|
||||
+ start_instance_location);
|
||||
}
|
||||
|
||||
-static HRESULT STDMETHODCALLTYPE d3d11_device_CreateInputLayout(ID3D11Device2 *iface,
|
||||
- const D3D11_INPUT_ELEMENT_DESC *element_descs, UINT element_count, const void *shader_byte_code,
|
||||
- SIZE_T shader_byte_code_length, ID3D11InputLayout **input_layout)
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
+ UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstanced(ID3D11DeviceContext *iface,
|
||||
+ UINT instance_vertex_count, UINT instance_count, UINT start_vertex_location, UINT start_instance_location)
|
||||
{
|
||||
- struct d3d_device *device = impl_from_ID3D11Device2(iface);
|
||||
- struct d3d_input_layout *object;
|
||||
- HRESULT hr;
|
||||
+ FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
|
||||
+ iface, start_slot, buffer_count, buffers);
|
||||
+ FIXME("iface %p, instance_vertex_count %u, instance_count %u, start_vertex_location %u, "
|
||||
+ "start_instance_location %u stub!\n",
|
||||
+ iface, instance_vertex_count, instance_count, start_vertex_location,
|
||||
+ start_instance_location);
|
||||
+}
|
||||
|
||||
- TRACE("iface %p, element_descs %p, element_count %u, shader_byte_code %p, shader_byte_code_length %lu, "
|
||||
- "input_layout %p.\n", iface, element_descs, element_count, shader_byte_code,
|
||||
- shader_byte_code_length, input_layout);
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
+ UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
+{
|
||||
+ FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
|
||||
+ iface, start_slot, buffer_count, buffers);
|
||||
+}
|
||||
|
||||
- if (FAILED(hr = d3d_input_layout_create(device, element_descs, element_count,
|
||||
- shader_byte_code, shader_byte_code_length, &object)))
|
||||
- return hr;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceContext *iface,
|
||||
+ ID3D11GeometryShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
|
||||
+{
|
||||
@ -362,44 +366,35 @@ index 31c7f35fc25..dca5a88caa0 100644
|
||||
+ iface, shader, class_instances, class_instance_count);
|
||||
+}
|
||||
|
||||
- if (FAILED(hr = d3d_input_layout_create(device, element_descs, element_count,
|
||||
- shader_byte_code, shader_byte_code_length, &object)))
|
||||
- return hr;
|
||||
- *input_layout = &object->ID3D11InputLayout_iface;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_IASetPrimitiveTopology(ID3D11DeviceContext *iface,
|
||||
+ D3D11_PRIMITIVE_TOPOLOGY topology)
|
||||
+{
|
||||
+ FIXME("iface %p, topology %u stub!\n", iface, topology);
|
||||
+}
|
||||
|
||||
- *input_layout = &object->ID3D11InputLayout_iface;
|
||||
- return S_OK;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
+ UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
|
||||
+{
|
||||
+ FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n", iface, start_slot, view_count, views);
|
||||
+}
|
||||
|
||||
- return S_OK;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetSamplers(ID3D11DeviceContext *iface,
|
||||
+ UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
|
||||
+{
|
||||
+ FIXME("iface %p, start_slot %u, sampler_count %u, samplers %p stub!\n",
|
||||
+ iface, start_slot, sampler_count, samplers);
|
||||
}
|
||||
|
||||
-static HRESULT STDMETHODCALLTYPE d3d11_device_CreateVertexShader(ID3D11Device2 *iface, const void *byte_code,
|
||||
- SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11VertexShader **shader)
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_Begin(ID3D11DeviceContext *iface,
|
||||
+ ID3D11Asynchronous *asynchronous)
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetSamplers(ID3D11DeviceContext *iface,
|
||||
+ UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
|
||||
{
|
||||
- struct d3d_device *device = impl_from_ID3D11Device2(iface);
|
||||
- struct d3d_vertex_shader *object;
|
||||
- HRESULT hr;
|
||||
+ FIXME("iface %p, asynchronous %p stub!\n", iface, asynchronous);
|
||||
+ FIXME("iface %p, start_slot %u, sampler_count %u, samplers %p stub!\n",
|
||||
+ iface, start_slot, sampler_count, samplers);
|
||||
+}
|
||||
|
||||
- TRACE("iface %p, byte_code %p, byte_code_length %lu, class_linkage %p, shader %p.\n",
|
||||
- iface, byte_code, byte_code_length, class_linkage, shader);
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_End(ID3D11DeviceContext *iface,
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_Begin(ID3D11DeviceContext *iface,
|
||||
+ ID3D11Asynchronous *asynchronous)
|
||||
+{
|
||||
+ FIXME("iface %p, asynchronous %p stub!\n", iface, asynchronous);
|
||||
@ -407,44 +402,50 @@ index 31c7f35fc25..dca5a88caa0 100644
|
||||
|
||||
- if (class_linkage)
|
||||
- FIXME("Class linkage is not implemented yet.\n");
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_End(ID3D11DeviceContext *iface,
|
||||
+ ID3D11Asynchronous *asynchronous)
|
||||
+{
|
||||
+ FIXME("iface %p, asynchronous %p stub!\n", iface, asynchronous);
|
||||
+}
|
||||
|
||||
- if (FAILED(hr = d3d_vertex_shader_create(device, byte_code, byte_code_length, &object)))
|
||||
- return hr;
|
||||
+static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_GetData(ID3D11DeviceContext *iface,
|
||||
+ ID3D11Asynchronous *asynchronous, void *data, UINT data_size, UINT data_flags)
|
||||
+{
|
||||
+ FIXME("iface %p, asynchronous %p, data %p, data_size %u, data_flags %#x stub!\n",
|
||||
+ iface, asynchronous, data, data_size, data_flags);
|
||||
|
||||
- if (FAILED(hr = d3d_vertex_shader_create(device, byte_code, byte_code_length, &object)))
|
||||
- return hr;
|
||||
- *shader = &object->ID3D11VertexShader_iface;
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
|
||||
- *shader = &object->ID3D11VertexShader_iface;
|
||||
- return S_OK;
|
||||
+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);
|
||||
+}
|
||||
|
||||
- return S_OK;
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
+ UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
|
||||
+{
|
||||
+ FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n", iface, start_slot, view_count, views);
|
||||
}
|
||||
|
||||
-static HRESULT STDMETHODCALLTYPE d3d11_device_CreateGeometryShader(ID3D11Device2 *iface, const void *byte_code,
|
||||
- SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11GeometryShader **shader)
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetSamplers(ID3D11DeviceContext *iface,
|
||||
+ UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
+ UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
|
||||
{
|
||||
- struct d3d_device *device = impl_from_ID3D11Device2(iface);
|
||||
- struct d3d_geometry_shader *object;
|
||||
- HRESULT hr;
|
||||
+ FIXME("iface %p, start_slot %u, sampler_count %u, samplers %p stub!\n",
|
||||
+ iface, start_slot, sampler_count, samplers);
|
||||
+ FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n", iface, start_slot, view_count, views);
|
||||
+}
|
||||
|
||||
- TRACE("iface %p, byte_code %p, byte_code_length %lu, class_linkage %p, shader %p.\n",
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetSamplers(ID3D11DeviceContext *iface,
|
||||
+ UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
|
||||
+{
|
||||
+ FIXME("iface %p, start_slot %u, sampler_count %u, samplers %p stub!\n",
|
||||
+ iface, start_slot, sampler_count, samplers);
|
||||
+}
|
||||
+
|
||||
+static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11DeviceContext *iface,
|
||||
+ UINT render_target_view_count, ID3D11RenderTargetView *const *render_target_views,
|
||||
+ ID3D11DepthStencilView *depth_stencil_view)
|
||||
@ -1352,7 +1353,7 @@ index 31c7f35fc25..dca5a88caa0 100644
|
||||
iface, byte_code, byte_code_length, class_linkage, shader);
|
||||
|
||||
if (class_linkage)
|
||||
@@ -3362,10 +4340,22 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device2 *iface
|
||||
@@ -3593,10 +4571,22 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device2 *iface
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device2 *iface, UINT flags,
|
||||
ID3D11DeviceContext **context)
|
||||
{
|
||||
@ -1379,10 +1380,10 @@ index 31c7f35fc25..dca5a88caa0 100644
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResource(ID3D11Device2 *iface, HANDLE resource, REFIID iid,
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index da4627d7a85..dadeac27662 100644
|
||||
index 32a9dc2e530..362962a9099 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -2231,6 +2231,8 @@ static void test_create_deferred_context(void)
|
||||
@@ -2266,6 +2266,8 @@ static void test_create_deferred_context(void)
|
||||
|
||||
hr = ID3D11Device_CreateDeferredContext(device, 0, &context);
|
||||
todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Failed to create deferred context, hr %#x.\n", hr);
|
||||
@ -1391,7 +1392,7 @@ index da4627d7a85..dadeac27662 100644
|
||||
|
||||
refcount = ID3D11Device_Release(device);
|
||||
ok(!refcount, "Device has %u references left.\n", refcount);
|
||||
@@ -2243,7 +2245,7 @@ static void test_create_deferred_context(void)
|
||||
@@ -2278,7 +2280,7 @@ static void test_create_deferred_context(void)
|
||||
|
||||
expected_refcount = get_refcount(device) + 1;
|
||||
hr = ID3D11Device_CreateDeferredContext(device, 0, &context);
|
||||
@ -1401,5 +1402,5 @@ index da4627d7a85..dadeac27662 100644
|
||||
goto done;
|
||||
refcount = get_refcount(device);
|
||||
--
|
||||
2.23.0
|
||||
2.30.0
|
||||
|
||||
|
@ -1,26 +1,27 @@
|
||||
From c093321833140c3aadacae32c43d160e83483d17 Mon Sep 17 00:00:00 2001
|
||||
From 504969929eb7932fe22880768461f2172080f0eb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 19 Jan 2017 16:56:56 +0100
|
||||
Subject: [PATCH] d3d11: Initial implementation for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 1073 +++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 1042 insertions(+), 31 deletions(-)
|
||||
dlls/d3d11/device.c | 1072 +++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 1041 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index dca5a88caa..738f1d19d4 100644
|
||||
index 454003128dc..4beb7cea4fa 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -17,11 +17,181 @@
|
||||
@@ -16,6 +16,7 @@
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*
|
||||
*/
|
||||
|
||||
+#include "wine/list.h"
|
||||
+
|
||||
|
||||
#define NONAMELESSUNION
|
||||
#include "d3d11_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d11);
|
||||
@@ -48,6 +49,174 @@ static BOOL d3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, S
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+enum deferred_cmd
|
||||
+{
|
||||
@ -193,7 +194,7 @@ index dca5a88caa..738f1d19d4 100644
|
||||
/* ID3D11DeviceContext - deferred context */
|
||||
struct d3d11_deferred_context
|
||||
{
|
||||
@@ -29,9 +199,532 @@ struct d3d11_deferred_context
|
||||
@@ -55,9 +224,532 @@ struct d3d11_deferred_context
|
||||
ID3D11Device *device;
|
||||
LONG refcount;
|
||||
|
||||
@ -726,7 +727,7 @@ index dca5a88caa..738f1d19d4 100644
|
||||
static void STDMETHODCALLTYPE d3d_null_wined3d_object_destroyed(void *parent) {}
|
||||
|
||||
static const struct wined3d_parent_ops d3d_null_wined3d_parent_ops =
|
||||
@@ -1226,7 +1919,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D
|
||||
@@ -1415,7 +2107,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_ExecuteCommandList(ID3D11DeviceContext1 *iface,
|
||||
ID3D11CommandList *command_list, BOOL restore_state)
|
||||
{
|
||||
@ -748,7 +749,7 @@ index dca5a88caa..738f1d19d4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShaderResources(ID3D11DeviceContext1 *iface,
|
||||
@@ -2938,6 +3644,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
|
||||
@@ -3169,6 +3874,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@ -756,7 +757,7 @@ index dca5a88caa..738f1d19d4 100644
|
||||
wined3d_private_store_cleanup(&context->private_store);
|
||||
ID3D11Device_Release(context->device);
|
||||
HeapFree(GetProcessHeap(), 0, context);
|
||||
@@ -2989,43 +3696,86 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(
|
||||
@@ -3220,43 +3926,86 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
{
|
||||
@ -849,7 +850,7 @@ index dca5a88caa..738f1d19d4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *iface,
|
||||
@@ -3038,53 +3788,169 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *i
|
||||
@@ -3269,53 +4018,169 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *i
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_Map(ID3D11DeviceContext *iface, ID3D11Resource *resource,
|
||||
UINT subresource_idx, D3D11_MAP map_type, UINT map_flags, D3D11_MAPPED_SUBRESOURCE *mapped_subresource)
|
||||
{
|
||||
@ -1028,7 +1029,7 @@ index dca5a88caa..738f1d19d4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstanced(ID3D11DeviceContext *iface,
|
||||
@@ -3113,7 +3979,16 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceCon
|
||||
@@ -3344,7 +4209,16 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceCon
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_IASetPrimitiveTopology(ID3D11DeviceContext *iface,
|
||||
D3D11_PRIMITIVE_TOPOLOGY topology)
|
||||
{
|
||||
@ -1046,7 +1047,7 @@ index dca5a88caa..738f1d19d4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
@@ -3173,8 +4048,28 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11De
|
||||
@@ -3404,8 +4278,28 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11De
|
||||
UINT render_target_view_count, ID3D11RenderTargetView *const *render_target_views,
|
||||
ID3D11DepthStencilView *depth_stencil_view)
|
||||
{
|
||||
@ -1076,7 +1077,7 @@ index dca5a88caa..738f1d19d4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorderedAccessViews(
|
||||
@@ -3194,15 +4089,44 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
|
||||
@@ -3425,15 +4319,44 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetBlendState(ID3D11DeviceContext *iface,
|
||||
ID3D11BlendState *blend_state, const float blend_factor[4], UINT sample_mask)
|
||||
{
|
||||
@ -1123,7 +1124,7 @@ index dca5a88caa..738f1d19d4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_SOSetTargets(ID3D11DeviceContext *iface, UINT buffer_count,
|
||||
@@ -3244,13 +4168,34 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11Devi
|
||||
@@ -3475,13 +4398,34 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11Devi
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetState(ID3D11DeviceContext *iface,
|
||||
ID3D11RasterizerState *rasterizer_state)
|
||||
{
|
||||
@ -1160,7 +1161,7 @@ index dca5a88caa..738f1d19d4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetScissorRects(ID3D11DeviceContext *iface,
|
||||
@@ -3365,8 +4310,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11
|
||||
@@ -3596,8 +4540,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShader(ID3D11DeviceContext *iface,
|
||||
ID3D11HullShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
|
||||
{
|
||||
@ -1180,7 +1181,7 @@ index dca5a88caa..738f1d19d4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceContext *iface,
|
||||
@@ -3379,36 +4334,62 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceC
|
||||
@@ -3610,36 +4564,62 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceC
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
{
|
||||
@ -1248,7 +1249,7 @@ index dca5a88caa..738f1d19d4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
@@ -3709,7 +4690,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11
|
||||
@@ -3940,7 +4920,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearState(ID3D11DeviceContext *iface)
|
||||
{
|
||||
@ -1265,7 +1266,7 @@ index dca5a88caa..738f1d19d4 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Flush(ID3D11DeviceContext *iface)
|
||||
@@ -3734,9 +4723,29 @@ static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11Devic
|
||||
@@ -3965,9 +4953,29 @@ static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11Devic
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_FinishCommandList(ID3D11DeviceContext *iface,
|
||||
BOOL restore, ID3D11CommandList **command_list)
|
||||
{
|
||||
@ -1297,7 +1298,7 @@ index dca5a88caa..738f1d19d4 100644
|
||||
}
|
||||
|
||||
static const struct ID3D11DeviceContextVtbl d3d11_deferred_context_vtbl =
|
||||
@@ -4351,6 +5360,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
|
||||
@@ -4582,6 +5590,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
|
||||
object->device = (ID3D11Device *)iface;
|
||||
object->refcount = 1;
|
||||
|
||||
@ -1307,5 +1308,5 @@ index dca5a88caa..738f1d19d4 100644
|
||||
wined3d_private_store_init(&object->private_store);
|
||||
|
||||
--
|
||||
2.21.0
|
||||
2.30.0
|
||||
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "4981785f0fbcafbdc6a9dc4f71d06b137d558597"
|
||||
echo "1649389edca12d2998f72a159b2bbbf247176163"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1 +1 @@
|
||||
4981785f0fbcafbdc6a9dc4f71d06b137d558597
|
||||
1649389edca12d2998f72a159b2bbbf247176163
|
||||
|
Loading…
x
Reference in New Issue
Block a user