Commit Graph

522 Commits

Author SHA1 Message Date
Jules Blok ef78941042 VideoBackends: Clamp depth to uint24 range. 2015-05-18 23:22:28 +02:00
Lioncash a94e4dd07f OGL: Join declarations and assignments in Render 2015-05-08 09:29:36 -04:00
Lioncash eeb0f0b7c4 OGL: Get rid of some explicit deletes in Render 2015-05-08 09:28:29 -04:00
Jules Blok 84a5f4abb0 VideoBackends: Use the new divisor when clearing the depth buffer. 2015-05-08 14:32:22 +02:00
Jules Blok 1a409a2e16 VideoBackends: Clamp Z peek values. 2015-05-08 14:32:21 +02:00
Jules Blok 0f2c72f0f8 VideoCommon: Clamp integer conversions. 2015-05-08 14:32:16 +02:00
Jules Blok b0770e2a0c VideoBackends: Floor depth values in depth copy shaders. 2015-05-08 14:29:30 +02:00
Jules Blok be810eb750 OGL: Switch depth buffers to GL_DEPTH_COMPONENT32F format. 2015-05-08 14:29:30 +02:00
Jules Blok 4b2e04b862 OGL: Change the depth buffer type to GL_FLOAT. 2015-05-08 14:29:29 +02:00
Jules Blok c4f85a38e6 VideoBackends: Use proper floating point depth precision. 2015-05-08 14:29:29 +02:00
Jules Blok 7a1252f7e5 VideoBackends: Implement depth copy shaders with integer math. 2015-05-05 00:40:25 +02:00
Jules Blok 54f4443971 VideoCommon: Implement EFB dumping for both backends. 2015-05-02 13:23:33 +02:00
Lioncash 63393570fb PerfQueryBase: Move common implementation variables into base class 2015-04-15 19:22:16 -04:00
skidau 94e435afbc Merge pull request #2201 from magumagu/ogl-clamp-origin
OpenGL: use ClampUL instead of ClampLL where appropriate.
2015-03-21 12:45:46 +11:00
magumagu 629fb8fb49 Merge pull request #2222 from Tilka/fix_warnings
Fix warnings
2015-03-16 17:41:46 -07:00
Tillmann Karras f82afd1b2f Fix warnings 2015-03-16 19:02:30 +01:00
Shawn Hoffman ad64336137 quiet some warnings which appear on vs2015.
quieted warnings include shadowed variable names and integer extensions.
2015-03-15 19:28:47 -07:00
magumagu 269be03908 OpenGL: use ClampUL instead of ClampLL where appropriate. 2015-03-12 13:24:52 -07:00
degasus f3f2ed1536 GLX: fix memory leak 2015-03-08 17:42:37 +01:00
Ryan Houdek b0f61201c3 Merge pull request #2142 from Sonicadvance1/fix_gles31_non_nvidia
Fix OpenGL ES 3.1 on non-Nvidia devices.
2015-03-08 09:03:05 -05:00
Ryan Houdek 3c5e99c777 Fix OpenGL ES 3.1 on non-Nvidia devices.
We are declaring we require ARB_shader_image_load_store in the shader, this isn't an extension on GLES because it is part of the GLSL ES 3.1 spec.
If we are running as GLES then just not put it in the shaders.
2015-03-08 08:49:53 -05:00
Ryan Houdek 70977fd6b1 Merge pull request #2092 from Sonicadvance1/gles_occlusion_queries
Implement full occlusion queries for the Nexus 9.
2015-03-08 08:44:15 -05:00
Markus Wick cc5a2f3411 Merge pull request #2164 from Armada651/cache-fix
ProgramShaderCache: Do plenty of error checking before writing shaders to the disk.
2015-03-02 17:24:00 +01:00
Jules Blok 728081dad2 ProgramShaderCache: Do plenty of error checking before writing shaders to the disk. 2015-03-02 17:03:49 +01:00
degasus 35373c5185 TextureCache: load all mipmap levels from custom textures
This drops the "feature" to load level 0 from the custom texture
and all other levels from the native one if the size matches.
But in my opinion, when a custom texture only provide one level,
no more should be used at all.
2015-03-02 00:09:09 +01:00
Lioncash 7408de7e79 Merge pull request #2058 from Stevoisiak/Codemaid-Cleanup-Take2
Basic Formatting/Whitespace Cleanup
2015-02-25 18:07:56 -05:00
Stevoisiak 93b16a4a2d Formatting/Whitespace Cleanup
Various fixes to formatting and whitespace
2015-02-25 10:48:21 -05:00
Pierre Bourdon f06b1106db Merge pull request #2089 from degasus/remove_disable_efb_copy
Remove disable efb copy
2015-02-24 23:31:05 +01:00
degasus 967eaad8df VideoCommon: rename efb2tex and efb2ram 2015-02-24 23:10:13 +01:00
degasus ac7102918d OGL: support palette texture decoding 2015-02-24 22:51:55 +01:00
Tillmann Karras f298f00e1b Clean up the intrinsics #ifdef mess 2015-02-24 01:02:36 +01:00
Ryan Houdek e9ac4d53a6 Implement full occlusion queries for the Nexus 9.
GLES3 spec is worthless and only returns a boolean result for occlusion queries. This is fine for simple cellular games but we need more than a
boolean result.
Thankfully Nvidia exposes GL_NV_occlusion_queries under a OpenGL ES extension, which allows us to get full samples rendered.
The only device this change affects is the Nexus 9, since it is an Nvidia K1 crippled to only support OpenGL ES.
No other OpenGL ES device that I know of supports this extension.
2015-02-21 17:24:36 -06:00
Ryan Houdek a5b4ac6faa [GLExtensions] Add support for NV_occlusion_query_samples. 2015-02-21 17:24:32 -06:00
magumagu c0a4760f0e Decode EFB copies used as paletted textures.
A number of games make an EFB copy in I4/I8 format, then use it as a
texture in C4/C8 format.  Detect when this happens, and decode the copy on
the GPU using the specified palette.

This has a few advantages: it allows using EFB2Tex for a few more games,
it, it preserves the resolution of scaled EFB copies, and it's probably a
bit faster.

D3D only at the moment, but porting to OpenGL should be straightforward..
2015-02-19 15:09:27 -08:00
degasus 081137bd4f VideoBackends: set GLInterface to zero after deleting it
This fixes a crash on opening the gfx settings after closing a game.
2015-02-01 13:51:34 +01:00
Lioncash 9476756d43 OGL: Fix a memory leak that would occur every time a game is launched 2015-01-31 16:00:53 -05:00
Rohit Nirmal 5203c4ef7b Silence -Wunused-variable warning. 2015-01-28 18:09:07 +00:00
Markus Wick beaa9905a6 Merge pull request #1966 from magumagu/unify-efb-encode
Unify EFB encoding shader generation
2015-01-27 23:14:18 +01:00
Markus Wick 43605f8716 Merge pull request #1948 from magumagu/remove-efb-cache
Remove EFB to RAM cache, and simplify code.
2015-01-27 09:42:15 +01:00
magumagu 9dbb9bf3b5 Make sure EFB2RAM buffer is wide enough for new coordinate system. 2015-01-25 23:32:32 -08:00
magumagu 1ee09ced0a Fix OpenGL coordinate computation. 2015-01-25 21:38:30 -08:00
Jules Blok 5c4ee2f71e PostProcessing: Move default pixel shader to PostProcessingShaderConfiguration.
Reduces code complexity and fixes a bug where the shader is not properly invalidated.
2015-01-25 23:08:49 +01:00
Jules Blok 262c3b19ec PostProcessing: Add support for user-supplied anaglyph shaders.
There are lots of different anaglyph glasses out there and there may be even more creative uses for stereoscopic post-processing shaders.
2015-01-25 22:07:03 +01:00
skidau d7a8752228 Merge pull request #1920 from CarlKenner/fix3dxfb
Fix 3D XFB
2015-01-25 15:44:06 +11:00
Lioncash 9cdfe889af Coding style cleanup from the zfreeze merge 2015-01-24 15:16:48 -05:00
Scott Mansell 14baf038e7 Stop doing nastly shit to OpenGL stream buffers.
Instead we keep the loaded vertices in CPU memory.
2015-01-24 14:41:51 +13:00
magumagu 6659c15bed Remove EFB to RAM cache, and simplify code. 2015-01-23 10:48:15 -08:00
Scott Mansell 5510c86b81 Move Zfreeze code out individual backends into videoCommon
Also:
 * Implement support for per-vertex PosMatrixIndex
 * Only update zslope constant once when zfreeze is activated.
 * Added a bunch of comments.
2015-01-24 03:22:27 +13:00
NanoByte011 add59b3bea Fixes Mario Tennis Gimmick Courts and adds support for FastDepthCalc
- Calculate ZSlope every flush but only set PixelShader Constant on Reset Buffer when zfreeze
- Fixed another Pixel Shader bug in D3D that was giving me grief
2015-01-23 03:32:31 +13:00
Scott Mansell 88c7afd315 Make zfreeze use screenspace coordinates independant of IR.
OpenGL requires the y coordinates to be flipped.

Also refactored PixelGen code to remove duplicate code.
2015-01-23 03:32:31 +13:00