Sergey Lipskiy
646a88139c
Fixing FBInfo build on gcc (5.2.1)
...
There was a conflict between signed and unsigned types to std::min.
Explicitly setting the literal as unsigned keeps all math as unsigned,
which I think is the best case here (assuming that 1 + y0 - y1 will never
be negative).
Also adding std:: prefix to make it clearer where these functions come from.
2016-02-27 10:52:02 +06:00
Sergey Lipskiy
148349a00a
Fix FrameBufferToRDRAM::_prepareCopy
...
Wrong buffer could be used when several buffers copied per frame
2016-02-27 10:52:01 +06:00
Sergey Lipskiy
0b12d3b26e
Correct height calculation on buffer copy.
2016-02-27 10:52:00 +06:00
Sergey Lipskiy
dde54b238f
Fix mistakes in buffer copy.
2016-02-27 10:52:00 +06:00
Sergey Lipskiy
53e638bf47
Increase _numPixels if chunkStart is not even.
2016-02-27 10:51:59 +06:00
Sergey Lipskiy
1e376d641b
Fix usage of FrameBufferToRDRAM::m_frameCount
2016-02-27 10:51:59 +06:00
Sergey Lipskiy
b9ee15bfb6
FrameBufferInfo API extension. Initial dummy implementation.
2016-02-27 10:51:56 +06:00
Sergey Lipskiy
5d8ea5dda1
Implement partial buffer copy.
2016-02-27 10:51:56 +06:00
gonetz
a9d1df5694
Move gamma correction to post processor.
2016-01-16 19:48:19 +06:00
gonetz
330603e2b6
PostProcessor refactor: - rename process() to doBlur(). - move Blur() init and destroy to separate functions.
2016-01-16 19:48:18 +06:00
Sergey Lipskiy
da36e88862
Merge pull request #828 from purplemarshmallow/24
...
remove Lego racers hack
2016-01-12 15:00:27 +05:00
purplemarshmallow
ca6d6c720f
remove Lego racers hack
...
it's no longer needed because of commit
1466e162f3
2016-01-02 13:42:50 +01:00
purplemarshmallow
f49258e86a
typo fix
2015-12-14 19:27:53 +01:00
purplemarshmallow
84611502c6
copy only modified pixels to RDRAM
...
0 is used as test color. If pixels are 0 they are not copied. This fixes
the crash in Donkey Kong 64 (E) issue #355
2015-11-19 22:46:08 +06:00
purplemarshmallow
2b95cc4037
fix copying 32bit framebuffers to RDRAM
...
this fixes issue #348
2015-11-17 16:59:12 +06:00
Sergey Lipskiy
93f659c8af
Correct _cutHeight() function.
...
Fixed detectCFB causes crash in Pokemon Stadium 2 #548
2015-11-15 15:26:03 +06:00
purplemarshmallow
142ad0bc3c
code refactoring to support async buffer reads
...
Copy of color buffers is now always done in gDPFullSync. There are no
known disadvantages only advantages. Quake 2 will run faster
2015-11-09 21:54:07 +06:00
purplemarshmallow
dc3da06a68
as suggested by gonetz buffers are now also copied after the buffer changed in SetColorImage command
...
now the copy auxiliary option also works if a buffer is used in the
current frame
2015-11-09 21:35:11 +06:00
purplemarshmallow
15611a7731
Copy auxiliary buffers at fullsync
...
Do not use fingerprint
2015-11-09 21:33:13 +06:00
purplemarshmallow
a8aebe4936
auxiliary buffers are rendered in native resulution if copyAuxiliary option is enabled
...
This improves quality. No more need to scale down
2015-11-09 21:24:22 +06:00
purplemarshmallow
d8bc38e26d
make CopyToRDRAM compatible with auxiliary buffers
2015-11-09 21:14:24 +06:00
purplemarshmallow
c661ace24e
Replace RSP.DList by OGLVideo::getBuffersSwapCount()
...
RSP.DList does not count the dlists, it counts the buffer swaps.
Thus it is replaced by counter in OGLVideo.
2015-10-17 21:20:50 +06:00
Sergey Lipskiy
0afa5c4c57
Merge pull request #755 from lioncash/framebuffer
...
Framebuffer/DepthBuffer: Minor initializer list changes
2015-10-11 22:25:25 +06:00
Lioncash
b6c18d2565
FrameBuffer/DepthBuffer: Add missing class members to constructor initializer lists
2015-10-10 14:05:18 -04:00
Lioncash
41a9969087
FrameBuffer: Correct initialization list order
2015-10-10 12:34:23 -04:00
Sergey Lipskiy
2483f03159
Add CopyToRDRAM modes to Config: disable, sync, async.
...
copyToRDRAM option can take 'async' value.
copyDepthToRDRAM is still sync mode only.
2015-10-09 23:08:21 +06:00
Sergey Lipskiy
23de60b500
Re-implement async color buffer read.
...
Color buffer read in async mode is 7 times faster than sync read on my video card.
2015-10-09 23:06:06 +06:00
Sergey Lipskiy
3bd24d34a1
Disable FBO draw when current buffer set to NULL.
2015-09-27 10:54:11 +06:00
Sergey Lipskiy
24885907d8
Add hack_ZeldaCamera to fix camera in Zelda MM, #577
...
The game copies current frame buffer to the area, which initially allocated for depth buffer.
Game read camera data from that area, not from normal frame buffer.
That's why 'copy color buffer to RDRAM' option does not help there.
Special code needed to process that. Looks ugly, but works.
2015-09-27 10:10:05 +06:00
Sergey Lipskiy
1fb78594c8
Fix buffer end address calculation in FrameBuffer::reinit.
...
Fixed regression in Pokemon Stadium 2: the bottom of the portraits is cut off, see #415
2015-09-25 12:21:20 +06:00
Sergey Lipskiy
a73b8dddbd
Fix bug in FrameBufferList::saveBuffer :
...
corrent end address for auxiliary buffer only if it was not corrected by correctHeight().
2015-09-20 20:28:05 +06:00
Sergey Lipskiy
702a0d8203
Correct FrameBufferList::saveBuffer :
...
disable draw to FBO if new buffer can't be saved because of wrong buffer size
2015-09-20 20:12:52 +06:00
Sergey Lipskiy
6ad1d1d3a5
Correct FrameBufferList::correctHeight() :
...
do not change buffer if new buffer height is the same as the current one.
2015-09-20 20:09:59 +06:00
Sergey Lipskiy
22a1e6a39f
Revert "Correct frame buffer end address calculation in FrameBufferList::saveBuffer."
...
Seems to be not needed anymore.
This reverts commit bb6a9b3549
.
2015-09-20 20:02:22 +06:00
Sergey Lipskiy
3d6a897c97
Fix GL error when CopyToRDRAM a buffer with zero width or height.
2015-09-20 15:31:39 +06:00
purplemarshmallow
f487225b48
Optimize Perfect Dark framebuffer effects
...
We only check once per frame. ~100% performance boost in deep sea with
infrared vision.
2015-09-19 18:45:32 +06:00
purplemarshmallow
1fcb64ca79
Revert "Don't discard frame buffers creation when _height == 0"
...
This reverts commit de32176303
.
This commit causes regressions:
In Pokemon Stadium when starting a battle one portrait can be missing
failed assertion in framebuffer.cpp Line:580 Expression checkFBO()
2015-09-04 10:09:00 +06:00
purplemarshmallow
2847606877
Always reinit buffer after its height correction.
...
This fixes pokemons library in Pokemon Stadium 2.
2015-09-03 20:52:12 +06:00
purplemarshmallow
8e096a8db9
remove fill RDRAM functionality
...
fix m_fingerprint usage
fix code formatting
2015-08-27 19:43:00 +06:00
Sergey Lipskiy
5eddea5baf
Add workaround for Adreno issue with glBlitFramebuffer.
...
Thanks fzurita for problem investigation and found solution.
2015-08-27 19:20:26 +06:00
purplemarshmallow
de32176303
Don't discard frame buffers creation when _height == 0
2015-08-26 20:43:09 +06:00
purplemarshmallow
97468d8e2a
enable validity checking if copyFromRDRAM option is on
2015-08-26 19:42:43 +06:00
Sergey Lipskiy
57e88cb800
Remove unused code. Fix code formatting.
2015-08-17 21:57:01 +06:00
purplemarshmallow
8463c0347f
fix regression in Mario Tennis
2015-08-17 21:57:00 +06:00
purplemarshmallow
0735bd0372
modify fingerprint validity checking method
...
In Zelda OOT the CPU applies a filter on the framebuffer texture. If we
write a small amount of data at the beginning the CPU won't change our
specific values
2015-08-17 21:56:59 +06:00
purplemarshmallow
e0face5f86
use unique values as fingerprint
...
this works much better
But sometimes Zelda writes values not only under but also over the
fingerprint, Link's model is lost again
2015-08-17 21:56:58 +06:00
purplemarshmallow
e617177958
fix problem with validity ckecking in Zelda OOT
...
problem: the game writes data below our fingerprint
solution: just check if the fingerprint is still there and ignore the
data below
2015-08-17 21:56:58 +06:00
Sergey Lipskiy
cbbd5d17de
Fix crash when fb emulation enabled/disabled during gameplay, issue #601
2015-07-23 21:55:30 +06:00
Gillou68310
40da41d953
Fix framebuffer texture rectangle coordinate in GLES2
2015-07-02 10:45:52 +06:00
Sergey Lipskiy
7936e02066
Enable hack_subscreen for GLES2.
2015-06-26 19:20:44 +06:00