Emulator Issues #5466
closedgx-optimization regression - viewport gets set to zero
0%
Description
- Game Name and ID (as it appears in right click > properties: "GZ2P01",
"RSBE01", etc):
Any
2) What is the expected output? What do you see instead?
Working stuff. Crash (at least in debug builds)
3) Did the game ever work correctly (i.e. not have this problem) on an
earlier version of dolphin? Please specify the exact revision when the
problem began.
Ya, before gx-optimization merge
4) What steps will reproduce the problem?
- Compile Dolphin
- Run Dolphin
- Start a game (using D3D9)
5) What version of dolphin are you using (32bit/64bit along with the
version as it appears in the title bar, etc)? Do not say 'latest version'
this changes multiple times a day.
On what operating system, drivers, and hardware? Be sure to list OS,
graphics driver information, and video card model if you are having
graphics problems, for example.
Any after the gx-optimization merge
6) Please provide any additional information below.
UpdateViewport is getting called with invalid values, i.e. zero width/height/etc. The D3D9 debug runtime complains about this; adding a sanity check fixes the problem.
7) Attachments. IMPORTANT! We have a limited storage quota on
GoogleCode, so please use a 3rd party host for screenshots or any other
files (http://min.us/ for example).
Updated by NeoBrainX over 12 years ago
Oh yeah, the crash happens directly after starting a game, btw ;)
Updated by delroth over 12 years ago
- Status changed from New to Accepted
Can't reproduce, where does it complain exactly? I'm using the debug version of D3D9 with "Break on D3D9 Error" enabled.
Updated by NeoBrainX over 12 years ago
It fails because you're setting the viewport width and height to zero. Even if you can't reproduce this it's just wrong if the code does that (I guess it's a driver specific thing what stuff causes errors and what stuff doesn't).
Fwiw, I don't have access to a windows system anymore, so I can't give any more information about it. However, for you it should be enough to find out from where and why the viewport is getting set to zero, anyway.
Updated by NeoBrainX about 12 years ago
- Status changed from Accepted to Fixed
This issue was closed by revision ec859009b712.
Updated by NeoBrainX about 12 years ago
The order of BP writes in the very first frame are essential here; some games write the scissor rect BP registers first. We'll call SetScissor then, which in turn calls UpdateViewportWithCorrection. However, since the viewport dimension registers will still be zero at that point, we'll try to set an invalid viewport. That makes some D3D debug runtime + driver combinations pretty sad and results in crashes.