Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upMove a significant amount of video backend logic to VideoCommon #7753
Conversation
stenzek
force-pushed the
stenzek:videocommon-all-the-things
branch
2 times, most recently
from
eccf568
to
7241237
Jan 28, 2019
This comment has been minimized.
This comment has been minimized.
Fixes Brawl/Panel De Pon on D3D. https://bugs.dolphin-emu.org/issues/6572 NES VC Games do not render at all. |
stenzek
added
the
WIP
label
Jan 28, 2019
BhaaLseN
reviewed
Jan 28, 2019
Love the diff delta so far! Do those |
if (!g_ActiveConfig.backend_info.bSupportsOversizedViewports) | ||
{ | ||
x = std::min(x, static_cast<float>(g_renderer->GetCurrentFramebuffer()->GetWidth() - 1)); | ||
y = std::min(y, static_cast<float>(g_renderer->GetCurrentFramebuffer()->GetHeight() - 1)); |
This comment has been minimized.
This comment has been minimized.
BhaaLseN
Jan 28, 2019
Member
Looks a bit strange that both are clamped downwards in position and then limited in size (which in the most extreme case is a one by one viewport somewhere in a corner?) rather than...i dunno, scaling/translating things or something else.
Does anything ever hit this case anyways?
|
||
// Clear the renderable textures out. | ||
g_renderer->SetAndClearFramebuffer(m_efb_framebuffer.get(), {0.0f, 0.0f, 0.0f, 0.0f}, 0.0f); | ||
// g_renderer->SetViewport(0.0f, 0.0f, static_cast<float>(GetEFBWidth()), |
This comment has been minimized.
This comment has been minimized.
BhaaLseN
Jan 28, 2019
Member
Does this commented out code have any significance, or can it be removed?
|
||
bool FramebufferManager::CompileConversionPipelines() | ||
{ | ||
// TODO: This really needs an enum.. |
This comment has been minimized.
This comment has been minimized.
|
||
bool FramebufferManager::PopulateDepthReadbackTexture() | ||
{ | ||
// StateTracker::GetInstance()->OnCPUEFBAccess(); |
This comment has been minimized.
This comment has been minimized.
stenzek
force-pushed the
stenzek:videocommon-all-the-things
branch
3 times, most recently
from
49da8c2
to
94d57be
Jan 29, 2019
This comment has been minimized.
This comment has been minimized.
Fixes the D3D crash in Paper Mario. |
stenzek
force-pushed the
stenzek:videocommon-all-the-things
branch
3 times, most recently
from
782d720
to
5bdc91d
Jan 30, 2019
This comment has been minimized.
This comment has been minimized.
I'd be cool with reimplementing D3D12 if it can be proven that maintaining it (read, fixing issues) can be done by fixing common code, so that we're not trapped to only graphics devs that have windows 10 set up and can be bothered. Intel iGPU users would rejoice. |
This comment has been minimized.
This comment has been minimized.
Isn't the true solution to add a new maintainable D3D7 backend if we're worrying about people with bad GPUs? |
This comment has been minimized.
This comment has been minimized.
thanks, i hate it |
This comment has been minimized.
This comment has been minimized.
The idea is that with all the driving logic in common, it shouldn't need much in the way of actual maintenance, since it's just converting to the API. The backend code shouldn't ever need to change, unless it's for new features :) |
stenzek
force-pushed the
stenzek:videocommon-all-the-things
branch
9 times, most recently
from
00d4381
to
b25d261
Jan 31, 2019
stenzek
added
needs testing
and removed
WIP
labels
Feb 3, 2019
stenzek
force-pushed the
stenzek:videocommon-all-the-things
branch
2 times, most recently
from
eaa046a
to
dfc051b
Feb 3, 2019
This comment has been minimized.
This comment has been minimized.
M220
commented
Feb 3, 2019
I Can't launch any game with OpenGL in android. And the log that's located in dolphin-emu -> Logs, is empty for some reason. Because it's not an specific game, you can probably reproduce this bug yourself but if you want the errors anyway, then here is the errors in order :
Vulkan and software are both working and I had seen no problem with them so it't just an OpenGL Specific bug. |
stenzek
force-pushed the
stenzek:videocommon-all-the-things
branch
from
1c56082
to
eb3c857
Feb 14, 2019
This comment has been minimized.
This comment has been minimized.
@iwubcode I did find an issue where a stitched texture could be transitioned inside a render pass, which shouldn't happen now. I doubt it's what's causing the crash, but you never know. Speaking of which, is it a game crash, or a dolphin/gpu crash? JMC47 was unable to reproduce it with a NV GPU. |
This comment has been minimized.
This comment has been minimized.
Thanks @stenzek . I tried the new build but still see the same issue. Dolphin itself doesn't crash, the image freezes up and then turns to black (no sound of course). Even hitting the 'stop' button (multiple times) does not stop the rendering and I must force-quit the application. EDIT: Just for historical purposes. It seems like the issue has something to do with XFBs. Turning on 'Immediate Mode' or unchecking 'XFB to Texture Only' fixes the issue |
stenzek
force-pushed the
stenzek:videocommon-all-the-things
branch
from
eb3c857
to
4375edd
Feb 15, 2019
This comment has been minimized.
This comment has been minimized.
@iwubcode Again, not sure if it's the same issue, but we found strided XFB copy reconstruction could issue out-of-range copies. This should really crash/reset the driver, but it might be related. I'd be curious what the call stack looks like when it's frozen if you attach a debugger to dolphin and pause it (the CPU/GPU threads). |
This comment has been minimized.
This comment has been minimized.
@stenzek - the new build didn't help solve the issue unfortunately. Here's the callstack you requested (slightly trimmed, let me know if you want more):
|
This comment has been minimized.
This comment has been minimized.
@iwubcode huh, odd. Does turning off backend multi-threading in advanced options change anything? |
This comment has been minimized.
This comment has been minimized.
No it does not |
This comment has been minimized.
This comment has been minimized.
Could you check the callstack with the MT option off? I'm curious where it's getting stuck, it seems like it's somewhere in presentation. |
This comment has been minimized.
This comment has been minimized.
@stenzek - seems to be the same callstack as before. So it's getting stuck in presentation when waiting on the semaphore for submitting the command buffer? |
This comment has been minimized.
This comment has been minimized.
With multithreading off, the semaphore shouldn't ever block. I'll double-check the code. |
stenzek
added some commits
Jan 29, 2019
stenzek
force-pushed the
stenzek:videocommon-all-the-things
branch
2 times, most recently
from
c3f8b89
to
d4d0f74
Feb 17, 2019
This comment has been minimized.
This comment has been minimized.
Confirmed fixed. Here was the original issue:
|
stenzek
force-pushed the
stenzek:videocommon-all-the-things
branch
6 times, most recently
from
d73db61
to
322be67
Feb 17, 2019
This comment has been minimized.
This comment has been minimized.
falikhukoma1996
commented
Feb 19, 2019
•
I want to run the game but it can't be opened for this version still force close. i'm playing wii game fatal frame 2 & 4. |
This comment has been minimized.
This comment has been minimized.
Works fine here. Are you sure it runs fine in master too? |
This comment has been minimized.
This comment has been minimized.
M220
commented
Feb 19, 2019
Maybe He's Talking about android |
This comment has been minimized.
This comment has been minimized.
|
stenzek
force-pushed the
stenzek:videocommon-all-the-things
branch
from
322be67
to
f039149
Feb 19, 2019
This comment has been minimized.
This comment has been minimized.
Reproduced the crash, except it was in SetAndClearFramebuffer (glClearDepth instead of glClearDepthf). Fixed as of latest push. |
stenzek commentedJan 28, 2019
•
edited
Huge scary pull request ahead!
This pull request moves a decent amount of logic from the video backends to VideoCommon. It's something I've been putting off for a while now, but finally found the motivation/time to do.
In addition to the maintainability improvements, as all backends are now considered equal, it adds things like:
Some things makes easier in the future:
Unfortunately, due to it being backend-specific, it does remove the stencil buffer bounding box emulation. I figured now that we have Vulkan/Metal on macOS, this removes one of the main uses for it.
I'm sorry for the size of this PR, but with most of the changes touching the same code, if I separated it, I'd be writing a lot of code just to throw it out again. I started doing that, but it got old quick :(
A rough work list: