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.
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.
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
* 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
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
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.
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
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.
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.
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
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.
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.
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.
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
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.
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
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.
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.
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.
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.
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.
Hack removed depth effects which are rendered properly. I wasn't able to
trigger a skip on the other hack draw calls, they need to be
investigated further what they actually did.
It ensures the code cases are hit properly for all DATE selection cases.
Texture shuffle case with Slow DATE is not yet supported so keep using
the old DATE method.
Some games don't play nice with the option and have huge amounts of
ram/vram spikes that can even lock up the system so it's better to have
the option disabled by default.
Fixes an issue when the plugin detects an opencl ini value for the
render. It used to throw a "GS plugin failed to load" error when opencl
was disabled but the ini value remained the same. The render will
fallback to D3D11 now.
Remove GSCrc.h include in GSRendererHW and GSRendererDX11, file is
already included in GSState.h.
Remove GSRenderer.h include from renderers except Null and CL, file already
included in TextureCache hw/sw.
Remove resource.h include from GSRendererDX11, already included in GSDevice11.
Remove GSOsdManager.h from GSDeviceOGL, already included in GSDevice
Game has upscaling issues so let's only add the hack for upscaling,
also merge the two regions together.
Hack will be disabled on native res if crc is below aggressive, upscaled
is set to partial level.
Purge dbz bt3 crc hack that removed outlines, I don't want to mix it
with the depth effect hack that I also moved to aggressive.
Move depth hacks for ntsc region to aggressive state.
The hack was used when depth emulation was not supported or when depth
is disabled.
It causes graphical glitches with the faces when depth is disabled.
Update CopyOffscreen to accept the ps_shader value when doing StretchRect.
This fixes an issue where it was selecting the wrong PS for depth cache read.
Should (hopefully) fix SMT.
Switch to using opacity since this is how most software works.
Transparency is simply confusing to the average user.
Linux/Windows GUI to be updated in later commits.
Remove DATE shader macro and bit.
Remove useless HasStencil case. If DATE is enabled stencil is also
enabled, this check is useless.
Remove leftover rt and rtCopy code case from d3d9.
Remove traces of rtCopy and sampler in slot 2.
rtcopy
Code was never hit on D3D11. D3D11 uses stencil operations.
Also Remove VS_RTCOPY which was used only by d3d9.
Remove RTCopy Sampler from the shader.
tfx rtcopy
Remove one crc hack for GSC_HauntingGround. It skipped some depth
effects. Correctly rendered now
Remove all crc hacks for GSC_FrontMission5.
Texture shuffle, depth emulation and enabling Preload Frame Data
emulates the effects correctly.
Add a note for GSC_Tenchu for future testing.
And the time has come to say good bye (good riddance?), this build removes Direct3D9 entirely from GSdx. D3D9 is/was holding us back in some D3D11 fixes that we want to further implement.
The last build that supports D3D9 is v1.5.0-dev-2779-g1a61148b0 for anyone still interested.
"Press F to pay respect.
D3D9 will be broken once #2756 is merged so let's disable it to avoid
any potential crashing if the render is selected.
Complete D3D9 purge will shortly follow afterwards.
Dfmt in texture shuffle function already picks the 16 format on slot 2
so it's better to let it call the shader instead of aout.
We can keep old aout code until FbMask emulation is added on d3d11. We
can purge aout along with alpha hack then.
Added fixme note.
Fixes recent regression on Soul Calibur.
It helps isolate psm.depth when it should and shouldn't run even if
sampling isn't supported yet.
Finding Nemo depth issue remains.
People can use the option to disable depth for now on that game.
I'm seeing better results with this skip not included.
So far DBZBT, God of War, Haunting Ground seem better.
Depth sampling is still not yet added.
Also fixes a regression in GT4 when depth was enabled because the skip
function was misplaced. Other games might've been affected as well.
Move texture shuffle (shadows) hack to aggressive state.
Adjust water/hell effect crc hack - don't enable hack on native res if
crc is below aggressive, enable if resolution is higher on dx and gl
state.
Idea is to allot partial support of depth fmt on the new depth convert
format, this way we can utilize channel shuffle on Red, Blue or gXbY
channels with depth shader conversion.
Terminator 3 hits this code path and seems to fix a transparent wall.
Other games will probably benefit from this as well.
Split the code from GSRendererDX to GSRendererDX9 and GSRendererDX11. We
ensure d3d9 doesn't blow up with regressions, add required code to
GSRendererDX11 to properly support channel shuffle.
Note the feature is still not yet complete, copy function needs to be
implemented (suggested by Gregory) but it can be done at a later date,
this still fixes a bunch of issues on various games.
The hack caused glitches to appear on the right side of the screen, the hack was used as a workaround to properly display game ui elements however it is no longer needed on opengl and d3d11. The ui elements are rendered properly with Depth Conversion.
Shadow issues are solved with at least partial level crc hacks.
See https://github.com/PCSX2/pcsx2/issues/2692 for more detailed information.
1) Refactor palette comparison fast path mechanism to avoid using mutable member of Source,
2) Attach palette to texture as soon as needed,
3) Bugfix attach CLUT copy only when pal > 0.
NTSC only.
I don't know what the "impact screen" crc hack did since the dump didn't
show any difference so that may need to be updated as well.
Note: I only tested the JP version.
Add support for dss_write.
Enable writing in depth buffer for dss_write,
when depth conversion is active data will be writen in the depth buffer,
if not then use the old method (don't write).
* spu2-x: Fix warnings regarding initializing with memset/memzero/etc...
* Use fill_n instead, per turtleli's suggestion.
* spu2-x: Comment out StereoOut initialization.
* spu2-x: As requested, remove commented out code.
The game still has a bunch of depth and other issues even on gl and it
doesn't play nice with the blur effect as well. Perhaps the hacks can be
changed to work better but for now enable it on native as well.
Fixes ground corrupt textures caused by the hack on the EU version.
US works fine with skip 5 but not 4. Didn't spot any regressions on both
so far. Might need extra testing by users.
Idea is to allow Alpha Stencil to work with Fast Date.
Let Fast Date run for the supported calls since it's more accurate, let
Alpha Stencil take care of the rest.
This might fix some issues where Alpha Stencil caused some issues making
it a bit more accurate.
It fixes a bunch of shadow/transparency issues.
Fast DATE doesn't rely on the gui option and is always on.
Confirmed fixed issues: Persona 3 shadows on d3d11,
Digital Devil Saga Transparency d3d9/11.
Fast accurate date works the same/similar to OpenGL.
Confirmed fixed issues: DBZ BT3 ground shadows, Fifa Street 1 shadows
on all d3d renders as well.
Also this option doesn't cause other transparency issues like the
Alpha Stencil hack.
Note: If Alpha Stencil is enabled Fast Date and Fast Accurate Date will
be disabled.
Note2: Full Accurate Date is not implemented so the code fallbacks to
Fast mode instead.
Commits:
3ab12cef2f584397a3fd
This will probably be the last feature d3d9 gets before getting purged.
Move Enable User Hacks at the top. Otherwise spacing looks weird.
Large Framebuffer should be next to Allow 8 bit textures.
Move Accurate Date and Accurate Blending at the bottom (similar to windows).
Suggested by Gregory.
Change the checkbox to a drop down list Off, Fast, Full.
Off and Full do the same as before, the Fast option is new. Most of the
time users don't actually need full Accurate Date so why not reduce that
cost and use a fast mode instead, plus it can also be used on a gpu with
a limited driver. Also change the default value to Fast instead of Off.
Always enable unscale point and line hack on upscaled resolutions, and
purge the gui option.
It was discussed in the past with Gregoy that it can be enabled without
causing any issues which will be beneficial to getting rid of 1 less
option and fixing a bunch of fmv issues without relying on a gui toggle.
Fix GSVector4i::compare64 function by adjusting the number of iterations
needed to cover the comparison of all the elements of the input arrays,
where the number of bytes to compare is indicated in the size parameter
of the function.
The function is used only in GSdx-TC to compare CLUT arrays.
On one hand this fix closes the recent #2706 and possibly the color
regressions indicated in #2702 (which were both introduced with the new
PaletteMap mechanism, which partially replaced the GSVector4i::update
logic with the bugged GSVector4i::compare64).
On the other hand this might impact long standing wrong texture cache
lookup when palette was involved with 8-bit palette disabled (to be
verified which ones).
Close#2713Fixes#2706Fixes#2715
Fixes right half screen issue on TalesOfLegendia. UI elements of the
screen are properly emulated with depth emulation on gl (possibly fixed
by
1cc696ab31).
Shadows will be glitchy if crc hack level is below partial level.
I'm not even sure if the hack is useful at all anymore since it
introduces issues now.
Issue #2692
The code was never working properly ( tested by @tadanokojin ) so let's
clean up and remove it. If someone actually wishes to maintain it then
they can re add it and update the code to a functional stage.
Cutie Chinese comments, they were removed in commit
21522e71b2
It's better to have google translated comments than nothing, at least we
have something to go on when doing future testing.
Also ghosting and blur crc hacks might need to be updated as they may
not be necessary on native res only.
List: GSC_Tekken5, GSC_TombRaiderUnderWorld, GSC_XE3, GSC_AceCombat4,
GSC_SoTC, GSC_ResidentEvil4.
Note: I left GSC_ValkyrieProfile2 in there because it might need to be
re enabled for dx, someday will look in to it when I'm up for the task.
This pull request is for the pending reorganization of the folder structure on GSdx,
making it better organized and easier to work with.
Also remove unused GSTextureFX.cpp file.
Enabled caching of clut copies with PaletteMap also in the case 8-bit texture is disabled, which is the default (on #2344 the caching of clut copies and palette textures was done only when 8-bit texture was enabled).
Brings moderate speedups ~10% in the most concitated parts of the ZoE2 Anubis benchmark, but may improve performance in all the cases when there are many Source objects created with clut copies to be stored.
The quality of the comments has been improved to better highlight the mechanics of the caching system.