Commit graph

1340 commits

Author SHA1 Message Date
Henrik Rydgard
7e3cd987cd Fixes to D3D viewport management. For some reason, still having strange driver-bug-ish problems in unbuffered... 2015-11-12 14:47:43 +01:00
Unknown W. Brackets
a821cd3f12 Disable UV range opt. for shader blending FBO.
Obviously this is unsafe, not sure what I was thinking...
2015-11-09 23:31:34 -08:00
Henrik Rydgard
5a8e86e8ba Don't mess with vpDepth in through mode. Fixes glitches in Wipeout Pulse. 2015-11-09 21:57:48 +01:00
Henrik Rydgard
5667f34805 Invert proj matrix offset properly in D3D. 2015-11-09 21:21:55 +01:00
Henrik Rydgard
a6ced1d0b4 Move viewport/stencil conversion out into GPUStateUtils.cpp, use it in D3D as well.
D3D bugfixes. Not perfect yet.
2015-11-09 21:21:54 +01:00
Henrik Rydgard
aac0cd3227 Minor consistency improvement between d3d and opengl code 2015-11-05 00:08:48 +01:00
Henrik Rydgard
8b3ff8a5b6 Correctly flip matrices in DX9 as well. 2015-11-04 22:37:42 +01:00
Henrik Rydgard
f3b0562bd8 Improve viewport terminology a bit. No functional change. 2015-11-04 22:03:29 +01:00
Henrik Rydgard
067431b35b Region is not used in the viewport calculations - remove wrong commented out code 2015-11-04 11:04:47 +01:00
Henrik Rydgard
99e3ee1f71 Add some missing checks in D3D from the last commit. 2015-11-04 10:34:52 +01:00
Unknown W. Brackets
2b832e7f6c Zero out dst blend factors in 565. 2015-11-04 00:35:55 -08:00
Unknown W. Brackets
5ff3e6a5e7 Avoid polluting glstate in GetTempFBO().
Since we do this "late", we might overwrite important settings, such as
stencil, color masks, etc.

This affects both depal and fbo shader blending.

Didn't do it for all ClearBuffer()s, since I'm worried some might be
intentionally resetting state.
2015-11-03 22:37:19 -08:00
Unknown W. Brackets
7af7b2bc6d Add methods to "force" glstate to certain values.
This way we don't have to use totally different syntax when doing:

   glstate.scissorTest.force(false);
   // Do stuff that needs scissorTest temporarily off.
   glstate.scissorTest.restore();

There's cleaner options maybe but this is a simple first step.
2015-11-03 22:37:05 -08:00
LunaMoo
71a0928d6b Flip display layout editor coordinates to match #8130:) 2015-11-03 00:28:47 +01:00
Unknown W. Brackets
3a7edd8cac Switch viewport overage to the new world of sanity. 2015-11-02 20:11:58 +01:00
Henrik Rydgard
099f62b503 Fix some typos in D3D9 blits (removed parameter).
Add some missing projection matrix flips (flipped viewport emulation)

Fix issue with DrawPixels in non-buffered in D3D9
2015-11-02 20:11:48 +01:00
Henrik Rydgard
14652f0650 Make some optional arguments non-optional. 2015-11-02 20:10:29 +01:00
Henrik Rydgard
6b2862284b Minor cleanups 2015-11-02 20:09:59 +01:00
Henrik Rydgard
0266211b88 Two wrongs can appently make a right. Remove an inadvertent flip, add flips where we actually need them. 2015-11-02 20:09:24 +01:00
Henrik Rydgard
86bfce4006 Remove more obsolete v-flip support 2015-11-02 20:09:12 +01:00
Henrik Rydgard
069a7b0d2f Move the viewport to the right place. 2015-11-02 20:08:00 +01:00
Henrik Rydgard
f4248cb550 Remove a whole lot of flipping special cases 2015-11-02 20:07:30 +01:00
LunaMoo
526d0b04b9 Add video fix in non buffered mode for D3D backend as well. 2015-10-31 21:07:53 +01:00
LunaMoo
ae1cf1d85d Add Display layout editor to use for example on tablets, but also includes automatic screen cropping for 16:9 cases(default).
//Rebased & removed atlas stuff which was added with #8096
//squashed with some improvements
2015-10-31 20:50:02 +01:00
Unknown W. Brackets
6b905e8e18 d3d9: Remove the old shader id gen. 2015-10-24 21:26:40 -07:00
Henrik Rydgard
838e53f482 Delete disabled code to use built-in alpha test on DX9. 2015-10-25 01:26:38 +02:00
Henrik Rydgard
85229efef4 D3D9: Generate shaders directly from shader IDs, just like we do in GL. 2015-10-25 00:34:23 +02:00
Henrik Rydgard
edafa9bc17 Centralize the GPU state conversion functions 2015-10-24 23:49:05 +02:00
Henrik Rydgard
92389a4966 Use a common ShaderId class. Start moving shader ID code to GPU/Common 2015-10-24 23:24:06 +02:00
Henrik Rydgard
d3b265a3e4 Fix render resolution race condition. Should help #8002 2015-09-27 20:00:47 +02:00
Henrik Rydgard
b07b002040 Introduce "Compatibility Flags".
These should be used very restrictively, see comment in Compatibility.h.

Should help #8004, by disabling depth rounding in Fight Night round 3.
2015-09-27 01:23:20 +02:00
Henrik Rydgard
70cb4372c1 Assorted fixes to auto resolution. Fixes too low resolution and also #8002, plus notification spam 2015-09-25 19:10:09 +02:00
Henrik Rydgård
eed2f9d9d5 Merge pull request #8000 from unknownbrackets/gpu-minor
Allow framebufs to get smaller and affect the offset texture code
2015-09-25 09:47:16 +02:00
Henrik Rydgård
d8b43dd9e9 Fix #7999 2015-09-24 11:22:20 +02:00
Unknown W. Brackets
400b8886e6 Use the framebuf->height for offset calculation.
This way if we shrunk the framebuffer, it'll still work.
2015-09-23 23:59:39 -07:00
Henrik Rydgard
ec63663ad5 More consistent handling of resolution changes. Should help #7995 2015-09-23 12:25:38 +02:00
Henrik Rydgard
3232e46c36 Make debug build nearly warning free in MSVC 2015 2015-09-17 22:02:15 +02:00
Unknown W. Brackets
dff4aeb30f Correct uv bound pointers in arm vertexjit. 2015-09-13 14:55:10 -07:00
Unknown W. Brackets
93e9d6cd56 Respect framebuffer offset in fb copies.
We need to offset the copy coordinates also, or we'll copy the wrong
thing.
2015-09-13 11:35:15 -07:00
Unknown W. Brackets
62de281e35 Use texture UV range to optimize framebuf copies. 2015-09-13 11:34:52 -07:00
Unknown W. Brackets
f4df7f076e Hash less of 512 tall textures when possible.
This allows xBRZ to work better on such textures, and also may reupload
them less frequently.
2015-09-13 11:15:57 -07:00
Unknown W. Brackets
88eea00fe4 Add a safety against vertcache breaking uv checks. 2015-09-13 11:09:21 -07:00
Unknown W. Brackets
5c233fa545 Add initial decoding check for uv bounds. 2015-09-13 10:00:33 -07:00
Unknown W. Brackets
52c3fc221b Also split DirectX9's texture cache. 2015-09-13 09:36:17 -07:00
Unknown W. Brackets
a3078a6ae1 Move late state apply after sw transform decode.
Need this so ApplyDrawStateLate() can use data from the decode.
2015-09-13 06:53:55 -07:00
Unknown W. Brackets
5360422310 Defer bind of shader blend copy until after verts. 2015-09-13 06:52:47 -07:00
Unknown W. Brackets
71afaffc20 Pack texture cache entries just a bit tighter. 2015-09-13 06:43:47 -07:00
Unknown W. Brackets
7d63a10fdd Centralize texture cache entry structures. 2015-09-13 06:43:37 -07:00
Unknown W. Brackets
e1df8fc45f Centralize sampling params and test optimizations. 2015-09-13 06:38:07 -07:00
Unknown W. Brackets
85533dad6e Native merge part 2: update build files.
And a couple minor stragglers.
2015-09-06 13:06:57 -07:00