Commit Graph

2873 Commits

Author SHA1 Message Date
refractionpcsx2 4bc8bfc23e GSdx-DX: Rough port of texture switching from OGL 2015-07-01 09:30:20 +02:00
Gregory Hainaut 58ce7d4bb8 gsdx-ogl: emulate texture shuffle
GS doesn't supports texture shuffle/swizzle so it is emulated in a
complex way.

The idea is to read/write the 32 bits color format as a 16 bit format.
This way, RG (16 lsb bits) or BA (16 msb bits) can be read or written with
square texture that targets pixels 1-8 or pixels 8-16.
However shuffle is limited. For example you can copy the green channel
to either the alpha channel or another green channel.

Note: Partial masking of channel is not yet implemented

V2: improve logging
V3: better support of green channel in shader
V4: improve detection of destination (issue due to rounding)
2015-07-01 09:30:20 +02:00
Gregory Hainaut 2d812deb84 gsdx-tc: Depth and Target are interchangeable on the GS !!!
Extend the texture cache to search Color target in Depth target
2015-07-01 09:30:20 +02:00
Gregory Hainaut 76160505f7 gsdx-tc: add an option to avoid blow up dx :p
texture_cache_depth = 1 (default for openGL)
2015-07-01 09:30:20 +02:00
Gregory Hainaut 74d84aafb5 gsdx-tc: allow to search the depth in the old target list
Yes it is possible on PS2 world
2015-07-01 09:30:20 +02:00
Gregory Hainaut b59a347ad7 gsdx-tc: allow to use depth buffer as input texture 2015-07-01 09:30:20 +02:00
Gregory Hainaut 49516cbbca gsdx-tc: allow to invalidate the depth/target if it is used as target/depth
It is requires when game will uses sometimes an address as a RT sometimes as a depth
2015-07-01 09:30:20 +02:00
Gregory Hainaut 35081f922a gsdx: GS kinds of support draw without framebuffer
Gow uses 24 bits buffer, so only color is updated but blending is configured as Cd
so it is a NOP

In this case, we don't lookup the target in the texture cache. It reduces the complexity
to handle depth which can be located at same address as RT

Note: please test DX renderer
2015-07-01 09:30:20 +02:00
Jonathan Li b96609cb51 onepad: fix possible dereference of deleted pointer
onepad will dereference conf after it has been deleted if a PADinit,
PADshutdown, PADinit sequence takes place.
2015-06-29 20:53:00 +01:00
refractionpcsx2 c659b1aa18 Merge pull request #617 from ssakash/patch-26
Console log message for current renderer.
2015-06-28 13:24:09 +01:00
bositman 59a66f87c3 Merge pull request #611 from turtleli/fix-toggling
Fix renderer toggling behavior and other related stuff
2015-06-26 16:34:02 +03:00
Gregory Hainaut 0c2dcf26f2 Merge pull request #598 from turtleli/wxwidgets3_prep
Changes to make transition to wxWidgets3.0 on Windows easier
2015-06-26 15:18:13 +02:00
Jonathan Li acc6ad59ba GSdx: Use correct renderer after config change
Rework the renderer selection logic to reload the saved renderer after
it's been changed in the config panel and to properly detect whether a
renderer toggle has been requested.
2015-06-26 00:50:07 +01:00
Akash 4b472bb461 Console log message for current renderer. 2015-06-25 20:15:45 +05:30
Akash 1d4dff9e42 Remove break statement (return already ends the function execution) 2015-06-25 19:48:22 +05:30
Gregory Hainaut f3c0c1bb88 gsdx-ogl: TexParamami is provided in core 2015-06-25 10:25:57 +02:00
refractionpcsx2 42b1f81b8e dev9ghzdrk: I've got a good idea, lets not match the host mac ;) 2015-06-24 23:42:28 +01:00
refractionpcsx2 cc6ebff48e dev9ghzdrk: Update the virtual_mac too (bridged?) Won't hurt either way! 2015-06-24 22:14:50 +01:00
Gregory Hainaut 8393ba56d6 gsdx-ogl: rework palette texture handling
Redirect the red channel to alpha channel for 8 bits texture.

It avoid special management in the shader
2015-06-24 19:50:09 +02:00
Gregory Hainaut cd4c8b5ce4 gsdx-debug: resolve alpha equation in the dump file 2015-06-24 19:42:53 +02:00
refractionpcsx2 819133ee45 dev9ghzdrk: Make the MAC truely unique, fixes issue #552
-Version bump to reflect the awesomeness
-Put most of the mac variables in one place (not that they do much)
2015-06-24 01:36:01 +01:00
refractionpcsx2 ee9b1caaa4 GSdx-hw: Custom res native mixup stuff, best fix this one too. 2015-06-23 19:43:04 +01:00
Akash 85c4184ea5 swap value functions for Round sprite hack. 2015-06-23 20:07:46 +05:30
refractionpcsx2 ad71ca4cc8 GSdx-hw: Make sure custom resolution doesn't affect Native Resolution 2015-06-22 17:23:47 +01:00
bositman eb0f6eb953 Merge pull request #607 from TheLastRar/dev9settings
dev9ghz: Use .ini for saving settings and delete old registry keys
2015-06-22 17:35:37 +03:00
TheLastRar dcd477f2b6 dev9ghz: Look in registry for settings first
If settings found in the registry, create ini, fill with settings and
then delete the settings stored in the registry.

If no settings found in registry, load from ini.
2015-06-22 15:13:18 +01:00
Gregory Hainaut 7135867119 gsdx: very old typo on option name
Windows uses Renderer with an uppercase R
2015-06-20 16:18:10 +02:00
Jonathan Li 283d4fa57c Use wc_str for Windows only code
This fixes the build for wxWidgets 3.0. The paths are Windows specific,
so c_str and WX_STR already evaluate to a wide string in wxWidgets 2.8.
2015-06-19 22:14:47 +01:00
TheLastRar 0be0f13acf dev9ghz: delete leftover registry keys 2015-06-19 15:46:51 +01:00
TheLastRar 0d04ee440d dev9ghz: fix a typo... 2015-06-19 15:39:49 +01:00
Gregory Hainaut b44bccec6a gsdx: fix previous commit with a scaling factor 2015-06-18 23:02:40 +02:00
Gregory Hainaut 5bc8f046b2 gsdx: fix snow engine issue in native resolution 2015-06-18 21:21:25 +02:00
Karasuhebi 4d1ca4bb76 Changes in title bar: DX -> D3D
Changed the name of the Direct3D renderers so they would match the way
they are named in GSdx's Plugin Settings window. Also changed a printf
to say OpenCL instead of opencl.
2015-06-18 13:00:29 -04:00
Gregory Hainaut ab6f26ff4d Merge pull request #606 from turtleli/gsdx-title-renderer
GSdx: Add renderer type to title bar
2015-06-18 09:49:26 +02:00
refractionpcsx2 f5e8503fa5 GSdx: Didn't need to change this :P 2015-06-17 22:41:16 +01:00
refractionpcsx2 c31c04d3db GSdx: Fix CRC hacks not re-initialising after option change 2015-06-17 22:25:43 +01:00
refractionpcsx2 0b5e0df35d Epic fail Visual Studio! 2015-06-17 22:11:06 +01:00
refractionpcsx2 fc24f039a8 GSdx: Add CRC Management to Windows Dialog.
- Clean up tooltip
- Remove Auto Skip Depth and Disable CRC checkboxes
2015-06-17 22:06:18 +01:00
Jonathan Li e182251fbc GSdx: Add renderer type to title bar 2015-06-17 21:59:05 +01:00
Gregory Hainaut 1d84af573d ofc I didn't test previous commit ater the merge... 2015-06-17 21:55:37 +02:00
Gregory Hainaut b2f8fe3593 gsdx: drop the auto skip depth hack
Just use 1 in skip draw if you want to use it

openGL code will soon be fixed to support depth correctly (and I hope dx in the future)

Conflicts:
	plugins/GSdx/GSState.cpp
	plugins/GSdx/GSState.h
2015-06-17 21:53:08 +02:00
TheLastRar 5f068ec46a dev9ghz: Use .ini for saving settings
Import settings from the registry if needed.
2015-06-17 19:24:48 +01:00
Gregory Hainaut 263583ebcc Revert "gsdx-ogl: enable again geometry shader on Mesa"
This partially reverts commit e774fecb77.

Fix issue #605
2015-06-16 18:33:22 +02:00
Gregory Hainaut c1d39a5f57 gsdx-ogl: drop UserHacks_DateGL4
Initial goal was to avoid slowdown in buggy driver
2015-06-16 09:57:45 +02:00
Gregory Hainaut 62beb3aaf4 gsdx: don't do bad stuff if aggressive hack isn't enabled 2015-06-14 10:27:02 +02:00
Gregory Hainaut f765a195e2 gsdx: Don't set CRC function pointer when disabled
Less costly than an extra check for each draw calls
2015-06-14 10:27:02 +02:00
Gregory Hainaut 1699289162 gsdx: move 4 hacks from level2 to level3
remains tons of them :(
2015-06-14 10:27:02 +02:00
Gregory Hainaut 1be8d07f85 gsdx: auto CRC management
Old way various check boxes to configure the plugin

New way an unified drop down list

* Level 0 (dev only) => disable (mostly) all hacks and auto skip depth.
* Level 1 (dev only ) => enable oi/oo/cu hacks, others remains disabled
* Level 2 (GL) => enable most hacks except a couple of one that were fixed on openGL (speed impact)
* Level 3 (DX) => enable all hacks
* Level 4 => enable also aggresive CRC

Note: windows gui must be updated, and it will be nice to create a global tooltip
2015-06-14 10:27:02 +02:00
Gregory Hainaut c6220bf836 gsdx-debug: print an error on unsupported draw call
Typically GTA
2015-06-14 10:27:02 +02:00
TheLastRar d0af2033e9 Dev9ghz: Respect user Log dir setting, use PluginLog
for logging as it checks if log file was created/opened successfully
Enable full logging in debug builds.
2015-06-11 23:18:25 +01:00
Gregory Hainaut c11ac928ba Merge pull request #599 from ssakash/patch-12
inclusion of jap version of dr2 in gscrc.cpp
2015-06-11 09:45:41 +02:00
Gregory Hainaut 237ffcf796 gsdx-ogl: Make GL_ARB_draw_buffers_blend optinal for limited DX10 drivers 2015-06-10 22:55:27 +02:00
Akash 343ecca6ba crc hack 2015-06-10 20:13:27 +05:30
Gregory Hainaut cbcb7962ce Merge pull request #593 from turtleli/gsdx-cleanup-and-fixes
Gsdx cleanup and fixes
2015-06-10 08:14:44 +02:00
Jonathan Li b1acc08c58 GSdx: Linux: Fix wording 2015-06-09 19:30:16 +01:00
Gregory Hainaut 4e82073bfc gsdx-ogl: improve setting bilinear of palette
Instead to disable it, uses GS settings
2015-06-09 09:53:50 +02:00
i30817 4e7e7f2dd5 Nocturne, DDS1 and DDS2 CRC hacks to remove motion blur and smudge filter
Signed-off-by: i30817 <i30817@gmail.com>
2015-06-09 00:25:33 +02:00
Gregory Hainaut 2503d9698c gsdx-ogl: re enable bilinear fitlering on palette for paltex mode
However keep it disabled for StarOcean 3 use cases
2015-06-08 21:01:18 +02:00
refractionpcsx2 95c2622b7f Gsdx: Typo'd! 2015-06-07 18:31:51 +01:00
refractionpcsx2 b5171dfe5d Gsdx: De-crapify Native resolution, potential fix for custom resolutions. 2015-06-07 16:57:55 +01:00
refractionpcsx2 0946958acf Gsdx: Height change on Gregory's recommendation :) 2015-06-07 16:12:14 +01:00
Gregory Hainaut c3c29945b2 gsdx-ogl: only set a cst blend factor when Ad is used
Fix GT4 and potentially FFX
2015-06-07 16:10:59 +02:00
Gregory Hainaut 5daf7aa98f gsdx-debug: keep s_n/pop in sync 2015-06-07 12:39:48 +02:00
Gregory Hainaut 5bf5b5bca4 gsdx-ogl: extend StretchRect to write in depth texture
It will allow to convert color texture to depth texture
2015-06-07 12:39:23 +02:00
Gregory Hainaut 0518aaedc9 gsdx-ogl: unattach palette to avoid noise in debug 2015-06-07 12:39:15 +02:00
Gregory Hainaut 23f8203a22 gsdx-ogl: add some shaders to convert depth <-> color
I'm afraid of rounding error
2015-06-07 12:39:00 +02:00
Gregory Hainaut a5fe8478ae Merge pull request #575 from PCSX2/gsdx-half-screen-snow-engine-v2
gsdx-texture-cache: Improve fix for snow engine game
2015-06-07 10:18:56 +02:00
refractionpcsx2 0a467291f9 Gsdx: Height thing didn't work so well, using old buffer width test again 2015-06-07 03:50:34 +01:00
Gregory Hainaut 0e3349f953 Merge pull request #590 from PCSX2/OpenGL-printf-corrections-removed-shadow-hearts-crc
OpenGL printf wording corrections, removed Shadow Hearts CRC
2015-06-06 21:56:07 +02:00
bositman 1de58349c5 Bleh 2015-06-06 22:39:34 +03:00
bositman 8d61ab2af2 OpenGL printf wording corrections, removed Shadow Hearts CRC (not used anymore in GSstate)
Some minor grammar fixes to OpenGL prints and removed Shadow Hearts CRC
which has been left behind
2015-06-06 22:28:59 +03:00
refractionpcsx2 1fa13163e4 GSDX: Fix for games which change height but keep the same buffer width
- Fix for games that specify a double height, like Pool Paradise
2015-06-06 20:24:10 +01:00
Gregory Hainaut c3dc51826f Merge pull request #541 from TheLastRar/master
DEV9ghzdrk - thread safer calls to DEV9irq
2015-06-06 10:47:32 +02:00
Gregory Hainaut 97467f9e30 Merge pull request #579 from PCSX2/drop-vs2010-support
Drop vs2010 support
2015-06-06 10:47:16 +02:00
Gregory Hainaut 68e44fd354 gsdx: reload the state when GSconfigure is called
It fixes the reloading of openGL option and it avoids
issue during pause/resume.

Fix issue #584
2015-06-06 08:51:53 +02:00
Gregory Hainaut 7e662c50d4 Revert "gsdx: always restore the full gs state object (s_gs)"
This reverts commit 2ea049b5a5.
2015-06-06 00:22:15 +02:00
Gregory Hainaut 4feeaac7d1 Merge branch 'alignment' of git://github.com/xsacha/pcsx2 into xsacha-alignment
Gregory: Get all changes but keep C11 code path which will be the future
 (if someone can find info on Visual Studio support)
* Keep the old posix api to use address sanitizer on gcc 4.9

Conflicts:
	common/build/Utilities/utilities.vcxproj.filters
	common/build/Utilities/utilities_vs2012.vcxproj.filters
	common/build/Utilities/utilities_vs2013.vcxproj.filters
	common/include/Utilities/MemcpyFast.h
	common/include/Utilities/StringHelpers.h
	common/src/Utilities/AlignedMalloc.cpp
	common/src/Utilities/vssprintf.cpp
	plugins/GSdx/stdafx.cpp
2015-06-05 20:31:14 +02:00
Gregory Hainaut e774fecb77 gsdx-ogl: enable again geometry shader on Mesa
Please use a recent Mesa version (10.5 if possible)
2015-06-05 18:59:10 +02:00
Gregory Hainaut 6c8f7a0147 Merge pull request #580 from PCSX2/issue-565-option
gsdx: always restore the full gs state object (s_gs)
2015-06-05 17:51:02 +02:00
Gregory Hainaut 7d124e6a83 gsdx-texture-cache: Improve fix for snow engine game
Instead to hardcode the half-buffer size to 0x140, the new code
compute it.

To avoid regression, I limit the code to big target (>= 1024 pixels)
2015-06-05 09:06:12 +02:00
refractionpcsx2 65b83a36a7 GSDX: Removed some printf's I left in. 2015-06-05 00:13:21 +01:00
refractionpcsx2 91f775f3f0 GSDX: Fixed up some of the scaling height settings
-Last commit broke Snowblind games again
-Width now based on output circuit
-Try to use the smallest possible while being at least the size of the screen
2015-06-05 00:12:15 +01:00
Gregory Hainaut 6f4ec98bc3 gsdx: try to reduce the size of target as much as possible
I suspect too consume too much memory (issue #576)
2015-06-04 22:15:52 +02:00
Gregory Hainaut f8f6117ea9 gsdx-debug: allow to track texture move
Very painful for the cache and the performance
2015-06-04 22:10:04 +02:00
Gregory Hainaut 979ea92754 gsdx: make png++ optional
Some distributions (Fedora) doesn't have a png++ package...
2015-06-04 20:22:05 +02:00
Gregory Hainaut bd2c04a0ec ooups bad copy/past 2015-06-04 19:58:58 +02:00
Gregory Hainaut 2ea049b5a5 gsdx: always restore the full gs state object (s_gs)
It will force a reload of opengl option
2015-06-04 18:29:31 +02:00
Gregory Hainaut c2e851b3a5 gsdx-ogl: don't use slow SW blend for nothing
When A == B, coeff is 0 so <= 1
When C == 2, just check the value of coeff

Barely faster in accurate_blend = 2
2015-06-04 18:18:47 +02:00
Gregory Hainaut ba5b367ae8 drop support of Visual Studio 2010
* Severals PR uses C++11 features
* 2015 will soon be released
* Win 10 will soon be released

Time to upgrade
2015-06-04 08:55:22 +02:00
Gregory Hainaut 85266abd71 gsdx-ogl: use a 8MB vbo/ibo
Dirge of Cerberus draw 143,360 vertices in a single draw!

It is likely to emulate a particle effects

Hopefully improve issue #573
2015-06-04 08:28:40 +02:00
bositman e34477a497 Merge pull request #547 from pgert/master
GSdx > HW-hacks > Rewording comments on duplicate CRC's and minor cleanup
2015-06-03 15:58:28 +03:00
Gregory Hainaut 0d5d94f56e Merge pull request #570 from ssakash/patch-3
Three new Opengl settings for Windows [GUI]
2015-06-03 14:01:39 +02:00
Gregory Hainaut 3dd3bf6e2b gsdx-ogl: new hidden option accurate_blend = 2
Debug option to emulate all blending draw call in the shader

Of course it is slow but it is very accurate
2015-06-03 09:56:07 +02:00
Gregory Hainaut cd6c93cd9e gsdx: silly mistake 2015-06-03 09:31:52 +02:00
Akash f2d193edcf Add three new Opengl options. 2015-06-02 16:02:56 +05:30
Gregory Hainaut 995ae51bf4 gsdx-ogl: disable a log message
Too verbose and code was fixed anyway
2015-06-02 09:28:35 +02:00
Gregory Hainaut 9fe13f7a6b gsdx linux: fix a memory leak
Not important but pollute the valgrind log
2015-06-02 09:28:35 +02:00
refraction 4914620178 GSDX: Fix for 6x Native, fixed GH3 in native mode taking up quarter of the screen after the snowblind changes 2015-06-01 19:04:39 +01:00
Gregory Hainaut 2cbde89084 Merge pull request #555 from PCSX2/real-fb-format
GSdx: better framebuffer format
2015-06-01 11:48:07 +02:00
Gregory Hainaut f81cf360bc Merge pull request #545 from PCSX2/gsdx-half-screen-snow-engine
Gsdx half screen (most of) snow engine games
2015-06-01 11:47:40 +02:00
Gregory Hainaut 9fa473a57d gsdx-ogl: glDebugMessageCallback is optional
Not even used in release build
2015-05-31 17:55:34 +02:00
Gregory Hainaut 9d69ff1f91 gsdx-debug: create the savef option
The idea is to easily extract bad frame from gs dump and to compare them
with the sw renderer.

Here the summary of the options:
savet => dump all input textures
save  => dump the render target
savez => dump the depth buffer
savef => dump the frame
2015-05-31 17:38:52 +02:00
Gregory Hainaut d301848848 gsdx-ogl: fix paltex on opengl
RT uses as palette must use the alpha channel

Palette texture uses the red channel
2015-05-30 19:01:09 +02:00
Gregory Hainaut 2f2ae2bc89 gsdx-ogl: enable gl tracing on windows
Trace info is enabled in dbg/dev build for the opengl renderer

Info is stored in GSdx_opengl_debug.txt when debug_opengl option is 1
2015-05-30 09:58:47 +02:00
Gregory Hainaut 009dd103ae gsdx-ogl: protect the trace with if statement
And mark the function as optional
2015-05-30 09:58:46 +02:00
Gregory Hainaut a639634769 gsdx-ogl: actually code use 4.0 GL_ARB_draw_buffers_blend
It is used for glBlendEquationSeparateiARB && gl_BlendFuncSeparateiARB

The 3.0 function could work too. It just need to be added
2015-05-30 09:58:46 +02:00
Gregory Hainaut 92d68b70d3 gsdx-ogl: add a performance note for later
The idea will be to replace StretchRect for standard case with a framebuffer
blit. Potentially it toggles less gl state.

Worth a test on Star Ocean 3 that uses a lots this function for stencil emulation
2015-05-30 09:58:46 +02:00
Gregory Hainaut 01e4a5148d gsdx-ogl: avoid crash in debug/dev build
Don't be silly, don't put gl trace in EE thread.
2015-05-29 16:50:27 +02:00
Gregory Hainaut 0cb6c37f14 gsdx-tc: add an explanation of the magic number 0x140 2015-05-29 12:27:05 +02:00
refraction 97b237712c gsdx: detect RT size based on fb size and gs output configuration
* It is required for snowbling games
* Targets of Texture cache are dropped.
2015-05-29 12:26:44 +02:00
Gregory Hainaut 02274601b3 gsdx-ogl: always copy texture into 0,0 2015-05-29 12:18:54 +02:00
Gregory Hainaut e5326d1bd2 gsdx-tc: allow to reuse the right part of large RT as source 2015-05-29 12:18:54 +02:00
Gregory Hainaut 7ac533a4d1 gsdx-tc: invalidate half-RT src
snow engines uses the RT as 2 half RT.
2015-05-29 12:18:54 +02:00
Gregory Hainaut da0b77e09b gsdx-ogl: new logo
Thanks bmate for the logo.

Close issue #192
2015-05-29 11:05:52 +02:00
refraction 8f54da5fd3 GSDX: Removal of Nvidia hack.
- Hack no longer required as an option as a safe and simple workaround has been discovered which seems to work without modifying any vertices.
2015-05-28 21:41:02 +01:00
refraction 5d00c00826 GSDX: Fixed UserHacks_AutoSkipDrawDepth dialog creation on windows.
- CheckDlgButton was just wrong
- Changed tag to say "Auto-skip depth" as you could only see "Auto-skip draw" which was highly ambiguous on GSDX!
2015-05-28 21:21:19 +01:00
TheLastRar 66b08c0b2f Use Mutex to control writes to the RX_Frame counter
A user on http://obsrv.org had an issue with freezing, unfreezing than
dying on other players screen, but can continue playing anyway. This
comment didn't end up fixing the issue of becoming a ghost, but he
didn't freeze.
2015-05-28 20:22:38 +01:00
Gregory Hainaut 31ffdd8c53 Merge pull request #559 from ssakash/patch-5
Auto depth skip hack initialization.[GUI]
2015-05-28 19:21:45 +02:00
Gregory Hainaut 8e32d71c07 Merge branch 'patch-3' of git://github.com/ssakash/pcsx2 into ssakash-patch-3 2015-05-28 18:30:49 +02:00
Akash 5f7e09268c change "D3D Internal Resolution" to "Internal Resolution" 2015-05-28 16:33:16 +05:30
Akash bf743fec17 add logo for Opengl renderer. 2015-05-28 01:34:51 +05:30
Gregory Hainaut c43ddaec4f gsdx: add Castlevania hack explanation 2015-05-26 17:03:13 +02:00
Gregory Hainaut 419dfe0544 glsl: redo color/alpha management correction
Please test it!

GS supports 3 formats for the output:

32 bits: normal case
=> no change

24 bits: like 32 bits but without alpha channel
=> mask alpha channel (ie don't write it anymore)
=> Always uses 1.0f as blending coefficient

16 bits: RGB5A1, emulated by a 32 bits openGL texture. I think it will be more correct to use
a real 16 bits GL texture. Unfortunately it would cost several (slow) target conversions.
Anyway as a current solution
=>  apply a mask of 0xF8 on color when SW blending is used (improve Castlevania shadow)
unfortunately normal blending mode still uses the full range of colors!

This commit also corrects a couple of blending factor. 128/255 is equivalent to 1.0f in PS2, whereas GPU uses 1.0f. So the blending factor must be 255/128 instead of 2

Note: disable CRC hack and enable accurate_colclip to see Castlevania shadow ^^
(issue #380).
Note2: SW renderer is darker on Castlevania. I don't know why maybe linked to the 16 bits format poorly emulated
2015-05-26 16:49:43 +02:00
Akash ef3247c233 Update copyright license 2015-05-26 19:15:30 +05:30
Akash 99f9407c24 Auto depth skip hack initialization. 2015-05-26 19:13:56 +05:30
Gregory Hainaut 9ee3a173d0 gsdx-ogl: use a local ALPHA register
It would allow to easy tune the parameter to support 24 bits format
2015-05-26 15:36:48 +02:00
Gregory Hainaut d31bd97d59 gsdx-ogl: add a variable to select FB output
Either 32bits/24bits/16bits
2015-05-26 14:59:07 +02:00
Gregory Hainaut 93c0d5a268 gsdx-ogl: add an error message when a RT is reused with a format cast
For example a 32 bits RT could be used as a 16 bits RT.

It is likely the source of various bug in HW renderer
2015-05-26 11:16:49 +02:00
Gregory Hainaut a3bbe68d56 gsdx: throw an exception when we miss a mandatory gl feature
Gracefully quits when driver is not supported
(like nvidia legacy driver for GTX260)

Please test the impact on windows
2015-05-26 11:03:59 +02:00
Gregory Hainaut 3be5a6036b gsdx-ogl: remove assertion + debug message
opengl use a different object to compute the vertex count
2015-05-26 11:03:59 +02:00
refraction b84a462798 Unreachable code message was annoying me. 2015-05-26 00:30:12 +01:00
Gregory Hainaut 2704a65f57 gsdx: add some info for Star Ocean3/Valkyrie Profile 2/Radiata Stories
Feel free to test those games with CRC disabled on the openGL renderer (native resolution)
2015-05-25 12:37:48 +02:00
Gregory Hainaut 580d177951 gsdx: improve commit 11708486d8
This time linear filtering is disabled only for the bad draw call
(RT used as a palette texture).
2015-05-25 09:46:51 +02:00
Gregory Hainaut 99d7434671 gsdx-ogl: disable SSO on nouveau 2015-05-24 19:24:10 +02:00
Gregory Hainaut 11708486d8 gsdx: allow to control the filtering of texture cache
When the RT is used as an input texture, we need to rescale it.

Previous behavior was to always uses a linear filtering (more smooth).
Unfortunately it broke some games that expected an exact value like Star Ocean 3

This commit will disable the linear filtering in normal filtering mode (filter = 0
or filter = 2)

This way, shadow of Star Ocean 3 will appear correctly in upscaling (not
100% perfect but can't do better)

Note: SO3 only requires a nearest sampling of the alpha channel but
I don't know the behavior for others games.
2015-05-24 18:59:27 +02:00
Gregory Hainaut b0af54d33e gsdx-ogl: better support of palette
The purpose of the code is to support alpha channel
of RT uses as an index for a palette texure.

I'm afraid that code will likely break pure palette texture. Only used
if paltex is enabled

It fixes missing shadow in Star Ocean 3 (issue #374) in Native resolution
with filter = 0  (no filtering) or = 2 (normal fitering)

Rendering explanation:
The game emulates a stencil buffer with the alpha channel

The alpha channel of the RT can contains a palette texture index (format 4HH)
The idea is to have a gradient of value in the palette (16/32/48/...).
This way you can implement a +16/-16 and even wrap the alpha value every time
you hit the pixel.

Bilinear filtering breaks the rendering because it interpolates between counts
so you doesn't have the exact count

Upscaling breaks the rendering because the RT is reused as an input texture. It means
that we need to scale it down which again create some interpolations.
2015-05-24 18:07:16 +02:00
Gregory Hainaut 951a1fed94 gsdx-hack: enable auto skip of depth texture for God of War
Rendering is quite complex to emulate on the GPU due to several limitation.
Until we find a solution let's enable the old solution

You could find a description of the rendering here:
http://forums.pcsx2.net/Thread-God-of-War-Red-line-rendering-explained
2015-05-24 13:43:36 +02:00
Gregory Hainaut a70c3bf5de glsl: correct the alternate implementation of ps_main1
Still not yet enabled by default

Potentially it can be optimized with the dot product but special care
need to be taken to ensure float accuracy.

Bonus: it could work on old GPU (aka DX9)
2015-05-24 13:43:36 +02:00
Gregory Hainaut c82fd94c6c gsdx-debug: use GL_INS instead of printf 2015-05-24 13:43:36 +02:00
Gregory Hainaut c01686d252 gsdx-png: add a fixme message for 16 bits by channel image 2015-05-24 12:51:20 +02:00
Gregory Hainaut 7f614401a6 gsdx-ogl: set accurate_blend as default
Rendering is better and I think speed impact remains small.
2015-05-23 15:10:04 +02:00
Gregory Hainaut c507e816c2 gsdx-ogl: oups forget a break 2015-05-23 13:06:23 +02:00
Gregory Hainaut b884e0c0c0 gsdx-debug: improve debug experience
* Dump context before the increase of s_n
  => aligned with the global call number
* Don't print colclip not supported when it is optimized away
* dettach the input texture when it is useless
  => avoid to show a wrong texture in the debugger
2015-05-23 12:23:05 +02:00
Gregory Hainaut f665180d11 gsdx-debug: use hex number for texture pointer
Easier to grep
2015-05-23 12:20:26 +02:00
Gregory Hainaut 7609fdc576 gsdx: rename too much sr to sRect 2015-05-21 09:48:15 +02:00
Gregory Hainaut b52ee6f1f6 gsdx-linux-gui: add an option for accurate color clipping
Note: it is only for debug purpose

Sotc testcase 187 fps => 125 fps (2x scaling)
2015-05-20 09:42:22 +02:00
Gregory Hainaut 183af4ece6 gsdx-ogl: don't enable SW blending when there is no blending
Mostly to avoid useless message
2015-05-20 09:36:01 +02:00
Gregory Hainaut 3d35e4f8ec gsdx-ogl: implement all blends mode in shader
+ 250 lines !!!
2015-05-20 09:11:36 +02:00
Gregory Hainaut 2d54d59add gsdx-ogl: update assertion ps sel is 8B now 2015-05-20 08:40:08 +02:00
Gregory Hainaut d3d5a436ea gsdx-ogl: add code to read back depth texture 2015-05-20 08:07:40 +02:00
Gregory Hainaut a4c74ef872 gsdx-ogl: disable GL_DITHER
I really don't know the impact but it is not supported with integer texture.
2015-05-20 08:05:27 +02:00
Gregory Hainaut 8d3e3e6c5b gsdx-ogl: more blend rework to support accurate_colclip
So far few blending equations are implemented in PS. It is only
for test the behavior on GoW
2015-05-20 08:00:40 +02:00
Gregory Hainaut c5341a2711 gsdx-ogl: update blending management
This way it will allow to implement all blendings operartion in FS.

Of course it will be slow, but it would be nice for debug and quickly check
game error rendering.
2015-05-20 00:12:52 +02:00
Gregory Hainaut 358e0d445b gsdx-ogl: add a shader to convert depth texture into uint 2015-05-19 18:56:32 +02:00
Gregory Hainaut ac38ebbf29 Merge pull request #546 from ssakash/patch-3
enables Anisotropic filtering option for OGL (HW mode) [Windows UI]
2015-05-19 15:20:12 +02:00
Gregory Hainaut ec45090358 glsl: implement an alternative of convert 1 shader
Code not yet enabled. Quick test show no heavy regression but I need
to carefully validate it.
2015-05-19 13:14:18 +02:00
Gregory Hainaut a12acc0d24 gsdx-ogl: clean a bit Texture Cache OGL
Add a placeholder for depth format but nothing done yet.
2015-05-19 13:14:18 +02:00
Gregory Hainaut 1837001e75 gsdx: extend CopyOffscreen with a new shader parameter
Currently we're trying to infer the conversion shader based on the output format

It only works if the input data is RGBA8. It might not be true in the future
2015-05-19 13:14:18 +02:00
Gregory Hainaut 9554b5dd56 gsdx-lzma: drop CONCAT flag
I have some issue with it. Unlikely to use multi-stream gs anyway
2015-05-19 13:14:18 +02:00
Gregory Hainaut fa761a129d gsdx-linux: add an option to enable/disable recording
Avoid to kill the computer/application if the user press F12 by accident
2015-05-19 13:14:18 +02:00
Gregory Hainaut 34202933da GSdx-linux-recorder: add various option to control it 2015-05-18 19:57:21 +02:00
Gregory Hainaut 388f46b577 gsdx-png: use array interface instead of set_pixel
Doc says it is "non-checking equivalent of set_pixel". Still slow as ass

At least syntax is nicer
2015-05-18 17:25:14 +02:00
Gregory Hainaut a4d6722b26 gsdx-thread: add a CAPACITY parameter to GSJobQueue 2015-05-18 17:08:18 +02:00
Gregory Hainaut e7665ee7dd gsdx-linux-recorder: upgrade code to use n threads
Unfortunately it requires too much memory (easily 6GB)
2015-05-18 16:56:44 +02:00
Gregory Hainaut cff168e002 gsdx-linux-recorder: implement multithread to save the image
Currently only a dedicated thread. It is still too slow!
2015-05-18 16:56:44 +02:00
Gregory Hainaut 012f1b4f05 gsdx-thread: remove deprecated boost code 2015-05-18 16:55:49 +02:00
Gregory Hainaut 19d9349b0b gsdx-debug: remove old assert 2015-05-18 16:45:38 +02:00
pgert c9508298b4 Update GSCrc.cpp 2015-05-18 16:37:28 +02:00
Akash 70b8772bb4 enables Anisotropic filtering option for Opengl (Hardware mode) [Windows UI] 2015-05-18 19:16:22 +05:30
Gregory Hainaut 503459798a gsdx-linux: add a basic implementation to record the gameplay as png file
The idea was to merge them later with ffmpeg or other external tool

It kinds of work but current fps is around 2 !!! So not really usable

The speed issue is related to PNG.

So either the code to store pixels data must be optimized. Or maybe it misses some MT loves :)
2015-05-18 11:56:20 +02:00
Gregory Hainaut 2783da4a22 gsdx-ogl: use a local buffer to store offscreen texture
It will allow to read texture in // (and potentially could be useful
for recording)
2015-05-18 11:29:04 +02:00
Gregory Hainaut 79a9254894 gsdx-ogl: print some error messages if extenal shader is wrongly configured 2015-05-18 10:56:32 +02:00
Gregory Hainaut 540717b295 gsdx-ogl: don't force logz only on debug build 2015-05-18 07:24:26 +02:00
Gregory Hainaut 5c046180a1 cmake: properly add detection of lzma
Code is 100% optional.

Code will allow be enabled if lzma-dev is installed at compile time
2015-05-17 22:08:10 +02:00
Gregory Hainaut 98dde32dc0 gsdx-replayer-linux: use new code to allow loading of .gs.xz dump
A bit slower at startup but it saves a lots of disk space!

Reduce the size of my gs collection of 11GB :)
2015-05-17 22:08:10 +02:00
Gregory Hainaut e93f780268 gsdx-replayer-linux: separate a bit parsing and executing code
It would ease the porting of the code to read xz file
2015-05-17 22:08:10 +02:00
Gregory Hainaut 86e3c18c33 gsdx-linux: add code to read xz file
Linux only to avoid the extra dependency on windows
2015-05-17 22:08:10 +02:00
Gregory Hainaut 5cfb496700 gsdx-ogl: only open debug file once 2015-05-17 14:43:56 +02:00
Gregory Hainaut 7979dec5b0 gsdx-ogl: optimize colclip 0
Currently colclip uses 2 passes to wrap the output of blending unit

However some blending mode are only a plain copy (of 0 or Cs or Cd).
So no overflow of [0:255], no need to wrap it

Note: I saw those cases in GoW.
2015-05-17 13:05:08 +02:00
Gregory Hainaut 6ced837360 gsdx-debug: add some PERF info in trace
The idea is to detect easily effect that are known to be slow on opengl
2015-05-17 13:05:08 +02:00
Gregory Hainaut 818412ba26 gsdx-debug: fix a crash in trace 2015-05-17 13:05:08 +02:00
Gregory Hainaut b1ea081fc3 gsdx-debug: improve tracing interface
Basically move the format and c_str() in the macro
2015-05-17 13:05:08 +02:00
Gregory Hainaut b8aa5f8f80 gsdx-debug: more trace for the texture cache 2015-05-17 13:05:08 +02:00
Gregory Hainaut 8a73849531 gsdx-ogl: enable multithread driver by default for nvidia
+ add a linux gui option to disable it (for test purpose)
2015-05-16 15:22:20 +02:00
Gregory Hainaut c567198967 gsdx-ogl: replaced draw_count by s_n
This way error message is aligned with everything else :)

It is not perfect (normally it must be done in start of main draw)
2015-05-16 13:59:13 +02:00
Gregory Hainaut 62e0e6a067 gsdx: remove deprecated code
Core was fixed to call GSFifo in the good thread
2015-05-16 13:52:16 +02:00
Gregory Hainaut 2165c68938 oups forget a couple of break 2015-05-16 13:26:55 +02:00
Gregory Hainaut 02b478dfbc gsdx: plug the new PNG wrapper
Drop various duplicated code :)
2015-05-16 12:47:28 +02:00
Gregory Hainaut 8cd533304c gsdx: new dependency on linux => png++
Note: it is only header file that wrap the standard png (which was
already mandatory for wx/sdl)
2015-05-16 12:47:28 +02:00
Gregory Hainaut cab59587e8 gsdx: add a PNG wrapper
Normally it supports all formats but I didn't have luck with 16 bits depth gray
2015-05-16 12:32:05 +02:00
Gregory Hainaut 3f278382a1 gsdx-debug: dump all drawing register
Thanks PERL
2015-05-16 11:16:33 +02:00
Gregory Hainaut 8341055f3e gsdx-ogl: don't enable ogl_texture_storage on catalyst 2015-05-16 00:31:25 +02:00
Gregory Hainaut a2d605be0b gsdx: copy past mistake
Let's always increment the s_n counter
2015-05-16 00:31:25 +02:00
Gregory Hainaut cfddcb7a93 gsdx-ogl: typo 2015-05-16 00:31:25 +02:00
Gregory Hainaut 0f01ba4c46 gsdx-ogl: mega boost
Enable Nvidia multi thread driver optimization
Enable ogl_texture_storage by default (requires for the speed boost
, later the option will be removed)
2015-05-16 00:31:25 +02:00
Gregory Hainaut a1bfb237e6 Partially Revert "gsdx-ogl: drop support of GL_ARB_clear_texture extension"
This reverts commit 03e72781aa.

Let's add back the clean texture pointer

I want to test it on
1/ DSA
2/ MT driver
2015-05-16 00:31:25 +02:00
Gregory Hainaut 28bb64aae8 gsdx: sed/dr/dRect/ 2015-05-15 20:49:32 +02:00
Gregory Hainaut 445c28fe97 gsdx: sed/sr/sRect/ 2015-05-15 20:47:14 +02:00
Gregory Hainaut d566bb2a23 gsdx: sed /st/sTex/ 2015-05-15 20:45:31 +02:00
Gregory Hainaut 6a9e425308 gsdx: sed /dt/dTex/ 2015-05-15 20:44:15 +02:00