diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/shader_recompiler/ir_opt/texture_pass.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/query_cache.h | 8 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_query_cache.cpp | 3 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/shader_recompiler/ir_opt/texture_pass.cpp b/src/shader_recompiler/ir_opt/texture_pass.cpp index 44ad10d43..225c238fb 100644 --- a/src/shader_recompiler/ir_opt/texture_pass.cpp +++ b/src/shader_recompiler/ir_opt/texture_pass.cpp | |||
| @@ -492,7 +492,8 @@ void TexturePass(Environment& env, IR::Program& program) { | |||
| 492 | const auto insert_point{IR::Block::InstructionList::s_iterator_to(*inst)}; | 492 | const auto insert_point{IR::Block::InstructionList::s_iterator_to(*inst)}; |
| 493 | IR::IREmitter ir{*texture_inst.block, insert_point}; | 493 | IR::IREmitter ir{*texture_inst.block, insert_point}; |
| 494 | const IR::U32 shift{ir.Imm32(std::countr_zero(DESCRIPTOR_SIZE))}; | 494 | const IR::U32 shift{ir.Imm32(std::countr_zero(DESCRIPTOR_SIZE))}; |
| 495 | inst->SetArg(0, ir.ShiftRightArithmetic(cbuf.dynamic_offset, shift)); | 495 | inst->SetArg(0, ir.SMin(ir.ShiftRightArithmetic(cbuf.dynamic_offset, shift), |
| 496 | ir.Imm32(DESCRIPTOR_SIZE - 1))); | ||
| 496 | } else { | 497 | } else { |
| 497 | inst->SetArg(0, IR::Value{}); | 498 | inst->SetArg(0, IR::Value{}); |
| 498 | } | 499 | } |
diff --git a/src/video_core/query_cache.h b/src/video_core/query_cache.h index 73231061a..392f82eb7 100644 --- a/src/video_core/query_cache.h +++ b/src/video_core/query_cache.h | |||
| @@ -258,9 +258,9 @@ private: | |||
| 258 | 258 | ||
| 259 | void AsyncFlushQuery(VAddr addr) { | 259 | void AsyncFlushQuery(VAddr addr) { |
| 260 | if (!uncommitted_flushes) { | 260 | if (!uncommitted_flushes) { |
| 261 | uncommitted_flushes = std::make_shared<std::unordered_set<VAddr>>(); | 261 | uncommitted_flushes = std::make_shared<std::vector<VAddr>>(); |
| 262 | } | 262 | } |
| 263 | uncommitted_flushes->insert(addr); | 263 | uncommitted_flushes->push_back(addr); |
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | static constexpr std::uintptr_t PAGE_SIZE = 4096; | 266 | static constexpr std::uintptr_t PAGE_SIZE = 4096; |
| @@ -276,8 +276,8 @@ private: | |||
| 276 | 276 | ||
| 277 | std::array<CounterStream, VideoCore::NumQueryTypes> streams; | 277 | std::array<CounterStream, VideoCore::NumQueryTypes> streams; |
| 278 | 278 | ||
| 279 | std::shared_ptr<std::unordered_set<VAddr>> uncommitted_flushes{}; | 279 | std::shared_ptr<std::vector<VAddr>> uncommitted_flushes{}; |
| 280 | std::list<std::shared_ptr<std::unordered_set<VAddr>>> committed_flushes; | 280 | std::list<std::shared_ptr<std::vector<VAddr>>> committed_flushes; |
| 281 | }; | 281 | }; |
| 282 | 282 | ||
| 283 | template <class QueryCache, class HostCounter> | 283 | template <class QueryCache, class HostCounter> |
diff --git a/src/video_core/renderer_vulkan/vk_query_cache.cpp b/src/video_core/renderer_vulkan/vk_query_cache.cpp index c9cb32d71..259cba156 100644 --- a/src/video_core/renderer_vulkan/vk_query_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_query_cache.cpp | |||
| @@ -117,7 +117,8 @@ u64 HostCounter::BlockingQuery() const { | |||
| 117 | cache.GetScheduler().Wait(tick); | 117 | cache.GetScheduler().Wait(tick); |
| 118 | u64 data; | 118 | u64 data; |
| 119 | const VkResult query_result = cache.GetDevice().GetLogical().GetQueryResults( | 119 | const VkResult query_result = cache.GetDevice().GetLogical().GetQueryResults( |
| 120 | query.first, query.second, 1, sizeof(data), &data, sizeof(data), VK_QUERY_RESULT_64_BIT); | 120 | query.first, query.second, 1, sizeof(data), &data, sizeof(data), |
| 121 | VK_QUERY_RESULT_64_BIT | VK_QUERY_RESULT_WAIT_BIT); | ||
| 121 | 122 | ||
| 122 | switch (query_result) { | 123 | switch (query_result) { |
| 123 | case VK_SUCCESS: | 124 | case VK_SUCCESS: |