The idea is to adjust the alpha destination for more
accurate hw blending which will work on all renderers.
Old behavior has Ad in range within 0-1 whereas for blending 0-2 is needed.
copy rt -> adjust the alpha -> copy back the adjusted alpha-> restore old alpha after blending is done
Since we can't do Cd*(Alpha + 1) - Cs*Alpha in hw blend what we can do is adjust the Cs value that will be subtracted,
this way we can get a better result in hw blend. Result is still wrong but less wrong than before.
Fixes Colin McRae Rally 2005 on Vulkan.
Possible others as well on basic blend with barriers or Medium blend with barriers disabled.
Bump shader cache version.
When both rt min and max are equal then we know what Ad value is,
if so use Af bit instead and set AFIX value from rt alpha value that we know.
On OpenGL when BLEND C == 1 but reading the rt is disabled, set the value to 0 instead
of reading an undefined value.
Feature level 11.0 GPUs were first released in 2009, almost 14 years ago
now. Older GPUs have not had drivers released in a long time, and are
known to be buggy.
None of us have hardware this old, so it's impossible for us to support
it.
GS/DX11: Don't throw bad_alloc on surface creation fail
GS: Link device and host display construction/destruction
FullscreenUI: Replace HostDisplayTexture with GSTexture
GS: Purge HostDisplayTexture
GS: Move everything in HostDisplay to GSDevice
GS: Move ImGui rendering to GSDevice
GS: Get rid of reset/store API state
- Don't declare texture if it's not read from. Stops Vulkan validation
layers whinging.
- Get rid of OpenGL common_header.glsl, and use name linking instead of
leftovers from separate shader objects.
GS/HW: Only use temporary source for recursive draw
.. and don't insert it into the page map.
GS/HW: Lookup page list for depth sources
GS/HW: Avoid target copies by using shader sampling
GS/HW: Make texture cache a global pointer
GS/HW: Remove GetID() from GSTexture
It only made sense for OpenGL, was always zero in Vulkan.
GS/HW: Rewrite texture sampling hazard detection
Also avoid redundant channel shuffle setup.
GS/HW: Turn Haunting Ground CRC into an OI fix
It's silly to draw to the whole double-sized render target, but discard
half the pixels.
Also centralizes the constant setup, get rid of the duplication.
Change texture scale from vector to scalar
- Independent X and Y scaling is long gone.
- Also separate size and scale in TC lookup
Move clear value for texture to base class
Align heights to page size
- Since FRAME and Z are in page units, we can't have two targets
- overlapping within the same page.
- Stops some small resizes too.
- Test cases: Genji and Spider-Man 2 shadows.
Don't modify target TEX0 on shuffle/clear
Move upscale multiplier to uniform
Make P8 conversion page-aware
Fix incorrect depth preload shader
Improve HLE of texture shuffles
When a texture shuffle is split into two half-screen draws, we skip the
first, and draw the whole thing in the second, taking care of when both
the texture and framebuffer are offset.