aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache/surface_params.cpp
AgeCommit message (Collapse)Author
2020-12-30video_core: Rewrite the texture cacheReinUsesLisp
The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues.
2020-12-07video_core: Remove unnecessary enum class casting in logging messagesLioncash
fmt now automatically prints the numeric value of an enum class member by default, so we don't need to use casts any more. Reduces the line noise a bit.
2020-12-05video_core: Resolve more variable shadowing scenarios pt.2Lioncash
Migrates the video core code closer to enabling variable shadowing warnings as errors. This primarily sorts out shadowing occurrences within the Vulkan code.
2020-10-29General: Resolve a few missing initializer warningsLioncash
Resolves a few -Wmissing-initializer warnings.
2020-09-06video_core: Remove all Core::System references in rendererReinUsesLisp
Now that the GPU is initialized when video backends are initialized, it's no longer needed to query components once the game is running: it can be done when yuzu is booting. This allows us to pass components between constructors and in the process remove all Core::System references in the video backend.
2020-08-07Merge pull request #4389 from ogniK5377/redundant-format-typebunnei
video_core: Remove redundant pixel format type
2020-07-21surface_params: Make use of designated initializers where applicableLioncash
Provides a convenient way to avoid unnecessary zero initializing.
2020-07-21surface_params: Remove redundant assignmentLioncash
This is a redundant assignment that can be removed.
2020-07-21surface_params: Replace questionable usages of the comma operator with ↵Lioncash
semicolons These are bugs waiting to happen.
2020-07-21Merge pull request #4324 from ReinUsesLisp/formatsbunnei
video_core: Fix, add and rename pixel formats
2020-07-21video_core: Remove redundant pixel format typeDavid Marcec
We already get the format type before converting shadow formats and during shadow formats.
2020-07-13video_core: Rearrange pixel format namesReinUsesLisp
Normalizes pixel format names to match Vulkan names. Previous to this commit pixel formats had no convention, leading to confusion and potential bugs.
2020-07-10video_core/textures: Add and use SwizzleSliceToVoxel, and minor style changesReinUsesLisp
Change GOB sizes from free-functions to constexpr constants. Add SwizzleSliceToVoxel, a function that swizzles a 2D array of pixels into a 3D texture and use it for 3D copies.
2020-06-08texture_cache: Port original code management for 2D vs 3D texturesReinUsesLisp
Handle blits to images as 2D, even when they have block depth. - Fixes rendering issues on Luigi's Mansion 3
2020-06-08texture_cache: Handle 3D texture blits with one layerReinUsesLisp
2020-06-08texture_cache: Implement rendering to 3D texturesReinUsesLisp
This allows rendering to 3D textures with more than one slice. Applications are allowed to render to more than one slice of a texture using gl_Layer from a VTG shader. This also requires reworking how 3D texture collisions are handled, for now, this commit allows rendering to slices but not to miplevels. When a render target attempts to write to a mipmap, we fallback to the previous implementation (copying or flushing as needed). - Fixes color correction 3D textures on UE4 games (rainbow effects). - Allows Xenoblade games to render to 3D textures directly.
2020-04-23shader_ir: Turn classes into data structuresReinUsesLisp
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-07Merge pull request #3599 from ReinUsesLisp/revert-3499bunnei
Revert "Merge pull request #3499 from ReinUsesLisp/depth-2d-array"
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-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-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.
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-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-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-09-05gl_rasterizer: Implement image bindingsReinUsesLisp
2019-09-05texture_cache: Pass TIC to texture cacheReinUsesLisp
2019-07-14Texture_Cache: Address FeedbackFernando Sahmkow
2019-07-14Texture_Cache: Remove some unprecise fallback case and clang formatFernando Sahmkow
2019-07-14Texture_Cache: Force Framebuffer reset if an active render target is ↵Fernando Sahmkow
unregistered.
2019-07-04texture_cache: Correct Texture Buffer UploadingFernando Sahmkow
2019-06-25surface_params: Corrections, asserts and documentation.Fernando Sahmkow
2019-06-20texture_cache: Correct format R16U as siblingFernando Sahmkow
2019-06-20texture_cache: Corrections to buffers and shadow formats use.Fernando Sahmkow
2019-06-20texture_cache: correct texture buffer on surface paramsFernando Sahmkow
2019-06-20texture_cache: move some large methods to cpp filesFernando Sahmkow
2019-06-20texture_cache uncompress-compress is untopological.Fernando Sahmkow
This makes conflicts between non compress and compress textures to be auto recycled. It also limits the amount of mipmaps a texture can have if it goes above it's limit.
2019-06-20texture_cache: General FixesFernando Sahmkow
Fixed ASTC mipmaps loading Fixed alignment on openGL upload/download Fixed Block Height Calculation Removed unalign_height
2019-06-20surface_params: Ensure pitch is always written to avoid surface leaksReinUsesLisp
2019-06-20surface_params: Optimize CreateForTextureReinUsesLisp
Instead of using Common::AlignUp, use Common::AlignBits to align the texture compression factor.
2019-06-20texture_cache: Optimize GetMipBlockHeight and GetMipBlockDepthFernando Sahmkow
2019-06-20video_core: Use un-shifted block sizes to avoid integer divisionsReinUsesLisp
Instead of storing all block width, height and depths in their shifted form: block_width = 1U << block_shift; Store them like they are provided by the emulated hardware (their block_shift form). This way we can avoid doing the costly Common::AlignUp operation to align texture sizes and drop CPU integer divisions with bitwise logic (defined in Common::AlignBits).
2019-06-20Reduce amount of size calculations.Fernando Sahmkow
2019-06-20Correct Surface Base and Views for new Texture CacheFernando Sahmkow
2019-06-20texture_cache: Split texture cache into different filesReinUsesLisp