Comments (4)
Okay, I tested using WARP, and it works, all the tests pass correctly with good accuracy.
REF indeed doesn't work at all. So my guess is that Microsoft actually removed REF entirely and has not made REF to WARP unlike what I read about that.
So just adding GraphicsAdapter.UseDriverType = DriverType.FastSoftware
to your PR should do the trick!
from monogame.
So I created a Draft PR #8151 that actually has the tests passing again, however not in an ideal or probably recommended way. Wanted to provide some information about what I've run into and tried. Assuming someone more familiar with SharpDX or the WindowsDX code in MonoGame may have some better ideas about what is going on.
- This problem exists in the Master branch today as well. Rolling back versions of .NET, NUnit, and various other things did not seem to make much impact. The issue is still happening on the .NET 6 code even (unless this has been broken for a long time!)
- The Issue appears to be happening on GraphicsDevice.DirectX.cs when creating the Direct3D device via the SharpDX.Direct3D11.Device(driverType, creationFlags, featureLevels) constructor. Whenever you pass a driverType of Reference it throws this issue: SharpDXException: HRESULT: [0x887A0004], Module: [SharpDX.DXGI], ApiCode: [DXGI_ERROR_UNSUPPORTED/Unsupported], Message: The specified device interface or feature level is not supported on this system. If I simply disable the code in the TestGameBase.cs that sets UseReferenceDevice to true and make it use driverType Hardware all of the tests start passing again. Obviously the Reference device is supposed to be fully featured, and the ideal way to do testing. It bypasses a bunch of inconsistencies and unreliability of testing on different hardware, but it does not seem to be working currently.
- I did for giggles try a half baked upgrade of SharpDX to 4.2.0 and got about 50% there where the code could at least build and the tests could run. I was still seeing the fast device creation failures on tests that were not even impacted by the breaking API changes that were not fully fleshed out. Could be user error, but that did not seem to fix the issue.
I am not as familiar with how the Reference device creation worked via debugging prior to when the tests stopped working. Nor I am super familiar with SharpDX. While I can try to find some time to dig in a bit more, and get a better idea of what is happening I wanted to at least share some info. Anyone that has better ideas on how to fix this feel free to jump in or make suggestions!
from monogame.
Thank you for looking into this!
Ah! The reference driver is a software renderer for Direct3D, it is indeed meant to test accuracy and is very slow.
Microsoft has 2 software renderers: the "REF" driver, and WARP.
We might want to test using WARP by setting GraphicsAdapter.UseDriverType = DriverType.FastSoftware
right after UseReferenceDevice = true;
to see if it changes anything (mind that setting UseReferenceDevice
after UseDriverType
will reset UseDriverType
back to using REF).
But my guess is that it won't change anything. From what I'm reading, WARP has replaced REF since Windows 10 and they are one and the same now.
Also, WARP needs the Windows SDK to be installed in order to work. That's maybe where the error is (but it doesn't explain why it doesn't work on the Github Runner since the Windows SDK is preinstalled there).
from monogame.
Awesome! Makes sense. I have made the changes in a new PR. My previous one was getting a bit messy.
from monogame.
Related Issues (20)
- `DrawableGameComponent.Initialize` Does Not Behave How XNA Documentation Describe It HOT 1
- [PAID BOUNTY] [LOCKED] Package up ffmpeg and ffprobe HOT 10
- [PAID BOUNTY][LOCKED] A shared base for public and console repos
- AL lib throws unclosed device warning on proper game exit HOT 4
- Variable rate shading HOT 2
- [Urgent security issue] FreeImage arbitrary code execution vulnerability HOT 2
- tu-clausthal link does not exists HOT 2
- Getting started page is not working HOT 2
- SpriteBatch With Custom Effects and Per-Sprite Data HOT 2
- Links in Footer not working (Website)
- Visual Studio extension doesn't build anymore HOT 2
- Separate interfaces and platform-specific realizations HOT 2
- Getdata<T> allocates an extra array of T[] HOT 3
- Mitigate null reference exceptions via better communication HOT 1
- Debian Wine Setup: command not found: wine64 HOT 3
- Joystick.LastConnectedIndex does not update properly
- [PAID BOUNTY] A better 2D onboarding tutorial HOT 6
- [PAID BOUNTY] A better 3D onboarding tutorial HOT 3
- Support video in Android
- Project template "Monogame Android Application (MonoGame Team) produces non compilable project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monogame.