Commit Graph

1205 Commits

Author SHA1 Message Date
Sacha f542c7232e Use __builtin_unreachable where possible for non-msvc 2014-08-15 14:43:52 +10:00
Sacha 7568f6f2ec Remove deprecated jASSUME from pcsx2 core. It is still used in some plugins 2014-08-15 14:32:56 +10:00
Sacha 9dcaaedf06 Some cleanup to improve readability.
Remove old compiler hacks that are no longer needed.
Fix up some spacing and comments that hid code.
Fix a critical bug in deprecated plugin peopsSPU.
2014-08-13 13:05:33 +10:00
bositman 77599bec1c Added Lord of the Rings The Two Towers (IT) CRC
As seen here (SLES 51255):
http://forums.pcsx2.net/Thread-GSdx?pid=392166#pid392166
2014-08-07 13:01:54 +03:00
sudonim1 904f5de1ea Merge pull request #144 from Sonicadvance1/fix-BitScanFoward
Fix the BitScanForward implementations for x86_64.
2014-07-30 18:19:19 +01:00
Pseudonym 28227ea4c4 Merge pull request #123 from Sonicadvance1/fix_interlockedbittestandresetset
Fixes interlockedbittestandreset/set in intrin_x86.h
2014-07-29 14:20:13 +01:00
Gregory Hainaut ef0e3fe6c6 gsdx: disable separate shader on radeon driver (linux) 2014-07-19 14:02:37 +02:00
Ryan Houdek 8ff0f9e869 Update GSSetupPrimCodeGenerator for x86_64.
offsetof requires the expression to be constant to get the offset.
Use a combination of offsetof + sizeof to get the correct offset.
2014-07-16 13:21:45 -05:00
Ryan Houdek 74dd2553a6 Fix function definitions in GSDrawScanlineCodeGenerator.x64
These have been changed since this was last compiled.
Also removes a #error and drops it to a #warning for now while development is in process.
2014-07-16 12:13:09 -05:00
Ryan Houdek 33adabb035 Fix some _M_AMD64 checks in GSdx.
In the future these will be _M_X86_64, but for now this won't be the case.
2014-07-15 18:21:03 -05:00
Ryan Houdek 616500b8f3 Disabled preferred stack boundary on x86_64in GSdx. 2014-07-15 18:18:59 -05:00
Ryan Houdek 2a6656050c Fix the BitScanForward implementations for x86_64. 2014-07-15 18:13:32 -05:00
Lioncash 637c99a362 GSDX: Replace an FLT_MAX with the appropriate ULONG_MAX 2014-07-15 01:47:26 -04:00
Ryan Houdek 48d178886e Fixes interlockedbittestandreset/set in intrin_x86.h
This doesn't update the file to the latest version from mingw32 since this is already a custom header stripped from mingw32.

This also fixes the functions for x86_64(verified that it still works for both architectures) and also updates the version inside of GSdx.
Also removes a comment in the GSdx header saying that these functions are broken since they no longer are.
2014-07-14 21:20:31 -05:00
Forrest McDonald b24d4cce8d Clang doesn't support some flags that GCC does, so conditionally check the compiler and add them if we are doing a GCC build 2014-07-14 13:54:31 +02:00
Gregory Hainaut c60fefa1a6 gcc: support address sanitizer 2014-07-12 19:57:26 +02:00
Gregory Hainaut 47bf88ed3f gsdx: miss break / inline function in header 2014-07-12 16:00:10 +02:00
Gregory Hainaut f401f817ed cmake: sdl opt typo + clean warning management
Add back a lots of warning in the core!
2014-07-12 12:59:23 +02:00
Gregory Hainaut 9ac9307b44 gsdx: try to protect more code when togging f9
deassert gsopen_done before delete the gs object. Compiler and CPU will
reordonate the store (or not because it is a global variable). Probably not
perfect but better.

Got a crash on GSKeyEvent which I guess wasn't thread safe. So let's ensure
gs is open.
2014-06-13 23:32:50 +02:00
Gregory Hainaut eb947dc325 pcsx2:gsdx: support of cross-platform (C11) aligned_malloc 2014-06-13 23:04:21 +02:00
bositman 5c42ced8d3 Update GSCrc.cpp
Missed comma, thanks yxmline
2014-06-10 10:28:52 +03:00
Blackbird88 cd3cfb27de Update GSCrc.cpp 2014-06-09 18:34:23 +02:00
Blackbird88 f7d35ff619 Corrected MGS3 comment, because OCD also new CRC
There is no such thing as MGS3 Substance only Subsistence. Substance is MGS2 :P
Also this new CRC is US Disc 2 of Subsistence. The blue stripes should be fixed now I guess.
2014-06-09 18:23:29 +02:00
bositman 96d3b41989 Misspell fix for someone special at the forum :P 2014-06-06 09:53:24 +03:00
Gregory Hainaut 0bf7a35a53 pcsx2: improve the GS read fifo API
1/ initReadFifo will be first called on the GS thread
    (openGL can only be done on the GS thread)

2/ readFifo will be called on the EE thread. It is not safe too access eeMem from GS
 because of memory is virtual

Fix "recent" regression (crash) on Kingdom heart and others game too.

v2: add a len check on GSState::InitReadFIFO
2014-05-06 20:28:18 +02:00
Gregory Hainaut 3a46634f4a gcc: fix a couple of gcc warning (sign compare)
My gosh, they're like rabbit :p
2014-05-06 09:25:00 +02:00
Gregory Hainaut b7536ca94b zzogl: gcc warning fix
Let's hope variadic macro work on visual

cmake: reenable various warning. With previous fixes it just a matter of a couple of warnings
2014-05-03 10:37:58 +02:00
Gregory Hainaut 58077c63a7 gcc-warning: check c function return. Print error when bad.
v2: properly check return code of fread/getcwd function
2014-05-03 10:32:05 +02:00
Gregory Hainaut 22b65489e2 gcc warning: constify const string 2014-05-03 10:18:27 +02:00
Gregory Hainaut 5087d13de8 gsdx: remove/comment unused variable 2014-05-03 10:18:27 +02:00
bositman 82f347403a Added Metal Gear Solid 3 Subsistence Spanish
to GSdx CRC hacks.
Refer here: http://forums.pcsx2.net/Thread-Metal-Gear-Solid-3-SLES-820-48-not-included-to-GSdx-fix
2014-04-17 13:53:06 +03:00
Gregory Hainaut c2b78c6fdf license: again not yet perfect but much better
Remove old tsvn of zzogl
Add various header
add "is in public domain" for license in public domain so Debian's script catch it
2014-04-13 10:41:24 +02:00
Gregory Hainaut c260decf58 gsdx: add bsd3 clause on gsdx xbyak files 2014-04-13 10:06:52 +02:00
Gregory Hainaut ea25d12405 gsdx-gles: nvidia driver quick trial (only GLES3.0)
* Fix to create a 3.0 GLES context
* set a default precision to fix most of shader compilation issue
* Crash later because of GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
    => need to test opensource driver
2014-04-12 12:40:23 +02:00
Gregory Hainaut 37b1d3ae42 codeblock: remove build file => linux is cmake only
They are completely out-dated. And nobody have time to update them.
2014-04-11 09:18:31 +02:00
Gregory Hainaut 86895cbf45 pcsx2 license: add missing nice header on various files
Remains 3 files that I don't know the source
pcsx2/windows/DwmSetup.cpp: *No copyright* UNKNOWN
pcsx2/windows/SamplProf.cpp: *No copyright* UNKNOWN
pcsx2/windows/VCprojects/IopSif.cpp: *No copyright* UNKNOWN

Remains 1 files in common that I don't know the source
common/include/comptr.h: *No copyright* UNKNOWN

Remains too much files in plugins that I don't know the source :(
2014-04-11 09:18:30 +02:00
Gregory Hainaut 0d45e6d70e gsdx-ogl: avoid to send constant to the GPU
It was a waste of bandwith
2014-04-06 10:44:40 +02:00
Gregory Hainaut 390245806a cmake: sed /PROJECT_SOURCE_DIR/CMAKE_SOURCE_DIR/
The former depends on the project command. Whereas the latter is the true absolute path
of the project
2014-03-30 16:36:02 +02:00
Gregory Hainaut b020bd76c6 gsdx-ogl: restore gles build
Add the --gles build option to the linux main script
Ifdef all gl code not supported on gles3 (note some will be reenabled for gles3.1)

Note: it probably doesn't run anymore. My Nvidia driver doesn't support
yet egl/gles so I can't test it. Feel free to contribute.
2014-03-29 11:55:02 +01:00
Gregory Hainaut 483b5a75e8 gsdx ogl: automatic setup of geometry shader
* disable it for gallium Mesa driver
* Re-enable it for Nvidia driver
2014-03-29 10:47:53 +01:00
Gregory Hainaut 8b78551b92 gsdx-ogl: improve debugging capabilities
allow to print memory transfer usage
Check gl call in dev build
2014-03-25 16:36:29 +01:00
Gregory Hainaut bde2e3956d gsdx-ogl: automatic dectection of buffer_storage 2014-03-25 16:36:29 +01:00
Gregory Hainaut c85ba4c259 gsdx ogl: add buffer_storage for vertex upload
A bit slower. Maybe because SubData does the copy in the driver thread. My memcpy is done on
the main thread. I'm not sure it would worth an extra thread to copy vertex data to the GPU

Note: testers are welcome. You need to edit the ini file.
"ogl_vertex_storage=1" <= enable the extension
"ogl_vertex_storage=0" <= disable the extension

Again you need the support of GL_arb_buffer_storage (i.e. not catalyst)
2014-03-25 16:36:29 +01:00
Gregory Hainaut 403518e852 gsdx-ogl: texture management
Improve arb_buffer_storage implementation
Try harder to align the texture buffer

Strangely arb_buffer_storage is 3 times slower on my PC (nvidia)

Tester are welcome! Open the ini file
"ogl_texture_storage = 1" <= enable the extension
"ogl_texture_storage = 0" <= disable the extension

Note: you need an opengl 4.4 driver or one that support arb_buffer_storage (i.e. not catalyst)
2014-03-25 16:36:29 +01:00
Gregory Hainaut 41091f8ebf gsdx ogl: remove multithread hack
This hack was used because GSReadFifo was called from the EE thread.
Previous commit move the call to the GSThread.

Hopefully avoid flushing the full GPU contex would improve openGL
performance (at least avoid some hiccups ;) )

Note: newer GSdx ogl won't be compatible with older PCSX2
2014-03-25 16:36:29 +01:00
gigaherz f7c1b6e060 Git-based versioning. 2014-03-25 13:31:36 +01:00
gregory.hainaut 30d5135fdd gsdx-ogl: sigh.. this one was hidden :p
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5932 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-23 08:25:54 +00:00
gregory.hainaut 192c5d2c4a gsdx-ogl: one more
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5931 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-22 22:00:46 +00:00
gregory.hainaut 6c87673e57 gsdx-ogl: forget a pointer
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5930 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-22 21:14:57 +00:00
gregory.hainaut ba46b25e2f GSdx-ogl: GL4.1 program shader is optional
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5929 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-22 09:08:37 +00:00
gregory.hainaut d044147698 linux: fix compilation issue with recent Mesa (gentoo)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5928 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-13 17:37:40 +00:00
ramapcsx2.code c374343ae9 GSdx:
Crashfix for a weird GIF_FLG_IMAGE2 situation in Wallace and Gromit Project Zoo. Needs further investigation.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5912 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-22 20:04:32 +00:00
gregory.hainaut 5af621056a gsdx ogl: new option for free driver
reduce_gl_requirement_for_free_driver => set it to 1 to only required a 3.0 context (you still required the good extensions)



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5910 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-22 16:12:42 +00:00
gigaherz 888f0a27da Remove vs2008 project files, since they have become outdated, and complicated to maintain.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5902 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-15 18:24:06 +00:00
ramapcsx2.code 916537b0f8 These might be needed, dunno.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5899 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-12 12:52:03 +00:00
ramapcsx2.code 65152066ca Just a bit of GSdx debugging.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5898 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-11 21:47:43 +00:00
Asmodean.pcsx2 0651e45460 GSdx: Just some cleaning.
Reformatted fx files that were causing issues on certain text editors. They should now display correctly in those editors.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5897 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-11 04:27:32 +00:00
Asmodean.pcsx2 7d96af950e GSdx: A few small post-processing changes, to accommodate future updates.
Also removed the fallback recovery ps, and replaced the compile fail catch to a simple console print. Which I think is safer, and faster.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5894 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-09 01:01:41 +00:00
gregory.hainaut 1922598f0f the "don't let users shoot themself in the foot" commit
UserHacks_AlphaStencil will take precedence on override_GL_ARB_shader_image_load_store


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5891 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-08 11:22:51 +00:00
gregory.hainaut 3d7b86660a gsdx ogl: Enable by default advance DATE effect on nvidia (GL4 GPU)
Note: DATE is used for shadows (persona 3) and others effect

You can disable it when you disable gl image extension (override_GL_ARB_shader_image_load_store = 0)
You can also enable it on AMD too (set it to 1 this time) but no guarantee.

If you feel the extension is too slow, you can try disable some gl barrier (aka "damn the torpedo full steam ahead!").
It can be done with the option UserHacks_DateGL4 = 1. Otherwise just disable the extension.

Note: don't enable UserHacks_AlphaStencil in the same time. GL_ARB_shader_image_load_store is an alternative implementation.
Enabling both in the same time will lead to undefined (well surely wrong) behavior.




git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5890 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-08 11:05:26 +00:00
gregory.hainaut 384c0c12ea gsdx ogl:
* properly detect gl nv depth extension
* Always show the hack on the gui. Add a new hack option for DATE (gl4.2) only
* Save the scan mode on linux too (f7)
* hopefully fix some crash on some drivers... (ensure aligment 256 bits alignment, and if not use std memcpy)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5888 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-07 19:53:01 +00:00
refraction eafadaf15a GSDX: Fix up the GUI that displays during the First Run Wizard
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5884 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-05 22:42:02 +00:00
Asmodean.pcsx2 ea06e2e403 GSdx: Dialog label fix.
Extra rendering threads label text was getting cut off early.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5882 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-05 00:23:02 +00:00
Asmodean.pcsx2 11a15ca58a GSdx: Just tidying up a few last things, to wrap up the AF changes.
Also disabled the gsdx AF options for the OGL renderer (because it's not implemented for that yet). 

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5881 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-04 21:42:43 +00:00
Asmodean.pcsx2 42b879e6b8 GSdx: Anisotropic Filtering.
Fixes a small oversight on my part. Which was setting the maximum anisotropy to (0,1,2,3,4) respectively, instead of (1,2,4,8,16). So when you selected x16 for example, you were actually only getting x4 >.>

Corrected now, and you will be getting the full x16 when selected :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5879 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-03 20:06:00 +00:00
Asmodean.pcsx2 b8f8459275 GSdx: Anisotropic Filtering.
Adds anisotropic texture filtering (1x-16x) to the hardware settings. Enhances the visual quality of textures that are at oblique viewing angles.

Anisotropic filtering is automatically disabled if: 8-bit textures are enabled.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5878 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-03 16:58:11 +00:00
refraction 3bc5779f68 GSDX: Just correcting some typo's
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5875 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-02 22:46:06 +00:00
Asmodean.pcsx2 644f0e61ba GSdx: Store the user selected F7 shader to the ini, as TVShader.
As before: use the hotkey(f7) to switch between them. It will now save the chosen scanline effect, instead of always defaulting to disabled, on load.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5874 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-02 20:40:28 +00:00
Asmodean.pcsx2 02afca3bb6 GSdx: Just some small post processing cleanup changes, should lower the FXAA compiling time on pause/resumes.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5872 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-02 17:50:32 +00:00
gregory.hainaut 6cf75e086b gsdx ogl: Only enable advance DATE when user request it
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5864 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-01 18:46:18 +00:00
gregory.hainaut c0558c00e7 gsdx ogl:
* gui refresh
  + Use some tab to reduce heigth for small screen
  + Add logz option
  + remove broken/experimental keyword. GSdx ogl is not too bad ;)
* autodetect GL_NV_depth_buffer_float

Linux tester you are welcome!



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5862 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-01 11:11:14 +00:00
gregory.hainaut 6f3326a9a4 gsdx ogl: Fog hide this typo :p
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5861 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-01 10:14:01 +00:00
gregory.hainaut 84895eadd9 gsdx ogl: correct most of Z-depth issue
Best setting if you driver support GL_NV_depth_buffer_float => GL_NV_Depth = 1 & logz = 0
Otherwise => GL_NV_Depth = 0 & logz = 1

Explanation of the bug:
Dx z position ranges from 0.0f to 1.0f (FS ranges 0.0f to 1.0f)
GL z Position ranges from -1.0f to 1.0f (FS ranges 0.0f to 1.0f)

Why it sucks:
GS small depth value will be "mapped" to -1.0f. In others all small values will be 1.0f! Terrible lost
of accuraccy.

The GL_NV_depth_buffer_float extension allow to set the near plane as -1.0f.
So
"GL z Position ranges from -1.0f to 1.0f (FS ranges 0.0f to 1.0f)"
will become
"GL z Position ranges from -1.0f to 1.0f (FS ranges -1.0f to 1.0f)"
and therefore
"z posision [0.0f;1.0f] will map to FS [0.0f;1.0f]" as DX

Yes we just get back all precision lost previously :)
However you need hardware (intel?) and driver support (free driver?/gles?) :(





git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5860 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-31 21:30:54 +00:00
gregory.hainaut 48356e31b8 linux:
* use same path as game index db for cheats and cheats_ws
* install the new cheat zip file on cmake and debian installer 


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5850 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-26 18:00:14 +00:00
refraction 5b14ca0fb9 GSDX: Clear up all compiler warnings. No changes to emulation.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5840 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-26 00:58:21 +00:00
ramapcsx2.code d89d02a59f Refinement of the last patch.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5835 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-25 19:53:12 +00:00
ramapcsx2.code 2ba52ebf3e GSdx:
This fixes the crashes on F9 for me. We don't want to call GSgetTitleInfo2() when GSOpen() isn't finished yet.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5834 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-25 19:36:45 +00:00
sudonim1@gmail.com 7fce5709d4 GSDX: Forgot to remove a bit of cruft in the last rev.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5833 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-25 19:17:00 +00:00
sudonim1@gmail.com d6457e9983 GSDX: Fixed the allocation checks in the previous couple of revs.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5832 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-25 19:14:28 +00:00
ramapcsx2.code ab1f4f99af Small round of patches for various issues, #2.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5831 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-25 15:53:31 +00:00
ramapcsx2.code b99aa05cbf Small round of patches for various issues.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5830 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-25 14:25:48 +00:00
gigaherz 01daa0b6fd Change the vs2012 project files to use the v110_xp platform toolset, and the vs2013 project files to use the v120_xp platform toolset, so that the resulting executables can be run in Windows XP/2003.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5822 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-24 15:30:34 +00:00
ramapcsx2.code 55eea6317b GSdx:
HTB123 on our forums came up with a hack that removes the broken main character shadow in hardware rendering
in SMT Nocturne.
This should work for all GSdx recognized versions / regions of the game (tested EU and NTSC-U).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5819 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-21 15:27:05 +00:00
gregory.hainaut c2aa4ff3fd gsdx ogl:
* restore the old fxaa (Asmodeam will be integrated when I got time)
* port the recently added new scanline algo


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5818 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-18 14:46:13 +00:00
ramapcsx2.code f8264bce2c GSdx:
Last patch regarding FXAA and external shader loading, I hope :)
Changes are here: http://forums.pcsx2.net/Thread-Custom-Shaders-for-GSdx?pid=343285#pid343285
I've included bin\shader.fx and the settings file bin\GSdx_FX_Settings.ini.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5817 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-17 10:17:24 +00:00
ramapcsx2.code 4015db8403 GSdx: Newest scanlines shader looks much nicer this way :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5814 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-13 18:23:53 +00:00
ramapcsx2.code bdf5e650a6 GSdx: Quick workaround for DX9 until the shader is adapted.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5813 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-13 17:48:43 +00:00
ramapcsx2.code 1155dd6e21 GSdx:
Add another scanline algorithm, made by pseudonym. This one is pretty fancy, using a cosinus function for generating the dark lines.
It only works on unscaled output, so use software rendering or native resolution for hardware.
It's an effect that works best on 240p converted games (like the SNES titles in Mega Man Collection).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5812 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-12 19:47:49 +00:00
gregory.hainaut 23ae6f0641 the regular copy/past mistake
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5811 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-12 12:35:15 +00:00
gregory.hainaut 2238095a82 gsdx ogl: do the same as previous commit but for ogl ;)
* fix the missing auto interlace opt when cycling with hotkey on linux


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5810 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-12 11:38:50 +00:00
ramapcsx2.code 2ac3c47c42 GSdx:
Finish up my scanlines attempt. Now the 2 old shaders are back in and all 3 cycle on F7.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5809 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-11 23:17:07 +00:00
gregory.hainaut f5257b2c3c gsdx ogl: don't rely on GL_ES builtin (3 differents implementations...). Hopefully fix Linux Intel GPU.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5808 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-11 15:01:13 +00:00
gregory.hainaut b5cad8bd6a gsdx ogl linux: use OGL renderer by default otherwise it fallback to unsupported GSDeviceNull which badly crash
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5807 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-10 21:04:04 +00:00
sudonim1@gmail.com 53c76b3780 GSDX: Nonsense workaround for VS2010 crash issue. We suspect that memory is getting corrupted but we've failed to find the code responsible. Many different changes result in code that doesn't crash for no obvious reason, this one at least looks vaguely like sane code though.
Reverted optimisation flag for VS2010 release target.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5804 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-09 21:51:42 +00:00
sudonim1@gmail.com a1f50d4306 GSDX: (FXAA) Treat shader model 4.1 as 4.0 and future shader models as 5 rather than failing to compile.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5803 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-09 18:32:26 +00:00
refraction 515e268bf5 GSDX: As the Optimization option in VS2010 causes GSDX to crash now, i've disabled it. Whole program optimization is still on and the release will use both (compiled with vs2013). So the SVN can like it or lump it ;p
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5802 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-09 00:31:46 +00:00
refraction 5aa0a9a94d GSDX: Modified the FXAA shader loading so Page Up works again. Now loads the shader just in time.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5801 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-07 23:53:30 +00:00
refraction 5e22971db0 GSDX: New shader is quite slow to compile, so lets not compile it unless the user is using it :)
-switching between sw/hw modes, resuming emulation speed back to normal.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5799 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-06 22:51:45 +00:00
ramapcsx2.code a1e387e23e GSdx: Fix for the DX9 crashing issue, many thanks to Asmodean again! :)
(Also sets new defaults with only minor processing, mainly FXAA now)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5798 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-06 18:03:47 +00:00
refraction 76583f5fe5 GSDX: Fix/Hack for NVIDIA stretch issue on drivers > 320.18 with DirectX 11 when using a custom resolution. You can enable it in the HW Hacks section, let me know if there is a game it doesn't fix.
Slight adjustments to positions in the GUI also (OCD'd the spacing a little :P)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5796 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-05 23:31:26 +00:00
ramapcsx2.code 20ffe92ee8 GSdx:
- FXAA shader replaced by Asmodeans shader suite 'PCSX2 Fx 2.00 Revised'.
This is an entire enhancement suite with many configurable options like FXAA, texture sharpening
or lighting tweaks. Some of the effects are pretty advanced so kudos to him allowing it to be integrated with GSdx! :)
Note that there's no interface for the tweaks yet. Until those are done, the defaults will be used.
Release thread here: http://forums.pcsx2.net/Thread-Custom-Shaders-for-GSdx?pid=334766#pid334766

- Disabled an option from the widescreen patches for SH:Shattered Memories.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5793 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-01-05 11:24:43 +00:00
gregory.hainaut 33832b4479 gsdx ogl: Intel driver keep the GL_ES macro undefined...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5785 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-12-30 14:48:26 +00:00
gregory.hainaut bdea4837c7 ... forget to refresh my patch ...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5784 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-12-30 10:15:01 +00:00
gregory.hainaut 4d3de6e911 gsdx linux:
* allow to control the gl dectection from the gui (+1 for the user-friendliness ;) )
* disable geometry shader by default on Intel driver


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5783 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-12-30 09:30:10 +00:00
ramapcsx2.code f4370077f0 GSdx:
Added a check box and config code for the fxaa shader. 
It's not currently hooked up since the shader setup might get replaced in a day or two.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5777 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-12-28 21:36:29 +00:00
ramapcsx2.code 5a53b682f0 GSdx:
Added a simple scanlines filter (2nd one activated by F7). No tweaking done yet. 
It shows how to get scanlines that aren't affected by input resolution or scaling.
A good next step would be determining the exact number of dark lines to show :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5770 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-12-22 15:36:47 +00:00
refraction@gmail.com efa12b4012 Region now know n for Crash Bandicoot CRC added in r5762
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5767 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-12-13 22:10:16 +00:00
gigaherz 4173080028 Because vs2012==vs11 and vs2013==vs12, which is extremely confusing, I renamed the project files to use the full year as the name.
Also fixed some project references to the right filenames.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5764 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-11-27 16:53:36 +00:00
gigaherz 74378ce378 Created vs2013 files based on the vs2012 code, and fixed a small incompatibility between vs2013 and pthreads.
Removed some missing headers from the vs2010 and vs2012 project files that were causing vs to always claim the projects were out of date.
Also removed some other entries for c/cpp files that were disabled but also missing (I did not search exhaustively).


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5763 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-11-27 16:44:32 +00:00
refraction@gmail.com 64dd73e9a0 Added another version of Crash Bandicoot Wrath of Cortex to the CRC hack list. Not sure what region it is, possibly japan.
(Did this through the google code file editing so if it's broken i apologise :P )

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5762 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-11-25 15:41:27 +00:00
gregory.hainaut e80b002929 gsdx ogl: Flush various pending work
* try to use more subroutine on VS&PS, unfortunately hit a driver crash!
* Call Attach/DetachContext through GSDevice so I can unmap currently mapped buffer
* Implement glsl part of GL_ARB_bindless texture, again hit another driver crash!
* various fix of GL_ARB_buffer_storage. Basic benchmark show only improvement on 'cold' case, I guess it will improve smoothness
* try to fix GL_clear_texture, no success so far. It seem the extension is limited to basic texture (aka no depth/stencil)



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5752 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-10-24 20:54:27 +00:00
gregory.hainaut 4934e43287 gsdx ogl: in case of EGL_BAD_MATCH try to create the context with different option (hope to fix intel mesa)
cmake: add sdl as a dependency requirement of spu2x


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5732 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-10-05 10:37:48 +00:00
gregory.hainaut 44d8301bb2 spu2x: array out of bond (-1)
Performance note, it might be faster to replace the MODULO with an AND. Not sure on the impact
for the new time stretcher algo.

GSdx: fixed use-after-free (linux)

PCSX2: 
* add a define to support address sanitizer (both rely on 0x20000000-0x3fffffff memory ranges..)
* sio_buffer out of bond (-1). Maybe we can move the flush in the 2 if previous branch. It would
avoid the extra test.
* wxGetEnv (linux) generates double free (maybe not thread safe). Cache the result so it doesn't crash 
anymore when switching renderer

Comment/Review/Improvement are welcome :)




git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5727 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-09-10 11:41:11 +00:00
gregory.hainaut fb684df32b pcsx2: fix 4 arrays out of bond
Gsdx: fix a memcpy src/dst overlap + a clang compilation fix



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5726 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-09-05 20:01:47 +00:00
gregory.hainaut e01c6cd9ce gsdx ogl: the proof of concept commit
* GL_ARB_shader_subroutine for perf
fix for nvidia => add missing shader declaration. Nvidia got +4fps on colin3 :) 

For the moment only 2 PS parameters are supported. Code need to be extended to support others games that often
switch shader program (like xenosaga).
require GL4 class hardware and the option override_GL_ARB_shader_subroutine = 1
Note: strangely on AMD linux it is slower!

* GL_ARB_shader_image_load_store for accuraccy (Date)
Use a signed integer texture and reenable color buffer writing

Current status: Amagami_transparency.gs & P3_battle_shadows.gs are now working on Nvidia with a small perf impact.
Current implementation detail:
1/ setup the standard stencil as before
2/ on remaining pixel, draw once to compute first primitive that will write a fail alpha value.
3/ final draw based on primitive id of step 2

Note: I think we would get a bad behavior if depth test&mask are enabled on step 2/3
Note2: on my limited testcase the perf impact was on CPU. It would be possible to merge step1&2 to nullifying it (could 
even be faster actually), however it would require more GPU power.

Again require GL4 class hardware. And the option UserHacks_DateGL4 = 1



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5725 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-08-28 08:44:16 +00:00
gregory.hainaut 452cf72ddf onepad: fix a bug to handle multiple button (fix #1271)
zzogl: fix memory leak (fix #1431, #1432)
GSdx ogl: disable geometry shader on Nvidia/Windows (I will wait a 3rd implementation to find which one is correct)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5724 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-08-25 12:11:32 +00:00
ramapcsx2.code 3aa0f374d4 Just fixing this oversight. Thanks, gb2985.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5723 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-08-21 10:10:45 +00:00
gregory.hainaut 690432de30 gsdx ogl:
* redo most of the texture upload (PBO): colin3 benchmark: 32 fps now (vs 26 fps 2 weeks ago)
* use the cross vendor vsync extension on linux (previous wasn't supported by nvidia)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5721 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-08-17 09:05:41 +00:00
gregory.hainaut 07605941ef gsdx ogl:
* some preliminary work to test/benchmark bindless texture in the future (glsl was not yet updated)
Bindless texture allow to get a GPU texture pointer and then set it directly
to the shader as a basic uniform.
=> no more texture unit selection/validation
=> no more texture validation neither texture hash lookup

3rdparty: update gl header to the latest gl4.4


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5720 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-08-17 08:57:52 +00:00
gregory.hainaut b4084047be gsdx ogl: Used a basic flat interpolation for color interpolation (line & tri primitives)
Card that support gs:
remain only a gs to generate sprite from a line. Even dummy gs are costly for the GPU.

Card that don't support gs:
remove useless copy of color for line and triangle primitives

Note for dx: opengl 3.2 (maybe not gles) supports both flat interpolation
convention (GL_FIRST_VERTEX_CONVENTION or GL_LAST_VERTEX_CONVENTION).  It might
be possible to shuffle vertex index to put the last vertex in first position.

- buff[0] = head + 0;
- buff[1] = head + 1;
- buff[2] = head + 2;
+ buff[0] = head + 2;
+ buff[1] = head + 1;
+ buff[2] = head + 0;



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5718 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-08-14 10:18:38 +00:00
gregory.hainaut 0f603a98d5 gsdx ogl: Test the ARB_shader_subroutine GL4.0 extension
The idea was to replace shader program swith by pointer function calls inside
shaders.  At least parameters that are often changed between draw call. So far
I only ported atst and colclip. Unfortunately code is "slower" (on GSdx standalone).
For the moment keep the code but disabled.

If I understand well the validation of program is done in the "driver thread"
but the additional call are done in the overloaded MTGS thread. Apitrace
profiling shows faster GPU draw calls. Another possibility is that the driver still
need to validate the draw call because of others state change.

Here some stats on colin3 (90 frames):
without subroutine: UseProgram 125246
with subroutine: UseProgram 2906, subroutine 125945 => 3605 extra calls overhead (not
all parameters are ported to subroutine)



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5715 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-08-10 19:43:59 +00:00
gregory.hainaut c9755361ec gsdx ogl: remove useless ps.rt
Note: I think we can do the same on DX11

Perf wise: on colin mcrae 3 it reduces shader prog setup from 3005 to 2086 each frames. It saves 2 ms of CPU processing (27->29fps)



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5714 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-08-06 06:48:44 +00:00
gregory.hainaut a46b489a24 gsdx ogl: various minor optimization.
* move most of gl states into a separate namespace. Extend it to depth/stencil/blend micro state
=> save 10,000 opengl call by frame for colin mcrae 3
* Only setup blend state of first drawbuffer
* Don't request anymore a debug context on dev/release build



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5713 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-08-05 20:25:25 +00:00
gregory.hainaut 34045eb8f7 gsdx ogl: AMD users upgrade to 13.8 now ;)
* clean extension management and fix compilation of previous gl44 code.
* Use pixel buffer object to upload texture data.
=> avoid crash on AMD driver
=> a bit faster and probably got some margins for the future



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5712 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-08-03 08:29:01 +00:00
gregory.hainaut 64f783410e gsdx ogl:
* preliminary work for GL4.4 extensions (ARB_clear_texture & ARB_multi_bind). Disabled until I got a 4.4 driver
Note: I plan also to use ARB_buffer_storage
* compute texture gl option in the constructor (avoid a couple of swith case)
* redo texture unit management. Unit 0-2 for shaders, Unit 3 for texture operations. MultiBind will allow to bind 
shader input without disturbing texture binding points.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5711 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-08-02 16:38:12 +00:00
gregory.hainaut 2634ee851c miss another debug stuff
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5709 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-28 19:08:46 +00:00
gregory.hainaut a172da1f30 gsdx ogl: oups forget to disable stencil debug
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5708 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-28 17:12:23 +00:00
gregory.hainaut e394de86dc gsdx ogl:
* add a non-working hack: UserHacks_DateGL4, goal was to replace UserHacks_AlphaStencil
 + Detection of good/bad samples is based on primitive ID variable. However I'm not sure
 the behavior is always the same between draw call...Anyway let's keep a copy of the current
 work
* Dump integer texture into text csv
* add gl4.2 ARB_shader_image_load_store extension (needed by UserHacks_DateGL4)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5707 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-28 14:40:43 +00:00
ramapcsx2.code 1c9146b07e Working on my backlog: GSdx CRC patches.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5705 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-23 13:55:38 +00:00
gregory.hainaut d3e1e4da0d gsdx ogl:
* allow to switch renderer with F9
* skip first frame in stat of the replayer
* drop msaa. Fxaa and internal resolution will do the job
* move texture attachment from texture object into device object (allow to keep sanely the state)
* split the write buffer and attachment setup
* completely split sampler and texture input setup
* redo GSDeviceOGL::CopyOffscreen to avoid an extra copy.



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5704 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-19 19:25:50 +00:00
gregory.hainaut b912778a3c gsdx: forget to regenerate shader in previous commit
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5702 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-13 16:31:19 +00:00
gregory.hainaut 916a091f8a gsdx ogl: GLes
* use gles header file, disable opengl code (mainly GLX, ARB_sso, geometry shader)
* Define properly the function pointer, GLES use basic linking whereas GL must get the symbol dynamically
* cmake: properly search and set libglesv2.so
* don't use dual source blending => HW renderer work (only miss unimportant FBA)



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5701 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-13 11:39:45 +00:00
gregory.hainaut bd5f379044 gsdx ogl:
* uniform was wrongly set before the activation of the program (free driver only)
* Always use only 1 drawbuffer. Easier besides previous setup was wrong for convert:ps_main1

GLES trial (v3):
* add the cmake option GLES_API. Note library (libgles) are hardcoded for the moment
* Disable opengl check
* Disable gl_GetDebugMessageLogARB not supported!
* Emulate gl_DrawElementsBaseVertex, add manually the index offset (surely slow but work)
* Fix hundred of shader error (no implicit cast of integer to float...)
Unfortunately GLES doesn't support dual blending so no blend in hardware renderer. Otherwise it is fine




git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5700 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-12 21:12:34 +00:00
gregory.hainaut a764950468 gsdx ogl:
* replace vertex interface with block interface. It avoid to depends on the ARB_sso extension.
* disable geometry shader on Nvidia & Linux. Slower but better than a black screen !
* default logz to 1, avoid some glitches.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5699 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-11 17:08:42 +00:00
gregory.hainaut f22b366cea gsdx:
* redo glsl2h.pl script to generate only one big glsl headers.
* fix gcc warning in GSVector.h
* fix memory leak of GSDeviceOGL.m_shader
* clean shader compilation function => split generation header & drop malloc stuff
cmake:
* only rebuild shader when asked by the use. Avoid perl dependency to build pcsx2


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5698 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-07 16:13:11 +00:00
gregory.hainaut dc036ff59d gsdx: split shader/program/pipeline object management into a separate class
* remove the possibility to compile shader from file. Some people loads older shaders...
  The feature might be readded later


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5697 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-06 10:08:52 +00:00
gregory.hainaut 544c84a344 gsdx:
* try to setup advance gl context attribute. If driver doesn't support it fallback to the default.

zzogl:
* use glsl2h to generate an header shader as GSdx. Much easier to install
* Get GSUniformBufferOGL & GSVertexArrayOGL speed improvement from GSdx

cmake:
* detect current gcc version. Yield  a warning if < 4.7 or an error if < 4.5

glsl2h:
* support zzogl too
* compute md5sum to avoid useless relink


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5696 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-06 09:42:46 +00:00
gregory.hainaut ba2ec6fe59 all: gcc warning clean round 4
* remove unused variable
* move static function from h into cpp
* Initialized hw_by_page to 0xFFFFFFFF instead of -1 (number must be a positive integer)
* Use a s32 fore m_current_lsn instead of u32 (use -1 as error code)
Bonus: a couple of fix for clang compiler (doesn't mean that it fully compile with clang)
* remove useless __debugbreak on linux
* use short for 16bits atomic function


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5695 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-03 18:42:05 +00:00
gabest11 ddaa892726 Removed ATL/MFC dependencies from every project, the free version of visual studio does not have those. It compiles with vs2012 express now, will fix others later, in case they are broken.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5692 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-07-01 21:28:58 +00:00
gregory.hainaut 91d39de645 gsdx ogl: fix crash when pause/resume with EGL (opensource driver)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5690 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-30 15:27:50 +00:00
gregory.hainaut d81254469a gsdx ogl:
* fix shader compilation on Nvidia (broken on r5682)
* fix various memory leak thanks to Valgrind

Cmake: fix a minor typo


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5688 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-30 11:18:46 +00:00
gregory.hainaut 58cacc3b1c gsdx: use size_t for loop index when it used countof macro
* fix override_GL_ARB_copy_image typo


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5687 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-29 12:02:03 +00:00
gregory.hainaut 40e26648c6 all: gcc warning clean (round 2)
* reorder static initialization list
* Add missing virtual desctrutor to virtual object
* int -> uint/u32/uint32 cast of for loop index
* add a missing return in pxTrySetFocus
* fix size parameter of memset m_clut
* disable missing-field-initializers warning
* disable unused-local-typedefs warning


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5685 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-28 17:32:37 +00:00
gregory.hainaut 3c7167be50 clean (some) gdb warning: round 1
* use svnrev.h on linux too
* replace sprintf_s with snprintf (hope it still compile on Windows)
* init integer with 0 instead of NULL
* various int -> u32/uint32/uint on for loop index
* remove a couple of unused variable
* init few variable
* disable unused warning results


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5683 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-28 10:43:50 +00:00
gregory.hainaut ca1edbf2cb gsdx ogl:
* Separate state and shader compilation into separate function
* replace various hash_map by basic array
* Compact VertexScale and offset into a single vec4
* add the new option "ogl_vertex_subdata": subdata is faster on FGLRX, test are welcome on Nvidia drivers
    0 => use map/unmap
    1 => use subdata

replay: add "linux_replay" option and compute some nice stat (mean, standard deviation)

cmake: recreate shader header at build time


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5682 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-26 20:09:07 +00:00
gabest11@gmail.com 9cd463e4f8 GSdx: obligatory vs2010 compiler fix
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5681 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-24 06:29:08 +00:00
gabest11@gmail.com 4dd898c754 GSdx: Found some 16-bit integer overflow in GSState::VertexKick, some triangles could have been removed by the scissor test.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5680 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-24 01:11:00 +00:00
gabest11@gmail.com 37dd5f5bb5 GSdx: copy-paste mistake, thanks rama :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5679 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-23 12:13:40 +00:00
gabest11@gmail.com 20d99ae9fc GSdx: vs2010 fix and minor changes
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5678 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-23 10:46:24 +00:00
gabest11@gmail.com d20bd4f86a GSdx: The sw renderer now uses avx2, not much faster though, +10% maybe, if the game is not EE limited. I'm not sure if haswell has that much better sse execution (load/store units doubled for example), or the avx2 code is not fully optimized yet.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5677 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-20 05:07:52 +00:00
gabest11@gmail.com 3b753bec42 GSdx: sse2/ssse3 missing graphics fix
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5676 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-18 00:25:46 +00:00
gabest11@gmail.com 8b9f5b5bc2 GSdx: More avx2 code to read/write different block formats, the GSBenchmark function shows nice improvements, but no games run faster. I just upload the changes before messing with the drawing part.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5675 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-17 04:11:10 +00:00
gregory.hainaut f4ce6d6fce gsdx:
* don't delete the wnd in GSclose. It can still be used later
* Properly detect the GL_ARB_gpu_shader5 extension for Fxaa
* A couple of fix in Create (GSopen1) of GSWndEGL/GSWndOGL


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5674 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-16 16:33:08 +00:00
gregory.hainaut b7a6dd93b3 i18n: refresh string translation
GSdx: nothing to see :p


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5673 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-16 09:55:37 +00:00
gregory.hainaut f4b173bbd1 gsdx: miss a part of the previous patch...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5672 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-16 09:43:34 +00:00
gregory.hainaut 09571dac0b gsdx:
* add exception in GSWndEGL and GSWndOGL 
* Try to use EGL when GLX failed => you don't need any flags for the opensource driver ;)

cmake: don't install anymore the glsl shader


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5671 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-16 09:40:38 +00:00
gregory.hainaut 9b037a3813 pcsx2: increase a bit the minimum size of the plugin dialogs (GSdx name is too long)
gsdx:
* move gl function loading into GSwnd. Clean the header and avoid to rely on macro.
* Always require libegl for GSdx. You still need to select the API at compilation.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5670 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-16 08:43:50 +00:00
gregory.hainaut b10d554764 gsdx (ogl):
* fix memory leak of m_wnd
* don't escape % in the shader string
* Fix shadeboost StretchRect parameter

debian: compress package with xz


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5669 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-16 07:05:57 +00:00
gabest11@gmail.com 1da166a1af GSdx: minor fixes to previous commit, rundll32 window not showing and a compiler warning
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5668 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-16 02:48:16 +00:00
gregory.hainaut 91e74637d5 gsdx-ogl-wnd:
* update linux dialog: create a custom shader box and put it Shade boost and Fxaa
* force the reloading of the inifile after any configuration update.


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5666 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-15 15:03:44 +00:00
gregory.hainaut 4c37d25134 gsdx-ogl-wnd: fix ifdef mess on fxaa (both dx and ogl)
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5665 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-15 10:35:10 +00:00
gregory.hainaut adc232cb95 gsdx-ogl-wnd: VS2010 doesn't support string bigger than 64k bytes. So remove PS3&360 shader from fxaa
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5664 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-15 10:06:47 +00:00
gregory.hainaut 19961175c9 gsdx-ogl-wnd: port (minor) renderer update of r5649 to opengl
Now the brach is ready to be merged :)

Dears Window users. If you can test that:
1/ still compile
2/ still running on DX
3/ can run with opengl


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5663 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-15 09:24:13 +00:00
gregory.hainaut f8242bd458 gsdx-ogl_wnd: Merging r5633 through r5661
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5662 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-15 09:05:02 +00:00
gregory.hainaut 93d2cd6f7e gsdx-ogl-wnd: ... forget to add the file...
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5661 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-15 07:22:11 +00:00
gregory.hainaut 59501227b3 gsdx-ogl-wnd: implement fxaa. I directly reuse the .fx file with minor update
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5659 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-14 21:22:44 +00:00
gregory.hainaut 92a3549e9c gsdx-ogl-wnd:
* Patch from miseru to fix VS2010
* Quick fix for 8-bits textures


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5658 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-14 16:22:22 +00:00
gregory.hainaut e021630bb9 gsdx-ogl-wnd:
* Don't write color during stencil. Keep the old method to ease debug
* Realign date shader on DX
* keep stencil ref to 1. Reduce stencil management burder
* Fix texture pitch (was in pixels but need bytes). Fix Bleach Blade Battlers 2. Thanks Miseru for your trace

Remember note:
fxaa -> not yet implemented
msaa -> not implemented (I might drop it actually)
8 bit texture -> not yet implemented



git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5657 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-14 11:34:44 +00:00
gregory.hainaut 382258ec03 gsdx-ogl-wnd:
* properly set the stencil write mask
* Multiply Y coodinates by -1. Let's hope it fixes shadows gliches.


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5656 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-12 20:57:16 +00:00
gregory.hainaut 041bf4cee6 gsdx-ogl-wnd:
* detect Advanced Micro Devices for newer AMD Card...
* Mess with coordinate for StretchRect. Upscaling seem to work now. Surely the biggest diff between ogl and dx...



git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5655 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-11 11:14:26 +00:00
gabest11@gmail.com c94ee5e4ce GSdx: one more try to fix vs2010
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5654 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-10 20:43:03 +00:00
gabest11@gmail.com a5103a28e7 GSdx: attempting to fix vs2010 project files, I don't have it installed anymore.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5653 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-10 18:48:14 +00:00
gabest11@gmail.com 43c7235cc3 GSdx: Added a vector class for AVX2 and upgraded a few functions to use it, still a lot to do. New project config AVX2, _M_SSE = 0x501, only use it if you have haswell. Might break GCC or older MSVC, please test it.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5652 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-10 15:56:11 +00:00
gregory.hainaut 58699923e0 gsdx-ogl-wnd:
* factorize sample object creation
* remember frame buffer attachment state
* Use a basic context on EGL. Allow to use Mesa 9.1 on AMD GPU.
* precompile vertex and geometry shader to avoid benchmark polution on replay
* Try harder to detect FGLRX driver on window
* various clean

Remain to fix the coordinate system for upscaling



git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5651 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-09 16:41:58 +00:00
gregory.hainaut 65b5a376ed gsdx-ogl-wnd:
* Fix shader alpha issue. Hoppefully fix lots of glitches.
* Use glBufferSubData to upload data into the constant buffer instead of map/unmap. More fps :)
* Fix wrong api setup on EGL
* Be more portable on glsl2h


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5650 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-07 19:16:27 +00:00
gabest11@gmail.com d27b606e5c GSdx:
- changed the KH2 fix in GetTextureMinMax to my taste, should give the same results, when the used texture rect is to the left/above the clamped area, it returns [min, min+1], and [max-1, max] for right/below
- m_mem.m_clut.Read32 was returned to its original place from GetAlphaMinMax
- UserHacks_WildHack was moved up to GSState, special UV handlers are only used when this setting is active
- updated xbyak to the latest available (avx2 seems incomplete, the 256-bit promoted old instructions are missing)
- changed vtune's include path to the 2013 edition

Some other not yet commited changes from a year ago:
- WriteImageX overflow crash-fix
- moved colclamp after dithering (sw mode), it makes more sense, no visible changes noticed
- Gif_Tag::analyzeTag(), there was a conditional I didn't like, split the loop into two parts

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5649 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-06 11:36:01 +00:00
gregory.hainaut efcb015361 gsdx-ogl-wnd:
* clean texture management & use different texture unit for various texture operation
* separate sampler and texture setup
* Always disable GL_SCISSOR_TEST before any cleaning to be sure the all pixels are reset
* properly set upscale_multiplier in the linux gui (was mixed with msaa). Unfortunately it is still broken...
* Fix EGL with GSopen1
* Use stdcall for function definition in the replay (avoid segmentation fault)
* Directly use gl_Position in shader instead of an extra user defined variable


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5648 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-06-01 09:29:57 +00:00
gregory.hainaut acaf1ac8d5 gsdx-ogl-wnd: Make the HW renderer "work" on the opensource driver
* replace most OGL_FREE_DRIVER with a dynamic detection. Remains the context creation. Closed drivers need 3.3
* Add the CopySubImage fallback


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5647 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-27 18:02:27 +00:00
gregory.hainaut 75418aba43 gsdx-ogl-wnd:
* Emulate Geometry Shader from the CPU.
* add some option to override opengl extension detection
* redo shader interface (again) to compile on the free driver

SW renderer is now working on the free driver.

To test it on your linux box use this cmake option -DEGL_API=TRUE
Note: (need opengl 3.0) I test mesa 9.2 git



git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5646 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-27 16:53:38 +00:00
gregory.hainaut aafa7a088a gsdx-ogl-wnd:
* fix a bad interaction when GL_ARB_SSO is supported without GL_ARB_shading_language_420pack
* try to replace struct with flat parameter in glsl interface
=> with some hacks of the free driver, I was able to compile SW renderer shader. Unfortunately
   the rendering is broken. Maybe my hack :p
* remove EGL context check (wasn't working as expected)


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5644 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-26 13:05:03 +00:00
gregory.hainaut c9b3dcf581 gsdx-ogl-wnd:
* fix wrong interaction when both GL41 or GL42 aren't supported
* Add a new define to downgrade opengl requirement to test the free driver and EGL
 => As far as I can tell, they only miss geometry shader& GLSL150 (got GLSL140)
* Found a way to avoid crash in AMD driver. Skip the upload of small texture but rendering is wrong now...


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5643 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-25 14:28:16 +00:00
gregory.hainaut 49cd9fd97d gsdx-ogl-wnd:
* remove an old&useles dummy geometry shader (was used to workaround amd bug)
* use a basic X11 window for GSopen1
* redo the replayer: it is now based on dlopen rather than standard static/dynamic library. AMD driver doesn't play nicely with the later...


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5639 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-23 17:03:18 +00:00
gregory.hainaut 5a0367f398 gsdx-ogl-wnd: fix compilation on MSVC201x
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5638 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-20 16:29:56 +00:00
gregory.hainaut 6779edfe28 gsdx-ogl-wnd:
* replace both DISABLE_GL41_SSO and DISABLE_GL42 macro with a dynamic check based on the extension support
* glsl2h: use static instead of extern


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5636 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-19 12:42:55 +00:00
gregory.hainaut 9376b26537 gsdx-ogl-wnd:
* load extension as gl_Function instead of glFunction


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5635 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-19 09:19:20 +00:00
gregory.hainaut dce89ff1a0 gsdx-ogl-wnd: fix compilation error on linux
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5634 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-18 16:19:23 +00:00
gregory.hainaut b8e36b44af gsdx-ogl-wnd: sync from trunk (r5550 to r5632)
Note: Code need to be fixed with latest GSdx ogl additions


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5633 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-18 16:09:09 +00:00
gregory.hainaut e3d658b501 gsdx ogl: load shader from C code instead of an external file
* add a perl script to convert shader to char*
* By default use *.glsl file (handy to do some trials). 

Only drawback, glsl2h need to be manually called at the moment



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5632 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-18 09:17:30 +00:00
gregory.hainaut 6760ed552b gsdx ogl: fix previous commit
* clean shader properly
* use a 64 bits map to contain shader pointer


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5631 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-17 20:14:10 +00:00
gregory.hainaut a163677cec gsdx ogl: New config option to disable separate shader program. Not enabled by default
* workaround AMD driver bleding issue (got at least a nice rendering in GoW)
* would run on the opensource driver when they support geometry shader

Stil got some crash on the driver. Arg!!!
FGLRX user if you want to do some trials 
uncomment #define DISABLE_GL41_SSO in GSdx/config.h



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5630 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-17 18:28:51 +00:00
gregory.hainaut 15b255617a gsdx ogl: use immutable texture, it would avoid multiple validation from the driver
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5629 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-17 16:55:55 +00:00
gregory.hainaut 320d3a572e gsdx ogl: AMD fix some bugs in their driver ! (catalyst 13.4 branch). Let's remove some buggy workaround now.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5627 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-05-08 15:51:42 +00:00
gregory.hainaut 08329122aa gsdx (ogl):
* Use bigger index for Uniform buffer to avoid any collision with sampler. 
* add a new config to disable openGL 4.2 requirement. Would be done at runtime later.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5620 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-04-19 19:16:26 +00:00
gregory.hainaut 86a2f5a8ec gcc:
* Fix a couple of GCC warning
* Fix build with gcc4.8 (issue 1392)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5618 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-04-14 10:48:50 +00:00
sudonim1@gmail.com 2fbcafc85e GSDX: Implemented CLUT temporary buffer wrapping by mirroring writes and hopefully fixed all CSA related bugs. There are fewer asserts on register values in the code now.
I'm only about 75% confident in this code.  Games might be broken.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5613 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-04-10 17:55:02 +00:00
sudonim1@gmail.com be7e1163b4 GSDX: Fixed GetTextureMinMax's vertex tracer interaction properly and added some comments.
It wasn't the suspicious code, that actually seems to be correct.  The rempty() case should now be unnecessary except in case of bad register settings, but that's outside of our control so it needs to stay until code's added for that case.  A console warning would be appropriate.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5612 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-04-10 15:57:21 +00:00
ramapcsx2.code c4d9ce2e05 GSdx: Fixed a missing clut offset which broke Disney's Golf.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5611 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-04-10 11:48:27 +00:00
sudonim1@gmail.com a0e960b77d GSDX: Disable a buggy vertex tracer optimisation in GetTextureMinMax (produces a rectangle with a negative dimension leaving it still empty after the follow block which is likely a hack itself). Fixes textures in Kingdom Hearts 2's tron stage.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5610 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-04-09 22:17:49 +00:00
gregory.hainaut fa7d10cfb1 gsdx ogl: install a GLX error handler before the context creation. Allow to print a nice message when the user doesn't support opengl 3.3
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5607 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-04-07 14:37:14 +00:00
refraction@gmail.com e2ff25963b GSDX: Applying patch for 2 small errors in GSDX provided by mathew1800.
Thanks to KrossX3 for aiding our laziness:P

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5605 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-04-04 19:39:46 +00:00
ramapcsx2.code fd7b163643 GSdx: Committing a fix for the Steambot Chronicles hack, thanks miseru99. Also: using a new alias, yay :p
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5580 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-03-02 11:51:14 +00:00
gregory.hainaut d3d9b520f0 gsdx ogl:
* port KrossX patch from r5556 to openGL
* add a basic gui entry, would love an additional description
* also add the pointsampler hack but don't activate it yet


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5570 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-23 15:35:56 +00:00
ramapcsx2 8f9e04dc9d GSdx, SPU2-X: Remove old code and disable a now useless warning.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5559 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-12 18:41:33 +00:00
ramapcsx2 7af51edd87 GSdx: DX9 hardware fix for the new hack.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5558 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-12 12:08:46 +00:00
ramapcsx2 94cad4a61a GSdx: New hack from KrossX lets users configure their own texture coordinate offset via hacks dialog. This can be used to fine tune correction of upscale glitches versus the problems that come with it. I guess this is able to correct nearly all ghosting and bad text issues games can have! Thanks for this nice patch, KrossX :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5556 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-12 10:57:48 +00:00
ramapcsx2 45e3e6d549 GSdx: Added a crc hack for Steambot Chronicles, made by miseru99. It doesn't look perfect but at least it's rather playable now. Thanks miseru99 :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5555 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-11 17:10:22 +00:00
gregory.hainaut cf16274d6a gsdx-ogl-wnd: trunk sync: merge of r5497 through r5549
goal was to get the Nvidia glsl shader fix


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5550 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-08 17:51:44 +00:00
sudonim1@gmail.com b1536a755f GSDX: Nothing is fixed, the last two revisions did not happen.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5549 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-08 15:36:54 +00:00
sudonim1@gmail.com 23cd8fd641 GSDX: Committing pointless extra work for the record before reverting. Everything is terrible.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5548 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-08 15:35:28 +00:00
sudonim1@gmail.com 5988c70822 GSDX: Mask off high bits of calculated GS memory addresses, untested but probably what happens with real hardware. Fixes crash/memory corruption on starting Fatal Fury Battle Archives Volume 2, hopefully some other games too.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5547 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-07 17:32:34 +00:00
gregory.hainaut 580f7a2e3d gsdx (ogl):
* Don't try to allocate a "null" array when shader log is empty
* glsl: hopefully implicit cast error on Nvidia driver


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5542 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-02-03 15:46:42 +00:00
gregory.hainaut e6cd4129c2 gsdx-ogl-wgl:
* initialize the context status variable that take care of some startup hang
* cmake: don't link and compile EGL when it isn't requested


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5528 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-18 21:56:43 +00:00
gregory.hainaut e6e18607e0 gsdx-ogl-wnd: ooups
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5521 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-17 17:14:33 +00:00
gregory.hainaut 36f8dda3fe gsdx-ogl-wnd:
* implement GSWndEGL copy/pasted from zzogl.
* remove linux debugging shader that failed to compile on window
* add additional debug message during context creation


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5520 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-17 16:58:48 +00:00
gregory.hainaut c4dfd0c7c5 gsdx-ogl-wnd: gl.h doesn't provide same functions on linux and windows...
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5519 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-17 15:24:55 +00:00
gregory.hainaut 58cc2ddd1f gsdx-ogl-wnd:
* Remove bad redefinition of glActiveTexture and glBlendColor pointer
* Remove glew dependency on linux
* s/OGL_DEBUG/ENABLE_OGL_DEBUG/ and enable it on debug


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5512 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-16 18:25:53 +00:00
gregory.hainaut fb9c4e5a61 gsdx-ogl-wnd:
* add a new config define ENABLE_OGL_MT_HACK to replace the define OGL_MT_HACK


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5511 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-14 09:25:16 +00:00
gregory.hainaut b65ad2c3e5 gsdx-ogl-wnd:
* move GL loading function into its own namespace
* Use manual GL loading on linux too and mostly drop glew dependency. (Not 100% clean we are still depends on some glew define, it will be fixed later)

Note: shaders still need to be copied manually from GSdx/res to bin/plugins


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5510 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-14 09:15:39 +00:00
ramapcsx2 c09f758602 gsdx-ogl-wnd: Build fix
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5509 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-12 23:41:31 +00:00
gregory.hainaut f82421eaf7 gsdx-ogl-wnd: really create a 3.0GL context
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5508 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-11 13:54:15 +00:00
gregory.hainaut ddbad1315b gsdx-ogl-wnd: forget 1 file
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5507 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-11 13:39:07 +00:00
gregory.hainaut 266af77420 gsdx-ogl-wnd: add GL function loading (done manually). It would be interesting to do the same on linux that would allow to drop glew depency.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5506 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-10 19:11:03 +00:00
gregory.hainaut f9ddd639b8 gsdx-ogl-wnd: Try to compile OGL backend on VS
* Update project files
* basic compilation fix: include stdafx, s/uint/uint32/
* add selection of the opengl renderer/device in gsopen

Remain to fix opengl function declaration/initialization


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5505 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-10 13:13:59 +00:00
gregory.hainaut cf2910f7ed gsdx-ogl-wnd: try to update VS to include 3rdparty and link with opengl32 lib
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5504 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-09 11:28:35 +00:00
gregory.hainaut c5a6b07b30 gsdx-ogl-wnd:
* fix C compilation issue

Remain 2 issues with VCS:
1/ need to add 3rdparty dir as include dir (zzogl seem to import common\vsprops\3rdpartyDeps.props)
2/ need to add opengl32.lib as additional lib


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5503 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-04 23:02:48 +00:00
gregory.hainaut 5e4bae5f5d gsdx-ogl-wnd: * add a preliminary context and wgl management
Note: don't expect to compile/work yet


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5502 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-04 21:33:24 +00:00
gregory.hainaut d91b28ac32 gsdx-ogl-wnd: forget one file ...
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5501 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-04 15:47:11 +00:00
gregory.hainaut 4fb7474e9c gsdx-ogl-wnd: multiple VS compilation fix.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5500 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-04 15:41:37 +00:00
gregory.hainaut 4d90ad17a1 gsdx-ogl-wnd: update the MS build system. Not sure I got all verions.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5499 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-04 11:47:20 +00:00
gregory.hainaut f95d9bd989 gsdx-ogl-wnd:
* split GSwnd into GSWndOGL  and GSWndDX
* replace GSwnd static object by a dynamic pointer


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl-wnd@5498 96395faa-99c1-11dd-bbfe-3dabce05a288
2013-01-04 11:41:51 +00:00
gregory.hainaut c86ca9c56e gsdx ogl: don't check dual source support on SW mode to avoid a crash on SW mode. (note HW is still crashing but better than nothing)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5464 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-11-27 07:50:51 +00:00
gregory.hainaut c4af005f0b gsdx ogl:
* retry compilation when driver failed to compile with a static 'index' constraint. Replace previous AMD hack.
* clean context default attribute value
zzogl 4: clean context default attribute value too.
zzogl 3: backport texture size fix


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5442 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-10-29 21:35:47 +00:00
gregory.hainaut a9020c6065 GSdx: only enable AMD hack for AMD GPU. Remove the older geometry shader hack fixed since 6 monthes
ZZogl: support xdg for the replayer


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5441 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-10-28 10:14:42 +00:00
gregory.hainaut d5b318b990 zzogl:
* move all remaining glx into the dedicated GLwin object
* rework a bit WGL to separate opengl context and window creation (like linux actually)

gsdx: Allow to control vsync. Not sure I used the good extension.

cmake: 
* check that EGL opengl context creation
* Shut up gcc warning when force inline might not work...



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5437 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-10-21 18:10:13 +00:00
gregory.hainaut e06484adb8 gsdx: update the copyrigh address thank to sed
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5412 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-09-09 18:16:11 +00:00
gregory.hainaut 81cc4d51da GSdx, linux: remove some letf-overs
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5408 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-09-08 16:06:44 +00:00
gigaherz 31f685c490 [VS2012] For some reason when I made the conversion I totally forgot to copy these, and I didn't notice that until yesterday.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5403 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-09-05 18:04:09 +00:00
ramapcsx2 fb851cfdfc GSdx:
Added loading of external shaders, coded by KrossX (thanks again :p ).
Right now it looks for a file called "shader.fx" in PCSX2's main directory.
If it finds one, the PageUp key activates the external shader (instead of the built-in FXAA).
We have a forum thread for some nice shaders to try out here:
http://forums.pcsx2.net/Thread-Custom-Shaders-for-GSdx

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5390 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-20 19:46:51 +00:00
gigaherz a21c85266c Make PCSX2 compile with Visual Studio 2012 (3/3): Upgrade the project files and fix a few project names. Update the .sln to point to the right project files.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5384 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-19 19:54:12 +00:00
gigaherz 027b7a8b98 Make PCSX2 compile with Visual Studio 2012 (2/3): Copy project files and solution from their vs2010 originals. Not updated yet!
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5383 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-19 19:45:56 +00:00
gigaherz 72372c2219 Make PCSX2 compile with Visual Studio 2012 (1/3): Workaround compiler differences that result in compile-time errors.
NOTE: The 'glew' project does NOT build yet, but it will have to be decided how to approach the problem (String literal too long in glew.rc)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5382 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-19 19:36:59 +00:00
gregory.hainaut e650a1d8a0 GSdx ogl: Fix a nasty crash because of the multithread hack.
canditate for 1.0 branch


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5381 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-19 13:06:40 +00:00
gregory.hainaut 226b2d63b8 gsdx: remove completely the SDL backend. Let's hope I didn't break too much VS
cmake: take the opportunity to drop the support of 3rdparty compilation. Distributions have got a more recent version of zlib/soundtouch anyway.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5376 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-15 10:22:19 +00:00
gregory.hainaut b70c5eb8b7 gsdx ogl: incorporate DX sudonim's changes on ogl
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5375 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-15 10:14:13 +00:00
gregory.hainaut 636c16f2df gsdx ogl:
* add some dummy shader. Can be modify inside the debugger apitrace
* glclear* commands` seem to depend on scissor test and depth mask. Allow full write for the depth buffer
* texture debug, try to output some nice colors for the depth buffers


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5365 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-08 17:49:23 +00:00
sudonim1@gmail.com 0d9d10bc26 GSDX: Temporary fix for another unorm precision issue.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5363 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-06 17:49:15 +00:00
sudonim1@gmail.com 10db10e6ba GSDX: reduce precision requirement for DATE, partially fixes Intel GPUs. (Not sure exactly what's going on here, I think that 0x80 as a 8 bit unorm isn't exactly the same as 128.f/255 but I don't know whether it's required to be... we can just play safe on this anyway).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5362 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-06 17:38:28 +00:00
sudonim1@gmail.com 20fbc82842 GSDX: And combo boxes are apparently weird about vertical size.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5360 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-06 05:58:02 +00:00
sudonim1@gmail.com 89bfd83621 GSDX: missed the property files, VS is awkward about saving them.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5359 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-06 05:43:51 +00:00
sudonim1@gmail.com 469beeac14 GSDX: Adapter selection in the configuration dialog. Effective on D3D10/11 and probably on D3D9. D3D9 will not enumerate adapters with no connected outputs and I haven't actually tried connecting my integrated GPU to a display, but D3D11 doesn't care.
Probably only of interest to testers (and me).  Absolutely do NOT select the reference device even out of extreme morbid curiosity.  It's not even very good at being a reference despite being slower than you can probably believe.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5358 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-06 05:26:44 +00:00
sudonim1@gmail.com cd05504851 GSDX: Simplified and improved (for my purposes) the D3D11 checks a little. Necessary for something I'm working on, hopefully doesn't break GSDX for anyone (this code took a lot of revisions initially as I recall).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5357 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-08-06 01:56:25 +00:00
sudonim1@gmail.com 5f28d08286 GSDX: New interpretation of destination alpha testing to improve effect rendering as an optional hack. Known to make shadows in the persona games (and thus probably shin megami tensei) better, not sure what else it accomplishes without destroying other effects.
Now, a note about the actual issue.  Destination alpha tests can be used on the GS as one of the workarounds for a lack of stencils.  If you use a destination alpha test and leave alpha writing on, the GS will only write each pixel until you write an alpha value which would fail the test.  This works to a point in gsdx without further hacking, but that point is when within a single batch of primitives the same pixels are written multiple times and the destination alpha test is expected to update.  I did experimentally make a tight loop updating the stencil with a draw then drawing for one primitive at a time, but it was prohibitively slow (over 80% fps loss, you really don't want to know).

Destination alpha testing cannot be directly implemented in D3D9 or D3D10, but (probably) can in D3D11 (with a speed hit for sure, but I doubt it'll be 80%).  I'll be getting a new graphics card and looking into that.

And before some idiot says it, the answer is no.  OpenGL does not help.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5346 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-24 02:20:07 +00:00
sudonim1@gmail.com 96c8c13ead GSDX: don't unnecessarily create and use a render target for the DATE setup stage, D3D10+ supports not having a render target set. (D3D9 doesn't, so that's untouched.)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5345 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-23 22:55:06 +00:00
sudonim1@gmail.com 8a20e5af90 GSDX: Quick ugly fix (major work on this function might be done soon) for a bug with colclamp I noticed. Unknown impact, might make some effects work.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5344 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-23 20:24:09 +00:00
sudonim1@gmail.com 8a8d3c67d4 GSDX: Removed the collapsing of ge/g and le/l alpha tests in the shader code and the supporting code in the C++. This was presumably intended to reduce the number of shaders needed but a) this was never actually implemented, b) a single developer will generally not mix the functionally equivalent (with a different AREF) greater/less than with greater/less than or equal to in GS techniques, c) it really wouldn't make much of a difference to performance anyway and d) it would make an experimental change I'm working with more complicated and slower.
No change in functionality expected.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5343 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-23 16:39:56 +00:00
sudonim1@gmail.com 1f8c4ddc22 GSDx: Just slapping some consts on methods I needed to use with const references in testing.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5342 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-21 03:45:40 +00:00
sudonim1@gmail.com 546adf52c9 GSDx: ATI strikes again. Workaround for ATI sampler bug, the same bug I found in palette sampling earlier.
This may make gsdx slightly slower for everyone (I don't know an easy way to restrict this to affected systems), especially if using 8-bit textures.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5341 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-19 20:40:42 +00:00
ramapcsx2 180b57b9cf GSdx: 2 more crcs for GoW and GoW2.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5336 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-07-07 20:46:03 +00:00
ramapcsx2 1e70895118 GSdx: Removed the CRC hack for Drakengard 2 as per issue 1303.
Thanks for reporting.
(Also replaced broken Chinese characters in comments.)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5330 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-27 16:06:25 +00:00
sudonim1@gmail.com 80ba8ff16a GSDX: Fix splinter cell double agent (and others) regression. Texture cache hits no longer depend on TEXA ever, GPU load however is increased. The last regression I think?
So, in the end I only properly understood the old code after finding all the problems with my version.  I'm not sure whether any changes I've made are improvements any more, I'll need to review it with what I've learned in mind.  This effort might've been a big waste of time.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5329 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-27 00:57:44 +00:00
shadowladyngemu 540d098794 GameDB: Status updates, games that require new gamefixes or don't anymore, etc etc...
GSdx Hackfixes: Lego Batman changed to aggressive list, doesn't really fix ingame and breaks the title screens.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5328 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-26 11:57:44 +00:00
gregory.hainaut 3af930c555 gsdx ogl: nvidia compiler is not happy with implicit cast...
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5322 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-21 17:31:53 +00:00
avihal 3b2944fe45 GSdx: Disable CRC hacks: Yet cleaner, better and more generic. Thx to sudonim.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5321 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-20 20:45:24 +00:00
avihal ae9c7791c2 GSdx: Disable CRC hacks - cleanups:
- Removed the #define DISABLE_CRC_HACKS (since it's at the GUI now).
- reverted r5315 and r5319 (which prevented gs dumps to have a correct CRC).
- Restored the functionality of these revisions via simple skip of the other hack calls.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5320 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-20 18:51:30 +00:00
ramapcsx2 48284746d6 GSdx: Better CRC disable value, using -2.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5318 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-20 13:23:35 +00:00
ramapcsx2 ef0377b0e9 GSdx: Fully disable CRC based hacks when the option is set (by setting the CRC to 0). Some GSRendererHW::OI_* functions were still active before.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5315 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 16:10:24 +00:00
sudonim1@gmail.com f2ca45ad46 GSDX: Put palette checking for alpha min/max calculation back in because of gabest's concerns about the software renderer's performance. Added a one line fix instead (m_clut.Read32(TEX0, TEXA))
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5313 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 01:57:13 +00:00
sudonim1@gmail.com f5f5074172 GSDX: Put the sprite hack back in because apparently it wasn't fixed.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5312 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 01:12:01 +00:00
sudonim1@gmail.com 21522e71b2 GSDX: Skip checking each palette entry's expanded alpha when deciding whether a texture is fully opaque. Textures are probably almost never determined to be opaque by this and doing it is problematic. (Skipping the check might even be a performance gain for hardware, you never know.)
Also remove some (probably mangled) chinese comments from the cutie merge.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5311 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 01:02:52 +00:00
sudonim1@gmail.com 0d9eca8668 88GSDX: Removed the "sprite hack" as it should be obsolete, fixed the vertex shader selector key function (the pixel shader was broken in the same way but with the "sprite hack" removed it doesn't matter now).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5310 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 00:35:42 +00:00
sudonim1@gmail.com c755435eeb GSDX: Do not interpret TEXA while filling the gsdx internal temporary CLUT buffer used in texture creation and updating (I didn't realise this was happening and it's incompatible with my approach). Probably generally fixes stuff in combination with the other changes in palette handling, at the very least I know it fixes lines in sprites in Ar Tonelico 2 (currently needs the "sprite hack"), a bug which I spent a long time trying to fix after it was pointed out to me before.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5309 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-19 00:12:35 +00:00
sudonim1@gmail.com e13c58812d GSDX: Add a comment explaining something which doesn't matter.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5304 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 18:39:18 +00:00
sudonim1@gmail.com 323ac81a7d GSDX: use a GPU side palette for high byte indexed format copies from framebuffers again (including all the buggy cases because of the revert). I think this is how it used to be but I've lost track a little.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5303 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 18:26:42 +00:00
sudonim1@gmail.com c9194b185a GSDX: Ignore this commit, just deleting lines of code.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5302 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 17:54:09 +00:00
sudonim1@gmail.com 0e9a4c1663 GSDX: Missed this in d3d9 code while fiddling with the shader. Can't be bothered to do the maths to determine whether doing this twice would have a visible effect.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5301 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 17:49:50 +00:00
sudonim1@gmail.com a617a6c983 GSDX: partially revert texture cache changes for now. Compat probably back to normal, some glitchy textures are probably differently glitchy, the other changes might improve some games, performance probably much the same as ever.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5300 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 14:33:34 +00:00
sudonim1@gmail.com 14acb81553 GSDX: CT32 -> T8H, need to use a 32 bit D3D format for the texture so that they have compatible D3D types for the copy (don't have to if using StretchRect but might as well).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5299 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-17 14:07:03 +00:00
avihal 999ff5c457 GSdx: Add GUI for disabling all CRC hacks (for testing purposes only, disabled by default). The new checkbox is at the "HW Hacks" section, and is only relevant when the global "Enable HW Hacks" box is checked.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5294 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-13 23:53:08 +00:00
sudonim1@gmail.com 1ed80f320e GSDX: Clear Target::m_valid after a full Read() for performance (and accuracy?) Probably doesn't match the original intent but it matches the current usage.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5293 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-13 18:14:58 +00:00
sudonim1@gmail.com 6bb9339223 GSDX: (New bug?) If "8 bit textures" is disabled format conversion has already happened and we need PS_FMT=0 in the shader for indexed textures.
GSDX: (Old bug) When looking up a texture in the cache, the check didn't take into account CLUT formats, nor did it skip this check when "8 bit textures" is enabled.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5292 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-13 17:44:24 +00:00
sudonim1@gmail.com 0bf64fdffd GSDX: fixed an oversight in my shader change gregory caught which removed alpha expansion for the direct sampling case, should probably fix the remaining bugs. Also set the texture sampler to point sampling when the shader will be performing its own bilinear filtering (effect on games unknown but should be an improvement).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5291 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-13 15:36:10 +00:00
gregory.hainaut b8b451340c zzogl: use the EXT version of fbo (fix the build on windows)
gsdx:
* add some parenthesis to shup up very verbose gcc warning
* adapt ogl to latest sudonim change


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5290 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-13 10:43:04 +00:00
gregory.hainaut 3b22f0fb0c zzogl glsl4:
* properly delete program and vertex array. Avoid a crash on plugin reload
* reset shader state. Avoid to reuse invalid data on plugin reload
gsdx:
* add an hack to unattach/attach the gl context from different thread. Help to solve some crashes. The best will be to move gpu operation out of gsreadfifo but it would need more works
* implement logz for test purpose (don't seem to help)
gsdx replay:
* use default xdg location


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5289 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-12 18:14:01 +00:00
sudonim1@gmail.com b722dfd013 GSDX: Added a compatibility check to the framebuffer handling for the texture cache and made it preferred and added a writeback as a fallback. Compat should be back to normal?
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5288 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 10:57:32 +00:00
sudonim1@gmail.com e8257df98d GSDX: made the paletted texture handling in the cache a bit more sensible to my eyes and implemented interpolation of palette entries for pixels in paletted textures when using the 8 bit textures option. Regressions in some games I think, such as Virtual On (which is very broken anyway), need to investigate what made them work (to some degree) before. Seems to change some performance characteristics favourably to my surprise, but I might just be bad at remembering framerates.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5287 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 03:27:16 +00:00
sudonim1@gmail.com 8ab8b4592d GSDX: Err, and another file, I should be asleep.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5286 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 02:57:28 +00:00
sudonim1@gmail.com adfa7f1579 GSDX: Forgot a file.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5285 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 02:56:44 +00:00
sudonim1@gmail.com 08d8287d3e GSDX: Added some exceptions on shader compilation failure (with handlers in entry points because people seem to like the plugin struggling on even when nothing works any more) because I am not keen crashing Windows via my graphics driver.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5284 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 02:31:44 +00:00
sudonim1@gmail.com 17f28b24b3 GSDX: Prodded some offensive code, this isn't meant to affect emulation of any games and it probably won't.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5283 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 00:00:18 +00:00
sudonim1@gmail.com 1711a26bbb GSDX: put all paletted texture samples through the same transformation from the UNORM 0-1 256 step mapping to a 0.5/256-255.5/256 mapping after seeing potential bugs with FMT_4HL and changed FMT_4HH because it seemed to be completely wrong. Nothing but 8 bit textures tested because I can't find a single game which uses 4 bit textures.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5281 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-10 16:04:47 +00:00
sudonim1@gmail.com 4f79c4d1cb GSDX: Fixed my inability to remember or look up (I swear that page was hiding) coordinate systems in r5279 and assumed that it was a rounding error instead. The symptom was that palette indices above around 250 were being rounded up to the next palette entry causing visible glitches (only in D3D10 for some reason). Changed the code to keep the fractional part after multiplication by 256 around 0.5 and the steps around 1.0. Should be very safe against small errors.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5280 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-09 08:03:27 +00:00
sudonim1@gmail.com 1df5b7ef7a GSDX: Probably fix D3D10 and maybe D3D9 (might be working anyway but I think I have it addressing texel centres now) palette lookups. I noticed that this was broken in D3D10 while fixing the Realta Nua issue in r5273.
Explanation, because this gives me a headache and this might save someone else one (or I might be wrong and they might see why): in D3D10, 0.0 points to the centre of the leftmost texel and 1.0 points one texel to the right of the rightmost texel, so to map a UNORM uniformly across a texel we need to multiply the input by (w-1)/w.  In D3D9 0.0 points to the left edge of the leftmost texel and 1.0 to the right edge of the rightmost texel so after the multiplication we add 1/2w.

Actual texture sampling is probably not right for at least one of D3D9 and D3D10, but this headache is killing me.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5279 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-08 21:36:44 +00:00
avihal faa463b95c GSdx: CRC hacks: ICO: moved the cutie extra hack from r5214 to "Aggressive mode".
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5276 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-07 15:22:12 +00:00
ramapcsx2 a74b8e2c7f GSdx: Removed Rogue Galaxy from the GSdx crc hacks. Fixes issue 1290.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5275 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-07 11:53:53 +00:00
ramapcsx2 3321b327a9 Changed the defaults for GSdx to native resolution (for emulation accuracy's sake) and made the recommended speedhacks enabled by default in PCSX2.
Also set the auto deinterlace mode in GSdx when the .ini isn't present (instead of "none").

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5270 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-06 10:08:08 +00:00
gregory.hainaut 55ba4477ca gsdx: remove sdl and ogl from the win32 dialogs
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5268 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-04 18:45:54 +00:00
avihal 0dc1e7f4bb GSdx: CRC hacks: Remove duplicates (none left for now).
The following dup CRCs of were removed (leaving one):
0x7D4EA48F - Haunting Ground EU (now only Genji).
0x1A85E924 - DMC3 CH (now only GOW1)
0x7ACF7E03 - Spyro New beginning (now only ICO)

The following CRCs were removed without any negative effect:
0x2F123FD8 - GOW2 RU (same as US).
0x23A97857 - Star Ocean 3 JPUNDUB (same as US).



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5255 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-01 14:16:25 +00:00
avihal bc4ec92600 GSdx: CRC hacks: Few CRCs from comments at r5214
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5244 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-30 15:04:17 +00:00
ramapcsx2 6287561e18 GSdx: Correct a small resource issue for merging.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5243 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-30 12:07:09 +00:00
gregory.hainaut cfeb7a5b0a copyright: remove the special copyright note. Only impact trivial code (enum and register definition)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5241 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-29 06:59:33 +00:00