aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache
AgeCommit message (Collapse)Author
2020-04-19Merge pull request #3686 from lioncash/tablebunnei
texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indices
2020-04-16Merge pull request #3673 from lioncash/extrabunnei
CMakeLists: Specify -Wextra on linux builds
2020-04-16Merge pull request #3688 from lioncash/nequalRodrigo Locatti
surface_view: Add missing operator!= to ViewParams
2020-04-16Merge pull request #3687 from lioncash/constnessRodrigo Locatti
surface_base: Make IsInside() a const member function
2020-04-16surface_view: Add missing operator!= to ViewParamsLioncash
Provides logical symmetry to the interface.
2020-04-15surface_base: Make IsInside() a const member functionLioncash
This doesn't modify internal state, so this can be made const.
2020-04-15Merge pull request #3683 from lioncash/docsbunnei
video_core: Amend doxygen comment references
2020-04-15texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indicesLioncash
Previously these were all using the red component to derive the indices, which is definitely not intentional.
2020-04-15video_core: Amend doxygen comment referencesLioncash
Fixes broken documentation references.
2020-04-15CMakeLists: Specify -Wextra on linux buildsLioncash
Allows reporting more cases where logic errors may exist, such as implicit fallthrough cases, etc. We currently ignore unused parameters, since we currently have many cases where this is intentional (virtual interfaces). While we're at it, we can also tidy up any existing code that causes warnings. This also uncovered a few bugs as well.
2020-04-15Merge pull request #3649 from FernandoS27/3d-fixRodrigo Locatti
Texture Cache: Read current data when flushing a 3D segment.
2020-04-15Texture Cache: Read current data when flushing a 3D segment.Fernando Sahmkow
This PR corrects flushing of 3D segments when data of other segments is mixed, this aims to preserve the data in place.
2020-04-14Texture Cache: Only do buffer copies on accurate GPU. (#3634)Fernando Sahmkow
This is a simple optimization as Buffer Copies are mostly used for texture recycling. They are, however, useful when games abuse undefined behavior but most 3D APIs forbid it.
2020-04-11texture_cache: Remove preserve_contentsReinUsesLisp
preserve_contents was always true. We can't assume we don't have to preserve clears because scissored and color masked clears exist. This removes preserve_contents and assumes it as true at all times.
2020-04-09Merge pull request #3610 from FernandoS27/gpu-cachesRodrigo Locatti
Refactor all the GPU Caches to use VAddr for cache addressing
2020-04-07Merge pull request #3599 from ReinUsesLisp/revert-3499bunnei
Revert "Merge pull request #3499 from ReinUsesLisp/depth-2d-array"
2020-04-06Texture Cache: Use vAddr instead of physical memory for caching.Fernando Sahmkow
2020-04-04Revert "Merge pull request #3499 from ReinUsesLisp/depth-2d-array"ReinUsesLisp
This reverts commit 41905ee467b24172ba93e3fcd665bb4e4806a45a, reversing changes made to 35145bd529c3517e2c366efc764a762092d96edf. It causes regressions in several games.
2020-04-01video_core: Use native ASTC when availableReinUsesLisp
2020-03-15Merge pull request #3501 from ReinUsesLisp/rgba16-snormRodrigo Locatti
video_core: Implement RGBA16_SNORM
2020-03-14Merge pull request #3500 from ReinUsesLisp/incompatible-typesFernando Sahmkow
texture_cache: Report incompatible textures as black
2020-03-12video_core: Implement RGBA16_SNORMReinUsesLisp
Implement RGBA16_SNORM with the current API. Nothing special here.
2020-03-12texture_cache: Report incompatible textures as blackReinUsesLisp
Some games bind incompatible texture types to certain types. For example Astral Chain binds a 2D texture with 1 layer (non-array) to a cubemap slot (that's how it's used in the shader). After testing this in hardware, the expected "undefined behavior" is to report all pixels as black. We already have a path for reporting black textures in the texture cache. When textures types are incompatible, this commit binds these kind of textures. This is done on the API agnostic texture cache so no extra code has to be inserted on OpenGL or Vulkan. As a side effect, this fixes invalidations of ASTC textures on Astral Chain. This happened because yuzu detected a cube texture and forced 6 faces, generating a texture larger than what the TIC reported.
2020-03-12texture_cache/surface_params: Force depth=1 on 2D texturesReinUsesLisp
Sometimes games will sample a 2D array TIC with a 2D access in the shader. This causes bad interactions with the rest of the texture cache. To emulate what the game wants to do, force a depth=1 on 2D textures (not 2D arrays) and let the texture cache handle the rest.
2020-02-28renderer_opengl: Reintroduce dirty flags for render targetsReinUsesLisp
2020-02-28gl_rasterizer: Remove dirty flagsReinUsesLisp
2020-02-25Merge pull request #3417 from ReinUsesLisp/r32ibunnei
texture: Implement R32I
2020-02-24Merge pull request #3425 from ReinUsesLisp/layered-framebufferbunnei
texture_cache: Implement layered framebuffer attachments
2020-02-22Merge pull request #3422 from ReinUsesLisp/buffer-flushbunnei
surface_base: Implement texture buffer flushes
2020-02-16texture_cache: Implement layered framebuffer attachmentsReinUsesLisp
Layered framebuffer attachments is a feature that allows applications to write attach layered textures to a single attachment. What layer the fragments are written to is decided from the shader using gl_Layer.
2020-02-16texture_cache: Avoid matches in 3D texturesReinUsesLisp
Code before this commit was trying to match 3D textures with another target. Fix that.
2020-02-16surface_base: Implement texture buffer flushesReinUsesLisp
Implement downloads to guest memory from texture buffers on the generic cache and OpenGL.
2020-02-15texture: Implement R32IReinUsesLisp
2020-01-26texture_cache/surface_base: Fix layered break downReinUsesLisp
Layered break downs was passing "layer" as a "depth" parameter. This commit addresses that.
2020-01-17Merge pull request #3311 from ReinUsesLisp/z32fx24s8bunnei
format_lookup_table: Fix ZF32_X24S8 component types
2020-01-16format_lookup_table: Fix ZF32_X24S8 component typesReinUsesLisp
Component types for ZF32_X24S8 were using UNORM. Drivers will set FLOAT, UINT, UNORM, UNORM; causing a format mismatch. This commit addresses that.
2020-01-13texture_cache/surface_params: Make GetNumLayers publicReinUsesLisp
2019-12-22Texture Cache: Improve documentationFernando Sahmkow
2019-12-22Texture Cache: Address FeedbackFernando Sahmkow
2019-12-22Texture Cache: Add HLE methods for building 3D textures within the GPU in ↵Fernando Sahmkow
certain scenarios. This commit adds a series of HLE methods for handling 3D textures in general. This helps games that generate 3D textures on every frame and may reduce loading times for certain games.
2019-12-02Merge pull request #2987 from FernandoS27/texture-invalidbunnei
Texture_Cache: Redo invalid Surfaces handling.
2019-11-29texture_cache/surface_base: Fix out of bounds texture viewsReinUsesLisp
Some texture views were being created out of bounds (with more layers or mipmaps than what the original texture has). This is because of a miscalculation in mipmap bounding. end_layer and end_mipmap are out of bounds (e.g. layer 6 in a cubemap), there's no need to add one more there. Fixes OpenGL errors and Vulkan crashes on Splatoon 2.
2019-11-20Texture_Cache: Redo invalid Surfaces handling.Fernando Sahmkow
This commit aims to redo the full setup of invalid textures and guarantee correct behavior across backends in the case of finding one by using black dummy textures that match the target of the expected texture.
2019-11-14format_lookup_table: Address feedbackReinUsesLisp
format_lookup_table: Drop bitfields format_lookup_table: Use std::array for definition table format_lookup_table: Include <limits> instead of <numeric>
2019-11-14texture_cache: Use a table instead of switch for texture formatsReinUsesLisp
Use a large flat array to look up texture formats. This allows us to properly implement formats with different component types. It should also be faster.
2019-11-14texture_cache: Drop abstracted ComponentTypeReinUsesLisp
Abstracted ComponentType was not being used in a meaningful way. This commit drops its usage. There is one place where it was being used to test compatibility between two cached surfaces, but this one is implied in the pixel format. Removing the component type test doesn't change the behaviour.
2019-10-16Merge pull request #2978 from lioncash/doxygenRodrigo Locatti
video_core/texture_cache: Amend Doxygen references
2019-10-15texture_cache: Avoid unnecessary surface copies within PickStrategy() and ↵Lioncash
TryReconstructSurface() We can take these by const reference and avoid making unnecessary copies, preventing some atomic reference count increments and decrements.
2019-10-15video_core/texture_cache: Amend Doxygen referencesLioncash
Amends the doxygen comments so that they properly resolve. While we're at it, we can correct some typos and fix up some of the comments' formatting in order to make them slightly nicer to read.
2019-10-15common: Rename binary_find.h to algorithm.hLioncash
Makes the header more general for other potential algorithms in the future. While we're at it, include a missing <functional> include to satisfy the use of std::less.