Commit Graph

4977 Commits

Author SHA1 Message Date
Gregory Hainaut 29aef04fbf gsdx ogl: re-normalize coordinate when TEX0 is invalid
Fix #258
Fix #695
2019-02-20 13:49:57 +01:00
Gregory Hainaut 12dcb701c7 gsdx: add a function to fix the TEX0 register value for HW renderer
Based on the SW renderer
2019-02-20 13:49:57 +01:00
Gregory Hainaut 6df9eb8dab gsdx: Allow to save and restore drawing context
Purpose is to allow edition of the context for current draw call
2019-02-20 13:49:57 +01:00
lightningterror 9c60541f3c gsdx-gui: Adjust psx compat gui.
Fix up options to properly disable on Null render.
Clean up some resource defines.
2019-02-20 13:38:49 +01:00
lightningterror c6f57c0bdb gsdx: Save hotkey toggle to ini config.
This will allow to save hotkey option toggling to the ini which
should fix gui updating with hotkey toggles.

Note: Render hw/sw switch doesn't work.

Also update some options that didn't have hotkey nametag.
2019-02-20 11:07:02 +01:00
lightningterror 8cb6d255ca fxaa.fx: Purge d3d9 shader code.
Looks like I forgot this one.
2019-02-19 15:36:15 +01:00
lightningterror cc2fda6d6d gsdx-gui: Add hotkey nametags to some options that have hotkey support already. 2019-02-18 05:11:43 +01:00
lightningterror c0a47c2c79 Lilypad: Don't toggle width and heigh for Inputs window with Show/hide Special Inputs button.
Use a fixed size instead. It will avoid DPI scaling issues.
Also adjust the Special Inputs buttons height position so that the
window height remains a reasonable size.
2019-02-17 20:17:41 +01:00
lightningterror bcba2597f3 Lilypad: Partially revert #2832
DPI scaling doesn't work for the window resize so it made things worse.
Maybe once that is fixed this code can be reverted back again.
2019-02-17 18:42:55 +01:00
Gregory Hainaut 31d95448ed gsdx device: use same target for fxaa/shaderboost/shaderfx
It avoid to waste VRAM memory
2019-02-13 19:52:43 +01:00
Gregory Hainaut 45dfb0dcdb gsdx device: use generic resize texture function
V2: add missing size for merge and interlace
2019-02-13 19:52:43 +01:00
lightningterror 90e38f68d8 onepad/onepad legacy: Remove Windows placeholder dirs.
They are useless.
2019-02-13 14:01:34 +01:00
lightningterror ea6f9acf86 spu2-x-gui: Reduce window height.
Should help low res monitors.
2019-02-13 13:34:40 +01:00
lightningterror a130fcaa4e gsdx-gui: Adjust some button positioning and window width.
"Symmetry"
2019-02-13 13:07:33 +01:00
lightningterror 119ab90657 gsdx: Reuse same selected renderer image/banner for ps1 emu compatibility as ps2.
There's no need to have duplicate images that basically do the same
thing. Update the gui to reflect latest changes and use the same images
on both. It will reduce plugin size.
Remove old images and update VS project files.
2019-02-13 12:30:00 +01:00
lightningterror 5a4541f2f4 gsdx: Adjust/cleanup ini options.
Opencl device, Alpha, Alpha stencil are windows only options so no need
to clutter ini on linux with useless stuff.
2019-02-13 11:06:02 +01:00
lightningterror 12b622c9c1 gsdx: Cleanup/update Wild Arms offset hack.
Don't use integer for the variable, option has only on and off states.
Use member variable names and adjust some checks.
2019-02-13 10:28:07 +01:00
lightningterror 19586fdd7f gsdx: Move GSTexturecache files from Common to HW renderer. 2019-02-11 18:18:02 +01:00
lightningterror ca002c56e5 GSdx: Adjust Burnout crc hacks to work on multiplayer mode as well.
Yellow stripes crc hack.
Note: Only Takedown was tested but other games should work as well.
2019-02-09 21:42:38 +01:00
lightningterror c898c13eb9 lilypad: Some tweaks and fixes.
Hide all ps1 emu options instead of disable. Some options still got
enabled when they shouldn't have so just hide everything. This way we
avoid adding extra code, plus the gui looks cleaner.

Disable ini read/write for Analog ps1 mode, the feature was accidentaly
enabled for pcsx2. By looking at the code it should only be enabled for
ps1 combatibility mode. Also hide the option for pcsx2 as well.

Move around some of the hacks and advanced options to reflect the recent
changes.
2019-02-09 20:28:36 +01:00
lightningterror 7406e13028 gsdx-egl: Also do the same for egl pointer logs. 2019-02-09 11:16:51 +01:00
lightningterror cc6ac657f8 gsdx-ogl: Enable function pointer support logs only when "debug_opengl" is enabled in the ini.
They are mostly for debugging driver issues so regular users don't
actually need to see them most of the time.
2019-02-09 11:10:00 +01:00
lightningterror dabc99f466 gsdx-ogl: Small colclip improvements.
1. Allow hrd colclip to also run on the unsupported
cases which should be pretty rare.

2. Remove colclip from high sw blending.

3. Disable the hdr colclip shader which may not be
actually required to run.

Idea by Gregory
2019-02-08 14:53:15 +01:00
lightningterror b5f0959e6d GSdx-gui: Set ini option to 0 for sparse texture since the feature is not yet implemented,
also add tooltip for the gui option.
2019-02-07 18:38:40 +01:00
lightningterror a9e622357a gsdx-ogl: Fix override detection for extensions. 2019-02-07 18:38:40 +01:00
lightningterror 371b52f4f3 gsdx-gtk: Add linux option for Sparse Texture in advanced options. 2019-02-07 18:38:40 +01:00
lightningterror ad0279a0ab gsdx-gui: Add windows option for GL Sparse Texture in advanced options. 2019-02-07 18:38:40 +01:00
lightningterror 96623acdcd gsdx-ogl: glTexturePageCommitmentEXT should be optional for sparse texture. 2019-02-07 14:32:10 +01:00
Gregory Hainaut 6282c3d263 gsdx ogl: remove boilerplate of extension check
* Use GLExtension::Has in cold path
* Throw error at first error
* Remove aniso check, all hardware support it. Bonus add GL4.6 extension support
* Remove viewport array check. We replace the function pointer anyway
2019-02-07 12:34:02 +01:00
Gregory Hainaut 86a10969f3 gsdx ogl: load GL_EXT_direct_state_access for sparse texture
They forgot to add is to the ARB extension...
2019-02-07 12:34:02 +01:00
Gregory Hainaut 2ea47a1d96 gsdx-ogl: add sparse format detection
v2: fix wrong variable name
2019-02-07 12:34:02 +01:00
Gregory Hainaut fa7ffcd1bf gsdx-ogl: use a print_once macro 2019-02-07 12:34:02 +01:00
Gregory Hainaut 0e4c63db5d gsdx-ogl: add extensions check that might be useful in the future
Namely
* GL_ARB_multi_bind
* GL_ARB_vertex_attrib_binding
* GL_ARB_shader_storage_buffer_object
* GL_ARB_sparse_texture
* GL_ARB_sparse_texture2
* GL_ARB_compute_shader
* GL_ARB_texture_view

v2: add default option value
2019-02-07 12:34:02 +01:00
Gregory Hainaut aed7ccaadf gsdx ogl: use a set to store the supported extension
Split mandatory/optional extensions

Note: set is nice but likely much slower than reading a boolean
So both are kept
2019-02-07 12:34:02 +01:00
Gregory Hainaut e6b0a7828e gsdx-ogl: add a separate glext.h file
Allow to compile on distribution that still ship an older file
The file is only a patchup of the missing 4.3/4.4/4.5/4.6 define

v2: rename the file and add khronos copyright
2019-02-07 12:34:02 +01:00
Gregory Hainaut 2c99a0775c 3rdpary: import GL/glcorearb.h
It will replace glext.h in the future

v2: add requirement in gsdx
2019-02-07 12:34:02 +01:00
Gregory Hainaut 8cd6f4375e gsdx-ogl: use only core debug extension
There are 2 extensions GL_ARB_debug_output (promoted from amd extension)
and GL_KHR_debug (the core extension, promoted from GL_ARB_debug_output)

As we use the callback we could drop the manual query of errors.
And save us the load of the GL_ARB_debug_output extension function pointer.
2019-02-07 12:34:02 +01:00
Gregory Hainaut cd333c2c94 gsdx-ogl: add missing define of glcorearb.h
Migration isn't expected soon but it should ease the process
2019-02-07 12:34:02 +01:00
Gregory Hainaut 8a723b3be8 gsdx-ogl: clean partially the GL1 mess
Remaining will require a move to glcorearb.h
2019-02-07 12:34:02 +01:00
Gregory Hainaut 4f09124f19 gsdx-ogl: generate nearly all gl entries function pointers
I used glcorearb.h as input file

Code is limited to core gl + KHR/ARB extension
GL1.X must be handled manually (need only 3 functions)
I think the solution would be to migrate gl.h/glext.h to the
single glcorearb.h. However we might need to update the code to fetch
pointer accordingly

Note: we don't check the null ptr anymore on GSwnd. It isn't important
as we check the extension.

v2: update copyright
v3: update copyright space
v4: update copyright of script

fix copyright
2019-02-07 12:34:02 +01:00
Gregory Hainaut dbffad2aef gsdx hw: use non virtual Create Texture function.
Just do the format check in FetchSurface. It removes a level of virtual function
and avoid useless code duplication.
2019-02-02 22:54:30 +01:00
lightningterror 1094446862 lilypad: Adjust Special Inputs window and button behavior.
Fixes an issue with the window size and Show/Hide special inputs button
resetting when lilypad was closed and reopened, this was because the
code was executed only when the button was actually clicked.

The values will be properly stored in cache along with the rest already
working properly buttons.
2019-01-31 15:15:44 +01:00
lightningterror f02c683178 gsdx: Merge Sly 2 and 3 crc hacks.
Upscaling issue with texture shuffle on dx and gl. Also removes shadows
on gl.
Bbox issue on dx.

Dumps from Sly 2 and 3 look fine after the merge.

Also add a crc id BF1739E2 for a prototype Sly2. I don't remember who
game me the dump or if it's official.
2019-01-28 21:58:30 +01:00
lightningterror ee7749452d gsdx-d3d11: Remove unused function OMSetRenderTargets with UnorderedAccessView.
Note ID3D11UnorderedAccessView parameters are also unused but could be
useful for future DATE ports.
2019-01-28 21:01:22 +01:00
lightningterror 4c477d3cd6 gsdx-debug: Disable Alpha Test debug logs on d3d11.
Unfortunately they do more harm than help, slowing things quite a lot
because of the endless log spam when debugging gs dumps.
2019-01-28 20:38:11 +01:00
Kojin af64865c5d gsdx-d3d11: Framebuffer copy improvements
Improved handling of frame buffer copy by accounting for fb read on all slots.

- implement before/after draw functions
- defer setting of resources on the api to just before the draw
- use a bitfield to keep track of set/copied resources
- recycle copies after draw

Fixes: RE4 and Tales of Abyss
2019-01-27 16:40:39 +01:00
lightningterror ece7d6e718 gsdx-ogl: Update intel bad driver log.
Assume that driver support is good when GL_ARB_texture_barrier and
GL_ARB_direct_state_access are both supported, disable the log in that
case.

Kaby Lake and above already support the required extensions (windows) so
the log is useless. It should be the same case for Skylake. Mesa driver
should already be good.

Note: SSO is still broken even on latest igpu.
2019-01-27 00:12:08 +01:00
lightningterror 4ab29eb280 gsdx: Remove some useless dx9 comments. 2019-01-26 16:13:07 +01:00
lightningterror d4833a4618 gsdx-d3d11: Add final specifier to some voids. 2019-01-26 16:13:07 +01:00
lightningterror 744fa18d95 gsdx-d3d11: Merge/move GSDeviceDX code to GSDevice11.
Update VS and cmake project files, remove GSDeviceDX files.
2019-01-26 16:13:07 +01:00
lightningterror 19b97f8684 gsdx-ogl: Remove useless SetupIA from GSDeviceOGL.h not used. 2019-01-26 16:13:07 +01:00
lightningterror 2e2c9b14a4 gsdx-ogl: Enable anisotropic filtering only for triangles.
Sprites are flat so aniso is likely useless (it would save perf for
others primitives).

Idea by Gregory.
2019-01-26 14:52:30 +01:00
ghost-101 ac1424ad6d onepad: Add the Logitech Chillstream to the database. 2019-01-25 22:51:22 +01:00
lightningterror 0e239cac66 gsdx-ocl: Add some ifdef checks for opencl renderer.
Should resolve gsdx crashes when ini value is selected as opencl when
opencl is disabled.

Properly fallback to default renderer.
2019-01-25 22:35:11 +01:00
Shanoah Alkire 8791d8e5b0 onepad: Add the SteelSeries Stratus XL to the database. Issue #2825 2019-01-24 21:48:56 -08:00
lightningterror 7b4133ac08 GSdx-d3d11: Add final to Renderer class and DrawPrims, also change some voids to inline. 2019-01-24 20:30:48 +01:00
lightningterror 78f0b65e19 GSdx-d3d11: Merge GSRendererDX11 and GSRendererDX together.
Update VS and cmake project files to match new changes.
2019-01-24 20:30:48 +01:00
lightningterror b9df1e643b gsdx-hw: Adjust/cleanup hw hacks variable calls.
Use a function to check UserHacks for all variables in GSState.cpp
instead of checking each variable individually.

Get rid of UserHacks_HPO local variables in GSRendererOGL/DX and use the
member variable m_userHacks_HPO instead, we don't need duplicates that
do the same thing.

Add ResetStates call at the beginning of GSRendererDX to match gl
behavior.
2019-01-23 12:24:12 +01:00
lightningterror 2aadf0be89 GSdx: Adjust Scaling Factor.
Use value of 1 when upscale multiplier is 0 for ScalingFactor, this is
to avoid doing math with 0 in shader.

It helps custom res be less broken. Still not recommended to use custom
res ofc.
2019-01-22 23:25:01 +01:00
lightningterror 55bc8e13fc gsdx-gui: Update Accurate date tooltip. 2019-01-22 22:14:28 +01:00
Kojin 8c8b1f497c gsdx-d3d11: ICO depth HLE
Game reads framebuffer depth as alpha of texture.
However, this is a problem for d3d11 as a shader read on the fb is not allowed.

So let's handle it in a similar fasion to channel shuffle:
- Set depth to slot 4
- Detect when slot 4 matches depth rt
- Copy and send the copy to the shader
2019-01-22 06:52:24 +01:00
Kojin 468b9ded46 gsdx-d3d11: Update texture copy method to handle depth
- Rename CopyRenderTarget to CloneTexture
- Allow copy of depth target

Also fix a small oversight from the removal of MSAA.
2019-01-22 06:52:24 +01:00
Kojin 57824261c6 gsdx-d3d11: Cache rt depth stencil on m_state
Cache the depth stencil in addition to color rt.
This will allow us to check for depth stencil equality on slot 4.
2019-01-22 06:52:24 +01:00
lightningterror 946e6046b3 gsdx: Adjust some crc hack comments for some games.
Maybe in the future I'll add github issue links to corresponding crc
hacks.
2019-01-21 19:38:20 +01:00
lightningterror 548d6b31bf Gsdx: Purge GSC_RedDeadRevolver crc hacks.
Blurring with a bit of ghosting is intended and it looks like that on
the console as well.

Depth properly emulated.

D3D11 misses blending.
2019-01-20 19:49:36 +01:00
lightningterror 4ecbb750a8 GSdx: Purge GSC_BlackHawkDown crc hacks.
Channel and texture shuffle emulated correctly.
2019-01-20 00:05:18 +01:00
lightningterror 7247ee1ad0 GSdx: Add glsl shaders to VS solution.
It should make searching/navigating a bit easier now.
2019-01-18 15:56:54 +01:00
lightningterror b4cb805a91 gsdx-tc: Remove CanConvertDepth virtual bool and use m_can_convert_depth for depth toggling. 2019-01-18 14:53:06 +01:00
lightningterror bbd8cbbcf4 GSdx: Move GSC_DeathByDegreesTekkenNinaWilliams to partial crc level.
Upscaling issues + unsupported texture shuffle.
Hacks might need to be updated.
2019-01-18 13:17:28 +01:00
lightningterror 85e2a0a6bb gsdx: Add Death By Degrees crc id for US region.
crc hacks still need to be tested properly.
2019-01-18 11:29:45 +01:00
lightningterror f28f03803f tfx.fx: Correct a couple more blending factors.
Chane 0.5 to 128.0f/255.0f which is 0.50196078431.
Just to be safe it's accurate.
2019-01-18 06:10:41 +01:00
lightningterror 0c3a0da58f GSdx: Purge GSC_LegoBatman crc hacks.
Effects emulated correctly with texture shuffle and depth.

Game has upscaling issues which can be fixed with TC offsets.
2019-01-17 09:58:59 +01:00
lightningterror 51fe6c20ca GSdx: Adjust dbz bt glow/blur crc hack.
Don't enable hack on native res if crc(ntsc only) is below aggressive.

Note for future so I don't forget: This hack can be disabled if depth
hack is also disabled.
2019-01-17 07:45:35 +01:00
Kojin 5fe1cab889 gsdx: Remove remaining MSAA ui code
We are removing MSAA for the following reasons:
1. It's broken
2. Fixing it would mean it would perform as well as FSAA, which defeats the purpose of having it
3. It's only supported by DX and Windows
4. Reduction in code complexity

Press F to pay respect
2019-01-15 19:13:14 +01:00
Kojin e429677a07 gsdx-hw: Completely remove MSAA from renderer code. 2019-01-15 19:13:14 +01:00
lightningterror fa4ae7800b tfx.fx: Adjust some blending factors
255.0f / 128.0f gives us 1.9921875.
128.0f / 255.0f gives us 0.50196078431.
Which are more accurate.
Fixes regression in dbz bt3 where characters appeared darker.
2019-01-14 17:01:17 +01:00
lightningterror ee4d295667 GSdx-d3d11: Remove afix factor from 24bit format. 2019-01-14 16:52:19 +01:00
lightningterror e05b5d2420 GSdx-d3d: Move channel and texture shuffle in GSRendererDX.
Preparations for file merge.
2019-01-14 02:30:25 +01:00
lightningterror 25ed5857d8 GSdx-gui: Add 10x and 12x as an upscaling option.
10x ~3160p 6K
12x ~4320p 8K"
Can anyone even run these ?
2019-01-14 01:44:58 +01:00
lightningterror 3a7f2a5c0b GSdx: Hide the MSAA option.
No need to have an option on display that does nothing for now.
2019-01-13 17:57:29 +01:00
lightningterror 106c678cc1 GSdx: Purge GSC_EternalPoison crc hacks.
Shadows are better rendered now with hdr colclip, blending is still
needed but the shadow's shape is proper now so let's purge the hack.
2019-01-13 17:33:08 +01:00
lightningterror 52bad3505c GSdx: Adjust GSC_GodOfWar 1 and 2 crc hacks a bit more.
GSC_GodOfWar moved to aggressive state.
GSC_GodOfWar2 some value swere corrected (should fix some regressions)
and hack was moved to partial state because we have an upscaling hack.
2019-01-13 16:26:09 +01:00
lightningterror f5b9965910 GSdx: Purge OI_GodOfWar2 hw hack. 2019-01-13 15:08:36 +01:00
lightningterror 6f01936943 GSdx: Remove depth crc hacks for god of war 1 and 2.
Effects rendered correctly with depth on all renderers.
2019-01-13 14:42:53 +01:00
lightningterror 9119e3110d GSdx-ogl: Correct DATE log. 2019-01-12 16:43:26 +01:00
lightningterror f73de4c59c GSdx-ogl: Add perf log for Slow DATE code on texture shuffle/no prim overlap. 2019-01-12 09:59:28 +01:00
lightningterror 7e6c325210 GSdx: Move BoundingBox to HW render and update d3d11 code to use the gl bounding box as well.
hdr colclip and date uses it.
2019-01-12 09:53:51 +01:00
lightningterror 86327b52a9 convert.fx: Update main4 shader to better support hdr colclip. 2019-01-12 09:53:51 +01:00
lightningterror d17e0eba9b GSdx-d3d11: Add/port HDR colclip support.
It helps render shadows a lot better compared to the old code.

Credits to Gregory and Kojin for helping with the code.
2019-01-12 09:53:51 +01:00
lightningterror 8a57d7f470 GSdx-d3d11: Remove colclip and negative blend algo.
Code was old and inefficient. HDR colclip will do a better job.
2019-01-12 09:53:51 +01:00
lightningterror e0877608ae spu2-x: Remove DecodeDPLII.cpp and DPLII.h files "Dolby Pro Logic II".
DecodeDPLII.cpp is an old duplicate of DplIIdecoder.cpp which seems to
be useless.

Code was updated in
a4a40441c9 (diff-7b7ddfd7d5c8c428703a057822e60668)
2019-01-09 20:05:29 +01:00
lightningterror fb5471f34f spu2-x: Adjust some Dolby Pro Logic II code.
Comment out unused variable sLogTable in DplIIdecoder.cpp.
Remove DPLII.h from cmake list, it's unused so don't list it.

Some people suggested to keep the source files even if they are unused
so we can do that. Maybe someone will get the code to work properly.
2019-01-09 16:01:56 +01:00
lightningterror f2f66c02d3 GSdx: Add option to Disable Safe Features.
Idea is to disable multiple features in 1 option to avoid gui clutter.

Unscale Point and Line:
This partially reverts PR #2710 restoring Unscale Point and Line but as a disable option.
It can help Xenosaga games.

GS Memory clearning:
This disables GS memory clearing to be done on the CPU, by default both gpu and cpu do memory clearing
which is more accurate.
It can help Kingdom Hearts games.
2019-01-09 15:44:41 +01:00
arcum42 c58acd1105
Remove CDVDPeops and PeopsSPU2. (#2792) 2019-01-03 19:55:03 -08:00
lightningterror 54f8aca7d5 GSdx-d3d11: Re enable shader code logging.
Log was disabled in #2760
2019-01-04 01:00:10 +01:00
lightningterror 4cf3328682 GSdx: Adjust some checks in the gui code.
Now that d3d9 has been removed we can ease up and reduce/remove some
render variable checks.
2019-01-02 03:11:47 +01:00
lightningterror d55e9cbd96 spu2-x: Remove unused GetLinearSrAr code.
Get rid of GetLinearSrAr code, it wasn't used anywhere so I don't see a
reason why to keep it, other than clogging up the code, if someone wants
to work on it they can re add the function in the future.
2018-12-31 18:06:31 +01:00
lightningterror ec6ac75b10 GSdx-gui: Update the crc hack level tooltip again.
Suggested by Gregory.
2018-12-31 18:03:15 +01:00
lightningterror 5d62e47229 GSdx-gui: Update crc hack level tooltip.
The tooltip was way too big so this should shrink it down a bit. Remove
the mentioned games on Aggressive state, it was a bit useless.
2018-12-30 23:59:59 +01:00
Kojin eddaf71d47 gsdx: remove dds parameter from texture save method 2018-12-30 20:13:59 +01:00