Commit Graph

8354 Commits

Author SHA1 Message Date
Gregory Hainaut fa921215d9 gsdx ogl: add GL_ARB_get_texture_sub_image extension support
could help to read back a portion of a texture
2016-05-16 18:58:33 +02:00
Gregory Hainaut e02753df46 gsdx ogl: oups, mandatory function pointer was wrongly optional 2016-05-16 18:58:33 +02:00
Gregory Hainaut 37e4d2bd48 gsdx ogl: update old comment 2016-05-16 18:58:33 +02:00
Gregory Hainaut 96b5170d8c Merge pull request #1317 from PCSX2/gsdx-array-coverage
Gsdx array coverage
2016-05-16 18:16:15 +02:00
Gregory Hainaut ed0adf61d3 gsdx ogl: allow to define a debug context in windows.
Be aware: dev build will be slow and quite chatty
2016-05-16 17:08:20 +02:00
Gregory Hainaut 30ce6b0a6a gsdx ogl: check debug function exists
I'm sure they exists in the openGL renderer context but there are
also used in common code. So potentially in DX context.
2016-05-16 16:59:00 +02:00
Gregory Hainaut 99476f4b13 gsdx ogl: explain better previous clear vs framebuffer comment 2016-05-16 16:49:18 +02:00
Gregory Hainaut 08f7bd2dc3 gsdx: add crc hack for Ar tonelico 2
It would requires some texture dynamic width convert shaders.
So as a quick solution, let's add a new CRC hack.

For issue #1362 (granted the CRC is correct)
2016-05-16 10:55:02 +02:00
Gregory Hainaut 1522cba5b0 gsdx ogl: performance note of texture clear vs framebuffer clear
In case of render target. FB clear is better
2016-05-16 10:38:47 +02:00
Gregory Hainaut e776118de9 gsdx-ogl: implement previous DATE optimization in a single shader pass
Faster :) Reduce further the cost of accurate date

The optimization will clear the stencil to 1. So all pixels will have a
single sample that pass both the depth & stencil test. No primitive
overlaps So the destination alpha test can be done directly in the
shader.
2016-05-15 17:44:40 +02:00
Gregory Hainaut 3ab12cef2f gsdx ogl: accelerate special case of accurate date.
Game often uses date to allow a single pixel pass. If this
use case is detected, stencil buffer will be cleared after first pixels
that pass both depth&stencil test.

It seems to reduce the load on the GPU.

Note: with the help of texture barriere, maybe we could implement the algo
with a single pass.
2016-05-15 17:22:58 +02:00
Gregory Hainaut 025be70c42 gsdx-ogl: allow to fallback to a slow accurate DATE when GL_ARB_shader_image_load_store isn't supported
The best is still to have a DX11 generation GPU
2016-05-15 16:29:29 +02:00
Gregory Hainaut 5b061e062c gsdx ogl: replace ClearRenderTarget_i by glClearTexSubImage
Avoid state change, avoid potential texture buffer reallocation

Note: require GL_ARB_clear_texture
2016-05-15 15:55:31 +02:00
Gregory Hainaut 82060320ef gsdx ogl: use draw list size for sprite instead of vertex number to select date algo
Latest overlap detection allow to draw multiple sprite instead of 1,
so the limit based on vertex number is too conservative.
2016-05-15 15:00:52 +02:00
Gregory Hainaut c054b097e9 gsdx ogl: fix wrong depth clear
If a color buffer is still attached and is smaller than depth buffer,
the latter won't be fully cleared.

As a faster alternative, use GL4.4 clear texture function. Avoid to fiddle with
framebuffer and pixel tests.

Fix #1362x Ar Tolenico 2 map clip
2016-05-15 14:57:37 +02:00
Gregory Hainaut caacb1dc9f gsdx-ogl: add texure clear function (GL4.4) 2016-05-15 14:57:11 +02:00
Gregory Hainaut d47d9e5017 gsdx-ogl: fix a minor gcc warning 2016-05-15 13:10:46 +02:00
Gregory Hainaut 913e3d65d2 gsdx ogl: use glViewportIndexedf and glScissorIndexed 2016-05-14 17:18:16 +02:00
Gregory Hainaut cd9ee3c468 gsdx ogl: emulate GL_ARB_draw_buffers_blend and GL_ARB_viewport_array
New functions only set the parameter to a single buffer whereas old function
set all buffers
2016-05-14 17:15:30 +02:00
Gregory Hainaut 4065730e36 gsdx ogl: merge sprite hack take 2
try to detect paving correctly. Avoid to break effect such as Heat effect in Tekken5
2016-05-14 12:24:56 +02:00
Gregory Hainaut 2fc244a3eb gsdx-ogl: inline function only call once 2016-05-14 11:53:02 +02:00
Gregory Hainaut 24a673c482 gsdx ogl: avoid special format on the merge sprite hack 2016-05-13 18:28:21 +02:00
Gregory Hainaut b57b97eb3c debian: update dependency for latest Debian/Ubuntu 2016-05-13 18:28:21 +02:00
Jonathan Li 92d4d93fce Merge pull request #1312 from FlatOutPS2/master
Automatic aspect ratio switch during FMV playback
2016-05-11 14:07:59 +01:00
FlatOutPS2 5871874f70 Avoid crash on some systems with FMV software switch
Avoid crash on some systems switching HW><SW in fullscreen aspect
ratio's with FMV Software switch.

Replaces previous zoom adjusting fix with a more efficent one.

Squashed a small improvement into commit.
2016-05-11 14:33:25 +02:00
Jonathan Li 32aab3366d Merge pull request #1356 from NZJenkins/master
Ensure selected rows are visible in debugger
2016-05-10 22:25:24 +01:00
Gregory Hainaut 156b6425d2 gsdx ogl: add UserHacks_merge_pp_sprite option to reduce upscaling glitches
For test purpose, it is higly experimental.

So far it is yield interesting result for tekken5
2016-05-10 08:12:07 +02:00
Gregory Hainaut c019f86529 gsdx ogl: add a performance note for a potential channel optimization 2016-05-10 08:11:28 +02:00
NZJenkins 25b29a2864 Ensure selected rows are visible in debugger
Fixes #1353
DebuggerLists:
Select does not ensure the item is visible if selecting
Went with existing convention of Select and Focus.

CtrlRegisterList:
Added ensureVisible, called whenever the current row selection is
changed
2016-05-10 13:01:18 +12:00
Gregory Hainaut 4effc70792 gsdx hw: Fix regression on align sprite
The hack also updates position of not texture mapped sprite.

Unlike the 2nd hack (round sprite) which can be skipped if TME is disabled
2016-05-09 09:45:34 +02:00
Jonathan Li 23782b5c24 Merge pull request #1337 from turtleli/autodock
Console: Add AutoDock option to menu
2016-05-09 00:13:21 +01:00
Gregory Hainaut 5ecbc2889b Merge pull request #1349 from PCSX2/gsdx-channel-effect
Gsdx channel effect
2016-05-08 19:03:18 +02:00
Gregory Hainaut 5b04672ba2 gsdx ogl: separate Tales of Abyss/Urban Chaos effect based on the fbmask
Avoid to rely on CRC
2016-05-08 17:31:13 +02:00
Gregory Hainaut 48d962e15a gsdx log: print detected crc
Helpful to get crc from gs dump
2016-05-08 16:30:50 +02:00
Gregory Hainaut fb6a6f73c4 gsdx: move Tekken5/Tales of Abyss CRC to Dx level 2016-05-07 22:46:42 +02:00
Gregory Hainaut ecbcc566fe gsdx ogl: use GT shader for Tourist Trophy 2016-05-07 22:46:41 +02:00
Gregory Hainaut fc86620327 gsdx ogl: disable channel effect when signature is a bit different
Hack to avoid regression on Blood Will Tell
2016-05-07 22:46:41 +02:00
Gregory Hainaut 30b452543a gsdx ogl: tekken5 uses similar effect as Gran Turismo
So just reuse GT hle shader :) Acid stage is now correct. However it might need
some tuning for others stages.
Still look awful with uspcaled resolution (note internal game framebuffer is around 160x128)
2016-05-07 22:46:41 +02:00
Gregory Hainaut d41613c46a gsdx ogl: add a Tales of Abyss HLE shader
Again fast and efficient but it relies on CRC

v2: forget to update the precompiled shader...
2016-05-07 22:46:41 +02:00
Gregory Hainaut d5681ba01c glsl: fix a bug in urban chaos hle shader
Bug only impact the lsb bits of the depth conversion, so impact is likely small
2016-05-07 22:46:41 +02:00
Gregory Hainaut 70ee8c5bc4 gsdx ogl: add an HLE brightness/contrast shader for GT series.
It works and it is very fast. But it relies on CRC

Others effect need to be tested as well
2016-05-07 22:46:41 +02:00
Gregory Hainaut 91c164ecca gsdx tc: avoid potential division by 0 2016-05-07 18:36:28 +02:00
Gregory Hainaut 265ea82780 gsdx tc: avoid to load data outside of the GS memory
Avoid crash in Kungfu panda
2016-05-06 21:46:29 +02:00
Jonathan Li c540840cd4 pcsx2: Apply auto gamefix/widescreen/cheat changes immediately 2016-05-06 20:32:31 +01:00
Gregory Hainaut f34e77f08c gsdx: fix regression on 24 bit format (gust game)
bpp is the size of the container format but not the size of the format itself.
For PSM24, bpp is 32, trbpp is 24
2016-05-06 13:49:24 +02:00
Gregory Hainaut c94fecdadb Merge pull request #1346 from PCSX2/gsdx-cleanup
Gsdx cleanup
2016-05-06 12:23:54 +02:00
Jonathan Li f97b556e23 pcsx2: Use incoming settings when applying settings
The old config settings were wrongly used when determining whether to
load patches, cheats and widescreen hacks. These settings needed to be
applied twice to actually take effect if they were changed while a game
is running.

Use the incoming settings so the settings only need to be applied once.
2016-05-06 01:03:51 +01:00
Gregory Hainaut e890ce989c gsdx: throw oom exception + error
Texture can't be NULL anymore, so we can remove a couples of check
2016-05-05 18:53:51 +02:00
Gregory Hainaut d58b71688b gsdx debug: auto GL_POP
Nicer and exception safe

V2: miss definition of vs/ps
2016-05-05 18:53:32 +02:00
Gregory Hainaut 37c7fa7663 gsdx: add draw exception (OOM and Recoverable)
The exception will free the unused (but allocated) texture aka the emergency break ;)

Recoverable could be useful for unsupported draw call
2016-05-05 17:47:32 +02:00