summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* shader: Remove old shader managementReinUsesLisp2021-07-231-482/+0
|
* common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270)Morph2021-05-261-77/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * common: fs: fs_types: Create filesystem types Contains various filesystem types used by the Common::FS library * common: fs: fs_util: Add std::string to std::u8string conversion utility * common: fs: path_util: Add utlity functions for paths Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library * common: fs: file: Rewrite the IOFile implementation * common: fs: Reimplement Common::FS library using std::filesystem * common: fs: fs_paths: Add fs_paths to replace common_paths * common: fs: path_util: Add the rest of the path functions * common: Remove the previous Common::FS implementation * general: Remove unused fs includes * string_util: Remove unused function and include * nvidia_flags: Migrate to the new Common::FS library * settings: Migrate to the new Common::FS library * logging: backend: Migrate to the new Common::FS library * core: Migrate to the new Common::FS library * perf_stats: Migrate to the new Common::FS library * reporter: Migrate to the new Common::FS library * telemetry_session: Migrate to the new Common::FS library * key_manager: Migrate to the new Common::FS library * bis_factory: Migrate to the new Common::FS library * registered_cache: Migrate to the new Common::FS library * xts_archive: Migrate to the new Common::FS library * service: acc: Migrate to the new Common::FS library * applets/profile: Migrate to the new Common::FS library * applets/web: Migrate to the new Common::FS library * service: filesystem: Migrate to the new Common::FS library * loader: Migrate to the new Common::FS library * gl_shader_disk_cache: Migrate to the new Common::FS library * nsight_aftermath_tracker: Migrate to the new Common::FS library * vulkan_library: Migrate to the new Common::FS library * configure_debug: Migrate to the new Common::FS library * game_list_worker: Migrate to the new Common::FS library * config: Migrate to the new Common::FS library * configure_filesystem: Migrate to the new Common::FS library * configure_per_game_addons: Migrate to the new Common::FS library * configure_profile_manager: Migrate to the new Common::FS library * configure_ui: Migrate to the new Common::FS library * input_profiles: Migrate to the new Common::FS library * yuzu_cmd: config: Migrate to the new Common::FS library * yuzu_cmd: Migrate to the new Common::FS library * vfs_real: Migrate to the new Common::FS library * vfs: Migrate to the new Common::FS library * vfs_libzip: Migrate to the new Common::FS library * service: bcat: Migrate to the new Common::FS library * yuzu: main: Migrate to the new Common::FS library * vfs_real: Delete the contents of an existing file in CreateFile Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now. * input_profiles: Don't iterate the input profile dir if it does not exist Silences an error produced in the log if the directory does not exist. * game_list_worker: Skip parsing file if the returned VfsFile is nullptr Prevents crashes in GetLoader when the virtual file is nullptr * common: fs: Validate paths for path length * service: filesystem: Open the mod load directory as read only
* hle: kernel: Rename Process to KProcess.bunnei2021-05-061-1/+1
|
* common: Move settings to common from core.bunnei2021-04-151-1/+1
| | | | - Removes a dependency on core and input_common from common.
* video_core: Make use of ordered container contains() where applicableLioncash2020-12-071-1/+1
| | | | | | With C++20, we can use the more concise contains() member function instead of comparing the result of the find() call with the end iterator.
* video_core: Enforce -Wredundant-move and -Wpessimizing-moveReinUsesLisp2020-10-281-2/+1
| | | | Silence three warnings and make them errors to avoid introducing more in the future.
* video_core: Remove all Core::System references in rendererReinUsesLisp2020-09-061-3/+7
| | | | | | | | | 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 #4521 from lioncash/optionalcachebunnei2020-08-221-11/+12
|\ | | | | gl_shader_disk_cache: Make use of std::nullopt where applicable
| * gl_shader_disk_cache: Make use of std::nullopt where applicableLioncash2020-08-141-11/+12
| | | | | | | | | | Allows the compiler to avoid unnecessarily zeroing out the internal buffer of std::optional on some implementations.
* | common/fileutil: Convert namespace to Common::FSLioncash2020-08-161-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | Migrates a remaining common file over to the Common namespace, making it consistent with the rest of common files. This also allows for high-traffic FS related code to alias the filesystem function namespace as namespace FS = Common::FS; for more concise typing.
* | common/compression: Roll back std::span changesLioncash2020-08-151-1/+2
| | | | | | | | Seems like all compilers don't support std::span yet.
* | zstd_compression: Make use of std::span in interfacesLioncash2020-07-251-2/+1
|/ | | | Allows condensing the data and size parameters into a single argument.
* 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>
* shader/texture: Join separate image and sampler pairs offlineReinUsesLisp2020-06-051-15/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | Games using D3D idioms can join images and samplers when a shader executes, instead of baking them into a combined sampler image. This is also possible on Vulkan. One approach to this solution would be to use separate samplers on Vulkan and leave this unimplemented on OpenGL, but we can't do this because there's no consistent way of determining which constant buffer holds a sampler and which one an image. We could in theory find the first bit and if it's in the TIC area, it's an image; but this falls apart when an image or sampler handle use an index of zero. The used approach is to track for a LOP.OR operation (this is done at an IR level, not at an ISA level), track again the constant buffers used as source and store this pair. Then, outside of shader execution, join the sample and image pair with a bitwise or operation. This approach won't work on games that truly use separate samplers in a meaningful way. For example, pooling textures in a 2D array and determining at runtime what sampler to use. This invalidates OpenGL's disk shader cache :) - Used mostly by D3D ports to Switch
* engines/maxwell_3d: Add TFB registers and store them in shader registryReinUsesLisp2020-03-091-1/+1
|
* const_buffer_engine_interface: Store component typesReinUsesLisp2020-03-091-1/+1
| | | | | This is required for Vulkan. Sampling integer textures with float handles is illegal.
* shader/registry: Cache tessellation stateReinUsesLisp2020-03-091-1/+1
|
* shader/registry: Store graphics and compute metadataReinUsesLisp2020-03-091-5/+7
| | | | | Store information GLSL forces us to provide but it's dynamic state in hardware (workgroup sizes, primitive topology, shared memory size).
* gl_shader_cache: Rework shader cache and remove post-specializationsReinUsesLisp2020-03-091-269/+133
| | | | | Instead of pre-specializing shaders and then post-specializing them, drop the later and only "specialize" the shader while decoding it.
* Shader_IR: Store Bound buffer on Shader UsageFernando Sahmkow2020-01-241-4/+8
|
* gl_shader_cache: Remove dynamic BaseBinding specializationReinUsesLisp2019-11-231-3/+2
|
* video_core: Unify ProgramType and ShaderStage into ShaderTypeReinUsesLisp2019-11-231-23/+21
|
* gl_rasterizer: Bind graphics images to draw commandsReinUsesLisp2019-11-231-1/+1
| | | | | Images were not being bound to draw invocations because these would require a cache invalidation.
* gl_shader_cache: Specialize local memory size for compute shadersReinUsesLisp2019-11-231-2/+2
| | | | | Local memory size in compute shaders was stubbed with an arbitary size. This commit specializes local memory size from guest GPU parameters.
* gl_shader_cache: Specialize shared memory sizeReinUsesLisp2019-11-231-2/+2
| | | | | Shared memory was being declared with an undefined size. Specialize from guest GPU parameters the compute shader's shared memory size.
* gl_shader_cache: Specialize shader workgroupReinUsesLisp2019-11-231-2/+2
| | | | | | Drop the usage of ARB_compute_variable_group_size and specialize compute shaders instead. This permits compute to run on AMD and Intel proprietary drivers.
* shader/texture: Deduce texture buffers from lockerReinUsesLisp2019-11-231-16/+17
| | | | | Instead of specializing shaders to separate texture buffers from 1D textures, use the locker to deduce them while they are being decoded.
* gl_shader_disk_cache: Store and load fast BRXReinUsesLisp2019-10-251-25/+158
|
* gl_shader_decompiler: Move entries to a separate functionReinUsesLisp2019-10-251-251/+29
|
* gl_shader_disk_cache: Properly ignore existing cacheReinUsesLisp2019-10-061-12/+16
| | | | | Previously old entries where appended to the file even if the shader cache was ignored at boot. Address that issue.
* gl_shader_decompiler: Use uint for images and fix SUATOMReinUsesLisp2019-09-211-8/+4
| | | | | | In the process remove implementation of SUATOM.MIN and SUATOM.MAX as these require a distinction between U32 and S32. These have to be implemented with imageCompSwap loop.
* shader/image: Implement SULD and remove irrelevant codeReinUsesLisp2019-09-211-10/+0
| | | | | * Implement SULD as float. * Remove conditional declaration of GL_ARB_shader_viewport_layer_array.
* shader/image: Implement SUATOM and fix SUSTReinUsesLisp2019-09-111-6/+14
|
* gl_shader_decompiler: Keep track of written images and mark them as modifiedReinUsesLisp2019-09-061-5/+10
|
* gl_rasterizer: Implement compute shadersReinUsesLisp2019-07-151-1/+1
|
* gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shadersReinUsesLisp2019-07-081-0/+10
| | | | | | | | | | | | | This commit implements gl_ViewportIndex and gl_Layer in vertex and geometry shaders. In the case it's used in a vertex shader, it requires ARB_shader_viewport_layer_array. This extension is available on AMD and Nvidia devices (mesa and proprietary drivers), but not available on Intel on any platform. At the moment of writing this description I don't know if this is a hardware limitation or a driver limitation. In the case that ARB_shader_viewport_layer_array is not available, writes to these registers on a vertex shader are ignored, with the appropriate logging.
* gl_shader_disk_cache: Address feedbackReinUsesLisp2019-06-241-2/+5
|
* shader_cache: Correct versioning and size calculation.Fernando Sahmkow2019-06-211-1/+1
|
* Fix rebase errorsFernando Sahmkow2019-06-211-1/+1
|
* gl_shader_decompiler: Implement image binding settingsReinUsesLisp2019-06-211-9/+34
|
* gl_rasterizer: Track texture buffer usageReinUsesLisp2019-06-211-2/+2
|
* gl_shader_cache: Fix clang strict standard build issuesReinUsesLisp2019-05-211-5/+3
|
* gl_shader_disk_cache: in-class initialize virtual file offset of ShaderDiskCacheOpenGLLioncash2019-05-191-2/+1
| | | | | | Given the offset is assigned a fixed value in the constructor, we can just assign it directly and get rid of the need to write the name of the variable again in the constructor initializer list.
* gl_shader_disk_cache: Default ShaderDiskCacheOpenGL's destructor in the cpp fileLioncash2019-05-191-0/+2
| | | | | | Given the disk shader cache contains non-trivial types, we should default it in the cpp file in order to prevent inlining of the complex destruction logic.
* gl_shader_disk_cache: Remove redundant code string construction in LoadDecompiledEntry()Lioncash2019-05-191-2/+2
| | | | | | | We don't need to load the code into a vector and then construct a string over the data. We can just create a string with the necessary size ahead of time, and read the data directly into it, getting rid of an unnecessary heap allocation.
* gl_shader_disk_cache: Make variable non-const in decompiled entry caseLioncash2019-05-191-1/+1
| | | | | | std::move does nothing when applied to a const variable. Resources can't be moved if the object is immutable. With this change, we don't end up making several unnecessary heap allocations and copies.
* gl_shader_disk_cache: Special-case boolean handlingLioncash2019-05-191-23/+20
| | | | | | | | | | | | | Booleans don't have a guaranteed size, but we still want to have them integrate into the disk cache system without needing to actually use a different type. We can do this by supplying non-template overloads for the bool type. Non-template overloads always have precedence during function resolution, so this is safe to provide. This gets rid of the need to smatter ternary conditionals, as well as the need to use u8 types to store the value in.
* gl_shader_disk_cache: Skip stored shader variants instead of assertingReinUsesLisp2019-05-011-1/+4
| | | | | | | Instead of asserting on already stored shader variants, silently skip them. This shouldn't be happening but when a shader is invalidated and it is not stored in the shader cache, this assert would hit and save that shader anyways when the asserts are disabled.
* Re added new lines at the end of filesFreddyFunk2019-04-231-1/+1
|
* gl_shader_disk_cache: Compress precompiled shader cache file with Zstandardunknown2019-04-231-6/+10
|
* gl_shader_disk_cache: Use VectorVfsFile for the virtual precompiled shader cache fileunknown2019-04-231-92/+112
|
* gl_shader_disk_cache: Remove per shader compressionunknown2019-04-231-44/+11
|
* Merge pull request #2348 from FernandoS27/guest-bindlessbunnei2019-04-181-5/+9
|\ | | | | Implement Bindless Textures on Shader Decompiler and GL backend
| * Move ConstBufferAccessor to Maxwell3d, correct mistakes and clang format.Fernando Sahmkow2019-04-081-3/+4
| |
| * Unify both sampler types.Fernando Sahmkow2019-04-081-3/+6
| |
| * Implement Bindless Samplers and TEX_B in the IR.Fernando Sahmkow2019-04-081-1/+1
| |
* | shader_ir: Implement STG, keep track of global memory usage and flushReinUsesLisp2019-04-141-3/+10
|/
* common/zstd_compression: simplify decompression interfaceunknown2019-03-291-3/+2
|
* gl_shader_disk_cache: Fixup clang formatunknown2019-03-291-2/+3
|
* gl_shader_disk_cache: Use Zstandard for compressionunknown2019-03-291-6/+6
|
* gl_shader_disk_cache: Use LZ4HC with compression level 9 instead of compression level 12 for less compression timeunknown2019-03-291-3/+3
|
* Addressed feedbackunknown2019-03-291-6/+6
|
* gl_shader_disk_cache: Use better compression for transferable and precompiled shader disk chache filesunknown2019-03-291-2/+2
|
* data_compression: Move LZ4 compression from video_core/gl_shader_disk_cache to common/data_compressionunknown2019-03-291-38/+8
|
* gl_shader_disk_cache: Remove #pragma once from cpp fileLioncash2019-02-271-2/+0
| | | | This is only necessary in headers. Silences a warning with clang.
* gl_shader_disk_cache: Check LZ4 size limitFrederic L2019-02-071-0/+4
| | | Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
* gl_shader_disk_cache: Consider compressed size zero as an errorFrederic L2019-02-071-2/+2
| | | Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
* gl_shader_disk_cache: Use unordered containersReinUsesLisp2019-02-071-6/+6
|
* gl_shader_disk_cache: Pass core system as argument and guard against games without title idsReinUsesLisp2019-02-071-4/+10
|
* gl_shader_disk_cache: Guard reads and writes against failureReinUsesLisp2019-02-071-210/+315
|
* gl_shader_disk_cache: Address miscellaneous feedbackReinUsesLisp2019-02-071-8/+18
|
* gl_shader_disk_cache: Pass return values returning instead of by parametersReinUsesLisp2019-02-071-25/+22
|
* gl_shader_disk_cache: Compress program binaries using LZ4ReinUsesLisp2019-02-071-7/+28
|
* gl_shader_disk_cache: Compress GLSL code using LZ4ReinUsesLisp2019-02-071-5/+56
|
* gl_shader_disk_cache: Save GLSL and entries into the precompiled fileReinUsesLisp2019-02-071-21/+156
|
* settings: Hide shader cache behind a settingReinUsesLisp2019-02-071-0/+21
|
* gl_shader_disk_cache: Invalidate shader cache changes with CMake hashReinUsesLisp2019-02-071-7/+16
|
* gl_shader_disk_cache: Add transferable cache invalidationReinUsesLisp2019-02-071-0/+5
|
* gl_shader_disk_cache: Add precompiled loadReinUsesLisp2019-02-071-0/+39
|
* gl_shader_disk_cache: Add precompiled saveReinUsesLisp2019-02-071-0/+43
|
* gl_shader_disk_cache: Add transferable loadReinUsesLisp2019-02-071-0/+52
|
* gl_shader_disk_cache: Add transferable storesReinUsesLisp2019-02-071-0/+92
|
* gl_shader_disk_cache: Add ShaderDiskCacheOpenGL class and helpersReinUsesLisp2019-02-071-0/+52
|
* gl_shader_disk_cache: Add file and move BaseBindings declarationReinUsesLisp2019-02-071-0/+14