Unknown W. Brackets
4ff78d3c55
d3d9: Use SSE at least for depth copies.
2016-01-31 09:00:00 -08:00
Unknown W. Brackets
623448f852
d3d9: Support blitting depth on frame switch.
...
Can be optimized more, but this makes Jeanne d'Arc work in D3D9 now. Not
sure why it didn't work before.
2016-01-30 23:47:51 -08:00
Unknown W. Brackets
e30ab95179
d3d9: Fix maxSeenV when not known.
...
And just make the code reused between both. Fixes #8478 .
2016-01-22 18:48:54 -08:00
Unknown W. Brackets
79792a3c38
d3d9: Account for half-pixel z offset.
2016-01-20 22:53:47 -08:00
Unknown W. Brackets
0443fbebd0
Add methods to download depth to PSP RAM.
2016-01-20 22:11:03 -08:00
Unknown W. Brackets
2916298695
gedbg: Add scaled 16-bit z support.
2016-01-20 22:11:02 -08:00
Unknown W. Brackets
f9970dba94
d3d9: Respect per-pixel depth rounding.
...
Using the 16-bit depth range.
2016-01-20 22:11:01 -08:00
Unknown W. Brackets
79750ed1ad
Add a config setting to control depth quality.
...
For those who want 1x PSP like behavior.
2016-01-20 22:11:00 -08:00
Unknown W. Brackets
b80c02c272
Simulate depth clamping.
...
We'll allow extra space in both directions. It's not exactly right, but
it's a fast approximation.
2016-01-19 07:12:58 -08:00
Unknown W. Brackets
0920f6c6eb
Use minz/maxz as the depth range.
...
This allows values that fall outside the viewport, but still within the
depth range, to be drawn.
2016-01-19 07:12:57 -08:00
Unknown W. Brackets
d1b3768e49
Use a common func everywhere for float depth vals.
2016-01-18 19:29:45 -08:00
Unknown W. Brackets
b40c3fd839
Use video format when uploading to framebuffers.
...
Expected to help Bounty Hound, #8392 .
2016-01-17 12:57:27 -08:00
Unknown W. Brackets
f60aef2e16
Add a more specific interface for video frames.
...
Since we know more about them. No functional change yet.
2016-01-17 12:57:26 -08:00
Unknown W. Brackets
73bcf16612
Flush before loading the CLUT.
...
In case it's what was being rendered to.
2016-01-17 12:55:48 -08:00
Henrik Rydgard
332310c2d6
Remove redundant parameters
2016-01-17 20:33:21 +01:00
Henrik Rydgard
c8b1064d20
GL Cleanup: No longer redundantly store the shader ID inside the shader objects
2016-01-17 20:33:14 +01:00
Henrik Rydgard
7e24801fc1
Specify which games need vertex depth rounding instead of which ones don't.
...
Vertex depth rounding is a not-fully-accurate hack, and most games are better off with the extra depth precision
of 24-bit Z than reducing it to a not-fully-accurate 16-bit. So let's only use it where necessary, like in Phantasy Star.
See issue #8187 .
2016-01-16 11:31:27 +01:00
Unknown W. Brackets
00b57f6a16
Correct clamped depth offset.
...
Oops, forgot to fix this when I fixed the scale. It's already for a
[-1, 1] range, and needs to be corrected for accordingly.
Fixes #8425 , other depth issues in Phantasy Star Portable 2.
2016-01-16 00:18:25 -08:00
Henrik Rydgård
d479990595
Merge pull request #8413 from hrydgard/framebuffer-remove-unused
...
Remove some unused functionality from the framebuffer managers
2016-01-10 23:47:29 +01:00
Unknown W. Brackets
c6ffed6484
gedbg: Add mechanics to grab CLUT buffer.
2016-01-10 09:25:19 -08:00
Henrik Rydgard
88ed44189d
Remove some unused functionality from the framebuffer managers
2016-01-10 14:59:27 +01:00
Unknown W. Brackets
2fc296a1fb
gedbg: Format a few more cmds.
2016-01-07 22:42:20 -08:00
Unknown W. Brackets
909d477719
Support CLUTs at an x offset.
...
Used by Kurohyo 2. Highly unlikely to be a mis-estimate within stride.
2016-01-05 00:02:58 -08:00
Unknown W. Brackets
19877144ba
Avoid redownloading CLUT when reloaded.
...
In Brave Story, the game reloads the CLUT frequently, but doesn't actually
render to the CLUT that often. It also switches between a few different
rendered CLUTs - so caching that we've downloaded is a HUGE win.
In case someone reading this message is interested, it actually renders
these CLUT tables from what appears to be a color wheel. Crazy huh?
2016-01-04 22:21:33 -08:00
Unknown W. Brackets
28a07c70c6
Explicitly download rendered cluts.
...
This avoids triggering logic that tries to get the sizing right, or
optimize frequent copies. CLUTs often get estimated wrong, so it's better
to copy just the correct range, always.
2016-01-04 21:29:03 -08:00
Unknown W. Brackets
a6c64f74d1
Cleanup download process a bit more.
2016-01-04 20:51:43 -08:00
Unknown W. Brackets
4176ee241f
Reuse more code between GPUs for download.
2016-01-04 20:40:07 -08:00
Unknown W. Brackets
36c8b043f3
d3d9: Fix CLUT4 optimization color creation.
...
Fixes #8385 .
2016-01-04 07:36:47 -08:00
Henrik Rydgård
f0812297a6
Merge pull request #8376 from unknownbrackets/gpu-depth
...
Correct universally for clamped depth range
2016-01-04 09:55:02 +01:00
Unknown W. Brackets
6cc69ed25f
Factor out texture shader application.
...
This allows it to be reused between depal and indexed textures (second not
implemented yet.)
2016-01-03 23:50:49 -08:00
Unknown W. Brackets
14b350a5fe
d3d9: Fix render-to-texture not working.
...
Broken by a copy/paste mistake in #7870 form OpenGL.
2016-01-03 23:44:43 -08:00
Unknown W. Brackets
e427d09628
Determine scaleFactor once per frame.
...
This way, for auto, we can properly treat it like scaleFactor = 1 when the
resolution is small.
2016-01-03 23:06:15 -08:00
Unknown W. Brackets
7e54368998
Correct depth offset when clamped.
...
Of course, the scale is already half, so we just need to double for d3d9,
and not double for OpenGL of course.
Our offset is already in [0, 1] so we keep it.
2016-01-03 19:59:35 -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
18cdf9f352
Remove the depth range hack.
...
Ths removes the game-specific hack to workaround depth issues.
2016-01-03 12:05:59 -08:00
Unknown W. Brackets
2494176919
Remove incorrect CLUT4 optimization.
2016-01-02 13:20:30 -08:00
gmvbif
f8f7dadba4
Delete fields from FrameBufferDX9 with the same names as in the FrameBufferCommon
2016-01-02 09:40:47 +03:00
Henrik Rydgård
8be22f47cd
Merge pull request #8348 from unknownbrackets/texcache
...
Centralize code in the texture cache, minor cleanups
2016-01-01 17:55:41 +01:00
Henrik Rydgård
614eff1931
Merge pull request #8349 from unknownbrackets/d3d9-minor
...
Fix some Direct3D 9 validation errors
2016-01-01 11:14:23 +01: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
69daa75228
Move more common code around in texcache.
2015-12-31 11:41:02 -08:00
Unknown W. Brackets
41b00a9cab
d3d9: Initialize viewport without errors.
2015-12-31 11:17:24 -08:00
Unknown W. Brackets
b556472303
d3d9: Fix blitting coordinates.
2015-12-31 11:17:19 -08:00
Unknown W. Brackets
235881af1f
d3d9: Avoid error when clearing temp FBOs.
2015-12-31 11:17:12 -08:00
Unknown W. Brackets
a45f05c598
Move NotifyFramebuffer and LoadClut to common code.
2015-12-31 11:13:39 -08:00
Henrik Rydgård
337f27d0d9
Merge pull request #8340 from unknownbrackets/texcache
...
Be forgiving when maxSeenV increases
2015-12-31 09:43:18 +01:00
Unknown W. Brackets
5806df07b4
Handle disabled display cleanly.
...
Otherwise we might accidentally match a vfb at 0.
Fixes #6317 .
2015-12-30 17:44:32 -08:00
Unknown W. Brackets
7a864f5aa1
Be forgiving when maxSeenV increases.
...
This still allows us to optimize < 512 heights, but at the same time,
doesn't hit spritesheets as hard and avoids the scaling penalty.
2015-12-30 17:15:50 -08:00
Unknown W. Brackets
d18164bd4d
d3d9: Clean up some scaling handling.
2015-12-30 16:54:25 -08:00
Unknown W. Brackets
941988cde4
Correct prescale issues with render-to-texture.
...
Still need to apply the scaling of the texture coordinates here (or
somewhere, maybe we prescale that as well? Except it's figured later on
in the process...)
2015-12-20 21:13:43 -08:00
Henrik Rydgard
01669cbd92
Hide the "Internal resolution" etc static display unless FPS counter is on.
...
Seems fairly related and I don't want to add more options.
2015-11-27 00:17:14 +01:00
Unknown W. Brackets
1339f6b1f3
Report formats on usage of rendered clut.
2015-11-26 14:31:46 -08:00
Unknown W. Brackets
3965cba187
Disable clut render for now as a "slow effect".
...
Also, add reporting.
2015-11-26 13:42:18 -08:00
Unknown W. Brackets
8e2557bafe
Support render-to-clut, at least in some cases.
...
This is pretty much only tested with Brave Story. See #6754 .
There may be other cases which are not handled yet.
2015-11-26 13:31:17 -08:00
Unknown W. Brackets
c22953a4b9
Treat invalid blend factors as fixed consistently.
2015-11-19 06:48:06 -08:00
Henrik Rydgard
e3d2c65ba0
D3D fixes
2015-11-18 12:25:54 +01:00
Henrik Rydgård
5b21c1aa39
Merge pull request #8174 from hrydgard/remove-option-depthrangehack
...
Remove the depth range hack option, turning it into an ugly game specific compatibility hack.
2015-11-15 23:05:20 +01:00
Henrik Rydgard
4b360a571c
Remove the depth range hack option, turning it into an ugly game specific compatibility hack.
...
I hate doing this, but it's not really better off as an option.
See #8171
2015-11-15 23:00:25 +01:00
Unknown W. Brackets
bf7f07f918
Optimize inverse blending modes, where possible.
...
Also, take advantage of cases where we can double src and src.a in the
shader, which can in some cases get us closer to accurate.
2015-11-14 12:37:32 -08:00
Henrik Rydgard
3acdd4e237
We had two global types called FBO, which is not ok. Fix that.
...
This caused some very strange behaviour in the MSVC debugger when looking at this stuff.
2015-11-14 13:24:51 +01: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
Unknown W. Brackets
3b98229c6f
Correct texture preview in D3D9, oops.
2015-11-13 23:10:30 -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
Henrik Rydgard
e6b39d65d3
Apply unknown's workaround for dx viewport issues - additionally, we shouldn't even have to call the function in non-buffered..
2015-11-12 15:26:06 +01:00
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
Henrik Rydgard
d822cbf60b
Move fbo.cpp/h from native into PPSSPP
2015-09-06 13:13:37 +02:00
Henrik Rydgard
72ae497350
Remove glstate usage except in the GPU implementation. Prepare for moving it into PPSSPP.
2015-09-06 12:42:15 +02:00
Henrik Rydgard
186d624ef3
Cleanup of FBO+blit flags. Requires the change in native to stop lying.
2015-09-05 22:40:45 +02:00
Henrik Rydgard
86a02fed61
Minor cleanup
2015-09-05 19:42:58 +02: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
76eacf32f4
Change the offset to 0.0
2015-08-27 18:02:45 +02:00
Henrik Rydgard
2b7d08e3af
Also apply the GT fix in D3D, doh
2015-08-27 18:01:00 +02:00
Henrik Rydgard
bf6aef44cd
Oops, didn't finish the D3D code
2015-08-26 17:45:21 +02:00
Henrik Rydgard
d89da71057
Get rid of a division in the vertex shader by precomputing the inverse.
2015-08-26 17:40:06 +02:00
Henrik Rydgard
44ce0c8dee
Implement vertex shader depth rounding in DX9
2015-08-26 16:07:40 +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
454a363876
Reorganize all the gstate fetching in FramebufferCommon to one place
2015-08-05 11:36:02 +02:00
Henrik Rydgard
d26b74d4d6
GPU refactor: Move accesses to gstate out of leaf functions
2015-08-05 01:03:49 +02:00
Henrik Rydgard
1c68069083
refactor: Get rid of gstate from depalshadercache
2015-07-29 14:28:51 +02:00
Henrik Rydgard
b5f7d9346f
Minor cleanups in GPU
2015-07-29 13:08:02 +02:00
Henrik Rydgard
c8fe0b2690
Minor simplification, buildfixes
2015-07-29 12:38:31 +02:00
Henrik Rydgard
2430c283a5
More GPU cleaning, removing uses of GPUState.h where not needed.
...
Want to get rid of direct accesses to GPUState in modules that may be reused in
my future next-gen backends, that will reformat display lists into command lists that will
then be optimized and executed, out of sync with the real GPUState.
Candidate modules that may be reused in full are Framebuffer and Depal, possibly TextureCache to some degree.
2015-07-29 12:37:49 +02:00
Henrik Rydgard
38a31fbd8b
Get rid of more uses of gstate from SplineCommon
2015-07-29 12:04:52 +02:00
Henrik Rydgard
53f062b7b2
refactor: Remove some uses of gstate from SplineCommon and a fex texcache functions
2015-07-29 11:40:45 +02:00
Henrik Rydgard
e857bd9a1c
Minor code simplification in texcache
2015-07-29 10:59:02 +02:00
Henrik Rydgård
6fee2b456c
GPU classes: Replace "virtual" with "override" for free function type checking
2015-07-25 14:23:02 +02:00
Unknown W. Brackets
7f8cf7f800
arm64: Use XXH64 for vertex hashing, etc.
...
Based on benchmarks, it performs better than XXH32 on an A57.
2015-07-22 21:38:01 -07:00
Unknown W. Brackets
a5cfd1a319
Oops, typo.
2015-06-21 19:58:42 -07:00
Unknown W. Brackets
2013034bd6
d3d9: Log better when offscreen surface fails.
...
We're getting reporting that this is happening.
2015-06-21 12:50:02 -07:00
Henrik Rydgård
43744b0239
Merge pull request #7741 from hrydgard/frame-profiler
...
Frame profiler overlay
2015-05-26 00:42:01 +02:00
Henrik Rydgard
0b2a1dfe53
Profile a few more scopes
2015-05-26 00:39:27 +02:00
Unknown W. Brackets
4110a24d8f
Fix Direct3D9 framebuffer upload conversion funcs.
...
All of the 16 bit formats were, afaict, wrong in different ways.
2015-05-25 10:47:37 -07:00
Unknown W. Brackets
c75010931c
Use SSE in CheckAlpha scanning.
2015-05-24 22:55:43 -07:00
Henrik Rydgård
83182a0469
Merge pull request #7739 from hrydgard/screen-rotation
...
Implement basic screen rotation as requested in #297
2015-05-18 16:31:19 +02:00
Unknown W. Brackets
7d2507e0cc
d3d9: Also track bone matrices for morph here.
2015-05-16 21:54:07 -07:00
Henrik Rydgard
95b6b50fd5
Disable screen rotation in non-buffered rendering (as it won't worK)
2015-05-12 22:44:18 +02:00
Henrik Rydgard
3f7830743a
Implement basic screen rotation as requested in #297 . Does not work correctly in non-buffered rendering yet.
2015-05-12 21:01:15 +02:00
Henrik Rydgard
5d0d67140f
Reverse Y when checking for rotated rects in Direct3D 9. Fixes #7738 .
2015-05-12 20:01:04 +02:00
Unknown W. Brackets
4fa50a9a50
Reduce clut allocation size a bit.
...
Really think this probably should only be 1024 bytes, but need to work out
some more details before shrinking all the way.
2015-04-26 00:50:47 -07:00
Unknown W. Brackets
ab67c49ae9
Make sure we don't hash outside max bytes.
...
If we've never even loaded that much, play it safe.
2015-04-26 00:43:36 -07:00
Unknown W. Brackets
6e50a0b274
Allow depal palette entries to repeat.
...
This is what happens if the base is 0x10 in 8888 mode (means | 0x100.)
2015-04-26 00:36:08 -07:00
Unknown W. Brackets
c8fc9b0bf3
Cleanup some incorrect handling of clut offset.
2015-04-26 00:31:00 -07:00
Henrik Rydgård
a4a10588ed
Merge pull request #7697 from unknownbrackets/texcache
...
Include texture size in the cache key
2015-04-20 00:08:44 +02:00
Henrik Rydgård
e979b3a6ce
Merge pull request #7696 from unknownbrackets/texcache2
...
Unswizzle when reading from the swizzled mirror
2015-04-19 10:27:29 +02:00
Unknown W. Brackets
2e4d20883f
d3d9: Reset viewport when clearing framebuf.
2015-04-18 17:40:21 -07:00
Unknown W. Brackets
eb98d89fc9
d3d9: clear alpha on switch from 565 buffer.
...
For parity with OpenGL.
2015-04-18 17:39:18 -07:00
Unknown W. Brackets
b12a595325
d3d9: Make sure to clear alpha to zero.
2015-04-18 17:39:18 -07:00
Unknown W. Brackets
b726a414d7
Log a reason when invalidating textures.
...
Makes debugging easier.
2015-04-18 12:42:13 -07:00
Unknown W. Brackets
58563324bd
Include texture size in cache key.
...
This makes Tales of Destiny 2's towns significantly faster. It may
however cause us to keep textures around for longer - but we still account
for them in our metrics and invalidation.
2015-04-18 12:42:13 -07:00
Unknown W. Brackets
ce9f404bef
Unswizzle when reading from the swizzled mirror.
2015-04-18 12:39:04 -07:00
Unknown W. Brackets
1e8f2c2630
Allow clut load outside valid mem, fill with zero.
...
And only for the parts outside memory.
2015-04-12 22:38:17 -07:00
Henrik Rydgard
a19ea78b4b
Consolidate the texture scaler code.
2015-04-08 22:52:49 +02:00
Henrik Rydgard
6660985210
Extract a bunch more color conversion loops.
2015-04-08 22:52:48 +02:00
Henrik Rydgard
b5acf15cc9
Extract some explicit loops into calls to color conversion functions.
2015-04-08 22:52:48 +02:00
Henrik Rydgard
c2cf2bd97e
Move some more color conversion functions to ColorConv
2015-04-08 22:52:47 +02:00
Henrik Rydgard
31961eace9
Color conv attempt 2. Start consolidating simple color conversion functions in a single header+cpp.
2015-04-08 22:52:46 +02:00
Henrik Rydgård
a67f009679
Merge pull request #7668 from hrydgard/consolidate-spline
...
Consolidate spline code
2015-04-08 22:20:55 +02:00
Henrik Rydgard
058499e5bf
De-dupe the spline code
2015-04-08 21:44:54 +02:00
Henrik Rydgard
2002576e9d
DrawEngineCommon: Make it possible to call Flush from shared code.
2015-04-08 21:37:54 +02:00
Henrik Rydgard
ed8a3eaf6d
Move the vertex decoder cache into DrawEngineCommon
2015-04-08 21:35:00 +02:00
Unknown W. Brackets
08032e4b14
Fix a leak in an error condition.
2015-04-08 11:58:00 -07:00
Unknown W. Brackets
10626e356d
Avoid a potential divide by zero.
2015-04-08 11:57:59 -07:00
Unknown W. Brackets
2450724be2
Make Memory::Memcpy() execute memchecks directly.
...
This makes it easier to handle breakpoints in HLE.
2015-04-05 18:09:20 -07:00
sum2012
3549705195
Use better solution from @Bigpet
2015-03-23 20:29:51 +08:00
sum2012
433347e3b6
GPU:Do not "decimate" the usageFlags.
...
Fix #7625
2015-03-23 07:25:44 +08:00
Unknown W. Brackets
7ee9112425
Avoid constant reload of frequently changed tex.
...
If we detect that it's frequently changing, this will cause it to spiral
into an infinite loop of staying frequently changing and reloading to try
to scale.
2015-03-15 09:10:09 -07:00
Henrik Rydgård
085ecc0a64
Merge pull request #7591 from unknownbrackets/gpu-framebuf
...
Better glInvalidateFramebuffer usage, track usage flags better
2015-03-15 11:18:30 +01:00
Unknown W. Brackets
6b26e1a591
Read pending vertex data before exiting gpu loop.
...
Fixes save pictures in Crimson Gem Saga.
2015-03-14 18:11:24 -07:00
Unknown W. Brackets
d8478255d4
Invalidate temp FBOs each frame.
...
These are used for depal and render-to-self, as well as shader blending.
2015-03-14 16:02:04 -07:00
Unknown W. Brackets
7e0489c83e
Keep better track of framebuf usage flags.
2015-03-14 15:21:58 -07:00
Henrik Rydgård
9db4c5f34d
Merge pull request #7573 from unknownbrackets/gpu-minor
...
Small optimizations to software transform
2015-03-09 09:59:45 +01:00
Unknown W. Brackets
f0676b0c85
Optimize color tests against zero.
...
They seem to be somewhat common. Speeds up Tales of Phantasia X a bit.
2015-03-08 19:08:21 -07:00
Unknown W. Brackets
cf7a4ab2cf
Avoid shader id data that doesn't change shader.
...
This may reduce shader switches, or more likely at least total # of
shaders, when alpha test settings are changed but alpha test is not
enabled.
2015-03-08 18:28:59 -07:00
Unknown W. Brackets
04eb83002c
Assume lmode does nothing in throughmode.
2015-03-08 18:03:17 -07:00
Unknown W. Brackets
fb071a066d
d3d9: Change vertex attribute logic to match gles.
2015-03-08 18:01:00 -07:00
Unknown W. Brackets
83e4edbc7c
Oops, don't affect hardware transform.
2015-03-08 14:19:44 -07:00
Unknown W. Brackets
39cb74a8d3
Simplify transform in throughmode/sw (rectangles.)
...
This should make it a bit faster, a bit less work.
2015-03-08 13:12:13 -07:00
Henrik Rydgård
c0450f7f9e
Merge pull request #6920 from hrydgard/dx9-depal
...
Dx9 depal - needs debugging before merge
2015-03-01 21:04:36 +01:00
Unknown W. Brackets
d4e74e6998
d3d9: Clarify a comment.
2015-03-01 11:47:39 -08:00
Unknown W. Brackets
3bc954778c
dx9: Explicitly restore viewport after depal.
...
Otherwise, it doesn't get restored.
2015-03-01 11:28:06 -08:00
Unknown W. Brackets
bda6f0a4b8
dx9: Reset more state before depal draw.
...
Was alpha blending before.
2015-03-01 11:28:05 -08:00
Henrik Rydgard
869f74d1b0
Depal: Apply the half-pixel offset that looked the least wrong. Still not right.
2015-03-01 11:28:04 -08:00
Unknown W. Brackets
7b76f7ae60
d3d: Fix depal flipping and negative z.
2015-03-01 11:28:04 -08:00
Unknown W. Brackets
1dfecbf2b8
d3d: Actually upload the clut texture.
2015-03-01 11:27:28 -08:00
Henrik Rydgard
78190f3e8c
DX9: Hook up the depalettize code. Doesn't work yet though.
2015-03-01 11:24:45 -08:00
Henrik Rydgard
13bf0acd28
DX9: Add DepalettizeShader manager (not hooked up, so untested)
2015-03-01 11:16:56 -08:00
Unknown W. Brackets
383f894db7
d3d9: Make blending more like GL's recent changes.
2015-03-01 10:31:43 -08:00
Henrik Rydgard
69e099e615
Fix #6398 for DX9 as well
2015-03-01 16:15:13 +01:00
Henrik Rydgård
723d7c224d
Merge pull request #7449 from unknownbrackets/xbrz-update
...
Update to xBRZ 1.2, with its perf improvements
2015-03-01 12:17:15 +01:00
Unknown W. Brackets
7379d37e73
Bail on bad verts after grabbing byte increment.
2015-02-28 01:28:30 -08:00
Henrik Rydgård
d990221849
Merge pull request #7509 from unknownbrackets/gpu-minor
...
Correct full alpha for render-to-texture
2015-02-26 21:56:57 +01:00
The Dax
7104629b24
Add the Phantasy Star Portable 2 depth range hack to Direct3D9 as well.
...
It seems to work fine for me..
2015-02-23 04:42:04 -05:00
Unknown W. Brackets
abace1aa76
For render-to-tex, full alpha on 565 use only.
...
It's not how it was drawn, but how it is used... in case it changes
formats, which apparently Split/Second does. Fixes #7492 .
2015-02-21 18:08:50 -08:00
Unknown W. Brackets
0982336565
Oops, fix race in xBRZ buffer alloc.
2015-02-21 15:51:02 -08:00
The Dax
3239e27e84
Update GE_TEXMAP_ENVIRONMENT_MAP in Direct3D9 so it matches OpenGL's behaviour.
...
Improves the car colours in Outrun 2006, but like OpenGL, it's still got some areas with the wrong blue hue.
2015-02-17 02:17:24 -05:00
Henrik Rydgard
2df04bab3b
Oops, fix mistake in spline drawing
2015-01-29 16:30:52 +01:00
Henrik Rydgard
3801062f76
Oops, forgot one in D3D
2015-01-29 16:06:02 +01:00
Henrik Rydgard
033798c796
Expand spline data into a separate buffer. Prevent overflowing it by reducing the size of spline draws if necessary (but shouldn't really happen).
...
Might help #7386
2015-01-29 16:04:00 +01:00
Unknown W. Brackets
0d9e0b16dd
Fix textures leaking on game exit.
2015-01-24 20:36:01 -08:00
Luna
1c3903504b
Remove leftovers
2015-01-23 16:48:50 +01:00
Luna
ff9d33d2a7
Move the hack to FramebufferCommon.cpp and rename.
2015-01-23 10:40:49 +01:00
Luna
722d34e09a
Add Bloom Effect Smoothing hack
2015-01-23 02:08:20 +01:00
Henrik Rydgard
cae58cafee
Revert "Merge pull request #7361 from hrydgard/color-conv-centralize"
...
This reverts commit f1b57dabf5
, reversing
changes made to 41001637ce
.
2015-01-22 19:53:32 +01:00
Henrik Rydgard
9c64351578
Revert "Fix issues with scaling ARGB1555 textures in OpenGL, introduced by the recent merge"
...
This reverts commit 08eaa6e1f7
.
2015-01-22 19:52:49 +01:00
Henrik Rydgard
08eaa6e1f7
Fix issues with scaling ARGB1555 textures in OpenGL, introduced by the recent merge
2015-01-20 22:48:39 +01:00
Henrik Rydgard
7faddd6100
Consolidate the two TextureScaler copies into one.
...
Also lets us clean up ColorConv slightly.
2015-01-20 17:32:55 +01:00
Henrik Rydgard
2623a48b4a
Centralize color conversion functions in Common/ColorConv.
2015-01-20 17:32:54 +01:00
Unknown W. Brackets
d1b3dcffd8
Fix another potential divide by zero.
2015-01-19 08:45:19 -08:00
Unknown W. Brackets
0d6c002cb0
Fix a very unlikely sign extend glitch.
2015-01-19 08:41:53 -08:00
Unknown W. Brackets
ee1085b060
Oops, deleted too early.
2015-01-18 13:18:17 -08:00
Unknown W. Brackets
3fcf695159
Fix an unlikely leak on error.
2015-01-17 18:45:03 -08:00
Unknown W. Brackets
795088001c
Avoid passing a GPUstate by value.
...
Only used by Qt GE debugger thing anyway.
2015-01-17 18:21:04 -08:00
Henrik Rydgard
c2500744e1
D3D9 rectangle rendering fix (maxindex)
2015-01-15 23:58:07 +01:00
Unknown W. Brackets
d663cda2de
Transform rects using indices.
...
Not a hge difference. Minor cleanup.
2015-01-15 12:26:35 -08:00
Henrik Rydgard
df62bc42b7
D3D shader generator: Fix an issue with 4x3 vs 4x4 matrices that caused warnings to be reported (I think).
...
Make the GL code for this case (skinning without normal) more similar.
2015-01-12 20:37:33 +01:00
Henrik Rydgard
a4a95c9b4b
D3D9: Restore accidentally-commented-out blit functionality
2015-01-06 13:00:03 +01:00
Henrik Rydgard
a9b010b0cd
Add a basic debug console UI to the devmenu that shows some log scrollback and has a little command line.
...
Useful for debugging on non-Windows in the future. For now non-mobile only (although may lift that restriction later)
2015-01-05 01:25:23 +01:00
Henrik Rydgard
3d8e30e4c7
Fix #6898 - buttons could disappear in non-buffered rendering
2015-01-04 18:00:59 +01:00
Unknown W. Brackets
a2385b5840
dx9: Only use anisotropic when filter was linear.
2014-12-30 15:28:55 -08:00
Unknown W. Brackets
c37d41c88c
Assert state on first frame.
...
This won't matter much for games, but makes tests run more sanely.
2014-12-30 15:26:16 -08:00
Unknown W. Brackets
46717fa266
dx9: Correct off-by-one to the right on tex upload.
...
As seen in tests. But I'm pretty sure we're still off.
2014-12-30 15:25:40 -08:00
Unknown W. Brackets
2a1279b521
dx9: Don't force alpha to 1.
...
This was removed from GLES also. Depal ends up using this shader for
flipped blits, and it screws up alpha.
2014-12-30 13:18:36 -08:00
Henrik Rydgård
f74add91e2
Merge pull request #7202 from unknownbrackets/cpu-thread
...
Allow switching cpu thread on/off ingame
2014-12-24 19:15:51 +01:00
Henrik Rydgård
3706414454
Merge pull request #7209 from unknownbrackets/texcache
...
Avoid killing textures unless we have several mb
2014-12-22 09:42:30 +01:00
Unknown W. Brackets
d097999fad
Avoid killing textures unless we have several mb.
2014-12-21 17:00:55 -08:00
Henrik Rydgard
eaa1f0c23d
Port over the fog NaN/inf fixes from OpenGL to Direct3D. Fixes skies in Outrun and probably a few other things
2014-12-22 00:48:16 +01:00
Unknown W. Brackets
8900f17f99
dx9: Correct half-pixel offset.
...
This fixes the pixel of blank space at the top, and the gpu/commands/basic
test.
2014-12-21 10:37:35 -08:00
Unknown W. Brackets
b9e78dab9c
dx9: Small optimization to viewport scaling.
2014-12-21 10:35:04 -08:00
Unknown W. Brackets
0a6a70f53f
Allow switching cpu thread on/off ingame.
2014-12-20 17:39:42 -08:00
Unknown W. Brackets
962d8c5224
dx9: Take screenshots (fixes #7197.)
2014-12-20 08:31:56 -08:00
Unknown W. Brackets
7ce431067b
dx9: Correct framebuffer download scaling.
...
Fixes the menu background in Tales of Phantasia X.
2014-12-18 23:03:19 -08:00
Unknown W. Brackets
d0dd2cbb31
dx9: Fix a crash on textures used as RT.
...
We don't always have a texture pointer.
2014-12-18 22:51:46 -08:00