summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/CMakeLists.txt2
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_image.cpp4
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp1
-rw-r--r--src/shader_recompiler/frontend/ir/opcodes.cpp2
-rw-r--r--src/shader_recompiler/frontend/maxwell/control_flow.cpp4
-rw-r--r--src/shader_recompiler/frontend/maxwell/control_flow.h16
-rw-r--r--src/shader_recompiler/frontend/maxwell/decode.cpp2
-rw-r--r--src/shader_recompiler/frontend/maxwell/translate/impl/common_funcs.cpp5
-rw-r--r--src/shader_recompiler/frontend/maxwell/translate/impl/not_implemented.cpp1
-rw-r--r--src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp3
-rw-r--r--src/shader_recompiler/object_pool.h2
-rw-r--r--src/video_core/renderer_vulkan/vk_compute_pipeline.h4
12 files changed, 22 insertions, 24 deletions
diff --git a/src/shader_recompiler/CMakeLists.txt b/src/shader_recompiler/CMakeLists.txt
index 551bf1c58..6b5df23e2 100644
--- a/src/shader_recompiler/CMakeLists.txt
+++ b/src/shader_recompiler/CMakeLists.txt
@@ -197,6 +197,8 @@ else()
197 $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable> 197 $<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable>
198 -Werror=unused-variable 198 -Werror=unused-variable
199 199
200 # Bracket depth determines maximum size of a fold expression in Clang since 9c9974c3ccb6.
201 # And this in turns limits the size of a std::array.
200 $<$<CXX_COMPILER_ID:Clang>:-fbracket-depth=1024> 202 $<$<CXX_COMPILER_ID:Clang>:-fbracket-depth=1024>
201 ) 203 )
202endif() 204endif()
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp
index 815ca6299..6a89c0f79 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv_image.cpp
@@ -304,10 +304,6 @@ Id EmitImageGatherDref(EmitContext& ctx, IR::Inst* inst, const IR::Value& index,
304 ctx.F32[4], Texture(ctx, index), coords, dref, operands.Mask(), operands.Span()); 304 ctx.F32[4], Texture(ctx, index), coords, dref, operands.Mask(), operands.Span());
305} 305}
306 306
307#ifdef _WIN32
308#pragma optimize("", off)
309#endif
310
311Id EmitImageFetch(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, Id coords, Id offset, 307Id EmitImageFetch(EmitContext& ctx, IR::Inst* inst, const IR::Value& index, Id coords, Id offset,
312 Id lod, Id ms) { 308 Id lod, Id ms) {
313 const auto info{inst->Flags<IR::TextureInstInfo>()}; 309 const auto info{inst->Flags<IR::TextureInstInfo>()};
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp
index 12a03ed6e..f6196653a 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv_warp.cpp
@@ -7,7 +7,6 @@
7namespace Shader::Backend::SPIRV { 7namespace Shader::Backend::SPIRV {
8namespace { 8namespace {
9Id WarpExtract(EmitContext& ctx, Id value) { 9Id WarpExtract(EmitContext& ctx, Id value) {
10 [[maybe_unused]] const Id shift{ctx.Constant(ctx.U32[1], 5)};
11 const Id local_index{ctx.OpLoad(ctx.U32[1], ctx.subgroup_local_invocation_id)}; 10 const Id local_index{ctx.OpLoad(ctx.U32[1], ctx.subgroup_local_invocation_id)};
12 return ctx.OpVectorExtractDynamic(ctx.U32[1], value, local_index); 11 return ctx.OpVectorExtractDynamic(ctx.U32[1], value, local_index);
13} 12}
diff --git a/src/shader_recompiler/frontend/ir/opcodes.cpp b/src/shader_recompiler/frontend/ir/opcodes.cpp
index 002dbf94e..7d3e0b2ab 100644
--- a/src/shader_recompiler/frontend/ir/opcodes.cpp
+++ b/src/shader_recompiler/frontend/ir/opcodes.cpp
@@ -49,7 +49,7 @@ constexpr std::array META_TABLE{
49#define OPCODE(name_token, type_token, ...) \ 49#define OPCODE(name_token, type_token, ...) \
50 OpcodeMeta{ \ 50 OpcodeMeta{ \
51 .name{#name_token}, \ 51 .name{#name_token}, \
52 .type = type_token, \ 52 .type = type_token, \
53 .arg_types{__VA_ARGS__}, \ 53 .arg_types{__VA_ARGS__}, \
54 }, 54 },
55#include "opcodes.inc" 55#include "opcodes.inc"
diff --git a/src/shader_recompiler/frontend/maxwell/control_flow.cpp b/src/shader_recompiler/frontend/maxwell/control_flow.cpp
index cb8ec7eaa..9811183f1 100644
--- a/src/shader_recompiler/frontend/maxwell/control_flow.cpp
+++ b/src/shader_recompiler/frontend/maxwell/control_flow.cpp
@@ -44,7 +44,7 @@ void Split(Block* old_block, Block* new_block, Location pc) {
44 *new_block = Block{}; 44 *new_block = Block{};
45 new_block->begin = pc; 45 new_block->begin = pc;
46 new_block->end = old_block->end; 46 new_block->end = old_block->end;
47 new_block->end_class = old_block->end_class, 47 new_block->end_class = old_block->end_class;
48 new_block->cond = old_block->cond; 48 new_block->cond = old_block->cond;
49 new_block->stack = old_block->stack; 49 new_block->stack = old_block->stack;
50 new_block->branch_true = old_block->branch_true; 50 new_block->branch_true = old_block->branch_true;
@@ -428,7 +428,7 @@ CFG::AnalysisState CFG::AnalyzeBRX(Block* block, Location pc, Instruction inst,
428 if (!is_absolute) { 428 if (!is_absolute) {
429 target += pc.Offset(); 429 target += pc.Offset();
430 } 430 }
431 target += static_cast<unsigned int>(brx_table->branch_offset); 431 target += static_cast<u32>(brx_table->branch_offset);
432 target += 8; 432 target += 8;
433 targets.push_back(target); 433 targets.push_back(target);
434 } 434 }
diff --git a/src/shader_recompiler/frontend/maxwell/control_flow.h b/src/shader_recompiler/frontend/maxwell/control_flow.h
index 9f570fbb5..89966b16a 100644
--- a/src/shader_recompiler/frontend/maxwell/control_flow.h
+++ b/src/shader_recompiler/frontend/maxwell/control_flow.h
@@ -78,15 +78,15 @@ struct Block : boost::intrusive::set_base_hook<
78 78
79 Location begin; 79 Location begin;
80 Location end; 80 Location end;
81 EndClass end_class; 81 EndClass end_class{};
82 IR::Condition cond; 82 IR::Condition cond{};
83 Stack stack; 83 Stack stack;
84 Block* branch_true; 84 Block* branch_true{};
85 Block* branch_false; 85 Block* branch_false{};
86 FunctionId function_call; 86 FunctionId function_call{};
87 Block* return_block; 87 Block* return_block{};
88 IR::Reg branch_reg; 88 IR::Reg branch_reg{};
89 s32 branch_offset; 89 s32 branch_offset{};
90 std::vector<IndirectBranch> indirect_branches; 90 std::vector<IndirectBranch> indirect_branches;
91}; 91};
92 92
diff --git a/src/shader_recompiler/frontend/maxwell/decode.cpp b/src/shader_recompiler/frontend/maxwell/decode.cpp
index 932d19c1d..972f677dc 100644
--- a/src/shader_recompiler/frontend/maxwell/decode.cpp
+++ b/src/shader_recompiler/frontend/maxwell/decode.cpp
@@ -56,7 +56,7 @@ constexpr std::array UNORDERED_ENCODINGS{
56#define INST(name, cute, encode) \ 56#define INST(name, cute, encode) \
57 InstEncoding{ \ 57 InstEncoding{ \
58 .mask_value{MaskValueFromEncoding(encode)}, \ 58 .mask_value{MaskValueFromEncoding(encode)}, \
59 .opcode = Opcode::name, \ 59 .opcode = Opcode::name, \
60 }, 60 },
61#include "maxwell.inc" 61#include "maxwell.inc"
62#undef INST 62#undef INST
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/common_funcs.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/common_funcs.cpp
index d30e82b10..10bb01d99 100644
--- a/src/shader_recompiler/frontend/maxwell/translate/impl/common_funcs.cpp
+++ b/src/shader_recompiler/frontend/maxwell/translate/impl/common_funcs.cpp
@@ -72,8 +72,9 @@ bool IsCompareOpOrdered(FPCompareOp op) {
72 } 72 }
73} 73}
74 74
75IR::U1 FloatingPointCompare(IR::IREmitter& ir, const IR::F16F32F64& operand_1, const IR::F16F32F64& operand_2, 75IR::U1 FloatingPointCompare(IR::IREmitter& ir, const IR::F16F32F64& operand_1,
76 FPCompareOp compare_op, IR::FpControl control) { 76 const IR::F16F32F64& operand_2, FPCompareOp compare_op,
77 IR::FpControl control) {
77 const bool ordered{IsCompareOpOrdered(compare_op)}; 78 const bool ordered{IsCompareOpOrdered(compare_op)};
78 switch (compare_op) { 79 switch (compare_op) {
79 case FPCompareOp::F: 80 case FPCompareOp::F:
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/not_implemented.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/not_implemented.cpp
index ba0cfa673..c23901052 100644
--- a/src/shader_recompiler/frontend/maxwell/translate/impl/not_implemented.cpp
+++ b/src/shader_recompiler/frontend/maxwell/translate/impl/not_implemented.cpp
@@ -65,7 +65,6 @@ void TranslatorVisitor::CS2R(u64) {
65 ThrowNotImplemented(Opcode::CS2R); 65 ThrowNotImplemented(Opcode::CS2R);
66} 66}
67 67
68
69void TranslatorVisitor::FCHK_reg(u64) { 68void TranslatorVisitor::FCHK_reg(u64) {
70 ThrowNotImplemented(Opcode::FCHK_reg); 69 ThrowNotImplemented(Opcode::FCHK_reg);
71} 70}
diff --git a/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp b/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp
index 90a65dd16..afe871505 100644
--- a/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp
+++ b/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp
@@ -164,7 +164,8 @@ void DiscardGlobalMemory(IR::Block& block, IR::Inst& inst) {
164 inst.Invalidate(); 164 inst.Invalidate();
165 break; 165 break;
166 default: 166 default:
167 throw LogicError("Invalid opcode to discard its global memory operation {}", inst.GetOpcode()); 167 throw LogicError("Invalid opcode to discard its global memory operation {}",
168 inst.GetOpcode());
168 } 169 }
169} 170}
170 171
diff --git a/src/shader_recompiler/object_pool.h b/src/shader_recompiler/object_pool.h
index 424281634..f8b255b66 100644
--- a/src/shader_recompiler/object_pool.h
+++ b/src/shader_recompiler/object_pool.h
@@ -18,7 +18,7 @@ public:
18 } 18 }
19 19
20 template <typename... Args> 20 template <typename... Args>
21 requires std::is_constructible_v<T, Args...> [[nodiscard]] T* Create(Args&&... args) { 21 requires std::is_constructible_v<T, Args...>[[nodiscard]] T* Create(Args&&... args) {
22 return std::construct_at(Memory(), std::forward<Args>(args)...); 22 return std::construct_at(Memory(), std::forward<Args>(args)...);
23 } 23 }
24 24
diff --git a/src/video_core/renderer_vulkan/vk_compute_pipeline.h b/src/video_core/renderer_vulkan/vk_compute_pipeline.h
index 104e6cc85..8efdc2926 100644
--- a/src/video_core/renderer_vulkan/vk_compute_pipeline.h
+++ b/src/video_core/renderer_vulkan/vk_compute_pipeline.h
@@ -4,9 +4,9 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <mutex>
8#include <condition_variable>
9#include <atomic> 7#include <atomic>
8#include <condition_variable>
9#include <mutex>
10 10
11#include "common/common_types.h" 11#include "common/common_types.h"
12#include "common/thread_worker.h" 12#include "common/thread_worker.h"