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.
Adds GS Memory Wrapping hack to Windows. Enabling the hack will fix cut-off cutscenes in Wallace & Gromit: The Curse of the Were-Rabbit and Thrillville.
Ace Combat 4 CRC hack removes clouds for a good speed boost, which removes both 3D clouds(invisible with Hardware renderers, but cause slowdown) and 2D background clouds.
Removes blur from player airplane.
This hack also removes rockets, shows explosions(invisible without CRC hack) as garbage data, causes flickering issues with the HUD, and in some (night) missions removes the HUD altogether.
The CRC hack has been moved to the aggressive level.
Aggressive is misspeled several times in the file, this has been adressed.
Changes to the dependencies of the generated logo files did not trigger
a rebuild of the files. Use add_custom_command instead of
execute_process so build dependencies can be specified.
Also prevent the generated files from polluting the source directory.
The pixdata format loader has been removed from recent versions of
gdk2-pixbuf, so the logo doesn't load. Avoid preprocessing the data and
leave the logo as an embedded bitmap file.
Allow the output circuit saturation to take place at cases where one of the output circuit is enabled with frame mode rendering, I'm not sure it would be safe to allow saturations when both of the output circuits are enabled with frame mode rendering. Unlike field mode rendering, frame mode doesn't use identical rectangles at same co-ordinates for output in two alternating fields and potentially they could use a much bigger output size when both of the output circuits are enabled and are separated without any intersection. So let's limit the saturation to only the cases where we detect a single output circuit for frame mode rendering.
Fixes a regression in Devil May Cry 3 and Sky Gunner.
If a user switches renderer they also have to remember to change the CRC
hack level for the best user experience with the selected renderer.
This commit adds a new automatic CRC level that autoselects the
recommended CRC level for the selected renderer, so that a user doesn't
have to make the change manually.
coauthor: turtleli
If OpenGL software is the saved ini renderer and F9 is pressed to toggle
to the hardware renderer, depth emulation will be disabled. This fixes
that issue.
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.
-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.
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
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
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.
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
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 :)