Unknown W. Brackets
61fc1cdcfb
GPU: Dirty tex when clearing or rendering to self.
...
This way if we're blitting, we'll re-blit.
2018-06-06 05:52:49 -07:00
Henrik Rydgård
b75c8b72c6
Fix another little inconsistency (two uniforms were merged for bad reasons)
2017-12-07 21:39:09 +01:00
Henrik Rydgard
1098bf7342
All: Only convert viewportscissor state if dirty
2017-08-14 11:14:26 +02:00
Henrik Rydgard
e439055a32
All: Only convert raster state if dirty
2017-08-14 11:14:26 +02:00
Henrik Rydgard
e2b179d6e2
All: Only convert depth stencil state if dirty
2017-08-14 11:14:26 +02:00
Henrik Rydgard
e4567c694c
All: Only convert blend state if "dirty"
2017-08-14 11:14:26 +02:00
Henrik Rydgård
1d96ead852
Remove "Always Depth Write" setting. One step forward for #8171
2017-05-26 10:23:45 +02:00
Henrik Rydgård
5a8e9c4f71
Port some accessors over from #9255 to be able to catch these changes and dirty state later.
2017-04-03 17:04:58 +02:00
Henrik Rydgård
73d762f506
Reorganize raster state mapping
2017-04-03 16:37:11 +02:00
Henrik Rydgard
cffb1d7014
Reorganize depth-stencil
2017-04-03 16:37:11 +02:00
Henrik Rydgard
d581a96d79
All backends: Reorganize blend state mapping to make dirty-tracking easier
2017-04-03 16:37:08 +02:00
Henrik Rydgard
700e533622
Minor D3D9 cleanups
2017-03-02 12:29:23 +01:00
Henrik Rydgard
e83dd2b524
Minor cleanup, elimintate some bind ordering hazards that D3D11 warns about
2017-02-17 14:31:02 +01:00
Henrik Rydgard
08d173ceee
Unify ApplyShaderBlending
2017-02-17 12:21:27 +01:00
Henrik Rydgard
41f770d815
Move dx_state into gfx/d3d9_state
2017-02-05 20:54:24 +01:00
Henrik Rydgard
ba52ba8714
Move global.cpp to native/gfx/d3d9_shader.cpp
2017-02-05 20:50:17 +01:00
Henrik Rydgard
f00f7d2fb8
Remove some dependencies on the pD3DDevice globals
2017-02-05 20:36:00 +01:00
Henrik Rydgard
e4cb44c243
Merge the texture flags into the dirty flags
2017-01-24 18:12:20 +01:00
Henrik Rydgard
c289a2c7bf
Split TextureChanged into two bools, so we can later convert to dirtyflags
2017-01-24 18:12:20 +01:00
Henrik Rydgard
b423998c36
Move uniform dirty-flag to gstate_c, opening up for other uses.
2017-01-24 18:12:20 +01:00
Henrik Rydgård
674937a520
Extend some enums with potentially useful values
2016-12-27 11:59:12 +01:00
Unknown W. Brackets
26809c1d7a
Determine alpha test texture after texture.
...
Because, of course, this reads texture alpha parameters for blending
optimizations.
Fixes #8970 .
2016-09-11 11:05:04 -07:00
Henrik Rydgard
e611915a52
Rename some GPU classes and enums to fix some consistency issues between the backends.
2016-04-10 10:21:48 +02: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
Henrik Rydgard
fadb19acc6
Remove a very minor difference between the backends in state mapping
2015-11-14 09:56:36 +01: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
df94914a63
D3D: No need to convert blendcolor to float and back
...
Fix bug with constantAlpha
Remove misleading comment, thanks unknown
2015-11-12 18:11:23 +01:00
Henrik Rydgard
bcd452179f
Switch D3D over to use ConvertBlendState
2015-11-12 18:11:21 +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
5a8e86e8ba
Don't mess with vpDepth in through mode. Fixes glitches in Wipeout Pulse.
2015-11-09 21:57:48 +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
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
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
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
Henrik Rydgard
838e53f482
Delete disabled code to use built-in alpha test on DX9.
2015-10-25 01:26:38 +02:00
Unknown W. Brackets
62de281e35
Use texture UV range to optimize framebuf copies.
2015-09-13 11:34:52 -07:00
Unknown W. Brackets
52c3fc221b
Also split DirectX9's texture cache.
2015-09-13 09:36:17 -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
08b340f423
More D3D hackery: Take inverted Z in proj matrix into account.
...
Also, *2 breaks it for no good reason so don't do that.
2015-08-30 22:45:24 +02:00
Henrik Rydgard
488c62e534
This makes slightly more sense than the last commit.
2015-08-29 20:38:19 +02:00
Henrik Rydgard
7b0a31ade5
Adjust D3D depth calculations to get them to match OpenGL as close as I can get it.
2015-08-29 17:43:09 +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