summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_cache.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-01-30gl_compute_pipeline: Force context flush when loading shader cacheameerj1-1/+2
2023-01-30gl_graphics_pipeline: Force context flush when loading shader cacheameerj1-1/+2
2022-12-13renderer_opengl: refactor context acquireLiam1-0/+1
2022-11-23general: fix compile for Apple ClangLiam1-1/+0
2022-10-06VideoCore: implement channels on gpu caches.Fernando Sahmkow1-6/+3
2022-04-23general: Convert source file copyright comments over to SPDXMorph1-3/+2
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2022-03-19video_core: Reduce unused includesameerj1-5/+0
2021-07-23gl_shader_cache: Fixes for async shadersameerj1-0/+2
2021-07-23shader: Unify shader stage typesReinUsesLisp1-1/+0
2021-07-23gl_shader_cache: Check previous pipeline before checking hash mapReinUsesLisp1-1/+4
Port optimization from Vulkan.
2021-07-23shader: Split profile and runtime info headersReinUsesLisp1-0/+1
2021-07-23shader: Add support for native 16-bit floatsReinUsesLisp1-0/+3
2021-07-23gl_shader_cache: Implement async shadersameerj1-23/+11
2021-07-23gl_shader_cache: Store workers in shader cache objectReinUsesLisp1-0/+7
2021-07-23shader: Handle host exceptionsReinUsesLisp1-3/+2
2021-07-23gl_shader_cache: Add disk shader cacheReinUsesLisp1-4/+6
2021-07-23gl_shader_cache: Rename Program abstractions into PipelineReinUsesLisp1-16/+16
2021-07-23gl_shader_cache,glasm: Conditionally use typeless image reads extensionReinUsesLisp1-0/+2
2021-07-23shader: Initial OpenGL implementationReinUsesLisp1-51/+47
2021-07-23shader: Move pipeline cache logic to separate filesReinUsesLisp1-13/+45
Move code to separate files to be able to reuse it from OpenGL. This greatly simplifies the pipeline cache logic on Vulkan. Transform feedback state is not yet abstracted and it's still intrusively stored inside vk_pipeline_cache. It will be moved when needed on OpenGL.
2021-07-23shader: Remove old shader managementReinUsesLisp1-100/+2
2021-06-22bootmanager: Use std::stop_source for stopping emulationReinUsesLisp1-1/+1
Use its std::stop_token to abort shader cache loading. Using std::stop_token instead of std::atomic_bool allows the usage of other utilities like std::stop_callback.
2020-12-05video_core: Resolve more variable shadowing scenarios pt.3Lioncash1-4/+5
Cleans out the rest of the occurrences of variable shadowing and makes any further occurrences of shadowing compiler errors.
2020-12-04video_core: Resolve more variable shadowing scenariosLioncash1-1/+1
Resolves variable shadowing scenarios up to the end of the OpenGL code to make it nicer to review. The rest will be resolved in a following commit.
2020-09-06video_core: Remove all Core::System references in rendererReinUsesLisp1-8/+15
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-07-17async shadersDavid Marcec1-6/+30
2020-06-24gl_shader_cache: Avoid use after move for program sizeReinUsesLisp1-1/+0
All programs had a size of zero due to this bug, skipping invalidations. While we are at it, remove some unused forward declarations.
2020-06-07gl_shader_cache: Use generic shader cacheReinUsesLisp1-31/+20
Trivially port the generic shader cache to OpenGL.
2020-05-19renderer_opengl: Add assembly program code pathsReinUsesLisp1-4/+11
Add code required to use OpenGL assembly programs based on NV_gpu_program5. Decompilation for ARB programs is intended to be added in a follow up commit. This does **not** include ARB decompilation and it's not in an usable state. The intention behind assembly programs is to reduce shader stutter significantly on drivers supporting NV_gpu_program5 (and other required extensions). Currently only Nvidia's proprietary driver supports these extensions. Add a UI option hidden for now to avoid people enabling this option accidentally. This code path has some limitations that OpenGL compatibility doesn't have: - NV_shader_storage_buffer_object is limited to 16 entries for a single OpenGL context state (I don't know if this is an intended limitation, an specification issue or I am missing something). Currently causes issues on The Legend of Zelda: Link's Awakening. - NV_parameter_buffer_object can't bind buffers using an offset different to zero. The used workaround is to copy to a temporary buffer (this doesn't happen often so it's not an issue). On the other hand, it has the following advantages: - Shaders build a lot faster. - We have control over how floating point rounding is done over individual instructions (SPIR-V on Vulkan can't do this). - Operations on shared memory can be unsigned and signed. - Transform feedbacks are dynamic state (not yet implemented). - Parameter buffers (uniform buffers) are per stage, matching NVN and hardware's behavior. - The API to bind and create assembly programs makes sense, unlike ARB_separate_shader_objects.
2020-04-22ShaderCache/PipelineCache: Cache null shaders.Fernando Sahmkow1-0/+3
2020-04-06Shader/Pipeline Cache: Use VAddr instead of physical memory for addressing.Fernando Sahmkow1-7/+1
2020-03-09video_core: Rename "const buffer locker" to "registry"ReinUsesLisp1-4/+4
2020-03-09gl_shader_cache: Rework shader cache and remove post-specializationsReinUsesLisp1-64/+33
Instead of pre-specializing shaders and then post-specializing them, drop the later and only "specialize" the shader while decoding it.
2019-11-23gl_shader_cache: Remove dynamic BaseBinding specializationReinUsesLisp1-1/+1
2019-11-23video_core: Unify ProgramType and ShaderStage into ShaderTypeReinUsesLisp1-6/+7
2019-11-23gl_shader_cache: Specialize shader workgroupReinUsesLisp1-3/+3
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.
2019-10-25gl_shader_cache: Implement locker variants invalidationReinUsesLisp1-5/+10
2019-10-25gl_shader_disk_cache: Store and load fast BRXReinUsesLisp1-1/+6
2019-10-25gl_shader_decompiler: Move entries to a separate functionReinUsesLisp1-27/+39
2019-10-25Shader_Cache: setup connection of ConstBufferLockerFernando Sahmkow1-0/+1
2019-09-04gl_shader_cache: Remove special casing for geometry shadersReinUsesLisp1-21/+0
Now that ProgramVariants holds the primitive topology we no longer need to keep track of individual geometry shaders topologies.
2019-08-30video_core: Silent miscellaneous warnings (#2820)Rodrigo Locatti1-1/+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
2019-07-16gl_shader_cache: Fix clang-format issuesReinUsesLisp1-2/+1
2019-07-15gl_shader_cache: Address review commentariesReinUsesLisp1-3/+3
2019-07-15gl_rasterizer: Implement compute shadersReinUsesLisp1-3/+12
2019-07-04gl_shader_cache: Make CachedShader constructor privateZach Hilman1-3/+3
Fixes missing review comments introduced.
2019-06-21gl_rasterizer: Track texture buffer usageReinUsesLisp1-9/+8
2019-06-08gl_shader_cache: Use static constructors for CachedShader initializationReinUsesLisp1-10/+19
2019-05-30gl_shader_cache: Store a system class and drop global accessorsReinUsesLisp1-0/+1
2019-05-21gl_shader_cache: Use shared contexts to build shaders in parallelReinUsesLisp1-5/+9
2019-04-20RasterizerCache Redesign: Flush Fernando Sahmkow1-3/+4
flushing is now responsability of children caches instead of the cache object. This change will allow the specific cache to pass extra parameters on flushing and will allow more flexibility.
2019-04-14gl_shader_decompiler: Use variable AOFFI on supported hardwareReinUsesLisp1-2/+6
2019-04-04video_core/renderer_opengl: Remove unnecessary includesLioncash1-3/+2
Quite a few unused includes have built up over time, particularly on core/memory.h. Removing these includes means the source files including those files will no longer need to be rebuilt if they're changed, making compilation slightly faster in this scenario.
2019-03-16video_core: Refactor to use MemoryManager interface for all memory access.bunnei1-4/+4
# Conflicts: # src/video_core/engines/kepler_memory.cpp # src/video_core/engines/maxwell_3d.cpp # src/video_core/morton.cpp # src/video_core/morton.h # src/video_core/renderer_opengl/gl_global_cache.cpp # src/video_core/renderer_opengl/gl_global_cache.h # src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
2019-03-15gpu: Use host address for caching instead of guest address.bunnei1-9/+10
2019-02-07gl_shader_disk_cache: Use unordered containersReinUsesLisp1-10/+10
2019-02-07gl_shader_cache: Link loading screen with disk shader cache loadReinUsesLisp1-1/+4
2019-02-07gl_shader_disk_cache: Pass core system as argument and guard against games without title idsReinUsesLisp1-1/+5
2019-02-07gl_shader_disk_cache: Address miscellaneous feedbackReinUsesLisp1-3/+3
2019-02-07gl_shader_disk_cache: Save GLSL and entries into the precompiled fileReinUsesLisp1-5/+4
2019-02-07gl_shader_cache: Refactor to support disk shader cacheReinUsesLisp1-16/+43
2019-02-07gl_shader_disk_cache: Add file and move BaseBindings declarationReinUsesLisp1-10/+1
2019-02-07rasterizer_interface: Add disk cache entry for the rasterizerReinUsesLisp1-0/+3
2019-01-30gl_shader_cache: Use explicit bindingsReinUsesLisp1-53/+37
2019-01-30gl_rasterizer: Implement global memory managementReinUsesLisp1-1/+5
2019-01-15video_core: Rename glsl_decompiler to gl_shader_decompilerReinUsesLisp1-1/+1
2019-01-15video_core: Replace gl_shader_decompilerReinUsesLisp1-0/+1
2019-01-07gl_shader_cache: Use dirty flags for shadersReinUsesLisp1-0/+4
2018-12-19Fixed uninitialized memory due to missing returns in canaryDavid Marcec1-0/+1
Functions which are suppose to crash on non canary builds usually don't return anything which lead to uninitialized memory being used.
2018-12-09Implemented a shader unique identifier.Fernando Sahmkow1-0/+2
2018-11-20shader_cache: Only lock covered instructions.Markus Wick1-1/+2
2018-11-10gl_shader_decompiler: Guard out of bound geometry shader input readsReinUsesLisp1-6/+7
Geometry shaders follow a pattern that results in out of bound reads. This pattern is: - VSETP to predicate - Use that predicate to conditionally set a register a big number - Use the register to access geometry shaders At the time of writing this commit I don't know what's the intent of this number. Some drivers argue about these out of bound reads. To avoid this issue, input reads are guarded limiting reads to the highest posible vertex input of the current topology (e.g. points to 1 and triangles to 3).
2018-11-08rasterizer_cache: Remove reliance on the System singletonLioncash1-0/+4
Rather than have a transparent dependency, we can make it explicit in the interface. This also gets rid of the need to put the core include in a header.
2018-10-22Use standard UBO and fix/stylize the codeFernandoS271-10/+0
2018-10-22Cache uniform locations and restructure the implementationFernandoS271-3/+9
2018-10-22Remove SyncAlphaTest and clang formatFernandoS271-1/+0
2018-10-22Implemented Alpha TestingFernandoS271-0/+5
2018-10-16rasterizer_cache: Refactor to support in-order flushing.bunnei1-6/+4
2018-10-16rasterizer_cache: Reintroduce method for flushing.bunnei1-0/+3
2018-10-07gl_shader_decompiler: Implement geometry shadersReinUsesLisp1-2/+44
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi1-1/+1
2018-09-04gl_shader_cache: Use an u32 for the binding point cache.Markus Wick1-5/+5
The std::string generation with its malloc and free requirement was a noticeable overhead. Also switch to an ordered_map to avoid the std::hash call. As those maps usually have a size of two elements, the lookup time shall not matter.
2018-08-31gl_renderer: Cache textures, framebuffers, and shaders based on CPU address.bunnei1-4/+3
2018-08-31Report correct shader size.Markus Wick1-1/+1
Seems like this was an oversee in regards to 1fd979f50a9f4c21fa8cafba7268d959e3076924 It changed GLShader::ProgramCode to a std::vector, so sizeof is wrong.
2018-08-28renderer_opengl: Implement a new shader cache.bunnei1-0/+69