summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexShaderGen.cpp
AgeCommit message (Collapse)Author
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-17Merge pull request #3684 from Sonicadvance1/fix_vertexshadergen_assertsPierre Bourdon
Fix a few asserts in the VertexShaderGen.
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-29Remove two more asserts in VertexShaderGen.Ryan Houdek
As confirmed by a hardware test if we are using the texgen type of COLOR_STRGBC0/STRGBC1 then it sets the texture coordinates to those values regardless of what the input form or source row is. Thanks to Ornox for testing again
2016-02-29Confirm with hardware test that the high bit of the input form is ignored.Ryan Houdek
Thanks to Ornox for testing
2016-02-29Fix a few asserts in the VertexShaderGen.Ryan Houdek
Removes a couple asserts in the vertex shader gen when dealing with the input form. Typically input form ABC1 is used, so it'll pull in the first three elements and always set the fourth to 1.0 The other input form available is AB11, which sets the last two components to 1.0 (Theoretically). No titles actually use this input form that we know of except for Project M, but it can have some fairly drastic visual differences. Confirmed correct by hardware test
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-22Merge pull request #3578 from Armada651/forced-slow-depthJules Blok
VideoConfig: Replace FastDepthCalc by ForcedSlowDepth.
2016-02-20VertexShaderGen: turn pseudo-mod into a simple andTillmann Karras
The type of posmtx has changed over time: half -> float -> int. I assume this is supposed to be a modulo.
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-17VideoCommon: Header cleanupLioncash
Also remedies places where the video backends and core rely on things being indirectly included.
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-28Merge pull request #3400 from lioncash/shadergenMarkus Wick
ShaderGen: Get rid of static buffers
2015-12-26ShaderGenerators: Remove unnecessary inline keywordsLioncash
Static by itself is sufficient
2015-12-26ShaderGeneration: Get rid of static buffersLioncash
2015-12-27Revert "ShaderGen: Toggle value of uninitialized color."Scott Mansell
2015-12-06ShaderGen: Toggle value of uninitialized color.degasus
SMS seems to need 0, no regressions either.
2015-11-03VideoCommon: return code/uid from shader gensTillmann Karras
rather than passing in non-const references
2015-11-01VideoCommon: flush vertex manager if components changeTillmann Karras
2015-10-29ShaderCaches: remove unneeded typedefsTillmann Karras
2015-10-23VertexShader: Remove 'special case' that has been disabled forever.Scott Mansell
2015-10-16VideoCommon: fix variable types fed to Write() functionIlia Mirkin
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-07-08Disables assert messages that seem to be invalid.Justin Chadwick
2015-06-24D3D: Cosmetics.Jules Blok
Merge two cases which should've already been merged.
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-25Set copyright year to when a file was createdTillmann Karras
2015-05-25Update license headers to GPLv2+Tillmann Karras
2015-05-22OGL: Depth range inversion.Jules Blok
2015-05-22VertexShaderGen: Use correct depth output when glClipControl is supported.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-25Formatting/Whitespace CleanupStevoisiak
Various fixes to formatting and whitespace
2015-02-11ShaderGen: Fix pixel offset correctiondegasus
We want to move the vertex by 1/12 pixel, but the old code did miss the perspective division. So by multiplying with pos.w, the position is moved correctly after the perspective division.
2015-01-21Lighting Attenuation FixesNanoByte011
2015-01-03Move worldpos into it's own varying.Scott Mansell
Previously it was packed into spare slots in clippos.xy and normal.w, but it's ugly and more importantly it's causing bugs. This was discovered during the debugging of a zfreeze branch, which expected clippos.xy to be xy position coordinates in clipspace (as the name suggested). Turns out the stereoscopy shader had also run into this trap, modifying clippos.x (introducing errors with per-pixel lighting). This commit has been moved outside of the zfreeze PR for fast merging.
2014-12-28PixelShaderGen: Don't assign to input variables.Jules Blok
2014-12-28VertexShaderGen: Don't read from output variables.Jules Blok
2014-12-28DriverDetails: Remove Intel Structs bug since it doesn't affect us anymore.Jules Blok
2014-12-28VideoCommon: Don't pass structs between shaders, use the interface blocks ↵Jules Blok
instead.
2014-12-19VideoCommon: Don't specify the redundant in/out qualifier if ↵Jules Blok
GL_ARB_shading_language_420pack is supported. Some driver developers interpreted "can" as "must" in the OpenGL specs. (I'm looking at you AMD)
2014-12-19VideoCommon: Add in/out qualifiers to centroid storage qualifier.Jules Blok
Fixes shaders for GPUs that don't support GL_ARB_shading_language_420pack.
2014-12-18VideoCommon: Don't pass structs between shader stages when geometry shaders ↵Jules Blok
are unsupported.
2014-12-18VideoCommon: Only use interface blocks when geometry shaders are supported.Jules Blok
2014-12-18VideoCommon: Pass interface blocks between shader stages to resolve naming ↵Jules Blok
conflicts.
2014-12-15VideoCommon: Assume we always use a geometry shader, not just for stereoscopy.Jules Blok
2014-12-14D3D: Add geometry shader stereoscopy support.Jules Blok
2014-12-05Common: Remove locale based functions from CommonFuncs.Lioncash
Since %f isn't used anymore in the shader generators, these can go.
2014-11-29Renamed DEPTHPARAMS to PIXELCENTERCORRECTIONYuriy O'Donnell
This shader constant was previously used for depth remapping in D3D and for pixel center correction. Now it only serves one purpose and the new name makes it clear.