summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_decompiler.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-02-13video_core: Reimplement the buffer cacheReinUsesLisp1-1/+1
Reimplement the buffer cache using cached bindings and page level granularity for modification tracking. This also drops the usage of shared pointers and virtual functions from the cache. - Bindings are cached, allowing to skip work when the game changes few bits between draws. - OpenGL Assembly shaders no longer copy when a region has been modified from the GPU to emulate constant buffers, instead GL_EXT_memory_object is used to alias sub-buffers within the same allocation. - OpenGL Assembly shaders stream constant buffer data using glProgramBufferParametersIuivNV, from NV_parameter_buffer_object. In theory this should save one hash table resolve inside the driver compared to glBufferSubData. - A new OpenGL stream buffer is implemented based on fences for drivers that are not Nvidia's proprietary, due to their low performance on partial glBufferSubData calls synchronized with 3D rendering (that some games use a lot). - Most optimizations are shared between APIs now, allowing Vulkan to cache more bindings than before, skipping unnecesarry work. This commit adds the necessary infrastructure to use Vulkan object from OpenGL. Overall, it improves performance and fixes some bugs present on the old cache. There are still some edge cases hit by some games that harm performance on some vendors, this are planned to be fixed in later commits.
2020-12-30video_core: Rewrite the texture cacheReinUsesLisp1-2/+2
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-05video_core: Resolve more variable shadowing scenarios pt.3Lioncash1-2/+2
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-6/+6
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-06-01glsl: Squash constant buffers into a single SSBO when we hit the limitReinUsesLisp1-2/+4
Avoids compilation errors at the cost of shader build times and runtime performance when a game hits the limit of uniform buffers we can use.
2020-04-23shader_ir: Turn classes into data structuresReinUsesLisp1-25/+8
2020-03-09gl_shader_decompiler: Add identifier to decompiled codeReinUsesLisp1-1/+2
2020-03-09shader/registry: Store graphics and compute metadataReinUsesLisp1-4/+2
Store information GLSL forces us to provide but it's dynamic state in hardware (workgroup sizes, primitive topology, shared memory size).
2020-03-09gl_shader_cache: Rework shader cache and remove post-specializationsReinUsesLisp1-9/+6
Instead of pre-specializing shaders and then post-specializing them, drop the later and only "specialize" the shader while decoding it.
2020-02-28gl_state_tracker: Implement dirty flags for clip distances and shadersReinUsesLisp1-1/+1
2019-11-23video_core: Unify ProgramType and ShaderStage into ShaderTypeReinUsesLisp1-14/+3
2019-10-30shader/node: Unpack bindless texture encodingReinUsesLisp1-2/+1
Bindless textures were using u64 to pack the buffer and offset from where they come from. Drop this in favor of separated entries in the struct. Remove the usage of std::set in favor of std::list (it's not std::vector to avoid reference invalidations) for samplers and images.
2019-10-25gl_shader_decompiler: Move entries to a separate functionReinUsesLisp1-5/+4
2019-09-21shader/image: Implement SULD and remove irrelevant codeReinUsesLisp1-1/+0
* Implement SULD as float. * Remove conditional declaration of GL_ARB_shader_viewport_layer_array.
2019-07-15gl_rasterizer: Implement compute shadersReinUsesLisp1-5/+17
2019-07-08gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shadersReinUsesLisp1-0/+1
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.
2019-06-21gl_shader_decompiler: Implement image binding settingsReinUsesLisp1-0/+2
2019-04-14gl_shader_decompiler: Use variable AOFFI on supported hardwareReinUsesLisp1-2/+6
2019-04-14shader_ir: Implement STG, keep track of global memory usage and flushReinUsesLisp1-2/+13
2019-04-08Unify both sampler types.Fernando Sahmkow1-1/+2
2019-04-04video_core/renderer_opengl: Remove unnecessary includesLioncash1-1/+0
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-02-07gl_shader_disk_cache: Address miscellaneous feedbackReinUsesLisp1-4/+4
2019-02-07gl_shader_disk_cache: Save GLSL and entries into the precompiled fileReinUsesLisp1-60/+5
2019-02-07gl_shader_decompiler: Remove name entriesReinUsesLisp1-23/+7
2019-02-07shader_decode: Implement LDG and basic cbuf trackingReinUsesLisp1-0/+33
2019-01-30gl_shader_cache: Use explicit bindingsReinUsesLisp1-12/+0
2019-01-30shader_decode: Implement LDG and basic cbuf trackingReinUsesLisp1-0/+34
2019-01-15video_core: Rename glsl_decompiler to gl_shader_decompilerReinUsesLisp1-0/+0
2019-01-15video_core: Address feedbackReinUsesLisp1-1/+1
2019-01-15glsl_decompiler: ImplementationReinUsesLisp1-0/+88