1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00
Commit Graph

528 Commits

Author SHA1 Message Date
fzurita
4a10c0a7fa Fix incorrect OpenGL function init in Linux 2019-09-30 21:48:36 -04:00
fzurita
d6ad676436 Fix EGL initialization in applications that don't implment VidExt 2019-09-30 21:48:36 -04:00
fzurita
7861d14060 Fix issue with lack of highp floating numbers in GLSL for GLES 2.0. 2019-09-30 21:48:26 -04:00
fzurita
8817e2c549 Fix logging error 2019-09-29 09:25:04 -04:00
fzurita
415e63d6d1 Fix shader compilation error in GLES 2.0 2019-09-29 16:08:44 +07:00
Sergey Lipskiy
86a227308e Implement copy depth to main depth buffer. It is necessary for correct work of some Reshade shaders. 2019-09-27 19:33:18 +07:00
Sergey Lipskiy
34c6cae364 Fix compile errors in opengl_ColorBufferReaderWithEGLImage.cpp
Fixed #2083
2019-09-05 18:53:38 +07:00
Sergey Lipskiy
10ec517fe9 Code refactor in GLInfo::init() 2019-08-31 11:05:44 +07:00
Sergey Lipskiy
c28ea61b8f Fix for texture issues in Stunt Racer, reported by DonelBueno in #1885
Stunt Racer uses combiner with two textures for track polygons, but actually loads only T0.
T1 replaced by T0 because of LOD flags in othermode.
This situation was not checked in the main code and ClampWrapMirror shader got wrong parameters,
which lead to the glitches.
2019-08-16 19:10:09 +07:00
Sergey Lipskiy
2d712f2ae0 Rewrite textures loading and mapping:
- use RiceVideo method for texture size calculation.
  RiceVideo uses the same method for texture dumping.
- rewrite texture mapping.
  Texture Clamp-Wrap-Mirror implemented in shaders.

Problem explanation:
https://github.com/gonetz/GLideN64/issues/1885#issuecomment-485136358

Fixed various glitches with HD textures, #1885
2019-06-19 19:02:52 +07:00
Francisco Zurita
c06c593eba Improve logging information 2019-04-23 11:15:41 +07:00
Sergey Lipskiy
8debfdb81c Correct GLES2 version of mip-map shader. 2019-04-22 21:45:11 +07:00
Francisco Zurita
8f26645407 Fix crash with GL_DEBUG enabled with mupen64plus API
Also, fix compiler warning
2019-04-15 09:09:39 +07:00
Francisco Zurita
92bcbe5981 Fix issues with threaded OpenGL when debug is enabled 2019-04-10 12:55:09 +07:00
fzurita
5df3f9dbac Threaded GLideN64 calls 2019-04-08 10:51:18 +07:00
Sergey Lipskiy
7f5f6256f3 Apply gamma correction to text drawer textures.
Fixed #2030 : Font rasteriser doesn't perform gamma correction

Thanks Clownacy for the idea.
2019-04-01 16:30:36 +07:00
Sergey Lipskiy
96ccfc63af Correct mip-map shader: lod could be larger than actual number of levels in mip-map texture.
Fixed mip-mapped textures in Automobili Lamborghini with 3point filtering enabled.
2019-03-03 15:17:52 +07:00
Sergey Lipskiy
3704b37c3e Fix some of PVS-Studio warnings. 2019-03-03 11:47:10 +07:00
Sergey Lipskiy
6022f510f5 Correct getStorageFileName: set user-preferred locale before using string conversion functions. 2019-02-24 12:07:13 +07:00
fzurita
b40e6f44c1 Fix shader storage with Android 4.4 2019-02-24 11:49:15 +07:00
fzurita
164b44e8e5 Fix shader compilation in GLSL 2019-02-23 15:05:06 +07:00
fzurita
9033a4d536 Fix build errors when using CMake with RPi 2019-02-19 15:18:39 +07:00
Sergey Lipskiy
9bf36d390a Implement 3-point texture filtering for mipmapped textures.
Fixed #1558 3-point texture filtering doesn't work with mipmapped textures.
2019-02-16 20:45:51 +07:00
Sergey Lipskiy
32901bf5dd Add option enableHalosRemoval for bilinear filtering. 2019-02-07 17:23:20 +07:00
fzurita
2712e8f509 Cleanup EGL image code 2019-02-05 21:48:26 +07:00
gizmo98
164b1056b3 Add bilinear filtering modes which remove halos around transparent textures
This workaround is not implemented for gles2 devices.
2019-02-05 21:09:36 +07:00
fzurita
f209304d0b Add support for Android EGL Image Public API 2019-02-05 17:30:58 +07:00
Sergey Lipskiy
2b7f78c9f8 Fix depth buffer clear when otherMode.depthCompare enabled.
Fixed 1080 Snowboarding (JU) FB off breaks games ( regression) #1976
2019-02-03 18:01:01 +07:00
Sergey Lipskiy
f787483dbb Correct condition for uEnableDepth uniform.
Fixed depth compare for particles in Indiana Jones when N64 depth compare enabled, #1977
2019-01-12 14:34:00 +07:00
Sergey Lipskiy
cb0cf5bed9 Fix depth_compare shader:
always write depth to buffer when otherMode.depthCompare flag is off.

Up shader storage version.

Fixed 2 players mode in Extreme-G XG2 (U) with N64 depth compare enabled, #1963
2018-12-18 16:04:37 +07:00
orbea
a5fc0689ac Fix performance with radeonsi.
This takes Donkey Kong 64 from 12 fps to full speed with framebuffer
emulation enabled.
2018-12-11 11:35:56 +07:00
zilmar
459fb32106 Revert OS_WINDOWS changes 2018-11-25 18:34:16 +07:00
zilmar
d50aabaa10 Stop using OS_WINDOWS 2018-11-25 18:34:16 +07:00
Sergey Lipskiy
f72553a524 Fix depth compare for texrects rendered with TexrectDrawer.
Fixed Duke Nukem 64: 2D Render Issue #1915
2018-10-21 20:19:41 +07:00
Sergey Lipskiy
217ef2557d Add ability to save content of frame buffer to file for debug purposes. 2018-10-17 15:52:52 +07:00
Sergey Lipskiy
9f1bbeab9f Rewrite primitive depth calculation.
Up shader storage version.

Fixed Star Wars Episode I - Racer: Overlapping #1911
2018-10-01 22:37:03 +07:00
Sergey Lipskiy
9f936be57e Correct condition for texture filtering: remove (gSP.objRendermode&G_OBJRM_BILERP) != 0 from the condition.
It seems that flag G_OBJRM_BILERP in objRendermode does not mean that texture will be filtered.
2018-09-30 18:03:46 +07:00
Sergey Lipskiy
5e1c8a6b58 Do not use clearDepthBuffer in FillRect. Use drawRect only. 2018-09-24 22:02:25 +07:00
Sergey Lipskiy
9705f5d520 Implement FXAA 2018-09-09 16:36:09 +07:00
Sergey Lipskiy
22267831e0 Optimize ShaderN64DepthCompare a little bit. 2018-09-06 22:54:07 +07:00
Sergey Lipskiy
9b487453a6 Correct URenderTarget::update()
Depth buffer not cleared if SetDepthImage called after Fillrect.

Fixed Ocarina of Time Link's portrait missing with N64 deph compare #1850
2018-09-06 22:54:00 +07:00
Sergey Lipskiy
62b8103e46 Support FRONT_AND_BACK culling mode.
Fixed Super Smash Brother Gfx issue on Dreamland stage #487
2018-08-24 16:16:06 +07:00
Sergey Lipskiy
3e0c635ad2 Correct mipmap shader for case when max tile is 0.
Up shader storage version.
2018-06-16 18:41:51 +07:00
Sergey Lipskiy
b9bfbf40e8 Indi Particle Optimization hack.
Add F5INDI_PARTICLE_OPT define to enable.
2018-06-16 18:41:50 +07:00
fzurita
582bfe353f Improve check for buggy fragment shader interlock
Nvidia Drivers greater than or equal to 390.00 don't seem to crash with
it.
2018-06-16 00:13:55 +07:00
gizmo98
4750e10076 Use _FIXED2FLOATCOLOR 2018-06-02 21:35:32 +07:00
Logan McNaughton
e80577e105 Allow non-0 default framebuffer 2018-05-22 08:25:24 -06:00
Logan McNaughton
44068412f4 Revert "Add the iOS framebuffer binder from @braindx"
This reverts commit ff904fc51e.
2018-05-19 16:08:07 +07:00
Logan McNaughton
6ddaba8ec5 Remove FB Attachment caching 2018-05-08 16:27:37 +07:00
Sergey Lipskiy
67f797240d Shader noise returns 0.5 when noise emulation disabled.
Fixed Paper Mario - Text from Stars is invisible #1540
2018-05-06 21:28:31 +07:00
Sergey Lipskiy
6725ad474a Fix warnings of 64bit compiler. 2018-05-06 15:54:12 +07:00
Sergey Lipskiy
10710f96ac Fix warnings from compiler and static code analizer. 2018-05-06 15:28:07 +07:00
Logan McNaughton
9bda0568a8 Copy FBO texture if glTextureBarrier is unsupported 2018-04-20 22:56:17 +07:00
Sergey Lipskiy
75ea06cec7 Code refactoring: fix issues found by static code analizer. 2018-04-19 20:16:21 +07:00
Sergey Lipskiy
f26b99a93d Add comment that _glinfo.imageTextures or _glinfo.ext_fetch
must be enabled when config.frameBufferEmulation.N64DepthCompare != 0
2018-04-19 12:13:53 +07:00
Logan McNaughton
1fe9ce3bf9 Fix BAR Fog with N64 Depth Compare 2018-04-19 12:04:39 +07:00
Logan McNaughton
6a10a83d09 Fix RE2 and NFL QB Club 98 on GLES 2018-04-16 21:38:42 +07:00
fzurita
e958eca3ed Disable usage of *_fragment_shader_interlock with tegra
It causes lockups with at least Tegra X1.
2018-04-16 20:51:55 +07:00
Logan McNaughton
c9cf91e8da Add support for ext_shader_framebuffer_fetch 2018-04-16 11:32:35 +07:00
Logan McNaughton
2e227cef53 Rewrite N64 Depth Compare 2018-04-16 11:32:35 +07:00
Logan McNaughton
c01c0d5166 use gl_LastFragDepthARM and glTextureBarrier 2018-04-13 21:24:56 +07:00
Logan McNaughton
18e9a73eba Cache SpecialFeatures check 2018-04-07 11:30:33 +07:00
Logan McNaughton
b49ee1dd8b Fix GLESX clipping hack in GraphicsDrawer 2018-04-07 11:30:33 +07:00
Logan McNaughton
9c73fb27b1 Remove Image Texture requirement for some shaders 2018-04-07 11:30:33 +07:00
Logan McNaughton
af6460ff4f Require GL_NV_shader_noperspective_interpolation for GLES depth clamp emulation 2018-04-05 20:21:19 +07:00
Joe Mattiello
9497a9b868 Add iOS system ifdefs and gles includes 2018-03-31 10:54:20 +07:00
Joe Mattiello
ff904fc51e Add the iOS framebuffer binder from @braindx 2018-03-31 10:54:20 +07:00
hissingshark
d84e11e10f Added Vero4k build flags to detect libGLESv2.so path. 2018-03-31 01:18:53 +01:00
Logan McNaughton
ee906a217c Fix GLES2 shader storage support 2018-03-30 10:15:23 +07:00
Logan McNaughton
07ec815831 Only write to gl_FragDepth once 2018-03-29 12:50:16 +07:00
Sergey Lipskiy
81d79e3938 GLideNHQ refactor: use graphics::InternalColorFormatParam as type for color format variables. 2018-03-28 12:28:05 +07:00
Logan McNaughton
50998f2f33 Use graphics backend in GLideNHQ 2018-03-27 20:52:56 +07:00
Logan McNaughton
bdb0f7ca94 Emulate GL_DEPTH_CLAMP for GLES 2018-03-23 21:52:06 +07:00
Sergey Lipskiy
cbbc83ac96 Fix noise-based effects on texrects in "texrect in native res" mode.
Fixed GLideN64 3.0 Regression (Noise) #1740
2018-03-21 23:07:40 +07:00
Logan McNaughton
2fc1b5f462 Use glDrawRangeElements 2018-03-09 20:33:15 +07:00
Logan McNaughton
958758b37a Remove PixelWriteBuffer
And a few other small fixes
2018-03-09 20:32:56 +07:00
Logan McNaughton
a611105e6d Cache glTexParameter calls 2018-03-09 20:32:34 +07:00
Logan McNaughton
91ab96d514 Fix FB attachment caching when texture is deleted 2018-03-09 20:32:34 +07:00
Logan McNaughton
b81dd6a673 Keep track of FB attachments 2018-03-09 20:32:34 +07:00
Logan McNaughton
fefc4e63a8 Use short, not byte, for element index 2018-02-28 16:55:29 +07:00
Logan McNaughton
d467327349 Reduce some debug GL calls in production
Also only check extension support at init()
2018-02-27 20:30:19 +07:00
Francisco Zurita
667b3d28ee Make some Android checks only apply to PowerVR 2018-02-26 20:15:15 +07:00
Logan McNaughton
d2d0e9aafc Allow triple buffering in async copy mode 2018-02-23 13:43:30 +07:00
Sergey Lipskiy
8cb25b1fed Add support for blend modes, which can't be emulated with shader blender.
Add a hack for blend mode 0x0150 in Tony Hawk 2: Spiderman uses the same blend mode,
but has no problems with it.
2018-02-18 20:44:11 +07:00
Francisco Zurita
05295254b6 Fix slow down on Adreno 540 GPUs. 2017-12-21 00:17:27 -05:00
Francisco Zurita
d841854023 Fix texture filter when using GLSL ES. 2017-12-20 00:29:12 -05:00
Sergey Lipskiy
509ee7ed10 Code refactor: simplify texture fetching shader parts. 2017-12-15 21:14:25 +07:00
Sergey Lipskiy
4d59d3ef28 Texrect drawer tuning: rewrite check for test color
Text looks better in Quest64 and Paper Mario.
2017-12-15 12:38:25 +07:00
Sergey Lipskiy
fa102a65c9 Do not revert Y for rects. 2017-12-15 12:38:19 +07:00
Sergey Lipskiy
a89486f6bd Fix issue with plugin freeze when emulation ended while plugin is in full screen mode.
Fixed PJ64: End emulation in Full-screen mode is broken #1680
2017-12-15 12:38:16 +07:00
Sergey Lipskiy
4cb2e7d7e8 Minor cleanup for YUVCONVERT_TEX shader 2017-12-15 12:38:13 +07:00
Sergey Lipskiy
5604bb94fa Code refactor: CombinerProgram()::getKey() returns reference instead of object
to avoid copy of the key to temp object when combiner added to combiners map.
2017-12-15 12:38:10 +07:00
Sergey Lipskiy
6a72b09b1f Move texture fetching mode logic out of shader. 2017-12-15 12:38:03 +07:00
Gillou68310
cc3e1e6302 Add support for odroid 2017-12-14 17:45:21 +01:00
Sergey Lipskiy
05aaddd600 Fix use of prim depth in shaders.
Fixed Custom Robo graphic glitch in WIP Builds 3 #1678
2017-12-09 22:48:19 +07:00
Sergey Lipskiy
3241d49ee6 Code cleanup: use the same TEX_OFFSET macro for standard and 3point filtering.
OpenGL and GLES3+ shaders.
2017-12-02 12:45:43 +07:00
Sergey Lipskiy
6845116856 Fix bilinear filtering shader for GLES2. 2017-12-02 12:45:39 +07:00
Sergey Lipskiy
37cc010e85 Add special hack for monochrome effect in Zelda games.
Fixed OOT - major graphic glitches in cutscene #1673
2017-11-28 16:32:03 +07:00
Francisco Zurita
55f2c02446 Fix rare crash in opengl_BufferedDrawer.cpp 2017-11-27 10:27:26 +07:00
Francisco Zurita
e2614529c2 Fix check for using the BufferedDrawer 2017-11-21 09:34:54 -05:00
Sergey Lipskiy
38dc7ff25f Clear fences list in olorBufferReaderWithBufferStorage::_destroyBuffers()
Fixed memory leak on graphics context destroy.
2017-11-19 19:56:05 +07:00
Sergey Lipskiy
26623cec1f Code cleanup: fix issues in GLideN64 found by static code analyser. 2017-11-18 22:07:27 +07:00
Sten Appelt
9d735212f0 Rewrite glGetProcAddress for MacOsX 2017-11-18 15:35:38 +07:00
Sergey Lipskiy
5a037474a2 Code cleanup: fix compilation warnings. 2017-11-15 15:07:52 +07:00
Sergey Lipskiy
dcdf66dc0b Fix hardware lighting. It was broken when lighting method was rewritten in 6af6e2c17f
Hardware lighting is incompatible with new lighting method.
Model matrix may be different for different vartices, but only latest state of inverted light vectors are loaded to shader.
Thus I reverted calculations of data for hardware lighting.

Minor code cleanup.

Fixed: Zelda OOT, bad lighting with HW per pixel lighting #1652
2017-11-11 21:35:08 +07:00
Sergey Lipskiy
591eda82ba Set PrimDepth to gl_FragDepth when DepthSource set to Primitive.
This makes player's shadow solid in Tony Hawk's Pro Skater 2
2017-11-11 01:30:48 +07:00
Sergey Lipskiy
3c61198043 Hardcode blend mode, which is impossible to emulate with shaders.
Fixed Tony Hawk's Pro Skater 2 Shadow Glitch #1337
2017-11-11 01:01:49 +07:00
Sergey Lipskiy
a47d9d5840 Save hardware per pixel lighting enabled flag in combiners keys storage.
Use it to set hardware lighting support in GBI.

Fixed New shader cache breaks with hardware per pixel lighting enabled #1650
2017-11-08 17:11:14 +07:00
Sergey Lipskiy
7642758873 Fix shader compilation for combiners, wich use only T1.
Fixed main menu in Paper Mario.
2017-11-07 11:22:12 +07:00
Sergey Lipskiy
b4ad1832c4 Write siplified texture read shaders for COPY mode.
Up shaders storage version.

Fixed wrong use of YUV conversion in COPY mode.
2017-11-02 17:08:33 +07:00
Sergey Lipskiy
dcf8784dca Disable hardware lighting for ucodes with custom lighting methods.
Fixed #1542 Turok 2/Turok 3 Per Pixel Lighting Rainbow Weapons.
2017-10-31 17:42:48 +07:00
Sergey Lipskiy
adc2b547e8 Implement YUV-to-RGB color space conversion. See 12.5 of programming manual
Up shader storage version.

Fixed Killer Instinct Gold: Improper Projectile Effects. #1513
2017-10-31 13:27:34 +07:00
Sergey Lipskiy
365838eddc Fixed problem with combiners shaders generation:
Parts of shaders code created on start. Some parts depend on config options.
When config changed with GUI shaders updated but code parts not updated.
Thus new shaders do not correspond to current state of config.
2017-10-29 16:49:05 +07:00
Sergey Lipskiy
7d1d3da114 Put UTextureFilterMode uniform creation to the right place. 2017-10-29 15:10:53 +07:00
Sergey Lipskiy
c5c0fbeb6f Use combiners keys when ShaderProgramBinary is not supported and shaders storage con not be created. 2017-10-28 21:48:01 +07:00
Sergey Lipskiy
f6b0f3446b Fix compilation with gcc. 2017-10-27 10:08:22 +07:00
Sergey Lipskiy
7e4271d991 Display save/load progress for combiners shaders
Display "init noise texture" message. Progress is hard to display because noise textures generated in threads.
2017-10-26 00:37:26 +07:00
Sergey Lipskiy
aba3fefe63 Implement alternative methods of combiners shaders load.
Combiners muxes saved in separate text file.
When shader cache becames invalid, list of shaders muxes used to re-create combiners.
2017-10-26 00:27:52 +07:00
Sergey Lipskiy
35cc66bad4 Code cleanup:
* make RSPInfo::busy and RSPInfo::halt boolean
* remove RSPInfo::close
* rename RSPInfo::bLLE to RSPInfo::LLE
2017-10-24 15:44:37 +07:00
Sergey Lipskiy
977fddf3ea Correct condition for Zelda monochrome buffer.
Fixed Pokemon Puzzle League: missing graphics in game (regression) #1588
2017-10-11 15:06:32 +07:00
Francisco Zurita
762def7dae Fix issues reported by Valgrind 2017-10-09 23:51:16 -04:00
Conn O'Griofa
d8ac5a761c Raspberry Pi: fix vendor library names & add override
* Use new libbrcmEGL/libbrcmGLESv2 names
* Allow RPI autodetection override via -DMESA=On (for VC4 driver)
2017-10-07 08:26:31 +01:00
gizmo98
db18139ca5 Refine fullscreen toggle logic
-Toggle m_bFullscreen if _changeWindow is executed.
-Don’t allow _resizeWindow if m_bFullscreen is true.
-_resizeWindow returns false if fullscreen is enabled.
2017-10-06 14:07:06 +07:00
clobber
a3807827c0 Simplified and complete workaround for #1601
This properly worksaround the bug with Intel drivers on the Mac, which initially broke in parts of commits d4dbe7c094 and 231463e368
2017-10-01 14:05:25 +07:00
Sergey Lipskiy
e8b03cd599 Make workaround for #1601 Intel-specific.
Fixed Blending changes broke PowerVR devices #1608
2017-09-30 18:01:26 +07:00
Sergey Lipskiy
70c540b073 Rewrite fix for #1539 : keep in tile descriptor start address of frame buffer, not pointer on it.
Should be more safe.
2017-09-29 22:25:56 +07:00
clobber
3c8689d848 ShaderBlender: cast to ivec4 where needed. Fixes #1601
This works around a bug with Intel GPU's on macOS where colors can appear wrong.
2017-09-29 14:58:40 +07:00
Sergey Lipskiy
d404dbfceb Correct UBlendMode2Cycle::update()
Fixed World Driver Championship shadows are.....grey! #1596
2017-09-27 18:21:20 +07:00
Sergey Lipskiy
ee3f4a6962 Partially revert commit 81cc0854 Fix blending when CLR_ON_CVG flag is on.
It will not work without pixel covarage calculation.

Fixed Mario Tennis (USA) - missing character selection icons (regression) #1599
Fixed Android/potential PC regression too: Conker broken FB render/lighting chunks. #1597
2017-09-27 16:19:28 +07:00
Logan
c925b8dd54 Optimize 3point shader 2017-09-26 15:20:46 -06:00
Sergey Lipskiy
1266ced083 Code cleaup: remove unused MonochromeCombiner. 2017-09-24 18:51:02 +07:00
Sergey Lipskiy
81cc0854dc Fix blending when CLR_ON_CVG flag is on.
Remove hack for Pilot Wings.
2017-09-21 23:18:35 +07:00
Sergey Lipskiy
a70bc7411b Fix glError in screenshot functions. 2017-09-21 23:18:32 +07:00
Sergey Lipskiy
231463e368 Optimize blender shaders. Thanks to Logan McNaughton aka loganmc10 and standard-two-simplex for the new code. 2017-09-21 23:18:11 +07:00
Sergey Lipskiy
da2becd57e Fix ShaderBlender1::write method. Up ShaderStorage version.
Fixed #1553 Resetting once breaks rendering via transparency of many textures.
Thanks Logan McNaughton for finding the root of the problem.
2017-09-21 21:33:08 +07:00
Sergey Lipskiy
d4dbe7c094 Correct blending when FORCE_BL flag is off. Up shader storage version.
Fixed F-Zero X wrong borders #639
2017-09-21 21:33:08 +07:00
Sergey Lipskiy
47d718f287 Add F3DFLX2 ucode for F-Zero. Implement F3DFLX2 lighting method. 2017-09-21 21:33:08 +07:00
Francisco Zurita
16d1aa6761 Fix possible memory corruption when reading pixels for G_IM_SIZ_8b
buffers.

Also, improve variable naming.
2017-09-11 10:26:49 +07:00
Logan McNaughton
23642624d4 Enable IPO for Release build 2017-09-06 20:48:11 -06:00
Sergey Lipskiy
f95d819a47 Up shader storage version. 2017-08-11 12:23:39 +07:00
Sergey Lipskiy
089dd2df0e Fix fog for F3DSWRS 2017-08-11 12:23:39 +07:00
Sergey Lipskiy
3b9f16e8dd Fix regression with blending in A Bug's Life, #1488
Hack alert:
The problem blender is used in two cycles mode, but both cycles are the same:
c_in*a_in + c_mem * 1ma
I have no access to c_mem from shader. Therefore, I use c_in instead of c_mem in the first cycle.
Result of the second cycle will be blended with c_mem by GL blender, as usual.
This is pretty good approximation, no problems noticed.
2017-07-30 22:50:39 +07:00
Sergey Lipskiy
5691fcbc23 Implement F3DAM ucode.
Decoded by olivieryuyu

Fixed #97 hey you pikachu:hilarious texture bug
2017-07-17 23:08:26 +07:00
Sergey Lipskiy
d89e48df46 Add TextDrawer::setTextColor method. 2017-06-25 15:07:02 +07:00
Sergey Lipskiy
a6babb418f Rewrite monochrome effect for Zeldas.
Fixed #1505 OoT Ending Screen Freeze Effect Color Wrong
2017-06-19 21:44:40 +07:00
Francisco Zurita
ad48345ec0 Changes needed to build with Android NDK 15 2017-06-18 18:33:05 -04:00
Sergey Lipskiy
312a9a77f2 Insure that BufferedDrawer::m_vertices size is enough to take any amont of data. 2017-06-16 00:22:13 +07:00
Sergey Lipskiy
b4ce5fb842 Fix line width for BufferedDrawer::drawLine. 2017-05-28 22:11:27 +07:00
Francisco Zurita
2e1baf433c Added floating point support to ColorBufferReader
I consolidated a lot of code that was the same between implementations in
the process, so now the code is common.
2017-04-25 16:51:18 +07:00
Francisco Zurita
4a8ae7e1cf Use floating point frame buffer format for Adreno 500 series GPUs 2017-04-25 16:51:18 +07:00
gizmo98
abdba2c149 Refactor gSP.lights and gSP.lookat 2017-04-05 10:40:01 +07:00
Sergey Lipskiy
5e51b386f1 Make Resident Evil 2 playable. 2017-04-02 12:02:38 +07:00
Sergey Lipskiy
51afc1e3b5 Correct DisplayWindowWindows::_readScreen 2017-04-01 19:51:36 +07:00
Sergey Lipskiy
1bf327b67c Read screen shot data only from front buffer. 2017-04-01 10:49:32 +07:00
Logan McNaughton
300134584f Add glFinish 2017-03-30 13:35:05 -06:00
Logan McNaughton
ebcf46e5ad ColorBufferReader performance improvements 2017-03-29 14:34:23 -07:00
Sergey Lipskiy
b78c279676 Correct UScreenScale::update() 2017-03-23 15:53:22 +07:00
Sergey Lipskiy
8413d57fde Remove hack_ZeldaMM from URenderTarget::update().
Fixed Majora's Mask - No geometry visible with N64 depth compare #1431
2017-03-21 22:30:26 +07:00
Logan McNaughton
d87ad2c3d6 Disable LOD emulation on GLES2 devices that can't support it 2017-03-18 23:05:10 -06:00
Logan McNaughton
c0d4644a22 Fix GL_ARB_compute_shader statement 2017-03-18 19:14:21 +07:00
Sergey Lipskiy
cd9567b728 Up shader storage version. 2017-03-16 18:50:15 +07:00
Sergey Lipskiy
811dea1d77 Rewrite viewport for polygons with screen coords. 2017-03-16 18:50:14 +07:00
Sergey Lipskiy
483212f382 Correct special drawers. 2017-03-16 18:50:14 +07:00
Sergey Lipskiy
bca21ed071 Invert y coordinate to align image origin with frame origin. 2017-03-16 18:50:14 +07:00
Sergey Lipskiy
6b4ae04f5e Rewrite polygons drawing in N64 depth compare mode.
Fixed #1418: Various regressions since PR2.0 with N64 depth compare enabled
2017-03-16 14:56:20 +07:00
Logan McNaughton
07a84a9973 Add missing GLSL extension 2017-03-14 20:25:27 -06:00
Sergey Lipskiy
b3906b2402 Revert "Rename opengl_ColorBufferReaderWithBUfferStorage.h/cpp"
This reverts commit 58ddf8822c.
2017-03-11 13:20:59 +07:00
Sergey Lipskiy
8ea0cddbec Disable texcoord attribs for fillrect.
Fixed fillrects in Pokemon Stadium 2.
2017-03-11 12:46:40 +07:00
Sergey Lipskiy
9e7826bd1a Fix viewport set in DisplayWindowMupen64plus::_swapBuffers()
Fixed Native resolution factor seems broken #1404
2017-03-09 13:11:59 +07:00
Sergey Lipskiy
72fef1d9a9 Fix compile and link on MAC_OS_X 2017-03-03 17:41:18 +07:00
Logan McNaughton
0dc261813a Hacky fix for RPi depth issues 2017-02-28 12:11:06 -07:00
Sergey Lipskiy
62e414ce8a Up shader storage version. 2017-02-28 15:48:17 +07:00
Sergey Lipskiy
eebdd32932 Replace rectAttrib::color by uniform. 2017-02-28 15:48:14 +07:00
Sergey Lipskiy
3fab248808 Up ShaderStorageFormatVersion. 2017-02-25 14:08:20 +07:00
Francisco Zurita
f773ddb001 Silence clang warning. 2017-02-25 01:09:24 -05:00
Francisco Zurita
58ddf8822c Rename opengl_ColorBufferReaderWithBUfferStorage.h/cpp
This allow compilation with clang in Anroid Studio with Windows. This file
name was too long for some reason.
2017-02-25 00:59:56 -05:00
Sergey Lipskiy
827b6bb9cd Code refactor: replace graphics::ObjectHandle() by graphics::ObjectHandle::null 2017-02-22 16:45:27 +07:00
Logan McNaughton
c42c1a4a4b Disable async color buffer copies on non-android GLES2 2017-02-21 13:41:57 +07:00
Sergey Lipskiy
8767a82dfc Implement vsync for Zilmar-specs build. 2017-02-20 15:56:46 +07:00
Francisco Zurita
c68a092207 Fix GLSL compilation error with PowerVR devices. 2017-02-20 01:29:10 -05:00
Sergey Lipskiy
b5652e3309 Remove uMSAAScale uniform. 2017-02-19 21:14:42 +07:00
Sergey Lipskiy
5d0ea0a6f5 Add MonochromeFragmentShader for MSAA textures. 2017-02-19 21:08:11 +07:00
Sergey Lipskiy
8544673e96 Minor optimization in CombinerProgramUniformFactory::buildUniforms 2017-02-19 20:36:29 +07:00
Sergey Lipskiy
c33d8555b2 Make N64DepthCompare setting independent off enableFragmentDepthWrite one. 2017-02-17 17:14:45 +07:00
Francisco Zurita
8b08bddb91 Common implementation of N64 depth compare for Full GL and GLES
Also, fix small typo.
2017-02-17 15:54:13 +07:00
Sergey Lipskiy
b6067bb90d Call glMemoryBarrier before polygon draw when N64DepthCompare enabled. 2017-02-17 15:53:46 +07:00
Francisco Zurita
fae25a494a Implemented Async buffer copies for GLES2 using EGLImage
Run time loading of the library used this implementation:

e5f5d8fa1c/imagine/src/base/android/privateApi
2017-02-14 00:10:49 -05:00
Francisco Zurita
ab0e472014 Add compiler macro to produce backtrace on GL Error for all GL functions
This will also log the function name and the error number when the GL
error happens.
2017-02-14 09:57:08 +07:00
Francisco Zurita
ac815ee595 Fix multisampling in Adreno devices
In GLES blits between multisampled and not multisampled framebuffers must
have the same source and destination coords.
2017-02-13 16:41:27 +07:00
Sergey Lipskiy
42bad7958a Set texture size for TexrectDrawer shader. It is necessary for GLES2. 2017-02-13 16:24:28 +07:00
Sergey Lipskiy
276018a2fc Refactor TexrectDrawer. 2017-02-12 22:21:20 +07:00
Francisco Zurita
0e8e71639b Implement generic copy color to RDRAM for GLES2 devices
Async copy is not supported for GLES2 devices unless using EGL Image
extension which has platform independent implementations
2017-02-12 14:40:01 +07:00
Sergey Lipskiy
2483903b74 Refactor TextDrawer: remove direct use of OpenGL
Remove DummyTextDrawer.
2017-02-12 14:27:26 +07:00
Sergey Lipskiy
e011ee56b5 Fix internal texture formats for GLES 2.0 2017-02-10 16:58:17 +07:00
Sergey Lipskiy
66fed934c5 Fix typo in UTextureSize uniform.
Fixed work of 3 point filtering with GLES 2.0
2017-02-10 14:42:05 +07:00
Logan McNaughton
1f74b9c821 Disable N64 Depth Compare if Image Textures are unsupported
Also disable fragment depth writing in GLES2
2017-02-09 21:54:44 +07:00
Francisco Zurita
1319687f86 Replace ANDROID macro definition with OS_ANDROID 2017-02-09 20:38:27 +07:00
Francisco Zurita
c53dc0a6c0 Remove macros checking for GL version and use runtime checks instead. 2017-02-09 20:38:26 +07:00
Logan McNaughton
9c16d1e75c Make compatible with apitrace in Debug mode 2017-02-08 12:33:38 +07:00
Logan McNaughton
acff19e66c Force disable fragment depth writing in GLES2 2017-02-08 12:33:31 +07:00
Logan McNaughton
a7ecc8534b Fix function loading on Raspberry Pi 2017-02-07 08:24:48 -07:00
Sergey Lipskiy
8004dc200d Fix errors caused by commit ca7da5418e : Disable RectBuffer optimization for bufferStorage. 2017-02-07 16:58:50 +07:00
Sergey Lipskiy
683e22c3b3 Correct shaders generation when hw light is enabled. 2017-02-07 11:50:00 +07:00
Sergey Lipskiy
6c9211a38f Simplify passing numlights vertex attribute in UnbufferedDrawer. 2017-02-07 11:12:04 +07:00
Sergey Lipskiy
0732b207a6 Code cleanup: remove commented code in BufferedDrawer 2017-02-07 10:55:35 +07:00
Sergey Lipskiy
ca7da5418e Disable RectBuffer optimization for bufferStorage.
Remove some code duplication.
2017-02-07 10:33:12 +07:00
Sergey Lipskiy
7e360c613d Correct buffer target in BufferedDrawer::_updateBuffer 2017-02-07 10:09:35 +07:00
Sergey Lipskiy
3f855ffb63 Replace internal color format parameters on formats supported by GLES2. 2017-02-07 09:49:09 +07:00
Francisco Zurita
0c6564f3c1 Improve check for "ShaderProgramBinary" 2017-02-07 09:43:37 +07:00
Logan McNaughton
5d51242252 A few GL fixes 2017-02-06 11:29:23 +07:00
Sergey Lipskiy
403c60cfea Convert texture format returned by GLideNHQ for GLES2. 2017-02-05 20:26:40 +07:00
Francisco Zurita
bca968fdd3 Fix noise texture in GLES 2.0 2017-02-05 20:07:46 +07:00
Francisco Zurita
341f9848bb Fix monochrome shaders for GLES2 2017-02-05 20:07:17 +07:00
Sergey Lipskiy
15f90a0699 Use GL_RGBA instead of GL_RGBA8 for GLES2. 2017-02-05 20:07:15 +07:00
Sergey Lipskiy
e232ae9e09 Rename InternalColorFormatParam RGBA to InternalColorFormatParam RGBA8. 2017-02-05 20:07:13 +07:00
Francisco Zurita
874b410ee1 Don't use macro to determine if GL_NUM_EXTENSIONS exists 2017-02-05 20:07:02 +07:00
Francisco Zurita
3d95dbdb03 Fix shader compilation error in GLES 2 2017-02-05 19:29:24 +07:00
Francisco Zurita
0898d8d0c4 Check for pixel read buffer implementation before trying to make one 2017-02-05 19:29:01 +07:00
Sergey Lipskiy
c1bba2afe6 Request core GL profile. 2017-02-05 18:41:49 +07:00
Sergey Lipskiy
a625225323 VBO implementation.
Thanks to Logan McNaughton for help.
2017-02-05 18:41:06 +07:00
Logan McNaughton
dddb3ae1f7 Fix error PBO code 2017-02-04 21:24:03 -07:00
Logan McNaughton
d5052c0c70 Improve PBO writer performance 2017-02-05 10:19:01 +07:00
Sergey Lipskiy
f832894965 Change format for zLUT and palette image textures.
It is now the same as for GLES 3.
2017-02-04 22:44:41 +07:00
Sergey Lipskiy
355c261dc7 Correct buffer target parameters for GLES2 2017-02-03 17:37:54 +07:00
Sergey Lipskiy
c07231a825 Correct check for image textures support in TextureManipulationObjectFactory classes. 2017-02-03 17:29:12 +07:00
Logan McNaughton
4456d43daf Remove need for USE_DEPTH_RENDERBUFFER 2017-02-03 10:27:37 +07:00
Francisco Zurita
72da07ac17 Fix check for support of fragment depth write. 2017-02-02 01:30:59 -05:00
Logan McNaughton
2075842d31 Improve extension checks 2017-02-01 07:45:25 -08:00
Logan McNaughton
60cd646bd0 A few cleanups and support for ARB_texture_storage 2017-02-01 07:35:39 -08:00
Logan McNaughton
4a7c1ebf04 Add support for EXT_buffer_storage 2017-02-01 07:19:23 -08:00
Sergey Lipskiy
c2b3fc13eb Disagle hw lighting for Rects. 2017-02-01 14:51:22 +07:00
Sergey Lipskiy
dbb827efc1 Do not call glUseProgram(0) directly in DisplayWindowMupen64plus::_swapBuffers() 2017-02-01 14:26:46 +07:00
Logan McNaughton
302f20fa3a Fix EGL build on non-Android devices 2017-01-31 21:07:45 -07:00
Logan McNaughton
3207b91259 Fix Image Textures on devices < GL4.2 2017-01-31 21:06:10 -07:00
Logan McNaughton
c074a6cdec Fix a few GL errors
Check for ARB_buffer_storage instead of the function pointers

Image Textures also require ARB_compute_shader, which provides glMemoryBarrier
2017-01-31 21:06:10 -07:00
Logan McNaughton
9cf7d6e777 Rename function pointers 2017-01-31 21:05:58 -07:00
Sergey Lipskiy
e5089bcf7d Do not include opengl_ColorBufferReaderWithEGLImage.h 2017-01-30 17:28:36 +07:00
Francisco Zurita
a480f28fc2 Don't use glBindImageTexture when glTexStorage2D is not supported
glBindImageTexture requires an immutable texture object
2017-01-30 11:00:57 +07:00
Sergey Lipskiy
3b1dd92118 Correct TexrectCopyShader for GL versions that are not GLES 2.0 2017-01-30 11:00:42 +07:00
Francisco Zurita
9b9910dfc1 Fix return value in ColorBufferReaderWithBufferStorage::readPixels
and ColorBufferReaderWithPixelBuffer::readPixels
2017-01-29 22:10:06 +07:00
Francisco Zurita
b5466c109d Correct issues in ColorBufferReaderWithEGLImage.
Disable its use for now.
2017-01-29 22:10:04 +07:00
Francisco Zurita
38bba9f804 Add missing include. 2017-01-29 22:10:01 +07:00
Francisco Zurita
48cd94ec46 Add special version of to_string for Android. 2017-01-29 22:09:49 +07:00
Francisco Zurita
85fc5ec31f Fix GLFunctions for EGL. 2017-01-29 21:48:49 +07:00
Sergey Lipskiy
184ff8f017 Correct ColorBufferToRDRAM::_prepareCopy
Code cleanup.
2017-01-28 21:44:04 +07:00
Sergey Lipskiy
32ba7bd182 Fix CachedBind 2017-01-28 21:06:03 +07:00
Sergey Lipskiy
df4a81bfea Add special Parameter classes to make parametrs usage more safe. 2017-01-28 16:52:09 +07:00
Sergey Lipskiy
c8bf408b57 Reset CachedBindFramebuffer when a frame buffer deleted. 2017-01-28 11:02:24 +07:00
Sergey Lipskiy
05da51d7a8 Add EGL section to GLFunctions. 2017-01-28 10:11:51 +07:00
Sergey Lipskiy
1a87d75efe Correct internal texture formats. 2017-01-27 22:39:34 +07:00