Commit Graph

2030 Commits

Author SHA1 Message Date
Gregory Hainaut 12b8704502 gsdx dx: disable channel shuffle 2016-04-30 14:52:43 +02:00
Gregory Hainaut b4c7d32741 gsdx ogl: avoid to wrongly detect a channel shuffle 2016-04-30 14:52:43 +02:00
Gregory Hainaut 1011a757a8 gsdx hw: factorize redundant code 2016-04-30 14:52:43 +02:00
Gregory Hainaut b78c772a14 gsdx: improve detection of channel shuffle
Improve rendering on Prince Of Persia (requires preload data hack)

Worth to re-test: MTGS2/3

Urban Chaos is a bit better but there still a bad overlay
2016-04-30 14:52:43 +02:00
Gregory Hainaut 02dff2653a gsdx hack: sort the file
* separate Dx only/aggresive hack
* add GSC_CrashNburn and GSC_BullyCC to Dx only section
2016-04-30 12:45:06 +02:00
Gregory Hainaut 60267790a1 gsdx: move (most) of the hw hack into a separate file
GSState.cpp was really too big
2016-04-30 12:24:08 +02:00
Gregory Hainaut 7a5e1d4154 gsdx ogl: allow to use a separate texture for the channel effect 2016-04-29 17:34:17 +02:00
Gregory Hainaut a9d25efcde gsdx ogl: extend state to support up to 8 textures 2016-04-29 17:34:17 +02:00
Gregory Hainaut e45f90fac3 gsdx: fix a gcc warning 2016-04-29 17:34:17 +02:00
Gregory Hainaut e195e67a48 gsdx: move Metal Gear Solid CRC to DX level
OpenGL is near perfect :)
2016-04-29 17:34:17 +02:00
Gregory Hainaut 5e5069423b Merge pull request #1321 from PCSX2/gsdx-preloadcrash
GSDX: Avoid crash when TBW == 0 - Preload data frame
2016-04-28 23:06:29 +02:00
Gregory Hainaut cb19451418 gsdx ogl: implement RT channel fetch
Fix blending of Metal Gear Solid/KillZone (and potentially other games)

Potentially impact issue #905, #594, #914, #896
2016-04-28 22:56:38 +02:00
Gregory Hainaut c445a14c46 gsdx ogl: extend shader to lookup a single channel 2016-04-28 22:56:38 +02:00
Gregory Hainaut eaa4fd41e2 gsdx ogl: improve logging of special effect 2016-04-28 22:56:38 +02:00
refractionpcsx2 0aa8fe0f20 GSDX: Avoid crash when TBW == 0 2016-04-28 21:36:21 +01:00
Gregory Hainaut f946f38f26 gsdx hw: keep the debug counter in sync
Otherwise I'm screwed :p
2016-04-28 20:03:53 +02:00
Gregory Hainaut 04a578495f gsdx hw: disable channel shuffle effect
Greatly reduce memory requirement for target
MGS3 at 4x: from 2680MB to 160MB

Remove a couple of (slow) draw calls
2016-04-28 19:46:26 +02:00
Gregory Hainaut f63e38a59e gsdx ogl: as always some games do bad stuff
Let's keep a comment for the moment. I don't know if we need to fix it, neither how.
2016-04-28 19:42:00 +02:00
Gregory Hainaut 45bfe2ad58 gsdx hw: trace some special post processing effect
* Double downscale is done in GTA
* Channel Shuffle is the top-left corner issue

So far nothing is emulated
2016-04-28 19:39:57 +02:00
Gregory Hainaut 5b04f4dab9 gsdx: add optimization note for the future 2016-04-28 18:01:21 +02:00
Gregory Hainaut 4808d89449 gsdx ogl: use enum pretty name 2016-04-28 18:01:20 +02:00
Gregory Hainaut ab31915ce9 gsdx: glsl: fix silly typo
And regression on various games
2016-04-27 09:52:35 +02:00
Gregory Hainaut aeb92592e7 gsdx ogl: use GSUtil::GetClassVertexCount 2016-04-26 19:29:04 +02:00
Gregory Hainaut df70b8bb0e gsdx: fix Q NaN value
Avoid potential undefined results
2016-04-26 19:09:32 +02:00
Gregory Hainaut 726b901dc5 Merge pull request #1304 from PCSX2/gsdx-faster-texture-cache
gsdx tc: reduce texture cache overhead
2016-04-26 16:46:44 +02:00
Gregory Hainaut 49d175b677 gsdx tc: allow to create a dummy Source without tons of memory allocation
It makes shared texture virtually free from the CPU PoV.
2016-04-24 22:30:56 +02:00
Gregory Hainaut ad08701cb1 gsdx tc: trick the texture cache to use a depth format for depth texture
This way we avoid the rescaling of the depth buffer and texture allocation.
2016-04-24 22:18:26 +02:00
Gregory Hainaut 1960d51e60 gsdx tc: properly support 16 bits depth conversion 2016-04-24 22:18:26 +02:00
Gregory Hainaut de38963904 gsdx ogl: plug the new depth sampling in the renderer
Note:
When source format is depth, integral texture coordinate must be used => depth_fmt 1/2/3
2016-04-24 22:18:26 +02:00
Gregory Hainaut fda511a949 gsdx glsl: extend hw shader to sample depth texture
Will use integral coordinate to avoid any rescaling.

Bilinear interpolation isn't supported. I don't think it is allowed to
filter a depth texture anyway.
2016-04-24 22:18:26 +02:00
Gregory Hainaut 583de1bf0b gsdx tc: add a dedicated function to lookup a depth source
The hypothesis is that game will use a depth (aka Z32/Z24/Z16/Z16S)
format when sampling depth texture as color.  Technically one could use
a standard color format but block/pixel order won't be the same.
(otherwise I'm screwed)

=> Hypothesis invalid on GoW. They just do a scrambled rendering...

Lookup info:
* The first searched list is the depth pool as we search a depth
  texture.
* 2nd one is the render target pool (if a depth was converted to a
  render target already)

To avoid any CPU overhead, the source will be a pointer to the real texture
* Conversion (if float texture) will be done on the fly by the shader (GPU).
* Relative rescaling won't be supported. Texture must be fetched with
  integral coordinate
2016-04-24 22:18:26 +02:00
Gregory Hainaut 9ee090a36e gsdx tc: add a shareable texture flag
Plan is to bypass shader conversion/rescaling/copy for depth texture
2016-04-24 22:18:26 +02:00
Gregory Hainaut 8ec1461842 gsdx: increase the number of texture in the pool
It could slightly increase the VRAM requirement but it will reduce texture
allocation/unallocation at start/end of frame.
2016-04-24 22:14:51 +02:00
Gregory Hainaut b4b878ac24 gsdx-ogl: add a note for a future small optimization 2016-04-24 22:14:51 +02:00
Gregory Hainaut 4281b8630b gsdx ogl: remove the useless shadeboost Constant Buffer 2016-04-24 11:08:14 +02:00
Gregory Hainaut d610a6aac4 gsdx glsl: ofc forget to do the shader in bin 2016-04-24 11:07:46 +02:00
Gregory Hainaut d027ed2092 gsdx ogl: merge GSTextureFXOGL to GSDeviceOGL
First file is rather small in openGL. And it is linked to the latter.
2016-04-24 10:55:22 +02:00
Gregory Hainaut 1558220f74 gsdx glsl: create a common header definition
* avoid duplication between all the files for UBO
* remove various interface define
2016-04-24 10:54:39 +02:00
Gregory Hainaut 8ee0783bd3 GSdx: remove useless variable 2016-04-24 10:42:03 +02:00
Gregory Hainaut fa1377a8ee gsdx tc: reduce texture cache overhead
Cache page coverage of texture into a hash map

Test done on Champion of Norrath (paltex + DisablePartialInvalidation)

Profiler:
Self of GSTextureCache::SourceMap::Add 5.39% => 0.23%
Self of GSTextureCache::LookupSource 15.27% => 10.82%

Hard to measure on CoN as it depends on memory transfer. Seem to be 5-10 fps faster.
2016-04-23 19:22:58 +02:00
Gregory Hainaut 67e955919f gsdx: keep dump code enabled in dev release too 2016-04-23 18:29:56 +02:00
Gregory Hainaut a149d6b26f gsdx: use psm.bpp flag to improve code reading 2016-04-23 18:29:39 +02:00
Gregory Hainaut dd98a0b913 gsdx: add a depth format flag 2016-04-23 18:28:50 +02:00
Gregory Hainaut 87867beb0e gsdx-ogl: remove the invalidation of texture
It doesn't help the perf and only create overhead (test done on snow engine game)
2016-04-21 21:07:17 +02:00
Gregory Hainaut 3709b5aecc gsdx: add a small comment to ease code reading 2016-04-21 09:28:44 +02:00
Gregory Hainaut b5ec683318 gsdx-linux: remove custom resolution from the GUI
It would be replaced by a float resolution factor
2016-04-21 09:28:44 +02:00
Gregory Hainaut 821e3ff294 gsdx-ogl: reduce length of debug message 2016-04-21 09:28:44 +02:00
Gregory Hainaut 8217c717f6 gsdx-ogl: require GL_KHR_debug
Will reduce the slowdown on debug build
2016-04-21 09:28:44 +02:00
Gregory Hainaut 9598417f42 gsdx-ogl: GL_ARB_copy_image is now mandatory 2016-04-21 09:28:44 +02:00
Gregory Hainaut 99bccc6dff gsdx-ogl: remove the geometry shader blacklist for Gallium Mesa drivers 2016-04-21 09:28:44 +02:00