Commit Graph

1908 Commits

Author SHA1 Message Date
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 c43b1ac201 gsdx tc: extend the fast invalidation hack to limit the size of target read
It actually removes the previous hack that read the full target.

Unfortunately snowblind engine game uses big target so the read is very big too (1280x448)
which is killer for the perf. Whereas the game requires only 24x12 texels

Give a 2x speed boost on Champion of Norrath !!!
2016-03-20 18:11:44 +01:00
Gregory Hainaut 46ff5dccff gsdx: be debug friendly 2016-03-20 16:15:00 +01:00
Gregory Hainaut a83b8d62ec gsdx linux: add a gui checkbox for the "fast texture invalidation" hack 2016-03-20 13:59:24 +01:00
Gregory Hainaut 7eb242d3ad gsdx-ogl: remove the ogl_texture_storage option
The previous commits make PBO faster for all drivers.
2016-03-19 01:00:52 +01:00
Gregory Hainaut 68aa182b16 gsdx-ogl: sort the texture upload code
I wanted to do a separate path for palette texture. So far, it isn't very
conclusive.
2016-03-19 00:58:58 +01:00
Gregory Hainaut 46a4d2dc47 gsdx-tc: add UserHacks_DisablePartialInvalidation for snowblind engine game
Games uses very special texture with a lots of repeating.

It is much faster to send the full texture rather than trying to partially invalidate it.

On my gs dump:
FPS: 29 => 68 !
2016-03-19 00:25:58 +01:00
Gregory Hainaut eb69522641 gsdx-ogl: optimize texture memory upload
Previous code was
1/ unpack texture into local buffer
2/ copy local buffer into gl buffer
3/ copy gl buffer to texture

New code is
1/ unpact texture directly into gl buffer
2/ copy gl buffer to texture

Perf increase (done in native)
DQ8:   255 -> 270 (+5%)
Colin: 126 -> 135 (+8%)
ZoE:   50  -> 54  (+8%)
2016-03-18 20:24:42 +01:00
Gregory Hainaut da741e294e gsdx-ogl: optimize GPU->CPU memory transfer size
Might help for snow engine game (a little)

Previous code use to read the full texture whereas now it will be limited
to the size of the useful data.
2016-03-18 20:24:42 +01:00
Jonathan Li b516c1001a windows: Set _WIN32_WINNT to 0x0600 (Windows Vista) 2016-03-13 13:41:16 +00:00
Jonathan Li 9ed9b2d8cd windows: Switch to DefaultPlatformToolset aka non-XP toolsets
Basically I ran
find . -name "*.vcxproj" -exec sed -i -e 's/_xp//' {} \;

This will likely break XP, but it paves the way on Windows for a PCSX2
that does not require the DirectX redistributables to be installed for
Windows 8, 8.1 and 10 users. Windows Vista and 7 users will still require
the DirectX redistributable files for XInput and XAudio, though PCSX2
should still be capable of running if a user does not actually use either
of them.
2016-03-13 12:04:28 +00:00
Gregory Hainaut 653998e005 gsdx: add vertex data offset in comment
Avoid to recompute them every time I want to decode the vertex stream
2016-03-12 15:53:38 +01:00
Gregory Hainaut de7d127c52 gsdx-ogl: create a small macro to load function pointers 2016-03-12 15:52:36 +01:00
Gregory Hainaut 95ef4e20f8 gsdx-ogl: load GL_ARB_viewport_array function pointer for the future 2016-03-12 15:52:36 +01:00
Gregory Hainaut 56c2e94daf gsdx-ogl: sort extension requirement
All GL4 extensions supported by DX10 class GPU will be soon mandatory

Namely:
* GL_ARB_copy_image
* GL_ARB_texture_barrier
* GL_ARB_clip_control
* GL_ARB_direct_state_access
* GL_ARB_separate_shader_objects
* GL_ARB_buffer_storage
2016-03-12 15:52:36 +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
Gregory Hainaut bc73195193 gsdx-ogl: pack more tightly the FS UBO
Merge TA vec2 + Af vec1 into a single vec4
2016-03-10 18:29:05 +01:00
Jonathan Li 3e278a2e75 Merge pull request #1197 from turtleli/gsdx-png
Gsdx: PNG screenshots (Windows), use libpng directly
2016-03-08 23:49:56 +00:00
Gregory Hainaut 7b8616ac7b gsdx-ogl: add function pointer for query object 2016-03-06 13:39:24 +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
Jonathan Li a97cbf038c gsdx-d3d9: Save screenshots as PNG files
v2: Avoid unnecessary memory copy
2016-03-02 22:57:17 +00:00
Jonathan Li d865efceb9 gsdx-d3d11: Save screenshots as PNG files 2016-03-02 22:57:16 +00:00
Jonathan Li cf939620ea gsdx-ogl: Save depth image as RGB and alpha images 2016-03-02 22:57:16 +00:00
Jonathan Li 97215008c9 ci|cmake|debian: Remove png++ build dependencies
GSdx now uses libpng directly. png++ is now unused, so let's remove it.
2016-03-02 22:57:15 +00:00
Jonathan Li ee5861efc8 gsdx: Remove non-PNG code
It's no longer in use.
2016-03-02 22:57:12 +00:00
Jonathan Li 38edd77034 gsdx-ogl:windows: Save screenshots as PNG files
v2: Add zlib directory to property sheet
2016-03-02 22:52:08 +00:00
Jonathan Li 87dcfbc645 gsdx-png: Use libpng directly instead of via png++
v2: Increase compression to maximum
v3: Add zlib to GSdx build dependencies
v4: Reduce memory usage
2016-03-02 22:48:54 +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 cb776d2f50 gsdx:atomic: better match the old if(!_interlockedbittestandset(&m_mapped, 0)) behavior
Thanks @turtleli
2016-02-23 18:43:44 +01:00
Gregory Hainaut f9b4ff17a5 gsdx: drop interlocked* function on linux 2016-02-22 19:12:50 +01:00
Gregory Hainaut a601991f91 gsdx: add atomic for transaction scope object 2016-02-22 19:12:50 +01:00
Gregory Hainaut f904cd6c4a gsdx: add atomic for SW Renderer
V2: fix assertion
2016-02-22 19:12:37 +01:00
Gregory Hainaut 9bbb0fe1f6 gsdx: add atomic for texture upload
V2: fix init of atomic flag object
2016-02-21 18:17:53 +01:00
Gregory Hainaut a66c911fed cmake: factorize debug/dev define 2016-02-21 16:17:10 +01:00
Gregory Hainaut 9ba470fc63 gsdx-ogl: properly handle t_float in GS
f8c442cf76 misses the swap of t_float in GS

Fix regression in Okami

Bonus: factorize VS_WILDHACK in the VS
2016-02-21 11:48:30 +01:00
Gregory Hainaut bef8447447 Merge pull request #1186 from PCSX2/gsdx-unoptimize-vs
gsdx-ogl: make VS more generic
2016-02-20 10:39:19 +01:00
Gregory Hainaut 6002719c8c Merge pull request #1185 from PCSX2/tekken5-fast-depth
gsdx: no depth lookup optimization
2016-02-20 10:24:21 +01:00
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 f8c442cf76 gsdx-ogl: make VS more generic
Texture coordinate could be dummy/float/int integral/int normalized.

Old behavior:
* VS was in charge to select the texture coordinate
* int integral format wasn't supported

New behavior:
* Always compute all formats
* FS will be in charge to select the good format

Impact:
* VS will be slightly slower but it reduces shaders permutation from
   little to 0 (won't be bad for CPU)
* FS speed isn't impacted as 2 separate code paths were already required
  to support both format
* Rasterizer will be 33% slower but unlikely to be the limited factor of
  the GPU
* In future we could directly use the integral format in the FS.

V2: remove useless PSin_t
2016-02-18 19:02:05 +01:00
Gregory Hainaut 0dadc124d3 gsdx-ogl: invert behavior of unsafe user hack
It would be on by default. Unsafe & fast path.

The hack is a security if someone encounters any issue

v2: update Windows gui file
v3: fix typo in tooltip and linux gui
2016-02-18 18:48:13 +01:00
netoale b910e20413 Update GSCrc.cpp
added french version of Simpsons The Game 0x5C1EBF61
2016-02-15 21:56:53 +01:00
refractionpcsx2 909584d473 GSDX: Disable Nvidia hack when in native res 2016-02-15 20:27:51 +00:00
Gregory Hainaut 8ae7f60b04 Merge pull request #1175 from PCSX2-Alpha/GSDX_stuffs
GSDX: Vertical frequency corrections and extra stuffs
2016-02-13 18:15:49 +01:00
Gregory Hainaut 77f9113301 gsdx-gl: use CONTEXT_FLAG_NO_ERROR_BIT_KHR to reduce driver overheard
Didn't test it yet as my driver is too old.

Note: might break the open source drivers.
2016-02-13 15:28:11 +01:00
Akash e810428c86 GSDX: Remove some old comments
Disgaea 2 intro FMV now works fine with/without upscaling. (confirmed
with rama)
2016-02-12 12:05:42 +05:30
Akash 465cfb4fad PCSX2-GSFrame: Make upscaling impact resolution values 2016-02-12 11:57:41 +05:30
Akash 67a7a63a36 GSDX: Add vertical frequency for all video modes 2016-02-12 05:28:30 +05:30