diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-08-04 06:30:16 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-16 22:11:29 +0100 |
commit | dc28284437c7f99baa98a242f4713a1ab94418c8 (patch) | |
tree | 466ca4e32f201dd7ec167a75de748390ff491ba5 /src | |
parent | shader: Properly scale image reads and add GL SPIR-V support (diff) | |
download | yuzu-dc28284437c7f99baa98a242f4713a1ab94418c8.tar yuzu-dc28284437c7f99baa98a242f4713a1ab94418c8.tar.gz yuzu-dc28284437c7f99baa98a242f4713a1ab94418c8.tar.bz2 yuzu-dc28284437c7f99baa98a242f4713a1ab94418c8.tar.lz yuzu-dc28284437c7f99baa98a242f4713a1ab94418c8.tar.xz yuzu-dc28284437c7f99baa98a242f4713a1ab94418c8.tar.zst yuzu-dc28284437c7f99baa98a242f4713a1ab94418c8.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv.h | 4 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.h b/src/shader_recompiler/backend/spirv/emit_spirv.h index db0998ad6..dd6dff0c8 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv.h +++ b/src/shader_recompiler/backend/spirv/emit_spirv.h @@ -23,8 +23,8 @@ constexpr u32 NUM_TEXTURE_AND_IMAGE_SCALING_WORDS = struct RescalingLayout { u32 down_factor; - std::array<u32, NUM_TEXTURE_SCALING_WORDS> rescaling_textures; - std::array<u32, NUM_IMAGE_SCALING_WORDS> rescaling_images; + alignas(16) std::array<u32, NUM_TEXTURE_SCALING_WORDS> rescaling_textures; + alignas(16) std::array<u32, NUM_IMAGE_SCALING_WORDS> rescaling_images; }; [[nodiscard]] std::vector<u32> EmitSPIRV(const Profile& profile, const RuntimeInfo& runtime_info, diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index c29bab678..5ad1180bb 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -479,7 +479,7 @@ void GraphicsPipeline::ConfigureDraw(const RescalingPushConstant& rescaling) { } if (update_rescaling) { const f32 config_down_factor{Settings::values.resolution_info.down_factor}; - const float scale_down_factor{is_rescaling ? config_down_factor : 1.0f}; + const f32 scale_down_factor{is_rescaling ? config_down_factor : 1.0f}; cmdbuf.PushConstants(*pipeline_layout, VK_SHADER_STAGE_ALL_GRAPHICS, 0, sizeof(scale_down_factor), &scale_down_factor); } |