Commit Graph

2747 Commits

Author SHA1 Message Date
Jonathan Li 5415b7ad5b gsdx: Prefix std:: to vector
Also use auto when appropriate
2017-09-08 09:56:28 +02:00
Jonathan Li 2aeb406e38 gsdx: Remove hash_{map,set} macros
Also use auto when appropriate.
2017-09-08 09:56:28 +02:00
Jonathan Li d57b812f36 gsdx: Prefix std:: to string and to_string 2017-09-08 09:56:28 +02:00
lightningterror d158ac5ffe GSdx-ogl:
Comment out driver version detection on amd as it was not working properly.
Rename bools for vendor ids.
2017-09-06 18:08:37 +02:00
lightningterror 481a884d25 GSdx - dx9: Edit Alpha Correction (FBA) tooltip.
Can cause graphical glitches in some games.
2017-09-06 18:05:21 +02:00
lightningterror f14c78cf12 GSdx-ogl: Fix GSdx crashing on Intel igpus
Regression was introduced in #1954
GSdx caused the emulator to crash when the renderer was restarted.

It may have affected older gpus from nvidia/amd
with older OpenGL support as well.
2017-09-06 17:14:21 +02:00
lightningterror 91d8e7c7c6 GSdx-Windows: Grey out OSD and Shader Configuration
Grey out OSD Configuration button for Direct3D
since only OpenGL supports the feature atm.
Grey out Shader Configuration button in Core Benchmark.
2017-08-31 21:11:43 +05:30
Jonathan Li fecf8e3ed2 gsdx:ogl: Call swap interval function on rendering thread
The swap interval function must be called on the same thread that
rendering takes place on. This fixes an issue where the turbo speed and
frame limiter hotkeys fail to disable vsync when the OpenGL renderer is
used.
2017-08-30 21:08:54 +01:00
Alessandro Vetere a0aa585afd GSdx GSTextureCache: Using FastList instead of std::list. Various other improvements.
Using range loops where possible (correctly).
Using auto where possible (minimize code changes whenever it's decided to change back to a std container).
Use more efficient erase pattern (where possible).
Minor code tweaks.
2017-08-30 11:43:18 +02:00
Alessandro Vetere b2508dcb59 GSdx GSDevice: Using FastList instead of std::list. Using range loops (correctly). Using auto instead of declaring iterator type. 2017-08-30 11:43:18 +02:00
Alessandro Vetere 965334350f GSdx GSTextureCacheSW: Ported erase iterator trick. Using FastList instead of std::list. Using range loops. Using more efficient erase pattern. 2017-08-30 11:43:18 +02:00
Alessandro Vetere 676c7b89c7 GSdx GSFastList: Introducing the custom container template class. 2017-08-30 11:43:18 +02:00
Alessandro Vetere b431d172b7 GSdx GSDirtyRect: std::vector instead of std::list, to speedup linear scan. Improved const-ness. Using range loop. 2017-08-30 11:43:18 +02:00
Alessandro Vetere f8e89b694a GSdx GSLocalMemory: Reserve space required in the std::vector before adding elements to it. 2017-08-30 11:43:18 +02:00
Alessandro Vetere 3300470a29 GSdx GSCodeBuffer: std::vector instead of std::list, to speedup linear scan. Using range loop on destruction. 2017-08-30 11:43:18 +02:00
Alessandro Vetere 798d6a9134 GSdx GSDevice11: Fix unsigned warning under VS2015 with DEBUG build enabled. 2017-08-30 11:43:18 +02:00
Akash 8fe8cad8f9 GSdx-D3D11: Avoid undefined behavior in swapchain
PCSX2 sends a negative value (-1) to GSdx when adaptive mode is
specified for Vsync, this mode is exclusive to OpenGL at the moment
and is unimplemented on the D3D11 renderer. Also the present function
of swapchain only accepts values from 0 to 4 as parameter, hence
passing negative values to the function is undefined behavior.

So let's fallback to standard synchronization method on D3D11 when
PCSX2 requests for adaptive mode.
2017-08-25 22:40:42 +01:00
lightningterror 420f111611 GSdx: Add missing CRC for GT3 2017-08-16 17:35:32 +05:30
Gregory Hainaut c4bf09ad32 glsl: extension must be declared first
Mesa follows this rule of the standard.

Issue #2037

Shader compile fines now but SSO interface seems to be broken.
2017-08-12 15:37:29 +02:00
Gregory Hainaut 17d2d9217b gsdx ogl: test adaptive/late vsync driver support
Supported on GLX (but not Linux free driver) and WGL
2017-08-05 11:00:39 +02:00
Gregory Hainaut 2e4643a398 gsdx ogl: factorize SetVSync
Move common logic into base class
Add API to handle late Vsync (only stub)
2017-08-05 10:59:48 +02:00
Gregory Hainaut 2204885fbb gsdx ogl: factorize common context init code 2017-08-05 10:56:54 +02:00
lightningterror 66a87ce4d0 GSdx: Add missing CRC for Tomb Raider Underworld 2017-07-29 20:10:46 +05:30
Akash 31400b29c3 Merge pull request #2017 from lightningterror/dbzbt3-crcfixup
GSdx: Adjust CRC hack for DBZ BT3
2017-07-27 00:23:25 +05:30
lightningterror f5b4ccf741 GSdx: Adjust CRC for DBZ BT3
Fix CRC hacks on PAL version.
PAL version will no longer experience very high brightness/contrast
issues on stages in hw mode caused by an incorrect CRC hack.
Moved a CRC hack back to OpenGL mode only for the PAL version
because texture shuffling does not work properly on PAL games.
2017-07-26 20:19:44 +02:00
Akash bd5e54e825 GSdx-Windows: Fix Shadeboost text bug
Forgot to replace `IDC_TEXT` with `IDC_VALUE` macros, due to this the
text containing the name of the options was being updated with the
current value of the option instead of updating the text designated for
holding the values.
2017-07-23 22:50:40 +01:00
puzzo888 1d983a6818 Update GSCrc.cpp (#2018)
gsdx crc: add Front Mission 5 CRC
2017-07-22 11:32:15 +02:00
Akash c3ff1074bb GSdx: Rework framebuffer height calculation
DBY isn't an offset to the frame memory but rather an offset to read
output circuit inside the frame memory, hence the top offset should also
be calculated for the total height of the frame memory. Fixes software
mode regression in Beyond Good and Evil.

Also handle cases when GetFrameRect() is called without any paramerer to
avoid an illegal value access violation on the DISP register.
2017-07-13 17:53:29 +02:00
Gregory Hainaut c5d35d434c glsl: reduce geometry shader complexity
output 1 strip of 2 triangles instead of 2 strips of 1 triangle.

Potentially it would reduce the geometry shader overhead. And it
might avoid a middle line in sprite in some AMD GPU/driver/OS
bad combination
2017-07-12 22:04:03 +02:00
Gregory Hainaut 38010432ee gsdx ogl: handle float integral coordinate for depth sampling
Fix depth effect regression on Nemo (issue #1979)
2017-07-12 22:03:47 +02:00
Jonathan Li 45ac69a1f6 gsdx:d3d11: Fix sprite geometry shader
Sprites always use flat shading.

Fixes #1980
2017-07-02 22:54:36 +01:00
Gregory Hainaut 392816fae3 gsdx: store vsync state into an integer
allow to support late vsync (Adaptive vsync).
2017-07-02 15:14:45 +02:00
Gregory Hainaut 36fd2b6854 gsdx: remove the unused GSsetFrameLimit API 2017-07-02 15:09:47 +02:00
lightningterror 358954d69e GSdx-ogl: Printing console messages v2 (#1954)
GSdx-ogl: Console messages v2

Follow up to
commit/ec63b04719fd9c05a6aeeacb55dc1c54f5ef145b

Add intel broken driver wiki link message in console (OpenGL).
Print intel / amd buggy driver message once in console (OpenGL).
Pring texture barrier and viewpoint array info once in console (OpenGL).
2017-07-02 13:56:45 +02:00
lightningterror f88972013f GSdx: Remove/move DBZ:BT3 CRC
Enables character outlines to partially work on Full CRC.
DX9 has a small issue where a small black line at the bottom shakes when outlines are enabled.
You can either use Aggressive crc or x,y offset to fix the issue.

Removed unnecessary crc hack that caused shadows on stationary objects (trees) to move on Direct3D in a weird
motion blur type way when the player moved slightly.
2017-06-29 16:54:11 +02:00
Akash f2de553d63 GSdx: Cleanup warnings on MSVC
* Cast return value of IsEof() to bool. (Avoids int -> bool performance
warning error)
* Cast field and index to the required parameter type of AppendRawData.
2017-06-29 16:48:50 +02:00
Gregory Hainaut 7d75a73105 cmake: blacklist GCC 7.0 and GCC 7.1 (based on a small testcase)
GCC bug => https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80799

Close #1937
2017-06-29 14:51:50 +02:00
Jonathan Li 4a562401dc gsdx:d3d11: Fix incorrect geometry shader use
The sprite geometry shader was still being used even if the sprites were
converted on the CPUs.

Convert all sprites using the GPU - the fix isn't ideal, but it'll
likely have to do unless someone feels like porting over more of the
OpenGL changes to the D3D11 renderer.

Closes #1921.
2017-06-13 01:11:45 +01:00
Jonathan Li f8787ca6b9 gsdx: Fix variable initialisation issue
Class member variables are initialised in order of declaration in the
class definition. Move native_buffer to the top of the class definition
to avoid initialising m_width and m_height to random values.
2017-06-05 01:12:41 +01:00
Akash 23fa0657a7 GSdx-HW: Move scaling code to separate subroutine
Move the custom resolution scaling code to a separate subroutine and
allow future RT buffer resize calls when the buffer size isn't enough.

(Example: when a game's CRTC/Framebuffer size changes. The older code
didn't consider such cases)
2017-06-04 17:10:25 +02:00
Akash a04d9fa388 GSdx-HW: Revamp buffer size calculation
Added a more robust buffer size calculation mechanism for custom
resolutions. Improves performance in higher resolutions for games
which don't need a big buffer. There's a great boost in performance
at GS limited scenarios.

I don't even feel there's a need for the large framebuffer option right
now, For future - I plan on making the large framebuffer enabled version
as the default as the overhead is there only at situations when it's
necessary. Until then keeping the original code just to be on the safe
side in case any issue pops up.
2017-06-04 17:10:25 +02:00
Akash 266c114c1e GSdx-OGL: Extend ICO workaround to PAL videomode 2017-06-03 14:52:42 +02:00
Jonathan Li 11ed4de0aa gsdx: windows: Port xz dump readback
Also modernize and std:: a bit while I'm at it.
2017-06-03 14:52:01 +02:00
Jonathan Li 742b0edaa8 gsdx: Fix GS dump readback EOF handling
An EOF only occurs after attempting to read past the end of the file.
Account for this correctly, which fixes a potential infinite loop when
reading back an xz compressed GS dump.
2017-06-03 14:52:01 +02:00
Jonathan Li a6ed698fca unix: Remove LZMA_SUPPORTED define 2017-06-03 14:52:01 +02:00
Jonathan Li 3912f3330f windows: Link GSdx to liblzma (xz) 2017-06-03 14:52:01 +02:00
Jonathan Li 97d99632a6 gsdx: Use std::vector for xz dump output buffer
By default, Windows has a 1MB stack size limit per thread, so array
cannot be used...
2017-06-03 14:52:01 +02:00
Akash 49840bb621 GSdx: Implement SYNCV register bitfields
Add the bitfield structure of the undocumented SYNCV register,
potentially might be useful in proper height determination of the output
circuit for some weird games which still get it wrong but still haven't
figured out how it might be useful. Maybe some sort of black magic
formula with the vertical synchronization values?

The differential phase value seems to closely resemble the display
height value of the video modes (480 for NTSC, 576 for PAL) but after
some investigating into the differential phase, I have no clue on how
they might be even related. Hopefully the mystery will be unveiled in
the near future.
2017-05-24 13:44:52 +02:00
Gregory Hainaut 802f1029e9 gsdx: dump gsdump in xz format directly
Reduce disk space. Easy to share.

It would be nice to port the code to Windows.
libzma code was taken from https://git.tukaani.org/xz.git

Note: only short dumps are supported so far. Big dump will freeze the interface during the compression.
Or will suck all the RAM.
Note2: a multithreaded encoder would badly impact the compression ratio

Thanks to Turtleli for all review comments
2017-05-21 23:45:35 +02:00
Gregory Hainaut 53b2fdf31c linux: requires liblzma (xz) to build GSdx 2017-05-21 23:45:35 +02:00