summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderGen.cpp
AgeCommit message (Collapse)Author
2019-04-20PixelShaderGen: Don't emit bounding box shader code for old UIDs when disabledStenzek
If bounding box is enabled when a UID cache is created, then later disabled, we shouldn't emit the bounding box portion of the shader. Fixes pipeline creation errors on D3D12 backend for this case.
2019-04-03PixelShaderGen: Fix bounding box coordinates being offset by 1 pixelTechjar
2019-03-29PixelShaderGen: Use subgroup reduction operations for bounding boxStenzek
2019-03-25VideoBackends: Scale bounding box rectangle in the pixel shaderStenzek
2019-02-19Move most backend functionality to VideoCommonStenzek
2019-01-24ShaderGen: Don't use interface blocks on Vulkan without GSStenzek
Doing so causes the Adreno driver to choke and spew errors about too many output locations/components, when clearly we're under the limit.
2019-01-23ShaderGen: Omit some unused varyings when possibleStenzek
Removes the clipPos varying unless slow-depth is used, and the clipDistance varyings if geometry shaders are not used.
2018-11-07PixelShaderGen: Split bbox into seperate variablesStenzek
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-10-09VideoCommon: remove unnecessary floor()Tillmann Karras
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-09-01Revert "ShaderGen: Drop broken fragment shader index workaround for Vulkan"Pierre Bourdon
2018-08-28ShaderGen: Drop broken fragment shader index workaround for VulkanStenzek
AMD appears to have since fixed this in their driver, and it makes shadergen ever so slightly less messy.
2018-08-24PixelShaderGen: Ensure all components of ocol1 are initializedStenzek
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-05-26ShaderGen: Don't emit integer outputs when logic op is unsupportedStenzek
This may have been causing issues for D3D10 hardware, where logic op was not supported.
2018-05-26ShaderCache: Remove unused UID bits before inserting into shader mapStenzek
2018-04-12Reformat all the things!spycrab
2018-03-27PixelShaderGen: Invert conditional in WriteColor()Lioncash
Puts the true condition body first instead of the false one for better reading.
2018-03-27PixelShaderGen: Remove dead code in WriteColor()Lioncash
The outer conditional executes only whenever destination alpha is used.
2018-03-23PixelShaderGen/UberShaderPixel: Silence -Wmissing-braces warningsLioncash
2018-03-14Assert: Uppercase assertion macrosLioncash
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-02-15PixelShaderGen: Implement table-based fog range as in software rendererStenzek
2018-01-05Enable shader_framebuffer_fetch blend path on ubershadersJonathan Hamilton
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-05Workaround qualcomm driver bugJonathan Hamilton
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-05Implement dual-source blending in shaderJonathan Hamilton
For some GLES drivers that don't support dual-source blending, but do support GL_EXT_shader_framebuffer_fetch, this might be useful.
2017-11-22LightingShaderGen: Always calculate lighting for both color channelsStenzek
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-09-07D3D: Fix shader compile error with logicop and alpha test enabledStenzek
2017-09-05VideoBackends: Clear uid bits that are unused for the current backendStenzek
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-03ShaderGen: Support writing integer colors when logic op is enabledStenzek
This is required for D3D to support logic op.
2017-08-01Ubershaders: Fix 6-bit color truncation not being appliedStenzek
2017-07-30PixelShaderGen: Don't include host early z support in UIDStenzek
Disable it at shader generation time instead. This way the UIDs are sharable.
2017-07-30Ubershaders: Support per-pixel lightingStenzek
2017-07-30ShaderGen: Use consistent variable names for texture coordinatesStenzek
2017-07-30Vulkan: Uber shader supportStenzek
2017-07-30ShaderGen: Implement pixel ubershadersStenzek
2017-07-30PixelShaderGen: Move header generation to seperate functionStenzek
2017-07-30BPMemory: Convert a number of unions to BitFieldsScott Mansell
2017-07-20ShaderGen: Pass host config to shader generation functionsStenzek
Also moves the host config checks to common.
2017-07-20ShaderGen: Remove host state from shader uidsStenzek
2017-07-05PixelShaderGen: Add missing inputs.Jules Blok
This fixes a linkage warning in D3D because of mismatched inputs.
2017-05-03Add a workaround for a PowerVR glsl compiler bugJonathan Hamilton
It seems it doesn't like negating arguments for bitops, so suff like "var <<= (-othervar);" fails to compile
2017-03-15videoconfig: add BBoxPreferStencilImplementationMichael Maltese
@JMC47 requested this to be able to do performance comparisons.
2017-03-15VideoConfig: add bSupportsFragmentStoresAndAtomicsMichael Maltese
2017-03-05VideoCommon: remove unnecessary trunc()Tillmann Karras
2017-02-01LightingShaderGen: Remove unnecessary includesLioncash
2017-01-04VideoCommon: Make dst_alpha state implicit.degasus
2016-12-13PixelShaderGen: Fix incorrect indexing of tevLerpBiasStenzek
Fixes the white box in the fortune street fifolog.
2016-10-31PixelShaderGen: Remove unused global variable.Jules Blok
2016-10-31DriverDetails: Make the bug identifiers humanly readable.Jules Blok
2016-10-30PixelShaderGen: Don't use a global variable.Jules Blok
2016-10-29OGL: Fall back to the old dual-source blending behaviour.Jules Blok
2016-10-24PixelShaderGen: Don't use dual source blend if unsupported.Jules Blok