Wine-devel
Threads by month
- ----- 2026 -----
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
September 2019
- 76 participants
- 616 discussions
[PATCH 1/3] d3d10_1/tests: Add a test for creating SRV for resource without D3D10_BIND_SHADER_RESOURCE.
by Nikolay Sivov 20 Sep '19
by Nikolay Sivov 20 Sep '19
20 Sep '19
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/d3d10_1/tests/d3d10_1.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/dlls/d3d10_1/tests/d3d10_1.c b/dlls/d3d10_1/tests/d3d10_1.c
index f6abea0ced..9c468c13a2 100644
--- a/dlls/d3d10_1/tests/d3d10_1.c
+++ b/dlls/d3d10_1/tests/d3d10_1.c
@@ -399,6 +399,24 @@ static void test_create_shader_resource_view(void)
ID3D10ShaderResourceView1_Release(srview);
ID3D10Buffer_Release(buffer);
+ /* Without D3D10_BIND_SHADER_RESOURCE. */
+ buffer_desc.ByteWidth = 1024;
+ buffer_desc.Usage = D3D10_USAGE_DEFAULT;
+ buffer_desc.BindFlags = 0;
+ buffer_desc.CPUAccessFlags = 0;
+ buffer_desc.MiscFlags = 0;
+
+ hr = ID3D10Device1_CreateBuffer(device, &buffer_desc, NULL, &buffer);
+ ok(SUCCEEDED(hr), "Failed to create a buffer, hr %#x\n", hr);
+
+ hr = ID3D10Device1_CreateShaderResourceView1(device, (ID3D10Resource *)buffer, &srv_desc, &srview);
+todo_wine
+ ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
+ if (SUCCEEDED(hr))
+ ID3D10ShaderResourceView1_Release(srview);
+
+ ID3D10Buffer_Release(buffer);
+
texture_desc.Width = 512;
texture_desc.Height = 512;
texture_desc.MipLevels = 0;
--
2.23.0
3
7
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
dlls/wined3d/glsl_shader.c | 1 -
dlls/wined3d/surface.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index 76c3f9fc99..0e0977e1d4 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -10021,7 +10021,6 @@ static HRESULT shader_glsl_compile_compute_shader(struct shader_glsl_priv *priv,
return E_OUTOFMEMORY;
}
shader_data = shader->backend_data;
- gl_shaders = shader_data->gl_shaders.cs;
if (!(shader_data->gl_shaders.cs = heap_alloc(sizeof(*gl_shaders))))
{
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index d254e904f8..4a3ecf9863 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1285,7 +1285,6 @@ static void ffp_blitter_clear(struct wined3d_blitter *blitter, struct wined3d_de
if (previous && (previous->width != view->width || previous->height != view->height))
have_identical_size = FALSE;
- previous = view;
}
if (have_identical_size)
--
2.23.0
2
1
[PATCH] testbot/Engine: Put a VM offline if it repeatedly times out during revert.
by Francois Gouget 20 Sep '19
by Francois Gouget 20 Sep '19
20 Sep '19
Putting it in maintenance mode makes it unusable until an administrator
looks at it which could take a long time when quite often the timeout is
just caused by high load on the host.
Now that LibvirtTool 'rate-limits' how often it puts VMs that keep
having errors back online, we can simply put such VMs offline and let
LibvirtTool deal with them.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/lib/WineTestBot/Engine/Scheduler.pm | 27 +++++++++------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/testbot/lib/WineTestBot/Engine/Scheduler.pm b/testbot/lib/WineTestBot/Engine/Scheduler.pm
index 569dff7be..e9a3ff9fe 100644
--- a/testbot/lib/WineTestBot/Engine/Scheduler.pm
+++ b/testbot/lib/WineTestBot/Engine/Scheduler.pm
@@ -270,31 +270,28 @@ sub _CheckAndClassifyVMs()
{
# The child process got stuck!
$FoundVMErrors = 1;
- my $NewStatus = "dirty";
if ($VM->Status eq "reverting" or $VM->Status eq "sleeping")
{
my $Errors = ($VM->Errors || 0) + 1;
$VM->Errors($Errors);
- if ($Errors >= $MaxVMErrors)
- {
- $NewStatus = "maintenance";
- NotifyAdministrator("Putting the $VMKey VM in maintenance mode",
- "The last $Errors revert operations timed out.\n\n".
- "No further operation will be attempted until an administrator has put\n".
- "the VM back online.");
- $Sched->{busyvms}->{$VMKey} = 1;
- }
+ $VM->Status("offline");
+ NotifyAdministrator("Putting the $VMKey VM offline",
+ "The last $Errors revert operations timed out.\n\n".
+ "This may be because of some transient load on the VM host but if not\n".
+ "an administrator should look into it. In any case the TestBot will try\n".
+ "to regain access to the VM.");
+ $Sched->{busyvms}->{$VMKey} = 1;
}
- $VM->Status($NewStatus);
- $VM->KillChild();
- $VM->Save();
- $VM->RecordResult($Sched->{records}, "boterror stuck process");
- if ($NewStatus eq "dirty")
+ else
{
+ $VM->Status("dirty");
$Sched->{lambvms}->{$VMKey} = 1;
$Host->{dirty}++;
$Host->{active}++;
}
+ $VM->KillChild();
+ $VM->Save();
+ $VM->RecordResult($Sched->{records}, "boterror stuck process");
}
elsif ($VM->Status =~ /^(?:dirty|running|reverting)$/)
{
--
2.20.1
1
0
[PATCH] testbot/LibvirtTool: Don't put VMs in maintenance even after repeated errors.
by Francois Gouget 20 Sep '19
by Francois Gouget 20 Sep '19
20 Sep '19
The VM may have gone offline simply because of repeated revert
timeouts. This can happen if there is too much load on the host which
is a transient issue. But the administrator may not be available right
away to investigate and put the VM back online.
So warn the administrator, keep monitoring the offline VM but space out
the attempts to use the VM so the host can try running tasks on other
VMs.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/LibvirtTool.pl | 43 +++++++++++++++++++++++++-------------
1 file changed, 28 insertions(+), 15 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index dca5a921e..7bd75d00e 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -169,10 +169,6 @@ sub FatalError($)
# Get the up-to-date VM status
$VM = CreateVMs()->GetItem($VMKey);
- # Put the VM offline or mark it for maintenance
- my $Errors = ($VM->Errors || 0) + 1;
- my $NewStatus = $Errors < $MaxVMErrors ? "offline" : "maintenance";
-
if ($VM->Status eq "maintenance")
{
# Still proceed with changing the non-Status fields and notifying the
@@ -185,10 +181,11 @@ sub FatalError($)
}
else
{
- $VM->Status($NewStatus);
+ $VM->Status("offline");
}
$VM->ChildDeadline(undef);
$VM->ChildPid(undef);
+ my $Errors = ($VM->Errors || 0) + 1;
$VM->Errors($Errors);
my ($ErrProperty, $SaveErrMessage) = $VM->Save();
@@ -196,19 +193,19 @@ sub FatalError($)
{
LogMsg "Could not put the $VMKey VM offline: $SaveErrMessage ($ErrProperty)\n";
}
- elsif ($NewStatus eq "offline")
+ elsif ($Errors >= $MaxVMErrors)
{
- NotifyAdministrator("Putting the $VMKey VM offline",
- "Could not perform the $Action operation on the $VMKey VM:\n".
+ NotifyAdministrator("The $VMKey VM needs maintenance",
+ "Got $Errors consecutive errors working on the $VMKey VM:\n".
"\n$ErrMessage\n".
- "The VM has been put offline and the TestBot will try to regain access to it.");
+ "It probably needs fixing to get back online.");
}
- elsif ($NewStatus eq "maintenance")
+ else
{
- NotifyAdministrator("The $VMKey VM needs maintenance",
- "Got $Errors consecutive errors working on the $VMKey VM:\n".
+ NotifyAdministrator("Putting the $VMKey VM offline",
+ "Could not perform the $Action operation on the $VMKey VM:\n".
"\n$ErrMessage\n".
- "An administrator needs to look at it and to put it back online.");
+ "The VM has been put offline and the TestBot will try to regain access to it.");
}
exit 1;
}
@@ -259,6 +256,14 @@ sub ChangeStatus($$;$)
sub Monitor()
{
+ # Still try recovering the VM in case of repeated errors, but space out
+ # attempts to not keep the host busy with a broken VM. Note that after
+ # 1 hour the monitor process gets killed and replaced (to deal with stuck
+ # monitor processes) but even so the VM will be checked once per hour.
+ my $Interval = ($VM->Errors || 0) >= $MaxVMErrors ? 1860 : 60;
+ my $NextTry = time() + $Interval;
+ Debug(Elapsed($Start), " Checking $VMKey in ${Interval}s\n");
+
$CurrentStatus = "offline";
while (1)
{
@@ -281,6 +286,14 @@ sub Monitor()
"to ". $VM->Status ." after ". PrettyElapsed($Start) .".");
return 0;
}
+ my $Sleep = $NextTry - time();
+ if ($Sleep > 0)
+ {
+ # Check that the VM still needs monitoring at least once per minute.
+ $Sleep = 60 if ($Sleep > 60);
+ sleep($Sleep);
+ next;
+ }
my $IsReady = $VM->GetDomain()->IsReady();
if ($IsReady and $VM->GetDomain()->IsPoweredOn())
@@ -301,8 +314,8 @@ sub Monitor()
return 0;
}
- Debug(Elapsed($Start), " $VMKey is still unreachable\n");
- sleep(60);
+ Debug(Elapsed($Start), " $VMKey is still busy / unreachable, trying again in ${Interval}s\n");
+ $NextTry = time() + $Interval;
}
}
--
2.20.1
1
0
[PATCH] testbot/LibvirtTool: Detect if a VM is booting after a revert.
by Francois Gouget 20 Sep '19
by Francois Gouget 20 Sep '19
20 Sep '19
And adjust the TestAgent connection timeout accordingly.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/LibvirtTool.pl | 6 +++---
testbot/lib/WineTestBot/LibvirtDomain.pm | 13 +++++++++++--
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index 7bd75d00e..0801c997f 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -379,7 +379,7 @@ sub Revert()
# Revert the VM (and power it on if necessary)
my $Domain = $VM->GetDomain();
Debug(Elapsed($Start), " Reverting $VMKey to ", $VM->IdleSnapshot, "\n");
- my $ErrMessage = $Domain->RevertToSnapshot();
+ my ($ErrMessage, $Booting) = $Domain->RevertToSnapshot();
if (defined $ErrMessage)
{
# Libvirt/QEmu is buggy and cannot revert a running VM from one hardware
@@ -393,7 +393,7 @@ sub Revert()
}
Debug(Elapsed($Start), " Reverting $VMKey to ", $VM->IdleSnapshot, "... again\n");
- $ErrMessage = $Domain->RevertToSnapshot();
+ ($ErrMessage, $Booting) = $Domain->RevertToSnapshot();
}
if (defined $ErrMessage)
{
@@ -407,7 +407,7 @@ sub Revert()
Debug(Elapsed($Start), " Verifying the TestAgent server\n");
LogMsg "Verifying the $VMKey TestAgent server\n";
my $TA = $VM->GetAgent();
- $TA->SetConnectTimeout(undef, undef, $WaitForBoot);
+ $TA->SetConnectTimeout(undef, undef, $WaitForBoot) if ($Booting);
my $Success = $TA->Ping();
$TA->Disconnect();
if (!$Success)
diff --git a/testbot/lib/WineTestBot/LibvirtDomain.pm b/testbot/lib/WineTestBot/LibvirtDomain.pm
index 4e1c4ee07..bb2276820 100644
--- a/testbot/lib/WineTestBot/LibvirtDomain.pm
+++ b/testbot/lib/WineTestBot/LibvirtDomain.pm
@@ -315,11 +315,20 @@ sub RevertToSnapshot($)
my $SnapshotName = $self->{VM}->IdleSnapshot;
my ($ErrMessage, $Domain, $Snapshot) = $self->_GetSnapshot($SnapshotName);
- return $ErrMessage if (defined $ErrMessage);
+ return ($ErrMessage, undef) if (defined $ErrMessage);
# Note that if the snapshot was of a powered off domain, this boots it up
eval { $Snapshot->revert_to(Sys::Virt::DomainSnapshot::REVERT_RUNNING) };
- return $@ ? $self->_Reset(_eval_err()) : undef;
+ return $self->_Reset(_eval_err(), undef) if ($@);
+
+ my ($State, $Reason) = $Domain->get_state();
+ if ($State != Sys::Virt::Domain::STATE_RUNNING)
+ {
+ return ($self->{VM}->Name ." is not running (".
+ _GetStateDescription($State, $Reason)
+ .") after revert to $SnapshotName", undef);
+ }
+ return (undef, $Reason != Sys::Virt::Domain::STATE_RUNNING_FROM_SNAPSHOT);
}
sub CreateSnapshot($)
--
2.20.1
1
0
Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com>
---
dlls/d3d11/d3d11_private.h | 2 +-
dlls/d3d11/device.c | 605 +++++++++++++++++++++----------------
2 files changed, 349 insertions(+), 258 deletions(-)
diff --git a/dlls/d3d11/d3d11_private.h b/dlls/d3d11/d3d11_private.h
index 22196809b6..39743c3d09 100644
--- a/dlls/d3d11/d3d11_private.h
+++ b/dlls/d3d11/d3d11_private.h
@@ -498,7 +498,7 @@ struct d3d_query *unsafe_impl_from_ID3D11Asynchronous(ID3D11Asynchronous *iface)
/* ID3D11DeviceContext - immediate context */
struct d3d11_immediate_context
{
- ID3D11DeviceContext1 ID3D11DeviceContext1_iface;
+ ID3D11DeviceContext2 ID3D11DeviceContext2_iface;
ID3D11Multithread ID3D11Multithread_iface;
LONG refcount;
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 5fac1172ca..689b9f0fe2 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -31,30 +31,31 @@ static const struct wined3d_parent_ops d3d_null_wined3d_parent_ops =
/* ID3D11DeviceContext - immediate context methods */
-static inline struct d3d11_immediate_context *impl_from_ID3D11DeviceContext1(ID3D11DeviceContext1 *iface)
+static inline struct d3d11_immediate_context *impl_from_ID3D11DeviceContext2(ID3D11DeviceContext2 *iface)
{
- return CONTAINING_RECORD(iface, struct d3d11_immediate_context, ID3D11DeviceContext1_iface);
+ return CONTAINING_RECORD(iface, struct d3d11_immediate_context, ID3D11DeviceContext2_iface);
}
-static inline struct d3d_device *device_from_immediate_ID3D11DeviceContext1(ID3D11DeviceContext1 *iface)
+static inline struct d3d_device *device_from_immediate_ID3D11DeviceContext2(ID3D11DeviceContext2 *iface)
{
- struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
+ struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext2(iface);
return CONTAINING_RECORD(context, struct d3d_device, immediate_context);
}
-static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_QueryInterface(ID3D11DeviceContext1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_QueryInterface(ID3D11DeviceContext2 *iface,
REFIID iid, void **out)
{
- struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
+ struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext2(iface);
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
- if (IsEqualGUID(iid, &IID_ID3D11DeviceContext1)
+ if (IsEqualGUID(iid, &IID_ID3D11DeviceContext2)
+ || IsEqualGUID(iid, &IID_ID3D11DeviceContext1)
|| IsEqualGUID(iid, &IID_ID3D11DeviceContext)
|| IsEqualGUID(iid, &IID_ID3D11DeviceChild)
|| IsEqualGUID(iid, &IID_IUnknown))
{
- *out = &context->ID3D11DeviceContext1_iface;
+ *out = &context->ID3D11DeviceContext2_iface;
}
else if (IsEqualGUID(iid, &IID_ID3D11Multithread))
{
@@ -67,14 +68,14 @@ static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_QueryInterface(ID3D11De
return E_NOINTERFACE;
}
- ID3D11DeviceContext1_AddRef(iface);
+ ID3D11DeviceContext2_AddRef(iface);
return S_OK;
}
-static ULONG STDMETHODCALLTYPE d3d11_immediate_context_AddRef(ID3D11DeviceContext1 *iface)
+static ULONG STDMETHODCALLTYPE d3d11_immediate_context_AddRef(ID3D11DeviceContext2 *iface)
{
- struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext2(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
ULONG refcount = InterlockedIncrement(&context->refcount);
TRACE("%p increasing refcount to %u.\n", context, refcount);
@@ -87,10 +88,10 @@ static ULONG STDMETHODCALLTYPE d3d11_immediate_context_AddRef(ID3D11DeviceContex
return refcount;
}
-static ULONG STDMETHODCALLTYPE d3d11_immediate_context_Release(ID3D11DeviceContext1 *iface)
+static ULONG STDMETHODCALLTYPE d3d11_immediate_context_Release(ID3D11DeviceContext2 *iface)
{
- struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext2(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
ULONG refcount = InterlockedDecrement(&context->refcount);
TRACE("%p decreasing refcount to %u.\n", context, refcount);
@@ -103,10 +104,10 @@ static ULONG STDMETHODCALLTYPE d3d11_immediate_context_Release(ID3D11DeviceConte
return refcount;
}
-static void d3d11_immediate_context_get_constant_buffers(ID3D11DeviceContext1 *iface,
+static void d3d11_immediate_context_get_constant_buffers(ID3D11DeviceContext2 *iface,
enum wined3d_shader_type type, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
wined3d_mutex_lock();
@@ -129,10 +130,10 @@ static void d3d11_immediate_context_get_constant_buffers(ID3D11DeviceContext1 *i
wined3d_mutex_unlock();
}
-static void d3d11_immediate_context_set_constant_buffers(ID3D11DeviceContext1 *iface,
+static void d3d11_immediate_context_set_constant_buffers(ID3D11DeviceContext2 *iface,
enum wined3d_shader_type type, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
wined3d_mutex_lock();
@@ -146,9 +147,9 @@ static void d3d11_immediate_context_set_constant_buffers(ID3D11DeviceContext1 *i
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_GetDevice(ID3D11DeviceContext1 *iface, ID3D11Device **device)
+static void STDMETHODCALLTYPE d3d11_immediate_context_GetDevice(ID3D11DeviceContext2 *iface, ID3D11Device **device)
{
- struct d3d_device *device_object = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device_object = device_from_immediate_ID3D11DeviceContext2(iface);
TRACE("iface %p, device %p.\n", iface, device);
@@ -156,37 +157,37 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GetDevice(ID3D11DeviceCont
ID3D11Device_AddRef(*device);
}
-static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_GetPrivateData(ID3D11DeviceContext1 *iface, REFGUID guid,
+static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_GetPrivateData(ID3D11DeviceContext2 *iface, REFGUID guid,
UINT *data_size, void *data)
{
- struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
+ struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext2(iface);
TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return d3d_get_private_data(&context->private_store, guid, data_size, data);
}
-static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_SetPrivateData(ID3D11DeviceContext1 *iface, REFGUID guid,
+static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_SetPrivateData(ID3D11DeviceContext2 *iface, REFGUID guid,
UINT data_size, const void *data)
{
- struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
+ struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext2(iface);
TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return d3d_set_private_data(&context->private_store, guid, data_size, data);
}
-static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_SetPrivateDataInterface(ID3D11DeviceContext1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_SetPrivateDataInterface(ID3D11DeviceContext2 *iface,
REFGUID guid, const IUnknown *data)
{
- struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
+ struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext2(iface);
TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
return d3d_set_private_data_interface(&context->private_store, guid, data);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetConstantBuffers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetConstantBuffers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
{
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
@@ -196,10 +197,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetConstantBuffers(ID3D1
buffer_count, buffers);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetShaderResources(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetShaderResources(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
@@ -216,10 +217,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetShaderResources(ID3D1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetShader(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetShader(ID3D11DeviceContext2 *iface,
ID3D11PixelShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_pixel_shader *ps = unsafe_impl_from_ID3D11PixelShader(shader);
TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
@@ -233,10 +234,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetShader(ID3D11DeviceCo
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetSamplers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetSamplers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
@@ -253,10 +254,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetSamplers(ID3D11Device
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetShader(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetShader(ID3D11DeviceContext2 *iface,
ID3D11VertexShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_vertex_shader *vs = unsafe_impl_from_ID3D11VertexShader(shader);
TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
@@ -270,10 +271,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetShader(ID3D11DeviceCo
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DrawIndexed(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DrawIndexed(ID3D11DeviceContext2 *iface,
UINT index_count, UINT start_index_location, INT base_vertex_location)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
TRACE("iface %p, index_count %u, start_index_location %u, base_vertex_location %d.\n",
iface, index_count, start_index_location, base_vertex_location);
@@ -284,10 +285,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DrawIndexed(ID3D11DeviceCo
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_Draw(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_Draw(ID3D11DeviceContext2 *iface,
UINT vertex_count, UINT start_vertex_location)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
TRACE("iface %p, vertex_count %u, start_vertex_location %u.\n",
iface, vertex_count, start_vertex_location);
@@ -297,7 +298,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_Draw(ID3D11DeviceContext1
wined3d_mutex_unlock();
}
-static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_Map(ID3D11DeviceContext1 *iface, ID3D11Resource *resource,
+static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_Map(ID3D11DeviceContext2 *iface, ID3D11Resource *resource,
UINT subresource_idx, D3D11_MAP map_type, UINT map_flags, D3D11_MAPPED_SUBRESOURCE *mapped_subresource)
{
struct wined3d_resource *wined3d_resource;
@@ -324,7 +325,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_Map(ID3D11DeviceContext
return hr;
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_Unmap(ID3D11DeviceContext1 *iface, ID3D11Resource *resource,
+static void STDMETHODCALLTYPE d3d11_immediate_context_Unmap(ID3D11DeviceContext2 *iface, ID3D11Resource *resource,
UINT subresource_idx)
{
struct wined3d_resource *wined3d_resource;
@@ -338,7 +339,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_Unmap(ID3D11DeviceContext1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetConstantBuffers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetConstantBuffers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
{
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
@@ -348,10 +349,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetConstantBuffers(ID3D1
buffer_count, buffers);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_IASetInputLayout(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_IASetInputLayout(ID3D11DeviceContext2 *iface,
ID3D11InputLayout *input_layout)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_input_layout *layout = unsafe_impl_from_ID3D11InputLayout(input_layout);
TRACE("iface %p, input_layout %p.\n", iface, input_layout);
@@ -361,10 +362,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IASetInputLayout(ID3D11Dev
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_IASetVertexBuffers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_IASetVertexBuffers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers, const UINT *strides, const UINT *offsets)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p.\n",
@@ -381,10 +382,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IASetVertexBuffers(ID3D11D
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_IASetIndexBuffer(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_IASetIndexBuffer(ID3D11DeviceContext2 *iface,
ID3D11Buffer *buffer, DXGI_FORMAT format, UINT offset)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_buffer *buffer_impl = unsafe_impl_from_ID3D11Buffer(buffer);
TRACE("iface %p, buffer %p, format %s, offset %u.\n",
@@ -397,11 +398,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IASetIndexBuffer(ID3D11Dev
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DrawIndexedInstanced(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DrawIndexedInstanced(ID3D11DeviceContext2 *iface,
UINT instance_index_count, UINT instance_count, UINT start_index_location, INT base_vertex_location,
UINT start_instance_location)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
TRACE("iface %p, instance_index_count %u, instance_count %u, start_index_location %u, "
"base_vertex_location %d, start_instance_location %u.\n",
@@ -415,10 +416,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DrawIndexedInstanced(ID3D1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DrawInstanced(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DrawInstanced(ID3D11DeviceContext2 *iface,
UINT instance_vertex_count, UINT instance_count, UINT start_vertex_location, UINT start_instance_location)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
TRACE("iface %p, instance_vertex_count %u, instance_count %u, start_vertex_location %u, "
"start_instance_location %u.\n",
@@ -431,7 +432,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DrawInstanced(ID3D11Device
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetConstantBuffers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetConstantBuffers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
{
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
@@ -441,10 +442,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetConstantBuffers(ID3D1
buffer_count, buffers);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShader(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShader(ID3D11DeviceContext2 *iface,
ID3D11GeometryShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_geometry_shader *gs = unsafe_impl_from_ID3D11GeometryShader(shader);
TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
@@ -458,10 +459,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShader(ID3D11DeviceCo
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_IASetPrimitiveTopology(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_IASetPrimitiveTopology(ID3D11DeviceContext2 *iface,
D3D11_PRIMITIVE_TOPOLOGY topology)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
enum wined3d_primitive_type primitive_type;
unsigned int patch_vertex_count;
@@ -474,10 +475,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IASetPrimitiveTopology(ID3
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetShaderResources(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetShaderResources(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
@@ -493,10 +494,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetShaderResources(ID3D1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetSamplers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetSamplers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
@@ -513,7 +514,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetSamplers(ID3D11Device
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_Begin(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_Begin(ID3D11DeviceContext2 *iface,
ID3D11Asynchronous *asynchronous)
{
struct d3d_query *query = unsafe_impl_from_ID3D11Asynchronous(asynchronous);
@@ -527,7 +528,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_Begin(ID3D11DeviceContext1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_End(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_End(ID3D11DeviceContext2 *iface,
ID3D11Asynchronous *asynchronous)
{
struct d3d_query *query = unsafe_impl_from_ID3D11Asynchronous(asynchronous);
@@ -541,7 +542,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_End(ID3D11DeviceContext1 *
wined3d_mutex_unlock();
}
-static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_GetData(ID3D11DeviceContext1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_GetData(ID3D11DeviceContext2 *iface,
ID3D11Asynchronous *asynchronous, void *data, UINT data_size, UINT data_flags)
{
struct d3d_query *query = unsafe_impl_from_ID3D11Asynchronous(asynchronous);
@@ -573,10 +574,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_GetData(ID3D11DeviceCon
return hr;
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_SetPredication(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_SetPredication(ID3D11DeviceContext2 *iface,
ID3D11Predicate *predicate, BOOL value)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_query *query;
TRACE("iface %p, predicate %p, value %#x.\n", iface, predicate, value);
@@ -588,10 +589,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_SetPredication(ID3D11Devic
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShaderResources(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShaderResources(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
@@ -607,10 +608,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShaderResources(ID3D1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetSamplers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetSamplers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
@@ -627,11 +628,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetSamplers(ID3D11Device
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetRenderTargets(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetRenderTargets(ID3D11DeviceContext2 *iface,
UINT render_target_view_count, ID3D11RenderTargetView *const *render_target_views,
ID3D11DepthStencilView *depth_stencil_view)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_depthstencil_view *dsv;
unsigned int i;
@@ -655,12 +656,12 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetRenderTargets(ID3D11D
}
static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetRenderTargetsAndUnorderedAccessViews(
- ID3D11DeviceContext1 *iface, UINT render_target_view_count,
+ ID3D11DeviceContext2 *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)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, render_target_view_count %u, render_target_views %p, depth_stencil_view %p, "
@@ -701,10 +702,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetRenderTargetsAndUnord
}
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetBlendState(ID3D11DeviceContext2 *iface,
ID3D11BlendState *blend_state, const float blend_factor[4], UINT sample_mask)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
static const float default_blend_factor[] = {1.0f, 1.0f, 1.0f, 1.0f};
struct d3d_blend_state *blend_state_impl;
const D3D11_BLEND_DESC *desc;
@@ -770,10 +771,10 @@ static void set_default_depth_stencil_state(struct wined3d_device *wined3d_devic
wined3d_device_set_render_state(wined3d_device, WINED3D_RS_STENCILENABLE, FALSE);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3D11DeviceContext2 *iface,
ID3D11DepthStencilState *depth_stencil_state, UINT stencil_ref)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
const D3D11_DEPTH_STENCILOP_DESC *front, *back;
const D3D11_DEPTH_STENCIL_DESC *desc;
@@ -832,10 +833,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMSetDepthStencilState(ID3
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_SOSetTargets(ID3D11DeviceContext1 *iface, UINT buffer_count,
+static void STDMETHODCALLTYPE d3d11_immediate_context_SOSetTargets(ID3D11DeviceContext2 *iface, UINT buffer_count,
ID3D11Buffer *const *buffers, const UINT *offsets)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int count, i;
TRACE("iface %p, buffer_count %u, buffers %p, offsets %p.\n", iface, buffer_count, buffers, offsets);
@@ -856,15 +857,15 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_SOSetTargets(ID3D11DeviceC
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DrawAuto(ID3D11DeviceContext1 *iface)
+static void STDMETHODCALLTYPE d3d11_immediate_context_DrawAuto(ID3D11DeviceContext2 *iface)
{
FIXME("iface %p stub!\n", iface);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DrawIndexedInstancedIndirect(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DrawIndexedInstancedIndirect(ID3D11DeviceContext2 *iface,
ID3D11Buffer *buffer, UINT offset)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_buffer *d3d_buffer;
TRACE("iface %p, buffer %p, offset %u.\n", iface, buffer, offset);
@@ -877,10 +878,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DrawIndexedInstancedIndire
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DrawInstancedIndirect(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DrawInstancedIndirect(ID3D11DeviceContext2 *iface,
ID3D11Buffer *buffer, UINT offset)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_buffer *d3d_buffer;
TRACE("iface %p, buffer %p, offset %u.\n", iface, buffer, offset);
@@ -893,10 +894,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DrawInstancedIndirect(ID3D
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_Dispatch(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_Dispatch(ID3D11DeviceContext2 *iface,
UINT thread_group_count_x, UINT thread_group_count_y, UINT thread_group_count_z)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
TRACE("iface %p, thread_group_count_x %u, thread_group_count_y %u, thread_group_count_z %u.\n",
iface, thread_group_count_x, thread_group_count_y, thread_group_count_z);
@@ -907,10 +908,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_Dispatch(ID3D11DeviceConte
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DispatchIndirect(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DispatchIndirect(ID3D11DeviceContext2 *iface,
ID3D11Buffer *buffer, UINT offset)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_buffer *buffer_impl;
TRACE("iface %p, buffer %p, offset %u.\n", iface, buffer, offset);
@@ -923,10 +924,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DispatchIndirect(ID3D11Dev
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceContext2 *iface,
ID3D11RasterizerState *rasterizer_state)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_rasterizer_state *rasterizer_state_impl;
const D3D11_RASTERIZER_DESC *desc;
union
@@ -968,10 +969,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetViewports(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetViewports(ID3D11DeviceContext2 *iface,
UINT viewport_count, const D3D11_VIEWPORT *viewports)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct wined3d_viewport wined3d_vp[WINED3D_MAX_VIEWPORTS];
unsigned int i;
@@ -995,10 +996,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetViewports(ID3D11Devic
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetScissorRects(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetScissorRects(ID3D11DeviceContext2 *iface,
UINT rect_count, const D3D11_RECT *rects)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
TRACE("iface %p, rect_count %u, rects %p.\n", iface, rect_count, rects);
@@ -1010,11 +1011,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetScissorRects(ID3D11De
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CopySubresourceRegion(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CopySubresourceRegion(ID3D11DeviceContext2 *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)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource;
struct wined3d_box wined3d_src_box;
@@ -1035,10 +1036,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CopySubresourceRegion(ID3D
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CopyResource(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CopyResource(ID3D11DeviceContext2 *iface,
ID3D11Resource *dst_resource, ID3D11Resource *src_resource)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource;
TRACE("iface %p, dst_resource %p, src_resource %p.\n", iface, dst_resource, src_resource);
@@ -1050,11 +1051,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CopyResource(ID3D11DeviceC
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateSubresource(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateSubresource(ID3D11DeviceContext2 *iface,
ID3D11Resource *resource, UINT subresource_idx, const D3D11_BOX *box,
const void *data, UINT row_pitch, UINT depth_pitch)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct wined3d_resource *wined3d_resource;
struct wined3d_box wined3d_box;
@@ -1071,10 +1072,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateSubresource(ID3D11De
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CopyStructureCount(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CopyStructureCount(ID3D11DeviceContext2 *iface,
ID3D11Buffer *dst_buffer, UINT dst_offset, ID3D11UnorderedAccessView *src_view)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d11_unordered_access_view *uav;
struct d3d_buffer *buffer_impl;
@@ -1090,10 +1091,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CopyStructureCount(ID3D11D
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_ClearRenderTargetView(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_ClearRenderTargetView(ID3D11DeviceContext2 *iface,
ID3D11RenderTargetView *render_target_view, const float color_rgba[4])
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_rendertarget_view *view = unsafe_impl_from_ID3D11RenderTargetView(render_target_view);
const struct wined3d_color color = {color_rgba[0], color_rgba[1], color_rgba[2], color_rgba[3]};
HRESULT hr;
@@ -1111,10 +1112,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearRenderTargetView(ID3D
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_ClearUnorderedAccessViewUint(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_ClearUnorderedAccessViewUint(ID3D11DeviceContext2 *iface,
ID3D11UnorderedAccessView *unordered_access_view, const UINT values[4])
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d11_unordered_access_view *view;
TRACE("iface %p, unordered_access_view %p, values {%u, %u, %u, %u}.\n",
@@ -1127,17 +1128,17 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearUnorderedAccessViewUi
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_ClearUnorderedAccessViewFloat(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_ClearUnorderedAccessViewFloat(ID3D11DeviceContext2 *iface,
ID3D11UnorderedAccessView *unordered_access_view, const float values[4])
{
FIXME("iface %p, unordered_access_view %p, values %s stub!\n",
iface, unordered_access_view, debug_float4(values));
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_ClearDepthStencilView(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_ClearDepthStencilView(ID3D11DeviceContext2 *iface,
ID3D11DepthStencilView *depth_stencil_view, UINT flags, FLOAT depth, UINT8 stencil)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_depthstencil_view *view = unsafe_impl_from_ID3D11DepthStencilView(depth_stencil_view);
DWORD wined3d_flags;
HRESULT hr;
@@ -1157,7 +1158,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearDepthStencilView(ID3D
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_GenerateMips(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_GenerateMips(ID3D11DeviceContext2 *iface,
ID3D11ShaderResourceView *view)
{
struct d3d_shader_resource_view *srv = unsafe_impl_from_ID3D11ShaderResourceView(view);
@@ -1169,13 +1170,13 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GenerateMips(ID3D11DeviceC
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_SetResourceMinLOD(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_SetResourceMinLOD(ID3D11DeviceContext2 *iface,
ID3D11Resource *resource, FLOAT min_lod)
{
FIXME("iface %p, resource %p, min_lod %f stub!\n", iface, resource, min_lod);
}
-static FLOAT STDMETHODCALLTYPE d3d11_immediate_context_GetResourceMinLOD(ID3D11DeviceContext1 *iface,
+static FLOAT STDMETHODCALLTYPE d3d11_immediate_context_GetResourceMinLOD(ID3D11DeviceContext2 *iface,
ID3D11Resource *resource)
{
FIXME("iface %p, resource %p stub!\n", iface, resource);
@@ -1183,12 +1184,12 @@ static FLOAT STDMETHODCALLTYPE d3d11_immediate_context_GetResourceMinLOD(ID3D11D
return 0.0f;
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11DeviceContext2 *iface,
ID3D11Resource *dst_resource, UINT dst_subresource_idx,
ID3D11Resource *src_resource, UINT src_subresource_idx,
DXGI_FORMAT format)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource;
enum wined3d_format_id wined3d_format;
@@ -1207,16 +1208,16 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_ExecuteCommandList(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_ExecuteCommandList(ID3D11DeviceContext2 *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_immediate_context_HSSetShaderResources(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShaderResources(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
@@ -1233,10 +1234,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShaderResources(ID3D1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShader(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShader(ID3D11DeviceContext2 *iface,
ID3D11HullShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d11_hull_shader *hs = unsafe_impl_from_ID3D11HullShader(shader);
TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
@@ -1250,10 +1251,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShader(ID3D11DeviceCo
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetSamplers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetSamplers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
@@ -1270,7 +1271,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetSamplers(ID3D11Device
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetConstantBuffers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetConstantBuffers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
{
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
@@ -1280,10 +1281,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetConstantBuffers(ID3D1
buffer_count, buffers);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetShaderResources(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetShaderResources(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
@@ -1300,10 +1301,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetShaderResources(ID3D1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetShader(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetShader(ID3D11DeviceContext2 *iface,
ID3D11DomainShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d11_domain_shader *ds = unsafe_impl_from_ID3D11DomainShader(shader);
TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
@@ -1317,10 +1318,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetShader(ID3D11DeviceCo
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetSamplers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetSamplers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
@@ -1337,7 +1338,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetSamplers(ID3D11Device
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetConstantBuffers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetConstantBuffers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
{
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
@@ -1347,10 +1348,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetConstantBuffers(ID3D1
buffer_count, buffers);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetShaderResources(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetShaderResources(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
@@ -1367,10 +1368,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetShaderResources(ID3D1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetUnorderedAccessViews(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetUnorderedAccessViews(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT view_count, ID3D11UnorderedAccessView *const *views, const UINT *initial_counts)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, view_count %u, views %p, initial_counts %p.\n",
@@ -1387,10 +1388,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetUnorderedAccessViews(
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetShader(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetShader(ID3D11DeviceContext2 *iface,
ID3D11ComputeShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d11_compute_shader *cs = unsafe_impl_from_ID3D11ComputeShader(shader);
TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
@@ -1404,10 +1405,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetShader(ID3D11DeviceCo
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetSamplers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetSamplers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
@@ -1424,7 +1425,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetSamplers(ID3D11Device
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetConstantBuffers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetConstantBuffers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
{
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
@@ -1434,7 +1435,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetConstantBuffers(ID3D1
buffer_count, buffers);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetConstantBuffers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetConstantBuffers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
{
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
@@ -1444,10 +1445,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetConstantBuffers(ID3D1
buffer_count, buffers);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShaderResources(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShaderResources(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
@@ -1472,10 +1473,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShaderResources(ID3D1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShader(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShader(ID3D11DeviceContext2 *iface,
ID3D11PixelShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct wined3d_shader *wined3d_shader;
struct d3d_pixel_shader *shader_impl;
@@ -1501,10 +1502,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShader(ID3D11DeviceCo
ID3D11PixelShader_AddRef(*shader);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetSamplers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetSamplers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
@@ -1529,10 +1530,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetSamplers(ID3D11Device
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShader(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShader(ID3D11DeviceContext2 *iface,
ID3D11VertexShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_vertex_shader *shader_impl;
struct wined3d_shader *wined3d_shader;
@@ -1558,7 +1559,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShader(ID3D11DeviceCo
ID3D11VertexShader_AddRef(*shader);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetConstantBuffers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetConstantBuffers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
{
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
@@ -1568,10 +1569,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetConstantBuffers(ID3D1
buffer_count, buffers);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetInputLayout(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetInputLayout(ID3D11DeviceContext2 *iface,
ID3D11InputLayout **input_layout)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct wined3d_vertex_declaration *wined3d_declaration;
struct d3d_input_layout *input_layout_impl;
@@ -1591,10 +1592,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetInputLayout(ID3D11Dev
ID3D11InputLayout_AddRef(*input_layout);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetVertexBuffers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetVertexBuffers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *strides, UINT *offsets)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p.\n",
@@ -1628,10 +1629,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetVertexBuffers(ID3D11D
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetIndexBuffer(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetIndexBuffer(ID3D11DeviceContext2 *iface,
ID3D11Buffer **buffer, DXGI_FORMAT *format, UINT *offset)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
enum wined3d_format_id wined3d_format;
struct wined3d_buffer *wined3d_buffer;
struct d3d_buffer *buffer_impl;
@@ -1653,7 +1654,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetIndexBuffer(ID3D11Dev
ID3D11Buffer_AddRef(*buffer = &buffer_impl->ID3D11Buffer_iface);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetConstantBuffers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetConstantBuffers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
{
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
@@ -1663,10 +1664,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetConstantBuffers(ID3D1
buffer_count, buffers);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShader(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShader(ID3D11DeviceContext2 *iface,
ID3D11GeometryShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_geometry_shader *shader_impl;
struct wined3d_shader *wined3d_shader;
@@ -1692,10 +1693,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShader(ID3D11DeviceCo
ID3D11GeometryShader_AddRef(*shader);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetPrimitiveTopology(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetPrimitiveTopology(ID3D11DeviceContext2 *iface,
D3D11_PRIMITIVE_TOPOLOGY *topology)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
enum wined3d_primitive_type primitive_type;
unsigned int patch_vertex_count;
@@ -1708,10 +1709,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetPrimitiveTopology(ID3
d3d11_primitive_topology_from_wined3d_primitive_type(primitive_type, patch_vertex_count, topology);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShaderResources(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShaderResources(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
@@ -1735,10 +1736,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShaderResources(ID3D1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetSamplers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetSamplers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
@@ -1763,10 +1764,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetSamplers(ID3D11Device
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_GetPredication(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_GetPredication(ID3D11DeviceContext2 *iface,
ID3D11Predicate **predicate, BOOL *value)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct wined3d_query *wined3d_predicate;
struct d3d_query *predicate_impl;
@@ -1786,10 +1787,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GetPredication(ID3D11Devic
ID3D11Predicate_AddRef(*predicate);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShaderResources(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShaderResources(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
@@ -1813,10 +1814,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShaderResources(ID3D1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetSamplers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetSamplers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
@@ -1841,11 +1842,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetSamplers(ID3D11Device
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetRenderTargets(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetRenderTargets(ID3D11DeviceContext2 *iface,
UINT render_target_view_count, ID3D11RenderTargetView **render_target_views,
ID3D11DepthStencilView **depth_stencil_view)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct wined3d_rendertarget_view *wined3d_view;
TRACE("iface %p, render_target_view_count %u, render_target_views %p, depth_stencil_view %p.\n",
@@ -1890,13 +1891,13 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetRenderTargets(ID3D11D
}
static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetRenderTargetsAndUnorderedAccessViews(
- ID3D11DeviceContext1 *iface,
+ ID3D11DeviceContext2 *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,
ID3D11UnorderedAccessView **unordered_access_views)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct wined3d_unordered_access_view *wined3d_view;
struct d3d11_unordered_access_view *view_impl;
unsigned int i;
@@ -1931,10 +1932,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetRenderTargetsAndUnord
}
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetBlendState(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetBlendState(ID3D11DeviceContext2 *iface,
ID3D11BlendState **blend_state, FLOAT blend_factor[4], UINT *sample_mask)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct wined3d_blend_state *wined3d_state;
struct d3d_blend_state *blend_state_impl;
@@ -1956,10 +1957,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetBlendState(ID3D11Devi
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetDepthStencilState(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetDepthStencilState(ID3D11DeviceContext2 *iface,
ID3D11DepthStencilState **depth_stencil_state, UINT *stencil_ref)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
TRACE("iface %p, depth_stencil_state %p, stencil_ref %p.\n",
iface, depth_stencil_state, stencil_ref);
@@ -1970,10 +1971,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_OMGetDepthStencilState(ID3
*stencil_ref = device->stencil_ref;
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_SOGetTargets(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_SOGetTargets(ID3D11DeviceContext2 *iface,
UINT buffer_count, ID3D11Buffer **buffers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, buffer_count %u, buffers %p.\n", iface, buffer_count, buffers);
@@ -1997,10 +1998,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_SOGetTargets(ID3D11DeviceC
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetState(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetState(ID3D11DeviceContext2 *iface,
ID3D11RasterizerState **rasterizer_state)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d_rasterizer_state *rasterizer_state_impl;
struct wined3d_rasterizer_state *wined3d_state;
@@ -2019,10 +2020,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetState(ID3D11DeviceCon
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetViewports(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetViewports(ID3D11DeviceContext2 *iface,
UINT *viewport_count, D3D11_VIEWPORT *viewports)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct wined3d_viewport wined3d_vp[WINED3D_MAX_VIEWPORTS];
unsigned int actual_count = ARRAY_SIZE(wined3d_vp), i;
@@ -2056,10 +2057,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetViewports(ID3D11Devic
}
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetScissorRects(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetScissorRects(ID3D11DeviceContext2 *iface,
UINT *rect_count, D3D11_RECT *rects)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int actual_count;
TRACE("iface %p, rect_count %p, rects %p.\n", iface, rect_count, rects);
@@ -2083,10 +2084,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSGetScissorRects(ID3D11De
memset(&rects[actual_count], 0, (*rect_count - actual_count) * sizeof(*rects));
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShaderResources(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShaderResources(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
@@ -2109,10 +2110,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShaderResources(ID3D1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShader(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShader(ID3D11DeviceContext2 *iface,
ID3D11HullShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d11_hull_shader *shader_impl;
struct wined3d_shader *wined3d_shader;
@@ -2137,10 +2138,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShader(ID3D11DeviceCo
ID3D11HullShader_AddRef(*shader = &shader_impl->ID3D11HullShader_iface);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetSamplers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetSamplers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
@@ -2164,7 +2165,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetSamplers(ID3D11Device
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetConstantBuffers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetConstantBuffers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
{
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
@@ -2174,10 +2175,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetConstantBuffers(ID3D1
buffer_count, buffers);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShaderResources(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShaderResources(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
@@ -2201,10 +2202,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShaderResources(ID3D1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShader(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShader(ID3D11DeviceContext2 *iface,
ID3D11DomainShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d11_domain_shader *shader_impl;
struct wined3d_shader *wined3d_shader;
@@ -2229,10 +2230,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShader(ID3D11DeviceCo
ID3D11DomainShader_AddRef(*shader = &shader_impl->ID3D11DomainShader_iface);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetSamplers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetSamplers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
@@ -2256,7 +2257,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetSamplers(ID3D11Device
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetConstantBuffers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetConstantBuffers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
{
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
@@ -2266,10 +2267,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetConstantBuffers(ID3D1
buffer_count, buffers);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShaderResources(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShaderResources(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
@@ -2292,10 +2293,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShaderResources(ID3D1
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetUnorderedAccessViews(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetUnorderedAccessViews(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT view_count, ID3D11UnorderedAccessView **views)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
@@ -2318,10 +2319,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetUnorderedAccessViews(
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShader(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShader(ID3D11DeviceContext2 *iface,
ID3D11ComputeShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct d3d11_compute_shader *shader_impl;
struct wined3d_shader *wined3d_shader;
@@ -2346,10 +2347,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShader(ID3D11DeviceCo
ID3D11ComputeShader_AddRef(*shader = &shader_impl->ID3D11ComputeShader_iface);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetSamplers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetSamplers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
unsigned int i;
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
@@ -2373,7 +2374,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetSamplers(ID3D11Device
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetConstantBuffers(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetConstantBuffers(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
{
TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
@@ -2383,9 +2384,9 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetConstantBuffers(ID3D1
buffer_count, buffers);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceContext1 *iface)
+static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceContext2 *iface)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
static const float blend_factor[] = {1.0f, 1.0f, 1.0f, 1.0f};
unsigned int i, j;
@@ -2438,11 +2439,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceCon
wined3d_device_set_unordered_access_view(device->wined3d_device, i, NULL, ~0u);
wined3d_device_set_cs_uav(device->wined3d_device, i, NULL, ~0u);
}
- ID3D11DeviceContext1_OMSetDepthStencilState(iface, NULL, 0);
- ID3D11DeviceContext1_OMSetBlendState(iface, NULL, blend_factor, D3D11_DEFAULT_SAMPLE_MASK);
- ID3D11DeviceContext1_RSSetViewports(iface, 0, NULL);
- ID3D11DeviceContext1_RSSetScissorRects(iface, 0, NULL);
- ID3D11DeviceContext1_RSSetState(iface, NULL);
+ ID3D11DeviceContext2_OMSetDepthStencilState(iface, NULL, 0);
+ ID3D11DeviceContext2_OMSetBlendState(iface, NULL, blend_factor, D3D11_DEFAULT_SAMPLE_MASK);
+ ID3D11DeviceContext2_RSSetViewports(iface, 0, NULL);
+ ID3D11DeviceContext2_RSSetScissorRects(iface, 0, NULL);
+ ID3D11DeviceContext2_RSSetState(iface, NULL);
for (i = 0; i < D3D11_SO_BUFFER_SLOT_COUNT; ++i)
{
wined3d_device_set_stream_output(device->wined3d_device, i, NULL, 0);
@@ -2451,26 +2452,26 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceCon
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_Flush(ID3D11DeviceContext1 *iface)
+static void STDMETHODCALLTYPE d3d11_immediate_context_Flush(ID3D11DeviceContext2 *iface)
{
FIXME("iface %p stub!\n", iface);
}
-static D3D11_DEVICE_CONTEXT_TYPE STDMETHODCALLTYPE d3d11_immediate_context_GetType(ID3D11DeviceContext1 *iface)
+static D3D11_DEVICE_CONTEXT_TYPE STDMETHODCALLTYPE d3d11_immediate_context_GetType(ID3D11DeviceContext2 *iface)
{
TRACE("iface %p.\n", iface);
return D3D11_DEVICE_CONTEXT_IMMEDIATE;
}
-static UINT STDMETHODCALLTYPE d3d11_immediate_context_GetContextFlags(ID3D11DeviceContext1 *iface)
+static UINT STDMETHODCALLTYPE d3d11_immediate_context_GetContextFlags(ID3D11DeviceContext2 *iface)
{
FIXME("iface %p stub!\n", iface);
return 0;
}
-static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_FinishCommandList(ID3D11DeviceContext1 *iface,
+static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_FinishCommandList(ID3D11DeviceContext2 *iface,
BOOL restore, ID3D11CommandList **command_list)
{
FIXME("iface %p, restore %#x, command_list %p stub!\n", iface, restore, command_list);
@@ -2478,11 +2479,11 @@ static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_FinishCommandList(ID3D1
return E_NOTIMPL;
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CopySubresourceRegion1(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CopySubresourceRegion1(ID3D11DeviceContext2 *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, UINT flags)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource;
struct wined3d_box wined3d_src_box;
@@ -2503,11 +2504,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CopySubresourceRegion1(ID3
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateSubresource1(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateSubresource1(ID3D11DeviceContext2 *iface,
ID3D11Resource *resource, UINT subresource_idx, const D3D11_BOX *box, const void *data,
UINT row_pitch, UINT depth_pitch, UINT flags)
{
- struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext2(iface);
struct wined3d_resource *wined3d_resource;
struct wined3d_box wined3d_box;
@@ -2525,18 +2526,18 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateSubresource1(ID3D11D
wined3d_mutex_unlock();
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DiscardResource(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DiscardResource(ID3D11DeviceContext2 *iface,
ID3D11Resource *resource)
{
FIXME("iface %p, resource %p stub!\n", iface, resource);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DiscardView(ID3D11DeviceContext1 *iface, ID3D11View *view)
+static void STDMETHODCALLTYPE d3d11_immediate_context_DiscardView(ID3D11DeviceContext2 *iface, ID3D11View *view)
{
FIXME("iface %p, view %p stub!\n", iface, view);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetConstantBuffers1(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetConstantBuffers1(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer * const *buffers, const UINT *first_constant,
const UINT *num_constants)
{
@@ -2544,7 +2545,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetConstantBuffers1(ID3D
iface, start_slot, buffer_count, buffers, first_constant, num_constants);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetConstantBuffers1(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetConstantBuffers1(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer * const *buffers, const UINT *first_constant,
const UINT *num_constants)
{
@@ -2552,7 +2553,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetConstantBuffers1(ID3D
iface, start_slot, buffer_count, buffers, first_constant, num_constants);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetConstantBuffers1(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetConstantBuffers1(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer * const *buffers, const UINT *first_constant,
const UINT *num_constants)
{
@@ -2560,7 +2561,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetConstantBuffers1(ID3D
iface, start_slot, buffer_count, buffers, first_constant, num_constants);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetConstantBuffers1(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetConstantBuffers1(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer * const *buffers, const UINT *first_constant,
const UINT *num_constants)
{
@@ -2568,7 +2569,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetConstantBuffers1(ID3D
iface, start_slot, buffer_count, buffers, first_constant, num_constants);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetConstantBuffers1(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetConstantBuffers1(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer * const *buffers, const UINT *first_constant,
const UINT *num_constants)
{
@@ -2576,7 +2577,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetConstantBuffers1(ID3D
iface, start_slot, buffer_count, buffers, first_constant, num_constants);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetConstantBuffers1(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetConstantBuffers1(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer * const *buffers, const UINT *first_constant,
const UINT *num_constants)
{
@@ -2584,67 +2585,146 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetConstantBuffers1(ID3D
iface, start_slot, buffer_count, buffers, first_constant, num_constants);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetConstantBuffers1(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetConstantBuffers1(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
{
FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p stub!\n",
iface, start_slot, buffer_count, buffers, first_constant, num_constants);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetConstantBuffers1(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetConstantBuffers1(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
{
FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p stub!\n",
iface, start_slot, buffer_count, buffers, first_constant, num_constants);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetConstantBuffers1(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetConstantBuffers1(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
{
FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p stub!\n",
iface, start_slot, buffer_count, buffers, first_constant, num_constants);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetConstantBuffers1(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetConstantBuffers1(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
{
FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p stub!\n",
iface, start_slot, buffer_count, buffers, first_constant, num_constants);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetConstantBuffers1(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetConstantBuffers1(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
{
FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p stub!\n",
iface, start_slot, buffer_count, buffers, first_constant, num_constants);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetConstantBuffers1(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetConstantBuffers1(ID3D11DeviceContext2 *iface,
UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
{
FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p stub!\n",
iface, start_slot, buffer_count, buffers, first_constant, num_constants);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_SwapDeviceContextState(ID3D11DeviceContext1 *iface,
+static void STDMETHODCALLTYPE d3d11_immediate_context_SwapDeviceContextState(ID3D11DeviceContext2 *iface,
ID3DDeviceContextState *state, ID3DDeviceContextState **prev_state)
{
FIXME("iface %p, state %p, prev_state %p stub!\n", iface, state, prev_state);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_ClearView(ID3D11DeviceContext1 *iface, ID3D11View *view,
+static void STDMETHODCALLTYPE d3d11_immediate_context_ClearView(ID3D11DeviceContext2 *iface, ID3D11View *view,
const FLOAT color[4], const D3D11_RECT *rect, UINT num_rects)
{
FIXME("iface %p, view %p, color %p, rect %p, num_rects %u stub!\n", iface, view, color, rect, num_rects);
}
-static void STDMETHODCALLTYPE d3d11_immediate_context_DiscardView1(ID3D11DeviceContext1 *iface, ID3D11View *view,
+static void STDMETHODCALLTYPE d3d11_immediate_context_DiscardView1(ID3D11DeviceContext2 *iface, ID3D11View *view,
const D3D11_RECT *rects, UINT num_rects)
{
FIXME("iface %p, view %p, rects %p, num_rects %u stub!\n", iface, view, rects, num_rects);
}
-static const struct ID3D11DeviceContext1Vtbl d3d11_immediate_context_vtbl =
+static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_UpdateTileMappings(ID3D11DeviceContext2 *iface,
+ ID3D11Resource *resource, UINT region_count, const D3D11_TILED_RESOURCE_COORDINATE *region_start_coordinates,
+ const D3D11_TILE_REGION_SIZE *region_sizes, ID3D11Buffer *pool, UINT range_count, const UINT *range_flags,
+ const UINT *pool_start_offsets, const UINT *range_tile_counts, UINT flags)
+{
+ FIXME("iface %p, resource %p, region_count %u, region_start_coordinates %p, region_sizes %p, pool %p, "
+ "range_count %u, range_flags %p, pool_start_offsets %p, range_tile_counts %p, flags %u stub!\n",
+ iface, resource, region_count, region_start_coordinates, region_sizes, pool, range_count, range_flags,
+ pool_start_offsets, range_tile_counts, flags);
+
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_CopyTileMappings(ID3D11DeviceContext2 *iface,
+ ID3D11Resource *dst_resource, const D3D11_TILED_RESOURCE_COORDINATE *dst_start_coordinate,
+ ID3D11Resource *src_resource, const D3D11_TILED_RESOURCE_COORDINATE *src_start_coordinate,
+ const D3D11_TILE_REGION_SIZE *region_size, UINT flags)
+{
+ FIXME("iface %p, dst_resource %p, dst_start_coordinate %p, src_resource %p, src_start_coordinate %p, "
+ "region_size %p, flags %u stub!\n", iface, dst_resource, dst_start_coordinate, src_resource,
+ src_start_coordinate, region_size, flags);
+
+ return E_NOTIMPL;
+}
+
+static void STDMETHODCALLTYPE d3d11_immediate_context_CopyTiles(ID3D11DeviceContext2 *iface,
+ ID3D11Resource *resource, const D3D11_TILED_RESOURCE_COORDINATE *start_coordinate,
+ const D3D11_TILE_REGION_SIZE *size, ID3D11Buffer *buffer, UINT64 start_offset, UINT flags)
+{
+ FIXME("iface %p, resource %p, start_coordinate %p, size %p, buffer %p, start_offset %s, flags %u stub!\n",
+ iface, resource, start_coordinate, size, buffer, wine_dbgstr_longlong(start_offset), flags);
+}
+
+static void STDMETHODCALLTYPE d3d11_immediate_context_UpdateTiles(ID3D11DeviceContext2 *iface,
+ ID3D11Resource *dst_resource, const D3D11_TILED_RESOURCE_COORDINATE *dst_start_coordinate,
+ const D3D11_TILE_REGION_SIZE *dst_region_size, const void *src_data, UINT flags)
+{
+ FIXME("iface %p, dst_resource %p, dst_start_coordinate %p, dst_region_size %p, src_data %p, flags %u stub!\n",
+ iface, dst_resource, dst_start_coordinate, dst_region_size, src_data, flags);
+}
+
+static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_ResizeTilePool(ID3D11DeviceContext2 *iface,
+ ID3D11Buffer *pool, UINT64 size)
+{
+ FIXME("iface %p, pool %p, size %s stub!\n", iface, pool, wine_dbgstr_longlong(size));
+
+ return E_NOTIMPL;
+}
+
+static void STDMETHODCALLTYPE d3d11_immediate_context_TiledResourceBarrier(ID3D11DeviceContext2 *iface,
+ ID3D11DeviceChild *before_barrier, ID3D11DeviceChild *after_barrier)
+{
+ FIXME("iface %p, before_barrier %p, after_barrier %p stub!\n", iface, before_barrier, after_barrier);
+}
+
+static BOOL STDMETHODCALLTYPE d3d11_immediate_context_IsAnnotationEnabled(ID3D11DeviceContext2 *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+
+ return TRUE;
+}
+
+static void STDMETHODCALLTYPE d3d11_immediate_context_SetMarkerInt(ID3D11DeviceContext2 *iface,
+ const WCHAR *label, int data)
+{
+ FIXME("iface %p, label %s, data %d stub!\n", iface, debugstr_w(label), data);
+}
+
+static void STDMETHODCALLTYPE d3d11_immediate_context_BeginEventInt(ID3D11DeviceContext2 *iface,
+ const WCHAR *label, int data)
+{
+ FIXME("iface %p, label %s, data %d stub!\n", iface, debugstr_w(label), data);
+}
+
+static void STDMETHODCALLTYPE d3d11_immediate_context_EndEvent(ID3D11DeviceContext2 *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+}
+
+static const struct ID3D11DeviceContext2Vtbl d3d11_immediate_context_vtbl =
{
/* IUnknown methods */
d3d11_immediate_context_QueryInterface,
@@ -2784,6 +2864,17 @@ static const struct ID3D11DeviceContext1Vtbl d3d11_immediate_context_vtbl =
d3d11_immediate_context_SwapDeviceContextState,
d3d11_immediate_context_ClearView,
d3d11_immediate_context_DiscardView1,
+ /* ID3D11DeviceContext2 methods */
+ d3d11_immediate_context_UpdateTileMappings,
+ d3d11_immediate_context_CopyTileMappings,
+ d3d11_immediate_context_CopyTiles,
+ d3d11_immediate_context_UpdateTiles,
+ d3d11_immediate_context_ResizeTilePool,
+ d3d11_immediate_context_TiledResourceBarrier,
+ d3d11_immediate_context_IsAnnotationEnabled,
+ d3d11_immediate_context_SetMarkerInt,
+ d3d11_immediate_context_BeginEventInt,
+ d3d11_immediate_context_EndEvent,
};
/* ID3D11Multithread methods */
@@ -2800,7 +2891,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_multithread_QueryInterface(ID3D11Multithr
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
- return d3d11_immediate_context_QueryInterface(&context->ID3D11DeviceContext1_iface, iid, out);
+ return d3d11_immediate_context_QueryInterface(&context->ID3D11DeviceContext2_iface, iid, out);
}
static ULONG STDMETHODCALLTYPE d3d11_multithread_AddRef(ID3D11Multithread *iface)
@@ -2809,7 +2900,7 @@ static ULONG STDMETHODCALLTYPE d3d11_multithread_AddRef(ID3D11Multithread *iface
TRACE("iface %p.\n", iface);
- return d3d11_immediate_context_AddRef(&context->ID3D11DeviceContext1_iface);
+ return d3d11_immediate_context_AddRef(&context->ID3D11DeviceContext2_iface);
}
static ULONG STDMETHODCALLTYPE d3d11_multithread_Release(ID3D11Multithread *iface)
@@ -2818,7 +2909,7 @@ static ULONG STDMETHODCALLTYPE d3d11_multithread_Release(ID3D11Multithread *ifac
TRACE("iface %p.\n", iface);
- return d3d11_immediate_context_Release(&context->ID3D11DeviceContext1_iface);
+ return d3d11_immediate_context_Release(&context->ID3D11DeviceContext2_iface);
}
static void STDMETHODCALLTYPE d3d11_multithread_Enter(ID3D11Multithread *iface)
@@ -2863,7 +2954,7 @@ static const struct ID3D11MultithreadVtbl d3d11_multithread_vtbl =
static void d3d11_immediate_context_init(struct d3d11_immediate_context *context, struct d3d_device *device)
{
- context->ID3D11DeviceContext1_iface.lpVtbl = &d3d11_immediate_context_vtbl;
+ context->ID3D11DeviceContext2_iface.lpVtbl = &d3d11_immediate_context_vtbl;
context->ID3D11Multithread_iface.lpVtbl = &d3d11_multithread_vtbl;
context->refcount = 1;
@@ -3736,7 +3827,7 @@ static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext(ID3D11Device2 *if
TRACE("iface %p, immediate_context %p.\n", iface, immediate_context);
- *immediate_context = (ID3D11DeviceContext *)&device->immediate_context.ID3D11DeviceContext1_iface;
+ *immediate_context = (ID3D11DeviceContext *)&device->immediate_context.ID3D11DeviceContext2_iface;
ID3D11DeviceContext_AddRef(*immediate_context);
}
@@ -3761,7 +3852,7 @@ static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext1(ID3D11Device2 *i
TRACE("iface %p, immediate_context %p.\n", iface, immediate_context);
- *immediate_context = &device->immediate_context.ID3D11DeviceContext1_iface;
+ *immediate_context = (ID3D11DeviceContext1 *)&device->immediate_context.ID3D11DeviceContext2_iface;
ID3D11DeviceContext1_AddRef(*immediate_context);
}
@@ -4422,7 +4513,7 @@ static void STDMETHODCALLTYPE d3d10_device_OMSetBlendState(ID3D10Device1 *iface,
iface, blend_state, debug_float4(blend_factor), sample_mask);
blend_state_object = unsafe_impl_from_ID3D10BlendState(blend_state);
- d3d11_immediate_context_OMSetBlendState(&device->immediate_context.ID3D11DeviceContext1_iface,
+ d3d11_immediate_context_OMSetBlendState(&device->immediate_context.ID3D11DeviceContext2_iface,
blend_state_object ? &blend_state_object->ID3D11BlendState_iface : NULL, blend_factor, sample_mask);
}
@@ -4436,7 +4527,7 @@ static void STDMETHODCALLTYPE d3d10_device_OMSetDepthStencilState(ID3D10Device1
iface, depth_stencil_state, stencil_ref);
ds_state_object = unsafe_impl_from_ID3D10DepthStencilState(depth_stencil_state);
- d3d11_immediate_context_OMSetDepthStencilState(&device->immediate_context.ID3D11DeviceContext1_iface,
+ d3d11_immediate_context_OMSetDepthStencilState(&device->immediate_context.ID3D11DeviceContext2_iface,
ds_state_object ? &ds_state_object->ID3D11DepthStencilState_iface : NULL, stencil_ref);
}
@@ -4478,7 +4569,7 @@ static void STDMETHODCALLTYPE d3d10_device_RSSetState(ID3D10Device1 *iface, ID3D
TRACE("iface %p, rasterizer_state %p.\n", iface, rasterizer_state);
rasterizer_state_object = unsafe_impl_from_ID3D10RasterizerState(rasterizer_state);
- d3d11_immediate_context_RSSetState(&device->immediate_context.ID3D11DeviceContext1_iface,
+ d3d11_immediate_context_RSSetState(&device->immediate_context.ID3D11DeviceContext2_iface,
rasterizer_state_object ? &rasterizer_state_object->ID3D11RasterizerState_iface : NULL);
}
@@ -4575,7 +4666,7 @@ static void STDMETHODCALLTYPE d3d10_device_UpdateSubresource(ID3D10Device1 *ifac
iface, resource, subresource_idx, box, data, row_pitch, depth_pitch);
ID3D10Resource_QueryInterface(resource, &IID_ID3D11Resource, (void **)&d3d11_resource);
- d3d11_immediate_context_UpdateSubresource(&device->immediate_context.ID3D11DeviceContext1_iface,
+ d3d11_immediate_context_UpdateSubresource(&device->immediate_context.ID3D11DeviceContext2_iface,
d3d11_resource, subresource_idx, (const D3D11_BOX *)box, data, row_pitch, depth_pitch);
ID3D11Resource_Release(d3d11_resource);
}
@@ -5094,7 +5185,7 @@ static void STDMETHODCALLTYPE d3d10_device_OMGetBlendState(ID3D10Device1 *iface,
TRACE("iface %p, blend_state %p, blend_factor %p, sample_mask %p.\n",
iface, blend_state, blend_factor, sample_mask);
- d3d11_immediate_context_OMGetBlendState(&device->immediate_context.ID3D11DeviceContext1_iface,
+ d3d11_immediate_context_OMGetBlendState(&device->immediate_context.ID3D11DeviceContext2_iface,
&d3d11_blend_state, blend_factor, sample_mask);
if (d3d11_blend_state)
@@ -5112,7 +5203,7 @@ static void STDMETHODCALLTYPE d3d10_device_OMGetDepthStencilState(ID3D10Device1
TRACE("iface %p, depth_stencil_state %p, stencil_ref %p.\n",
iface, depth_stencil_state, stencil_ref);
- d3d11_immediate_context_OMGetDepthStencilState(&device->immediate_context.ID3D11DeviceContext1_iface,
+ d3d11_immediate_context_OMGetDepthStencilState(&device->immediate_context.ID3D11DeviceContext2_iface,
&d3d11_iface, stencil_ref);
if (d3d11_iface)
@@ -5293,7 +5384,7 @@ static void STDMETHODCALLTYPE d3d10_device_ClearState(ID3D10Device1 *iface)
TRACE("iface %p.\n", iface);
- d3d11_immediate_context_ClearState(&device->immediate_context.ID3D11DeviceContext1_iface);
+ d3d11_immediate_context_ClearState(&device->immediate_context.ID3D11DeviceContext2_iface);
}
static void STDMETHODCALLTYPE d3d10_device_Flush(ID3D10Device1 *iface)
@@ -6268,7 +6359,7 @@ void d3d_device_init(struct d3d_device *device, void *outer_unknown)
device->outer_unk = outer_unknown;
d3d11_immediate_context_init(&device->immediate_context, device);
- ID3D11DeviceContext1_Release(&device->immediate_context.ID3D11DeviceContext1_iface);
+ ID3D11DeviceContext2_Release(&device->immediate_context.ID3D11DeviceContext2_iface);
wine_rb_init(&device->blend_states, d3d_blend_state_compare);
wine_rb_init(&device->depthstencil_states, d3d_depthstencil_state_compare);
--
2.21.0
3
2
20 Sep '19
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/lib/WineTestBot/Utils.pm | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/testbot/lib/WineTestBot/Utils.pm b/testbot/lib/WineTestBot/Utils.pm
index 309fb19ce..25c60d53f 100644
--- a/testbot/lib/WineTestBot/Utils.pm
+++ b/testbot/lib/WineTestBot/Utils.pm
@@ -27,7 +27,7 @@ WineTestBot::Utils - Utility functions
=cut
use Exporter 'import';
-our @EXPORT = qw(MakeSecureURL SecureConnection GenerateRandomString
+our @EXPORT = qw(SecureConnection MakeSecureURL GenerateRandomString
OpenNewFile CreateNewFile CreateNewLink CreateNewDir GetMTime
DurationToString BuildEMailRecipient IsValidFileName
BuildTag SanitizeTag LocaleName NotifyAdministrator
@@ -42,6 +42,11 @@ use WineTestBot::Config;
# Web helpers
#
+sub SecureConnection()
+{
+ return defined($ENV{"HTTPS"}) && $ENV{"HTTPS"} eq "on";
+}
+
sub MakeSecureURL($)
{
my ($URL) = @_;
@@ -55,11 +60,6 @@ sub MakeSecureURL($)
return $Protocol . "://" . $ENV{"HTTP_HOST"} . $URL;
}
-sub SecureConnection()
-{
- return defined($ENV{"HTTPS"}) && $ENV{"HTTPS"} eq "on";
-}
-
sub DurationToString($;$)
{
my ($Secs, $Raw) = @_;
--
2.20.1
1
2
20 Sep '19
From: Derek Lesho <dereklesho52(a)Gmail.com>
Signed-off-by: Derek Lesho <dereklesho52(a)Gmail.com>
---
libs/vkd3d/command.c | 82 ++++++++++++++++++++------------------
libs/vkd3d/vkd3d_private.h | 7 ++--
2 files changed, 47 insertions(+), 42 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index ae88910..b98cc5d 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -45,9 +45,11 @@ HRESULT vkd3d_queue_create(struct d3d12_device *device,
object->vk_queue_flags = properties->queueFlags;
object->timestamp_bits = properties->timestampValidBits;
- object->semaphores = NULL;
+ object->semaphores.vk_semaphores = NULL;
+ object->semaphores.sequence_numbers = NULL;
object->semaphores_size = 0;
object->semaphore_count = 0;
+ object->pending_semaphore_index = -1;
memset(object->old_vk_semaphores, 0, sizeof(object->old_vk_semaphores));
@@ -70,9 +72,10 @@ void vkd3d_queue_destroy(struct vkd3d_queue *queue, struct d3d12_device *device)
ERR("Failed to lock mutex, error %d.\n", rc);
for (i = 0; i < queue->semaphore_count; ++i)
- VK_CALL(vkDestroySemaphore(device->vk_device, queue->semaphores[i].vk_semaphore, NULL));
+ VK_CALL(vkDestroySemaphore(device->vk_device, queue->semaphores.vk_semaphores[i], NULL));
- vkd3d_free(queue->semaphores);
+ vkd3d_free(queue->semaphores.vk_semaphores);
+ vkd3d_free(queue->semaphores.sequence_numbers);
for (i = 0; i < ARRAY_SIZE(queue->old_vk_semaphores); ++i)
{
@@ -157,10 +160,10 @@ static void vkd3d_queue_update_sequence_number(struct vkd3d_queue *queue,
for (i = 0; i < queue->semaphore_count; ++i)
{
- if (queue->semaphores[i].sequence_number > queue->completed_sequence_number)
+ if (queue->semaphores.sequence_numbers[i] > queue->completed_sequence_number)
break;
- vk_semaphore = queue->semaphores[i].vk_semaphore;
+ vk_semaphore = queue->semaphores.vk_semaphores[i];
/* Try to store the Vulkan semaphore for reuse. */
for (j = 0; j < ARRAY_SIZE(queue->old_vk_semaphores); ++j)
@@ -182,7 +185,8 @@ static void vkd3d_queue_update_sequence_number(struct vkd3d_queue *queue,
if (i > 0)
{
queue->semaphore_count -= i;
- memmove(queue->semaphores, &queue->semaphores[i], queue->semaphore_count * sizeof(*queue->semaphores));
+ memmove(queue->semaphores.vk_semaphores, &queue->semaphores.vk_semaphores[i], queue->semaphore_count * sizeof(*queue->semaphores.vk_semaphores));
+ memmove(queue->semaphores.sequence_numbers, &queue->semaphores.sequence_numbers[i], queue->semaphore_count * sizeof(*queue->semaphores.sequence_numbers));
}
if (destroyed_semaphore_count)
@@ -201,7 +205,7 @@ static uint64_t vkd3d_queue_reset_sequence_number_locked(struct vkd3d_queue *que
queue->submitted_sequence_number = 1;
for (i = 0; i < queue->semaphore_count; ++i)
- queue->semaphores[i].sequence_number = queue->submitted_sequence_number;
+ queue->semaphores.sequence_numbers[i] = queue->submitted_sequence_number;
return queue->submitted_sequence_number;
}
@@ -5511,6 +5515,7 @@ static void STDMETHODCALLTYPE d3d12_command_queue_CopyTileMappings(ID3D12Command
static void STDMETHODCALLTYPE d3d12_command_queue_ExecuteCommandLists(ID3D12CommandQueue *iface,
UINT command_list_count, ID3D12CommandList * const *command_lists)
{
+ static const VkPipelineStageFlagBits wait_stage_mask = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
struct d3d12_command_queue *command_queue = impl_from_ID3D12CommandQueue(iface);
const struct vkd3d_vk_device_procs *vk_procs;
struct d3d12_command_list *cmd_list;
@@ -5556,6 +5561,15 @@ static void STDMETHODCALLTYPE d3d12_command_queue_ExecuteCommandLists(ID3D12Comm
submit_desc.signalSemaphoreCount = 0;
submit_desc.pSignalSemaphores = NULL;
+ if (command_queue->vkd3d_queue->pending_semaphore_index != -1)
+ {
+ submit_desc.waitSemaphoreCount = command_queue->vkd3d_queue->semaphore_count - command_queue->vkd3d_queue->pending_semaphore_index;
+ submit_desc.pWaitSemaphores = &command_queue->vkd3d_queue->semaphores.vk_semaphores[command_queue->vkd3d_queue->pending_semaphore_index];
+ submit_desc.pWaitDstStageMask = &wait_stage_mask;
+
+ command_queue->vkd3d_queue->pending_semaphore_index = -1;
+ }
+
if (!(vk_queue = vkd3d_queue_acquire(command_queue->vkd3d_queue)))
{
ERR("Failed to acquire queue %p.\n", command_queue->vkd3d_queue);
@@ -5593,6 +5607,7 @@ static void STDMETHODCALLTYPE d3d12_command_queue_EndEvent(ID3D12CommandQueue *i
static HRESULT STDMETHODCALLTYPE d3d12_command_queue_Signal(ID3D12CommandQueue *iface,
ID3D12Fence *fence_iface, UINT64 value)
{
+ static const VkPipelineStageFlagBits wait_stage_mask = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
struct d3d12_command_queue *command_queue = impl_from_ID3D12CommandQueue(iface);
const struct vkd3d_vk_device_procs *vk_procs;
VkSemaphore vk_semaphore = VK_NULL_HANDLE;
@@ -5643,6 +5658,15 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_queue_Signal(ID3D12CommandQueue *
submit_info.signalSemaphoreCount = vk_semaphore ? 1 : 0;
submit_info.pSignalSemaphores = &vk_semaphore;
+ if (command_queue->vkd3d_queue->pending_semaphore_index != -1)
+ {
+ submit_info.waitSemaphoreCount = command_queue->vkd3d_queue->semaphore_count - command_queue->vkd3d_queue->pending_semaphore_index;
+ submit_info.pWaitSemaphores = &command_queue->vkd3d_queue->semaphores.vk_semaphores[command_queue->vkd3d_queue->pending_semaphore_index];
+ submit_info.pWaitDstStageMask = &wait_stage_mask;
+
+ command_queue->vkd3d_queue->pending_semaphore_index = -1;
+ }
+
if ((vr = VK_CALL(vkQueueSubmit(vk_queue, 1, &submit_info, vk_fence))) >= 0)
{
sequence_number = ++vkd3d_queue->submitted_sequence_number;
@@ -5702,21 +5726,16 @@ fail:
static HRESULT STDMETHODCALLTYPE d3d12_command_queue_Wait(ID3D12CommandQueue *iface,
ID3D12Fence *fence_iface, UINT64 value)
{
- static const VkPipelineStageFlagBits wait_stage_mask = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
struct d3d12_command_queue *command_queue = impl_from_ID3D12CommandQueue(iface);
- const struct vkd3d_vk_device_procs *vk_procs;
struct vkd3d_signaled_semaphore *semaphore;
uint64_t completed_value = 0;
struct vkd3d_queue *queue;
struct d3d12_fence *fence;
- VkSubmitInfo submit_info;
VkQueue vk_queue;
- VkResult vr;
HRESULT hr;
TRACE("iface %p, fence %p, value %#"PRIx64".\n", iface, fence_iface, value);
- vk_procs = &command_queue->device->vk_procs;
queue = command_queue->vkd3d_queue;
fence = unsafe_impl_from_ID3D12Fence(fence_iface);
@@ -5752,18 +5771,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_queue_Wait(ID3D12CommandQueue *if
return S_OK;
}
- submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
- submit_info.pNext = NULL;
- submit_info.waitSemaphoreCount = 1;
- submit_info.pWaitSemaphores = &semaphore->vk_semaphore;
- submit_info.pWaitDstStageMask = &wait_stage_mask;
- submit_info.commandBufferCount = 0;
- submit_info.pCommandBuffers = NULL;
- submit_info.signalSemaphoreCount = 0;
- submit_info.pSignalSemaphores = NULL;
-
- if (!vkd3d_array_reserve((void **)&queue->semaphores, &queue->semaphores_size,
- queue->semaphore_count + 1, sizeof(*queue->semaphores)))
+ if (!vkd3d_array_reserve((void **)&queue->semaphores.vk_semaphores, &queue->semaphores_size,
+ queue->semaphore_count + 1, sizeof(*queue->semaphores.vk_semaphores))
+ || !vkd3d_array_reserve((void **)&queue->semaphores.sequence_numbers, &queue->semaphores_size,
+ queue->semaphore_count + 1, sizeof(*queue->semaphores.sequence_numbers)))
{
ERR("Failed to allocate memory for semaphore.\n");
vkd3d_queue_release(queue);
@@ -5771,24 +5782,17 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_queue_Wait(ID3D12CommandQueue *if
goto fail;
}
- if ((vr = VK_CALL(vkQueueSubmit(vk_queue, 1, &submit_info, VK_NULL_HANDLE))) >= 0)
- {
- queue->semaphores[queue->semaphore_count].vk_semaphore = semaphore->vk_semaphore;
- queue->semaphores[queue->semaphore_count].sequence_number = queue->submitted_sequence_number + 1;
- ++queue->semaphore_count;
+ queue->semaphores.vk_semaphores[queue->semaphore_count] = semaphore->vk_semaphore;
+ queue->semaphores.sequence_numbers[queue->semaphore_count] = queue->submitted_sequence_number + 1;
- command_queue->last_waited_fence = fence;
- command_queue->last_waited_fence_value = value;
- }
+ if (queue->pending_semaphore_index == -1) queue->pending_semaphore_index = queue->semaphore_count;
- vkd3d_queue_release(queue);
+ ++queue->semaphore_count;
- if (vr < 0)
- {
- WARN("Failed to submit wait operation, vr %d.\n", vr);
- hr = hresult_from_vk_result(vr);
- goto fail;
- }
+ command_queue->last_waited_fence = fence;
+ command_queue->last_waited_fence_value = value;
+
+ vkd3d_queue_release(queue);
d3d12_fence_remove_vk_semaphore(fence, semaphore);
return S_OK;
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h
index 294e677..5a705bf 100644
--- a/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/vkd3d_private.h
@@ -954,11 +954,12 @@ struct vkd3d_queue
struct
{
- VkSemaphore vk_semaphore;
- uint64_t sequence_number;
- } *semaphores;
+ VkSemaphore *vk_semaphores;
+ uint64_t *sequence_numbers;
+ } semaphores;
size_t semaphores_size;
size_t semaphore_count;
+ uint64_t pending_semaphore_index;
VkSemaphore old_vk_semaphores[VKD3D_MAX_VK_SYNC_OBJECTS];
};
--
2.23.0
4
15
20 Sep '19
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47782
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/wbemprox/builtin.c | 73 ++++++++++++++++++++++++++++++-------
dlls/wbemprox/tests/query.c | 44 ++++++++++++++++++++++
2 files changed, 104 insertions(+), 13 deletions(-)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index 94f077a7c4..2aca2f8693 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -74,6 +74,9 @@ static const WCHAR class_diskdrivetodiskpartitionW[] =
{'W','i','n','3','2','_','D','i','s','k','D','r','i','v','e','T','o','D','i','s','k','P','a','r','t','i','t','i','o','n',0};
static const WCHAR class_diskpartitionW[] =
{'W','i','n','3','2','_','D','i','s','k','P','a','r','t','i','t','i','o','n',0};
+static const WCHAR class_displaycontrollerconfigW[] =
+ {'W','i','n','3','2','_','D','i','s','p','l','a','y','C','o','n','t','r','o','l','l','e','r',
+ 'C','o','n','f','i','g','u','r','a','t','i','o','n',0};
static const WCHAR class_ip4routetableW[] =
{'W','i','n','3','2','_','I','P','4','R','o','u','t','e','T','a','b','l','e',0};
static const WCHAR class_logicaldiskW[] =
@@ -151,6 +154,8 @@ static const WCHAR prop_availabilityW[] =
{'A','v','a','i','l','a','b','i','l','i','t','y',0};
static const WCHAR prop_binaryrepresentationW[] =
{'B','i','n','a','r','y','R','e','p','r','e','s','e','n','t','a','t','i','o','n',0};
+static const WCHAR prop_bitsperpixelW[] =
+ {'B','i','t','s','P','e','r','P','i','x','e','l',0};
static const WCHAR prop_boolvalueW[] =
{'B','o','o','l','V','a','l','u','e',0};
static const WCHAR prop_bootableW[] =
@@ -445,6 +450,8 @@ static const WCHAR prop_vendorW[] =
{'V','e','n','d','o','r',0};
static const WCHAR prop_versionW[] =
{'V','e','r','s','i','o','n',0};
+static const WCHAR prop_verticalresolutionW[] =
+ {'V','e','r','t','i','c','a','l','R','e','s','o','l','u','t','i','o','n',0};
static const WCHAR prop_videoarchitectureW[] =
{'V','i','d','e','o','A','r','c','h','i','t','e','c','t','u','r','e',0};
static const WCHAR prop_videomemorytypeW[] =
@@ -568,6 +575,14 @@ static const struct column col_diskpartition[] =
{ prop_startingoffsetW, CIM_UINT64 },
{ prop_typeW, CIM_STRING|COL_FLAG_DYNAMIC }
};
+static const struct column col_displaycontrollerconfig[] =
+{
+ { prop_bitsperpixelW, CIM_UINT32 },
+ { prop_captionW, CIM_STRING },
+ { prop_horizontalresolutionW, CIM_UINT32 },
+ { prop_nameW, CIM_STRING|COL_FLAG_KEY },
+ { prop_verticalresolutionW, CIM_UINT32 }
+};
static const struct column col_ip4routetable[] =
{
{ prop_destinationW, CIM_STRING|COL_FLAG_DYNAMIC|COL_FLAG_KEY },
@@ -1030,6 +1045,14 @@ struct record_diskpartition
UINT64 startingoffset;
const WCHAR *type;
};
+struct record_displaycontrollerconfig
+{
+ UINT32 bitsperpixel;
+ const WCHAR *caption;
+ UINT32 horizontalresolution;
+ const WCHAR *name;
+ UINT32 verticalresolution;
+};
struct record_ip4routetable
{
const WCHAR *destination;
@@ -2699,6 +2722,41 @@ static enum fill_status fill_diskpartition( struct table *table, const struct ex
return status;
}
+static UINT32 get_bitsperpixel( UINT *hres, UINT *vres )
+{
+ HDC hdc = GetDC( NULL );
+ UINT32 ret;
+
+ if (!hdc) return 32;
+ ret = GetDeviceCaps( hdc, BITSPIXEL );
+ *hres = GetDeviceCaps( hdc, HORZRES );
+ *vres = GetDeviceCaps( hdc, VERTRES );
+ ReleaseDC( NULL, hdc );
+ return ret;
+}
+
+static enum fill_status fill_displaycontrollerconfig( struct table *table, const struct expr *cond )
+{
+ struct record_displaycontrollerconfig *rec;
+ UINT row = 0, hres = 1024, vres = 768;
+ enum fill_status status = FILL_STATUS_UNFILTERED;
+
+ if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
+
+ rec = (struct record_displaycontrollerconfig *)table->data;
+ rec->bitsperpixel = get_bitsperpixel( &hres, &vres );
+ rec->caption = videocontroller_deviceidW;
+ rec->horizontalresolution = hres;
+ rec->name = videocontroller_deviceidW;
+ rec->verticalresolution = vres;
+ if (!match_row( table, row, cond, &status )) free_row_values( table, row );
+ else row++;
+
+ TRACE("created %u rows\n", row);
+ table->num_rows = row;
+ return status;
+}
+
static WCHAR *get_ip4_string( DWORD addr )
{
static const WCHAR fmtW[] = {'%','u','.','%','u','.','%','u','.','%','u',0};
@@ -4250,18 +4308,6 @@ static enum fill_status fill_systemenclosure( struct table *table, const struct
return status;
}
-static UINT32 get_bits_per_pixel( UINT *hres, UINT *vres )
-{
- HDC hdc = GetDC( NULL );
- UINT32 ret;
-
- if (!hdc) return 32;
- ret = GetDeviceCaps( hdc, BITSPIXEL );
- *hres = GetDeviceCaps( hdc, HORZRES );
- *vres = GetDeviceCaps( hdc, VERTRES );
- ReleaseDC( NULL, hdc );
- return ret;
-}
static WCHAR *get_pnpdeviceid( DXGI_ADAPTER_DESC *desc )
{
static const WCHAR fmtW[] =
@@ -4335,7 +4381,7 @@ done:
rec->availability = 3; /* Running or Full Power */
rec->config_errorcode = 0; /* no error */
rec->caption = heap_strdupW( name );
- rec->current_bitsperpixel = get_bits_per_pixel( &hres, &vres );
+ rec->current_bitsperpixel = get_bitsperpixel( &hres, &vres );
rec->current_horizontalres = hres;
rec->current_refreshrate = 0; /* default refresh rate */
rec->current_scanmode = 2; /* Unknown */
@@ -4380,6 +4426,7 @@ static struct table builtin_classes[] =
{ class_diskdriveW, C(col_diskdrive), 0, 0, NULL, fill_diskdrive },
{ class_diskdrivetodiskpartitionW, C(col_diskdrivetodiskpartition), 0, 0, NULL, fill_diskdrivetodiskpartition },
{ class_diskpartitionW, C(col_diskpartition), 0, 0, NULL, fill_diskpartition },
+ { class_displaycontrollerconfigW, C(col_displaycontrollerconfig), 0, 0, NULL, fill_displaycontrollerconfig },
{ class_ip4routetableW, C(col_ip4routetable), 0, 0, NULL, fill_ip4routetable },
{ class_logicaldiskW, C(col_logicaldisk), 0, 0, NULL, fill_logicaldisk },
{ class_logicaldisk2W, C(col_logicaldisk), 0, 0, NULL, fill_logicaldisk },
diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c
index 81dcd190c4..ee4eac88e9 100644
--- a/dlls/wbemprox/tests/query.c
+++ b/dlls/wbemprox/tests/query.c
@@ -1713,6 +1713,49 @@ static void test_Win32_WinSAT( IWbemServices *services )
SysFreeString( wql );
}
+static void test_Win32_DisplayControllerConfiguration( IWbemServices *services )
+{
+ static const WCHAR bitsperpixelW[] =
+ {'B','i','t','s','P','e','r','P','i','x','e','l',0};
+ static const WCHAR captionW[] =
+ {'C','a','p','t','i','o','n',0};
+ static const WCHAR horizontalresolutionW[] =
+ {'H','o','r','i','z','o','n','t','a','l','R','e','s','o','l','u','t','i','o','n',0};
+ static const WCHAR nameW[] =
+ {'N','a','m','e',0};
+ static const WCHAR queryW[] =
+ {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','W','i','n','3','2','_',
+ 'D','i','s','p','l','a','y','C','o','n','t','r','o','l','l','e','r',
+ 'C','o','n','f','i','g','u','r','a','t','i','o','n',0};
+ static const WCHAR verticalresolutionW[] =
+ {'V','e','r','t','i','c','a','l','R','e','s','o','l','u','t','i','o','n',0};
+ BSTR wql = SysAllocString( wqlW ), query = SysAllocString( queryW );
+ IEnumWbemClassObject *result;
+ IWbemClassObject *obj;
+ HRESULT hr;
+ DWORD count;
+
+ hr = IWbemServices_ExecQuery( services, wql, query, 0, NULL, &result );
+ ok( hr == S_OK, "got %08x\n", hr );
+
+ for (;;)
+ {
+ hr = IEnumWbemClassObject_Next( result, 10000, 1, &obj, &count );
+ if (hr != S_OK) break;
+
+ check_property( obj, bitsperpixelW, VT_I4, CIM_UINT32 );
+ check_property( obj, captionW, VT_BSTR, CIM_STRING );
+ check_property( obj, horizontalresolutionW, VT_I4, CIM_UINT32 );
+ check_property( obj, nameW, VT_BSTR, CIM_STRING );
+ check_property( obj, verticalresolutionW, VT_I4, CIM_UINT32 );
+ IWbemClassObject_Release( obj );
+ }
+
+ IEnumWbemClassObject_Release( result );
+ SysFreeString( query );
+ SysFreeString( wql );
+}
+
START_TEST(query)
{
static const WCHAR cimv2W[] = {'R','O','O','T','\\','C','I','M','V','2',0};
@@ -1752,6 +1795,7 @@ START_TEST(query)
test_Win32_ComputerSystem( services );
test_Win32_ComputerSystemProduct( services );
test_Win32_Bios( services );
+ test_Win32_DisplayControllerConfiguration( services );
test_Win32_IP4RouteTable( services );
test_Win32_OperatingSystem( services );
test_Win32_PhysicalMemory( services );
--
2.20.1
1
0
[PATCH] vkd3d: Allow the source to be concurrently rewritten during descriptor copy.
by Conor McCarthy 20 Sep '19
by Conor McCarthy 20 Sep '19
20 Sep '19
While copying a descriptor, the source can be rewritten with a new descriptor
by another thread without causing invalid behavior in Windows. In vkd3d this
can result in transparent freeing of a vkd3d_view object in the source
descriptor, so the copy gets a pointer to a deallocated object. Acquisition of
a reference to a view object must be protected with a mutex. This enables
SotTR to run, and causes little or no impact to performance in Metro Exodus,
which doesn't require it.
Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com>
---
libs/vkd3d/device.c | 3 +++
libs/vkd3d/resource.c | 43 ++++++++++++++++++++++++++++++++++----
libs/vkd3d/vkd3d_private.h | 1 +
3 files changed, 43 insertions(+), 4 deletions(-)
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
index dc0fa0a..f76ae30 100644
--- a/libs/vkd3d/device.c
+++ b/libs/vkd3d/device.c
@@ -2006,6 +2006,7 @@ static ULONG STDMETHODCALLTYPE d3d12_device_Release(ID3D12Device *iface)
vkd3d_fence_worker_stop(&device->fence_worker, device);
d3d12_device_destroy_pipeline_cache(device);
d3d12_device_destroy_vkd3d_queues(device);
+ pthread_mutex_destroy(&device->desc_mutex);
VK_CALL(vkDestroyDevice(device->vk_device, NULL));
if (device->parent)
IUnknown_Release(device->parent);
@@ -3237,6 +3238,8 @@ static HRESULT d3d12_device_init(struct d3d12_device *device,
vkd3d_render_pass_cache_init(&device->render_pass_cache);
vkd3d_gpu_va_allocator_init(&device->gpu_va_allocator);
+ pthread_mutex_init(&device->desc_mutex, NULL);
+
if ((device->parent = create_info->parent))
IUnknown_AddRef(device->parent);
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c
index 463f373..28f047d 100644
--- a/libs/vkd3d/resource.c
+++ b/libs/vkd3d/resource.c
@@ -1938,10 +1938,27 @@ static void d3d12_desc_destroy(struct d3d12_desc *descriptor,
|| descriptor->magic == VKD3D_DESCRIPTOR_MAGIC_UAV
|| descriptor->magic == VKD3D_DESCRIPTOR_MAGIC_SAMPLER)
{
- vkd3d_view_decref_descriptor(descriptor->u.view, descriptor, device);
+ /* Shadow of the Tomb Raider and possibly other titles sometimes destroy
+ * and rewrite a descriptor in another thread while it is being copied. */
+ pthread_mutex_lock(&device->desc_mutex);
+ if (!descriptor->u.view)
+ {
+ /* Destroyed in another thread. */
+ pthread_mutex_unlock(&device->desc_mutex);
+ }
+ else
+ {
+ vkd3d_view_decref_descriptor(descriptor->u.view, descriptor, device);
+ /* Another thread may free the view after the mutex is unlocked, so zero the
+ * descriptor while locked. This has no measurable effect on performance. */
+ memset(descriptor, 0, sizeof(*descriptor));
+ pthread_mutex_unlock(&device->desc_mutex);
+ }
+ }
+ else
+ {
+ memset(descriptor, 0, sizeof(*descriptor));
}
-
- memset(descriptor, 0, sizeof(*descriptor));
}
void d3d12_desc_copy(struct d3d12_desc *dst, const struct d3d12_desc *src,
@@ -1951,13 +1968,31 @@ void d3d12_desc_copy(struct d3d12_desc *dst, const struct d3d12_desc *src,
d3d12_desc_destroy(dst, device);
+ /* Try to do as much as possible while unlocked to allow multithreading. */
*dst = *src;
if (src->magic == VKD3D_DESCRIPTOR_MAGIC_SRV
|| src->magic == VKD3D_DESCRIPTOR_MAGIC_UAV
|| src->magic == VKD3D_DESCRIPTOR_MAGIC_SAMPLER)
{
- vkd3d_view_incref(src->u.view);
+ pthread_mutex_lock(&device->desc_mutex);
+ if (src->u.view == dst->u.view)
+ {
+ /* Hopefully this happens most of the time. */
+ vkd3d_view_incref(src->u.view);
+ pthread_mutex_unlock(&device->desc_mutex);
+ }
+ else
+ {
+ /* The source was changed while we waited for the lock. Get a copy of the new descriptor.
+ * (See comments in d3d12_desc_destroy()). */
+ *dst = *src;
+ if (src->magic == VKD3D_DESCRIPTOR_MAGIC_SRV
+ || src->magic == VKD3D_DESCRIPTOR_MAGIC_UAV
+ || src->magic == VKD3D_DESCRIPTOR_MAGIC_SAMPLER)
+ vkd3d_view_incref(src->u.view);
+ pthread_mutex_unlock(&device->desc_mutex);
+ }
}
}
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h
index 294e677..0cfd1af 100644
--- a/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/vkd3d_private.h
@@ -1052,6 +1052,7 @@ struct d3d12_device
struct vkd3d_fence_worker fence_worker;
pthread_mutex_t mutex;
+ pthread_mutex_t desc_mutex;
struct vkd3d_render_pass_cache render_pass_cache;
VkPipelineCache vk_pipeline_cache;
--
2.23.0
1
0