Stenzek
bae1168fe9
PixelShaderGen: Ensure all components of ocol1 are initialized
...
This was causing a warning in the shader compiler, as the rgb components
were not initialized. Which shouldn't be an issue, as the rgb is not
used in the blend equation, only the alpha. However, the lack of
initialization causes crashes in Intel's D3D shader compiler, so we'll
play nice and initialize all the channels.
2018-08-24 23:53:00 +10:00
Stenzek
57976c947b
ShaderGen: Don't emit integer outputs when logic op is unsupported
...
This may have been causing issues for D3D10 hardware, where logic op was
not supported.
2018-05-26 00:09:29 +10:00
Stenzek
9a5c2119e5
ShaderCache: Remove unused UID bits before inserting into shader map
2018-05-26 00:09:10 +10:00
spycrab
40bb9974f2
Reformat all the things!
2018-04-12 21:28:39 +02:00
Lioncash
f10198500e
PixelShaderGen: Invert conditional in WriteColor()
...
Puts the true condition body first instead of the false one for better
reading.
2018-03-27 18:53:17 -04:00
Lioncash
c9e0045881
PixelShaderGen: Remove dead code in WriteColor()
...
The outer conditional executes only whenever destination alpha is used.
2018-03-27 18:46:25 -04:00
Lioncash
a52cc8d52b
PixelShaderGen/UberShaderPixel: Silence -Wmissing-braces warnings
2018-03-23 10:06:27 -04:00
Lioncash
50a476c371
Assert: Uppercase assertion macros
...
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
2018-03-14 22:03:12 -04:00
Stenzek
340ee8fff8
PixelShaderGen: Implement table-based fog range as in software renderer
2018-02-15 22:19:21 +10:00
Jonathan Hamilton
ceb1f8c8cb
Enable shader_framebuffer_fetch blend path on ubershaders
...
Tested on a linux Intel Skylake integrated graphics with
blend_func_extended force-disabled, as it's the only platform I have
that doesn't crash with ubershaders and supports fb_fetch
2018-01-05 09:56:46 -08:00
Jonathan Hamilton
8d68adcaf3
Workaround qualcomm driver bug
...
It seems it doesn't like modifying inout variables in place - so instead
use a temporary for ocol0/ocol1 and only write them once at the end of
the shader
2018-01-05 09:56:46 -08:00
Jonathan Hamilton
29a9ed043b
Implement dual-source blending in shader
...
For some GLES drivers that don't support dual-source blending, but do
support GL_EXT_shader_framebuffer_fetch, this might be useful.
2018-01-05 09:56:46 -08:00
Stenzek
efb9759862
LightingShaderGen: Always calculate lighting for both color channels
...
Cel-damage uses the color from the lighting stage of the vertex pipeline
as texture coordinates, but sets numColorChans to zero.
We now calculate the colors in all cases, but override the color before
writing it from the vertex shader if numColorChans is set to a lower value.
2017-11-22 01:52:18 +10:00
Stenzek
b573319f8f
D3D: Fix shader compile error with logicop and alpha test enabled
2017-09-07 11:48:01 +10:00
Stenzek
84f8ebd95f
VideoBackends: Clear uid bits that are unused for the current backend
...
Currently, this is only the logic op bit, but this will be extended to
the framebuffer fetch/blend modes. In the future, when/if we move to
VideoCommon pipelines, this state will be part of the pipeline UID
anyway, and we can mask it out in the backend by using a two-level map,
so the shaders/programs are shared.
2017-09-05 23:49:42 +10:00
Stenzek
0622979d3b
ShaderGen: Support writing integer colors when logic op is enabled
...
This is required for D3D to support logic op.
2017-09-03 16:33:25 +10:00
Stenzek
852e30bb8c
Ubershaders: Fix 6-bit color truncation not being applied
2017-08-01 00:01:09 +10:00
Stenzek
d54ca2a16a
PixelShaderGen: Don't include host early z support in UID
...
Disable it at shader generation time instead. This way the UIDs are
sharable.
2017-07-30 17:43:59 +10:00
Stenzek
e968c191ff
Ubershaders: Support per-pixel lighting
2017-07-30 17:43:59 +10:00
Stenzek
e17efb1d8d
ShaderGen: Use consistent variable names for texture coordinates
2017-07-30 17:43:59 +10:00
Stenzek
81b4ed2a81
Vulkan: Uber shader support
2017-07-30 17:43:59 +10:00
Stenzek
7d78cf0f6f
ShaderGen: Implement pixel ubershaders
2017-07-30 17:43:59 +10:00
Stenzek
07591e7d5c
PixelShaderGen: Move header generation to seperate function
2017-07-30 17:43:59 +10:00
Scott Mansell
479abde9f4
BPMemory: Convert a number of unions to BitFields
2017-07-30 17:43:59 +10:00
Stenzek
3ea9d86faa
ShaderGen: Pass host config to shader generation functions
...
Also moves the host config checks to common.
2017-07-20 17:54:33 +10:00
Stenzek
82c27182a8
ShaderGen: Remove host state from shader uids
2017-07-20 17:46:59 +10:00
Jules Blok
8476d0271d
PixelShaderGen: Add missing inputs.
...
This fixes a linkage warning in D3D because of mismatched inputs.
2017-07-05 22:43:39 +02:00
Jonathan Hamilton
35caf48d7d
Add a workaround for a PowerVR glsl compiler bug
...
It seems it doesn't like negating arguments for bitops, so suff like
"var <<= (-othervar);"
fails to compile
2017-05-03 19:33:56 -07:00
Michael Maltese
134317e07f
videoconfig: add BBoxPreferStencilImplementation
...
@JMC47 requested this to be able to do performance comparisons.
2017-03-15 17:41:33 -07:00
Michael Maltese
de940a5fd6
VideoConfig: add bSupportsFragmentStoresAndAtomics
2017-03-15 17:20:47 -07:00
Tillmann Karras
8a72e84ece
VideoCommon: remove unnecessary trunc()
2017-03-05 01:53:54 +00:00
Lioncash
273ace7bb7
LightingShaderGen: Remove unnecessary includes
2017-02-01 01:06:00 -05:00
degasus
41b0c74e30
VideoCommon: Make dst_alpha state implicit.
2017-01-04 20:02:31 +01:00
Stenzek
5aaa5141ed
PixelShaderGen: Fix incorrect indexing of tevLerpBias
...
Fixes the white box in the fortune street fifolog.
2016-12-13 00:03:25 +10:00
Jules Blok
2058a49465
PixelShaderGen: Remove unused global variable.
2016-10-31 15:02:08 +01:00
Jules Blok
086f839435
DriverDetails: Make the bug identifiers humanly readable.
2016-10-31 15:02:08 +01:00
Jules Blok
d0e60492cf
PixelShaderGen: Don't use a global variable.
2016-10-30 00:48:02 +02:00
Jules Blok
ce9f717045
OGL: Fall back to the old dual-source blending behaviour.
2016-10-29 18:00:22 +02:00
Jules Blok
122ce96ed1
PixelShaderGen: Don't use dual source blend if unsupported.
2016-10-24 00:11:55 +02:00
Jules Blok
5c406b5ef0
PixelShaderGen: Fix implicit type conversions.
2016-10-23 19:54:28 +02:00
Jules Blok
93109df654
PixelShaderGen: Use dual source blending to do 8-bit blending.
2016-10-10 15:34:55 +02:00
Jules Blok
d61ae5a88a
PixelShaderGen: Only set dither uid bit if actually used.
2016-10-10 14:32:21 +02:00
Jules Blok
365e88e311
VideoConfig: Add an option to force RGB8 EFB format.
2016-10-10 14:31:53 +02:00
Jules Blok
31a4ee7bfc
PixelShaderGen: Always truncate the alpha channel to 6-bit.
2016-10-10 14:30:14 +02:00
Jules Blok
9bc466a443
PixelShaderGen: Add support for dithering.
2016-10-10 14:30:14 +02:00
Jules Blok
b958457e51
PixelShaderGen: Add support for RGBA6 EFB format truncation.
2016-10-10 14:27:30 +02:00
degasus
6d2827ff6b
PixelShader: Drop redundant warning.
...
This warning was raised both on UID generation and on shader generation.
2016-10-04 10:13:46 +02:00
degasus
083be0832f
LightingShader: Drop xfmem usage.
...
Our shaders must only depend on the UID, not on any global state.
2016-10-04 10:13:46 +02:00
degasus
829fc8f0ad
PixelShaderGen: Drop dstAlphaMode constant in shader generation.
...
It is already stored within the UID.
2016-10-04 10:13:46 +02:00
Stenzek
bac8c2d441
Vulkan: Work around indexed fragment output bug on AMD drivers
2016-10-01 02:40:02 +10:00