summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderManager.cpp
AgeCommit message (Collapse)Author
2021-11-24ConstantManager: Add logic ops to PixelShaderConstantsOatmealDome
2021-11-17VideoCommon: Expose SamplerState to shadersPokechu22
The benefit to exposing this over the raw BP state is that adjustments Dolphin makes, such as LOD biases from arbitrary mipmap detection, will work properly.
2021-11-17VideoCommon: Provide raw texdims to shadersPokechu22
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
2021-05-07UberShaderPixel: always run indirect stage logicPokechu22
Hardware testing has confirmed that fb_addprev and wrapping both run even when the indirect stage is disabled.
2021-05-07Split TevStageIndirect::mid into matrix_index and matrix_idPokechu22
2021-03-06Convert BPMemory to BitField and enum classPokechu22
Additional changes: - For TevStageCombiner's ColorCombiner and AlphaCombiner, op/comparison and scale/compare_mode have been split as there are different meanings and enums if bias is set to compare. (Shift has also been renamed to scale) - In TexMode0, min_filter has been split into min_mip and min_filter. - In TexImage1, image_type is now cache_manually_managed. - The unused bit in GenMode is now exposed. - LPSize's lineaspect is now named adjust_for_aspect_ratio.
2020-11-17VideoCommon: Migrate over to fmtLioncash
Migrates off the printf-based formatting where applicable.
2019-06-01Common/CommonFuncs: Remove now-unneccessary ArraySize functionLioncash
Since C++17, non-member std::size() is present in the standard library which also operates on regular C arrays. Given that, we can just replace usages of ArraySize with that where applicable. In many cases, we can just change the actual C array ArraySize() was called on into a std::array and just use its .size() member function instead. In some other cases, we can collapse the loops they were used in, into a ranged-for loop, eliminating the need for en explicit bounds query.
2019-05-06Reformat repo to clang-format 7.0 rulesTechjar
2019-02-19Move most backend functionality to VideoCommonStenzek
2018-02-15PixelShaderGen: Implement table-based fog range as in software rendererStenzek
2018-02-01BPMemory: Handle fog configuration where both A and C are infinity/NaNStenzek
The console appears to behave against standard IEEE754 specification here, in particular around how NaNs are handled. NaNs appear to have no effect on the result, and are treated the same as positive or negative infinity, based on the sign bit. However, when the result would be NaN (inf - inf, or (-inf) - (-inf)), this results in a completely fogged color, or unfogged color respectively. We handle this by returning a constant zero for the A varaible, and positive or negative infinity for C depending on the sign bits of the A and C registers. This ensures that no NaN value is passed to the GPU in the first place, and that the result of the fog calculation cannot be NaN.
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
2017-08-01Ubershaders: Fix 6-bit color truncation not being appliedStenzek
2017-07-30ShaderGen: Implement pixel ubershadersStenzek
2017-03-04VideoCommon: Move last EFB scale handling to CalculateTargetSizeStenzek
2017-03-04VideoCommon: Eliminate static state in RendererStenzek
2016-12-10ShaderManagers: Use aggregate initialization for some variables.Lioncash
These provide the same semantics, however aggregate initialization doesn't force the structs to be trivially copyable. memset, on the other hand, does.
2016-11-02Core: Remove double newlines at the end of *_LOG messages.Emmanuel Gil Peyrot
2016-08-23PixelShaderManager: Use signed integers for the depth range parameters.Jules Blok
2016-06-26VideoBackends: Merge Initialize and Shutdown functions.degasus
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-04-09PixelShaderGen: Move constant multiplication to constant generation.degasus
No need to do this within the shader per pixel if it can be done once.
2016-01-17VideoCommon: Header cleanupLioncash
Also remedies places where the video backends and core rely on things being indirectly included.
2015-06-06VideoBackends: Allow the viewport to use the full depth range.Jules Blok
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-18VideoBackends: Clamp depth to uint24 range.Jules Blok
2015-03-02TextureCache: load all mipmap levels from custom texturesdegasus
This drops the "feature" to load level 0 from the custom texture and all other levels from the native one if the size matches. But in my opinion, when a custom texture only provide one level, no more should be used at all.
2015-02-28PixelShaderManager: Remove unnecessary casts.Lioncash
EFBToScaledXf and EFBScaledYf return a float, so the cast isn't needed here.
2015-01-23Ensure that ZSlopes save/restore state correctly.Scott Mansell
Had to re-do *ShaderManager so they saved their constant arrays instead of completly rebuilding them on restore state.
2015-01-23Fixes Mario Tennis Gimmick Courts and adds support for FastDepthCalcNanoByte011
- Calculate ZSlope every flush but only set PixelShader Constant on Reset Buffer when zfreeze - Fixed another Pixel Shader bug in D3D that was giving me grief
2015-01-23Make zfreeze use screenspace coordinates independant of IR.Scott Mansell
OpenGL requires the y coordinates to be flipped. Also refactored PixelGen code to remove duplicate code.
2015-01-23Cleanup and refactor of zfreeze portNanoByte011
Based on the feedback from pull request #1767 I have put in most of degasus's suggestions in here now. I think we have a real winner here as moving the code to VertexManagerBase for a function has allowed OGL to utilize zfreeze now :) Correct use of the vertex pointer has also corrected most of the issue found in pull request #1767 that JMC47 stated. Which also for me now has Mario Tennis working with no polygon spikes on the characters anymore! Shadows are still an issue and probably in the other games with shadow problems. Rebel Strike also seems better but random skybox glitches can show up.
2015-01-23Initial port of zfreeze branch (3.5-1729)NanoByte011
Initial port of original zfreeze branch (3.5-1729) by neobrain into most recent build of Dolphin. Makes Rogue Squadron 2 very playable at full speed thanks to recent core speedups made to Dolphin. Works on DirectX Video plugin only for now. Enjoy! and Merry Xmas!!
2015-01-07Fix indentationTillmann Karras
2014-09-21GPU: Only load the relevant color components upon writes to the tev color ↵Tony Wasserka
registers. The other two components need not be valid upon write, hence loading them results in glitches. Fixes issue 6783.
2014-09-08Include CommonTypes.h instead of Common.h.Rohit Nirmal
2014-08-19msvc: resolve all warnings in VideoCommon.Shawn Hoffman
2014-06-19PixelShader: remove the duplicated ppl constantsdegasus
2014-06-19VideoCommon: use the Light struct in XF memorydegasus
2014-05-20PixelShaderManager: Fizzle out fog changes when disabled hereJasper St. Pierre
This lets us remove a use of GetConfig.
2014-05-16Video backends: mass-replace "xfregs" with "xfmem".magumagu
2014-05-16Video backend: merge global var xfmem into xfregs.magumagu
There isn't really any reason to keep them separate.
2014-05-16Video backends: unify xfregs/xfmem structures.magumagu
Removes the duplicate swxfregs global variable/struct from the software backend in favor of the ones from VideoCommon.
2014-04-11VideoBackend: remove unused config vars.magumagu
No point to keeping around variables which are always "true".
2014-03-25BPMemory: Use the new BitField class in two selected structures.Tony Wasserka
2014-03-14ConstantManager: Do not use single-element arrays.Tony Wasserka
2014-03-14PixelShaderGen: Store tex scale as an integer.Tony Wasserka