-
Notifications
You must be signed in to change notification settings - Fork 81
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
Fall back to RGBA 8888 color mode on GL_FRAMEBUFFER_UNSUPPORTED. #228
Conversation
…s Gradius I/II/Gaiden on Collection.
What specifically does this fix? Normally (unless you change the ini manually), ppsspp uses 8888 for all the main drawing FBOs. -[Unknown] |
For some reason Gradius Collection uses implicit mode selection for these games. Only Gradius III works differently. I haven't checked why. However at least my OGL implementation does not support request with 5551 color combination. That's why this option falls back to 8888 on those cases. |
What do you mean by implicit mode selection? What's the stack trace? I'm mostly interested in who is calling fbo_create(). What graphics card / driver are you using? What platform? -[Unknown] |
Even if we really were creating 5551 buffers, this would not be a correct way to fall back to 8888. So I don't understand this change either. |
Well I agree that this fix is rather obscure and most likely a hack. I need to investigate this a bit more to fully understand how these games create fb and how it is so different from Gradius III. |
f14b39c
to
c141c36
Compare
Sorry to be really like super late with this issue. It took like 10 months. lolled So Gradius Collection needs this 'Block Transfer' feature. Now at FramebufferCommon.cpp line 722 ReadFramebufferToMemory(srcBuffer, true, static_cast(srcX * srcXFactor), srcY, static_cast(srcWidth * srcXFactor), srcHeight); Then Framebuffer.cpp -> ShouldDownloadUsingCPU(vfb) -> false since NVIDIA GPU -> fbo_create is then called with GE_FORMAT_5551 opposed to GE_FORMAT_8888. Now that format returns GL_FRAMEBUFFER_UNSUPPORTED at least on MBP with Nvidia 9400M GPU. I tested on Linux with Intel 3000 GPU by a hack if GE_FORMAT_5551 would be okay, and no problems. It is fine. So now I am not sure if,
Someone else noticed also this: http://forums.ppsspp.org/showthread.php?tid=1591&pid=102389#pid102389 So this should be fixed accordingly. |
Aha! Very good diagnosis, I didn't realize we actually used 16-bit fbos in frame download. So hm, I wonder what the GPU version cutoff is from where it's working? Do you think you could post what you see if you go to Settings->System->Developer Tools->System Information? We can simply check if the gl version or gpu or something is less than a specific value, and in that case have ShouldDownloadUsingCPU return true. |
Here is a dump. Model: NVIDIA GeForce 9400M OpenGL Engine GL_ARB_color_buffer_float |
It's probably reasonable to assume any NVIDIA below OpenGL 3 might not handle it properly? Or maybe there's an extension name we ought to be looking at. -[Unknown] |
This should help: hrydgard/ppsspp@159c8ba |
Fixes Gradius I/II/Gaiden (Gradius Collection PSP)