0c0d66809d
PixelShaderGen: Split bbox into seperate variables
...
The Metal shader compiler fails to compile the atomic instructions
when operating on individual components of a vector. Spltting it
into four variables shouldn't make any difference for other
platforms, as they are accessed independently.
2018-11-07 05:41:09 -08:00
56fdcf5f00
VideoCommon: remove unnecessary floor()
...
floatindex is clamped to the range [0, 9]. For non-negative numbers
floor() is equivalent to trunc(). Truncation happens implicitly when
converting to uint, so the floor() is unnecessary.
2018-10-09 00:31:43 +01:00
95c2a92f26
Revert "ShaderGen: Drop broken fragment shader index workaround for Vulkan"
2018-09-01 05:32:56 +02:00
3ad7812b53
ShaderGen: Drop broken fragment shader index workaround for Vulkan
...
AMD appears to have since fixed this in their driver, and it makes
shadergen ever so slightly less messy.
2018-08-28 23:39:47 +10:00
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
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
9a5c2119e5
ShaderCache: Remove unused UID bits before inserting into shader map
2018-05-26 00:09:10 +10:00
40bb9974f2
Reformat all the things!
2018-04-12 21:28:39 +02:00
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
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
a52cc8d52b
PixelShaderGen/UberShaderPixel: Silence -Wmissing-braces warnings
2018-03-23 10:06:27 -04:00
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
340ee8fff8
PixelShaderGen: Implement table-based fog range as in software renderer
2018-02-15 22:19:21 +10:00
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
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
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
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
b573319f8f
D3D: Fix shader compile error with logicop and alpha test enabled
2017-09-07 11:48:01 +10:00
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
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
852e30bb8c
Ubershaders: Fix 6-bit color truncation not being applied
2017-08-01 00:01:09 +10:00
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
e968c191ff
Ubershaders: Support per-pixel lighting
2017-07-30 17:43:59 +10:00
e17efb1d8d
ShaderGen: Use consistent variable names for texture coordinates
2017-07-30 17:43:59 +10:00
81b4ed2a81
Vulkan: Uber shader support
2017-07-30 17:43:59 +10:00
7d78cf0f6f
ShaderGen: Implement pixel ubershaders
2017-07-30 17:43:59 +10:00
07591e7d5c
PixelShaderGen: Move header generation to seperate function
2017-07-30 17:43:59 +10:00
479abde9f4
BPMemory: Convert a number of unions to BitFields
2017-07-30 17:43:59 +10:00
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
82c27182a8
ShaderGen: Remove host state from shader uids
2017-07-20 17:46:59 +10:00
8476d0271d
PixelShaderGen: Add missing inputs.
...
This fixes a linkage warning in D3D because of mismatched inputs.
2017-07-05 22:43:39 +02:00
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
134317e07f
videoconfig: add BBoxPreferStencilImplementation
...
@JMC47 requested this to be able to do performance comparisons.
2017-03-15 17:41:33 -07:00
de940a5fd6
VideoConfig: add bSupportsFragmentStoresAndAtomics
2017-03-15 17:20:47 -07:00
8a72e84ece
VideoCommon: remove unnecessary trunc()
2017-03-05 01:53:54 +00:00
273ace7bb7
LightingShaderGen: Remove unnecessary includes
2017-02-01 01:06:00 -05:00
41b0c74e30
VideoCommon: Make dst_alpha state implicit.
2017-01-04 20:02:31 +01:00
5aaa5141ed
PixelShaderGen: Fix incorrect indexing of tevLerpBias
...
Fixes the white box in the fortune street fifolog.
2016-12-13 00:03:25 +10:00
2058a49465
PixelShaderGen: Remove unused global variable.
2016-10-31 15:02:08 +01:00
086f839435
DriverDetails: Make the bug identifiers humanly readable.
2016-10-31 15:02:08 +01:00
d0e60492cf
PixelShaderGen: Don't use a global variable.
2016-10-30 00:48:02 +02:00
ce9f717045
OGL: Fall back to the old dual-source blending behaviour.
2016-10-29 18:00:22 +02:00
122ce96ed1
PixelShaderGen: Don't use dual source blend if unsupported.
2016-10-24 00:11:55 +02:00
5c406b5ef0
PixelShaderGen: Fix implicit type conversions.
2016-10-23 19:54:28 +02:00
93109df654
PixelShaderGen: Use dual source blending to do 8-bit blending.
2016-10-10 15:34:55 +02:00
d61ae5a88a
PixelShaderGen: Only set dither uid bit if actually used.
2016-10-10 14:32:21 +02:00
365e88e311
VideoConfig: Add an option to force RGB8 EFB format.
2016-10-10 14:31:53 +02:00
31a4ee7bfc
PixelShaderGen: Always truncate the alpha channel to 6-bit.
2016-10-10 14:30:14 +02:00
9bc466a443
PixelShaderGen: Add support for dithering.
2016-10-10 14:30:14 +02:00
b958457e51
PixelShaderGen: Add support for RGBA6 EFB format truncation.
2016-10-10 14:27:30 +02:00