summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/BPStructs.cpp
AgeCommit message (Collapse)Author
2019-07-24VideoBackendBase: Do save state logic on the GPU threadStenzek
2019-04-21Replace EFBRectangle/TargetRectangle with MathUtil::RectangleStenzek
2019-04-21TextureCache: Simplify XFB reconstructionStenzek
This also better handles in-memory interlaced XFB data placed by the CPU by considering the stride from the VI.
2019-03-31BPStructs: Gracefully handle out-of-range EFB copiesStenzek
Since the copy X and Y coordinates/sizes are 10-bit, the game can configure a copy region up to 1024x1024. Hardware tests have found that the number of bytes written does not depend on the configured stride, instead it is based on the size registers, writing beyond the length of a single row. The data written for the pixels which lie outside the EFB bounds does not wrap around instead returning different colors based on the pixel format of the EFB. This suggests it's not based on coordinates, but instead on memory addresses. The effect of a within-bounds size but out-of-bounds offset (e.g. offset 320,0, size 640,480) are the same. As it would be difficult to emulate the exact behavior of out-of-bounds reads, instead of writing the junk data, we don't write anything to RAM at all for over-sized copies, and clamp to the EFB borders for over-offset copies.
2019-03-09FramebufferManager: Implement deferred EFB cache invalidationStenzek
2018-11-07TextureCache: Implement deferred/batched EFB copiesStenzek
2018-10-07BPStructs: don't warn about busclock/perf regsTillmann Karras
2018-04-29Implement EFB copy filter and gamma in hardware backendsStenzek
Also makes y_scale a dynamic parameter for EFB copies, as it doesn't make sense to keep it as part of the uid, otherwise we're generating redundant shaders.
2018-04-29VideoSoftware: Implement xfb copy filter (Deflickering/Brightness)Scott Mansell
2018-04-12Reformat all the things!spycrab
2018-03-27BPStructs: Remove an unnecessary pointer cast in GetBPRegInfoLioncash
swap32 has an overload that accepts a u8*, performing the same behavior in a well-defined manner.
2018-02-20BPFunctions: Move GX viewport conversion to VideoCommonStenzek
2018-01-06VideoCommon: Apply the yscale as upscaling of the XFB.Markus Wick
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-12-21BPStructs: Use static cast for XFB/EFB copiesiwubcode
2017-12-21Texture Cache Base: Move PAL vertical scaling to be baked into the texture ↵iwubcode
size. This saves on a number of multiplications and fixes an issue where we were multiplying the y-scaling factor by the srcRectangle's height + 1 which was causing a crash in some GC titles
2017-12-02VideoCommon: Fix -Wformat warningsLéo Lam
2017-11-17Video Backends: Remove the right of the xfb region for games where theiwubcode
VI stride does not match the VI width
2017-11-17HybridXFB: Fix lint errorsiwubcode
2017-11-17VideoCommon: Output gamma now comes from the xfb copyiwubcode
2017-11-17Add 'immediate xfb' which reduces xfb latency at the cost of graphical errorsiwubcode
2017-11-17Video Backends: Implement vertical scaling for xfb copies. This fixes theiwubcode
display of PAL games that run in 50hz mode.
2017-11-17FifoPlayer: Generate fake VideoInterface updatesiwubcode
2017-11-17Add support for hybrid XFBiwubcode
2017-09-03RenderBase: Drop SetColorMask and SetLogicOpModeStenzek
These are now incorporated into the blend state for all backends.
2017-08-01Ubershaders: Fix 6-bit color truncation not being appliedStenzek
2017-07-30ShaderGen: Implement pixel ubershadersStenzek
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-18VideoCommon: Drop SetDitherMode()Stenzek
It was a no-op on all backends apart from GL anyhow.
2017-03-10Merge pull request #4935 from Armada651/depth-range-fixMarkus Wick
VideoBackends: Set the maximum range when the depth range is oversized.
2017-03-04VideoCommon: Eliminate static state in RendererStenzek
2017-02-26VideoBackends: Use vertex shader depth range if ztexture is used.Jules Blok
2017-01-23RenderBase: Forward declare EFBAccessTypeLioncash
2017-01-06OGL: Use VideoCommon blend state for framebuffer configuration.degasus
2016-12-26TextureCache: Extract BP enum check to VideoCommon.degasus
We have TOO many video backends.
2016-12-09TextureCacheBase: Eliminate static stateLioncash
2016-10-08Remove Frameskipanthony
2016-09-06BPStructs: remove case statments which never match.Scott Mansell
Visual Studio's code analyzer complains about these.
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-01-25Fifo: Make g_use_deterministic_gpu_thread a TU-local variableLioncash
2016-01-25Fifo: Make g_bSkipCurrentFrame a TU-local variableLioncash
This is only ever queried, making it a global isn't necessary.
2016-01-17VideoCommon: Header cleanupLioncash
Also remedies places where the video backends and core rely on things being indirectly included.
2016-01-12Fifo: Create a "Fifo" namespace.degasus
2015-11-06VideoCommon: rename TextureCache to TextureCacheBaseTillmann Karras
2015-11-05Remove the "Show EFB Copy Regions" debug option.Scott Mansell
It was only implemented in OpenGL, though the option was visible in both backends, leading to memory leaks if you enabled it in DirectX. And it wasn't particularly useful as a debug feature as it only showed where in the EFB the copies were taken from, not what format it was, or what the copy was used for, or what content was in the EFB at that point in time. Also, it stretched the copy regions relative to the window, so the on-screen regions don't even line up with the window unless the game used the full EFB (some pal games) and you game image stretched to the full window.
2015-11-05BPStructs: add debug info for texture setup.Scott Mansell
2015-09-23Silence -Wshadow warning.Rohit Nirmal
2015-09-22FifoRecorder: Use Video Common to record efb2ram correctly.Scott Mansell
Texture updates have been moved into TextureCache, while TMEM updates where moved into bpmem. Code for handling efb2ram updates was added to TextureCache. There was a bug for preloaded RGBA8 textures, it only copied half the texture. The TODO was wrong too.
2015-09-05Cleanup and unify handling of efb copy stride.Scott Mansell