Gregory Hainaut
cb6e8a7d6a
gsdx-linux: Don't enable EGL by default
...
I was hoping that EGL become a standard much more faster. Currently it is an useless dep
so let's disable it by default.
2015-05-11 15:33:40 +02:00
Gregory Hainaut
643b1647c4
gsdx-gui-linux: add some tooltips for the hw options
2015-05-11 14:12:41 +02:00
Gregory Hainaut
921fa3bab8
gsdx-ogl/linux: drop fba option
...
It is useless as DX11
2015-05-11 13:57:26 +02:00
Gregory Hainaut
f0de7d6386
gsdx-debug: add 2 extra frames in GS dump
...
Initially I was afraid of the size increase but it can be
higly compressed.
Sometimes image was computed inside a RT but never outputed to
the screen which remains black. It is annoying to see the glitches
2015-05-11 13:45:24 +02:00
Gregory Hainaut
b3d8981a22
gsdx: link replayer to png to avoid link failure
2015-05-11 13:24:40 +02:00
Gregory Hainaut
eff4ac3e4a
gsdx-ogl: update UBO hint
...
On Nvidia, DYNAMIC is a bit faster.
2015-05-11 12:35:41 +02:00
Gregory Hainaut
59f7e4d2dc
Revert "gsdx linux: drop aligned stack option"
...
This reverts commit 2dcffe7fa4
.
2015-05-11 12:15:38 +02:00
Gregory Hainaut
2dcffe7fa4
gsdx linux: drop aligned stack option
...
I think the bug was related to a wrong declaration of exported function without stdcall
2015-05-11 11:35:34 +02:00
Gregory Hainaut
286fe4db8c
cmake/gsdx: check png++ is installed to support png image
...
Otherwise fallback to bmp file
2015-05-11 11:32:13 +02:00
Gregory Hainaut
30e3956ea7
gsdx-ogl: avoid issue with apitrace
...
The tool doesn't support NaN value so be sure the buffer is correctly initialized
2015-05-11 11:19:18 +02:00
Gregory Hainaut
1523b9534f
gsdx-debug: compact the code
2015-05-11 11:19:00 +02:00
Gregory Hainaut
51ed3e63e9
glsl: oups forget to remove a line
2015-05-10 10:39:23 +02:00
Gregory Hainaut
5565544ba6
gsdx-ogl: DATE with texture barrier
...
Much faster for small batch that write the alpha value. Code can
be enabled with accurate_date option.
Here a summary of all DATE possibilities:
1/ no overlap of primitive
=> texture barrier (pro no setup of stencil and single draw)
2/ alpha written
=> small batch => texture barrier (primitive by primitive). Done in N-primitive draw calls.
(based on GL_ARB_texture_barrier)
=> bigger batch => compute the first good primitive, slow but only 2 draw calls.
(based on GL_ARB_shader_image_load_store)
=> Otherwise there is the UserHacks_AlphaStencil but it is a hack!
3/ alpha written
=> full setup of stencil ( 2 draw calls)
2015-05-09 19:54:01 +02:00
Gregory Hainaut
390811f414
gsdx-debug: Dump in PNG on linux & dbg/dev build
...
Keep BMP for standard user of release build
2015-05-09 18:41:17 +02:00
Gregory Hainaut
3c7a3a3d83
gsdx-ogl: disable accurate option if driver doesn't support it
2015-05-09 18:41:17 +02:00
Gregory Hainaut
7fac25edb0
glsl: add shader implementation of impossible blend
...
Issue: I don't know if destination alpha value must be multiplied by 2.0f
2015-05-09 15:02:34 +02:00
Gregory Hainaut
f029e4763f
gsdx-ogl: add the alpha value in a constant buffer
2015-05-09 15:02:34 +02:00
Gregory Hainaut
472608b879
gsdx-ogl: add accurate blending implementation
2015-05-09 15:02:13 +02:00
Gregory Hainaut
1e8aea033c
gsdx-ogl: add a wrapper to control the drawing of primitives
...
No barrier => draw all primitives
Barrier but without overlap => draw all primitives
Barrier with overlap => draw primitive by primitve
It will ease the implementation of accurate blending and why not date too
2015-05-09 15:01:39 +02:00
Gregory Hainaut
625d65d4b4
gsdx-ogl: encode the bogus id as shader parameter
2015-05-09 14:55:44 +02:00
Gregory Hainaut
bc5de8df6b
gsdx-ogl: disable FF blend when blend is done in shader
2015-05-08 20:28:50 +02:00
Gregory Hainaut
380e420cdd
gsdx-ogl: add a blend parameter to shader
2015-05-08 20:28:50 +02:00
Gregory Hainaut
9023f5f0db
glsl: drop useless ifndef
...
I often mix them with the real value...
.
2015-05-08 19:28:17 +02:00
Gregory Hainaut
8e1db43431
gsdx-debug: debug stuff
2015-05-08 19:28:17 +02:00
Gregory Hainaut
3c66da4d82
gsdx: remove old code
2015-05-08 19:28:16 +02:00
Gregory Hainaut
1addae1993
gsdx-ogl: don't use extra shader for sprite hack
...
Atst == 2 && sprite_hack is equivalent to Atst == 1
It frees a bit in the shader selector, and reduces shader combinations.
2015-05-08 19:28:16 +02:00
Gregory Hainaut
b490085214
gsdx-ogl: add 2 options in the GUI to ease testing
...
accurate_date => use an emulated stencil to compute destination alpha
test (could be slow)
accurate_blend => do nothing (future)
2015-05-08 19:28:16 +02:00
Gregory Hainaut
4c91bab00e
gsdx: fix compilation error on release build
2015-05-08 19:28:00 +02:00
Gregory Hainaut
6d31124d3a
gsdx-debug: only enabled advance gl debugging on linux
...
It will avoid some crash on windows for driver that doesn't support
the extension.
Make debug support mandatory for debug build on linux.
2015-05-08 09:54:34 +02:00
Gregory Hainaut
e87d129b09
gsdx-ogl: more verbose debug
2015-05-08 01:01:01 +02:00
Gregory Hainaut
d6448183d7
gsdx-ogl-debug: insert error message in GL stream
...
This way, you can see your message in the GL debugger
2015-05-08 00:16:31 +02:00
Gregory Hainaut
544a923e32
gsdx: Add an option to control auto skip of depth texture
...
Default is 1 if the user enable hack.
It fixes GTA sun effect and likely others bugs.
Please someone add a windows GUI option.
2015-05-07 23:54:22 +02:00
Gregory Hainaut
51a67029cf
gsdx-ogl: add an option to print gl error messages
2015-05-07 23:54:22 +02:00
Gregory Hainaut
7518b2ef21
gsdx-gui-linux: add debug option in the gui
...
* Only for debug/dev build
* look awful (expand/fill) but otherwise it is nice for the debug ;)
2015-05-07 23:54:22 +02:00
Gregory Hainaut
d20501739f
Merge pull request #528 from ssakash/patch-1
...
sync with GSdx.ini variable.(fix earlier typo)
2015-05-07 22:15:41 +02:00
Gregory Hainaut
fda746ff93
gsdx-gui-linux: support 3 states hack options
...
Based on a Combo Box on linux. As good as 3 states check buttons
2015-05-07 22:13:49 +02:00
Gregory Hainaut
d69ffa9b8b
gsdx-gui-linux: move remaining table filling into small functions
2015-05-07 22:13:49 +02:00
Gregory Hainaut
b39b9c9f55
gsdx-gui-linux: use callback everywhere
...
Note: texture offset doesn't work nicely (you need to press enter
to validate the change)
2015-05-07 22:13:49 +02:00
Gregory Hainaut
d428e0d19d
gsdx-gui-linux: move table filling into separate function
...
It is much easier to read this way. I need to use callback for the remaining
object before I can move everything out of main function.
2015-05-07 22:13:49 +02:00
Gregory Hainaut
917a6c28e5
gsdx-gui-linux: factorize code
...
* Use wrapper and callback for Check Button/Spin Button/Combo Box
* Use TheApp.m_gs vector to create combo box
Remove nearly 100 lines of code ^^
2015-05-07 22:13:49 +02:00
Gregory Hainaut
ba21879059
gsdx-ogl: 1x aniso <=> off
2015-05-07 22:13:49 +02:00
Gregory Hainaut
e6560f348e
gsdx: add vector option for linux & openGL
2015-05-07 22:13:49 +02:00
Gregory Hainaut
8f1d00292b
gsdx-ogl: allow to control vsync on Windows
...
Issue #529
Completely untested
2015-05-07 18:41:10 +02:00
Gregory Hainaut
6095f40baf
gsdx-ogl: add the number of free bit in selector structs
2015-05-07 18:41:10 +02:00
pgert
9a083d5506
gsdx: crc hacks: few new crcs, few crcs region changes
...
Signed-off-by: Avi Halachmi (:avih) <avihpit@yahoo.com>
2015-05-07 15:57:50 +03:00
Gregory Hainaut
97fad356b8
gsdx-ogl: fix debug build for AMD/Intel HW
2015-05-06 19:09:13 +02:00
Gregory Hainaut
cc4713d379
gsdx-debug: extend ogl debug capabilities
...
Group opengl calls into a nice name.
Apitrace shows them in a tree format that support folding. Previously it
was a long flat list (10K-40K of lines by frame)
I align the call number with the internal s_n variable. This way it is
easy to map GSdx dump output with the GL debugger :)
2015-05-06 19:09:13 +02:00
Gregory Hainaut
530e4ce776
gsdx-ogl: drop hack that rescale primitive (to avoid upscale glitch)
...
Rendering is bad. It renders sprites at native resolution.
2015-05-06 19:09:13 +02:00
Gregory Hainaut
6d65867b26
gsdx-ogl: comment point_sampler
...
It is not enabled on the shader so I will reuse the bit
2015-05-06 19:09:12 +02:00
Gregory Hainaut
3fcac07120
gsdx-ogl: print some message when blending is not properly supported
2015-05-06 19:09:12 +02:00
Gregory Hainaut
6fca3b421d
gsdx-debug: dump register context in a .txt file
...
+ Realign s_n number if frame is skipped
This way it is easier to understand current draw. It also eases
comparaison between SW/HW.
2015-05-06 19:09:12 +02:00
Akash
24e37d2dea
sync with GSdx.ini variable.(fix earlier typo)
...
fixed the description for round offset hack.
fixed the new description for round offset hack.
2015-05-05 23:01:46 +05:30
Gregory Hainaut
5d4bc5c8fe
Merge pull request #516 from PCSX2-underground/master
...
round offset UI initialization
2015-05-05 17:48:53 +02:00
Gregory Hainaut
5f5b901bca
gsdx-ogl: alpha bending equation/function are constant
...
Drop useless variables/state checking
2015-05-05 11:20:25 +02:00
Gregory Hainaut
8032e2c369
gsdx-ogl: separate color mask state from the blending state
...
Unlike DX they're uncorrelated.
2015-05-05 10:26:01 +02:00
Akash
302ce51efe
round offset UI explanation
...
initialization of IDC_ROUND_SPRITE
set&get config for round offset.
three state checkbox for the hack.
define IDC for round offset.
Linux (GUI) refresh.
typo
2015-05-05 00:29:00 +05:30
Gregory Hainaut
7bfee7e377
gsdx-debug: stop the dump after a limited number of draw call
...
Otherwise it fills your disk in a short time with useless data.
2015-05-03 16:46:48 +02:00
Gregory Hainaut
c1ddad2d25
gsdx-linux: Refresh the GUI
...
* Use table everywhere (better alignment)
* Factorize Box/Frame creation
* Factorize table insertion
* Add Anisotropic Filtering support
2015-05-03 16:36:48 +02:00
Gregory Hainaut
ae70344fbc
gsdx-ogl: fix 2 passes DATE with GL42 (override_GL_ARB_shader_image_load_store = 1)
...
It fixes shadows issue with Persona 3
2015-05-02 16:56:18 +02:00
Gregory Hainaut
14a1925de0
gsdx ogl: date texture is signed to use i variant
2015-05-02 16:53:34 +02:00
Gregory Hainaut
f37ef105c5
gsdx-ogl: add support for anisotropy
...
Close feature request #447
2015-05-02 10:54:58 +02:00
Gregory Hainaut
b1ec8a5a42
gsdx-ogl: detect support of GL_EXT_texture_filter_anisotropic
2015-05-02 10:53:19 +02:00
Gregory Hainaut
73d04e33e9
gsdx ogl: clean various comment and old code
2015-05-01 20:04:23 +02:00
Gregory Hainaut
335695bd0e
purge GLES from GSdx !
...
mobile will use vulkan (or any new API) anyway
2015-05-01 20:02:17 +02:00
Gregory Hainaut
e17ba1c143
gsdx ogl: disable logz when ARB_clip_control is supported
...
Basically any recent drivers but Catalyst...
2015-05-01 15:01:08 +02:00
Gregory Hainaut
2ff3d17f67
gsdx-ogl: don't create override option for mandatory extension
...
Ini is alredy big enough
2015-05-01 14:18:05 +02:00
Gregory Hainaut
a0c17ae0a4
gsdx: use vertex storage by default
...
It is faster on games that draw lots of primitives and in low upscaling.
2015-05-01 14:05:45 +02:00
Gregory Hainaut
004fa7aea4
gsdx debug: allow to dump alpha channel as a gray texture
...
I would love to find an image viewer that allow to mask channel of the image
2015-05-01 13:38:58 +02:00
Gregory Hainaut
c8a3db114c
gsdx debug: create savet option
...
0: don't dump input texture
1: dump input texture
Now, you can do a first pass with only RT. When you find the wrong call, you can redump the input texture of the bad draw.
2015-05-01 13:35:21 +02:00
Gregory Hainaut
f96a653d05
gsdx-ogl: GSVertexArrayOGL uses ASSERT with condition
...
Remove useless indentation too
2015-05-01 12:16:26 +02:00
Gregory Hainaut
71c26a829e
gsdx-ogl: forget to remove this useless call
...
It is done once in Device Creation instead of per stencil object
2015-05-01 12:10:03 +02:00
Gregory Hainaut
c76e66f8d2
gsdx-ogl: fix read back of render target
...
Initial code use a PBO to do asynchronous transfer. It is silly because
GSdx doesn't use this free time. So let's use a sync read. Same speed but
no PBO to manage.
2015-05-01 01:26:44 +02:00
Gregory Hainaut
de52ce956a
gsdx linux: update gui
...
Clear texture was dropped but texture_barrier was added
2015-05-01 01:00:11 +02:00
Gregory Hainaut
7367b22e03
gsdx-ogl: reduce toggling of scissor state for DATE
2015-05-01 00:59:49 +02:00
Gregory Hainaut
71e517108d
gsdx-ogl: fix colclip
...
Sotc shadow and likely various games :)
Thanks to pseudo
2015-04-30 23:08:05 +02:00
Gregory Hainaut
25997647f2
gsdx-ogl: add ENABLE_OGL_PNG_OPAQUE to dump texture without alpha
...
Alpha is nice but fully transparent texture suck
The best will be an image viewer that can toggle the alpha channel
2015-04-30 23:06:54 +02:00
Gregory Hainaut
39a5d4c839
gsdx: add PNG support for SW renderer
...
Easier to compare
2015-04-30 20:13:24 +02:00
Gregory Hainaut
b65a62096f
gsdx-ogl: drop support of ENABLE_OGL_DEBUG
...
Stencil can be read by GL debugger due to correct mask configuration
2015-04-30 20:02:51 +02:00
Gregory Hainaut
8a52fdab57
gsdx-ogl: allow to dump texture as png file
...
-- slower (but that a debug feature)
++ smaller (40x-50x)
++ native support of alpha
Require libpng++ and the define ENABLE_OGL_PNG
Note: depth is not supported yet.
2015-04-30 20:02:50 +02:00
Gregory Hainaut
ee19a2789c
gsdx: move invalidation from GSDevice to GSTexture
...
Much cleaner this way
2015-04-30 19:55:57 +02:00
Gregory Hainaut
2bd9043657
gsdx-ogl: improve debug of stencil
...
Note: ENABLE_OGL_STENCIL_DEBUG could be dropped now that I can read the stencil properly
2015-04-30 19:55:57 +02:00
Gregory Hainaut
7887d7b5a5
gsdx-ogl: use less verbose code
2015-04-30 19:55:41 +02:00
Gregory Hainaut
f0181d98fd
gsdx-ogl: save the texture state
2015-04-30 09:57:30 +02:00
Gregory Hainaut
0ab0c6cfba
gsdx: verbose debug option
...
Print opengl error message on stderr
Rename Debug.txt into GSdx_opengl_debug.txt
2015-04-27 19:30:03 +02:00
Gregory Hainaut
eaa0dae305
glsl: drop invariant qualifier
...
Fix issue #510 and potentially it allows the compiler to better optimize the code
2015-04-27 18:52:55 +02:00
Gregory Hainaut
46ff4dc3d3
gsdx-ogl: hardware unit only support normalization of 4 bytes...
...
(At least on recent AMD GPU)
2015-04-27 18:51:59 +02:00
Gregory Hainaut
301fe869c7
glsl: improve the logz handling
...
This way only 0 and 1 will conflict
2015-04-26 17:51:33 +02:00
Gregory Hainaut
768ae342c3
gsdx: move buffer check after allocation
2015-04-26 17:51:06 +02:00
Gregory Hainaut
346ef1eec2
gsdx-ogl: ouch! Properly check the creation of vertex buffers
2015-04-26 11:01:55 +02:00
Gregory Hainaut
6a3250cad2
gsdx-ogl: fix logz management (FFXII)
...
The issue is that z+1 overflow if z is UINT max
log2(z) overflow if z is 0
So let's use an or 1 to avoid both overflow
2015-04-25 20:23:26 +02:00
Gregory Hainaut
ee244071fa
gsdx-ogl: use 64 bits counter + fix division factor
...
I also added a counter of the real size of the texture.
I have a bad overhead for pbo transfer
2015-04-25 14:18:21 +02:00
Gregory Hainaut
00e62919c5
gsdx-ogl: use countof macro instead to hardcode the size
2015-04-25 13:06:02 +02:00
Gregory Hainaut
47a0026b60
gsdx-ogl: print the bandwidth of uniform
2015-04-25 13:00:03 +02:00
Gregory Hainaut
f2f59544d2
gsdx-ogl: early bind vertex array object
...
Creation of buffer will generate a bind in BufferStorage mode. It is just to be safe.
2015-04-25 12:50:12 +02:00
Gregory Hainaut
15ae9996bb
glsl: format white space + comment
2015-04-25 12:50:12 +02:00
Gregory Hainaut
757726bb91
gsdx-ogl: allow to invalidate the texture
...
It just a hint to the driver to avoid any useless transfer
I don't expect any change but it is free so why not ;)
2015-04-25 12:50:12 +02:00
Gregory Hainaut
75817bb27b
gsdx-ogl: add a quick and dirty DSA layer emulation
...
The global idea is to use
1/ bind in tight loop
2/ DSA otherwise (to avoid any binding in tight loop)
2015-04-25 12:50:11 +02:00
Gregory Hainaut
eb257d9295
gsdx-ogl: add dsa function place holder
2015-04-25 12:50:11 +02:00
Gregory Hainaut
baf84b98c4
gsdx-ogl: add override_GL_ARB_texture_barrier option
...
To ease regression test.
2015-04-25 09:59:25 +02:00
Gregory Hainaut
b12eb45bb7
gsdx-ogl: try to avoid crash on fglrx windows
2015-04-25 09:50:19 +02:00
Gregory Hainaut
f0182f9a66
windows requires APIENTRY (=> stdcall)
2015-04-25 01:32:09 +02:00
Gregory Hainaut
7b0775d887
gsdx-ogl: add some fences to protect the upload of vbo buffer
...
This way ogl_vertex_storage must be safer to activate
And it brings a nice performance boost (game with lots of primitives and
reasonable upscaling)
SotC testcase 4x: 61fps => 78fps
2015-04-24 23:15:19 +02:00
Gregory Hainaut
36514bd95f
glsl: fog is a single byte
...
Give a chance to the driver to optimize if possible
2015-04-24 21:37:37 +02:00
Gregory Hainaut
c207632e49
gsdx-ogl: improve date performance for GL45
...
If there is no overlap, it is allowed to directly read from the render target.
On SotC testcase with 6x scaling: 30fps -> 40fps
Note: it requires GL_ARB_texture_barrier extension so be sure to have a recent driver
Note2: it requires a lots of testing too
Open question: in case of complex date (written alpha)
Will it be faster to split the draw call into multiple call with no
primitive overlap
2015-04-24 21:12:33 +02:00
Gregory Hainaut
795ae50ecd
gsdx-ogl: fix the recently broken advance date feature
...
Now it is really working with a 2 stages shaders but it is still slow.
2015-04-24 20:13:38 +02:00
Gregory Hainaut
672e3f9533
gsdx-ogl: use DSA for texture management
...
Yeah code is much nicer :)
2015-04-24 19:34:17 +02:00
Gregory Hainaut
6d31d1e0d0
gsdx-ogl: add a layer to emulate DSA for texture
...
Framebuffer function will be nice too
2015-04-24 19:32:00 +02:00
Gregory Hainaut
f71eb171cf
gsdx-ogl: add glTextureBarrier function pointer
...
Could be useful
2015-04-24 18:35:01 +02:00
Gregory Hainaut
6e386df535
gsdx-ogl: avoid to clean fully texture in DATE
...
Is is useless and it has a small impact on performance for big upscale
2015-04-24 18:32:08 +02:00
Gregory Hainaut
03e72781aa
gsdx-ogl: drop support of GL_ARB_clear_texture extension
...
Extension is a bit slower.
We use it to clear the RT but we generally use it right away so
we don't avoid the FB attachment.
2015-04-24 18:15:58 +02:00
Gregory Hainaut
89d5e5637c
glsl: use an explicit cast insead of notEqual function
...
If the compiler didn't optimize the code, it will be a bit faster
2015-04-24 18:01:25 +02:00
Gregory Hainaut
56836561f4
glsl: replace runtime condition by preprocessor condition
...
It might be an easier work for the compiler
I didn't replace all occurences to keep readability
2015-04-24 17:51:29 +02:00
Gregory Hainaut
4bb8d15228
gsdx: be more verbose on title and bandwidth debug
2015-04-24 17:13:56 +02:00
Gregory Hainaut
258b73409c
gsdx-ogl: update flags for buffer storage
...
Fix issue with Mesa driver
2015-04-23 21:10:43 +02:00
Gregory Hainaut
f6652e9a50
gsdx-ogl: disable slow and buggy code until I found a better solution
...
ogl_texture_storage 1 creates texture corruption.
Advance date is too slow, code need to be updated (properly) to uses 2 passes only not 3
Maybe one could be enough (sometimes)
2015-04-22 09:33:41 +02:00
Gregory Hainaut
b32f808fd4
gsdx-ogl: increase the number of pbo
...
It would cost 16MB of extra storage on the GPU but it might
reduce conflict of texture upload.
2015-04-22 00:40:38 +02:00
Gregory Hainaut
bd6ea17bdc
gsdx-ogl: speed improvement for DATE
...
DATE is implemented in 2 ways.
1/ with stencil
2/ purely in FS (sw)
I kept method 1 to reduce the work on method 2. It sucks for performance.
So it would be either 1 or 2.
Note: DATE has a big impact on higher upscaling
Note2: you can disable the 2nd method with this configuration parameter
override_GL_ARB_shader_image_load_store = 0
2015-04-22 00:36:34 +02:00
Gregory Hainaut
15dcf07b3b
revert previous commit
...
Not better, worst slower.
I'm afraid I will need proper fencing
2015-04-22 00:32:46 +02:00
Gregory Hainaut
8386b427ea
gsdx ogl: restore GL_MAP_COHERENT_BIT for texture upload
...
I hope to fix the texture upload corruption
I hope that impact on perf will remain small
2015-04-21 23:34:26 +02:00
Gregory Hainaut
19eb1f00d1
gsdx ogl: flush vbo range instead of barrier
...
For testing purpose. I don't know which one is better.
It seems flushing have less fps fluctuation than barrier.
2015-04-21 21:44:50 +02:00
Gregory Hainaut
ce98276322
gsdx-ogl: improve speed of vertex streaming
...
Note yet enabled because I'm afraid of data corruption but feel free to test it
The option:
ogl_vertex_storage = 1
Performance note (warm cache+gs replay on colin3)
60 fps -> 76 fps
2015-04-20 09:38:03 +02:00
Gregory Hainaut
62489f42f1
gsdx-ogl: add an optimization note for later
...
Only 1 byte of fog is useful
2015-04-20 07:18:09 +02:00
Gregory Hainaut
6d253c0b8f
glsl: fix debugging of tex coordinate in apitrace
2015-04-20 07:18:08 +02:00
Gregory Hainaut
31f8c065db
gsdx-ogl: implement a new hack UserHacks_UnscaleSprite for opengl
...
UserHacks_UnscaleSprite = 1 will unscale flat sprites
UserHacks_UnscaleSprite = 2 will unscale all sprites (don't work well so far)
The idea of the hack is to redo the interpolation of texture coordinate
based on the non-upscaled pixel position.
It avoids various glitches but sprites aren't upscaled anymore (so no
more anti-aliasing, potentially a coefficient can be added).
2015-04-20 07:18:08 +02:00
Gregory Hainaut
6124eb844e
gsdx-ogl: only compile useful VS
...
logz is a constant
wildhack is only compatbile with TME/FST
Compilation goes down from 64 to 20 vertex shaders.
2015-04-20 07:17:58 +02:00
Gregory Hainaut
16e6d0d305
glsl: move shader into a separate directory
...
Only keep glsl_source.h for clarity
2015-04-19 18:49:02 +02:00
Gregory Hainaut
55fdf26898
glsl: remove the older file tfx.glsl
2015-04-19 18:49:02 +02:00
Gregory Hainaut
15264c6c63
glsl: split the main shader
...
* separate VS/GS and FS
* separate subroutine part of the FS
It already complex enough without subroutine stuff. Besides I'm not sure
we will keep subroutine on the future.
2015-04-19 18:49:02 +02:00
Gregory Hainaut
6fc9afb175
Merge pull request #507 from PCSX2/stdcall-for-plugin
...
Stdcall for plugin
2015-04-19 18:48:32 +02:00
Gregory Hainaut
e605ed1d09
gsdx-queue: add a comment for the future
2015-04-17 19:12:36 +02:00
Gregory Hainaut
fa243afbab
gsdx SW: enable new queue && C++11 on linux/MSVC 2012+
2015-04-17 19:12:36 +02:00
Gregory Hainaut
d91e989abb
gsdx-queue: pass shared_ptr by reference
...
It avoids atomic +1/-1 of the reference counter
The counter is still incremented when the ptr is copyed into the queue
2015-04-17 19:12:36 +02:00
Gregory Hainaut
84b33d2ddb
gsdx-queue: plug the new queue as a drop-off replacement of previous boost queue
2015-04-17 19:12:36 +02:00
Gregory Hainaut
90794c302a
gsdx-queue: import spsc_queue of boost
...
I remove 80% of the file to only keep the ring buffer core
Same speed as boost but without the boost dependency
2015-04-17 19:12:36 +02:00
Gregory Hainaut
c9194301a0
gsdx-queue: (linux) add a GUI option to select the queue
2015-04-17 19:12:33 +02:00
Gregory Hainaut
0aac47ca59
gsdx-queue: add a new option "spin_thread" to select the queue behavior at runtime
...
If someone has a more elegant solution, feel free to share it
spin_thread = 0
spin_thread = 1 // the faster but GS thread will never stop, very bad for laptop
2015-04-17 19:03:21 +02:00
Gregory Hainaut
9682061472
gsdx-queue:add a new job dispatcher queue based on boost and C++11
...
It is faster on linux, it requires less code, and it is "portable"
It requires boost (only hpp files) + MSVC 2013 (for atomic) (seem doable by 2012 too)
Actually there are several queues that either use spinlock or full sleep
2015-04-17 19:03:21 +02:00
Gregory Hainaut
a75d78bd7e
gsdx: use standard lock_guard instead of GSAutoLock
2015-04-17 19:03:21 +02:00
Gregory Hainaut
9ad5933120
gsdx: Use composition insead of inheritance to support lock
...
To ease update to C++11
2015-04-17 19:03:21 +02:00
Gregory Hainaut
8deee6afbc
gsdx: include some C++11 define for later
2015-04-17 19:03:21 +02:00
Gregory Hainaut
c456764342
spu2x: declare exported function as stdcall
...
* Fix a stack buffer overflow on address sanitizer
* Might explain an old clang crash
2015-04-17 18:24:23 +02:00
Gregory Hainaut
545c1d387c
gsdx: add an include for MSVC
2015-04-16 22:28:09 +02:00
Gregory Hainaut
aff999cf69
gsdx linux: refresh the gui
...
* Use tooltip for hack
* Update string of previous hack
* Remove unused hack
Note: hack_sprite_check requires 3 states (and potentially others hack too) but
I don't know how to do it. It likely requires a "scale button"
2015-04-16 19:28:55 +02:00
Gregory Hainaut
85cbe285f0
gsdx dialog: move hack info into a separate file
...
This way it can be reused on linux.
2015-04-16 19:26:33 +02:00
Gregory Hainaut
670bcc1818
gsdx hack: use a dumb implementation for UserHacks_round_sprite_offset = 2
...
It works as bad as a "clever" implementation.
It seems to be enough for games such as venus/taisho-monoke/FFX
Note: it might creates glitches. Code will never be nice, so it is just
a trade-off
2015-04-16 19:26:33 +02:00
Gregory Hainaut
41e5be0673
gsdx hack: limit range of UserHacks_align_sprite_X
...
Just an extra check to avoid an overlap (avoid white line in tekken)
2015-04-16 19:26:33 +02:00
Gregory Hainaut
e8698a9c0c
gsdx hack: hole in vertex position also appears in !FST projection
...
Fix various black vertical line regression with UserHacks_align_sprite_X
2015-04-15 09:40:06 +02:00
Gregory Hainaut
65a84b9f64
gsdx hack: drop previous filtering hack
...
superseeded by UserHacks_round_sprite_offset
2015-04-15 09:26:01 +02:00
Gregory Hainaut
2da4a5e6bc
gsdx hack: use a 0 offset instead of -1
...
-1 is annoying because minimum value is 0. Instead to add more logic,
let's try to use 0 which seems to be good enough (fix regressions on DQ8/AT)
Unfortunately it causes a mini regression on taisho-mononoke. Rotation of sprite is done with 2 triangles.
Potentially previous value wrongly recover this section.
2015-04-14 18:39:26 +02:00
Gregory Hainaut
cde72300a5
gsdx hack: Correct formulae for reversed texture
...
It fixes issues on Ace Combat UI
2015-04-13 22:14:36 +02:00
Gregory Hainaut
418f2e69a8
gsdx-ogl: implement the wildhack on the GPU
...
Likely much faster for opengl and much easier to implement
Note: hopefully UserHacks_round_sprite_offset will replace it
2015-04-13 22:14:36 +02:00
Gregory Hainaut
50bac01d89
gsdx hack: disable upscaling hack at native resolution
2015-04-13 22:14:36 +02:00
Gregory Hainaut
815c99b6e4
gsdx-hack: remove an extra offset + duplicate linear computing
...
Initially code aligned texture on pixel boundary + 1/16th. It seems to work without it.
2015-04-13 22:14:36 +02:00
Gregory Hainaut
399ddbd74a
gsdx hack: reduce complexity of alpha* function
...
It will help the compiler to make a couple of optimizations (and it will help
a futur porting to GSVector)
2015-04-13 22:14:36 +02:00
Gregory Hainaut
1d0deb5ffe
gsdx hack: move round sprite offset into a separate function
...
Use a boolean template to separate the linear case. I'm afraid it will
cost extra computation but 90% of sprites use nearest.
2015-04-13 22:14:36 +02:00
Gregory Hainaut
1aebca3740
gsdx hack: m_userhacks_round_sprite_offset take precedence over m_userhacks_stretch_sprite
...
m_userhacks_stretch_sprite is only kept for debugging. Let's avoid bad mixing by users
2015-04-12 11:05:23 +02:00
Gregory Hainaut
c4fef0256e
gsdx hack: Better rounding fix letter in ace combat and line in tekken
...
Tekken is broken with setting UserHacks_round_sprite_offset = 2 use 1 instead.
=> game use upscaling internaly so my rounding of coordinate break everything
Yakuza uses float coordinate but this hack only correct the integer coordinate
=> the solution will be to add a dedicated hack for this game.
Colin3 got a regression but I don't know when...
2015-04-12 10:31:04 +02:00
Gregory Hainaut
7e89247bf4
gsdx hack: don't add extra correct for zero length texture
...
Otherwise t1-t0 is 16 instead of 0
2015-04-11 10:54:30 +02:00
Gregory Hainaut
d2156c86eb
gsdx: improve previous hack for bilinear sprite
...
PS2 uses a -0.5 offset before sampling so texels must be rounded to half-pixel boundary
If fixes glitches on Venus and taisho-mononoke
Note: I didn't fixed yet texture render in reverse because I don't have any test for it.
2015-04-10 09:42:39 +02:00
Gregory Hainaut
f5eeb2024e
gsdx: anti-glitches v3: Tester wanted
...
UserHacks_round_sprite_offset = 1 <= enable correction of flat sprites
UserHacks_round_sprite_offset = 2 <= enable correction of all sprites (better on a couple of dump but not sure of the consequence)
I completely redo the algorithm. This time I do the projection and
interpolation of the 2 extrem vertex. This way I can compute the min/max
valid texture coordinate.
It gives stronger guarantee that texture sampling will be done inside the texture.
However it might have a performance impact, likely reasonable because it
is limited to sprite vertex.
A big thanks you to all people that provide me GS dump and test reports.
2015-04-09 19:51:50 +02:00
Gregory Hainaut
05eb1641f2
gsdx: add glsl debug capabilities
...
Useful to debug bad texture sampling
2015-04-08 10:15:25 +02:00
Gregory Hainaut
98d8ad7484
gsdx: new anti-glitches upscaling hack: UserHacks_round_sprite_offset
...
It is replacement of the previous hack (UserHacks_stretch_sprite). Don't enable both in the same time!
The idea of the hack is to move the sprite to the pixel boundary. It
avoids most of rounding issue. It also rescales verticaly the sprite (avoid horizontal line on ace combat).
I don't like this rescaling maybe we can limit it to only 1 pixels.
On my limited testcase, results are much better with any upscaling factor.
I still have a bad line in Kingdom heart. If you have issue with others
game please provide us a GS dump.
2015-04-07 19:18:24 +02:00
avih
3077de3637
Merge pull request #496 from 3descx9/master
...
crc hack for Ponkotsu Roman Daikatsugeki: Bumpy Trot ( Steambot Chronicles JP)
2015-04-07 12:04:25 +03:00
ssakash
defb57178f
crc hack for Ponkotsu Roman Daikatsugeki: Bumpy Trot ( Steambot Chronicles JP)
2015-04-07 14:14:26 +05:30
Blyss Sarania
506648bd6b
GSdx: Hacks UI: Add missing BREAK that I left out
2015-04-06 14:39:51 -05:00
Blyss Sarania
c6fb098703
Add two new tick boxes and associated description
...
For Gregory's two new awesome hacks
Also make new hacks obey "Enable HW Hacks"
2015-04-06 13:48:59 -05:00
Gregory Hainaut
3c84e6848b
gsdx: don't enable previous hack if m_upscale_multiplier <= 1
2015-04-04 01:21:46 +02:00
Gregory Hainaut
183b5d4def
gsdx: improve UserHacks_align_sprite_X hack for ace combat
...
Game uses 1x1 texture sampling. In this condition we don't care
if texture is correctly aligned.
2015-04-03 23:00:54 +02:00
Gregory Hainaut
53ab390e72
gsdx linux: add a nice gui option for previous hack
...
I also added two nice tooltips :)
2015-04-03 21:25:34 +02:00
Gregory Hainaut
fbaa84e691
gsdx: anti-vertical-line hack UserHacks_align_sprite_X
...
This ack realign sprite to full pixel coordinate
It solves vertical line in ace combat/tekken/colin mac rally
2015-04-03 21:02:25 +02:00
Gregory Hainaut
e40a26be19
gsdx: add some helper to debug openGL renderer
2015-04-03 20:28:44 +02:00
Gregory Hainaut
5269e54f02
gsdx: tune previous hack
...
Only disable bilinear on the sprite that were forced by the user.
If the PS2 requires a bilinear filtering, there is likely a big enough texture
2015-04-03 20:09:02 +02:00
Gregory Hainaut
bb728ea186
gsdx linux: filtering label was in wrong oder
...
The standard mode is 2
2015-04-03 20:07:50 +02:00
Gregory Hainaut
d4b7410e3e
gsdx linux: add a checkbox to enable easily previous hack
2015-04-03 18:33:05 +02:00
Gregory Hainaut
e1a5736583
gsdx: anti-upscale-glitch hack UserHacks_SkipDraw
...
2x upscaling is pixel perfects. Bigger upscaling is better but not yet perfect
Feedbacks are welcomes (note it doesn't solve all upscaling issue, only wrong texture sampling)
For the history:
If you have a texture of [0;16[ texels and draws a primitive [0;16[
The formulae to sample last pixels of texture is
0.5 + (16*s-1)/(16*s) * 16
Native (s==1): 15.5 (good)
2x (s==2): 16 (bad, outside of the texture)
4x (s==4): 16.25 (bad, really outside of the texure))
2015-04-03 18:33:05 +02:00
Avi Halachmi (:avih)
45e2fd9204
crc hack for Raw Danger! (Zettai Zetsumei Toshi 2 US)
...
thanks to ssakash for the patch
2015-03-29 15:41:06 +03:00
Gregory Hainaut
45930ecbf3
gsdx: value was wrongly overwritten
...
Need a lots of tests to ensure at least no regression on cache behavior
Issue #332
2015-03-17 09:39:50 +01:00
Gregory Hainaut
3b5367c5b7
Merge pull request #452 from turtleli/fix-linux-build-avx2-with-tsx-disabled
...
GSdx: Linux: Fix build failure on AVX2 processor with disabled TSX, enable SSE4.2, SSE4.1, SSSE3 builds
2015-03-01 17:53:21 +01:00
Jonathan Li
1222bcbf6e
GSdx: Comment out TransactionScope code
...
The TransactionScope class is compiled but never used. Comment it out
for now.
2015-03-01 16:40:48 +00:00
Gregory Hainaut
c1604c4b38
gsdx 🧵 only keep std::mutex/std::condition_variable
...
Keep pthread for thread until std::thread is really working
2015-03-01 17:29:40 +01:00
3kinox
7f1e907616
+ Correct faulty behaviour of std thread by using native posix handle.
...
+ This is not yet perfect. Really, this standard seems like a load of crap to me in fact...
At least it works now. Should test again when gcc 5 & new c++ libs gets out.. Until then, it will do.
2015-03-01 17:29:39 +01:00
Jonathan Li
13c0e6f5ef
GSdx: Explain TransactionScope changes
2015-02-28 14:21:44 +00:00
3kinox
4211d51f07
64 bits: solve various of type problems
2015-02-27 22:07:13 +01:00
Jonathan Li
329953ebc3
GSdx: Linux: Enable SSE4.2, SSE4.1 and SSE3 builds
2015-02-22 11:18:23 +00:00
turtleli
9b572d2d47
GSdx: Linux: Fix AVX2 CPU build with TSX disabled
...
On Linux, CPUs with AVX2 instruction sets that have TSX disabled (by
microcode update or otherwise) fail to build GSdx. The __RTM__ macro is
undefined, with leads to the TSX RTM instruction set (_xbegin, _xend,
_xabort, etc.) being unavailable.
Modify the preprocessor check so that the RTM instructions are only used
if available.
2015-02-22 11:18:23 +00:00
Gregory Hainaut
330d14941f
gsdx-linux: support dump mode on linux
...
It could be useful to analyze GS dump. Warning it consumes a lot of
disk space.
2015-02-21 13:51:06 +01:00
Gregory Hainaut
e0f56282de
cmake: no preferred-stack-option in asan
...
It conflicts with the global definition
I don't remember why this option was set on GSdx. Potentially it could be dropped (or fixed correctly)
Anyway, it will help to enable Address Sanitizer on Linux Build
2015-02-20 19:44:51 +01:00
Gregory Hainaut
0bdeb8d411
Merge pull request #430 from PCSX2/win-ocl-crash-fix
...
gsdx ocl: check size of array before access
2015-01-17 12:05:52 +01:00
Gregory Hainaut
70ad09f6ef
gsdx ocl: check size of array before access
...
Potential fix for issue #408 ?
2015-01-16 09:39:50 +01:00
uyjulian
446977d126
GSdx forward compatible bit
2015-01-09 19:39:59 -06:00
Gregory Hainaut
ee34bd724f
gsdx ocl: avoid a crash if ocl is selected but not enabled
2014-12-23 19:39:02 +01:00
Gregory Hainaut
767b841fea
gsdx ocl: disable it on windows
...
Until we found a way to fix a couple of crashes
2014-12-22 19:02:35 +01:00
Gregory Hainaut
66d7aa75e2
cmake: move -DNDEBUG to global option
2014-12-20 13:43:25 +01:00
Gregory Hainaut
a99f3ea321
cmake: remove duplicate flags
...
also use the lighter elseif structure to reduce a bit the size of cmakefile
2014-12-20 13:43:25 +01:00
Gregory Hainaut
4773bcf0ea
cmake: s/_LINUX/__linux__/
2014-12-20 10:54:24 +01:00
Gregory Hainaut
ff24a5f702
gsdx linux: disable std::thread
...
Threads are not killed properly therefore GS crashes on reloading (aka F9)
See issue #392
2014-12-14 12:22:40 +01:00
Gregory Hainaut
b9297c6158
Merge pull request #377 from PCSX2/tlb_goemon_v2
...
goemon gamefix improvement
2014-12-14 11:47:37 +01:00
Gregory Hainaut
7d21497c11
clang: no support of f-abi-version=6 option
2014-12-13 12:28:37 +01:00
Gregory Hainaut
18405e2598
gsdx: add goemon comment on some assertion
...
If someone want to trigger them
2014-12-12 22:31:31 +01:00
Gregory Hainaut
cebccea81c
gsdx: disable some gl extensions when VMware driver is detected
...
It is likely the Mesa driver, code seems to have the same issue (separate shader)
2014-12-12 20:44:58 +01:00