summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
AgeCommit message (Collapse)Author
2017-04-29TextureCache: Move host texture utility functions to VideoCommonStenzek
The appropriate place for these would be AbstractTexture, once it is finished.
2017-04-29TextureCache: Support compressed textures and pass pitch/size to uploadStenzek
This also removes an extra copy of the image for custom textures.
2017-04-12VideoBackends: Support updated texture encoding shader generatorsStenzek
2017-04-09Merge pull request #5220 from stenzek/small-nonsquare-mipsAnthony
TextureCache: Fix incomplete GPU texture decoding of non-square mips
2017-04-07TextureCache: Fix incomplete GPU texture decoding of non-square mipsStenzek
2017-04-06TextureCacheBase: remove duplicated variableMichael Maltese
Fixes warning: ``` Source/Core/VideoCommon/TextureCacheBase.cpp:869:17: warning: declaration shadows a local variable [-Wshadow] const u8* tlut = &texMem[tlutaddr]; ^ Source/Core/VideoCommon/TextureCacheBase.cpp:784:13: note: previous declaration is here const u8* tlut = &texMem[tlutaddr]; ^ ```
2017-04-04TextureCacheBase: fix custom textures not being loadedMichael Maltese
Fixes bug #10183 [0] introduced by 3bd184a / PR #4467 [1]. TextureCacheBase was no longer calling `entry->Load` for custom textures since the compute shader decoding logic was added. This adds it back in. It also slightly restructures the decoding if-group to match the one below, which I think makes the logic more obvious. (recommend viewing with `git diff -b` to ignore the indentation changes) [0]: https://bugs.dolphin-emu.org/issues/10183 [1]: https://github.com/dolphin-emu/dolphin/pull/4467
2017-04-01VideoCommon: Changes to TextureCache to support decoding in backendStenzek
2017-03-25TextureCacheBase: Convert bound_textures from a C array to a std::arrayLioncash
Prevents array-to-pointer decay and simplifies some code.
2017-03-22TextureCache: Don't lock freed rendertargets for one frame.degasus
New Super Mario Bros on PAL still renders at 60 fps, but skips every 5th XFB copy. So our detection of "per frame" fails, and we require twice the amound of texture objects. But our pool frees unused textures after 3 frames, so half of them needs to be reallocated every few frames. This commit removes the lock for render targets. It was introduced to not update a texture while it is still in use. But render targets aren't updated while rendering, so this lock isn't needed. Non-rendertarget textures however aren't as dynamic, so the lock should have no performance update.
2017-03-09Merge pull request #5051 from stenzek/renderer-fixesMarkus Wick
VideoBackends: Fix crashes introduced by #4999
2017-03-09Unify the way of setting game ID, title ID, revisionJosJuice
The existing code from ConfigManager, ES and MIOS is merged into a new set of functions called SetRunningGameMetadata.
2017-03-10VideoBackends: Move max texture size to VideoConfigStenzek
This stops the virtual method call from within the Renderer constructor. The initialization here for GL had to be moved to VideoBackend, as the Renderer constructor will not have been executed before the value is required.
2017-03-04VideoCommon: Eliminate static state in RendererStenzek
2016-12-27TextureCache: Add a dirty bit for partial updates on overlapping EFB copies.degasus
2016-12-26TextureCache: Drop unused parameter in backend API.degasus
2016-12-26TextureCache: Extract BP enum check to VideoCommon.degasus
We have TOO many video backends.
2016-12-25VideoCommon: use u32 for texture addressesTillmann Karras
2016-12-23Merge pull request #4224 from lioncash/tcacheMat M
TextureCacheBase: Eliminate static state
2016-12-15TextureCache: Use same color coefficients for EFB2Tex as EFB2RAMStenzek
2016-12-09TextureCacheBase: Eliminate static stateLioncash
2016-12-06Common: Add alignment headerLéo Lam
Gets rid of duplicated alignment code.
2016-10-29DiscIO/SConfig: Rename GetUniqueID to GetGameIDJosJuice
We call this "game ID" everywhere else, and it's not actually completely unique.
2016-10-06TextureCache: Don't re-use pooled textures within the same frameStenzek
This is an issue because a driver may have to maintain two copies of a texture if it batches all uploads together at the start of a frame. In the Vulkan backend, we do something similar to avoid breaking out of a render pass to copy a texture from the streaming buffer to the destination image. This was causing issues in the sms-bubbles fifolog, where an EFB copy to the same address of a previously-used texture caused the previous texture to be re-used again for a different image later on in the frame, causing the original contents to be discarded.
2016-10-01VideoBackends: Make TextureCache::CompileShaders return a boolStenzek
2016-08-30TextureCacheBase: Address 0x0 is valid, don't you dare ignore it.Jules Blok
2016-08-07Common: namespace MemoryUtilLioncash
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2016-06-18TextureCache: Rename functions and add comments to clear up docsScott Mansell
2016-06-17TextureCache: Track efb copies used in a partially updated textureScott Mansell
Fixes a major preformance regression in Skies of Arcadia during battle transisions. I had plans for a more advanced version of this code after 5.0, but here is a minimal implemenation for now.
2016-04-09Partial updates for paletted texturesmimimi085181
This pr fixes another regression that happened after pr #3165 was merged. The shadows in mario baseball should now work again.
2016-04-09Merge pull request #3752 from ↵Pierre Bourdon
mimimi085181/remove-use-only-once-restriction-partial-updates Remove the restriction to use efb copies only once as partial update
2016-04-02Partial texture updates: Allow the efb copy to start before the texturemimimi085181
This is an oversight from pr https://github.com/dolphin-emu/dolphin/pull/3266 . Thanks to degasus for pointing this out. It's possible that MAX_TEXTURE_BINARY_SIZE can be optimised, but i wanted to play it safe considering the 5.0 stable release.
2016-03-27Remove the restriction to apply efb copies only once as partial updatemimimi085181
I'm not entirely sure what is happening, but this optimisation is causing an issue in Sonic Riders: Zero Gravity. Apparently the issue would also be fixed by PR#3747, but this PR should also fix similar issues. Games that use partial updates might get slower with this, so some performance regression testing would be nice. Games like New Super Mario Bros, RS2, Zelda TP and Silent Hill. Testing with high graphics settings makes sense, since this would mostly end up in more work for the GPU.
2016-03-24VideoCommon: Refactor TexMode0 mipmaps disabled test into a helper functionEmptyChaos
2016-03-16Minor fixes to the partial updates codemimimi085181
- remove an outdated comment about the efb to ram and scaled efb restriction - when upscaling efb copies, mark the new texture as efb copy - dx12 fixes for the src box, especially the number of layers for 3D
2016-03-16Partial texture updates with parts of efb copies new versionmimimi085181
2016-02-14Copy all layers of textures with CopyRectangleFromTexturemimimi085181
2016-02-14For partial texture updates check the dimensions of the efb copy and the ↵mimimi085181
target texture, not just the binary size. This should get Donkey Kong Country Returns characters to be as broken as they should be. They will be fixed in a later pr. Expected result is: efbtex: characters are always flickering or invisible, no matter what scaling or IR setting efb2ram: characters are always working properly at 1xIR, no matter what scaling or IR setting
2016-01-30Merge pull request #3480 from phire/memory_stride_too_smallPierre Bourdon
Avoid the "Memory stride too small" assert
2016-01-17VideoCommon: Header cleanupLioncash
Also remedies places where the video backends and core rely on things being indirectly included.
2016-01-13TextureCacheBase: Change CalculateLevelSize to match D3D/OGL sizesStenzek
This was causing crashes/driver resets when odd-dimension textures were being loaded, due to the size we were uploading being larger than the size of the higher-level texture calculated by the runtime.
2016-01-09Avoid the "Memory stride too small" assertScott Mansell
EFB2Tex still has no idea what to do with these weird textures so we simply disable EFB2Tex when one is encountered.
2015-12-29Merge pull request #3407 from phire/fix_assertMarkus Wick
TextureCache, fix an incorrect assert.
2015-12-29HiresTextures: Remove the need to explicitly free SOIL allocated dataLioncash
2015-12-29TextureCache, fix an incorrect assert.Scott Mansell
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-12-01Fix lens flares in Mario Kart Wii.Scott Mansell
2015-11-24TextureCache: Allow the backends to return nullptr for textures.degasus
2015-11-17TextureCache: Fix crash for invalid textures.degasus