Commit Graph

143 Commits

Author SHA1 Message Date
Gregory Hainaut c8dddfed06 gsdx hack: move m_skip and m_userhacks_skipdraw to GSState level
Avoid to push argument to call IsBadFrame
2016-05-05 16:22:14 +02:00
Gregory Hainaut f712c5c6d0 gsdx tc: use GSLocalMemory::m_psm instead of hardcoded value 2016-05-05 12:19:25 +02:00
Gregory Hainaut 642cc50ac4 gsdx hw: reduce verbosity of channel skip log 2016-05-05 12:19:19 +02:00
Gregory Hainaut b8b0a0d662 gsdx hw: remove dead code 2016-05-04 18:08:34 +02:00
Gregory Hainaut e0581ee771 gsdx ogl: Finalize the urban chaos workaround
Rendering must be nice now
2016-04-30 14:52:53 +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 e45f90fac3 gsdx: fix a gcc warning 2016-04-29 17:34:17 +02:00
Gregory Hainaut eaa4fd41e2 gsdx ogl: improve logging of special effect 2016-04-28 22:56:38 +02: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 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 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 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 59ef668fd2 Merge pull request #1222 from PCSX2/gsdx-black-fmv
Gsdx black fmv
2016-04-21 09:25:36 +02:00
refractionpcsx2 dcb676765e GSdx: Clean up some warning under windows (#1289) 2016-04-14 11:00:58 +01:00
Gregory Hainaut 8a7184be3f gsdx: fix hack logic 2016-04-12 11:36:24 +02:00
Gregory Hainaut 6a09fa56fb gsdx: disable nocturne CRC hack
Yeah one less !
2016-04-11 22:41:19 +02:00
Gregory Hainaut 8943a9db4a gsdx hw: GS can draw 2 frames in a single framebuffer
So let's increase the height. It will increase the memory requirement on some games

v2: try to do it automatically
(not sure it will useful as most game will requires it)
v3: let's back to an hardcoded 1280 size. It generates too much issue
2016-04-04 21:30:40 +02:00
Gregory Hainaut 063d2e568a gsdx tc: re-implement frame lookup
Try to avoid random black screen frame

v2: don't force the preload hack on the frame
It creates a ghost image over FMV

v3: support offset within a frame
2016-04-04 21:30:37 +02:00
Gregory Hainaut eec74fd963 gsdx hw: Add an alternate draw call for FMV rendering
The long story:
Game blits FMV far aways of the RT which is actually the input of the RO texture...
Currently GSdx suffers of 2 bugs.
1/ RT is too small
2/ texture isn't properly updated with the rendered value. Texture is invalidated
but it reads back the pixels from the GS memory whereas the correct
value is located on the GPU.

This commit will replace the standard draw by a manual blit. Therefore it avoid
size issue and bad upscaling issue.

v2:
* Use various copy to be more compatible with dx api
* Move all part of the hack info the BlitFMV function

v3: add log message
2016-04-04 21:29:32 +02:00
Gregory Hainaut 9aea76b0e8 gsdx tc: store a hint on the target size
The hint is based on the rendering
2016-04-04 21:29:31 +02:00
Gregory Hainaut cc1756b8e5 gsdx: disable dump in release build 2016-04-02 00:56:41 +02:00
Gregory Hainaut f6ee94589f gsdx hw: OI_GSMemClear supports various frame formats
Could help #1267
2016-03-28 10:47:42 +02:00
Gregory Hainaut a99750ae87 gsdx hw: only enable OI_GsMemClear when both depth/alpha test are disabled
Fix #1262
2016-03-26 11:28:28 +01:00
Gregory Hainaut 8e5e770fd1 gsdx hw: Ensure GS memory is always cleared properly
It will fix some issues on FMV

Previous behavior can be restored with the hack "UserHacks_DisableGsMemClear"

Fix #768
And maybe #855
2016-03-21 18:26:22 +01:00
Gregory Hainaut a3788c4e98 Merge pull request #1225 from PCSX2-Alpha/scaling_fix
GSDX: set a safe limit to Framebuffer width
2016-03-12 15:42:18 +01:00
Akash 997f0535f5 GSDX: Set a safe limit to Framebuffer width
There are likely few games (RE4) which constantly change the FBW register value causing the framebuffer width to be updated at every interval. Adding a safe limit (512) similar to frame buffer height would prevent such constant changes of the framebuffer width when FBW changes once again to an even lower value.
2016-03-11 07:28:05 +05:30
Gregory Hainaut ec57f1305a gsdx: detect rendering outside of the framebuffer
Could help to detect rendering issue (for example missing fmv)
2016-03-10 19:03:39 +01:00
Jonathan Li 6b950d0408 gsdx: Allow dump and capture PNG compression to be changed
Valid values for png_compression_level are from 0 (no compression) to 9
(max compression). The default is 1.

v2: Use zlib Z_BEST_SPEED (1) and Z_BEST_COMPRESSION (9) defines.
2016-03-02 22:58:45 +00:00
Gregory Hainaut edef3ad8c3 Merge pull request #1170 from PCSX2-Alpha/TC_Scaling
GSDX: Detect RT size based on display and frame registers.
2016-03-02 13:51:28 +01:00
Akash b07b06a9fb GSDX-Texture Cache: Rework scaling function
The following patch uses the height value of the display rectangle rather than make an estimation of the Frame buffer height when the game uses a non-referenceable height (or) width.
2016-02-24 09:14:01 +05:30
Gregory Hainaut 1853d0d16d gsdx: no depth lookup optimization
Don't lookup a depth buffer if depth test is always pass without write

Boost performance on Tekken5 when depth emulation is enabled in openGL
(Tekken5 sets same address for both the RT and the depth but depth is disabled)

v2:
Keep ds if DATE is enabled (some implementation uses a stencil buffer)
Be more aggressive to avoid an useless depth lookup
2016-02-18 20:35:50 +01:00
Gregory Hainaut 78b73ba585 gsdx: avoid null pointer deferencement 2015-09-25 20:59:36 +02:00
Gregory Hainaut 5fb8c7e65c gsdx: initialize members in constructor of objects
A couple of useless members were removed too.

Also fix wnd initialization

Coverity:
CID 146955 (#1 of 1): Uninitialized pointer read (UNINIT)
18. uninit_use: Using uninitialized value wnd[i].
2015-09-23 09:46:53 +02:00
Avi Halachmi (:avih) 4474d4391b GSdx: capture - print recomended resolution and DAR to the console
This is the internal resolution which GSdx uses and recording at this resolution
is optimal, i.e. without any dumb scaling, with all relevant pixels and without
redundant pixels.

The resulting clip still doesn't have the correct aspect ratio set, but that's
just a property which can be set to the clip afterwards, which is where the DAR
becomes useful. Since it's usually anamorphic, when muxing later with the audio
use the DAR to set the playback aspect ratio.
2015-09-22 01:11:13 +03:00
Avi Halachmi (:avih) 3f81fc98dd gsdx: custom resolution - use 0 instead of 9 2015-09-22 01:00:53 +03:00
Jonathan Li 69d27dfb4b Merge pull request #829 from ssakash/rework_internalres
gsdx changes:
Remove native resolution checkbox from GUI and rework associated code
Small changes to Windows and Linux GUI
Support 8x native resolution
Fix custom resolution width less than native width use case
2015-09-21 20:12:47 +01:00
Gregory Hainaut b60dd9d1fe Merge pull request #814 from PCSX2/coverity-qa-high
Fix a bunches of coverity warning/errors.
2015-09-20 22:18:03 +02:00
Jonathan Li d4f6894e1b gsdx: Fix custom resolution and minor cleanup
This fixes the following issues when custom resolution is selected.
 - When the width is smaller than the native resolution width, the
   texture cache targets are removed on every Vsync signal, causing a
   black screen issue.
 - The texture cache code needs a 1 returned for the custom resolution
   upscale multiplier or there'll be some really funny graphical issues.

It also removes unnecessary GetConfig (which I think unconditionally
does a a file read on Windows) calls if the width was increased - the
upscale multiplier is already stored, and the custom resolution width
and height calls are now unnecessary.

Also fix some whitespace issues.
2015-09-20 07:49:46 +05:30
Akash b97018932d GSDX: Rework Internal Resolution function
upscale_multiplier function values have been changed to allocate native resolution and also move custom resolution to 9.
Remove the old native checkbox value and include Native in the combo box.
Internal GSDX functions have also been updated with this new update to the upscale_multiplier variable.
2015-09-14 10:26:27 +05:30
Gregory Hainaut cee0fde940 gsdx-tc: improve support of TEXA register
* Greatly reduce the number of clut read (factor 10x)
* Avoid to get wrong TEXA texture in the cache.
* Fix "jump depends on uninitialized variable" Valgrind warning.

Fix #748

I try my best to avoid any breakage of DX but please test it too.
2015-09-11 14:16:11 +02:00
Gregory Hainaut 2430abed33 gsdx: potential division by zero
CID 146833 (#2-1 of 2): Division or modulo by zero (DIVIDE_BY_ZERO)
divide_by_zero: In expression this->m_width / this->m_upscale_multiplier, division by expression this->m_upscale_multiplier which may be zero has undefined behavior.
2015-09-11 08:54:29 +02:00
Gregory Hainaut ac8f4e69d6 pcsx2|gsdx: avoid potential null deferencement 2015-09-11 08:54:29 +02:00
Gregory Hainaut 98c74879bf Merge pull request #718 from PCSX2/depth-color-direct-write
Depth color direct write
2015-08-10 15:50:48 +02:00
gabest11 49b3acea72 gsdx: texture size reduction in sw mode, fixes Stolen, less memory usage in general. 2015-08-05 19:11:41 +02:00
Gregory Hainaut 6cb0443227 gsdx: disable depth rendering if rt == depth
I used to disable the RT but it doesn't work well with 50cents. It seems
texture writes weren't propagated correctly to the depth buffer. Besides
the game write an alpha value whereas depth is 24 bits only...
2015-08-04 19:39:29 +02:00