summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache (follow)
Commit message (Collapse)AuthorAgeFilesLines
* General: Make use of std::nullopt where applicableLioncash2020-09-221-3/+7
| | | | | | | | Allows some implementations to avoid completely zeroing out the internal buffer of the optional, and instead only set the validity byte within the structure. This also makes it consistent how we return empty optionals.
* video_core: Remove all Core::System references in rendererReinUsesLisp2020-09-063-36/+31
| | | | | | | | | 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.
* Merge pull request #4389 from ogniK5377/redundant-format-typebunnei2020-08-071-1/+0
|\ | | | | video_core: Remove redundant pixel format type
| * video_core: Remove redundant pixel format typeDavid Marcec2020-07-211-1/+0
| | | | | | | | We already get the format type before converting shadow formats and during shadow formats.
* | Merge pull request #4396 from lioncash/commabunnei2020-07-301-45/+52
|\ \ | | | | | | surface_params: Replace questionable usages of the comma operator with semicolons
| * | surface_params: Make use of designated initializers where applicableLioncash2020-07-211-38/+46
| | | | | | | | | | | | Provides a convenient way to avoid unnecessary zero initializing.
| * | surface_params: Remove redundant assignmentLioncash2020-07-211-1/+0
| | | | | | | | | | | | This is a redundant assignment that can be removed.
| * | surface_params: Replace questionable usages of the comma operator with semicolonsLioncash2020-07-211-9/+9
| | | | | | | | | | | | These are bugs waiting to happen.
* | | Merge pull request #4394 from lioncash/unused6bunnei2020-07-241-2/+0
|\ \ \ | |/ / |/| | video_core: Remove unused variables
| * | video_core: Remove unused variablesLioncash2020-07-211-2/+0
| |/ | | | | | | Silences several compiler warnings about unused variables.
* | Merge pull request #4324 from ReinUsesLisp/formatsbunnei2020-07-214-84/+91
|\ \ | |/ |/| video_core: Fix, add and rename pixel formats
| * video_core: Rearrange pixel format namesReinUsesLisp2020-07-134-90/+90
| | | | | | | | | | | | Normalizes pixel format names to match Vulkan names. Previous to this commit pixel formats had no convention, leading to confusion and potential bugs.
| * video_core: Fix DXT4 and RGB565ReinUsesLisp2020-07-131-4/+3
| |
| * video_core/format_lookup_table: Add formats with existing PixelFormatReinUsesLisp2020-07-131-1/+9
| |
* | Merge pull request #4242 from ReinUsesLisp/maxwell-dmabunnei2020-07-142-4/+3
|\ \ | |/ |/| maxwell_dma: Match official doc and support pitch->voxel copies
| * video_core/textures: Add and use SwizzleSliceToVoxel, and minor style changesReinUsesLisp2020-07-102-4/+3
| | | | | | | | | | | | | | 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.
* | configuration: implement per-game configurations (#4098)lat9nq2020-07-101-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Switch game settings to use a pointer In order to add full per-game settings, we need to be able to tell yuzu to switch to using either the global or game configuration. Using a pointer makes it easier to switch. * configuration: add new UI without changing existing funcitonality The new UI also adds General, System, Graphics, Advanced Graphics, and Audio tabs, but as yet they do nothing. This commit keeps yuzu to the same functionality as originally branched. * configuration: Rename files These weren't included in the last commit. Now they are. * configuration: setup global configuration checkbox Global config checkbox now enables/disables the appropriate tabs in the game properties dialog. The use global configuration setting is now saved to the config, defaulting to true. This also addresses some changes requested in the PR. * configuration: swap to per-game config memory for properties dialog Does not set memory going in-game. Swaps to game values when opening the properties dialog, then swaps back when closing it. Uses a `memcpy` to swap. Also implements saving config files, limited to certain groups of configurations so as to not risk setting unsafe configurations. * configuration: change config interfaces to use config-specific pointers When a game is booted, we need to be able to open the configuration dialogs without changing the settings pointer in the game's emualtion. A new pointer specific to just the configuration dialogs can be used to separate changes to just those config dialogs without affecting the emulation. * configuration: boot a game using per-game settings Swaps values where needed to boot a game. * configuration: user correct config during emulation Creates a new pointer specifically for modifying the configuration while emulation is in progress. Both the regular configuration dialog and the game properties dialog now use the pointer Settings::config_values to focus edits to the correct struct. * settings: split Settings::values into two different structs By splitting the settings into two mutually exclusive structs, it becomes easier, as a developer, to determine how to use the Settings structs after per-game configurations is merged. Other benefits include only duplicating the required settings in memory. * settings: move use_docked_mode to Controls group `use_docked_mode` is set in the input settings and cannot be accessed from the system settings. Grouping it with system settings causes it to be saved with per-game settings, which may make transferring configs more difficult later on, especially since docked mode cannot be set from within the game properties dialog. * configuration: Fix the other yuzu executables and a regression In main.cpp, we have to get the title ID before the ROM is loaded, else the renderer will reflect only the global settings and now the user's game specific settings. * settings: use a template to duplicate memory for each setting Replaces the type of each variable in the Settings::Values struct with a new class that allows basic data reading and writing. The new struct Settings::Setting duplicates the data in memory and can manage global overrides per each setting. * configuration: correct add-ons config and swap settings when apropriate Any add-ons interaction happens directly through the global values struct. Swapping bewteen structs now also includes copying the necessary global configs that cannot be changed nor saved in per-game settings. General and System config menus now update based on whether it is viewing the global or per-game settings. * settings: restore old values struct No longer needed with the Settings::Setting class template. * configuration: implement hierarchical game properties dialog This sets the apropriate global or local data in each setting. * clang format * clang format take 2 can the docker container save this? * address comments and style issues * config: read and write settings with global awareness Adds new functions to read and write settings while keeping the global state in focus. Files now generated per-game are much smaller since often they only need address the global state. * settings: restore global state when necessary Upon closing a game or the game properties dialog, we need to restore all global settings to the original global state so that we can properly open the configuration dialog or boot a different game. * configuration: guard setting values incorrectly This disables setting values while a game is running if the setting is overwritten by a per game setting. * config: don't write local settings in the global config Simple guards to prevent writing the wrong settings in the wrong files. * configuration: add comments, assume less, and clang format No longer assumes that a disabled UI element means the global state is turned off, instead opting to directly answer that question. Still however assumes a game is running if it is in that state. * configuration: fix a logic error Should not be negated * restore settings' global state regardless of accept/cancel Fixes loading a properties dialog and causing the global config dialog to show local settings. * fix more logic errors Fixed the frame limit would set the global setting from the game properties dialog. Also strengthened the Settings::Setting member variables and simplified the logic in config reading (ReadSettingGlobal). * fix another logic error In my efforts to guard RestoreGlobalState, I accidentally negated the IsPowered condition. * configure_audio: set toggle_stretched_audio to tristate * fixed custom rtc and rng seed overwriting the global value * clang format * rebased * clang format take 4 * address my own review Basically revert unintended changes * settings: literal instead of casting "No need to cast, use 1U instead" Thanks, Morph! Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com> * Revert "settings: literal instead of casting " This reverts commit 95e992a87c898f3e882ffdb415bb0ef9f80f613f. * main: fix status buttons reporting wrong settings after stop emulation * settings: Log UseDockedMode in the Controls group This should have happened when use_docked_mode was moved over to the controls group internally. This just reflects this in the log. * main: load settings if the file has a title id In other words, don't exit if the loader has trouble getting a title id. * use a zero * settings: initalize resolution factor with constructor instead of casting * Revert "settings: initalize resolution factor with constructor instead of casting" This reverts commit 54c35ecb46a29953842614620f9b7de1aa9d5dc8. * configure_graphics: guard device selector when Vulkan is global Prevents the user from editing the device selector if Vulkan is the global renderer backend. Also resets the vulkan_device variable when the users switches back-and-forth between global and Vulkan. * address reviewer concerns Changes function variables to const wherever they don't need to be changed. Sets Settings::Setting to final as it should not be inherited from. Sets ConfigurationShared::use_global_text to static. Co-Authored-By: VolcaEM <volcaem@users.noreply.github.com> * main: load per-game settings after LoadROM This prevents `Restart Emulation` from restoring the global settings *after* the per-game settings were applied. Thanks to BSoDGamingYT for finding this bug. * Revert "main: load per-game settings after LoadROM" This reverts commit 9d0d48c52d2dcf3bfb1806cc8fa7d5a271a8a804. * main: only restore global settings when necessary Loading the per-game settings cannot happen after the ROM is loaded, so we have to specify when to restore the global state. Again thanks to BSoD for finding the bug. * configuration_shared: address reviewer concerns except operator overrides Dropping operator override usage in next commit. Co-Authored-By: LC <lioncash@users.noreply.github.com> * settings: Drop operator overrides from Setting template Requires using GetValue and SetValue explicitly. Also reverts a change that broke title ID formatting in the game properties dialog. * complete rebase * configuration_shared: translate "Use global configuration" Uses ConfigurePerGame to do so, since its usage, at least as of now, corresponds with ConfigurationShared. * configure_per_game: address reviewer concern As far as I understand, it prevents the program from unnecessarily copying strings. Co-Authored-By: LC <lioncash@users.noreply.github.com> Co-authored-by: Morph <39850852+Morph1984@users.noreply.github.com> Co-authored-by: VolcaEM <volcaem@users.noreply.github.com> Co-authored-by: LC <lioncash@users.noreply.github.com>
* Merge pull request #4176 from ReinUsesLisp/compatible-formatsFernando Sahmkow2020-06-301-5/+20
|\ | | | | texture_cache: Check format compatibility before copying
| * texture_cache: Test format compatibility before copyingReinUsesLisp2020-06-271-5/+20
| | | | | | | | | | | | | | | | Avoid illegal copies. This intercepts the last step of a copy to avoid generating validation errors or corrupting the driver on some instances. We can create views and emit copies accordingly in future commits and remove this last-step validation.
* | Merge pull request #4144 from FernandoS27/tt-fixbunnei2020-06-271-0/+3
|\ \ | |/ |/| TextureCache: Fix case where layer goes off bound.
| * TextureCache: Fix case where layer goes off bound.Fernando Sahmkow2020-06-221-0/+3
| | | | | | | | | | The returned layer is expected to be between 0 and the depth of the surface, anything larger is off bounds.
* | texture_cache: Fix incorrect address used in a DeduceSurface() callLioncash2020-06-201-1/+1
|/ | | | Previously the source was being deduced twice in a row.
* texture_cache: Port original code management for 2D vs 3D texturesReinUsesLisp2020-06-082-16/+35
| | | | | | Handle blits to images as 2D, even when they have block depth. - Fixes rendering issues on Luigi's Mansion 3
* texture_cache: Simplify blit codeReinUsesLisp2020-06-081-9/+7
|
* texture_cache: Handle 3D texture blits with one layerReinUsesLisp2020-06-082-3/+8
|
* texture_cache: Implement rendering to 3D texturesReinUsesLisp2020-06-084-80/+76
| | | | | | | | | | | | | | 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.
* Merge pull request #4012 from ReinUsesLisp/mipmap-overlapsbunnei2020-06-031-28/+43
|\ | | | | texture_cache: Handle overlaps with multiple subresources
| * texture_cache: More relaxed reconstructionReinUsesLisp2020-05-301-13/+9
| | | | | | | | Only reupload textures when they've not been modified from the GPU.
| * texture_cache: Only copy textures that were modified from hostReinUsesLisp2020-05-301-2/+6
| |
| * texture_cache: Reload textures when number of resources mismatchReinUsesLisp2020-05-301-0/+9
| |
| * texture_cache: Handle overlaps with multiple subresourcesReinUsesLisp2020-05-291-27/+33
| | | | | | | | | | | | | | Implement more surface reconstruct cases. Allow overlaps with more than one layer and mipmap and copies all of them to the new texture. - Fixes textures moving around objects on Xenoblade games
* | Merge pull request #4005 from ReinUsesLisp/g24r8Rodrigo Locatti2020-06-011-1/+2
|\ \ | | | | | | format_lookup_table: Implement G24S8 format as S8Z24
| * | format_lookup_table: Implement G24S8 format as S8Z24ReinUsesLisp2020-05-281-1/+2
| | |
* | | Merge pull request #3999 from ReinUsesLisp/opt-tex-cachebunnei2020-05-311-24/+29
|\ \ \ | |_|/ |/| | texture_cache: Optimize GetSurfacesInRegion
| * | texture_cache: Use unordered_map::find instead of operator[] on hot codeReinUsesLisp2020-05-271-15/+19
| | |
| * | texture_cache: Use small vector for surface vectorsReinUsesLisp2020-05-271-9/+10
| |/ | | | | | | | | This avoids most heap allocations when collecting surfaces into a vector.
* / texture_cache: Fix layered null surfacesReinUsesLisp2020-05-261-1/+3
|/ | | | | Null texture cubes were not considered arrays, causing issues on Vulkan and OpenGL when creating views.
* Merge pull request #3839 from Morph1984/r8g8uiRodrigo Locatti2020-05-091-1/+2
|\ | | | | texture: Implement R8G8UI
| * texture: Implement R8G8UIMorph2020-04-301-1/+2
| | | | | | | | - Used by The Walking Dead: The Final Season
* | Merge pull request #3693 from ReinUsesLisp/clean-samplersbunnei2020-05-022-7/+7
|\ \ | | | | | | shader/texture: Support multiple unknown sampler properties
| * | shader_ir: Turn classes into data structuresReinUsesLisp2020-04-232-7/+7
| |/
* / texture_cache: Reintroduce preserve_contents accuratelyReinUsesLisp2020-04-271-25/+41
|/ | | | | | | | | | | | | This reverts commit 94b0e2e5dae4e0bd0021ac2d8fe1ff904a93ee69. preserve_contents proved to be a meaningful optimization. This commit reintroduces it but properly implemented on OpenGL. We have to make sure the clear removes all the previous contents of the image. It's not currently implemented on Vulkan because we can do smart things there that's preferred to be introduced in a separate commit.
* Address Feedback.Fernando Sahmkow2020-04-221-9/+6
|
* Address Feedback.Fernando Sahmkow2020-04-221-32/+18
|
* FenceManager: Manage syncpoints and rename fences to semaphores.Fernando Sahmkow2020-04-221-0/+7
|
* Rasterizer: Disable fence managing in synchronous gpu.Fernando Sahmkow2020-04-221-1/+1
|
* ThreadManager: Sync async reads on accurate gpu.Fernando Sahmkow2020-04-221-0/+15
|
* FenceManager: Implement should wait.Fernando Sahmkow2020-04-221-0/+11
|
* OpenGL: Implement Fencing backend.Fernando Sahmkow2020-04-221-1/+31
|
* TextureCache: Flush linear textures after finishing rendering.Fernando Sahmkow2020-04-221-2/+8
|
* GPU: Refactor synchronization on Async GPUFernando Sahmkow2020-04-221-2/+2
|
* Texture Cache: Implement OnCPUWrite and SyncGuestHostFernando Sahmkow2020-04-222-3/+63
|
* UI: Replasce accurate GPU option for GPU Accuracy LevelFernando Sahmkow2020-04-221-4/+4
|
* Merge pull request #3686 from lioncash/tablebunnei2020-04-191-3/+3
|\ | | | | texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indices
| * texture_cache/format_lookup_table: Fix incorrect green, blue, and alpha indicesLioncash2020-04-161-3/+3
| | | | | | | | | | Previously these were all using the red component to derive the indices, which is definitely not intentional.
* | Merge pull request #3673 from lioncash/extrabunnei2020-04-172-2/+2
|\ \ | | | | | | CMakeLists: Specify -Wextra on linux builds
| * | CMakeLists: Specify -Wextra on linux buildsLioncash2020-04-162-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | 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.
* | Merge pull request #3688 from lioncash/nequalRodrigo Locatti2020-04-162-0/+5
|\ \ | | | | | | surface_view: Add missing operator!= to ViewParams
| * | surface_view: Add missing operator!= to ViewParamsLioncash2020-04-162-0/+5
| |/ | | | | | | Provides logical symmetry to the interface.
* | Merge pull request #3687 from lioncash/constnessRodrigo Locatti2020-04-161-2/+2
|\ \ | | | | | | surface_base: Make IsInside() a const member function
| * | surface_base: Make IsInside() a const member functionLioncash2020-04-161-2/+2
| |/ | | | | | | This doesn't modify internal state, so this can be made const.
* | Merge pull request #3683 from lioncash/docsbunnei2020-04-161-4/+4
|\ \ | | | | | | video_core: Amend doxygen comment references
| * | video_core: Amend doxygen comment referencesLioncash2020-04-161-4/+4
| |/ | | | | | | Fixes broken documentation references.
* | Merge pull request #3649 from FernandoS27/3d-fixRodrigo Locatti2020-04-151-0/+6
|\ \ | |/ |/| Texture Cache: Read current data when flushing a 3D segment.
| * Texture Cache: Read current data when flushing a 3D segment.Fernando Sahmkow2020-04-151-0/+6
| | | | | | | | | | This PR corrects flushing of 3D segments when data of other segments is mixed, this aims to preserve the data in place.
* | Texture Cache: Only do buffer copies on accurate GPU. (#3634)Fernando Sahmkow2020-04-151-1/+3
|/ | | 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.
* texture_cache: Remove preserve_contentsReinUsesLisp2020-04-111-41/+25
| | | | | | | 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.
* Merge pull request #3610 from FernandoS27/gpu-cachesRodrigo Locatti2020-04-093-122/+75
|\ | | | | Refactor all the GPU Caches to use VAddr for cache addressing
| * Texture Cache: Use vAddr instead of physical memory for caching.Fernando Sahmkow2020-04-063-122/+75
| |
* | Merge pull request #3599 from ReinUsesLisp/revert-3499bunnei2020-04-071-4/+2
|\ \ | |/ |/| Revert "Merge pull request #3499 from ReinUsesLisp/depth-2d-array"
| * Revert "Merge pull request #3499 from ReinUsesLisp/depth-2d-array"ReinUsesLisp2020-04-041-4/+2
| | | | | | | | | | | | | | This reverts commit 41905ee467b24172ba93e3fcd665bb4e4806a45a, reversing changes made to 35145bd529c3517e2c366efc764a762092d96edf. It causes regressions in several games.
* | video_core: Use native ASTC when availableReinUsesLisp2020-04-015-65/+59
|/
* Merge pull request #3501 from ReinUsesLisp/rgba16-snormRodrigo Locatti2020-03-161-1/+2
|\ | | | | video_core: Implement RGBA16_SNORM
| * video_core: Implement RGBA16_SNORMReinUsesLisp2020-03-131-1/+2
| | | | | | | | Implement RGBA16_SNORM with the current API. Nothing special here.
* | Merge pull request #3500 from ReinUsesLisp/incompatible-typesFernando Sahmkow2020-03-141-2/+39
|\ \ | | | | | | texture_cache: Report incompatible textures as black
| * | texture_cache: Report incompatible textures as blackReinUsesLisp2020-03-121-2/+39
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* / texture_cache/surface_params: Force depth=1 on 2D texturesReinUsesLisp2020-03-121-2/+4
|/ | | | | | | 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.
* renderer_opengl: Reintroduce dirty flags for render targetsReinUsesLisp2020-02-281-1/+19
|
* gl_rasterizer: Remove dirty flagsReinUsesLisp2020-02-281-19/+1
|
* Merge pull request #3417 from ReinUsesLisp/r32ibunnei2020-02-251-1/+2
|\ | | | | texture: Implement R32I
| * texture: Implement R32IReinUsesLisp2020-02-151-1/+2
| |
* | Merge pull request #3425 from ReinUsesLisp/layered-framebufferbunnei2020-02-243-31/+26
|\ \ | | | | | | texture_cache: Implement layered framebuffer attachments
| * | texture_cache: Implement layered framebuffer attachmentsReinUsesLisp2020-02-163-31/+26
| |/ | | | | | | | | | | 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.
* | Merge pull request #3422 from ReinUsesLisp/buffer-flushbunnei2020-02-231-0/+4
|\ \ | | | | | | surface_base: Implement texture buffer flushes
| * | surface_base: Implement texture buffer flushesReinUsesLisp2020-02-161-0/+4
| |/ | | | | | | | | Implement downloads to guest memory from texture buffers on the generic cache and OpenGL.
* / texture_cache: Avoid matches in 3D texturesReinUsesLisp2020-02-161-8/+11
|/ | | | | Code before this commit was trying to match 3D textures with another target. Fix that.
* texture_cache/surface_base: Fix layered break downReinUsesLisp2020-01-271-1/+1
| | | | | Layered break downs was passing "layer" as a "depth" parameter. This commit addresses that.
* Merge pull request #3311 from ReinUsesLisp/z32fx24s8bunnei2020-01-171-1/+1
|\ | | | | format_lookup_table: Fix ZF32_X24S8 component types
| * format_lookup_table: Fix ZF32_X24S8 component typesReinUsesLisp2020-01-161-1/+1
| | | | | | | | | | | | Component types for ZF32_X24S8 were using UNORM. Drivers will set FLOAT, UINT, UNORM, UNORM; causing a format mismatch. This commit addresses that.
* | texture_cache/surface_params: Make GetNumLayers publicReinUsesLisp2020-01-141-4/+5
|/
* Texture Cache: Improve documentationFernando Sahmkow2019-12-222-4/+5
|
* Texture Cache: Address FeedbackFernando Sahmkow2019-12-222-11/+11
|
* Texture Cache: Add HLE methods for building 3D textures within the GPU in certain scenarios.Fernando Sahmkow2019-12-223-1/+139
| | | | | | 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.
* Merge pull request #2987 from FernandoS27/texture-invalidbunnei2019-12-023-32/+101
|\ | | | | Texture_Cache: Redo invalid Surfaces handling.
| * Texture_Cache: Redo invalid Surfaces handling.Fernando Sahmkow2019-11-203-32/+101
| | | | | | | | | | | | | | 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.
* | texture_cache/surface_base: Fix out of bounds texture viewsReinUsesLisp2019-11-291-7/+4
|/ | | | | | | | | | 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.
* format_lookup_table: Address feedbackReinUsesLisp2019-11-152-30/+24
| | | | | | | | format_lookup_table: Drop bitfields format_lookup_table: Use std::array for definition table format_lookup_table: Include <limits> instead of <numeric>
* texture_cache: Use a table instead of switch for texture formatsReinUsesLisp2019-11-155-12/+288
| | | | | | 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.
* texture_cache: Drop abstracted ComponentTypeReinUsesLisp2019-11-143-17/+5
| | | | | | | | | 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.
* Merge pull request #2978 from lioncash/doxygenRodrigo Locatti2019-10-171-57/+78
|\ | | | | video_core/texture_cache: Amend Doxygen references
| * video_core/texture_cache: Amend Doxygen referencesLioncash2019-10-151-57/+78
| | | | | | | | | | | | 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.
* | texture_cache: Avoid unnecessary surface copies within PickStrategy() and TryReconstructSurface()Lioncash2019-10-161-2/+2
| | | | | | | | | | | | We can take these by const reference and avoid making unnecessary copies, preventing some atomic reference count increments and decrements.
* | common: Rename binary_find.h to algorithm.hLioncash2019-10-152-3/+3
|/ | | | | | 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.
* Texture_Cache: Blit Deduction corrections and simplifications.Fernando Sahmkow2019-10-051-18/+20
|
* TextureCache: Add the ability to deduce if two textures are depth on blit.Fernando Sahmkow2019-10-051-2/+142
|
* texture_cache: Minor changesReinUsesLisp2019-09-064-19/+17
|
* gl_rasterizer: Implement image bindingsReinUsesLisp2019-09-063-30/+98
|
* texture_cache: Pass TIC to texture cacheReinUsesLisp2019-09-063-26/+24
|
* video_core: Silent miscellaneous warnings (#2820)Rodrigo Locatti2019-08-302-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | * texture_cache/surface_params: Remove unused local variable * rasterizer_interface: Add missing documentation commentary * maxwell_dma: Remove unused rasterizer reference * video_core/gpu: Sort member declaration order to silent -Wreorder warning * fermi_2d: Remove unused MemoryManager reference * video_core: Silent unused variable warnings * buffer_cache: Silent -Wreorder warnings * kepler_memory: Remove unused MemoryManager reference * gl_texture_cache: Add missing override * buffer_cache: Add missing include * shader/decode: Remove unused variables
* Merge pull request #2739 from lioncash/cflowbunnei2019-07-251-3/+2
|\ | | | | video_core/control_flow: Minor changes/warning cleanup
| * video_core: Resolve -Wreorder warningsLioncash2019-07-191-3/+2
| | | | | | | | | | Ensures that the constructor members are always initialized in the order that they're declared in.
* | Texture_Cache: Rebase FixesFernando Sahmkow2019-07-171-6/+0
| |
* | Maxwell3D: Rework the dirty system to be more consistant and scaleableFernando Sahmkow2019-07-171-5/+12
|/
* Texture_Cache: Address FeedbackFernando Sahmkow2019-07-143-13/+17
|
* Texture_Cache: Remove some unprecise fallback case and clang formatFernando Sahmkow2019-07-142-13/+5
|
* Texture_Cache: Force Framebuffer reset if an active render target is unregistered.Fernando Sahmkow2019-07-143-10/+36
|
* Texture_Cache: Correct Linear Structural Match.Fernando Sahmkow2019-07-141-3/+6
|
* texture_cache: Address FeedbackFernando Sahmkow2019-07-051-2/+2
|
* texture_cache: Correct Texture Buffer UploadingFernando Sahmkow2019-07-051-0/+2
|
* texture_cache: Pack sibling queries inside a methodReinUsesLisp2019-06-301-6/+8
|
* texture_cache: Use std::vector reservation for sampled_texturesReinUsesLisp2019-06-301-17/+10
|
* texture_cache: Style changesReinUsesLisp2019-06-302-8/+4
|
* texture_cache: Use std::array for siblings_tableReinUsesLisp2019-06-291-10/+13
|
* texture_cache: Address feedbackReinUsesLisp2019-06-292-11/+12
|
* texture_cache: Correct variable naming.Fernando Sahmkow2019-06-261-3/+3
|
* texture_cache: Corrections, documentation and assertsFernando Sahmkow2019-06-261-42/+42
|
* surface_params: Corrections, asserts and documentation.Fernando Sahmkow2019-06-262-43/+58
|
* copy_params: use constexpr for constructorFernando Sahmkow2019-06-251-3/+4
|
* texture_cache: Query MemoryManager from the systemFernando Sahmkow2019-06-251-11/+7
|
* texture_cache: Include "core/core.h"ReinUsesLisp2019-06-241-4/+1
|
* texture_cache/surface_view: Address feedbackReinUsesLisp2019-06-241-1/+0
|
* texture_cache/surface_base: Address feedbackReinUsesLisp2019-06-242-2/+10
|
* texture_cache: Style and CorrectionsFernando Sahmkow2019-06-213-2/+4
|
* texture_cache: Eliminate linear textures fallthroughFernando Sahmkow2019-06-211-4/+0
|
* texture_cache: Correct format R16U as siblingFernando Sahmkow2019-06-212-1/+2
|
* texture_cache: Implement texception detection and texture barriers.Fernando Sahmkow2019-06-211-5/+32
|
* texture_cache: Corrections to buffers and shadow formats use.Fernando Sahmkow2019-06-211-10/+34
|
* texture_cache: Implement Irregular Views in surfacesFernando Sahmkow2019-06-212-4/+24
|
* surface: Correct format S8Z24Fernando Sahmkow2019-06-211-4/+0
|
* texture_cache: Initialize all siblings to invalid pixel format.Fernando Sahmkow2019-06-211-6/+15
|
* decoders: correct block calculationFernando Sahmkow2019-06-211-0/+16
|
* texture_cache: Use siblings textures on Rebuild and fix possible error on blittingFernando Sahmkow2019-06-211-10/+23
|
* texture_cache: Implement siblings texture formats.Fernando Sahmkow2019-06-212-12/+31
|
* texture_cache: correct texture buffer on surface paramsFernando Sahmkow2019-06-211-4/+11
|
* texture_cache: eliminate accelerated depth->color/color->depth copies due to driver instability.Fernando Sahmkow2019-06-211-8/+1
|
* texture_cache: correct mutex locksFernando Sahmkow2019-06-211-4/+4
|
* texture_cache: Don't Image Copy if component types differFernando Sahmkow2019-06-211-1/+2
|
* texture_cache: move some large methods to cpp filesFernando Sahmkow2019-06-214-139/+135
|
* texture_cache: Optimize GetSurface and use references on functions that don't change a surface.Fernando Sahmkow2019-06-211-6/+6
|
* texture_cache: Implement Buffer Copy and detect Turing GPUs Image CopiesFernando Sahmkow2019-06-211-9/+31
|
* texture_cache uncompress-compress is untopological.Fernando Sahmkow2019-06-214-14/+48
| | | | | | 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.
* texture_cache: Correct copying between compressed and uncompressed formatsFernando Sahmkow2019-06-213-10/+27
|
* texture_cache: Only load on recycle with accurate GPU.Fernando Sahmkow2019-06-211-2/+3
| | | | | Testing so far has proven this to be quite safe as texture memory read added a 2-5ms load to the current cache.
* Fix rebase errorsFernando Sahmkow2019-06-211-0/+4
|
* texture_cache: Handle uncontinuous surfaces.Fernando Sahmkow2019-06-213-19/+79
|
* texture_cache: return null surface on invalid addressFernando Sahmkow2019-06-211-0/+12
|
* texture_cache: Add checks for texture buffers.Fernando Sahmkow2019-06-211-2/+16
|
* texture_cache: Fermi2D reform and implement View MirageFernando Sahmkow2019-06-213-20/+49
| | | | | This also does some fixes on compressed textures reinterpret and on the Fermi2D engine in general.
* texture_cache: loose TryReconstructSurface when accurate GPU is not on.Fernando Sahmkow2019-06-212-3/+19
| | | | Also corrects some asserts.
* texture_cache: Document the most important methods.Fernando Sahmkow2019-06-211-8/+87
|
* texture_cache: Try to Reconstruct Surface on bigger than overlap.Fernando Sahmkow2019-06-211-4/+11
| | | | | This fixes clouds in SMO Cap Kingdom and lens on Cloud Kingdom. Also moved accurate_gpu setting check to Pick Strategy
* texture_cache: Implement Guard mechanismFernando Sahmkow2019-06-211-1/+8
|
* texture_cache: General FixesFernando Sahmkow2019-06-214-33/+68
| | | | | | | Fixed ASTC mipmaps loading Fixed alignment on openGL upload/download Fixed Block Height Calculation Removed unalign_height
* surface_params: Ensure pitch is always written to avoid surface leaksReinUsesLisp2019-06-211-0/+2
|
* gl_framebuffer_cache: Use a hashed struct to cache framebuffersReinUsesLisp2019-06-211-1/+1
|
* texture_cache return invalid buffer on deactivated color_maskFernando Sahmkow2019-06-211-0/+5
|
* surface_params: Optimize CreateForTextureReinUsesLisp2019-06-211-2/+4
| | | | | Instead of using Common::AlignUp, use Common::AlignBits to align the texture compression factor.
* texture_cache: Add ASync ProtectionsFernando Sahmkow2019-06-211-0/+10
|
* Remove Framebuffer reconfiguration and restrict rendertarget protectionFernando Sahmkow2019-06-212-26/+19
|
* texture_cache: Implement GPU Dirty FlagsFernando Sahmkow2019-06-211-15/+22
|
* texture_cache: Optimize GetMipBlockHeight and GetMipBlockDepthFernando Sahmkow2019-06-211-13/+6
|
* texture_cache: Implement L1_Inner_cacheFernando Sahmkow2019-06-211-13/+30
|
* video_core: Use un-shifted block sizes to avoid integer divisionsReinUsesLisp2019-06-214-24/+28
| | | | | | | | | | | | 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).
* texture_cache: Change internal cache from lists to vectorsReinUsesLisp2019-06-211-6/+7
|
* Reduce amount of size calculations.Fernando Sahmkow2019-06-215-86/+85
|
* texture_cache: Correct premature texceptionsFernando Sahmkow2019-06-212-7/+36
| | | | | | | | | | | | Due to our current infrastructure, it is possible for a mipmap to be set on as a render target before a texception of that mipmap's superset be set afterwards. This is problematic as we rely on texture views to set up texceptions and protecting render targets targets for 3D texture rendering. One simple solution is to configure framebuffers after texture setup but this brings other problems. This solution, forces a reconfiguration of the framebuffers after such event happens.
* texture_cache: Implement guest flushingFernando Sahmkow2019-06-212-8/+25
|
* Fixes to mipmap's process and reconstruct processFernando Sahmkow2019-06-212-3/+3
|
* surface_base: Add parenthesis to EmplaceOverview's predicateReinUsesLisp2019-06-211-3/+2
|
* Texture Cache: Implement Blitting and Fermi CopiesFernando Sahmkow2019-06-211-4/+15
|
* surface_view: Add constructor for ViewParamsReinUsesLisp2019-06-212-28/+19
|
* surface_base: Split BreakDown into layered and non-layered variantsReinUsesLisp2019-06-211-45/+48
|
* surface_base: Silence truncation warnings and minor renames and reorderingReinUsesLisp2019-06-212-32/+37
|
* copy_params: Use constructor instead of C-like initializationReinUsesLisp2019-06-213-47/+39
|
* Correct Mipmaps View method in Texture CacheFernando Sahmkow2019-06-211-3/+2
|
* Change texture_cache chaching from GPUAddr to CacheAddrFernando Sahmkow2019-06-213-78/+59
| | | | | This also reverses the changes to make invalidation and flushing through the GPU address.
* Corrections to Structural MatchingFernando Sahmkow2019-06-212-24/+53
| | | | | The texture will now be reconstructed if the width only matches on GoB alignment.
* Implement Texture Cache V2Fernando Sahmkow2019-06-211-88/+366
|
* Correct Surface Base and Views for new Texture CacheFernando Sahmkow2019-06-217-380/+466
|
* texture_cache: Remove execution context copies from the texture cacheReinUsesLisp2019-06-214-151/+41
| | | | | This is done to simplify the OpenGL implementation, it is needed for Vulkan.
* texture_cache: Split texture cache into different filesReinUsesLisp2019-06-218-0/+1364