diff options
author | ameerj <aj662@drexel.edu> | 2020-11-19 02:08:51 +0100 |
---|---|---|
committer | ameerj <aj662@drexel.edu> | 2020-11-25 04:46:45 +0100 |
commit | 9014861858295489cf597322801b37dad9aaf2ce (patch) | |
tree | f4c13f9d2705b9ad1015a919e7d071e6ce1bf99a /src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | |
parent | Merge pull request #4905 from german77/AnalogFromButton (diff) | |
download | yuzu-9014861858295489cf597322801b37dad9aaf2ce.tar yuzu-9014861858295489cf597322801b37dad9aaf2ce.tar.gz yuzu-9014861858295489cf597322801b37dad9aaf2ce.tar.bz2 yuzu-9014861858295489cf597322801b37dad9aaf2ce.tar.lz yuzu-9014861858295489cf597322801b37dad9aaf2ce.tar.xz yuzu-9014861858295489cf597322801b37dad9aaf2ce.tar.zst yuzu-9014861858295489cf597322801b37dad9aaf2ce.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_pipeline_cache.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index dedc9c466..9ccf5d011 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -344,6 +344,14 @@ VKPipelineCache::DecompileShaders(const FixedPipelineState& fixed_state) { } specialization.ndc_minus_one_to_one = fixed_state.ndc_minus_one_to_one; + // Alpha test + if (fixed_state.alpha_test_enabled == 1) { + specialization.alpha_test_enabled = true; + specialization.alpha_test_func = static_cast<u8>(fixed_state.alpha_test_func); + // memcpy from u32 to float TODO: C++20 std::bit_cast + std::memcpy(&specialization.alpha_test_ref, &fixed_state.alpha_test_ref, sizeof(float)); + } + SPIRVProgram program; std::vector<VkDescriptorSetLayoutBinding> bindings; |