aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/host_shaders
AgeCommit message (Collapse)Author
2021-02-13video_core: Reimplement the buffer cacheReinUsesLisp
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.
2021-02-01video_core: host_shaders: Don't pass --quiet to glslangValidator if unavailablelat9nq
Prevents CMake from calling `glslangValidator` with `--quiet` when it is not available, i.e. on older downstream versions from Ubuntu.
2021-01-24host_shaders/cmake: Pass --quiet to glslang to keep it quietReinUsesLisp
Silences noisy builds on toolchains.
2020-12-30host_shaders: Add Vulkan assembler compute shadersReinUsesLisp
2020-12-30host_shaders: Add helper to blit depth stencil fragment shaderReinUsesLisp
2020-12-30host_shaders: Add texture color blit fragment shaderReinUsesLisp
2020-12-30host_shaders: Add shaders to present to the swapchainReinUsesLisp
2020-12-30host_shaders: Add shaders to convert between depth and color imagesReinUsesLisp
2020-12-30host_shaders: Add compute shader to copy BC4 as RG32UI to RGBA8ReinUsesLisp
2020-12-30host_shaders: Add shader to render a full screen triangleReinUsesLisp
2020-12-30host_shaders: Add pitch linear upload compute shaderReinUsesLisp
2020-12-30host_shaders: Add block linear upload compute shadersReinUsesLisp
2020-12-30host_shaders: Add copyright headers to OpenGL present shadersReinUsesLisp
2020-12-30video_core/host_shaders: Add support for prebuilt SPIR-V shadersReinUsesLisp
Add support for building SPIR-V shaders from GLSL and generating headers to include the text of those same GLSL shaders to consume from OpenGL.
2020-09-23video_core: Fix instances where msbuild always regenerated host shadersReinUsesLisp
When HEADER_GENERATOR was included in the DEPENDS section of custom commands, msbuild assumed this was always modified. Changing this file is not common so we can remove it from there.
2020-08-23video_core/host_shaders: Add CMake integration for string shadersReinUsesLisp
Add the necessary CMake code to copy the contents in a string source shader (GLSL or GLASM) to a header file then consumed by video_core files. This allows editting GLSL in its own files without having to maintain them in source files. For now, only OpenGL presentation shaders are moved, but we can add GLASM presentation shaders and static SPIR-V generation through glslangValidator in the future.