Commit Graph

1763 Commits

Author SHA1 Message Date
Gregory Hainaut 9b69afe541 gsdx-ogl: typo that broke TC offset hack 2015-09-20 22:19:45 +02:00
Gregory Hainaut b60dd9d1fe Merge pull request #814 from PCSX2/coverity-qa-high
Fix a bunches of coverity warning/errors.
2015-09-20 22:18:03 +02:00
Avi Halachmi (:avih) 94c5eab776 GSdx: capture dialog - actually remember the last used codec
Previously it was saving the display name to the config but trying to restore
according to the friendly name.

Now store and restore according to the "displayName" which is more unique than
"friendlyName" since it includes GUID[s], and handle it consistently as _bstr_t.
2015-09-20 20:04:36 +03:00
Jonathan Li d4f6894e1b gsdx: Fix custom resolution and minor cleanup
This fixes the following issues when custom resolution is selected.
 - When the width is smaller than the native resolution width, the
   texture cache targets are removed on every Vsync signal, causing a
   black screen issue.
 - The texture cache code needs a 1 returned for the custom resolution
   upscale multiplier or there'll be some really funny graphical issues.

It also removes unnecessary GetConfig (which I think unconditionally
does a a file read on Windows) calls if the width was increased - the
upscale multiplier is already stored, and the custom resolution width
and height calls are now unnecessary.

Also fix some whitespace issues.
2015-09-20 07:49:46 +05:30
Gregory Hainaut 28191baa80 gsdx-linux: merge native/upscaling/custom into a single box 2015-09-20 07:49:44 +05:30
Akash a9b0cfc519 GSDX: Add 8X native to Internal resolution. 2015-09-20 07:49:32 +05:30
Avi Halachmi (:avih) 54afd377ee GSdx: recording: Progressive: make the recorded clip play at full speed
Before this patch, when recording Progressive (frame) mode, it recorded all
the frames correctly but set the clip's fps property to 25/29.97, so when
played back it played at half the speed (but was fine when played at double speed).

This patch does not affect the number of frames recorded per second, but rather
only sets the resulting clip fps property to the correct one (double than before).

Also fixes a bug that in a non-managed window in progressive mode, the title
displayed "200%" speed when it should have displayed 100% speed.

Fixes #832
2015-09-19 14:44:48 +03:00
Akash b97018932d GSDX: Rework Internal Resolution function
upscale_multiplier function values have been changed to allocate native resolution and also move custom resolution to 9.
Remove the old native checkbox value and include Native in the combo box.
Internal GSDX functions have also been updated with this new update to the upscale_multiplier variable.
2015-09-14 10:26:27 +05:30
Miguel A. Colón Vélez 4760d71a86 Remove the remaining postbuild stuff.
The bot should work now.
2015-09-13 04:33:17 -04:00
Jonathan Li 239306e9a2 pcsx2|gsdx:linux: Fix posix_memalign
The AddressSanitizer can be used on Linux again. Well, PCSX2 doesn't get
very far when it's used though.
2015-09-12 09:58:00 +01:00
Gregory Hainaut cee0fde940 gsdx-tc: improve support of TEXA register
* Greatly reduce the number of clut read (factor 10x)
* Avoid to get wrong TEXA texture in the cache.
* Fix "jump depends on uninitialized variable" Valgrind warning.

Fix #748

I try my best to avoid any breakage of DX but please test it too.
2015-09-11 14:16:11 +02:00
Gregory Hainaut 78569ee833 gsdx-ogl: redo properly the setup of texture format
* add lengthly comment to explain the format
* Likely reduce the number of shader permutation
* Avoid slow AEM (on GPU)

Expect regressions because TC needs some fixes

v2: fix palette mode
2015-09-11 14:14:22 +02:00
Gregory Hainaut 2430abed33 gsdx: potential division by zero
CID 146833 (#2-1 of 2): Division or modulo by zero (DIVIDE_BY_ZERO)
divide_by_zero: In expression this->m_width / this->m_upscale_multiplier, division by expression this->m_upscale_multiplier which may be zero has undefined behavior.
2015-09-11 08:54:29 +02:00
Gregory Hainaut e6d1a4cccf gsdx: avoid a potential division by zero
CID 146835 (#1 of 1): Division or modulo by float zero (DIVIDE_BY_ZERO)
50. divide_by_zero: In expression (float)(end - start) / (float)frame_number, division by expression frame_number which may be zero has undefined behavior
2015-09-11 08:54:29 +02:00
Gregory Hainaut 2934a15902 gsdx: remove a duplicated check 2015-09-11 08:54:29 +02:00
Gregory Hainaut ac8f4e69d6 pcsx2|gsdx: avoid potential null deferencement 2015-09-11 08:54:29 +02:00
Miguel A. Colón Vélez 26e2b4a5be Rename Release/Debug SSE2 to Release/Debug. 2015-09-08 23:17:07 -04:00
Gregory Hainaut ddc03cbccf gsdx: add a nice enum to replace the hardcoded convert shader 2015-09-08 16:51:24 +02:00
Gregory Hainaut 1ae0fed83b gsdx: fix a regression due to the shader renaming 2015-09-08 16:06:15 +02:00
Gregory Hainaut 81e056e79a gsdx: always enable the boost queue
ifdef was for VS2010

GSThread.h is useless. I keep it for the transactional queue implementation
2015-09-08 14:43:09 +02:00
Gregory Hainaut 3706cfe908 gsdx: always enable CXX11 mutex feature.
ifdef was only useful for VS2010
2015-09-08 14:34:17 +02:00
Gregory Hainaut ca9b5ce11d gsdx-ogl: move depth conversion shader
Add 2 new shaders:
* ps_main12: cast a 16 bit depth to a RGB5A1 color
* ps_main16: cast a a RGB5A1 color to a 16 bit depth

Shader might be used in future commit as it seems Silent Hill uses this
kind of format.

Fix tab/indentation too
2015-09-08 12:41:05 +02:00
Gregory Hainaut 4eed4ca3a1 gsdx-debug: restore 16 bit dump format in the SW renderer
Actually dump both 32/16 bits (former for texture shuffle and later
for real 16 bits RT)
2015-09-08 12:41:05 +02:00
Jonathan Li 9052930ebc Merge pull request #791 from turtleli/gsdx-gui-changes
Add tooltips to Windows GUI. Fixes #578.
Rearrange Window GSdx GUI a bit.
Reformat tooltip descriptions to be both Linux and Windows (un)friendly.
Add new tooltip descriptions.
2015-09-03 22:49:41 +01:00
Jonathan Li e5f045c375 gsdx: Add new tooltips and descriptions.
For Linux and Windows, add tooltip descriptions for AF, AA1, extra
rendering threads, Enable Shade Boost, FX Shader/External Shader, FXAA.

For Windows, also add Alpha Correction and Logarithmic Z tooltips.

For Linux, add software mipmap tooltip.

Thanks to tsunami2311, ssakash, gregory38 and whoever did the wiki for
helping with descriptions.
2015-09-01 19:25:28 +01:00
Jonathan Li 55adc7e728 gsdx: tooltip description formatting and minor fixes
The hack description box messages were replaced by tooltips on Windows,
so there is no need for the first line in the description to refer to
the hack anymore.

3-state checkboxes were also converted to comboboxes, so remove any
references to checkbox states.

Reformat the descriptions so it looks okay on both Windows and Linux.
Could be better, but I'm out of ideas.

Also fix a few typos and missing punctuation.
2015-09-01 19:25:27 +01:00
Jonathan Li b687b106f1 gsdx: Removed unnecessary defines and functions
The changes to the Hacks dialog removes the need for these defines.

Also remove the swap_state function since it's now unused.
2015-09-01 19:25:26 +01:00
Jonathan Li c72b4d6e8a gsdx:windows: Rework hacks dialog to use tooltips
Changes the three-state checkboxes to comboboxes.
Removes the hack description box.
Hides Alpha and Alpha Stencil when OpenGL is selected.
Rearranges the hacks dialog.
2015-09-01 19:25:26 +01:00
Jonathan Li fcc8a941b0 gsdx:windows: Redo main dialog
This moves the hardware, non-renderer dependent options to the top and
makes the renderer options visible only when it affects the current
renderer.

The texture filtering checkbox has been changed to a combobox and now
uses the same description as Linux does.

Also changes the Title to GSdx Settings.
2015-09-01 19:25:25 +01:00
Jonathan Li e6b9805167 gsdx:windows: Show tooltips on main dialog 2015-09-01 19:25:25 +01:00
Jonathan Li 48bba4d581 gsdx:windows: Add tooltip support
Tooltips will be usable for all Gsdx dialogs if required.
2015-09-01 19:25:24 +01:00
Gregory Hainaut bdc8038e7e glsl: set a size to gl_ClipDistance array
The purpose is to avoid issue on MS-Intel driver without
a dedicated hack in the compilation.

Code doesn't use it so I suspect others implement to discard the
statement.
2015-08-25 18:58:39 +02:00
Gregory Hainaut a1957a685d glsl: drop an useless min in FS
GPU will clamp color anyway. It reduces the number of instruction of 25% (4->3)
2015-08-25 18:58:39 +02:00
Jonathan Li 6f6a7b92e4 gsdx:windows: Move CRC box to main dialog
The CRC hack option is always used regardless of whether the HW Hack
checkbox is ticked. Move it to the main gsdx dialog and make it use the
same descriptions that are used in Linux.

And fix the accurate_blend_unit whitespace formatting.
2015-08-23 14:04:09 +01:00
Gregory Hainaut bfadd884c9 glsl: expand tab into space
The mix of the 2 was awful
2015-08-22 13:34:02 +02:00
Gregory Hainaut a46c11b088 gsdx-ogl: delete various leftovers 2015-08-22 13:33:32 +02:00
Gregory Hainaut 7002ff3ec3 gsdx-ogl: move texture scale from vs_cb to fs_cb
It avoid useless update of the vs_cb.
2015-08-22 13:33:04 +02:00
Gregory Hainaut 499206f0ea gsdx-ogl: disable advance rendering when drivers don't support it 2015-08-22 12:22:35 +02:00
Gregory Hainaut d9cf326879 gsdx: windows requires a static cast 2015-08-22 12:22:35 +02:00
Jonathan Li 6e826d5193 Merge pull request #754 from ssakash/patch-45
gsdx: little changes on AF value behavior.
2015-08-21 11:29:49 +01:00
Akash 111653833f AF checkbox status depends on paltex.
according to some of the internal functions in GSDevice files, Anisotropic Filtering is only done when paltex is disabled. do the same on the GUI for user awareness.
2015-08-21 15:50:13 +05:30
Akash 3c9ca799a6 Remove anisotropic filtering checkbox value.
Removes the checkbox of Anisotropic filtering from the GSDX plugin settings, the checkbox was usually used to enable & disable the AF which is not necessary since there is an option in the drop down list for disabling AF.
the internal function value of "AnisotropicFiltering" has been replaced with "MaxAnisotropy" for detection.
the detection uses the function getconfig("MaxAnisotropy", value)  where value 0 means disabled and value is the default value when no value is set in the INI file.
2015-08-21 09:45:00 +05:30
refractionpcsx2 60a90aa51c GSdx-dx11: Another attempt at the nvidia hack, changing the viewport top left slightly also seems to alleviate the issue. Lets see how well this goes down.
At worst things will look zoomed out by like, a pixel :P
2015-08-20 23:45:26 +01:00
Gregory Hainaut 37f9bcf9cb gsdx-ogl: reduce state change
* don't dirty aref when a fog color is uploaded
* only set clamp mode in clamp mode (region clamp is handled in shader)

v2: fix SSE2/3 compilation
2015-08-20 23:01:43 +02:00
Gregory Hainaut c5a786ed2c gsdx-ogl: remove support WMS/T == 2 in hardware unit
I think behavior was wrong because only first texel coordinate was clamped.

Beside we can't interpolate if AEM isn't yet applied
2015-08-20 23:01:43 +02:00
Gregory Hainaut 53d1fdd8f1 glsl:debug: disable fst when testing texturing shader
Reduce clutter in ASM dump
2015-08-20 23:01:43 +02:00
Gregory Hainaut 78dd957717 gsdx-ogl: use normalized index coordinate for palette texture
In palette mode, 90% of texture accesses are done in 8 bits.
So let's keep this path as light as possible. It reduces GPU load.
2015-08-20 23:01:43 +02:00
Gregory Hainaut 42c08e6123 gsdx-debug: infinite replay for value > 90
Allow to use Nvidia debugger & give time to see the glitches
2015-08-20 23:01:20 +02:00
refractionpcsx2 561fa8a95e GSdx-dx: Workaround for NVidia Win10 Issues, possibly? at least seems to fix it.. 2015-08-19 23:01:39 +01:00
Gregory Hainaut 6b84a89b6a gsdx-ogl: remove old ati hack for point sampler
Was never used on openGL

In the future absolute coordinate will be use anyway
2015-08-18 19:09:45 +02:00
Gregory Hainaut ed21d88735 gsdx-ogl: add support of Intel GPU on Windows
It requires at least an Ivy Bridge GPU.
2015-08-18 19:06:43 +02:00
refractionpcsx2 8539805691 Merge pull request #690 from micove/VS_universal_sln
VS Now uses a universal solutions file - VS 2012 and below dropped due to incompatibility with C++11
2015-08-18 11:40:53 +01:00
refractionpcsx2 a4f8c6d5b3 Merge pull request #770 from micove/Lintian_Fixes
Fix things found using lintian by micove. Grammatical changes only.
2015-08-18 10:19:37 +01:00
Gregory Hainaut 37661f3a86 gsdx-ogl: fix blending regression (VP2)
Negative factor must be disabled in negative accumulation "-Cs*As + Cd"
Shader must output Cs*As and blending unit will do the Cd - C subtraction
2015-08-18 09:14:11 +02:00
Miguel A. Colón Vélez a1de0614d7 Remove vs2012 files.
It does not support several things from C99/C++11 that are
used in the project.
2015-08-18 01:15:51 -04:00
Miguel A. Colón Vélez f22bc63fee Disable 8,000+ warnings.
Someone can try renaming v,a,b,m,t but since they are
shadowed one mistakes can mess too much hence the warning.
2015-08-18 00:45:14 -04:00
Miguel A. Colón Vélez 277217353e Rename files. 2015-08-18 00:44:35 -04:00
Miguel A. Colón Vélez 1fe5aceded Enable round-tripping.
- Remove ToolsVersion
- Use $(DefaultPlatformToolset)_xp until XP support is dropped.
Note: opencl had no XP support and was not enabled in VS2012.
2015-08-18 00:44:19 -04:00
Miguel A. Colón Vélez f52988b93c Run devenv /upgrade
This ensures the solution can do round-tripping.
2015-08-18 00:44:02 -04:00
Miguel A. Colón Vélez 21c4e6caa6 Fix things found by lintian.
I: pcsx2: spelling-error-in-binary usr/lib/i386-linux-gnu/pcsx2/libGSdx-1.0.0.so allows to allows one to
I: pcsx2: spelling-error-in-binary usr/lib/i386-linux-gnu/pcsx2/libGSdx-1.0.0.so Allow to Allow one to
.
Apparently lintian checks grammar too (most common ones).
2015-08-17 22:00:07 -04:00
Gregory Hainaut 260c12756a gsdx-ogl: accelerate Cd - Cs * Alpha in sw blending
It is similar as Cd + Cs * Alpha except the operator

It would help to emulate other color clipping case correctly in basic
mode at full speed
2015-08-16 18:12:34 +02:00
Jonathan Li 6580f4922f gsdx-ogl: correct fbmask conversion on texture shuffle
Fbmask is RGBA8 and must be converted to RGB5A1
=> bit 31 must be moved to bit 15

Signed-off-by: Gregory Hainaut <gregory.hainaut@gmail.com>
2015-08-16 14:06:10 +02:00
Gregory Hainaut c32f1dfc23 gsdx-ogl: fix blend clear regression
Field selector are very dangerous to use.

Fix #764
2015-08-15 20:06:34 +02:00
Gregory Hainaut 0e3491bd58 gsdx-ogl: always do RW RT check
Jak uses it with triangle rendering.
2015-08-15 20:06:34 +02:00
Gregory Hainaut c7b2f9d1d2 gsdx-ogl: setup fbo to always write to first buffer
GL_NONE was kind of useless because nothing was attached anyway
2015-08-15 20:06:34 +02:00
Gregory Hainaut 87f497af0a gsdx-ogl: remove an useless variable 2015-08-15 20:06:34 +02:00
Gregory Hainaut 2e9ff045e1 gsdx-ogl: try another implementation for uniform buffer
It is slower but keep it for a bindless trial
2015-08-15 20:06:34 +02:00
Gregory Hainaut 3145031c05 gsdx-ogl: add glBindBufferRange function pointer 2015-08-15 20:06:34 +02:00
Jonathan Li 63c26c45ec gsdx: Clean up Wild Arms hack cruft
The Wild Arms Offset hack can only be on or off. There is no third
state. Convert the three-state checkbox into a two-state checkbox, fix
the description and remove a leftover.
2015-08-15 10:54:03 +01:00
Jonathan Li 1915bf1a61 gsdx:linux: Fix tooltip and clarify/fix 2 labels
Half-pixel offset option now uses the correct tooltip.
Offset Hack -> Half-pixel Offset Hack
Wild arm Hack -> Wild Arms Hack
2015-08-15 09:53:48 +01:00
Gregory Hainaut 87dcb9336f gsdx-ogl: don't bind the 0 texture to be compatible with the Nvidia debugger 2015-08-13 09:57:51 +02:00
Gregory Hainaut 84744d429e gsdx: allow to test glsl shader without replayer
This way users can test it too.
2015-08-13 08:48:05 +02:00
Gregory Hainaut 2f9d5334ee gsdx:EGL: prefer EGL over GLX + add some error messages 2015-08-13 08:48:05 +02:00
Gregory Hainaut 84e6fb45e8 gsdx-replayer:linux: allow to use env variable as default parameter
GSDUMP_SO <= the so plugin
GSDUMP_CONF <= the dir that contains the ini
2015-08-13 08:48:05 +02:00
Gregory Hainaut 6046d6c417 Merge pull request #749 from PCSX2/gsdx-micro-optimization
Gsdx micro optimization
2015-08-12 08:54:36 +02:00
Gregory Hainaut 98c74879bf Merge pull request #718 from PCSX2/depth-color-direct-write
Depth color direct write
2015-08-10 15:50:48 +02:00
Gregory Hainaut 0663501d6f gsdx-linux: disable perf monitor on release build
Code is rather slow on linux. Expect a 5-10% perf increase
2015-08-10 08:35:16 +02:00
Gregory Hainaut 9f92f63194 gsdx-ogl: Use GetAlphaMinMax to limit the scope of FULL accurate blending
Provide a massive speed up in this level.
2015-08-09 13:44:31 +02:00
Gregory Hainaut 61694013a5 gsdx-ogl: compact blending parameter structure
Save 656B of data. It is good for the cache.
2015-08-09 13:44:30 +02:00
Gregory Hainaut df3ade896b gsdx-ogl: use integer for blend factor
Integer argument&comparison might be lighter

V2: Forget to change one OMSetBlendState call
2015-08-09 13:44:05 +02:00
nE0sIghT e1272dc2f9 Use global compiler optimization flags instead of defining them for every plugin/binary 2015-08-08 16:25:17 +03:00
Gregory Hainaut 5b57405517 gsdx-ogl: blend management cleanup
* reorder the blend function
* remove OM bsel object
* add a bit to support pabe (miss the glsl part)
2015-08-08 09:18:09 +02:00
Gregory Hainaut 4d12410707 gsdx-ogl: latch constant buffer in rendering object
* Initialization of the object is done once
* Avoid to reupload it when an useless parameter toggle
 => -10% of UBO update
2015-08-08 09:18:09 +02:00
Gregory Hainaut bd0de8fbaf glsl: (colclip) HDR doesn't need wrapping neither clamping
Might save a couple of instruction in the PS
2015-08-08 09:18:09 +02:00
Gregory Hainaut 8a4c0e9782 cmake: drop extra alignment on GSdx
It requires extensive tests
2015-08-08 09:18:09 +02:00
Gregory Hainaut 1557f82b11 gsdx:clut: comment old unused clut code 2015-08-08 09:17:21 +02:00
Gregory Hainaut d822b6bd1a gsdx-ogl: add some comments for the future 2015-08-08 09:17:06 +02:00
Gregory Hainaut b17803bb34 gsdx-ogl: wipeout of GL_ARB_bindless_texture
Code is completely broken. It doesn't help to improve speed.

Remove 200 lines ;)
2015-08-08 09:16:49 +02:00
Gregory Hainaut b3919fde95 gsdx-linux: remove an old delay that pollute my benchmark mode
Also add a glFinish to ensure rendering is done
2015-08-08 09:16:13 +02:00
gabest11 d826d925db gsdx: eliminated a few bugs in the texture size changer algorithm 2015-08-07 02:08:29 +02:00
Jonathan Li c09501ad9a gsdx:linux: Add GSDrawingContext.cpp to CMakeLists.txt
Fixes the missing symbol error.
2015-08-06 18:17:28 +01:00
Gregory Hainaut 39ce8835f7 gsdx:linux: use unordered hash
It seems a bit faster on 'perf' tool
2015-08-05 22:55:12 +02:00
Gregory Hainaut 921b22ac31 gsdx-ogl: drop useless parameter of OMSetDepthStencilState 2015-08-05 22:55:12 +02:00
Gregory Hainaut b7e16b5989 gsdx-ogl: clean the blending management
Intially GSBlendStateOGL was an alias of the m_blendMapD3D9 array

The object was replaced by an index in the array. Save 2k of memory duplication.
And too much useless code.

v2: push/pop blending state in DATE stuff
v3: remove m_state which is useless now
2015-08-05 22:55:12 +02:00
Gregory Hainaut 717f0fcb4d gsdx-ogl: optimize fbmask setup 2015-08-05 22:55:12 +02:00
gabest11 49b3acea72 gsdx: texture size reduction in sw mode, fixes Stolen, less memory usage in general. 2015-08-05 19:11:41 +02:00
Gregory Hainaut 73e2ff6ff6 gsdx-ogl: change PrimitiveOverlap algo from O(n^2) to O(n)
+ only enable this optimization when it is useful (date or sw blending)

Less impact on the perf even for big vertex array
2015-08-05 17:59:55 +02:00
Miguel A. Colón Vélez 6462393aaf Introduce end-of-line normalization
Signed-off-by: Gregory Hainaut <gregory.hainaut@gmail.com>
2015-08-04 23:52:48 +02:00
Miguel A. Colón Vélez a42a236961 Gsdx: Move the stdext namespace declaration.
This will eventually lead to
error C2871: 'stdext' : a namespace with this name does not exist.
might as well fix it now.
2015-08-04 22:16:15 +02:00
Miguel A. Colón Vélez 30c6389ed9 VS2015: Fix compilation
Error   C2338   The C++ Standard forbids containers of const elements
because allocator<const T> is ill-formed. (compiling source file GS.cpp)
2015-08-04 22:16:04 +02:00