HeavenWu / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

Can't switch to a reference device #722

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I have this Code:
<code>
adapter = factory.GetAdapter(0);
device = new Device(adapter, DeviceCreationFlags.SwitchToRef);
device.SwitchToReference(true);
</code>

And I got this error:
System.InvalidOperationException: The device must have been created with the 
DeviceCreationFlags.SwitchToRef option in order to switch between the reference 
rasterizer and a hardware accelerated device.

What I'm doing wrong?

Original issue reported on code.google.com by remi2...@googlemail.com on 13 Sep 2010 at 4:33

GoogleCodeExporter commented 8 years ago
A sorry, here more info: The device is a DX11 device. I'm using Win7 64bit, the 
default SlimDX version (not svn) and an ATI graphics card.

Original comment by remi2...@googlemail.com on 13 Sep 2010 at 4:36

GoogleCodeExporter commented 8 years ago

Original comment by josh.petrie on 14 Sep 2010 at 3:15

GoogleCodeExporter commented 8 years ago
Apparently, switching to and from a reference device is not supported in D3D11. 
See:
http://msdn.microsoft.com/en-us/library/ff476190(VS.85).aspx

In order to clarify this I have removed the enumeration from the D3D11 creation 
flags and the SwitchToReference() method from the 11 device.

Original comment by josh.petrie on 26 Sep 2010 at 4:16