-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Libretro: add D3D11 support / fix GL context reset. #10809
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine.
@@ -1274,6 +1276,34 @@ void D3D11DrawContext::Clear(int mask, uint32_t colorval, float depthVal, int st | |||
} | |||
} | |||
|
|||
void D3D11DrawContext::BeginFrame() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is needed to restore state after RetroArch has done its drawing? I don't mind really, should be very cheap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I was a bit worried about the cost.
@@ -70,6 +70,8 @@ ConsoleListener::ConsoleListener() : bHidden(true) | |||
bUseColor = false; | |||
#elif PPSSPP_PLATFORM(UWP) | |||
bUseColor = false; | |||
#elif defined(_MSC_VER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looked weird to me first but I see that it's just in the non-UI case.
D3D11 support is still experimental but it does seem to work well enough. this includes a small change to thin3d_d3d11 by adding a BeginFrame implementation.
incidentally, I also found a fix for the GL context reset problem which was to simply request for the context to be cached during a reset. DeviceLost/Restore for GL and D3D11 are still unable to switch to a new context, but this is good enough for now I think.
fixes #10784