From 6153a63b9b54144cfe9c118b2fa0115c2064a64a Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 1 Jun 2020 14:44:48 +1000
Subject: [PATCH] d3d11: Support ID3D11DeviceContext1 for deferred contexts

Game "Trainz: A New Era", queries for this interface but doesn't use
any of the new functions.
---
 dlls/d3d11/device.c | 411 +++++++++++++++++++++++++++++++-------------
 1 file changed, 287 insertions(+), 124 deletions(-)

diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 03278934a99..a649be2f8ea 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -436,7 +436,7 @@ struct d3d11_command_list
 /* ID3D11DeviceContext - deferred context */
 struct d3d11_deferred_context
 {
-    ID3D11DeviceContext ID3D11DeviceContext_iface;
+    ID3D11DeviceContext1 ID3D11DeviceContext1_iface;
     ID3D11Device *device;
     LONG refcount;
 
@@ -4390,21 +4390,22 @@ static void d3d11_immediate_context_destroy(struct d3d11_immediate_context *cont
 
 /* ID3D11DeviceContext - deferred context methods */
 
-static inline struct d3d11_deferred_context *impl_from_deferred_ID3D11DeviceContext(ID3D11DeviceContext *iface)
+static inline struct d3d11_deferred_context *impl_from_deferred_ID3D11DeviceContext(ID3D11DeviceContext1 *iface)
 {
-    return CONTAINING_RECORD(iface, struct d3d11_deferred_context, ID3D11DeviceContext_iface);
+    return CONTAINING_RECORD(iface, struct d3d11_deferred_context, ID3D11DeviceContext1_iface);
 }
 
-static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_QueryInterface(ID3D11DeviceContext *iface,
+static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_QueryInterface(ID3D11DeviceContext1 *iface,
         REFIID riid, void **out)
 {
     TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
 
-    if (IsEqualGUID(riid, &IID_ID3D11DeviceContext)
+    if (IsEqualGUID(riid, &IID_ID3D11DeviceContext1)
+            || IsEqualGUID(riid, &IID_ID3D11DeviceContext)
             || IsEqualGUID(riid, &IID_ID3D11DeviceChild)
             || IsEqualGUID(riid, &IID_IUnknown))
     {
-        ID3D11DeviceContext_AddRef(iface);
+        ID3D11DeviceContext1_AddRef(iface);
         *out = iface;
         return S_OK;
     }
@@ -4414,7 +4415,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_QueryInterface(ID3D11Dev
     return E_NOINTERFACE;
 }
 
-static ULONG STDMETHODCALLTYPE d3d11_deferred_context_AddRef(ID3D11DeviceContext *iface)
+static ULONG STDMETHODCALLTYPE d3d11_deferred_context_AddRef(ID3D11DeviceContext1 *iface)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
     ULONG refcount = InterlockedIncrement(&context->refcount);
@@ -4424,7 +4425,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_AddRef(ID3D11DeviceContext
     return refcount;
 }
 
-static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContext *iface)
+static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContext1 *iface)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
     ULONG refcount = InterlockedDecrement(&context->refcount);
@@ -4442,7 +4443,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
     return refcount;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_GetDevice(ID3D11DeviceContext *iface, ID3D11Device **device)
+static void STDMETHODCALLTYPE d3d11_deferred_context_GetDevice(ID3D11DeviceContext1 *iface, ID3D11Device **device)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
 
@@ -4452,7 +4453,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GetDevice(ID3D11DeviceConte
     *device = context->device;
 }
 
-static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_GetPrivateData(ID3D11DeviceContext *iface, REFGUID guid,
+static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_GetPrivateData(ID3D11DeviceContext1 *iface, REFGUID guid,
         UINT *data_size, void *data)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4462,7 +4463,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_GetPrivateData(ID3D11Dev
     return d3d_get_private_data(&context->private_store, guid, data_size, data);
 }
 
-static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateData(ID3D11DeviceContext *iface, REFGUID guid,
+static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateData(ID3D11DeviceContext1 *iface, REFGUID guid,
         UINT data_size, const void *data)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4472,7 +4473,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateData(ID3D11Dev
     return d3d_set_private_data(&context->private_store, guid, data_size, data);
 }
 
-static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(ID3D11DeviceContext *iface,
+static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(ID3D11DeviceContext1 *iface,
         REFGUID guid, const IUnknown *data)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4482,7 +4483,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(
     return d3d_set_private_data_interface(&context->private_store, guid, data);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetConstantBuffers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetConstantBuffers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4493,7 +4494,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetConstantBuffers(ID3D11
     add_deferred_set_constant_buffers(context, DEFERRED_VSSETCONSTANTBUFFERS, start_slot, buffer_count, buffers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetShaderResources(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetShaderResources(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4504,7 +4505,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetShaderResources(ID3D11
     add_deferred_set_shader_resources(context, DEFERRED_PSSETSHADERRESOURCES, start_slot, view_count, views);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetShader(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetShader(ID3D11DeviceContext1 *iface,
         ID3D11PixelShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4521,7 +4522,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetShader(ID3D11DeviceCon
     call->ps_info.shader = shader;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetSamplers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetSamplers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4532,7 +4533,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetSamplers(ID3D11DeviceC
     add_deferred_set_samplers(context, DEFERRED_PSSETSAMPLERS, start_slot, sampler_count, samplers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShader(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShader(ID3D11DeviceContext1 *iface,
         ID3D11VertexShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4549,7 +4550,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShader(ID3D11DeviceCon
     call->vs_info.shader = shader;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexed(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexed(ID3D11DeviceContext1 *iface,
         UINT index_count, UINT start_index_location, INT base_vertex_location)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4567,7 +4568,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexed(ID3D11DeviceCon
     call->draw_indexed_info.base_vertex = base_vertex_location;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext1 *iface,
         UINT vertex_count, UINT start_vertex_location)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4584,7 +4585,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *i
     call->draw_info.start = start_vertex_location;
 }
 
-static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_Map(ID3D11DeviceContext *iface, ID3D11Resource *resource,
+static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_Map(ID3D11DeviceContext1 *iface, ID3D11Resource *resource,
         UINT subresource_idx, D3D11_MAP map_type, UINT map_flags, D3D11_MAPPED_SUBRESOURCE *mapped_subresource)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4650,13 +4651,13 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_Map(ID3D11DeviceContext
     return S_OK;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_Unmap(ID3D11DeviceContext *iface, ID3D11Resource *resource,
+static void STDMETHODCALLTYPE d3d11_deferred_context_Unmap(ID3D11DeviceContext1 *iface, ID3D11Resource *resource,
         UINT subresource_idx)
 {
     TRACE("iface %p, resource %p, subresource_idx %u.\n", iface, resource, subresource_idx);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetConstantBuffers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetConstantBuffers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4667,7 +4668,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetConstantBuffers(ID3D11
     add_deferred_set_constant_buffers(context, DEFERRED_PSSETCONSTANTBUFFERS, start_slot, buffer_count, buffers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_IASetInputLayout(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_IASetInputLayout(ID3D11DeviceContext1 *iface,
         ID3D11InputLayout *input_layout)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4683,7 +4684,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_IASetInputLayout(ID3D11Devi
     call->input_layout_info.layout = input_layout;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_IASetVertexBuffers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_IASetVertexBuffers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers, const UINT *strides, const UINT *offsets)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4712,7 +4713,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_IASetVertexBuffers(ID3D11De
     }
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_IASetIndexBuffer(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_IASetIndexBuffer(ID3D11DeviceContext1 *iface,
         ID3D11Buffer *buffer, DXGI_FORMAT format, UINT offset)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4731,7 +4732,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_IASetIndexBuffer(ID3D11Devi
     call->index_buffer_info.offset = offset;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexedInstanced(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexedInstanced(ID3D11DeviceContext1 *iface,
         UINT instance_index_count, UINT instance_count, UINT start_index_location, INT base_vertex_location,
         UINT start_instance_location)
 {
@@ -4754,7 +4755,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexedInstanced(ID3D11
     call->draw_indexed_inst_info.start_instance = start_instance_location;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstanced(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstanced(ID3D11DeviceContext1 *iface,
         UINT instance_vertex_count, UINT instance_count, UINT start_vertex_location, UINT start_instance_location)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4775,7 +4776,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstanced(ID3D11DeviceC
     call->draw_instanced_info.start_instance_location = start_instance_location;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetConstantBuffers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetConstantBuffers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4786,7 +4787,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetConstantBuffers(ID3D11
     add_deferred_set_constant_buffers(context, DEFERRED_GSSETCONSTANTBUFFERS, start_slot, buffer_count, buffers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceContext1 *iface,
         ID3D11GeometryShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4803,7 +4804,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceCon
     call->gs_info.shader = shader;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_IASetPrimitiveTopology(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_IASetPrimitiveTopology(ID3D11DeviceContext1 *iface,
         D3D11_PRIMITIVE_TOPOLOGY topology)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4818,7 +4819,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_IASetPrimitiveTopology(ID3D
     call->topology_info.topology = topology;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShaderResources(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShaderResources(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4829,7 +4830,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShaderResources(ID3D11
     add_deferred_set_shader_resources(context, DEFERRED_VSSETSHADERRESOURCES, start_slot, view_count, views);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetSamplers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetSamplers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4840,7 +4841,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetSamplers(ID3D11DeviceC
     add_deferred_set_samplers(context, DEFERRED_VSSETSAMPLERS, start_slot, sampler_count, samplers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_Begin(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_Begin(ID3D11DeviceContext1 *iface,
         ID3D11Asynchronous *asynchronous)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4856,7 +4857,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Begin(ID3D11DeviceContext *
     call->async_info.asynchronous = asynchronous;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_End(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_End(ID3D11DeviceContext1 *iface,
         ID3D11Asynchronous *asynchronous)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4872,7 +4873,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_End(ID3D11DeviceContext *if
     call->async_info.asynchronous = asynchronous;
 }
 
-static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_GetData(ID3D11DeviceContext *iface,
+static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_GetData(ID3D11DeviceContext1 *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",
@@ -4881,7 +4882,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_GetData(ID3D11DeviceCont
     return E_NOTIMPL;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_SetPredication(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_SetPredication(ID3D11DeviceContext1 *iface,
         ID3D11Predicate *predicate, BOOL value)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4898,7 +4899,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_SetPredication(ID3D11Device
     call->set_predication_info.value = value;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShaderResources(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShaderResources(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4909,7 +4910,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShaderResources(ID3D11
     add_deferred_set_shader_resources(context, DEFERRED_GSSETSHADERRESOURCES, start_slot, view_count, views);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetSamplers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetSamplers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -4920,7 +4921,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetSamplers(ID3D11DeviceC
     add_deferred_set_samplers(context, DEFERRED_GSSETSAMPLERS, start_slot, sampler_count, samplers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11DeviceContext1 *iface,
         UINT render_target_view_count, ID3D11RenderTargetView *const *render_target_views,
         ID3D11DepthStencilView *depth_stencil_view)
 {
@@ -4949,7 +4950,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11De
 }
 
 static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorderedAccessViews(
-        ID3D11DeviceContext *iface, UINT render_target_view_count,
+        ID3D11DeviceContext1 *iface, UINT render_target_view_count,
         ID3D11RenderTargetView *const *render_target_views, ID3D11DepthStencilView *depth_stencil_view,
         UINT unordered_access_view_start_slot, UINT unordered_access_view_count,
         ID3D11UnorderedAccessView *const *unordered_access_views, const UINT *initial_counts)
@@ -4996,7 +4997,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
     }
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetBlendState(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetBlendState(ID3D11DeviceContext1 *iface,
         ID3D11BlendState *blend_state, const float blend_factor[4], UINT sample_mask)
 {
     static const float default_blend_factor[] = {1.0f, 1.0f, 1.0f, 1.0f};
@@ -5021,7 +5022,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetBlendState(ID3D11Devic
     call->blend_state_info.mask = sample_mask;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetDepthStencilState(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetDepthStencilState(ID3D11DeviceContext1 *iface,
         ID3D11DepthStencilState *depth_stencil_state, UINT stencil_ref)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5039,7 +5040,7 @@ 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,
+static void STDMETHODCALLTYPE d3d11_deferred_context_SOSetTargets(ID3D11DeviceContext1 *iface,
         UINT buffer_count, ID3D11Buffer *const *buffers, const UINT *offsets)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5064,7 +5065,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_SOSetTargets(ID3D11DeviceCo
     }
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_DrawAuto(ID3D11DeviceContext *iface)
+static void STDMETHODCALLTYPE d3d11_deferred_context_DrawAuto(ID3D11DeviceContext1 *iface)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
     struct deferred_call *call;
@@ -5077,7 +5078,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DrawAuto(ID3D11DeviceContex
     call->cmd = DEFERRED_DRAWAUTO;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexedInstancedIndirect(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexedInstancedIndirect(ID3D11DeviceContext1 *iface,
         ID3D11Buffer *buffer, UINT offset)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5094,7 +5095,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DrawIndexedInstancedIndirec
     call->draw_instanced_indirect_info.offset = offset;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstancedIndirect(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstancedIndirect(ID3D11DeviceContext1 *iface,
         ID3D11Buffer *buffer, UINT offset)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5111,7 +5112,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstancedIndirect(ID3D1
     call->draw_instanced_indirect_info.offset = offset;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_Dispatch(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_Dispatch(ID3D11DeviceContext1 *iface,
         UINT thread_group_count_x, UINT thread_group_count_y, UINT thread_group_count_z)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5129,7 +5130,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Dispatch(ID3D11DeviceContex
     call->dispatch_info.count_z = thread_group_count_z;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11DeviceContext1 *iface,
         ID3D11Buffer *buffer, UINT offset)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5146,7 +5147,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11Devi
     call->dispatch_indirect_info.offset = offset;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetState(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetState(ID3D11DeviceContext1 *iface,
         ID3D11RasterizerState *rasterizer_state)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5162,7 +5163,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetState(ID3D11DeviceCont
     call->rstate_info.state = rasterizer_state;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetViewports(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetViewports(ID3D11DeviceContext1 *iface,
         UINT viewport_count, const D3D11_VIEWPORT *viewports)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5179,7 +5180,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetViewports(ID3D11Device
     memcpy(call->viewport_info.viewports, viewports, sizeof(D3D11_VIEWPORT) * viewport_count);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetScissorRects(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetScissorRects(ID3D11DeviceContext1 *iface,
         UINT rect_count, const D3D11_RECT *rects)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5196,7 +5197,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetScissorRects(ID3D11Dev
     memcpy(call->rs_set_scissor_rects_info.rects, rects, sizeof(D3D11_RECT) * rect_count);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_CopySubresourceRegion(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_CopySubresourceRegion(ID3D11DeviceContext1 *iface,
         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)
 {
@@ -5233,7 +5234,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CopySubresourceRegion(ID3D1
     }
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_CopyResource(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_CopyResource(ID3D11DeviceContext1 *iface,
         ID3D11Resource *dst_resource, ID3D11Resource *src_resource)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5252,7 +5253,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CopyResource(ID3D11DeviceCo
     call->copy_resource_info.src_resource = src_resource;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_UpdateSubresource(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_UpdateSubresource(ID3D11DeviceContext1 *iface,
         ID3D11Resource *resource, UINT subresource_idx, const D3D11_BOX *box,
         const void *data, UINT row_pitch, UINT depth_pitch)
 {
@@ -5306,7 +5307,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_UpdateSubresource(ID3D11Dev
     memcpy(call->update_subresource_info.data, data, size);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_CopyStructureCount(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_CopyStructureCount(ID3D11DeviceContext1 *iface,
         ID3D11Buffer *dst_buffer, UINT dst_offset, ID3D11UnorderedAccessView *src_view)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5327,7 +5328,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CopyStructureCount(ID3D11De
     call->copy_structure_count_info.src_view = src_view;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_ClearRenderTargetView(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_ClearRenderTargetView(ID3D11DeviceContext1 *iface,
         ID3D11RenderTargetView *render_target_view, const float color_rgba[4])
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5347,7 +5348,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_ClearRenderTargetView(ID3D1
         call->clear_rtv_info.color[i] = color_rgba[i];
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_ClearUnorderedAccessViewUint(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_ClearUnorderedAccessViewUint(ID3D11DeviceContext1 *iface,
         ID3D11UnorderedAccessView *unordered_access_view, const UINT values[4])
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5367,7 +5368,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_ClearUnorderedAccessViewUin
         call->clear_unordered_access_view_uint.values[i] = values[i];
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_ClearUnorderedAccessViewFloat(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_ClearUnorderedAccessViewFloat(ID3D11DeviceContext1 *iface,
         ID3D11UnorderedAccessView *unordered_access_view, const float values[4])
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5387,7 +5388,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_ClearUnorderedAccessViewFlo
         call->clear_unordered_access_view_float.values[i] = values[i];
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_ClearDepthStencilView(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_ClearDepthStencilView(ID3D11DeviceContext1 *iface,
         ID3D11DepthStencilView *depth_stencil_view, UINT flags, FLOAT depth, UINT8 stencil)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5407,7 +5408,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_ClearDepthStencilView(ID3D1
     call->clear_depth_info.stencil = stencil;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_GenerateMips(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_GenerateMips(ID3D11DeviceContext1 *iface,
         ID3D11ShaderResourceView *view)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5423,7 +5424,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GenerateMips(ID3D11DeviceCo
     call->generate_mips_info.view = view;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_SetResourceMinLOD(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_SetResourceMinLOD(ID3D11DeviceContext1 *iface,
         ID3D11Resource *resource, FLOAT min_lod)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5440,7 +5441,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_SetResourceMinLOD(ID3D11Dev
     call->set_resource_min_lod_info.min_lod = min_lod;
 }
 
-static FLOAT STDMETHODCALLTYPE d3d11_deferred_context_GetResourceMinLOD(ID3D11DeviceContext *iface,
+static FLOAT STDMETHODCALLTYPE d3d11_deferred_context_GetResourceMinLOD(ID3D11DeviceContext1 *iface,
         ID3D11Resource *resource)
 {
     FIXME("iface %p, resource %p stub!\n", iface, resource);
@@ -5448,7 +5449,7 @@ static FLOAT STDMETHODCALLTYPE d3d11_deferred_context_GetResourceMinLOD(ID3D11De
     return 0.0f;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_ResolveSubresource(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_ResolveSubresource(ID3D11DeviceContext1 *iface,
         ID3D11Resource *dst_resource, UINT dst_subresource_idx,
         ID3D11Resource *src_resource, UINT src_subresource_idx,
         DXGI_FORMAT format)
@@ -5475,13 +5476,13 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_ResolveSubresource(ID3D11De
     call->resolve_subresource_info.format = format;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_ExecuteCommandList(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_ExecuteCommandList(ID3D11DeviceContext1 *iface,
         ID3D11CommandList *command_list, BOOL restore_state)
 {
     FIXME("iface %p, command_list %p, restore_state %#x stub!\n", iface, command_list, restore_state);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5492,7 +5493,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11
     add_deferred_set_shader_resources(context, DEFERRED_HSSETSHADERRESOURCES, start_slot, view_count, views);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShader(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShader(ID3D11DeviceContext1 *iface,
         ID3D11HullShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5509,7 +5510,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShader(ID3D11DeviceCon
     call->hs_info.shader = shader;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5520,7 +5521,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceC
     add_deferred_set_samplers(context, DEFERRED_HSSETSAMPLERS, start_slot, sampler_count, samplers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetConstantBuffers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetConstantBuffers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5531,7 +5532,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetConstantBuffers(ID3D11
     add_deferred_set_constant_buffers(context, DEFERRED_HSSETCONSTANTBUFFERS, start_slot, buffer_count, buffers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_DSSetShaderResources(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_DSSetShaderResources(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5542,7 +5543,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DSSetShaderResources(ID3D11
     add_deferred_set_shader_resources(context, DEFERRED_DSSETSHADERRESOURCES, start_slot, view_count, views);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_DSSetShader(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_DSSetShader(ID3D11DeviceContext1 *iface,
         ID3D11DomainShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5559,7 +5560,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DSSetShader(ID3D11DeviceCon
     call->ds_info.shader = shader;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_DSSetSamplers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_DSSetSamplers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5570,7 +5571,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DSSetSamplers(ID3D11DeviceC
     add_deferred_set_samplers(context, DEFERRED_DSSETSAMPLERS, start_slot, sampler_count, samplers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_DSSetConstantBuffers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_DSSetConstantBuffers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5581,7 +5582,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DSSetConstantBuffers(ID3D11
     add_deferred_set_constant_buffers(context, DEFERRED_DSSETCONSTANTBUFFERS, start_slot, buffer_count, buffers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShaderResources(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShaderResources(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5592,7 +5593,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShaderResources(ID3D11
     add_deferred_set_shader_resources(context, DEFERRED_CSSETSHADERRESOURCES, start_slot, view_count, views);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetUnorderedAccessViews(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetUnorderedAccessViews(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT view_count, ID3D11UnorderedAccessView *const *views, const UINT *initial_counts)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5619,7 +5620,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetUnorderedAccessViews(I
     }
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShader(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShader(ID3D11DeviceContext1 *iface,
         ID3D11ComputeShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5636,7 +5637,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShader(ID3D11DeviceCon
     call->cs_info.shader = shader;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetSamplers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetSamplers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5647,7 +5648,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetSamplers(ID3D11DeviceC
     add_deferred_set_samplers(context, DEFERRED_CSSETSAMPLERS, start_slot, sampler_count, samplers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetConstantBuffers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetConstantBuffers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5658,120 +5659,120 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetConstantBuffers(ID3D11
     add_deferred_set_constant_buffers(context, DEFERRED_CSSETCONSTANTBUFFERS, start_slot, buffer_count, buffers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_VSGetConstantBuffers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSGetConstantBuffers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
 {
     FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
             iface, start_slot, buffer_count, buffers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_PSGetShaderResources(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSGetShaderResources(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
 {
     FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n",
             iface, start_slot, view_count, views);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_PSGetShader(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSGetShader(ID3D11DeviceContext1 *iface,
         ID3D11PixelShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
 {
     FIXME("iface %p, shader %p, class_instances %p, class_instance_count %p stub!\n",
             iface, shader, class_instances, class_instance_count);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_PSGetSamplers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSGetSamplers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT sampler_count, ID3D11SamplerState **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_VSGetShader(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSGetShader(ID3D11DeviceContext1 *iface,
         ID3D11VertexShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
 {
     FIXME("iface %p, shader %p, class_instances %p, class_instance_count %p stub!\n",
             iface, shader, class_instances, class_instance_count);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_PSGetConstantBuffers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSGetConstantBuffers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
 {
     FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
             iface, start_slot, buffer_count, buffers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_IAGetInputLayout(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_IAGetInputLayout(ID3D11DeviceContext1 *iface,
         ID3D11InputLayout **input_layout)
 {
     FIXME("iface %p, input_layout %p stub!\n", iface, input_layout);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_IAGetVertexBuffers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_IAGetVertexBuffers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *strides, UINT *offsets)
 {
     FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p stub!\n",
             iface, start_slot, buffer_count, buffers, strides, offsets);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_IAGetIndexBuffer(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_IAGetIndexBuffer(ID3D11DeviceContext1 *iface,
         ID3D11Buffer **buffer, DXGI_FORMAT *format, UINT *offset)
 {
     FIXME("iface %p, buffer %p, format %p, offset %p stub!\n", iface, buffer, format, offset);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_GSGetConstantBuffers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSGetConstantBuffers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
 {
     FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
             iface, start_slot, buffer_count, buffers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_GSGetShader(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSGetShader(ID3D11DeviceContext1 *iface,
         ID3D11GeometryShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
 {
     FIXME("iface %p, shader %p, class_instances %p, class_instance_count %p stub!\n",
             iface, shader, class_instances, class_instance_count);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_IAGetPrimitiveTopology(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_IAGetPrimitiveTopology(ID3D11DeviceContext1 *iface,
         D3D11_PRIMITIVE_TOPOLOGY *topology)
 {
     FIXME("iface %p, topology %p stub!\n", iface, topology);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_VSGetShaderResources(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSGetShaderResources(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
 {
     FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n", iface, start_slot, view_count, views);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_VSGetSamplers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSGetSamplers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT sampler_count, ID3D11SamplerState **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_GetPredication(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_GetPredication(ID3D11DeviceContext1 *iface,
         ID3D11Predicate **predicate, BOOL *value)
 {
     FIXME("iface %p, predicate %p, value %p stub!\n", iface, predicate, value);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_GSGetShaderResources(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSGetShaderResources(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
 {
     FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n", iface, start_slot, view_count, views);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_GSGetSamplers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSGetSamplers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT sampler_count, ID3D11SamplerState **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_OMGetRenderTargets(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_OMGetRenderTargets(ID3D11DeviceContext1 *iface,
         UINT render_target_view_count, ID3D11RenderTargetView **render_target_views,
         ID3D11DepthStencilView **depth_stencil_view)
 {
@@ -5780,7 +5781,7 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMGetRenderTargets(ID3D11De
 }
 
 static void STDMETHODCALLTYPE d3d11_deferred_context_OMGetRenderTargetsAndUnorderedAccessViews(
-        ID3D11DeviceContext *iface,
+        ID3D11DeviceContext1 *iface,
         UINT render_target_view_count, ID3D11RenderTargetView **render_target_views,
         ID3D11DepthStencilView **depth_stencil_view,
         UINT unordered_access_view_start_slot, UINT unordered_access_view_count,
@@ -5793,133 +5794,133 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMGetRenderTargetsAndUnorde
             unordered_access_view_start_slot, unordered_access_view_count, unordered_access_views);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_OMGetBlendState(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_OMGetBlendState(ID3D11DeviceContext1 *iface,
         ID3D11BlendState **blend_state, FLOAT blend_factor[4], UINT *sample_mask)
 {
     FIXME("iface %p, blend_state %p, blend_factor %p, sample_mask %p stub!\n",
             iface, blend_state, blend_factor, sample_mask);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_OMGetDepthStencilState(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_OMGetDepthStencilState(ID3D11DeviceContext1 *iface,
         ID3D11DepthStencilState **depth_stencil_state, UINT *stencil_ref)
 {
     FIXME("iface %p, depth_stencil_state %p, stencil_ref %p stub!\n",
             iface, depth_stencil_state, stencil_ref);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_SOGetTargets(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_SOGetTargets(ID3D11DeviceContext1 *iface,
         UINT buffer_count, ID3D11Buffer **buffers)
 {
     FIXME("iface %p, buffer_count %u, buffers %p stub!\n", iface, buffer_count, buffers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_RSGetState(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_RSGetState(ID3D11DeviceContext1 *iface,
         ID3D11RasterizerState **rasterizer_state)
 {
     FIXME("iface %p, rasterizer_state %p stub!\n", iface, rasterizer_state);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_RSGetViewports(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_RSGetViewports(ID3D11DeviceContext1 *iface,
         UINT *viewport_count, D3D11_VIEWPORT *viewports)
 {
     FIXME("iface %p, viewport_count %p, viewports %p stub!\n", iface, viewport_count, viewports);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_RSGetScissorRects(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_RSGetScissorRects(ID3D11DeviceContext1 *iface,
         UINT *rect_count, D3D11_RECT *rects)
 {
     FIXME("iface %p, rect_count %p, rects %p stub!\n", iface, rect_count, rects);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_HSGetShaderResources(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_HSGetShaderResources(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
 {
     FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n", iface, start_slot, view_count, views);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_HSGetShader(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_HSGetShader(ID3D11DeviceContext1 *iface,
         ID3D11HullShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
 {
     FIXME("iface %p, shader %p, class_instances %p, class_instance_count %p stub!\n",
             iface, shader, class_instances, class_instance_count);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_HSGetSamplers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_HSGetSamplers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT sampler_count, ID3D11SamplerState **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_HSGetConstantBuffers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_HSGetConstantBuffers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
 {
     FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
             iface, start_slot, buffer_count, buffers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_DSGetShaderResources(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_DSGetShaderResources(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
 {
     FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n",
             iface, start_slot, view_count, views);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_DSGetShader(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_DSGetShader(ID3D11DeviceContext1 *iface,
         ID3D11DomainShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
 {
     FIXME("iface %p, shader %p, class_instances %p, class_instance_count %p stub!\n",
             iface, shader, class_instances, class_instance_count);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_DSGetSamplers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_DSGetSamplers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT sampler_count, ID3D11SamplerState **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_DSGetConstantBuffers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_DSGetConstantBuffers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
 {
     FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
             iface, start_slot, buffer_count, buffers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetShaderResources(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetShaderResources(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
 {
     FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n", iface, start_slot, view_count, views);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetUnorderedAccessViews(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetUnorderedAccessViews(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT view_count, ID3D11UnorderedAccessView **views)
 {
     FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n", iface, start_slot, view_count, views);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetShader(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetShader(ID3D11DeviceContext1 *iface,
         ID3D11ComputeShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
 {
     FIXME("iface %p, shader %p, class_instances %p, class_instance_count %p stub!\n",
             iface, shader, class_instances, class_instance_count);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetSamplers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetSamplers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT sampler_count, ID3D11SamplerState **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_CSGetConstantBuffers(ID3D11DeviceContext *iface,
+static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11DeviceContext1 *iface,
         UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
 {
     FIXME("iface %p, start_slot %u, buffer_count %u, buffer %p stub!\n",
             iface, start_slot, buffer_count, buffers);
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_ClearState(ID3D11DeviceContext *iface)
+static void STDMETHODCALLTYPE d3d11_deferred_context_ClearState(ID3D11DeviceContext1 *iface)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
     struct deferred_call *call;
@@ -5932,26 +5933,26 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_ClearState(ID3D11DeviceCont
     call->cmd = DEFERRED_CLEARSTATE;
 }
 
-static void STDMETHODCALLTYPE d3d11_deferred_context_Flush(ID3D11DeviceContext *iface)
+static void STDMETHODCALLTYPE d3d11_deferred_context_Flush(ID3D11DeviceContext1 *iface)
 {
     FIXME("iface %p stub!\n", iface);
 }
 
-static D3D11_DEVICE_CONTEXT_TYPE STDMETHODCALLTYPE d3d11_deferred_context_GetType(ID3D11DeviceContext *iface)
+static D3D11_DEVICE_CONTEXT_TYPE STDMETHODCALLTYPE d3d11_deferred_context_GetType(ID3D11DeviceContext1 *iface)
 {
     TRACE("iface %p.\n", iface);
 
     return D3D11_DEVICE_CONTEXT_DEFERRED;
 }
 
-static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11DeviceContext *iface)
+static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11DeviceContext1 *iface)
 {
     FIXME("iface %p stub!\n", iface);
 
     return 0;
 }
 
-static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_FinishCommandList(ID3D11DeviceContext *iface,
+static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_FinishCommandList(ID3D11DeviceContext1 *iface,
         BOOL restore, ID3D11CommandList **command_list)
 {
     struct d3d11_deferred_context *context = impl_from_deferred_ID3D11DeviceContext(iface);
@@ -5979,7 +5980,149 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_FinishCommandList(ID3D11
     return S_OK;
 }
 
-static const struct ID3D11DeviceContextVtbl d3d11_deferred_context_vtbl =
+static void STDMETHODCALLTYPE d3d11_deferred_context_CopySubresourceRegion1(
+    ID3D11DeviceContext1 *iface, ID3D11Resource *dst, UINT dst_sub, UINT x, UINT y, UINT z,
+    ID3D11Resource *src, UINT src_sub, const D3D11_BOX *box, UINT flags)
+{
+    FIXME("iface %p, dst %p, dst_sub %u, x %u, y %u, z %u, src %p, src_sub %u, box %p, "
+          "flags 0x%08x stub.\n", iface, dst, dst_sub, x, y, z, src, src_sub, box, flags);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_UpdateSubresource1(ID3D11DeviceContext1 *iface,
+        ID3D11Resource *dst, UINT dst_sub, const D3D11_BOX *box, const void *data, UINT row_pitch,
+        UINT depth_pitch, UINT flags)
+{
+    FIXME("iface %p, dst %p, dst_sub %u, box %p, data %p, row_pitch %u, depth_pitch %u, "
+           "flags 0x%08x stub.", iface, dst, dst_sub, box, data, row_pitch, depth_pitch, flags);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_DiscardResource(ID3D11DeviceContext1 *iface,
+        ID3D11Resource *resource)
+{
+    FIXME("iface %p, resource %p stub.\n", iface, resource);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_DiscardView(ID3D11DeviceContext1 *iface,
+        ID3D11View *view)
+{
+    FIXME("iface %p, view %p stub.\n", iface, view);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetConstantBuffers1(
+        ID3D11DeviceContext1 *iface, UINT start, UINT num_buffs, ID3D11Buffer *const *buffers,
+        const UINT *first, const UINT *constants)
+{
+    FIXME("iface %p, start %u, num_buffs %u, buffers %p, first %p, constants %p stub.\n",
+            iface, start, num_buffs, buffers, first, constants);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetConstantBuffers1(
+        ID3D11DeviceContext1 *iface, UINT start, UINT num_buffs, ID3D11Buffer *const *buffers,
+        const UINT *first, const UINT *constants)
+{
+    FIXME("iface %p, start %u, num_buffs %u, buffers %p, first %p, constants %p stub.\n",
+            iface, start, num_buffs, buffers, first, constants);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_DSSetConstantBuffers1(
+        ID3D11DeviceContext1 *iface, UINT start, UINT num_buffs, ID3D11Buffer *const *buffers,
+        const UINT *first, const UINT *constants)
+{
+    FIXME("iface %p, start %u, num_buffs %u, buffers %p, first %p, constants %p stub.\n",
+            iface, start, num_buffs, buffers, first, constants);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetConstantBuffers1(
+        ID3D11DeviceContext1 *iface, UINT start, UINT num_buffs, ID3D11Buffer *const *buffers,
+        const UINT *first, const UINT *constants)
+{
+    FIXME("iface %p, start %u, num_buffs %u, buffers %p, first %p, constants %p stub.\n",
+            iface, start, num_buffs, buffers, first, constants);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSSetConstantBuffers1(
+        ID3D11DeviceContext1 *iface, UINT start, UINT num_buffs, ID3D11Buffer *const *buffers,
+        const UINT *first, const UINT *constants)
+{
+    FIXME("iface %p, start %u, num_buffs %u, buffers %p, first %p, constants %p stub.\n",
+            iface, start, num_buffs, buffers, first, constants);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetConstantBuffers1(
+        ID3D11DeviceContext1 *iface, UINT start, UINT num_buffs, ID3D11Buffer *const *buffers,
+        const UINT *first, const UINT *constants)
+{
+    FIXME("iface %p, start %u, num_buffs %u, buffers %p, first %p, constants %p stub.\n",
+            iface, start, num_buffs, buffers, first, constants);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_VSGetConstantBuffers1(
+        ID3D11DeviceContext1 *iface, UINT start, UINT num_buffs, ID3D11Buffer **buffers,
+        UINT *first, UINT *constants)
+{
+    FIXME("iface %p, start %u, num_buffs %u, buffers %p, first %p, constants %p stub.\n",
+            iface, start, num_buffs, buffers, first, constants);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_HSGetConstantBuffers1(
+        ID3D11DeviceContext1 *iface, UINT start, UINT num_buffs, ID3D11Buffer **buffers,
+        UINT *first, UINT *constants)
+{
+    FIXME("iface %p, start %u, num_buffs %u, buffers %p, first %p, constants %p stub.\n",
+            iface, start, num_buffs, buffers, first, constants);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_DSGetConstantBuffers1(
+        ID3D11DeviceContext1 *iface, UINT start, UINT num_buffs, ID3D11Buffer **buffers,
+        UINT *first, UINT *constants)
+{
+    FIXME("iface %p, start %u, num_buffs %u, buffers %p, first %p, constants %p stub.\n",
+            iface, start, num_buffs, buffers, first, constants);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_GSGetConstantBuffers1(
+        ID3D11DeviceContext1 *iface, UINT start, UINT num_buffs, ID3D11Buffer **buffers,
+        UINT *first, UINT *constants)
+{
+    FIXME("iface %p, start %u, num_buffs %u, buffers %p, first %p, constants %p stub.\n",
+            iface, start, num_buffs, buffers, first, constants);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_PSGetConstantBuffers1(
+        ID3D11DeviceContext1 *iface, UINT start, UINT num_buffs, ID3D11Buffer **buffers,
+        UINT *first, UINT *constants)
+{
+    FIXME("iface %p, start %u, num_buffs %u, buffers %p, first %p, constants %p stub.\n",
+            iface, start, num_buffs, buffers, first, constants);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers1(
+        ID3D11DeviceContext1 *iface, UINT start, UINT num_buffs, ID3D11Buffer **buffers,
+        UINT *first, UINT *constants)
+{
+    FIXME("iface %p, start %u, num_buffs %u, buffers %p, first %p, constants %p stub.\n",
+            iface, start, num_buffs, buffers, first, constants);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_SwapDeviceContextState(
+        ID3D11DeviceContext1 *iface, ID3DDeviceContextState *state, ID3DDeviceContextState **previous)
+{
+    FIXME("iface %p, state %p, previous %p stub.\n", iface, state, previous);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_ClearView(ID3D11DeviceContext1 *iface,
+        ID3D11View *view, const FLOAT color[4], const D3D11_RECT *rect, UINT num)
+{
+    FIXME("iface %p, view %p, color %p, rect %p, num %u stub.\n", iface, view, color, rect, num);
+}
+
+static void STDMETHODCALLTYPE d3d11_deferred_context_DiscardView1(ID3D11DeviceContext1 *iface,
+        ID3D11View *view, const D3D11_RECT *rects, UINT num)
+{
+    FIXME("iface %p, view %p, rects %p, num %u stub.\n", iface, view, rects, num);
+}
+
+static const struct ID3D11DeviceContext1Vtbl d3d11_deferred_context_vtbl =
 {
     /* IUnknown methods */
     d3d11_deferred_context_QueryInterface,
@@ -6099,6 +6242,26 @@ static const struct ID3D11DeviceContextVtbl d3d11_deferred_context_vtbl =
     d3d11_deferred_context_GetType,
     d3d11_deferred_context_GetContextFlags,
     d3d11_deferred_context_FinishCommandList,
+    /* ID3D11DeviceContext1 methods */
+    d3d11_deferred_context_CopySubresourceRegion1,
+    d3d11_deferred_context_UpdateSubresource1,
+    d3d11_deferred_context_DiscardResource,
+    d3d11_deferred_context_DiscardView,
+    d3d11_deferred_context_VSSetConstantBuffers1,
+    d3d11_deferred_context_HSSetConstantBuffers1,
+    d3d11_deferred_context_DSSetConstantBuffers1,
+    d3d11_deferred_context_GSSetConstantBuffers1,
+    d3d11_deferred_context_PSSetConstantBuffers1,
+    d3d11_deferred_context_CSSetConstantBuffers1,
+    d3d11_deferred_context_VSGetConstantBuffers1,
+    d3d11_deferred_context_HSGetConstantBuffers1,
+    d3d11_deferred_context_DSGetConstantBuffers1,
+    d3d11_deferred_context_GSGetConstantBuffers1,
+    d3d11_deferred_context_PSGetConstantBuffers1,
+    d3d11_deferred_context_CSGetConstantBuffers1,
+    d3d11_deferred_context_SwapDeviceContextState,
+    d3d11_deferred_context_ClearView,
+    d3d11_deferred_context_DiscardView1,
 };
 
 /* ID3D11Device methods */
@@ -6587,7 +6750,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
     if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
         return E_OUTOFMEMORY;
 
-    object->ID3D11DeviceContext_iface.lpVtbl = &d3d11_deferred_context_vtbl;
+    object->ID3D11DeviceContext1_iface.lpVtbl = &d3d11_deferred_context_vtbl;
     object->device = (ID3D11Device *)iface;
     object->refcount = 1;
 
@@ -6596,8 +6759,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
     ID3D11Device2_AddRef(iface);
     wined3d_private_store_init(&object->private_store);
 
-    *context = &object->ID3D11DeviceContext_iface;
-    return S_OK;
+    return ID3D11DeviceContext1_QueryInterface(&object->ID3D11DeviceContext1_iface,
+            &IID_ID3D11DeviceContext, (void**)context);
 }
 
 static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResource(ID3D11Device2 *iface, HANDLE resource, REFIID iid,
-- 
2.26.2

