summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderGen.cpp
AgeCommit message (Collapse)Author
2016-04-23VideoCommon: Simplify indirect texture lookup code slightlyJeffrey Pfau
2016-04-23Revert "VideoBackend: Remove extraneous shifts from indirect texture lookups"Jeffrey Pfau
This reverts commit 1f1b127b69e47728593e8174d4ed8883622792a5.
2016-04-10PixelShaderGen: Fixes implicit type conversion or PR #3772.degasus
This regression did only happen on OpenGL ES.
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-03-30ShaderGen: Only specify storage qualifier in interface block when neededStenzek
Drivers that don't support GL_ARB_shading_language_420pack require that the storage qualifier be specified even when inside an interface block. AMD's driver throws a compile error when "centroid in/out" is used within an interface block. Our previous behavior was to include the storage qualifier regardless, but this wasn't working on AMD, therefore we should check for the presence of the extension and include based on this, instead.
2016-03-26Merge pull request #3719 from Sonicadvance1/workaround_osx_video_driversPierre Bourdon
Workaround OS X video driver bug #24983074
2016-03-09Workaround OS X video driver bug #24983074Ryan Houdek
OS X's shader compiler has a bug with interface blocks where interface block members don't properly inherit the layout qualifier from the interface block. Work around this limitation by explicitly stating the layout qualifier on both the interface block and every single member inside of that block.
2016-02-29Revert "Merge pull request #3578 from Armada651/forced-slow-depth"Jules Blok
This reverts commit e2a1a085b6a9f36b23128872de85da727d231882, reversing changes made to 2aea549eef85ba165672c8355d0e90781d805efd.
2016-02-08VideoConfig: Replace FastDepthCalc by ForcedSlowDepth.Jules Blok
Fast depth is now more accurate than slow depth and should always be used. The option will be kept in a different form as it is still used as a hack to fix some games. Also, the slow depth code path will still be relied upon by cards that don't support GL_ARB_clip_control.
2016-01-25VideoBackend: Remove extraneous shifts from indirect texture lookupsJeffrey Pfau
2016-01-18Merge pull request #3523 from lioncash/videoPierre Bourdon
VideoCommon: Header cleanup
2016-01-17VideoCommon: Header cleanupLioncash
Also remedies places where the video backends and core rely on things being indirectly included.
2016-01-15PixelShaderGen: Use bitwise AND for wrapping indirect texture coordinatesStenzek
(x % y) is not defined in GLSL when sign(x) != sign(y). This also has the added benefit of behaving the same as sampler wrapping modes, in regards to negative inputs.
2016-01-02ShaderGen: Remove virtual methods from ShaderGeneratorInterface, move string ↵Stenzek
buffer to ShaderCode This fixes the crashes occuring at startup with a non-empty shader cache. Because LinearDiskCache reads/writes to the storage of ShaderUid, ShaderUid must be trivially copyable. Additionally, adds a static assert to LinearDiskCache to ensure this doesn't happen in the future. The initialization of ShaderUid data has been moved to the code generation functions, so the above condition holds true.
2015-12-26ShaderGenerators: Remove unnecessary inline keywordsLioncash
Static by itself is sufficient
2015-12-26ShaderGeneration: Get rid of static buffersLioncash
2015-12-15MSAA: Store samples in ini files.degasus
2015-11-30Make cast from int to float explicit in shaderAndrew Wickham
This should fix this panic message I saw when playing Super Mario Strikers: Failed to compile pixel shader [...]: error C7011: implicit cast from "int" to "float"
2015-11-03VideoCommon: return code/uid from shader gensTillmann Karras
rather than passing in non-const references
2015-11-02Fix a few typosSintendo
2015-11-01VideoCommon: flush vertex manager if components changeTillmann Karras
2015-10-29ShaderCaches: remove unneeded typedefsTillmann Karras
2015-10-18Support Conservative Depth as a fallback for EarlyZScott Mansell
Allows Mesa based drivers to support ZCompLoc
2015-10-17PixelShaderGen: silence -Wformat-security warningsTillmann Karras
2015-10-16VideoCommon: fix variable types fed to Write() functionIlia Mirkin
2015-10-12PixelShaderGen: Use arrays of texture samplers.Scott Mansell
2015-09-06VideoBackends: Reimplement SSAA, now for D3D + OGLdegasus
2015-09-04Remove all of our workarounds for Qualcomm devices we don't support anymore.Ryan Houdek
2015-09-01PixelShaderGen: Use spaces instead of tabs for vertical alignmentLioncash
2015-09-01PixelShaderGen: Move defines into the implementation fileLioncash
These aren't used outside of it. This also reduces the amount of things in the global namespace.
2015-09-01BPMemory/XFMemory: Convert defines to enumsLioncash
These actually convey a concrete type, as well as also providing a symbolic constant during debugging.
2015-08-28Fix building with PCH disabled.Rohit Nirmal
2015-08-22Fix the shader overrunning our max shader size.Ryan Houdek
The Star Wars games really push the hardware to its limits, which can cause the shaders that are produced to be 18kb or more. Double our maximum shader size to compensate. Fixes issue #8860
2015-07-20Work around PowerVR's shader compiler.Ryan Houdek
This bug has been reported to IMGTec at https://pvrsupport.imgtec.com/ticket/472 The basic idea of the bug is that if you're doing a bitwise and of a constant value vector with a constant scalar value, this causes PowerVR's shader compiler to fail out with a very non-descriptive message. Working around the issue by making the value a vector that it is being masked by.
2015-06-06VideoBackends: Allow the viewport to use the full depth range.Jules Blok
2015-05-26D3D: Depth range inversion.galop1n
Credits go to Galop1n for designing this technique and to BhaaLseN for cleaning up the commit.
2015-05-25Merge pull request #2274 from degasus/disable_bboxRyan Houdek
Disable bbox
2015-05-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-25VideoCommon: Make BBox emulation optionaldegasus
2015-05-13PixelShaderGen: apply zfreeze before ztexturesdegasus
The zfreeze option freezes the depth plane of the rasterization. So this is done before the TEV stages, where the z-textures are applied.
2015-05-08PixelShaderGen: Clamp zCoord to the depth range.Jules Blok
2015-05-08PixelShaderGen: Use new multiplier everywhere and directly cast to int ↵Jules Blok
instead or rounding.
2015-05-08VideoBackends: Use proper floating point depth precision.Jules Blok
2015-04-23Fix OpenGLES 3.0 on Qualcomm's crappy driver, it can't bitshift sometimes.Dwayne Slater
[fixed lint issues and grammar ~comex]
2015-02-21Merge pull request #2075 from magumagu/titantron-fixMarkus Wick
Partially fix WWE12 titantron videos.
2015-02-21Fix regression with directx when zfreeze=true and ztest=false.Scott Mansell
2015-02-18Partially fix WWE12 titantron videos.magumagu
The obvious question here is, why does it matter if we round or truncate? The key is that GC/Wii does fixed-point interpolation, where PC GPUs do floating-point interpolation. Discarding fractional bits makes the conversion from floating-point to fixed point give more consistent results. I'm not confident this is really the right fix, or that my explanation is completely correct; ideally, we don't want to depend on floating-point interpolation at all.
2015-01-23A few small cleanups based on code review.Scott Mansell
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