Commit Graph

1045 Commits

Author SHA1 Message Date
Gregory Hainaut 48b3d91768 partially revert previous commit ec1da2805c
It breaks windows...
2014-11-10 12:19:30 +01:00
Gregory Hainaut 8c90e7cafc gsdx-ogl: support latest fxaa version
Only tested on Nvidia, please report any issue with your driver

Note: requires GL4 GPU
2014-11-10 10:39:55 +01:00
Gregory Hainaut ff39dffe23 gsdx-ogl: add a gui option (linux) to select external shader
Note: of course it requires a glsl shader ;)

On windows, you can set the path on the ini file. Here an example with linux path:
shaderfx_conf = /home/gregory/playstation/emulateur/pcsx2_merge/bin/GSdx_FX_Settings.ini
shaderfx_glsl = /home/gregory/playstation/emulateur/pcsx2_merge/bin/shader.fx
2014-11-10 10:38:52 +01:00
Gregory Hainaut 920ac6695f gsdx-ogl: add preliminary support of external shader fx 2014-11-10 10:37:58 +01:00
Gregory Hainaut ec1da2805c pcsx2/GSdx: disable AVX for the moment on linux
I need to check carefully the consequence of ABI change. So far wx is very unhappy!

Fatal Error: Mismatch between the program and library build versions detected.
The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6),
and your program used 2.8 (no debug,Unicode,compiler with C++ ABI 1006,wx containers,compatible with 2.6).
2014-11-09 15:45:54 +01:00
Gregory Hainaut 84f844767c gsdx-ogl: micro optimize PSConstantBuffer cache
Might help to save a cache line on the CPU :)
2014-11-08 21:39:17 +01:00
Gregory Hainaut 58bd645d49 gsdx-ogl: BindBufferBase also bind to the generic binding point 2014-11-08 21:39:13 +01:00
Gregory Hainaut 16377f7249 gsdx-ogl: only call PixelStorei when parameters are updated
It won't improve performance but it would reduce a bit the noise in gl retracer tool
2014-11-08 21:30:14 +01:00
Gregory Hainaut 47f40ed79a gsdx-ogl: reduce pbo complexity
Copy the full line into the pbo. Dma will only take GL_UNPACK_ROW_LENGTH
- increase memcpy size by 2 in the pbo
+ single memcpy will be faster and can use sse

Enable buffer_storage extension:
* GL_CLIENT_STORAGE_BIT was required (it is the duty of TexSubImage to copy data into the GPU mem)
* Enable the extension by default
2014-11-08 21:30:14 +01:00
Gregory Hainaut e62af05496 gsdx-ogl: reduce complexity of clear texture
Null is equivalent to a clear to 0.

Note: Code is not yet used because both stencil and depth are cleared.
Future note: stencil can potentially be replaced by load_store_image
2014-11-08 21:30:14 +01:00
Gregory Hainaut bd9df9a6ec gsdx: Add some comment on GSTextureCache + schematics
Note: docs/TextureCache.odg was created with libreoffice. Not perfect but give a nice overview
2014-11-08 21:30:14 +01:00
ramapcsx2 b7e5e41afe Merge pull request #333 from PCSX2/linux-avx
Support of AVX build for linux
2014-11-08 14:09:06 +01:00
ramapcsx2 8434d6c397 Merge pull request #328 from tlbjr/master
GLDEBUGPROC type cast and postBuild.cmd for GSdx on VS2013
2014-11-08 13:11:07 +01:00
Asmodean df0a9c4683 Some small fixes, that I noticed. 2014-11-06 10:56:33 +00:00
Asmodean 937e475169 [Post-Processing] Update GSdx FX effect suite to latest version. 2014-11-03 07:15:34 +00:00
Gregory Hainaut f25e056914 gsdx: enable AVX with GCC
* Use overloaded function instead of specialized template
=> see http://stackoverflow.com/questions/3052579/explicit-specialization-in-non-namespace-scope

* replace _mm256_slli_si128 by _mm256_slli_si256
  I hope they're equivalent. I didn't find any info on _mm256_slli_si128,
  however srl use _mm256_srli_si256
2014-10-26 14:47:35 +01:00
Gregory Hainaut 679fa65b84 cmake: By default optimize for current arch
Note: it requires GCC 4.7. Otherwise use -DDISABLE_ADVANCE_SIMD=OFF to restore
previous behavior. It will impact Ubuntu precise (12.04)
2014-10-26 14:47:35 +01:00
Tom Burnett 1f734a69a0 Small VS2013 fixes 2014-10-12 01:40:40 -07:00
Gregory Hainaut 6fe9ee387d gsdx-ogl: optimize the PS cb cache
* Don't use the stack
* Don't compare MinMax parameter (depends of others)
* Don't store not-compared parameter in the cache (HalfTexel/MinMax)

+0.3fps/46fps (well better than nothing)
2014-10-02 20:44:22 +02:00
Gregory Hainaut a573ce185c gsdx-ogl: mark GL_EXT_shader_io_blocks as mandatory for GLES 2014-10-02 20:44:22 +02:00
Gregory Hainaut ccc1137e12 gsdx-ogl: merge the two vertex buffer format
* Only a single VAO
    => Format is set once
    => Only a single bind at startup
    => GSVertexBufferStateOGL is nearly useless
    => barely faster but better than nothing :)
2014-10-02 20:44:22 +02:00
Gregory Hainaut 10c7be8c50 gsdx-ogl: Use 32B strides for all VBO 2014-10-02 20:44:22 +02:00
Gregory Hainaut d37cc8e1e7 gsdx-ogl: GL_ARB_shading_language_420pack is now mandatory
All API/drivers support it so time to remove the fallback.
2014-10-02 20:44:22 +02:00
Gregory Hainaut 79e8a912cd gsdx-ogl: keep the draw buffer enabled by default
Note: Only DATE requires to disable the draw buffer
2014-09-30 22:18:20 +02:00
Gregory Hainaut f46e8cc6ac gsdx-ogl: bump base requirement to 3.3
A couple of fallbacks were introduced for the Mesa driver that only support 3.0
DSA will require a recent Mesa which already support GL3.3

Require at least SandyBridge for Intel GPU
2014-09-30 22:18:20 +02:00
Gregory Hainaut 594f6c33a2 gsdx-ogl-ES: require GL_EXT_shader_io_blocks + GLES3.1
Allow to use same shader interface for all API

Note: on the GL API it will require GL3.3 (see next commit)
2014-09-30 22:18:01 +02:00
Gregory Hainaut 1c501047f5 gsdx-ogl: refresh the linux gui with latest extension 2014-09-28 12:23:44 +02:00
Gregory Hainaut 8833afc2fa gsdx-ogl: drop GL_ARB_multi_bind
It will be replaced by DSA so let's reduce the complexity of opengl
2014-09-28 12:23:44 +02:00
Gregory Hainaut fa43018d10 gsdx-ogl: no DSA isn't mandatory yet... 2014-09-28 12:11:22 +02:00
Gregory Hainaut 1e86e3cb08 gsdx-ogl: rework callback debug
* use DebugOutputToFile as a callback of gl error. Add a breakpoint to
  find the culprit GL call
* use string instead of char[n]

Note: CheckDebugLog is potentially useless now
2014-09-28 12:00:34 +02:00
Gregory Hainaut b7601a9add gsdx-ogl: Enable various GL4+ extensions
* GL_ARB_clip_control: reduce z fighting
* GL_ARB_clear_texture: no real speed gain (but improve code quality)
* GL_ARB_bindless_texture: +1fps (if you're CPU limited)
2014-09-28 12:00:34 +02:00
Gregory Hainaut 9d8d702aa6 gsdx-ogl: drop GL_NV_depth_clamp extension
superseeded by GL_ARB_clip_control
2014-09-28 12:00:34 +02:00
Gregory Hainaut 4659184cc1 gsdx-ogl: add support of clip_control (depth only)
* replace the [-1;1] depth range of openGL with the DX range [0;1].
2014-09-28 12:00:34 +02:00
Gregory Hainaut 104688e3ee gsdx-ogl: fix ARB_bindless support 2014-09-28 12:00:34 +02:00
Gregory Hainaut cc24da128c gsdx-ogl: fix for gl_clear_texture
Note: Disabled for depth_stencil texture (I'm not sure we can split the two)
2014-09-28 12:00:34 +02:00
Gregory Hainaut d720cc16a6 gsdx-ogl: gl4.5: add plumbering to support direct_state_access and clip_control 2014-09-28 12:00:33 +02:00
Gregory Hainaut 58a8683d7d gsdx-ogl: disable texture compare mode
It seems to be used for depth texture
2014-09-22 09:27:34 +02:00
Gregory Hainaut d51f008c72 gsdx: openglES fix
* require a 3.1 context
* unattach texture of the fbo when they're not used
(avoid to have a texture and depth_stencil with different size)

Note: except minor shader bug it works on Nvidia 340.23.01
2014-09-22 09:27:31 +02:00
uyjulian f3a50a01a7 cmake: Use previous macros in CMakeLists.txt files
Gregory: add a c lib for zzogl-pg-cg replayer
2014-09-05 20:16:23 +02:00
Matteo Beniamino 15c487e547 GSdx: fixed use of separate shader objects for Intel driver. 2014-08-23 17:09:38 +02:00
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