-
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
Dream Club portable graphic issue #6497
Comments
What does the GE debugger show when drawing the missing elements? -[Unknown] |
Darn, I thought it'd be related to framebuf size. Does it help if you disable any of the tests during drawing? Like alpha, stencil, depth? We did change the value we initially had framebuffers set to... weird that it has gone through so many iterations... -[Unknown] |
After change the flag's value ,press resume ?
btw: |
Pressing escape fixes it, huh? That implies that it's something to do with the stencil, depth, or alpha since it will reset the buffers. Maybe we are not detecting a memcpy. 504 width is a strange number. -[Unknown] |
I re-doing the log (ignore sceunulity) Debug log (ignore sceunulity) |
I review the issue. |
Hmm,Another good test edit v0.9.8-1224-g43bddd8 semi problem on human edit:The changes are |
@unknownbrackets git bisect result: |
No,The git bisect result is wrong :( |
Has anything improved here recently? -[Unknown] |
No. |
Haha, wow that is bad. I still really wonder if this is depth related. If you change the StateMapping.cpp file, and find: glstate.depthFunc.set(ztests[gstate.getDepthTestFunction()]); And replace it with: glstate.depthFunc.set(GL_ALWAYS); Does it draw all parts of the character? It'll probably draw them wrong, but I'm wondering if it will at least draw everything. -[Unknown] |
So, the reason estimation affected this is because we only blit the depth if the render width and height matched. Find this in Framebuffer.cpp: void FramebufferManager::BlitFramebufferDepth(VirtualFramebuffer *src, VirtualFramebuffer *dst) { And add below: if (src->z_address == dst->z_address && src->z_stride != 0 && dst->z_stride != 0) {
NOTICE_LOG(HLE, "Framebuffer switch with same depth, %dx%d -> %dx%d", src->renderWidth, src->renderHeight, dst->renderWidth, dst->renderHeight);
} What does it say? Ideally, use the GE debugger to click "Step Frame" twice. That will show only one frame of the log, which will be most ideal. -[Unknown] |
Actually, how about this function instead: void FramebufferManager::BlitFramebufferDepth(VirtualFramebuffer *src, VirtualFramebuffer *dst) {
bool matchingDepthBuffer = src->z_address == dst->z_address && src->z_stride != 0 && dst->z_stride != 0;
bool matchingSize = src->width == dst->width && src->height == dst->height;
if (matchingDepthBuffer && matchingSize) {
int w = std::min(src->renderWidth, dst->renderWidth);
int h = std::min(src->renderHeight, dst->renderHeight);
if (gstate_c.Supports(GPU_SUPPORTS_ARB_FRAMEBUFFER_BLIT | GPU_SUPPORTS_NV_FRAMEBUFFER_BLIT)) {
// Only use NV if ARB isn't supported.
bool useNV = !gstate_c.Supports(GPU_SUPPORTS_ARB_FRAMEBUFFER_BLIT);
// Let's only do this if not clearing depth.
fbo_bind_for_read(src->fbo);
glstate.scissorTest.force(false);
if (useNV) {
#if defined(USING_GLES2) && defined(ANDROID) // We only support this extension on Android, it's not even available on PC.
glBlitFramebufferNV(0, 0, w, h, 0, 0, w, h, GL_DEPTH_BUFFER_BIT, GL_NEAREST);
#endif // defined(USING_GLES2) && defined(ANDROID)
} else {
glBlitFramebuffer(0, 0, w, h, 0, 0, w, h, GL_DEPTH_BUFFER_BIT, GL_NEAREST);
}
// If we set dst->depthUpdated here, our optimization above would be pointless.
glstate.scissorTest.restore();
}
}
} -[Unknown] |
In your second change, void FramebufferManager::BlitFramebufferDepth(VirtualFramebuffer *src, VirtualFramebuffer *dst) {
bool matchingDepthBuffer = src->z_address == dst->z_address && src->z_stride != 0 && dst->z_stride != 0;
bool matchingSize = src->width == dst->width && src->height == dst->height;
if (matchingDepthBuffer && matchingSize) {
int w = std::min(src->renderWidth, dst->renderWidth);
int h = std::min(src->renderHeight, dst->renderHeight);
if (gstate_c.Supports(GPU_SUPPORTS_ARB_FRAMEBUFFER_BLIT | GPU_SUPPORTS_NV_FRAMEBUFFER_BLIT)) {
// Only use NV if ARB isn't supported.
bool useNV = !gstate_c.Supports(GPU_SUPPORTS_ARB_FRAMEBUFFER_BLIT);
// Let's only do this if not clearing depth.
fbo_bind_for_read(src->fbo);
glstate.scissorTest.force(false);
if (useNV) {
#if defined(USING_GLES2) && defined(ANDROID) // We only support this extension on Android, it's not even available on PC.
glBlitFramebufferNV(0, 0, w, h, 0, 0, w, h, GL_DEPTH_BUFFER_BIT, GL_NEAREST);
#endif // defined(USING_GLES2) && defined(ANDROID)
} else {
glBlitFramebuffer(0, 0, w, h, 0, 0, w, h, GL_DEPTH_BUFFER_BIT, GL_NEAREST);
}
// If we set dst->depthUpdated here, our optimization above would be pointless.
glstate.scissorTest.restore();
}
}
} Well done,it fixed |
This is really what was implemented originally, this code was just not updated to match when we started resizing framebuffers. Fixes hrydgard#6497.
git bisect result e14437c |
Fixed it for OpenGL again. Moving further work to 1.12. |
Re-test in v1.10.3-1324-g226a8be1c |
The frame dump here appears to work for me in Direct3D 11 and Direct3D 9. Is this potentially fixed? Or does it not reproduce in the dump now? -[Unknown] |
in v1.12.3-607-g2d7a7fd34 |
My harddisk die again :( |
With the recent changes to depth buffer copying, I think this is even more likely to be fixed. The INTZ change may have helped D3D9, potentially. -[Unknown] |
OpenGL , DX9,Valkun no problem Update frame dump |
@unknownbrackets some graphic problem may only see by part of iso (umd bufer) |
I'm not really sure what that is, but it seems like a tool to see what sectors of the UMD the game read from. I don't think it's relevant here? -[Unknown] |
@unknownbrackets I only mean that easier to reproduce the problem |
Test in v1.16.3-14-gc4ad32420 of AMD cpu 7900 of AMD Integrated graphics card in windows 11 |
v0.9.8-1000-ga675c30 no problem
v0.9.8-1018-g318f641 human some problem
v0.9.8-1020-gcda9833 cannot see human
v0.9.8-1061-gcda9833 cannot see human
v0.9.8-1142-g1415532-windows-amd64\ bg full black
v0.9.8-1206-g9503603 cannot see human
v0.9.8-1219-gf664979 cannot see human
v0.9.8-1235-gd1357e5 semi problem on human
v0.9.8-1282-g935f1cb semi problem on human
v0.9.8-1538-gbe0340b semi problem on human
v0.9.8-1018-g318f641 log:
https://gist.github.com/sum2012/13c11126d5b9add2ef81
v0.9.8-1538-gbe0340b log:
https://gist.github.com/sum2012/b8d15983366d98e19a7e
The text was updated successfully, but these errors were encountered: