Commit Graph
250 Commits
Author SHA1 Message Date
Henrik RydgardandUnknown W. Brackets d67b148712 Add math dataconv funcs for packed values. 2016-03-06 11:33:53 -08:00
Unknown W. Brackets 346e98046d Forgot to remove this report, not needed now. 2016-02-13 09:31:03 -08:00
Unknown W. Brackets 529abd7db4 Correct clamped depth range from [0, 65535].
This changes a few things:
 * All backends clamp the depth range and keep it positive.
 * The depth rounding uniform is now properly dirtied.
 * Projection is updated to translate and scale appropriately.
 * Depth rounding is halved on OpenGL to account for [-1, 1] range.

Fixes Phantasy Star Portable 2 without the need for a game-specific hack.
2016-01-03 12:29:43 -08:00
Unknown W. Brackets c31a8f860b Adjust stencil ops for 5551 and 565 buffers.
This attempts to better approximate the operations that actually happen,
where possible.  Expected to help #5278.
2015-12-31 17:01:03 -08:00
Unknown W. Brackets 1fb271a607 Enable EXT_blend_func_extended.
Not really tested.
2015-11-27 16:01:25 -08:00
Unknown W. Brackets 010a7ac1af Correct state leakage on shader blend/self render.
This makes #2917 look right on desktop with blit and logic ops disabled.
2015-11-15 13:12:29 -08:00
Unknown W. Brackets 294f09a61f Call ResetShaderBlending() from ApplyDrawState().
Cleaner this way.
2015-11-13 23:15:28 -08:00
Unknown W. Brackets 13a09647e2 d3d9: Disable shader blending, not implemented.
Fixes bad graphics in Ridge Racer, etc.
2015-11-13 23:11:06 -08:00
Henrik Rydgard 639d56aa27 Remove a few minor differences between the state mapping code in the two backends 2015-11-12 18:11:32 +01:00
Henrik Rydgard 4a71d4cda2 The ConvertBlendState machinery is now pure, so move it out to GPU/Common 2015-11-12 18:11:20 +01:00
Henrik Rydgard 091fb28f55 Extract the glstate.blendcolor call from ConvertBlendState 2015-11-12 18:11:19 +01:00
Henrik Rydgard 71103cb0ca Make ConvertBlendState into a reasonably pure function with no side effects 2015-11-12 18:11:15 +01:00
Henrik Rydgard e97d771e0f Extract blend state mapping into a function. 2015-11-12 15:57:33 +01:00
Henrik Rydgård ce28ee28f1 Merge pull request #8198 from hrydgard/centralize-viewport-mapping
Centralize viewport mapping
2015-11-12 15:27:31 +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 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 77f2b0c9e9 Extract the viewport/scissor conversion into a function. 2015-11-09 21:21:54 +01:00
Unknown W. Brackets 43238322ef Let's try a more limited heuristic. 2015-11-08 09:38:18 -08:00
Unknown W. Brackets 2c0b662484 Report depth test equality checks. 2015-11-08 09:04:12 -08:00
Henrik Rydgard aac0cd3227 Minor consistency improvement between d3d and opengl code 2015-11-05 00:08:48 +01:00
Henrik Rydgard 5bfcd07b35 Viewport clipping/overage fix 2015-11-04 23:03:14 +01:00
Henrik Rydgard ffe35f73af Fix viewport vertical positioning, fixing #8165. However, God Eater bloom breaks. Why?? 2015-11-04 23:03:13 +01:00
Henrik Rydgard a6d6a68a95 Oops 2015-11-04 22:28:54 +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
Unknown W. Brackets 2b832e7f6c Zero out dst blend factors in 565. 2015-11-04 00:35:55 -08:00
Unknown W. Brackets bc0a694ec2 Unbreak depth range test reporting.
Was broken in 9e18fb7e90.
2015-11-03 00:14:53 -08:00
LunaMooandLuna 71a0928d6b Flip display layout editor coordinates to match #8130:) 2015-11-03 00:28:47 +01:00
Henrik Rydgard a1ad278005 unknownbrackets' fixes for last commit 2015-11-02 20:51:40 +01:00
Unknown W. BracketsandHenrik Rydgard 3a7edd8cac Switch viewport overage to the new world of sanity. 2015-11-02 20:11:58 +01:00
Henrik Rydgard c1db771056 Fix non-through rectangles 2015-11-02 20:08:11 +01:00
Henrik Rydgard 069a7b0d2f Move the viewport to the right place. 2015-11-02 20:08:00 +01:00
Henrik Rydgard e9770b3679 Fix non-buffered rendering 2015-11-02 20:07:50 +01:00
Henrik Rydgard 94b77135a2 Fix a few more flips 2015-11-02 20:07:38 +01:00
Henrik Rydgard f4248cb550 Remove a whole lot of flipping special cases 2015-11-02 20:07:30 +01:00
LunaMooandLuna 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
Henrik Rydgard 89d0c7751f Viewport clipping did not take small screen into account. Fix that. #8082 should be rebased on this :) 2015-10-31 14:56:13 +01:00
Unknown W. Brackets 62de281e35 Use texture UV range to optimize framebuf copies. 2015-09-13 11:34:52 -07:00
Unknown W. Brackets c7e6f051e4 Split the texture application into two stages.
The latter simply applies the texture.

This makes our IsAlphaTestTriviallyTrue() check correct.
2015-09-13 09:30:39 -07:00
Unknown W. Brackets 5360422310 Defer bind of shader blend copy until after verts. 2015-09-13 06:52:47 -07:00
Henrik Rydgard ab3468ea02 Move native/gfx_es2/gl_state.cpp/h into GPU/GLES/GLStateCache.cpp/h 2015-09-06 13:45:17 +02:00
Henrik Rydgard 1c0158bfe6 Further reduce the use of ifdef USING_GLES2 and friends. 2015-09-05 23:39:10 +02:00
Henrik Rydgard 5b2ffd1434 Fix some naming, remove NV_draw_texture, move decisions out 2015-09-05 22:11:28 +02:00
Henrik Rydgard f524049277 Move more GPU feature checks upfront. Re-check when exiting settings menu. 2015-09-05 21:23:58 +02:00
Henrik Rydgard a71be3f75f Start moving GPU feature compatibility decisions to startup
(and a single, cache-friendly flag field)
2015-09-05 19:58:47 +02:00
Henrik Rydgard 9e18fb7e90 Round Z in the vertex shader to match a 16-bit Z buffer.
However this inexplicably does still not solve the Phantasy Star issue!
2015-08-26 15:25:21 +02:00
Henrik Rydgard 1e8a1b801f Rename viewportX1/X2 etc to scale + center, which is what they actually are. 2015-08-26 15:24:35 +02:00
Henrik Rydgard 29fc9e81a4 Use the gstate.getViewport* accessors. 2015-08-26 15:24:35 +02:00
Henrik Rydgard d7f4c47c22 Refactor: Even more getting rid of gstate access in the framebuffer manager. 2015-08-05 12:13:14 +02:00
Henrik Rydgard d26b74d4d6 GPU refactor: Move accesses to gstate out of leaf functions 2015-08-05 01:03:49 +02:00