Commit Graph

4270 Commits

Author SHA1 Message Date
lightningterror 6977658443 GSdx ogl: SSO Workaround for AMD buggy drivers (#1858)
GSdx ogl: SSO Workaround for AMD buggy drivers

All 2017 drivers are now blacklisted.
The BSOD/crash issue is still there so don't set Blending Accuracy to None!
Shortened the message in the console making it more appealing.
2017-03-28 23:02:19 +02:00
orbea 2aa33e2875 Add crc hack for project metafalica
Closes https://github.com/PCSX2/pcsx2/issues/1762
2017-03-27 12:51:43 +02:00
Jonathan Li eb8ede38cf lilypad: Use l length modifier for wide character string
w is Windows specific. Fixes a gcc and clang warning.
2017-03-23 22:35:49 +00:00
Jonathan Li f1eff358da gsdx:windows: Fix console output when replaying dumps 2017-03-23 01:33:35 +00:00
Jonathan Li f174d71ac7 gsdx: Fix vsnprintf usage in format function
-1 is only returned when there is an encoding error, and the va_list
argument is indeterminate after being passed to vsnprintf.

Use the return value to determine the buffer length, and call va_end and
then va_start before vsnprintf is called again.
2017-03-21 23:21:26 +00:00
Jonathan Li ae2e8469b4 gsdx: Remove ancient codeblocks file 2017-03-21 23:21:26 +00:00
Jonathan Li 67d9436f22 gsdx: Remove unused and incomplete GSDeviceSW 2017-03-21 23:21:26 +00:00
Jonathan Li 448ca97d93 gsdx: Avoid "using namespace std" in spsc queue 2017-03-21 00:10:35 +00:00
Gregory Hainaut 9865270e68 gsdx: split GSVector.h into smaller files 2017-03-19 13:50:13 +01:00
FlatOutPS2 f3a89f59e4 LilyPad: General fixes and UI improvements
Some general fixes and UI improvements.

Adds Reset Configuration to Input/Force Feedback configuration screens that resets the configuration for the selected control(s).

Adds Restore Defaults button to the General tab that deletes all LilyPad
Settings and bindings and resets to the default settings.

Adds double-click functionality to the PAD list on the General tab,
which will now send the user straight to the corresponding PAD tab.
2017-03-16 22:43:53 +00:00
FlatOutPS2 84a8fdadc5 LilyPad: Fix F4 button (PCSX2 FrameLimiter toggle) getting blocked
Fixes issue where losing focus after pressing alt-tab would end up
blocking the F4 button (which is used for turning the PCSX2 FrameLimiter
on and off).

Fixes: https://github.com/PCSX2/pcsx2/issues/1797
2017-03-16 22:43:53 +00:00
FlatOutPS2 bd45bab34a LilyPad: Display a warning when all controls are inactive
Displays a console warning if no controls/controllers are active and the
emulation cannot be controlled.
2017-03-16 22:43:53 +00:00
FlatOutPS2 2ea078beb5 LilyPad: Add Quick Setup
Adds quick setup that allows for quickly setting up all the default pad
buttons without having to click on each one separately.

Hides special inputs(inputs that aren't available on a PS(2) controller) by default.
2017-03-16 22:43:53 +00:00
FlatOutPS2 3075ec2203 LilyPad: Improve analog/pressure sensitive detection
Improves detection of analog or pressure sensitive support, which previously made some games unable to detect the correct mode.
2017-03-16 22:43:53 +00:00
Gregory Hainaut a3efc77255 gsdx ogl: use an HLE shader to avoid upscaling line in ICO
ICO uses a depth of field effect for the fog. Depth is extracted
into the alpha channel of a texture. And then used as blending factor.
You need a 1:1 texture/pixel mapping otherwise you will line at boundaries.

In order to extract the DoF, ICO moves the depth buffer around the GS
memory. Memory moves are implemented in the not-scaled world. It means
that we can't have the above 1:1 ratio. And we don't know anymore that
data are coming from the current depth buffer.

The solution: I reused an HLE channel shader to read the depth buffer directly.
This way I have the guarantee that pixel/depth are aligned.

Close #1816
2017-03-16 08:27:12 +01:00
Gregory Hainaut 1a768ca438 gsdx sw: sync thread if current target pages are already used by input texture
Otherwise you have a write before read typical race condition. It works
most of the time because textures are stored in temporary buffers (aka
texture cache). So the race condition requires texture invalidation in the mix.

I hope the perf impact will be small enough.

Fix #1691
Blood Will Tell: gray scale effect description

Frame is renderer in 0x700
Sync 0x700 (RT will be used as input)

Foreach page of frame
    // The missing Sync was this one. You can't copy new data to 0x2800
    // until you finish the rendering that use 0x2800 as input texture
    // (AKA end of this foreach loop)
    Sync 0x2800 (not the first iteration, texture will be used as a RT)
    Copy page from 0x700+offset to 0x2800

    Sync 0x2800 (RT will be used as input)
    Render Effect line1 from 0x2800 to 0x700
2017-03-15 18:30:46 +01:00
Jonathan Li c498833c27 gsdx: Remove VS2013 stuff 2017-03-13 23:57:15 +00:00
Gregory Hainaut 0af80b7c86 gsdx: restore the order of the texture filtering option
It was modified by mistake with previous filtering refactoring
2017-03-13 22:55:47 +01:00
Jonathan Li 5c1023a332 spu2-x:windows: Replace GUIDFromString with IIDFromString
Does the same thing.
2017-03-12 00:04:09 +00:00
Akash f423cf73c4 GSdx: Fix Alpha test value initialization
Alpha test should only be disabled when writes to all of the alpha bits in the Framebuffer are masked. Fixes a regression in Dragon Ball Z: Budokai 3 scouter image rendering.
2017-03-11 17:40:28 +01:00
Gregory Hainaut 7d3c850813 gsdx ogl: improve ST/Q precision
When a float overflow is detected, geometry shader is disabled. And ST/Q is done on the CPU

It will help
Issue 551
Issue 1684
2017-03-11 00:24:38 +01:00
Gregory Hainaut 6d6ed1a205 gsdx sw: do const q division in ConvertVertexBuffer
It allow to do the division before the size multiplication
It avoid a float overflow if T is too big.
Old behavior: (T * size) / Q
New behavior: (T / Q) * size

Performance Note:
* Rcp was replaced by a slow division (more accurate)
* At least we avoid a 2nd loop on the vertex buffer

It helps on Pro Soccer Club and Galerians Ash rendering

Tric Note:
SPRITE must be handled differently because the 'q' of first vertex could
be invalid
2017-03-10 20:45:14 +01:00
Gregory Hainaut 611239db5c gsdx: handle float overflow on Q in vertex trace
Replace the fast reciprocal with a slower division when we detect a too big Q value.

Improve #551, #1684
2017-03-10 20:45:14 +01:00
Gregory Hainaut f862f5be03 gsdx sw: use accurate division for the C reference implementation
Speed isn't important here. It would allow to compare the rendering with
the JIT implementation. If it is necessary we could an option for the JIT.
2017-03-10 20:45:14 +01:00
Gregory Hainaut b54a824abd gsdx: split texture filtering option
Bilinear applies to all renderer
* Common code done in GSVertexTrace
* Extend it with forced but sprite (trade-off between linear/upscale glitches)
* Linux GUI option was moved at the top with the renderer selection

Trilinear is moved to OGL hack

close #1837

Thanks to Flatout for the review and feedback.
It will take care to update the Window GUI :)
2017-03-10 18:05:34 +01:00
Jonathan Li ec7781f1f9 windows: Fix VS project file issues
Fixes "project out of date" issue for wx_config on VS2017.
Fixes whole program optimisation possibly not being applied on release
builds for USBqemu (it may have been applied, but I can't actually tell,
and now it at least shows properly in the VS property editor).
2017-03-07 19:47:54 +00:00
Gregory Hainaut 91f805675b gsdx: dump xyoffset register 2017-03-05 22:16:01 +01:00
Gregory Hainaut 0a5f796c33 gsdx sw: missing texture due to wrong optimization fix
Typical bug, missing/wrong texture on the SW renderer but working fine on the HW renderer

Debugged on ATV Quad Power Racing 2 but I suspect couple of game are impacted

Bug description:
GSdx flatten the Q value of sprite. So m_vt.m_eq.q is true when Q(2N+1) are the same.
Q(2N) values could be random. The fix replaces Q0 by Q1 for the uniform Q value.
2017-03-05 20:27:19 +01:00
Gregory Hainaut 438fbf31cf gsdx sw: rcp introduce bad rounding on the grandient
Division is slower but more accurate. Fix rendering issue on Xenosaga (batte slot)/Jak3 (skin color)

Coauthor:pseudonym

Fix issue #1769
2017-03-05 10:53:07 +01:00
Gregory Hainaut ae8aa358e4 gsdx: move window creation before renderer/device setup 2017-02-26 19:09:16 +01:00
Gregory Hainaut da2bf4e366 gsdx: reduce the complexity on window creation
Improve code sharing between OS
Use vector to handle priority
Throw in GSWndDX create in case of error
2017-02-26 19:09:16 +01:00
Gregory Hainaut 9ff385f6f3 gsdx: use shared_ptr instead of raw GSWnd* 2017-02-26 19:09:16 +01:00
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