summaryrefslogtreecommitdiffstats
path: root/src/video_core/host_shaders (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-01-16astc_decoder: Combine FastReplicate functions to work around new NV driver bugameerj1-34/+46
The new Nvidia drivers have a bug where the FastReplicateTo6 function produces a lookup into the REPLICATE_TO_8 table rather than the REPLICATE_TO_6 table. This seems to be an optimization gone wrong. Combining the logic of the FastReplicate functions seems to address the bug.
2021-11-22Texture Cache: Correct conversion shaders.Fernando Sahmkow2-2/+2
2021-11-22TextureCache: Simplify blitting of D24S8 formats and fix bugs.Fernando Sahmkow5-104/+0
2021-11-21HostShaders: Fix D24S8 convertion shaders.Fernando Sahmkow6-23/+47
2021-11-20TextureCache: Assure full conversions on depth/stencil write shaders.Fernando Sahmkow3-6/+6
2021-11-20TextureCache: Add R16G16 to D24S8 converter.Fernando Sahmkow2-0/+19
2021-11-19TextureCache: Add B10G11R11 to D24S8 converter.Fernando Sahmkow2-0/+20
2021-11-19TextureCache: Implement additional D24S8 convertions.Fernando Sahmkow3-0/+44
2021-11-19Vulkan: implement D24S8 <-> RGBA8 convertions.Fernando Sahmkow3-0/+40
2021-11-16HostShader: fix Gaussian filter.FernandoS271-2/+2
2021-11-16host_shaders: Misc copyright/style changesameerj4-10/+12
2021-11-16Presentation: Only use FP16 in scaling shaders on supported devices in VulkanMarshall Mohror9-95/+147
2021-11-16HostShader: Fix gaussian and add attribution.Fernando Sahmkow1-23/+19
2021-11-16Vulkan: Implement FXAAFernandoS271-1/+1
2021-11-16OpenGL: Implement FXAAMarshall Mohror3-0/+114
2021-11-16VideoCore: Add gaussian filtering.FernandoS272-0/+75
2021-11-16Update scaleforce to use FP16Marshall Mohror1-88/+55
2021-11-16vulkan: Implement FidelityFX Super ResolutionMarshall Mohror4-2/+155
2021-11-16Renderers: Unify post processing filter shadersameerj5-202/+28
2021-11-16Renderer: Implement Bicubic and ScaleForce filters.Fernando Sahmkow5-0/+388
2021-09-17host_shaders: Remove opengl_copy_bgra.compameerj2-16/+0
2021-08-01astc_decoder: Reduce workgroup sizeameerj1-1/+1
This reduces the amount of over dispatching when there are odd dimensions (i.e. ASTC 8x5), which rarely evenly divide into 32x32.
2021-08-01astc_decoder: Compute offset swizzles in-shaderameerj1-33/+13
Alleviates the dependency on the swizzle table and a uniform which is constant for all ASTC texture sizes.
2021-08-01astc_decoder: Make use of uvec4 for payload dataameerj1-79/+43
2021-08-01astc_decoder: Simplify Select2DPartitionameerj1-38/+19
2021-08-01astc_decoder: Optimize the use EncodingDataameerj1-25/+25
This buffer was a list of EncodingData structures sorted by their bit length, with some duplication from the cpu decoder implementation. We can take advantage of its sorted property to optimize its usage in the shader. Thanks to wwylele for the optimization idea.
2021-06-19astc_decoder.comp: Remove unnecessary LUT SSBOsameerj1-19/+16
We can move them to instead be compile time constants within the shader.
2021-06-19astc: Various robustness enhancements for the gpu decoderameerj1-9/+6
These changes should help in reducing crashes/drivers panics that may occur due to synchronization issues between the shader completion and later access of the decoded texture.
2021-06-16astc_decoder: Fix LDR CEM1 endpoint calculationameerj1-1/+1
Per the spec, L1 is clamped to the value 0xff if it is greater than 0xff. An oversight caused us to take the maximum of L1 and 0xff, rather than the minimum. Huge thanks to wwylele for finding this. Co-Authored-By: Weiyi Wang <wwylele@gmail.com>
2021-06-13cmake: Fix find_program usage for 3.15lat9nq1-1/+4
yuzu requires CMake 3.15 yet find_program was using REQUIRED, which is only available on 3.18 and later. Instead, we check for "<VAR>-NOTFOUND". In addition, check for additional requirements before building libusb or FFmpeg with autotools. Otherwise, CMake configuration will pass yet compilation will fail.
2021-03-25astc_decoder: Refactor for style and more efficient memory useameerj1-262/+307
2021-03-13astc_decoder: Reimplement LayersRodrigo Locatti1-18/+15
Reimplements the approach to decoding layers in the compute shader. Fixes multilayer astc decoding when using Vulkan.
2021-03-13astc_decoder: Fix out of bounds memory accessameerj1-2/+10
resolves a crash with some anamolous textures found in Astral Chain.
2021-03-13renderer_vulkan: Accelerate ASTC decodingameerj1-21/+22
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2021-03-13host_shaders: Modify shader cmake integration to allow for larger shadersameerj3-2/+25
using a raw string to encapsulate the entire shader code limits us to shaders of size less than 2KB. This change overcomes this limitation.
2021-03-13renderer_opengl: Accelerate ASTC texture decoding with a compute shaderameerj1-0/+1288
ASTC texture decoding is currently handled by a CPU decoder for GPU's without native ASTC decoding support (most desktop GPUs). This is the cause for noticeable performance degradation in titles which use the format extensively. This commit adds support to accelerate ASTC decoding using a compute shader on OpenGL for GPUs without native support.
2021-03-04renderer_opengl: Swizzle BGR textures on copyameerj2-0/+16
OpenGL does not natively support BGR internal formats, which causes many BGR textures to render incorrectly, with Red and Blue channels swapped. This commit aims to address this by swizzling the blue and red channels on texture copies when a BGR format is encountered.
2021-02-13video_core: Reimplement the buffer cacheReinUsesLisp3-30/+8
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-02video_core: host_shaders: Don't pass --quiet to glslangValidator if unavailablelat9nq1-1/+19
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 quietReinUsesLisp1-1/+1
Silences noisy builds on toolchains.
2020-12-30host_shaders: Add Vulkan assembler compute shadersReinUsesLisp4-0/+96
2020-12-30host_shaders: Add helper to blit depth stencil fragment shaderReinUsesLisp2-0/+17
2020-12-30host_shaders: Add texture color blit fragment shaderReinUsesLisp2-0/+15
2020-12-30host_shaders: Add shaders to present to the swapchainReinUsesLisp3-0/+36
2020-12-30host_shaders: Add shaders to convert between depth and color imagesReinUsesLisp3-0/+28
2020-12-30host_shaders: Add compute shader to copy BC4 as RG32UI to RGBA8ReinUsesLisp2-0/+71
2020-12-30host_shaders: Add shader to render a full screen triangleReinUsesLisp2-0/+30
2020-12-30host_shaders: Add pitch linear upload compute shaderReinUsesLisp2-0/+87
2020-12-30host_shaders: Add block linear upload compute shadersReinUsesLisp3-0/+249
2020-12-30host_shaders: Add copyright headers to OpenGL present shadersReinUsesLisp2-0/+8
2020-12-30video_core/host_shaders: Add support for prebuilt SPIR-V shadersReinUsesLisp1-16/+37
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-24video_core: Fix instances where msbuild always regenerated host shadersReinUsesLisp2-12/+7
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-24video_core/host_shaders: Add CMake integration for string shadersReinUsesLisp5-0/+97
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.