diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-23 01:52:29 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-04-23 22:34:16 +0200 |
commit | 8c37cd1af689ce0ff0cd37e4579508a898ea3807 (patch) | |
tree | f354fc82f12f6ea80ce32903dbe8c66da9746952 /src/video_core/renderer_vulkan/vk_rasterizer.cpp | |
parent | vk_renderpass_cache: Pack renderpass cache key to 12 bytes (diff) | |
download | yuzu-8c37cd1af689ce0ff0cd37e4579508a898ea3807.tar yuzu-8c37cd1af689ce0ff0cd37e4579508a898ea3807.tar.gz yuzu-8c37cd1af689ce0ff0cd37e4579508a898ea3807.tar.bz2 yuzu-8c37cd1af689ce0ff0cd37e4579508a898ea3807.tar.lz yuzu-8c37cd1af689ce0ff0cd37e4579508a898ea3807.tar.xz yuzu-8c37cd1af689ce0ff0cd37e4579508a898ea3807.tar.zst yuzu-8c37cd1af689ce0ff0cd37e4579508a898ea3807.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index ef21b186b..8a5482e55 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -316,7 +316,8 @@ void RasterizerVulkan::Draw(bool is_indexed, bool is_instanced) { query_cache.UpdateCounters(); const auto& gpu = system.GPU().Maxwell3D(); - GraphicsPipelineCacheKey key{GetFixedPipelineState(gpu.regs)}; + GraphicsPipelineCacheKey key; + key.fixed_state.Fill(gpu.regs); buffer_cache.Map(CalculateGraphicsStreamBufferSize(is_indexed)); @@ -334,10 +335,11 @@ void RasterizerVulkan::Draw(bool is_indexed, bool is_instanced) { buffer_cache.Unmap(); - const auto texceptions = UpdateAttachments(); + const Texceptions texceptions = UpdateAttachments(); SetupImageTransitions(texceptions, color_attachments, zeta_attachment); key.renderpass_params = GetRenderPassParams(texceptions); + key.padding = 0; auto& pipeline = pipeline_cache.GetGraphicsPipeline(key); scheduler.BindGraphicsPipeline(pipeline.GetHandle()); @@ -453,10 +455,12 @@ void RasterizerVulkan::DispatchCompute(GPUVAddr code_addr) { query_cache.UpdateCounters(); const auto& launch_desc = system.GPU().KeplerCompute().launch_description; - const ComputePipelineCacheKey key{ - code_addr, - launch_desc.shared_alloc, - {launch_desc.block_dim_x, launch_desc.block_dim_y, launch_desc.block_dim_z}}; + ComputePipelineCacheKey key; + key.shader = code_addr; + key.shared_memory_size = launch_desc.shared_alloc; + key.workgroup_size = {launch_desc.block_dim_x, launch_desc.block_dim_y, + launch_desc.block_dim_z}; + auto& pipeline = pipeline_cache.GetComputePipeline(key); // Compute dispatches can't be executed inside a renderpass |