summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
AgeCommit message (Collapse)Author
2019-04-28Merge pull request #8048 from stenzek/vulkan-negative-scissor-rectConnor McLaughlin
Vulkan: Don't set a negative offset in scissor rect
2019-04-28FramebufferManager: Fix invalid transitions for 1xIR in EFB cacheStenzek
2019-04-28TextureCache: Fix incorrect format string in GetXFBTexture()Stenzek
2019-04-21Replace EFBRectangle/TargetRectangle with MathUtil::RectangleStenzek
2019-04-21TextureCache: Check for out-of-range partial copy rect after scalingStenzek
2019-04-21TextureCache: Use linear filtering on y-scaled and >1xIR VRAM copiesStenzek
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-30FramebufferManager: Fix broken EFB peeks in GL with MSAA onStenzek
2019-03-29TextureCacheBase: Fix possible crash on shutdown with deferred EFB copiesStenzek
2019-03-20TextureCacheBase: Fix infinite loop in DoPartialTextureUpdatesStenzek
2019-02-28Merge pull request #7832 from stenzek/xfb-decoding-regressionTilka
TextureCache: Fix GPU decoding of XFB copies
2019-02-28TextureCache: Fix GPU decoding of XFB copies not falling back to CPUStenzek
2019-02-28TextureCache: Fix EFB2RAM copies at >1xIR sampling out-of-rangeStenzek
2019-02-19Move most backend functionality to VideoCommonStenzek
2019-02-17TextureCache: Don't copy out-of-range rectangles when stitching texturesStenzek
This can cause driver crashes or GPU hangs if we do.
2019-02-17TextureCache: Bind textures/samplers after loading all texturesStenzek
Since loading textures can result in rendering, e.g. partial copies, we don't want to disturb partially-bound GX state.
2019-01-19TextureCache: Fix a possible crash when partial updating palette texturesStenzek
2019-01-19TextureCache: Don't partial copy to non-existant texture layersStenzek
2019-01-19TextureCache: Fix broken XFB stitching with stereoscopy is enabledStenzek
2018-12-25fx texture overlapweihuoya
2018-11-13TextureCache: Recompute overlapping XFB copy hashes after copying to RAMStenzek
2018-11-08TextureCache: Fix leaking TCacheEntry instancesStenzek
2018-11-07TextureCache: Implement deferred/batched EFB copiesStenzek
2018-10-14Merge pull request #7412 from AdmiralCurtiss/xfb-stitch-in-orderTilka
Stitch together overlapping XFB regions in order of XFB copy creation.
2018-09-15Do not consider XFB copies for invalidating textures when loading a new texture.Admiral H. Curtiss
This fixes severe image flickering in some cutscenes of Twin Snakes. The game appears to sometimes load a previously made XFB copy as a texture before it is actually rendered to the screen, which we took as an invitation to invalidate the XFB copy.
2018-09-14Stitch together overlapping XFB regions in order of XFB copy creation.Admiral H. Curtiss
2018-07-06VideoCommon/TextureCacheBase: Resolve a -Wmissing-braces warning in ↵Lioncash
GetRAMCopyFilterCoefficients()
2018-07-03Make arbitrary mipmap detection toggle invalidate the texture cacheTechjar
We want this setting to invalidate the cache because it may affect the appearance of textures in the rendered scene, therefore one would expect changing it while the game is running to have the expected effect immediately.
2018-07-02Remove unused sRGB conversion functionsJonathan Hamilton
Now the arbitrary mipmap reference downsampling is just done in linear space, these are no longer used.
2018-07-02Do all arbitrary mipmap detection in integer spaceJonathan Hamilton
This no longer converts from sRGB to linear for the reference mip downsample - even if the original mipmap creation tool used an sRGB colorspace (which isn't really guaranteed, and may even change per game), this is a "fast" heuristic that's only an estimate anyway. The average diff is also now stored in a u64, avoiding floating point calculations in the per-pixel hot loop. This should speed up the detection significantly, hopefully fixing jank when loading in new textures.
2018-06-21Merge pull request #6875 from JonnyH/WIP/mipmap-heuristic-tweaksMarkus Wick
Make arbitrary mipmap detection a config option
2018-05-22EFB2RAM: Apply copy filter as a float coefficient after samplingStenzek
Using 8-bit integer math here lead to precision loss for depth copies, which broke various effects in games, e.g. lens flare in MK:DD. It's unlikely the console implements this as a floating-point multiply (fixed-point perhaps), but since we have the float round trip in our EFB2RAM shaders anyway, it's not going to make things any worse. If we do rewrite our shaders to use integer math completely, then it might be worth switching this conversion back to integers. However, the range of the values (format) should be known, or we should expand all values out to 24-bits first.
2018-05-20VideoCommon: Replace SOIL with libpng for hires texturesEmmanuel Gil Peyrot
2018-05-17Texture AverageDiff: Do more in int space and avoid excessive float conversionJonathan Hamilton
Multiplying 2x 8bit values is guaranteed to fit in 16bits, 4 channels then in 18bits, which means an 'int' shouild be sufficient to avoid overflows
2018-05-17Merge pull request #6743 from stenzek/faster-disabled-copy-filterMarkus Wick
TextureConversionShader: Don't sample from adjacent rows when not needed
2018-05-16Change the arbitrary mipmap detection to use the square of the errorJonathan Hamilton
Hopefully this better matches the user's view of a texture - as large changes in colour should be weighted higher than lots of very small changes Note: This likely invalidates the current heuristic threshold default
2018-05-16Make the arbitrary mipmap detection threshold configureableJonathan Hamilton
This is likely a "superuser" option at best, but I want to be able to play with it without rebuilding if I want to tweak the heuristics
2018-05-16Make arbitrary mipmap detection a config optionJonathan Hamilton
Under GFX::Enhancements::ArbitraryMipmapDetection - default enabled
2018-05-16Common/Hash: Namespace code under the Common namespaceLioncash
Brings more common code under the Common namespace.
2018-05-03TextureCacheBase: Make "disable vram copies" part of the active configStenzek
2018-05-03TextureConversionShader: Don't sample from adjacent rows when not neededStenzek
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-12Reformat all the things!spycrab
2018-03-14Assert: Uppercase assertion macrosLioncash
Macros should be all upper-cased. This is also kind of a wart that's been sticking out for quite a while now (we avoid prefixing underscores).
2018-03-13SSE-optimize UninitializeXFBMemoryHenrik Rydgård
Lowest hanging fruit I could find with a profiler. Not sure this stuff actually needs to be done, but assuming it is, why not do it quickly? 10x faster, goes from 1% CPU to 0.09%.
2018-02-11TextureCache: Add an option to disable EFB copies to VRAMStenzek
The option is named DisableCopyToVRAM under the Hacks section in GFX.ini. It is intentionally not exposed to the GUI, as users should not need to use it under normal circumstances. The main use is debugging issues in the EFB-to-RAM shaders.
2018-02-11VideoConfig: Remove bForceCopyToRam fieldStenzek
It's the inverse of supports-copy-to-vram.
2018-01-22AbstractTexture: Move Bind() method to RendererStenzek
This makes state tracking simpler, and enables easier porting to command lists later on.
2018-01-10Treat custom textures with "_arb" suffix as having arbitrary mipmapsJosJuice
This is adapted from Bighead's code that was posted at https://forums.dolphin-emu.org/Thread-dolphin-custom-texture-mipmaps?pid=460867#pid460867 In master, custom textures are never treated as having arbitrary mipmaps, so we need either a change like this or a change that makes us apply the arbitrary mipmap heuristic even when a custom texture is used.
2018-01-06VideoCommon: Apply the yscale as upscaling of the XFB.Markus Wick