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).
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.
Removed crc id 0x7D4EA48F and mentions of that id and it's duplicates. The id is from a multiloader when packing images, and not an actual crc id from a game(s).
This follows the 4th point of #2310.
The idea was to rework the current palette texture management to improve performances with games that uses multiple palettes for the same data texture.
The new management shows small to none performances improvement in almost every game in terms of FPS, and it lowers the GPU BUS usage by some percentage points in games like Baldur's Gate: Dark Alliance (9% to 7%) which uses many palettes.
The hot topic is that the performances in Zone Of The Enders 2 skyrocketed (2x), because of the fact that the game uses many palettes and a small number of textures to render it's effects.
For more detailed information check the PR #2344
Some users get confused and change the setting to a recommended option.
This can cause some issues when switching different hw render types.
Most of the time users shouldn't change the option and leave it on
Automatic.
Also remove ICO from crc Aggressive tooltip.
Only impacts custom resolution, there used to be a much weaker algorithm
which doens't consider scissor sizes and gives a minor performance boost
in costs of accuracy (which was used when large framebuffer was disabled
in custom resolutions)
I've removed this as the performance tradeoff is rather negligible after
the implementation of #1942 and the older one is no longer necessary.
Also added an extra parameter for considering the horizontal scissor,
I'm not sure where this might be useful so this is disabled in code for
now till I discover a testcase where this helps or run it on random data
ensuring it's working properly.
Also porting this to the general scaling function might help with memory
spikes which are experienced when large framebuffer is enabled.
We can't do a full port because channel shuffle and depth sampling need
to be ported to d3d but at the very least we can do a partial port that
skips the bad draw calls.
This way we can remove all the remaining crc hacks for ICO in GSHwHacks.
This should make things a bit easier for users when picking resolutions.
Native (PS2)
2x Native (~720p)
3x Native (~1080p)
4x Native (~1440p 2K)
5x Native (~1620p 3K)
6x Native (~2160p 4K)
8x Native (~2880p 5K)
Custom (Not Recommended)
Change the code so that some crc hacks on some games that remove
ghosting/blur issues on upscaled resolutions are disabled on native
resolution if crc hack level is below Aggressive state (most of the time).
They aren't needed then so why don't we aim for better accuracy.
Let's keep the file clean and use 1 type of formatting and not a bunch.
It's easier to read this way and looks tidy.
Also correct some commented out code in Texture Sampler.
Hack will no longer be active on Intel or AMD gpus.
Also remove UserHacks_disable_NV_hack. sprite hack
basically does the same thing so it's kinda useless.
Some values were incorrect, now I'm no expert but looking at the code
and behavior seemed a bit wrong compared to gl.
Improves d3d rendering on Sonic Unleashed, the purple screen is gone
matching it with gl visuals.
dfmt is not supported but we can use the variable to select the
frame buffer format and later disable writting to the alpha channel.
MGS3 sees an improvement, and possibly other games as well.
So far didn't spot any regressions.
Commit:
d29e375f72
Only native res is supported currently, but it's still great progress.
Someone needs to port the ScalingFactor to D3D from commit:
6121677aa1
Credits to KrossX for porting the shader.
Add a missing crc id for the US version,
, move the crc to DX level - effect is emulated correctly on OpenGL with
depth,
merge the two Yakuza hacks together and reformat it making it easier to
be read.
Skip 3 also seems to work on Yakuza 2.
Related commit:
7f0f19ee02
Reformat the code a bit, ocd satisfaction.
This prevents the dialog from preserving state after it is closed, which
simplifies the logic slightly for reopening the dialog.
Also remove an unused variable.
Re add point sampler to OpenGL. Fixes graphical issues when
Allow 8-bit textures is enabled on AMD gpus.
Issue: https://forums.pcsx2.net/Thread-GSDX-Hardware-mode-Bug-Report-Allow-8-bit-Texture
Adjust the code to be easier to read, and execute the gl code only on amd - suggested by Gregory.
Remove useless ATI_SUCKS define in tfx shader.It wasn't used anywhere outside of the shader.
Enhance the skipdraw hack by allowing skipdraw to skip a range of draw
calls.
For example: When the broken effects are at frames 90-100, the default
skipdraw always skips 0-100, possibly skipping several functioning
effects as well. By enhancing the skipdraw feature, it is now possible
to skip just frames 90-100.
For the example given above set the first box to 90 and the second box
to 100 to skip frames 90-100.
coauthor:turtleli (Linux GUI + tidy/simplify Windows GUI code)
Decrease spacing between Hardware Settings and Texture Filtering
slightly. It was a bit too much before,
Adjusted spacing to be equal between options, some had incorrect
spacing.
Maybe Accurate Date and Blending Unit Accuracy can be swapped.
Makes all the tabs scrollable, which makes the dialog more usable (the
OK button should always be present unless the screen is absurdly small).
Only checked on GTK3.
Use hexpand instead of expand, and use margin-start instead of
margin-left (margin-left is deprecated in GTK+ 3.12). IMO it looks
better this way.
Also, set the properties using gtk_widget_set_* instead of g_object_set.
Add God of War Demo ntsc,
Add Burnout Takedown E3 Demo ntsc,
Adjust regions for Harry Potter ATCOS/ATPOA,
Add comment for crc 0x7ACF7E03 - multiloader.
Automatic mipmapping: Harry Potter (Chamber Of Secrets,
Prisoner of Azkaban, Order Of The Phoenix), The Incredible Hulk:
Ultimate Destruction.
Add some missing crc ids for GT4 demo discs.
Adjust Spartan crc hack: Combine/ease the hacks in to one.
Only remove the glow/yellow bloom effect and don't skip any other effects that shouldn't be skipped. UI and some other post processing effects work properly now.
Add crc id CrashBandicootWoC RU.
Add some missing RU crc ids: Onimusha3, ICO, TombRaiderUnderworld, SoulReaver2, LegacyOfKainDefiance.
Removed crc id 7ACF7E03 and mentions of that id and it's duplicates. The id is from a multiloader when packing images, and not an actual crc id from a game(s).
Add FinalFightStreetwise RU, SoulCalibur3 RU. Correcting the wrong id TenchuFS RU (the elf was modified widescreen cheat, sorry). Delite Kunoichi RU (the elf was modified widescreen cheat, the original coincides with the EU).
Move a hack that removed burning/hot air effect. The effect is rendered properly but causes slowdowns so it's best to move it to aggressive for now.
Add comments explaining what the crc hacks do.
Ease the crc hack and skip less effects, makes shadows and some other effects work properly.
The game experiences a bit more upscaling issues which can be resolved with Merge Sprite and Wild Arms offset HW hacks.
Purge Hw hack fixes for Spyro New Beginning and Eternal Night that fixed
HUD and menu display.
They will be replaced with EE patches in GameDB that work for both
software and hardware mode. A much better alternative and less GSdx
hacks.
Port from commit b0af54d3
Fixes shadows in Star Ocean 3.
Note: It works properly on native res only just like on GL.
Upscaling will cause some issues.
Only Direct3D10/11 supports it, D3D9 doesn't support integer operations
so we can't reuse the code.
Revert merge of Spyro Eternal Night / New Beginning hw hack.
Update Spyro New Beginning hack - fixes menu/hud flicker in HW mode.
SW mode still has issues with the menu/hud elements.
Improve #1490
The following games in the crc list are not used anywhere so
we can clean this list up. If some are needed in the future then
they can be re added.
List of removed games:
CaptainTsubasa,
Dororo,
HarvestMoon,
Jak1,
JamesBondEverythingOrNothing,
NamcoXCapcom,
SDGundamGGeneration,
SeintoSeiya,
SengokuBasara,
SilentHill2,
SilentHill3,
Siren,
TalesofDestiny,
VF4,
VF4EVO.
The crc hack broke graphics ingame, causing flickering/transparent
textures and other similar issues.
On a side note the game experiences upscaling issues that can be fixed
with Half Pixel offset hack.
Update it to the version found at
https://github.com/Microsoft/Windows-classic-samples , which is in an
MIT licensed repo, and add the LICENSE file (edited to remove the SIL
Open Font LICENSE part since that doesn't apply).
Some modifications have been made to reduce the diff/stop git
complaining (not including any file that wasn't in the previous version
and removing the related header includes in streams.h, and fixing some
but not all of the whitespace issues).
Move CRC hacks do DX level.
Hack that fixes shadows:
Shadows/glitchy black ground textures can be fixed with Preload Frame Data.
Hack that removed vertical stripes:
D3D10/11 correctly emulates texture shuffle but also needs depth support.
Don't skip draw calls on Jackie Chan Adv and SVC Chaos,
fixes regressions on Jackie Chan Adv and SVC Chaos.
Gregory: The correct fix would be to trace all textures writes to
be sure of the source. But it is a much bigger work.
Purge Sengoku Basara crc hacks. Texture shuffle is emulated correctly on
d3d11/ogl. d3d9 skips the bad draw call.
Move Eternal Poison crc hack to d3d level. Not needed on ogl since
the game is emulated correctly.
Move hack that removes texture shuffle for Demon Stoneback back to ogl level,
half screen bottom issue remains.
Extent CRC hack for The Getaway and The Getaway Black Monday to work on
EU regions.
Move CRC hack that removed shadows to Aggressive, shadows are misaligned
when upscaling - can be fixed with HPO. We can use the hack as a
speedhack for Aggressive state.
Add correct FBP code for Sly 2 E3 Demo. CRC hack should work properly now.
Purge God of War 1/2 CRC hacks that fixed/removed the vertical red lines.
No longer needed since the issue is fixed accross all renders.
Also useless to be kept for speedhacks.
Texture Shuffle changes:
Always Enable Texture shuffle on D3D10/11.
Previously Texture shuffle was enabled if CRC hack
level was below Full, this was kinda not good since
D3D also relies on CRC hacks on Full so you could either
stick with texture shuffle or crc hacks.
Texture shuffle is not supported on D3D9, however we can do a partial
port where instead of vertical lines with the effect we get the effect
on the entire screen. Better than nothing I suppose.
Ported some of the code from OpenGL to D3D
( just a copy - paste job :) ),
part of the code misses a dedicated shader but we can still
use it to fix various issues on many games.
List of affected games tested so far:
The Godfather, Final Fight Streetwise, The Suffering Ties that Bind,
Urban Chaos have their vertical lines issues fixed
(highly possible for other games as well), MGS and Stolen see an improvement
but they are still broken without crc hacks. Other games that suffered
similar issues are probably affected as well.
Channel Shuffle changes:
Update Channel Shuffle detection. A lot of games should see an improvement,
MGS, Urban Chaos, Stolen have their top left corner issues resolved.
Other games should be affected as well that use similar logic.
They still miss a shader so some effects are still broken/show glitches
but it's a nice improvement for D3D users.
Shared changes:
Texture Shuffle and Channel shuffle have been moved to their
own dedicated functions. Should make things a bit cleaner.
Move part of the code for Texture Shuffle to GSRendererHW to be shared
across all HW renderers, should aboid copy paste/duplicate code.
Replace/remove an old crc hack that was used to fix the red vertical
lines issue, the hack is no longer needed. The new hack removes depth
effects on D3D only.
Note: The game has another vertical lines issue that can be fixed with
texture shuffle on D3D.
Add comments to Simple2000Vol114 explaining what the hacks do.
Merge identical code for Spyro Games in to one to avoid duplicate code.
Rename hacks name for Jak series from OO_Jak to OO_JakGames since there
are multiple games added.
This follows PR #2330.
Add some missing regions: Tomb Raider Legend JP,
StarWars Force Unleashed EU, SuperMan Returns EU, Valkyrie Profile 2 FR.
Rename GT3/Concept titles, they were incorrect.
Adjust Harley Davidson region id from NoRegion to US.
Add some missing regions to automatic mipmapping:
FIFA 03 US, FIFA 04 EU, FIFA 05 EU.
Reformat a few comments.
Add "Default" nametag for default list options for the hacks: Sprite,
Round Sprite, GL Advanced settings, HPO.
Should help users know which options are the default ones with less
confusion.
Add CRC id for FFXII US, SFEX3 EU,
GT4 CH and GT4 Online Beta US.
Adjust BullyCC region from US to EU.
Add Missing regions for Ratchet & Clank,
Ace Combat, Destroy All Humans and Soul Reaver
series to Automatic Mipmapping.
Removes GT4/Tourist Trophy CRC hacks. The hack had already been moved to
aggressive due to VRAM spike issues, but is no longer necessary at all
due to the in-game brightness/contrast setting issue being moved to
behind the frame buffer conversion hack for Direct3D and being resolved for OpenGL.
Move hacks that disabled shadows to DX level since OpenGL renders
shadows properly with Depth Emulation.
Some other upscaling issues appear with the disabled hack like a small
black border on the bottom of the screen or some ui elements but those
can be fixed with TC X,Y Offset hack.
Previously, the calculation for the size of data to be loaded was done
based on the rendering target buffer size and scaling multiplier, which
was totally wrong. This led to different resolutions having different
load sizes while the size of the real GS memory is common regardless of
the scaling variancies.
Hence use the default rendering target buffer size for the load size
independent of the scaling values. I've also removed a buffer height saturation
code which seemed unreliable.
Note: The accurate version of the code can be enabled using the macro
provided in config.h (which is more intensive on resources), the current
code goes along with the approach of maintaining a decent performance
level along with a formidable accuracy.
Adjust region id for BT2.
Move the sky texture(depth) hack back to Partial level only for the EU
regions. Effect is still not rendered correctly and causes a half
screen bottom issue.
Add R&C3 EU to Automatic Mipmapping.
Previously the limit was 1000, now 10000 in the GUI. It should help in
some rare cases where a higher number is needed without the need of ini
editing and value reset issues caused by the GUI.
Previously if HW hacks were enabled Merge Sprite was active(if checked) on
native resolution even if the GUI option was disabled, which in result
caused glitches in games on native resolution.
This should address that issue.
Remove Aggressive CRC hacks for SSX 3. Was used to remove the red lines
on older versions but no longer needed since the issue has been fixed.
Offered 1fps or less speed bump but it's not worth keeping for such a
minimal increase.
Merge all FFX CRC hacks in to one. They share the same code so it's
better to have one to avoid duplicate code.
Move CRC hack for Bleach Blade Battlers to Aggressive. It removes the
character shading. It can be used as a speed hack since the gains are
quite good from it. Around 15-30%.
Add missing CRC ids for Soul Calibur 2 and 3.
Move CRC hacks to DX level. They are not needed anymore on OpenGL since
Depth Emulation fixes depth issues (shadows).
Move CRC hack to Partial that fix the half screen
bottom issue since the effect is not rendered correctly.
Move CRC hack to Aggressive. These hacks are only
needed when running upscaled resolution. They skip the
blur effect which cause ghosting and some other screen issues.
Side effect is they also remove the channel effect on OpenGL
which is emulated correctly so let's put them on Aggressive.
Comment out a hack, it's unknown what the hack does atm.
If there are new issues then it will be added back.
Added comments what the hacks do.
Partial port for channel shuffle effect to Direct3D for Tekken5.
The effect is skipped and not rendered but now the top left
screen glitch has been resolved.
Note: At least Minimum CRC level is required for this to work.
Add hidden option "UserHacks_DisableNVhack" to disable
the Nvidia hack on Direct3D which added black lines on the right
and bottom of the screen. Could be useful for Intel and AMD GPUs.
A better solution would be to add Vendor Id detection instead,
but this will do for now.
To disable the Nvidia hack add UserHacks_DisableNVhack=1 in GSdx.ini
Fixes glitchy water in Rogue Galaxy in Direct3D when the hack is
enabled.
Fixes Test Drive car reflection in Direct3D when the hack is enabled.
OTher games are affected as well.
Adds automatic HW mipmapping support.
It relies on CRC ids so if a game does
not have their CRC id but needs mipmapping
it will not work until the id is added.
Add GUI menu and tooltip for Automatic mipmap
"Automatic (Default)"
This option will be default option from now on.
Rename "Very Slow" text option to "Slow" for full mipmap
as it caused the text not to fit properly in the menu.
Credits also go to @RedPanda4552 and @ssakash for helping
with the code.
Rearrange the two columns of HW hacks, new arrangement
is done in alphabetical order on Windows and Linux.
Rename some hacks on Linux to match the windows version.
Some other minor tweaks as well.
The following patch grays out the configure button when there's no
configuration dialog available for the selected codec. What's the use in
clicking it when no dialog pops up? :P (I've been tricked by it lots of
times)
Add HW Hack that enables Framebuffer Conversion on the CPU instead of the GPU.
Can fix broken textures on games but at the cost of slower performance.
List of games: Harry Potter games, FIFA Street games.
Games like Call of Duty, Kung fu Panda might also be affected as well as others
especially on Direct3D.
Add HW Hack GUI option on Windows/Linux for 4-bit and 8-bit Framebuffer conversion hack
named "Frame Buffer Conversion".
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.
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.
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.
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.
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.
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.
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.
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
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).
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.
* Cast return value of IsEof() to bool. (Avoids int -> bool performance
warning error)
* Cast field and index to the required parameter type of AppendRawData.
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.
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.
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)
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.
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.
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.
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
* replace gtk_table by gtk_grid
=> it still misses some paddings
* Use 3.22 monitor API to query screen size
=> need to be tested
* directly add scrolled windows into a container without bothering with
the viewport.
Code compile fine but wasn't tested.
v2: disable the code until I (or someone) get a chance to test and fix it.
Thanks to @colepcsx2 (https://github.com/PCSX2/pcsx2/pull/1896#commitcomment-21858717) for pointing it out!
I also updated the prefix in the inferior video mode detection of GSdx, I'm not even sure why we need the videomode info on the plugin side, might be useful someday.
The shadeboost options text (Contrast, Brightness, Saturation) were not
grayed out when shadeboost was disabled, it was sort of inconsistent
compared to the behavior of external shader, so added grayouts to them
when shadeboost is disabled.
Also changed "OpenGL Very Advanced Custom Settings" to "OpenGL Advanced
Settings", the verbosity didn't help much in my opinion.
Split code in 2 parts
* Base class (GSWndEGL) that implement the core EGL and GL context
* Derived class (GSWndEGL_X11/GSWndEGL_WL) that implement the backend to handle native resources
Note: Most backend code is only useful for GSopen1/PS1 mode. GSopen2 only requires
the AttachNativeWindow implementation
Code is based around EGL_EXT_platform extension that allow to select the platform at runtime.
Note: I think the extension was integrated in EGL 1.5
The X11 backend was mostly converted to XCB
The wayland backend is only a placeholder for future code
I don't know if MS windows is/could be supported with EGL_EXT_platform API
Code validated on Mesa. Proprietary drivers aren't yet tested.
Moved a CRC hack to Aggressive that can cause or fix VRAM and RAM spikes.
This way people can switch between each config if they experience problems with either.
Varies on userconfig , game version and maybe hardware.
Added missing CRC game version for GT4 pal.
Note: The issue might be the same on GT3 and GTConcept , the code might
need to be removed for those games as well.
Hack was used to remove garbage data rectangles from popping up on screen when objects and characters were added to or removed from the world.
This issue is now being handled by OI_DoubleHalfClear in GSRendererHW.cpp, so the hack is no longe necessary and has been removed.
Moves Resident Evil 4 hack to Aggressive level as it is no longer
required to fix any issues, but does offer a decent speed boost.
Moves The Getaway & The Getaway Black Monday CRC hack to Full level, as the issue can be resolved
when using the OpenGL Hardware renderer.
* Windows behavior must be checked
* remove glsl_source.h
v2: fix missing include
Big thanks to Turtleli
v3:
fix indentation in gsdx-res.xml
add dependency in cmake
remove old res/glsl/fxaa.fx symlink
add tfx.cl for OpenCL support on Linux
v4, v5
fix cmake indentation
It is done automatically on Linux. Strings are much
better with this NULL char ;)
All credits go to turtleli
v2: increase resize instead of push_back NULL char
add checkboxes for the 2 "new" hacks
Wrap gs memory & merge postprocessing sprite
add tooltip for OpenGL options
v2: based on turtleli feedback
use gtk_scrolled_window_set_propagate_natural_height on GTK 3.22+
use the nicer GTK_CHECK_VERSION macro
Move GL_ARB_copy_image to optional for OpenGL SW render.
It will allow Ivy Bridge to work with OpenGL SW as it's not required.
Sandy Bridge is not yet tested , would be nice if someone could test.
Clip Control is only used for the HW renderer.
It will help Nvidia DX10 GPU on Windows. Potentially old AMD GPU too.
Unfortunately Ivy bridge still misses texture copy
Note on Linux, you can use the free Mesa driver.
Otherwise, it is time to save money for a future upgrade :)
Adds merge sprite hack to GSDx hacks dialog
And ports merge sprite hack to Direct3D renderers.
Special thanks to my keyboards Ctrl, c and v buttons for all their hard
work in porting this hack.
Ports the "Unscale Point and Line" hack to the Direct3D11 Hardware renderer.
And enables the "Unscale Point and Line" hack for Custom Resolutions with Direct3D11 and OpenGL.
Adds Windows GUI elements of the split texture filtering options.
Bilinear Texture Filtering is moved to the top section of the main GSdx window,
and Trilinear Filtering is moved to Hacks.
Adds Texture Filtering Of Display option to the Shader dialog window Windows UI.
Updates the layouts of the Shader and OSD dialog windows to more closely resemble the Linux GUI.
Reorganizes Hacks dialog window.
Adds UI elements for the Memory Wrapping and HPO v2/Special commits
Adds advanced OpenGL functions "Geometry Shader" and "Image Load Store" to the Windows UI.
Renames "Configure Hacks" to "Advanced Settings and Hacks", to more closely resemble the Linux GUI.