summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexManagerBase.cpp
AgeCommit message (Collapse)Author
2018-03-26Implement "Skip" ubershader modeStenzek
Skip ubershader mode works the same as hybrid ubershaders in that the shaders are compiled asynchronously. However, instead of using the ubershader to draw the object, it skips it entirely until the specialized shader is made available. This mode will likely result in broken effects where a game creates an EFB copy, and does not redraw it every frame. Therefore, it is not a recommended option, however, it may result in better performance on low-end systems.
2018-03-10VideoConfig: Collapse ubershader configuration fields to a single valueStenzek
2018-03-10Renderer: Remove now-redundant Set{Rasterization,Depth,Blending}StateStenzek
2018-03-10Move shader caches to VideoCommonStenzek
2018-01-17VideoCommon: Apply custom texture scale for arbitrary mipmaps.Markus Wick
We want to get the same mipmap level. And if the IR and the custom texture upscaling fits, we don't need to modify the LOD bias.
2017-11-19VideoCommon: Resolve -Wmissing-brace warningsLioncash
Resolves around 5 -Wmissing-brace warnings on macOS.
2017-11-03Fix incorrect handling of auto IRJosJuice
Some lines of code in Dolphin just plainly grabbed the value of g_ActiveConfig.iEFBScale, which resulted in Auto being treated as 0x rather than the actual automatically selected scale.
2017-10-27Fixed fog, lava, water in Mario Galaxy (and possibly other games) in higher ↵Tommaso Checchi
IRs by detecting & fixing the mipmaps that aren't just used for downscaling, but are handmade to create a gradient.
2017-09-11VideoBackends: Move SamplerState to commonStenzek
2017-09-11Renderer: Move cull mode to a rasterization state objectStenzek
Also moves logic for primitive handling to VideoCommon.
2017-07-30XFMemory: Convert several registers to bitfieldsStenzek
2017-07-30BPMemory: Convert a number of unions to BitFieldsScott Mansell
2017-07-10Implement minimal emulation of TMEM cachingmimimi085181
This is a remake of https://github.com/dolphin-emu/dolphin/pull/3749 Full credit goes to phire. Old message: "If none of the texture registers have changed and TMEM hasn't been invalidated or changed in other ways, we can blindly reuse the old texture cache entries without rehashing. Not only does this fix the bloom effect in Spyro: A Hero's Tail (The game abused texture cache) but it will also provide speedups for other games which use the same texture over multiple draw calls, especially when safe texture cache is in use." Changed the pr per phire's instructions to only return the current texture(s) if none of the texture registers were changed. If any texture register was changed, fall back to the default hashing and rebuilding textures from memory.
2017-04-05VideoCommon: rework anamorphic widescreen heuristicMichael Maltese
Some widescreen hacks (see below) properly force anamorphic output, but don't make the last projection in a frame 16:9, so Dolphin doesn't display it correctly. This changes the heuristic code to assume a frame is anamorphic based on the total number of vertex flushes in 4:3 and 16:9 projections that frame. It also adds a bit of "aspect ratio inertia" by making it harder to switch aspect ratios, which takes care of aspect ratio flickering that some games / widescreen hacks would be susceptible with the new logic. I've tested this on SSX Tricky's native anamorphic support, Tom Clancy's Splinter Cell (it stayed in 4:3 the whole time), and on the following widescreen hacks for which the heuristic doesn't currently work: Paper Mario: The Thousand-Year Door (Gecko widescreen code from Nintendont) C202F310 00000003 3DC08042 3DE03FD8 91EEF6D8 4E800020 60000000 00000000 04199598 4E800020 C200F500 00000004 3DE08082 3DC0402B 61CE12A2 91CFA1BC 60000000 387D015C 60000000 00000000 C200F508 00000004 3DE08082 3DC04063 61CEE8D3 91CFA1BC 60000000 7FC3F378 60000000 00000000 The Simpsons: Hit & Run (AR widescreen code from the wiki) 04004600 C002A604 04004604 C09F0014 04004608 FC002040 0400460C 4082000C 04004610 C002A608 04004614 EC630032 04004618 48220508 04041A5C 38600001 04224344 C002A60C 04224B1C 4BDDFAE4 044786B0 3FAAAAAB 04479F28 3FA33333
2017-02-08OpcodeDecoding: Convert #defines into enum constantsLioncash
Gets several constants out of global scope.
2017-01-23RenderBase: Forward declare EFBAccessTypeLioncash
2017-01-04VideoCommon: Make dst_alpha state implicit.degasus
2016-12-09TextureCacheBase: Eliminate static stateLioncash
2016-09-17VertexLoaderJit: Fix out-of-bounds access for zfreeze.degasus
This fixes a GCC6.1 warning.
2016-08-22VertexManager: Correct variable naming schemeLioncash
Altered to indicate regular class members
2016-08-21VertexManagerBase: Get rid of static behaviorLioncash
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-02-15D3D12: Additions to VideoCommon to support D3D12 backend.hdcmeta
2016-01-17VideoCommon: Header cleanupLioncash
Also remedies places where the video backends and core rely on things being indirectly included.
2016-01-02VideoBackend: Get rid of a boolean globalLioncash
Also gets rid of global headers
2015-12-20VideoBackends: Simplify initialization and deinitialization of resourcesLioncash
Approximately three or four times now, the issue of pointers being in an inconsistent state been an issue in the video backend renderers with regards to tripping up other developers. Global (ugh) resources are put into a unique_ptr and will always have a well-defined state of being - null or not null
2015-11-06VideoCommon: rename TextureCache to TextureCacheBaseTillmann Karras
2015-11-02VertexManagerBase: fix indentationTillmann Karras
2015-11-02VideoCommon: VertexManager -> VertexManagerBaseTillmann Karras
It may be a bit weird to see calls to static functions in VertexManagerBase now, but at least it's easier to see what's going on.
2015-09-09VideoCommon: Drop "Disable destAlpha" hackdegasus
This option has no use any more, neither performance nor driver workaround.
2015-06-07zfreeze: cache vertex positionsTillmann Karras
Suggested by degasus.
2015-05-29zfreeze: fix 2-component positionsTillmann Karras
2015-05-25Add missing license headersTillmann Karras
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-22VideoCommon: use a new async event system for efb accessdegasus
2015-02-19Decode EFB copies used as paletted textures.magumagu
A number of games make an EFB copy in I4/I8 format, then use it as a texture in C4/C8 format. Detect when this happens, and decode the copy on the GPU using the specified palette. This has a few advantages: it allows using EFB2Tex for a few more games, it, it preserves the resolution of scaled EFB copies, and it's probably a bit faster. D3D only at the moment, but porting to OpenGL should be straightforward..
2015-01-25Fix a buffer underrun in CalculateZSlope.Scott Mansell
2015-01-24Coding style cleanup from the zfreeze mergeLioncash
2015-01-24Stop doing nastly shit to OpenGL stream buffers.Scott Mansell
Instead we keep the loaded vertices in CPU memory.
2015-01-24Move Zfreeze code out individual backends into videoCommonScott Mansell
Also: * Implement support for per-vertex PosMatrixIndex * Only update zslope constant once when zfreeze is activated. * Added a bunch of comments.
2015-01-23A few small cleanups based on code review.Scott Mansell
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-23Reduce number of divisions in screenspace transform.Scott Mansell
This is closer to what the hardware does anyway.
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-23Fix various issues with zfreeze implemntation.Scott Mansell
Results are still not correct, but things are getting closer. * Don't cull CULLALL primitives so early so they can be used as reference planes. * Convert CalculateZSlope to screenspace coordinates. * Convert Pixelshader to screenspace coordinates (instead of worldspace xy coordinates, which is totally wrong) * Divide depth by 2^24 instead of clamping to 0.0-1.0 as was done before. Progress: * Rouge Squadron 2/3 appear correct in game (videos in rs2 save file selection are missing) * Shadows draw 100% correctly in NHL 2003. * Mario golf menu renders correctly. * NFS: HP2, shadows sometimes render on top of car or below the road. * Mario Tennis, courts and shadows render correctly, but at wrong depth * Blood Omen 2, doesn't work.
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-11TextureCache: inline arguments into texture cachedegasus
2014-12-20GeometryShaderManager: Set stereo parameters in a SetConstants() call.Jules Blok
Doing it in SetProjectionChanged() is too early because the projection type is not set yet.
2014-12-18GeometryShaderManager: Set the constants within the callbacks.Jules Blok
2014-12-14VideoCommon: Add a separate constants buffer for the geometry shader.Jules Blok