Commit Graph

2621 Commits

Author SHA1 Message Date
Gregory Hainaut 714fcaaadd gsdx ogl: move the validation of the gl context in the window 2017-02-26 19:09:16 +01:00
Gregory Hainaut b3836c58d2 gsdx ogl: properly plug the new HPO option 2017-02-26 19:04:00 +01:00
Gregory Hainaut 646c02a5e2 gsdx linux: update GUI based on previous commit 2017-02-26 19:04:00 +01:00
woj1993 4a6a3af418 gsdx windows: update gui to add a HPO v2 checkbox
Squash done by greg

v2: update tooltip
2017-02-26 19:04:00 +01:00
Akash 500d2e076d GSdx-PCRTC: Apply saturation only for field mode
Previously, the NTSC saturation was also applied for double scan mode (Interlaced and Frame) where the developers send double the height to the DISP registers, saturation shouldn't be performed at such cases as the developers could send a value of 780 while the real size of the output would be 390 due to double scan mode. Doing the saturation later after identifying the real size also seems a bit counter-intuitive as we haven't discovered any cases where double scan games require the NTSC saturation hack. So let's just apply the saturation only for Interlaced (Field) Mode and omit the saturation step for other modes.
2017-02-21 10:54:28 +01:00
Akash 17b33afd64 GSdx-PCRTC: Move hacks away from GetDisplayRect()
Isolate all the hacks into a separate subroutine and properly document about them, should make it easier for people to understand the display rectangle setup code, the hacks were totally messing up the readability of the function earlier.
2017-02-21 10:54:28 +01:00
Akash 319b3dabdf GSdx-Windows: Automatic CRC hack level selection
Default to "Partial" CRC hack level when the GPU's best renderer is determined as the OpenGL hardware renderer.
2017-02-21 10:54:03 +01:00
Akash ff89619b09 GSdx: Add an Enumeration for CRC Hack level 2017-02-21 10:54:03 +01:00
Gregory Hainaut 726f9d5312 gsdx ogl: improve error message on windows
* Common function
* Print an error id
* Don't exit on bad setpixelformat (it is illegal to call it twice)
2017-02-18 22:25:27 +01:00
Gregory Hainaut f3adf4bf57 gsdx ogl: texture barrier is optional too 2017-02-18 20:11:56 +01:00
Gregory Hainaut 193d9f838b gsdx ogl: mark 2 DSA functions as optional 2017-02-18 19:44:17 +01:00
Gregory Hainaut 674d22321a gsdx wgl: drop GL2.0 context and avoid a context leak
Namely detach/delete context before throwing
2017-02-17 19:20:42 +01:00
Gregory Hainaut cdb71101a1 gsdx ogl: As Intel is too cheap to provide GL_ARB_direct_state_access on theirs expensive iGPUs
Add a "slower" emulation of the extension...

Hopefully it will allow to start openGL on haswell (maybe broadwell) and later.
2017-02-17 17:44:26 +01:00
Gregory Hainaut 26993380b1 gsdx-ogl: black list 2016/2017.1 AMD driver
Based on AMD feedback, I'm might blacklist all 2017 drivers too.
2017-02-17 17:32:53 +01:00
Gregory Hainaut da1bb43618 cmake: Add various missing file in CMakeLists.txt
Add some windows code path. It would reduce the burden to port Cmake to windows.
(sill miss 3rdparty/some plugins/...)
2017-02-16 20:11:57 +01:00
Gregory Hainaut de962d3e7e gsdx wgl: retry to create a context without advance flag
Hopefully it will support more drivers #1813
2017-02-10 22:26:41 +01:00
Gregory Hainaut 213fa1c148 gsdx sw: init completely m_scanline buffer
The buffer contains extra room to avoid a segmentation fault due to an overflow.
Unfortunately the end of the buffer wasn't initialized which can lead to unexpected behavior.

Based on issue #1806 it could impact Guilty Gear X2
2017-02-08 19:42:54 +01:00
Gregory Hainaut 2a2a022792 gsdx ogl: add a texture barrier when target is read back
Fix graphical corruption in Nouveau/BUA/devil may cry

Issue #1805
2017-02-08 19:42:54 +01:00
Gregory Hainaut ba91c8f0c2 gsdx opencl: warning+compilation fixes 2017-02-08 19:42:54 +01:00
Gregory Hainaut c232f90d6e cmake: add an option to enable openCL
Note: nothing work
2017-02-08 19:42:54 +01:00
Gregory Hainaut d0b1162b15 gsdx ogl: drop fallback of GL_ARB_clear_texture
Mesa AMD was updated :)

all drivers[1] that support GL_ARB_shader_image_load_store got GL_ARB_clear_texture

[1] Intel driver misses others extensions to run GSdx
2017-02-03 21:56:24 +01:00
Gregory Hainaut 63944e8c43 gsdx ogl: allow to start without GL_ARB_texture_barrier
Rendering will be corrupted (for advance effects) if the driver doesn't support it.
However it allow to run with Mesa software emulation (or inside a virtual machine)

Note: mesa still requires an override of the buffer storage extension
MESA_EXTENSION_OVERRIDE=GL_ARB_buffer_storage
2017-02-03 21:56:24 +01:00
Gregory Hainaut dc42c65dfb gsdx: requires/allow BMI instruction in AVX2 build
So far BMI is inclusive in AVX2 CPU. Help compiler to generate better code
2017-02-01 18:24:51 +01:00
Akash eda22c241d GSdx: Improve robustness of ComboBoxInit()
Previously, the combobox will reach an indeterminate state whenever it's passed with a value out of range via ComboBoxInit(). To avoid such cases, let's initialize the current selection of the combobox with the front element of the settings vector whenever we detect an out of range value which is not declared in the vector.

To reproduce the issue, set "Renderer" to some sort of crazy value like 50 in the GSdx.ini file and it'll mess up the whole GSdx plugin dialog really bad. This patch prevents such undesirable behavior by simply selecting the front element in the vector when we read an unsupported value.
2017-02-01 11:29:38 +00:00
Gregory Hainaut 5751e38180 gsdx: use range loop instead of for_each 2017-01-30 17:58:39 +01:00
Gregory Hainaut cf71049bd4 gsdx tc: use unsigned constant
Help the compiler to generate better code

C code:
uint32 addr = (i >> 3u) % MAX_BLOCKS;
uint32 row = addr >> 5u;
uint32 col = 1 << (addr & 31u);

ASM Before
     f48:	mov    eax,esi
     f4a:	mov    ecx,esi
     f4c:	mov    edx,DWORD PTR [ebp+0x8]
     f4f:	sar    eax,0x1f
     f52:	sar    ecx,0x3
     f55:	shr    eax,0x12
     f58:	add    ecx,eax
     f5a:	and    ecx,0x3fff
     f60:	sub    ecx,eax
     f62:	mov    eax,0x1
     f67:	shl    eax,cl
     f69:	shr    ecx,0x5
     f6c:	lea    edx,[edx+ecx*4]

ASM After
     f48:	mov    ecx,edi
     f4a:	mov    eax,0x1
     f4f:	sar    ecx,0x3
     f52:	shl    eax,cl
     f54:	shr    ecx,0x3
     f57:	and    ecx,0x7fc
     f5d:	add    ecx,DWORD PTR [ebp+0x8]
2017-01-30 17:54:29 +01:00
Gregory Hainaut da054a2aab gsdx: remove useless debug log 2017-01-30 17:54:21 +01:00
Gregory Hainaut 09b8aaed71 gsdx tc: extend the wrap option to the texture cache 2017-01-30 17:54:07 +01:00
Akash bf10873405 GSdx: Remove useless check and add debug messages
IsEnabled() check is already done in GetDisplayRect, so it's pointless to do it here. Also updated a debug message in the GetFrameRect() function.
2017-01-30 15:29:28 +01:00
Akash a2cdcb4e4d GSdx-PCRTC: Improve output circuit selection
Previously, the auto output circuit selection of the GSdx wasn't good, it simply defaulted to the second output circuit even when the first output circuit is also enabled. The new algorithm for auto selecting returns the merged rectangle dimensions when both of the output circuits are enabled and if the condition for merge is not satisfied then it returns the bigger output circuit.
2017-01-30 15:29:28 +01:00
Gregory Hainaut bccc3ef253 Merge pull request #1770 from np511/gcc-cleanup
Cleanup GCC warnings - still needs some work
2017-01-30 15:28:33 +01:00
np511 e5e601eb75 Use GResources API instead of deprecated inline 2017-01-29 09:06:22 -05:00
Jonathan Li 754045b6f7 gsdx:windows: Remove SSSE3 and AVX configurations 2017-01-27 11:06:30 +01:00
lightningterror f0393e50c2 GSdx: Windows gui updates (#1768)
* Rename CRC Hack Level "Full (Safest)" to "Full (Direct3D Recommended)"
* add link/info of AMD driver epic fail status
2017-01-27 11:00:23 +01:00
lightningterror 1cf30584f0 CP update
Replace Gregory's name with PCSX2 Dev Team
2017-01-26 17:12:13 +01:00
lightningterror 1ecb5aed0f Update Copyright v2
Revernt changes , update Gregory's name
2017-01-26 17:12:13 +01:00
lightningterror 0b93aa5d12 Revert "Update Copyright notices/disclaimers 2017"
This reverts commit fc5bdb771f.
2017-01-26 17:12:13 +01:00
lightningterror 3d4e1c1246 Update Copyright notices/disclaimers 2017
Update all Copyright notices/disclaimers in scripts to 2017
2017-01-26 17:12:13 +01:00
Gregory Hainaut 096c9316b8 gsdx cl: fix various compilation issues and a couple of warnings
I didn't fix all the warnings (purpose was to realign code with "recent" update)

Linux note: only miss 2 major items
* res/tfx.cl loading
* device descriptor
* And various bug fixes ;)
2017-01-24 19:38:31 +01:00
Gregory Hainaut d67b9cba14 gsdx tc: merge page coverage code
A function was already done for openCL. Use the same for others renderers
2017-01-24 19:38:16 +01:00
Gregory Hainaut 5c7c9452d6 onepad|gsdx: remove useless debug messages 2017-01-22 21:47:05 +01:00
Gregory Hainaut 1e7fd83ac5 gsdx|spu2x: fix %d/%u in printf (cppcheck) 2017-01-22 21:10:40 +01:00
Gregory Hainaut 077ae2e6a0 gsdx: use (void)(0) for empty statement
Reduce warning in cppcheck
2017-01-22 21:10:40 +01:00
Gregory Hainaut 1d2ce62b2c gsdx tc: comment dead code 2017-01-22 16:52:14 +01:00
Gregory Hainaut 701743a4ec gsdx boost queue: init all states 2017-01-22 16:43:35 +01:00
Gregory Hainaut 9183d1d2c6 gsdx osd: set m_face to null in case of error 2017-01-22 16:42:01 +01:00
Gregory Hainaut 81adc3ef4d gsdx ogl: don't use per buffer blending
It increases the number of state that driver must handle.
2017-01-20 18:22:52 +01:00
Akash 0d659a1b46 GSdx: Improve captured screenshots naming
Previously, when F8 was triggered multiple times in a single second, the latest captured image would replace the previous captured one as it has the same name as the previous image.

The following patch detects such cases and adds a number along with the filename when new image capture is requested under the same time as the previous capture.
2017-01-19 23:47:34 +00:00
Gregory Hainaut 21612cafc1 Merge branch 'greg/mtvu-mtgs-lockless' 2017-01-18 19:12:26 +01:00
Gregory Hainaut e4f4350bb4 boost ring queue: dedicate cache line for atomic variable
Bad for data cache ! But it might be better for atomic operation.
2017-01-18 19:07:01 +01:00