1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00
Commit Graph

192 Commits

Author SHA1 Message Date
Sergey Lipskiy
09a5b414c4 Remove FBOTextureFormats usage 2017-01-16 20:56:01 +07:00
Sergey Lipskiy
43e8aef6ea Remove old-style code. 2017-01-09 11:21:06 +07:00
Sergey Lipskiy
c39b639d7c Remove unused shaders related files. 2017-01-08 20:31:38 +07:00
Sergey Lipskiy
dcf1065957 Add textureIndices parameters 2017-01-08 17:49:47 +07:00
Sergey Lipskiy
daf6646b97 BufferManipulationObjects 2: createRenderbuffer, initRenderbuffer 2017-01-02 22:40:41 +07:00
Sergey Lipskiy
cf5e9d8ed2 BufferManipulationObjects WIP 2017-01-02 21:00:49 +07:00
Sergey Lipskiy
7fdf97cf29 Use gfxContext in FrameBuffer 2017-01-02 00:09:19 +07:00
Sergey Lipskiy
3eb11aac82 setTextureParameters WIP 2017-01-01 21:59:54 +07:00
Sergey Lipskiy
737442b1eb Correct depth buffer clear for aux buffers.
Fixed regression in NFL Quarterback Club 98
2016-12-08 23:29:08 +07:00
purplemarshmallow
d43148bc9e add hack for framebuffer emulation in Pokemon Snap 2016-11-30 22:00:58 +07:00
Sergey Lipskiy
807622f7bf Fix image jitter in interlaced mode.
Fixed regression caused by commit f2b9883
2016-11-30 20:47:32 +07:00
Sergey Lipskiy
b32d8020bb Add black column in output as solution for "Last column problem." #1246 2016-11-24 14:38:02 +07:00
Francisco Zurita
20e4f972aa Use glTexStorage2D for textures being attached to FBOs
But only for GLES 3.0 and 3.1, with OpenGL it causes issues for older
versions.
2016-11-23 00:23:19 -05:00
Francisco Zurita
b3b8eeb83e Use configured FBO texture formats in more places. 2016-11-23 00:14:15 -05:00
Logan McNaughton
ad77e3db52 Remove some GLES3_1 ifdefs 2016-11-22 12:59:15 +07:00
Sergey Lipskiy
f2b9883681 Correct only dstY0 for lower field.
Fixed image jitter in topgear hyperbike
2016-11-20 19:24:34 +07:00
Sergey Lipskiy
1f5bde610a Another correction for Xoffset
Fixed topgear hyperbike heavily flickering (regression) #1240

Hyper Bike has *REG.VI_WIDTH == 1152
ColorImage.width == VI.width == 576
addrOffset is multiple of ColorImage.width,
so addrOffset % (*REG.VI_WIDTH) can be equal to ColorImage.width
and image shifted out of screen.
2016-11-20 19:22:31 +07:00
Sergey Lipskiy
be6179cbcc Revert 263ddf4 because it does not work properly on old PC cards. 2016-11-14 20:45:32 +07:00
Francisco Zurita
16262e52ad Fix some differences between GLES2 and GLES3 code. 2016-11-14 14:01:43 +07:00
Sergey Lipskiy
263ddf4baa Use glTexStorage2DMultisample instead of glTexImage2DMultisample for OpenGL.
The same code with GLES3X.
2016-11-13 11:42:14 +07:00
Francisco Zurita
7ca4d0430b Workaround for devices where glBlitFrameBuffer produces output upside
down.
2016-11-04 20:27:55 +07:00
Francisco Zurita
478344ab5f Fix some issues with multisampling which were causing GL errors 2016-11-04 20:05:23 +07:00
Sergey Lipskiy
1d87a92c72 Do not use frame buffer as texture if the buffer is just allocated.
Fixed tripleplay2000: black background in game #346

Problem: The game allocates auxiliary buffer with the same width
as the main one. Plugin detects it as main buffer and set its width
and height as of main buffer. Actual buffer height is half of main
buffer height, but it became known only when game switches to the
main buffer. Wrong buffer height leads to wrong calculation of
buffer address space. Game uses textures with addresses behind
the actual buffer’s address space but within calculated one.
Plugin tries to use buffer texture instead and, as the result,
everything is black.

Solution: The situation is bad. Plugin cannot detect that
allocated buffer is an aux one. I decided to forbid buffer usage
as texture if buffer is new. New buffer is blank, so reading from
it is strange. N64 games do lots of strange stuff, so this solution
is potentially dangerous.
2016-10-29 23:46:39 +07:00
Francisco Zurita
df366f0f6b Fix verious GL errors in GLES 3.1 mode and Mario tennis. 2016-10-29 19:50:44 +07:00
Sergey Lipskiy
57dbfb5145 Revert changes in FrameBuffer::getTexture made by commit 6942083
These changes are incorrect and cause regression in Paper Mario fortune teller.
2016-10-25 12:27:49 +07:00
Sergey Lipskiy
85a5ae8ea1 Implement performance counter.
Implement drawing performance info on screen.
2016-10-08 14:53:33 +07:00
Sergey Lipskiy
aab6726117 Implement crop image feature. 2016-10-08 14:53:21 +07:00
Sergey Lipskiy
ce5abcb21b Correct FrameBuffer::isValid - do not update m_validityChecked when isValid called from VI_UpdateScreen
Fixed Broken Pokemon stadium 2 in-game portraits #1149
2016-10-05 15:39:41 +07:00
Sergey Lipskiy
ff55e5bea9 Apply scissor to all input coordinates in FrameBufferList::fillRDRAM.
Fixed Super Smash Bros Intro not playing with Framebuffer Emulation enabled #1154
2016-10-04 21:22:20 +07:00
Sergey Lipskiy
6942083612 Disable FrameBuffer::_getSubTexture for GLES2 because GLES2 implementation of OGLRender::copyTexturedRect can't be safely used here. 2016-09-29 19:58:56 +07:00
Sergey Lipskiy
39da91bb93 Move gDPFillRDRAM to FrameBufferList::fillRDRAM
Correct FrameBuffer::isValid()
Code cleanup.

Fixed Mickey Speedway USA is broken again. #1132
2016-09-27 21:43:28 +07:00
Sergey Lipskiy
b5163ca048 Drop cfb flag when buffer changed. 2016-09-19 15:32:24 +07:00
Sergey Lipskiy
e28bebd17e Add validity check for background fb textures.
Fixed Nushi Zuri 64: fb background doesn't work anymore #1115

Problem: The game normally uses color and depth buffers.
When it needs to show rectangle with text, CPU copies current color buffer
by depth buffer address. This buffer rendered as background, text rendered over.
Plugin detects buffer usage and tries to use depth buffer as background texture.
That buffer in video memory has no color information, because data copied by CPU and contained in RDRAM.

Solution: check that found frame buffer is valid.
In this case validity check will fail because RDRAM content modified by CPU,
and background will be read from RDRAM.
2016-09-16 17:09:25 +07:00
Sergey Lipskiy
5a296525ea FrameBufferList::renderBuffer : correct condition for Xoffset. 2016-09-12 21:26:37 +07:00
Sergey Lipskiy
32172d30af Fix depth buffer clear for aux buffers. 2016-09-11 18:08:03 +07:00
Sergey Lipskiy
21ef068f2a Fix typo in FrameBuffer::getTexture 2016-09-11 15:27:59 +07:00
Sergey Lipskiy
9faeb2bfb9 Force clear depth buffer for aux buffers.
Fixed uncleaned depth buffer problem when depth buffer cleared partially via fillrect.
2016-09-08 22:29:12 +07:00
Sergey Lipskiy
d289d4c65a Correct conditions when render to depth buffer can be enabled. 2016-09-07 21:11:31 +07:00
Sergey Lipskiy
7dca7f8f4d Implement depth buffer copy for Mario Golf.
Fix Mario Golf: Animated effects render in front of course #312
2016-09-06 19:37:11 +07:00
Sergey Lipskiy
4c226bcc95 Do not show rightmost pixels in frame buffer when AA and divots elimination enabled in VI.
Problem: Some games have strange glitch, which looks like vertical line of
pixels outside of right bound of the image. Examples: JFG title screen,
both Zelda games when new game started. Software plugin has the same issue,
but when image passes VI stage, the problem disappears. Most likely
VI filters somehow eat the rightmost pixels. I suspect that it is result of
divots elimination. Thus, the fix works like this:
when divot flag is set the rightmost column of pixels is not shown.
2016-08-29 18:32:16 +07:00
Sergey Lipskiy
d80bd636e2 Emulate crazy way of shifting image horizontally, which bottom of the 9th uses.
Fixed bottom of the 9th: screen not centered #862
2016-08-28 18:22:44 +07:00
Sergey Lipskiy
3bfebd0910 Remove allocated frame buffer if its color depth is less then necessary.
Fixed Majora's Mask screen turns red #790

Problem description:
the game allocates 8bit aux frame buffer when enter to subscreen.
When screen shrink effect started, the game allocates 16bit buffer on the same address.
Since plugin already had buffer allocated, it reused that buffer. Since the buffer's
texture had only red component, whole screen turned red.

Fix: create new buffer if color depth of existing buffer is less than necessary.
2016-08-28 16:00:50 +07:00
Logan McNaughton
e0d8830b2a Another fix for FBE on Raspberry Pi 2016-07-21 10:57:17 +06:00
Logan McNaughton
a20dc97a5a Fixes menu on Castlevania and Rayman 2 with FBE enabled on Raspberry Pi
Probably fixes other FBE issues as well
2016-07-11 10:05:52 +06:00
Logan McNaughton
f2babed36d Fix some more graphical glitches with FBE on the Raspberry Pi
See https://github.com/RetroPie/RetroPie-Setup/pull/1563
2016-07-08 16:42:22 +06:00
Logan McNaughton
1cbbea8183 Enable Framebuffer Emulation on the Raspberry Pi
renderbuffer code was written by gonetz, not me
2016-06-26 17:40:14 +06:00
Sergey Lipskiy
07854d3857 Use OGLRender::copyTexturedRect in ColorBufferToRDRAM::_prepareCopy.
Enable color buffer copy for GLES2.
2016-06-23 16:15:27 +06:00
Sergey Lipskiy
7ad11627d6 Use OGLRender::copyTexturedRect in FrameBuffer::renderBuffer
Remove GLES2-specific code.
2016-06-23 16:14:04 +06:00
Sergey Lipskiy
4cb53d9675 Use OGLRender::copyTexturedRect in FrameBuffer::_getSubTexture
Remove GLES2-specific code.
2016-06-23 16:12:50 +06:00
Sergey Lipskiy
4c4b1bf57d Code refactor: move struct FBOTextureFormats to separate files. 2016-06-20 15:16:15 +06:00