diff options
33 files changed, 125 insertions, 148 deletions
diff --git a/src/video_core/command_classes/codecs/codec.cpp b/src/video_core/command_classes/codecs/codec.cpp index f547f5bd4..39bc923a5 100644 --- a/src/video_core/command_classes/codecs/codec.cpp +++ b/src/video_core/command_classes/codecs/codec.cpp | |||
| @@ -44,7 +44,7 @@ Codec::~Codec() { | |||
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | void Codec::SetTargetCodec(NvdecCommon::VideoCodec codec) { | 46 | void Codec::SetTargetCodec(NvdecCommon::VideoCodec codec) { |
| 47 | LOG_INFO(Service_NVDRV, "NVDEC video codec initialized to {}", static_cast<u32>(codec)); | 47 | LOG_INFO(Service_NVDRV, "NVDEC video codec initialized to {}", codec); |
| 48 | current_codec = codec; | 48 | current_codec = codec; |
| 49 | } | 49 | } |
| 50 | 50 | ||
| @@ -62,7 +62,7 @@ void Codec::Decode() { | |||
| 62 | } else if (current_codec == NvdecCommon::VideoCodec::Vp9) { | 62 | } else if (current_codec == NvdecCommon::VideoCodec::Vp9) { |
| 63 | av_codec = avcodec_find_decoder(AV_CODEC_ID_VP9); | 63 | av_codec = avcodec_find_decoder(AV_CODEC_ID_VP9); |
| 64 | } else { | 64 | } else { |
| 65 | LOG_ERROR(Service_NVDRV, "Unknown video codec {}", static_cast<u32>(current_codec)); | 65 | LOG_ERROR(Service_NVDRV, "Unknown video codec {}", current_codec); |
| 66 | return; | 66 | return; |
| 67 | } | 67 | } |
| 68 | 68 | ||
diff --git a/src/video_core/command_classes/vic.cpp b/src/video_core/command_classes/vic.cpp index 6cfc193fa..66e21ce9c 100644 --- a/src/video_core/command_classes/vic.cpp +++ b/src/video_core/command_classes/vic.cpp | |||
| @@ -27,7 +27,7 @@ void Vic::VicStateWrite(u32 offset, u32 arguments) { | |||
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | void Vic::ProcessMethod(Method method, const std::vector<u32>& arguments) { | 29 | void Vic::ProcessMethod(Method method, const std::vector<u32>& arguments) { |
| 30 | LOG_DEBUG(HW_GPU, "Vic method 0x{:X}", static_cast<u32>(method)); | 30 | LOG_DEBUG(HW_GPU, "Vic method 0x{:X}", method); |
| 31 | VicStateWrite(static_cast<u32>(method), arguments[0]); | 31 | VicStateWrite(static_cast<u32>(method), arguments[0]); |
| 32 | const u64 arg = static_cast<u64>(arguments[0]) << 8; | 32 | const u64 arg = static_cast<u64>(arguments[0]) << 8; |
| 33 | switch (method) { | 33 | switch (method) { |
diff --git a/src/video_core/engines/fermi_2d.cpp b/src/video_core/engines/fermi_2d.cpp index 9409c4075..4293d676c 100644 --- a/src/video_core/engines/fermi_2d.cpp +++ b/src/video_core/engines/fermi_2d.cpp | |||
| @@ -48,8 +48,7 @@ static std::pair<u32, u32> DelimitLine(u32 src_1, u32 src_2, u32 dst_1, u32 dst_ | |||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | void Fermi2D::HandleSurfaceCopy() { | 50 | void Fermi2D::HandleSurfaceCopy() { |
| 51 | LOG_DEBUG(HW_GPU, "Requested a surface copy with operation {}", | 51 | LOG_DEBUG(HW_GPU, "Requested a surface copy with operation {}", regs.operation); |
| 52 | static_cast<u32>(regs.operation)); | ||
| 53 | 52 | ||
| 54 | // TODO(Subv): Only raw copies are implemented. | 53 | // TODO(Subv): Only raw copies are implemented. |
| 55 | ASSERT(regs.operation == Operation::SrcCopy); | 54 | ASSERT(regs.operation == Operation::SrcCopy); |
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index 6287df633..761962ed0 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp | |||
| @@ -359,7 +359,7 @@ void Maxwell3D::CallMethodFromMME(u32 method, u32 method_argument) { | |||
| 359 | } | 359 | } |
| 360 | 360 | ||
| 361 | void Maxwell3D::FlushMMEInlineDraw() { | 361 | void Maxwell3D::FlushMMEInlineDraw() { |
| 362 | LOG_TRACE(HW_GPU, "called, topology={}, count={}", static_cast<u32>(regs.draw.topology.Value()), | 362 | LOG_TRACE(HW_GPU, "called, topology={}, count={}", regs.draw.topology.Value(), |
| 363 | regs.vertex_buffer.count); | 363 | regs.vertex_buffer.count); |
| 364 | ASSERT_MSG(!(regs.index_array.count && regs.vertex_buffer.count), "Both indexed and direct?"); | 364 | ASSERT_MSG(!(regs.index_array.count && regs.vertex_buffer.count), "Both indexed and direct?"); |
| 365 | ASSERT(mme_draw.instance_count == mme_draw.gl_end_count); | 365 | ASSERT(mme_draw.instance_count == mme_draw.gl_end_count); |
| @@ -504,8 +504,7 @@ void Maxwell3D::ProcessCounterReset() { | |||
| 504 | rasterizer->ResetCounter(QueryType::SamplesPassed); | 504 | rasterizer->ResetCounter(QueryType::SamplesPassed); |
| 505 | break; | 505 | break; |
| 506 | default: | 506 | default: |
| 507 | LOG_DEBUG(Render_OpenGL, "Unimplemented counter reset={}", | 507 | LOG_DEBUG(Render_OpenGL, "Unimplemented counter reset={}", regs.counter_reset); |
| 508 | static_cast<int>(regs.counter_reset)); | ||
| 509 | break; | 508 | break; |
| 510 | } | 509 | } |
| 511 | } | 510 | } |
| @@ -520,7 +519,7 @@ void Maxwell3D::ProcessSyncPoint() { | |||
| 520 | } | 519 | } |
| 521 | 520 | ||
| 522 | void Maxwell3D::DrawArrays() { | 521 | void Maxwell3D::DrawArrays() { |
| 523 | LOG_TRACE(HW_GPU, "called, topology={}, count={}", static_cast<u32>(regs.draw.topology.Value()), | 522 | LOG_TRACE(HW_GPU, "called, topology={}, count={}", regs.draw.topology.Value(), |
| 524 | regs.vertex_buffer.count); | 523 | regs.vertex_buffer.count); |
| 525 | ASSERT_MSG(!(regs.index_array.count && regs.vertex_buffer.count), "Both indexed and direct?"); | 524 | ASSERT_MSG(!(regs.index_array.count && regs.vertex_buffer.count), "Both indexed and direct?"); |
| 526 | 525 | ||
| @@ -558,12 +557,12 @@ std::optional<u64> Maxwell3D::GetQueryResult() { | |||
| 558 | return 0; | 557 | return 0; |
| 559 | case Regs::QuerySelect::SamplesPassed: | 558 | case Regs::QuerySelect::SamplesPassed: |
| 560 | // Deferred. | 559 | // Deferred. |
| 561 | rasterizer->Query(regs.query.QueryAddress(), VideoCore::QueryType::SamplesPassed, | 560 | rasterizer->Query(regs.query.QueryAddress(), QueryType::SamplesPassed, |
| 562 | system.GPU().GetTicks()); | 561 | system.GPU().GetTicks()); |
| 563 | return std::nullopt; | 562 | return std::nullopt; |
| 564 | default: | 563 | default: |
| 565 | LOG_DEBUG(HW_GPU, "Unimplemented query select type {}", | 564 | LOG_DEBUG(HW_GPU, "Unimplemented query select type {}", |
| 566 | static_cast<u32>(regs.query.query_get.select.Value())); | 565 | regs.query.query_get.select.Value()); |
| 567 | return 1; | 566 | return 1; |
| 568 | } | 567 | } |
| 569 | } | 568 | } |
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 37d17efdc..8b45f1b62 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -1437,8 +1437,7 @@ union Instruction { | |||
| 1437 | return TextureType::TextureCube; | 1437 | return TextureType::TextureCube; |
| 1438 | } | 1438 | } |
| 1439 | 1439 | ||
| 1440 | LOG_CRITICAL(HW_GPU, "Unhandled texture_info: {}", | 1440 | LOG_CRITICAL(HW_GPU, "Unhandled texture_info: {}", texture_info.Value()); |
| 1441 | static_cast<u32>(texture_info.Value())); | ||
| 1442 | UNREACHABLE(); | 1441 | UNREACHABLE(); |
| 1443 | return TextureType::Texture1D; | 1442 | return TextureType::Texture1D; |
| 1444 | } | 1443 | } |
| @@ -1533,8 +1532,7 @@ union Instruction { | |||
| 1533 | return TextureType::Texture3D; | 1532 | return TextureType::Texture3D; |
| 1534 | } | 1533 | } |
| 1535 | 1534 | ||
| 1536 | LOG_CRITICAL(HW_GPU, "Unhandled texture_info: {}", | 1535 | LOG_CRITICAL(HW_GPU, "Unhandled texture_info: {}", texture_info.Value()); |
| 1537 | static_cast<u32>(texture_info.Value())); | ||
| 1538 | UNREACHABLE(); | 1536 | UNREACHABLE(); |
| 1539 | return TextureType::Texture1D; | 1537 | return TextureType::Texture1D; |
| 1540 | } | 1538 | } |
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 964b3f3dc..e2512a7f2 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -299,8 +299,7 @@ void GPU::CallPullerMethod(const MethodCall& method_call) { | |||
| 299 | break; | 299 | break; |
| 300 | } | 300 | } |
| 301 | default: | 301 | default: |
| 302 | LOG_ERROR(HW_GPU, "Special puller engine method {:X} not implemented", | 302 | LOG_ERROR(HW_GPU, "Special puller engine method {:X} not implemented", method); |
| 303 | static_cast<u32>(method)); | ||
| 304 | break; | 303 | break; |
| 305 | } | 304 | } |
| 306 | } | 305 | } |
| @@ -379,7 +378,7 @@ void GPU::ProcessBindMethod(const MethodCall& method_call) { | |||
| 379 | dma_pusher->BindSubchannel(kepler_memory.get(), method_call.subchannel); | 378 | dma_pusher->BindSubchannel(kepler_memory.get(), method_call.subchannel); |
| 380 | break; | 379 | break; |
| 381 | default: | 380 | default: |
| 382 | UNIMPLEMENTED_MSG("Unimplemented engine {:04X}", static_cast<u32>(engine_id)); | 381 | UNIMPLEMENTED_MSG("Unimplemented engine {:04X}", engine_id); |
| 383 | } | 382 | } |
| 384 | } | 383 | } |
| 385 | 384 | ||
| @@ -392,8 +391,7 @@ void GPU::ProcessFenceActionMethod() { | |||
| 392 | IncrementSyncPoint(regs.fence_action.syncpoint_id); | 391 | IncrementSyncPoint(regs.fence_action.syncpoint_id); |
| 393 | break; | 392 | break; |
| 394 | default: | 393 | default: |
| 395 | UNIMPLEMENTED_MSG("Unimplemented operation {}", | 394 | UNIMPLEMENTED_MSG("Unimplemented operation {}", regs.fence_action.op.Value()); |
| 396 | static_cast<u32>(regs.fence_action.op.Value())); | ||
| 397 | } | 395 | } |
| 398 | } | 396 | } |
| 399 | 397 | ||
diff --git a/src/video_core/macro/macro_interpreter.cpp b/src/video_core/macro/macro_interpreter.cpp index 44a71aa6c..8da26fd59 100644 --- a/src/video_core/macro/macro_interpreter.cpp +++ b/src/video_core/macro/macro_interpreter.cpp | |||
| @@ -133,8 +133,7 @@ bool MacroInterpreterImpl::Step(bool is_delay_slot) { | |||
| 133 | break; | 133 | break; |
| 134 | } | 134 | } |
| 135 | default: | 135 | default: |
| 136 | UNIMPLEMENTED_MSG("Unimplemented macro operation {}", | 136 | UNIMPLEMENTED_MSG("Unimplemented macro operation {}", opcode.operation.Value()); |
| 137 | static_cast<u32>(opcode.operation.Value())); | ||
| 138 | } | 137 | } |
| 139 | 138 | ||
| 140 | // An instruction with the Exit flag will not actually | 139 | // An instruction with the Exit flag will not actually |
| @@ -182,7 +181,7 @@ u32 MacroInterpreterImpl::GetALUResult(Macro::ALUOperation operation, u32 src_a, | |||
| 182 | return ~(src_a & src_b); | 181 | return ~(src_a & src_b); |
| 183 | 182 | ||
| 184 | default: | 183 | default: |
| 185 | UNIMPLEMENTED_MSG("Unimplemented ALU operation {}", static_cast<u32>(operation)); | 184 | UNIMPLEMENTED_MSG("Unimplemented ALU operation {}", operation); |
| 186 | return 0; | 185 | return 0; |
| 187 | } | 186 | } |
| 188 | } | 187 | } |
| @@ -230,7 +229,7 @@ void MacroInterpreterImpl::ProcessResult(Macro::ResultOperation operation, u32 r | |||
| 230 | Send((result >> 12) & 0b111111); | 229 | Send((result >> 12) & 0b111111); |
| 231 | break; | 230 | break; |
| 232 | default: | 231 | default: |
| 233 | UNIMPLEMENTED_MSG("Unimplemented result operation {}", static_cast<u32>(operation)); | 232 | UNIMPLEMENTED_MSG("Unimplemented result operation {}", operation); |
| 234 | } | 233 | } |
| 235 | } | 234 | } |
| 236 | 235 | ||
diff --git a/src/video_core/macro/macro_jit_x64.cpp b/src/video_core/macro/macro_jit_x64.cpp index c82bb987f..c6b2b2109 100644 --- a/src/video_core/macro/macro_jit_x64.cpp +++ b/src/video_core/macro/macro_jit_x64.cpp | |||
| @@ -165,8 +165,7 @@ void MacroJITx64Impl::Compile_ALU(Macro::Opcode opcode) { | |||
| 165 | } | 165 | } |
| 166 | break; | 166 | break; |
| 167 | default: | 167 | default: |
| 168 | UNIMPLEMENTED_MSG("Unimplemented ALU operation {}", | 168 | UNIMPLEMENTED_MSG("Unimplemented ALU operation {}", opcode.alu_operation.Value()); |
| 169 | static_cast<std::size_t>(opcode.alu_operation.Value())); | ||
| 170 | break; | 169 | break; |
| 171 | } | 170 | } |
| 172 | Compile_ProcessResult(opcode.result_operation, opcode.dst); | 171 | Compile_ProcessResult(opcode.result_operation, opcode.dst); |
| @@ -604,7 +603,7 @@ void MacroJITx64Impl::Compile_ProcessResult(Macro::ResultOperation operation, u3 | |||
| 604 | Compile_Send(RESULT); | 603 | Compile_Send(RESULT); |
| 605 | break; | 604 | break; |
| 606 | default: | 605 | default: |
| 607 | UNIMPLEMENTED_MSG("Unimplemented macro operation {}", static_cast<std::size_t>(operation)); | 606 | UNIMPLEMENTED_MSG("Unimplemented macro operation {}", operation); |
| 608 | } | 607 | } |
| 609 | } | 608 | } |
| 610 | 609 | ||
diff --git a/src/video_core/renderer_opengl/gl_arb_decompiler.cpp b/src/video_core/renderer_opengl/gl_arb_decompiler.cpp index 5378c398e..78066cc63 100644 --- a/src/video_core/renderer_opengl/gl_arb_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_arb_decompiler.cpp | |||
| @@ -71,7 +71,7 @@ std::string_view GetInputFlags(PixelImap attribute) { | |||
| 71 | case PixelImap::Unused: | 71 | case PixelImap::Unused: |
| 72 | break; | 72 | break; |
| 73 | } | 73 | } |
| 74 | UNIMPLEMENTED_MSG("Unknown attribute usage index={}", static_cast<int>(attribute)); | 74 | UNIMPLEMENTED_MSG("Unknown attribute usage index={}", attribute); |
| 75 | return {}; | 75 | return {}; |
| 76 | } | 76 | } |
| 77 | 77 | ||
| @@ -123,7 +123,7 @@ std::string_view PrimitiveDescription(Tegra::Engines::Maxwell3D::Regs::Primitive | |||
| 123 | case Tegra::Engines::Maxwell3D::Regs::PrimitiveTopology::TriangleStripAdjacency: | 123 | case Tegra::Engines::Maxwell3D::Regs::PrimitiveTopology::TriangleStripAdjacency: |
| 124 | return "TRIANGLES_ADJACENCY"; | 124 | return "TRIANGLES_ADJACENCY"; |
| 125 | default: | 125 | default: |
| 126 | UNIMPLEMENTED_MSG("topology={}", static_cast<int>(topology)); | 126 | UNIMPLEMENTED_MSG("topology={}", topology); |
| 127 | return "POINTS"; | 127 | return "POINTS"; |
| 128 | } | 128 | } |
| 129 | } | 129 | } |
| @@ -137,7 +137,7 @@ std::string_view TopologyName(Tegra::Shader::OutputTopology topology) { | |||
| 137 | case Tegra::Shader::OutputTopology::TriangleStrip: | 137 | case Tegra::Shader::OutputTopology::TriangleStrip: |
| 138 | return "TRIANGLE_STRIP"; | 138 | return "TRIANGLE_STRIP"; |
| 139 | default: | 139 | default: |
| 140 | UNIMPLEMENTED_MSG("Unknown output topology: {}", static_cast<u32>(topology)); | 140 | UNIMPLEMENTED_MSG("Unknown output topology: {}", topology); |
| 141 | return "points"; | 141 | return "points"; |
| 142 | } | 142 | } |
| 143 | } | 143 | } |
| @@ -1351,7 +1351,7 @@ std::string ARBDecompiler::Visit(const Node& node) { | |||
| 1351 | GetGenericAttributeIndex(index), swizzle); | 1351 | GetGenericAttributeIndex(index), swizzle); |
| 1352 | } | 1352 | } |
| 1353 | } | 1353 | } |
| 1354 | UNIMPLEMENTED_MSG("Unimplemented input attribute={}", static_cast<int>(index)); | 1354 | UNIMPLEMENTED_MSG("Unimplemented input attribute={}", index); |
| 1355 | break; | 1355 | break; |
| 1356 | } | 1356 | } |
| 1357 | return "{0, 0, 0, 0}.x"; | 1357 | return "{0, 0, 0, 0}.x"; |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 8572af5a5..e58e84759 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -131,7 +131,7 @@ std::pair<GLint, GLint> TransformFeedbackEnum(u8 location) { | |||
| 131 | case 43: | 131 | case 43: |
| 132 | return {GL_BACK_SECONDARY_COLOR_NV, 0}; | 132 | return {GL_BACK_SECONDARY_COLOR_NV, 0}; |
| 133 | } | 133 | } |
| 134 | UNIMPLEMENTED_MSG("index={}", static_cast<int>(index)); | 134 | UNIMPLEMENTED_MSG("index={}", index); |
| 135 | return {GL_POSITION, 0}; | 135 | return {GL_POSITION, 0}; |
| 136 | } | 136 | } |
| 137 | 137 | ||
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 0940969ba..0c97a8988 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -316,7 +316,7 @@ std::pair<const char*, u32> GetPrimitiveDescription(Maxwell::PrimitiveTopology t | |||
| 316 | case Maxwell::PrimitiveTopology::TriangleStripAdjacency: | 316 | case Maxwell::PrimitiveTopology::TriangleStripAdjacency: |
| 317 | return {"triangles_adjacency", 6}; | 317 | return {"triangles_adjacency", 6}; |
| 318 | default: | 318 | default: |
| 319 | UNIMPLEMENTED_MSG("topology={}", static_cast<int>(topology)); | 319 | UNIMPLEMENTED_MSG("topology={}", topology); |
| 320 | return {"points", 1}; | 320 | return {"points", 1}; |
| 321 | } | 321 | } |
| 322 | } | 322 | } |
| @@ -342,7 +342,7 @@ std::string GetTopologyName(Tegra::Shader::OutputTopology topology) { | |||
| 342 | case Tegra::Shader::OutputTopology::TriangleStrip: | 342 | case Tegra::Shader::OutputTopology::TriangleStrip: |
| 343 | return "triangle_strip"; | 343 | return "triangle_strip"; |
| 344 | default: | 344 | default: |
| 345 | UNIMPLEMENTED_MSG("Unknown output topology: {}", static_cast<u32>(topology)); | 345 | UNIMPLEMENTED_MSG("Unknown output topology: {}", topology); |
| 346 | return "points"; | 346 | return "points"; |
| 347 | } | 347 | } |
| 348 | } | 348 | } |
| @@ -745,7 +745,7 @@ private: | |||
| 745 | case PixelImap::Unused: | 745 | case PixelImap::Unused: |
| 746 | break; | 746 | break; |
| 747 | } | 747 | } |
| 748 | UNIMPLEMENTED_MSG("Unknown attribute usage index={}", static_cast<int>(attribute)); | 748 | UNIMPLEMENTED_MSG("Unknown attribute usage index={}", attribute); |
| 749 | return {}; | 749 | return {}; |
| 750 | } | 750 | } |
| 751 | 751 | ||
| @@ -1252,7 +1252,7 @@ private: | |||
| 1252 | } | 1252 | } |
| 1253 | break; | 1253 | break; |
| 1254 | } | 1254 | } |
| 1255 | UNIMPLEMENTED_MSG("Unhandled input attribute: {}", static_cast<u32>(attribute)); | 1255 | UNIMPLEMENTED_MSG("Unhandled input attribute: {}", attribute); |
| 1256 | return {"0", Type::Int}; | 1256 | return {"0", Type::Int}; |
| 1257 | } | 1257 | } |
| 1258 | 1258 | ||
| @@ -1332,7 +1332,7 @@ private: | |||
| 1332 | GetSwizzle(element)), | 1332 | GetSwizzle(element)), |
| 1333 | Type::Float}}; | 1333 | Type::Float}}; |
| 1334 | } | 1334 | } |
| 1335 | UNIMPLEMENTED_MSG("Unhandled output attribute: {}", static_cast<u32>(attribute)); | 1335 | UNIMPLEMENTED_MSG("Unhandled output attribute: {}", attribute); |
| 1336 | return std::nullopt; | 1336 | return std::nullopt; |
| 1337 | } | 1337 | } |
| 1338 | } | 1338 | } |
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index f19ef2173..daf352b50 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp | |||
| @@ -689,8 +689,7 @@ void TextureCacheOpenGL::BufferCopy(Surface& src_surface, Surface& dst_surface) | |||
| 689 | dest_format.format, dest_format.type, nullptr); | 689 | dest_format.format, dest_format.type, nullptr); |
| 690 | break; | 690 | break; |
| 691 | default: | 691 | default: |
| 692 | LOG_CRITICAL(Render_OpenGL, "Unimplemented surface target={}", | 692 | LOG_CRITICAL(Render_OpenGL, "Unimplemented surface target={}", dst_params.target); |
| 693 | static_cast<u32>(dst_params.target)); | ||
| 694 | UNREACHABLE(); | 693 | UNREACHABLE(); |
| 695 | } | 694 | } |
| 696 | } | 695 | } |
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index a8be2aa37..dd4ee3361 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h | |||
| @@ -107,7 +107,7 @@ inline GLenum IndexFormat(Maxwell::IndexFormat index_format) { | |||
| 107 | case Maxwell::IndexFormat::UnsignedInt: | 107 | case Maxwell::IndexFormat::UnsignedInt: |
| 108 | return GL_UNSIGNED_INT; | 108 | return GL_UNSIGNED_INT; |
| 109 | } | 109 | } |
| 110 | UNREACHABLE_MSG("Invalid index_format={}", static_cast<u32>(index_format)); | 110 | UNREACHABLE_MSG("Invalid index_format={}", index_format); |
| 111 | return {}; | 111 | return {}; |
| 112 | } | 112 | } |
| 113 | 113 | ||
| @@ -144,7 +144,7 @@ inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) { | |||
| 144 | case Maxwell::PrimitiveTopology::Patches: | 144 | case Maxwell::PrimitiveTopology::Patches: |
| 145 | return GL_PATCHES; | 145 | return GL_PATCHES; |
| 146 | } | 146 | } |
| 147 | UNREACHABLE_MSG("Invalid topology={}", static_cast<int>(topology)); | 147 | UNREACHABLE_MSG("Invalid topology={}", topology); |
| 148 | return GL_POINTS; | 148 | return GL_POINTS; |
| 149 | } | 149 | } |
| 150 | 150 | ||
| @@ -172,8 +172,8 @@ inline GLenum TextureFilterMode(Tegra::Texture::TextureFilter filter_mode, | |||
| 172 | } | 172 | } |
| 173 | break; | 173 | break; |
| 174 | } | 174 | } |
| 175 | UNREACHABLE_MSG("Invalid texture filter mode={} and mipmap filter mode={}", | 175 | UNREACHABLE_MSG("Invalid texture filter mode={} and mipmap filter mode={}", filter_mode, |
| 176 | static_cast<u32>(filter_mode), static_cast<u32>(mipmap_filter_mode)); | 176 | mipmap_filter_mode); |
| 177 | return GL_NEAREST; | 177 | return GL_NEAREST; |
| 178 | } | 178 | } |
| 179 | 179 | ||
| @@ -204,7 +204,7 @@ inline GLenum WrapMode(Tegra::Texture::WrapMode wrap_mode) { | |||
| 204 | return GL_MIRROR_CLAMP_TO_EDGE; | 204 | return GL_MIRROR_CLAMP_TO_EDGE; |
| 205 | } | 205 | } |
| 206 | } | 206 | } |
| 207 | UNIMPLEMENTED_MSG("Unimplemented texture wrap mode={}", static_cast<u32>(wrap_mode)); | 207 | UNIMPLEMENTED_MSG("Unimplemented texture wrap mode={}", wrap_mode); |
| 208 | return GL_REPEAT; | 208 | return GL_REPEAT; |
| 209 | } | 209 | } |
| 210 | 210 | ||
| @@ -227,7 +227,7 @@ inline GLenum DepthCompareFunc(Tegra::Texture::DepthCompareFunc func) { | |||
| 227 | case Tegra::Texture::DepthCompareFunc::Always: | 227 | case Tegra::Texture::DepthCompareFunc::Always: |
| 228 | return GL_ALWAYS; | 228 | return GL_ALWAYS; |
| 229 | } | 229 | } |
| 230 | UNIMPLEMENTED_MSG("Unimplemented texture depth compare function={}", static_cast<u32>(func)); | 230 | UNIMPLEMENTED_MSG("Unimplemented texture depth compare function={}", func); |
| 231 | return GL_GREATER; | 231 | return GL_GREATER; |
| 232 | } | 232 | } |
| 233 | 233 | ||
| @@ -249,7 +249,7 @@ inline GLenum BlendEquation(Maxwell::Blend::Equation equation) { | |||
| 249 | case Maxwell::Blend::Equation::MaxGL: | 249 | case Maxwell::Blend::Equation::MaxGL: |
| 250 | return GL_MAX; | 250 | return GL_MAX; |
| 251 | } | 251 | } |
| 252 | UNIMPLEMENTED_MSG("Unimplemented blend equation={}", static_cast<u32>(equation)); | 252 | UNIMPLEMENTED_MSG("Unimplemented blend equation={}", equation); |
| 253 | return GL_FUNC_ADD; | 253 | return GL_FUNC_ADD; |
| 254 | } | 254 | } |
| 255 | 255 | ||
| @@ -313,7 +313,7 @@ inline GLenum BlendFunc(Maxwell::Blend::Factor factor) { | |||
| 313 | case Maxwell::Blend::Factor::OneMinusConstantAlphaGL: | 313 | case Maxwell::Blend::Factor::OneMinusConstantAlphaGL: |
| 314 | return GL_ONE_MINUS_CONSTANT_ALPHA; | 314 | return GL_ONE_MINUS_CONSTANT_ALPHA; |
| 315 | } | 315 | } |
| 316 | UNIMPLEMENTED_MSG("Unimplemented blend factor={}", static_cast<u32>(factor)); | 316 | UNIMPLEMENTED_MSG("Unimplemented blend factor={}", factor); |
| 317 | return GL_ZERO; | 317 | return GL_ZERO; |
| 318 | } | 318 | } |
| 319 | 319 | ||
| @@ -333,7 +333,7 @@ inline GLenum SwizzleSource(Tegra::Texture::SwizzleSource source) { | |||
| 333 | case Tegra::Texture::SwizzleSource::OneFloat: | 333 | case Tegra::Texture::SwizzleSource::OneFloat: |
| 334 | return GL_ONE; | 334 | return GL_ONE; |
| 335 | } | 335 | } |
| 336 | UNIMPLEMENTED_MSG("Unimplemented swizzle source={}", static_cast<u32>(source)); | 336 | UNIMPLEMENTED_MSG("Unimplemented swizzle source={}", source); |
| 337 | return GL_ZERO; | 337 | return GL_ZERO; |
| 338 | } | 338 | } |
| 339 | 339 | ||
| @@ -364,7 +364,7 @@ inline GLenum ComparisonOp(Maxwell::ComparisonOp comparison) { | |||
| 364 | case Maxwell::ComparisonOp::AlwaysOld: | 364 | case Maxwell::ComparisonOp::AlwaysOld: |
| 365 | return GL_ALWAYS; | 365 | return GL_ALWAYS; |
| 366 | } | 366 | } |
| 367 | UNIMPLEMENTED_MSG("Unimplemented comparison op={}", static_cast<u32>(comparison)); | 367 | UNIMPLEMENTED_MSG("Unimplemented comparison op={}", comparison); |
| 368 | return GL_ALWAYS; | 368 | return GL_ALWAYS; |
| 369 | } | 369 | } |
| 370 | 370 | ||
| @@ -395,7 +395,7 @@ inline GLenum StencilOp(Maxwell::StencilOp stencil) { | |||
| 395 | case Maxwell::StencilOp::DecrWrapOGL: | 395 | case Maxwell::StencilOp::DecrWrapOGL: |
| 396 | return GL_DECR_WRAP; | 396 | return GL_DECR_WRAP; |
| 397 | } | 397 | } |
| 398 | UNIMPLEMENTED_MSG("Unimplemented stencil op={}", static_cast<u32>(stencil)); | 398 | UNIMPLEMENTED_MSG("Unimplemented stencil op={}", stencil); |
| 399 | return GL_KEEP; | 399 | return GL_KEEP; |
| 400 | } | 400 | } |
| 401 | 401 | ||
| @@ -406,7 +406,7 @@ inline GLenum FrontFace(Maxwell::FrontFace front_face) { | |||
| 406 | case Maxwell::FrontFace::CounterClockWise: | 406 | case Maxwell::FrontFace::CounterClockWise: |
| 407 | return GL_CCW; | 407 | return GL_CCW; |
| 408 | } | 408 | } |
| 409 | UNIMPLEMENTED_MSG("Unimplemented front face cull={}", static_cast<u32>(front_face)); | 409 | UNIMPLEMENTED_MSG("Unimplemented front face cull={}", front_face); |
| 410 | return GL_CCW; | 410 | return GL_CCW; |
| 411 | } | 411 | } |
| 412 | 412 | ||
| @@ -419,7 +419,7 @@ inline GLenum CullFace(Maxwell::CullFace cull_face) { | |||
| 419 | case Maxwell::CullFace::FrontAndBack: | 419 | case Maxwell::CullFace::FrontAndBack: |
| 420 | return GL_FRONT_AND_BACK; | 420 | return GL_FRONT_AND_BACK; |
| 421 | } | 421 | } |
| 422 | UNIMPLEMENTED_MSG("Unimplemented cull face={}", static_cast<u32>(cull_face)); | 422 | UNIMPLEMENTED_MSG("Unimplemented cull face={}", cull_face); |
| 423 | return GL_BACK; | 423 | return GL_BACK; |
| 424 | } | 424 | } |
| 425 | 425 | ||
| @@ -458,7 +458,7 @@ inline GLenum LogicOp(Maxwell::LogicOperation operation) { | |||
| 458 | case Maxwell::LogicOperation::Set: | 458 | case Maxwell::LogicOperation::Set: |
| 459 | return GL_SET; | 459 | return GL_SET; |
| 460 | } | 460 | } |
| 461 | UNIMPLEMENTED_MSG("Unimplemented logic operation={}", static_cast<u32>(operation)); | 461 | UNIMPLEMENTED_MSG("Unimplemented logic operation={}", operation); |
| 462 | return GL_COPY; | 462 | return GL_COPY; |
| 463 | } | 463 | } |
| 464 | 464 | ||
| @@ -471,7 +471,7 @@ inline GLenum PolygonMode(Maxwell::PolygonMode polygon_mode) { | |||
| 471 | case Maxwell::PolygonMode::Fill: | 471 | case Maxwell::PolygonMode::Fill: |
| 472 | return GL_FILL; | 472 | return GL_FILL; |
| 473 | } | 473 | } |
| 474 | UNREACHABLE_MSG("Invalid polygon mode={}", static_cast<int>(polygon_mode)); | 474 | UNREACHABLE_MSG("Invalid polygon mode={}", polygon_mode); |
| 475 | return GL_FILL; | 475 | return GL_FILL; |
| 476 | } | 476 | } |
| 477 | 477 | ||
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 521b03ba2..cbfaaa99c 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -348,7 +348,7 @@ void RendererOpenGL::DrawScreen(const Layout::FramebufferLayout& layout) { | |||
| 348 | } else { | 348 | } else { |
| 349 | // Other transformations are unsupported | 349 | // Other transformations are unsupported |
| 350 | LOG_CRITICAL(Render_OpenGL, "Unsupported framebuffer_transform_flags={}", | 350 | LOG_CRITICAL(Render_OpenGL, "Unsupported framebuffer_transform_flags={}", |
| 351 | static_cast<u32>(framebuffer_transform_flags)); | 351 | framebuffer_transform_flags); |
| 352 | UNIMPLEMENTED(); | 352 | UNIMPLEMENTED(); |
| 353 | } | 353 | } |
| 354 | } | 354 | } |
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp index d22de1d81..58e117eb3 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp | |||
| @@ -26,7 +26,7 @@ VkFilter Filter(Tegra::Texture::TextureFilter filter) { | |||
| 26 | case Tegra::Texture::TextureFilter::Linear: | 26 | case Tegra::Texture::TextureFilter::Linear: |
| 27 | return VK_FILTER_LINEAR; | 27 | return VK_FILTER_LINEAR; |
| 28 | } | 28 | } |
| 29 | UNREACHABLE_MSG("Invalid sampler filter={}", static_cast<u32>(filter)); | 29 | UNREACHABLE_MSG("Invalid sampler filter={}", filter); |
| 30 | return {}; | 30 | return {}; |
| 31 | } | 31 | } |
| 32 | 32 | ||
| @@ -43,7 +43,7 @@ VkSamplerMipmapMode MipmapMode(Tegra::Texture::TextureMipmapFilter mipmap_filter | |||
| 43 | case Tegra::Texture::TextureMipmapFilter::Linear: | 43 | case Tegra::Texture::TextureMipmapFilter::Linear: |
| 44 | return VK_SAMPLER_MIPMAP_MODE_LINEAR; | 44 | return VK_SAMPLER_MIPMAP_MODE_LINEAR; |
| 45 | } | 45 | } |
| 46 | UNREACHABLE_MSG("Invalid sampler mipmap mode={}", static_cast<u32>(mipmap_filter)); | 46 | UNREACHABLE_MSG("Invalid sampler mipmap mode={}", mipmap_filter); |
| 47 | return {}; | 47 | return {}; |
| 48 | } | 48 | } |
| 49 | 49 | ||
| @@ -79,7 +79,7 @@ VkSamplerAddressMode WrapMode(const VKDevice& device, Tegra::Texture::WrapMode w | |||
| 79 | UNIMPLEMENTED(); | 79 | UNIMPLEMENTED(); |
| 80 | return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; | 80 | return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; |
| 81 | default: | 81 | default: |
| 82 | UNIMPLEMENTED_MSG("Unimplemented wrap mode={}", static_cast<u32>(wrap_mode)); | 82 | UNIMPLEMENTED_MSG("Unimplemented wrap mode={}", wrap_mode); |
| 83 | return {}; | 83 | return {}; |
| 84 | } | 84 | } |
| 85 | } | 85 | } |
| @@ -103,8 +103,7 @@ VkCompareOp DepthCompareFunction(Tegra::Texture::DepthCompareFunc depth_compare_ | |||
| 103 | case Tegra::Texture::DepthCompareFunc::Always: | 103 | case Tegra::Texture::DepthCompareFunc::Always: |
| 104 | return VK_COMPARE_OP_ALWAYS; | 104 | return VK_COMPARE_OP_ALWAYS; |
| 105 | } | 105 | } |
| 106 | UNIMPLEMENTED_MSG("Unimplemented sampler depth compare function={}", | 106 | UNIMPLEMENTED_MSG("Unimplemented sampler depth compare function={}", depth_compare_func); |
| 107 | static_cast<u32>(depth_compare_func)); | ||
| 108 | return {}; | 107 | return {}; |
| 109 | } | 108 | } |
| 110 | 109 | ||
| @@ -228,8 +227,7 @@ FormatInfo SurfaceFormat(const VKDevice& device, FormatType format_type, PixelFo | |||
| 228 | 227 | ||
| 229 | auto tuple = tex_format_tuples[static_cast<std::size_t>(pixel_format)]; | 228 | auto tuple = tex_format_tuples[static_cast<std::size_t>(pixel_format)]; |
| 230 | if (tuple.format == VK_FORMAT_UNDEFINED) { | 229 | if (tuple.format == VK_FORMAT_UNDEFINED) { |
| 231 | UNIMPLEMENTED_MSG("Unimplemented texture format with pixel format={}", | 230 | UNIMPLEMENTED_MSG("Unimplemented texture format with pixel format={}", pixel_format); |
| 232 | static_cast<u32>(pixel_format)); | ||
| 233 | return {VK_FORMAT_A8B8G8R8_UNORM_PACK32, true, true}; | 231 | return {VK_FORMAT_A8B8G8R8_UNORM_PACK32, true, true}; |
| 234 | } | 232 | } |
| 235 | 233 | ||
| @@ -275,7 +273,7 @@ VkShaderStageFlagBits ShaderStage(Tegra::Engines::ShaderType stage) { | |||
| 275 | case Tegra::Engines::ShaderType::Compute: | 273 | case Tegra::Engines::ShaderType::Compute: |
| 276 | return VK_SHADER_STAGE_COMPUTE_BIT; | 274 | return VK_SHADER_STAGE_COMPUTE_BIT; |
| 277 | } | 275 | } |
| 278 | UNIMPLEMENTED_MSG("Unimplemented shader stage={}", static_cast<u32>(stage)); | 276 | UNIMPLEMENTED_MSG("Unimplemented shader stage={}", stage); |
| 279 | return {}; | 277 | return {}; |
| 280 | } | 278 | } |
| 281 | 279 | ||
| @@ -300,7 +298,7 @@ VkPrimitiveTopology PrimitiveTopology([[maybe_unused]] const VKDevice& device, | |||
| 300 | case Maxwell::PrimitiveTopology::Patches: | 298 | case Maxwell::PrimitiveTopology::Patches: |
| 301 | return VK_PRIMITIVE_TOPOLOGY_PATCH_LIST; | 299 | return VK_PRIMITIVE_TOPOLOGY_PATCH_LIST; |
| 302 | default: | 300 | default: |
| 303 | UNIMPLEMENTED_MSG("Unimplemented topology={}", static_cast<u32>(topology)); | 301 | UNIMPLEMENTED_MSG("Unimplemented topology={}", topology); |
| 304 | return {}; | 302 | return {}; |
| 305 | } | 303 | } |
| 306 | } | 304 | } |
| @@ -490,8 +488,7 @@ VkFormat VertexFormat(Maxwell::VertexAttribute::Type type, Maxwell::VertexAttrib | |||
| 490 | } | 488 | } |
| 491 | break; | 489 | break; |
| 492 | } | 490 | } |
| 493 | UNIMPLEMENTED_MSG("Unimplemented vertex format of type={} and size={}", static_cast<u32>(type), | 491 | UNIMPLEMENTED_MSG("Unimplemented vertex format of type={} and size={}", type, size); |
| 494 | static_cast<u32>(size)); | ||
| 495 | return {}; | 492 | return {}; |
| 496 | } | 493 | } |
| 497 | 494 | ||
| @@ -522,7 +519,7 @@ VkCompareOp ComparisonOp(Maxwell::ComparisonOp comparison) { | |||
| 522 | case Maxwell::ComparisonOp::AlwaysOld: | 519 | case Maxwell::ComparisonOp::AlwaysOld: |
| 523 | return VK_COMPARE_OP_ALWAYS; | 520 | return VK_COMPARE_OP_ALWAYS; |
| 524 | } | 521 | } |
| 525 | UNIMPLEMENTED_MSG("Unimplemented comparison op={}", static_cast<u32>(comparison)); | 522 | UNIMPLEMENTED_MSG("Unimplemented comparison op={}", comparison); |
| 526 | return {}; | 523 | return {}; |
| 527 | } | 524 | } |
| 528 | 525 | ||
| @@ -539,7 +536,7 @@ VkIndexType IndexFormat(const VKDevice& device, Maxwell::IndexFormat index_forma | |||
| 539 | case Maxwell::IndexFormat::UnsignedInt: | 536 | case Maxwell::IndexFormat::UnsignedInt: |
| 540 | return VK_INDEX_TYPE_UINT32; | 537 | return VK_INDEX_TYPE_UINT32; |
| 541 | } | 538 | } |
| 542 | UNIMPLEMENTED_MSG("Unimplemented index_format={}", static_cast<u32>(index_format)); | 539 | UNIMPLEMENTED_MSG("Unimplemented index_format={}", index_format); |
| 543 | return {}; | 540 | return {}; |
| 544 | } | 541 | } |
| 545 | 542 | ||
| @@ -570,7 +567,7 @@ VkStencilOp StencilOp(Maxwell::StencilOp stencil_op) { | |||
| 570 | case Maxwell::StencilOp::DecrWrapOGL: | 567 | case Maxwell::StencilOp::DecrWrapOGL: |
| 571 | return VK_STENCIL_OP_DECREMENT_AND_WRAP; | 568 | return VK_STENCIL_OP_DECREMENT_AND_WRAP; |
| 572 | } | 569 | } |
| 573 | UNIMPLEMENTED_MSG("Unimplemented stencil op={}", static_cast<u32>(stencil_op)); | 570 | UNIMPLEMENTED_MSG("Unimplemented stencil op={}", stencil_op); |
| 574 | return {}; | 571 | return {}; |
| 575 | } | 572 | } |
| 576 | 573 | ||
| @@ -592,7 +589,7 @@ VkBlendOp BlendEquation(Maxwell::Blend::Equation equation) { | |||
| 592 | case Maxwell::Blend::Equation::MaxGL: | 589 | case Maxwell::Blend::Equation::MaxGL: |
| 593 | return VK_BLEND_OP_MAX; | 590 | return VK_BLEND_OP_MAX; |
| 594 | } | 591 | } |
| 595 | UNIMPLEMENTED_MSG("Unimplemented blend equation={}", static_cast<u32>(equation)); | 592 | UNIMPLEMENTED_MSG("Unimplemented blend equation={}", equation); |
| 596 | return {}; | 593 | return {}; |
| 597 | } | 594 | } |
| 598 | 595 | ||
| @@ -656,7 +653,7 @@ VkBlendFactor BlendFactor(Maxwell::Blend::Factor factor) { | |||
| 656 | case Maxwell::Blend::Factor::OneMinusConstantAlphaGL: | 653 | case Maxwell::Blend::Factor::OneMinusConstantAlphaGL: |
| 657 | return VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA; | 654 | return VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA; |
| 658 | } | 655 | } |
| 659 | UNIMPLEMENTED_MSG("Unimplemented blend factor={}", static_cast<u32>(factor)); | 656 | UNIMPLEMENTED_MSG("Unimplemented blend factor={}", factor); |
| 660 | return {}; | 657 | return {}; |
| 661 | } | 658 | } |
| 662 | 659 | ||
| @@ -667,7 +664,7 @@ VkFrontFace FrontFace(Maxwell::FrontFace front_face) { | |||
| 667 | case Maxwell::FrontFace::CounterClockWise: | 664 | case Maxwell::FrontFace::CounterClockWise: |
| 668 | return VK_FRONT_FACE_COUNTER_CLOCKWISE; | 665 | return VK_FRONT_FACE_COUNTER_CLOCKWISE; |
| 669 | } | 666 | } |
| 670 | UNIMPLEMENTED_MSG("Unimplemented front face={}", static_cast<u32>(front_face)); | 667 | UNIMPLEMENTED_MSG("Unimplemented front face={}", front_face); |
| 671 | return {}; | 668 | return {}; |
| 672 | } | 669 | } |
| 673 | 670 | ||
| @@ -680,7 +677,7 @@ VkCullModeFlags CullFace(Maxwell::CullFace cull_face) { | |||
| 680 | case Maxwell::CullFace::FrontAndBack: | 677 | case Maxwell::CullFace::FrontAndBack: |
| 681 | return VK_CULL_MODE_FRONT_AND_BACK; | 678 | return VK_CULL_MODE_FRONT_AND_BACK; |
| 682 | } | 679 | } |
| 683 | UNIMPLEMENTED_MSG("Unimplemented cull face={}", static_cast<u32>(cull_face)); | 680 | UNIMPLEMENTED_MSG("Unimplemented cull face={}", cull_face); |
| 684 | return {}; | 681 | return {}; |
| 685 | } | 682 | } |
| 686 | 683 | ||
| @@ -700,7 +697,7 @@ VkComponentSwizzle SwizzleSource(Tegra::Texture::SwizzleSource swizzle) { | |||
| 700 | case Tegra::Texture::SwizzleSource::OneFloat: | 697 | case Tegra::Texture::SwizzleSource::OneFloat: |
| 701 | return VK_COMPONENT_SWIZZLE_ONE; | 698 | return VK_COMPONENT_SWIZZLE_ONE; |
| 702 | } | 699 | } |
| 703 | UNIMPLEMENTED_MSG("Unimplemented swizzle source={}", static_cast<u32>(swizzle)); | 700 | UNIMPLEMENTED_MSG("Unimplemented swizzle source={}", swizzle); |
| 704 | return {}; | 701 | return {}; |
| 705 | } | 702 | } |
| 706 | 703 | ||
| @@ -723,7 +720,7 @@ VkViewportCoordinateSwizzleNV ViewportSwizzle(Maxwell::ViewportSwizzle swizzle) | |||
| 723 | case Maxwell::ViewportSwizzle::NegativeW: | 720 | case Maxwell::ViewportSwizzle::NegativeW: |
| 724 | return VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV; | 721 | return VK_VIEWPORT_COORDINATE_SWIZZLE_NEGATIVE_W_NV; |
| 725 | } | 722 | } |
| 726 | UNREACHABLE_MSG("Invalid swizzle={}", static_cast<int>(swizzle)); | 723 | UNREACHABLE_MSG("Invalid swizzle={}", swizzle); |
| 727 | return {}; | 724 | return {}; |
| 728 | } | 725 | } |
| 729 | 726 | ||
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 39e58a56f..3fb264d03 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | |||
| @@ -75,7 +75,7 @@ ShaderType GetShaderType(Maxwell::ShaderProgram program) { | |||
| 75 | case Maxwell::ShaderProgram::Fragment: | 75 | case Maxwell::ShaderProgram::Fragment: |
| 76 | return ShaderType::Fragment; | 76 | return ShaderType::Fragment; |
| 77 | default: | 77 | default: |
| 78 | UNIMPLEMENTED_MSG("program={}", static_cast<u32>(program)); | 78 | UNIMPLEMENTED_MSG("program={}", program); |
| 79 | return ShaderType::Vertex; | 79 | return ShaderType::Vertex; |
| 80 | } | 80 | } |
| 81 | } | 81 | } |
diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp index 7b0169acd..5748eab3a 100644 --- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | |||
| @@ -114,7 +114,7 @@ spv::Dim GetSamplerDim(const Sampler& sampler) { | |||
| 114 | case Tegra::Shader::TextureType::TextureCube: | 114 | case Tegra::Shader::TextureType::TextureCube: |
| 115 | return spv::Dim::Cube; | 115 | return spv::Dim::Cube; |
| 116 | default: | 116 | default: |
| 117 | UNIMPLEMENTED_MSG("Unimplemented sampler type={}", static_cast<int>(sampler.type)); | 117 | UNIMPLEMENTED_MSG("Unimplemented sampler type={}", sampler.type); |
| 118 | return spv::Dim::Dim2D; | 118 | return spv::Dim::Dim2D; |
| 119 | } | 119 | } |
| 120 | } | 120 | } |
| @@ -134,7 +134,7 @@ std::pair<spv::Dim, bool> GetImageDim(const Image& image) { | |||
| 134 | case Tegra::Shader::ImageType::Texture3D: | 134 | case Tegra::Shader::ImageType::Texture3D: |
| 135 | return {spv::Dim::Dim3D, false}; | 135 | return {spv::Dim::Dim3D, false}; |
| 136 | default: | 136 | default: |
| 137 | UNIMPLEMENTED_MSG("Unimplemented image type={}", static_cast<int>(image.type)); | 137 | UNIMPLEMENTED_MSG("Unimplemented image type={}", image.type); |
| 138 | return {spv::Dim::Dim2D, false}; | 138 | return {spv::Dim::Dim2D, false}; |
| 139 | } | 139 | } |
| 140 | } | 140 | } |
| @@ -1254,7 +1254,7 @@ private: | |||
| 1254 | const Id pointer = ArrayPass(type_descriptor.scalar, attribute_id, elements); | 1254 | const Id pointer = ArrayPass(type_descriptor.scalar, attribute_id, elements); |
| 1255 | return {OpLoad(GetTypeDefinition(type), pointer), type}; | 1255 | return {OpLoad(GetTypeDefinition(type), pointer), type}; |
| 1256 | } | 1256 | } |
| 1257 | UNIMPLEMENTED_MSG("Unhandled input attribute: {}", static_cast<u32>(attribute)); | 1257 | UNIMPLEMENTED_MSG("Unhandled input attribute: {}", attribute); |
| 1258 | return {v_float_zero, Type::Float}; | 1258 | return {v_float_zero, Type::Float}; |
| 1259 | } | 1259 | } |
| 1260 | 1260 | ||
| @@ -1890,7 +1890,7 @@ private: | |||
| 1890 | case Tegra::Shader::TextureType::Texture3D: | 1890 | case Tegra::Shader::TextureType::Texture3D: |
| 1891 | return 3; | 1891 | return 3; |
| 1892 | default: | 1892 | default: |
| 1893 | UNREACHABLE_MSG("Invalid texture type={}", static_cast<int>(type)); | 1893 | UNREACHABLE_MSG("Invalid texture type={}", type); |
| 1894 | return 2; | 1894 | return 2; |
| 1895 | } | 1895 | } |
| 1896 | }(); | 1896 | }(); |
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index 1ff109880..ae2e3322c 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp | |||
| @@ -52,7 +52,7 @@ VkImageType SurfaceTargetToImage(SurfaceTarget target) { | |||
| 52 | UNREACHABLE(); | 52 | UNREACHABLE(); |
| 53 | return {}; | 53 | return {}; |
| 54 | } | 54 | } |
| 55 | UNREACHABLE_MSG("Unknown texture target={}", static_cast<u32>(target)); | 55 | UNREACHABLE_MSG("Unknown texture target={}", target); |
| 56 | return {}; | 56 | return {}; |
| 57 | } | 57 | } |
| 58 | 58 | ||
| @@ -64,7 +64,7 @@ VkImageAspectFlags PixelFormatToImageAspect(PixelFormat pixel_format) { | |||
| 64 | } else if (pixel_format < PixelFormat::MaxDepthStencilFormat) { | 64 | } else if (pixel_format < PixelFormat::MaxDepthStencilFormat) { |
| 65 | return VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; | 65 | return VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT; |
| 66 | } else { | 66 | } else { |
| 67 | UNREACHABLE_MSG("Invalid pixel format={}", static_cast<int>(pixel_format)); | 67 | UNREACHABLE_MSG("Invalid pixel format={}", pixel_format); |
| 68 | return VK_IMAGE_ASPECT_COLOR_BIT; | 68 | return VK_IMAGE_ASPECT_COLOR_BIT; |
| 69 | } | 69 | } |
| 70 | } | 70 | } |
diff --git a/src/video_core/shader/decode/arithmetic.cpp b/src/video_core/shader/decode/arithmetic.cpp index afef5948d..15eb700e7 100644 --- a/src/video_core/shader/decode/arithmetic.cpp +++ b/src/video_core/shader/decode/arithmetic.cpp | |||
| @@ -110,8 +110,7 @@ u32 ShaderIR::DecodeArithmetic(NodeBlock& bb, u32 pc) { | |||
| 110 | case SubOp::Sqrt: | 110 | case SubOp::Sqrt: |
| 111 | return Operation(OperationCode::FSqrt, PRECISE, op_a); | 111 | return Operation(OperationCode::FSqrt, PRECISE, op_a); |
| 112 | default: | 112 | default: |
| 113 | UNIMPLEMENTED_MSG("Unhandled MUFU sub op={0:x}", | 113 | UNIMPLEMENTED_MSG("Unhandled MUFU sub op={0:x}", instr.sub_op.Value()); |
| 114 | static_cast<unsigned>(instr.sub_op.Value())); | ||
| 115 | return Immediate(0); | 114 | return Immediate(0); |
| 116 | } | 115 | } |
| 117 | }(); | 116 | }(); |
diff --git a/src/video_core/shader/decode/arithmetic_integer.cpp b/src/video_core/shader/decode/arithmetic_integer.cpp index f32c3134b..7b5bb7003 100644 --- a/src/video_core/shader/decode/arithmetic_integer.cpp +++ b/src/video_core/shader/decode/arithmetic_integer.cpp | |||
| @@ -83,7 +83,7 @@ u32 ShaderIR::DecodeArithmeticInteger(NodeBlock& bb, u32 pc) { | |||
| 83 | case IAdd3Height::UpperHalfWord: | 83 | case IAdd3Height::UpperHalfWord: |
| 84 | return BitfieldExtract(value, 16, 16); | 84 | return BitfieldExtract(value, 16, 16); |
| 85 | default: | 85 | default: |
| 86 | UNIMPLEMENTED_MSG("Unhandled IADD3 height: {}", static_cast<u32>(height)); | 86 | UNIMPLEMENTED_MSG("Unhandled IADD3 height: {}", height); |
| 87 | return Immediate(0); | 87 | return Immediate(0); |
| 88 | } | 88 | } |
| 89 | }; | 89 | }; |
diff --git a/src/video_core/shader/decode/arithmetic_integer_immediate.cpp b/src/video_core/shader/decode/arithmetic_integer_immediate.cpp index 2a30aab2b..73580277a 100644 --- a/src/video_core/shader/decode/arithmetic_integer_immediate.cpp +++ b/src/video_core/shader/decode/arithmetic_integer_immediate.cpp | |||
| @@ -72,7 +72,7 @@ void ShaderIR::WriteLogicOperation(NodeBlock& bb, Register dest, LogicOperation | |||
| 72 | case LogicOperation::PassB: | 72 | case LogicOperation::PassB: |
| 73 | return op_b; | 73 | return op_b; |
| 74 | default: | 74 | default: |
| 75 | UNIMPLEMENTED_MSG("Unimplemented logic operation={}", static_cast<u32>(logic_op)); | 75 | UNIMPLEMENTED_MSG("Unimplemented logic operation={}", logic_op); |
| 76 | return Immediate(0); | 76 | return Immediate(0); |
| 77 | } | 77 | } |
| 78 | }(); | 78 | }(); |
| @@ -92,8 +92,7 @@ void ShaderIR::WriteLogicOperation(NodeBlock& bb, Register dest, LogicOperation | |||
| 92 | break; | 92 | break; |
| 93 | } | 93 | } |
| 94 | default: | 94 | default: |
| 95 | UNIMPLEMENTED_MSG("Unimplemented predicate result mode: {}", | 95 | UNIMPLEMENTED_MSG("Unimplemented predicate result mode: {}", predicate_mode); |
| 96 | static_cast<u32>(predicate_mode)); | ||
| 97 | } | 96 | } |
| 98 | } | 97 | } |
| 99 | 98 | ||
diff --git a/src/video_core/shader/decode/conversion.cpp b/src/video_core/shader/decode/conversion.cpp index b9989c88c..fea7a54df 100644 --- a/src/video_core/shader/decode/conversion.cpp +++ b/src/video_core/shader/decode/conversion.cpp | |||
| @@ -244,7 +244,7 @@ u32 ShaderIR::DecodeConversion(NodeBlock& bb, u32 pc) { | |||
| 244 | return Operation(OperationCode::FTrunc, value); | 244 | return Operation(OperationCode::FTrunc, value); |
| 245 | default: | 245 | default: |
| 246 | UNIMPLEMENTED_MSG("Unimplemented F2F rounding mode {}", | 246 | UNIMPLEMENTED_MSG("Unimplemented F2F rounding mode {}", |
| 247 | static_cast<u32>(instr.conversion.f2f.rounding.Value())); | 247 | instr.conversion.f2f.rounding.Value()); |
| 248 | return value; | 248 | return value; |
| 249 | } | 249 | } |
| 250 | }(); | 250 | }(); |
| @@ -300,7 +300,7 @@ u32 ShaderIR::DecodeConversion(NodeBlock& bb, u32 pc) { | |||
| 300 | return Operation(OperationCode::FTrunc, PRECISE, value); | 300 | return Operation(OperationCode::FTrunc, PRECISE, value); |
| 301 | default: | 301 | default: |
| 302 | UNIMPLEMENTED_MSG("Unimplemented F2I rounding mode {}", | 302 | UNIMPLEMENTED_MSG("Unimplemented F2I rounding mode {}", |
| 303 | static_cast<u32>(instr.conversion.f2i.rounding.Value())); | 303 | instr.conversion.f2i.rounding.Value()); |
| 304 | return Immediate(0); | 304 | return Immediate(0); |
| 305 | } | 305 | } |
| 306 | }(); | 306 | }(); |
diff --git a/src/video_core/shader/decode/memory.cpp b/src/video_core/shader/decode/memory.cpp index e2bba88dd..50f4e7d35 100644 --- a/src/video_core/shader/decode/memory.cpp +++ b/src/video_core/shader/decode/memory.cpp | |||
| @@ -47,7 +47,7 @@ OperationCode GetAtomOperation(AtomicOp op) { | |||
| 47 | case AtomicOp::Exch: | 47 | case AtomicOp::Exch: |
| 48 | return OperationCode::AtomicIExchange; | 48 | return OperationCode::AtomicIExchange; |
| 49 | default: | 49 | default: |
| 50 | UNIMPLEMENTED_MSG("op={}", static_cast<int>(op)); | 50 | UNIMPLEMENTED_MSG("op={}", op); |
| 51 | return OperationCode::AtomicIAdd; | 51 | return OperationCode::AtomicIAdd; |
| 52 | } | 52 | } |
| 53 | } | 53 | } |
| @@ -83,7 +83,7 @@ u32 GetMemorySize(Tegra::Shader::UniformType uniform_type) { | |||
| 83 | case Tegra::Shader::UniformType::UnsignedQuad: | 83 | case Tegra::Shader::UniformType::UnsignedQuad: |
| 84 | return 128; | 84 | return 128; |
| 85 | default: | 85 | default: |
| 86 | UNIMPLEMENTED_MSG("Unimplemented size={}!", static_cast<u32>(uniform_type)); | 86 | UNIMPLEMENTED_MSG("Unimplemented size={}!", uniform_type); |
| 87 | return 32; | 87 | return 32; |
| 88 | } | 88 | } |
| 89 | } | 89 | } |
| @@ -175,12 +175,12 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) { | |||
| 175 | break; | 175 | break; |
| 176 | } | 176 | } |
| 177 | default: | 177 | default: |
| 178 | UNIMPLEMENTED_MSG("Unhandled type: {}", static_cast<unsigned>(instr.ld_c.type.Value())); | 178 | UNIMPLEMENTED_MSG("Unhandled type: {}", instr.ld_c.type.Value()); |
| 179 | } | 179 | } |
| 180 | break; | 180 | break; |
| 181 | } | 181 | } |
| 182 | case OpCode::Id::LD_L: | 182 | case OpCode::Id::LD_L: |
| 183 | LOG_DEBUG(HW_GPU, "LD_L cache management mode: {}", static_cast<u64>(instr.ld_l.unknown)); | 183 | LOG_DEBUG(HW_GPU, "LD_L cache management mode: {}", instr.ld_l.unknown); |
| 184 | [[fallthrough]]; | 184 | [[fallthrough]]; |
| 185 | case OpCode::Id::LD_S: { | 185 | case OpCode::Id::LD_S: { |
| 186 | const auto GetAddress = [&](s32 offset) { | 186 | const auto GetAddress = [&](s32 offset) { |
| @@ -224,7 +224,7 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) { | |||
| 224 | } | 224 | } |
| 225 | default: | 225 | default: |
| 226 | UNIMPLEMENTED_MSG("{} Unhandled type: {}", opcode->get().GetName(), | 226 | UNIMPLEMENTED_MSG("{} Unhandled type: {}", opcode->get().GetName(), |
| 227 | static_cast<u32>(instr.ldst_sl.type.Value())); | 227 | instr.ldst_sl.type.Value()); |
| 228 | } | 228 | } |
| 229 | break; | 229 | break; |
| 230 | } | 230 | } |
| @@ -306,8 +306,7 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) { | |||
| 306 | break; | 306 | break; |
| 307 | } | 307 | } |
| 308 | case OpCode::Id::ST_L: | 308 | case OpCode::Id::ST_L: |
| 309 | LOG_DEBUG(HW_GPU, "ST_L cache management mode: {}", | 309 | LOG_DEBUG(HW_GPU, "ST_L cache management mode: {}", instr.st_l.cache_management.Value()); |
| 310 | static_cast<u64>(instr.st_l.cache_management.Value())); | ||
| 311 | [[fallthrough]]; | 310 | [[fallthrough]]; |
| 312 | case OpCode::Id::ST_S: { | 311 | case OpCode::Id::ST_S: { |
| 313 | const auto GetAddress = [&](s32 offset) { | 312 | const auto GetAddress = [&](s32 offset) { |
| @@ -340,7 +339,7 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) { | |||
| 340 | } | 339 | } |
| 341 | default: | 340 | default: |
| 342 | UNIMPLEMENTED_MSG("{} unhandled type: {}", opcode->get().GetName(), | 341 | UNIMPLEMENTED_MSG("{} unhandled type: {}", opcode->get().GetName(), |
| 343 | static_cast<u32>(instr.ldst_sl.type.Value())); | 342 | instr.ldst_sl.type.Value()); |
| 344 | } | 343 | } |
| 345 | break; | 344 | break; |
| 346 | } | 345 | } |
| @@ -387,7 +386,7 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) { | |||
| 387 | } | 386 | } |
| 388 | case OpCode::Id::RED: { | 387 | case OpCode::Id::RED: { |
| 389 | UNIMPLEMENTED_IF_MSG(instr.red.type != GlobalAtomicType::U32, "type={}", | 388 | UNIMPLEMENTED_IF_MSG(instr.red.type != GlobalAtomicType::U32, "type={}", |
| 390 | static_cast<int>(instr.red.type.Value())); | 389 | instr.red.type.Value()); |
| 391 | const auto [real_address, base_address, descriptor] = | 390 | const auto [real_address, base_address, descriptor] = |
| 392 | TrackGlobalMemory(bb, instr, true, true); | 391 | TrackGlobalMemory(bb, instr, true, true); |
| 393 | if (!real_address || !base_address) { | 392 | if (!real_address || !base_address) { |
| @@ -403,12 +402,12 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) { | |||
| 403 | UNIMPLEMENTED_IF_MSG(instr.atom.operation == AtomicOp::Inc || | 402 | UNIMPLEMENTED_IF_MSG(instr.atom.operation == AtomicOp::Inc || |
| 404 | instr.atom.operation == AtomicOp::Dec || | 403 | instr.atom.operation == AtomicOp::Dec || |
| 405 | instr.atom.operation == AtomicOp::SafeAdd, | 404 | instr.atom.operation == AtomicOp::SafeAdd, |
| 406 | "operation={}", static_cast<int>(instr.atom.operation.Value())); | 405 | "operation={}", instr.atom.operation.Value()); |
| 407 | UNIMPLEMENTED_IF_MSG(instr.atom.type == GlobalAtomicType::S64 || | 406 | UNIMPLEMENTED_IF_MSG(instr.atom.type == GlobalAtomicType::S64 || |
| 408 | instr.atom.type == GlobalAtomicType::U64 || | 407 | instr.atom.type == GlobalAtomicType::U64 || |
| 409 | instr.atom.type == GlobalAtomicType::F16x2_FTZ_RN || | 408 | instr.atom.type == GlobalAtomicType::F16x2_FTZ_RN || |
| 410 | instr.atom.type == GlobalAtomicType::F32_FTZ_RN, | 409 | instr.atom.type == GlobalAtomicType::F32_FTZ_RN, |
| 411 | "type={}", static_cast<int>(instr.atom.type.Value())); | 410 | "type={}", instr.atom.type.Value()); |
| 412 | 411 | ||
| 413 | const auto [real_address, base_address, descriptor] = | 412 | const auto [real_address, base_address, descriptor] = |
| 414 | TrackGlobalMemory(bb, instr, true, true); | 413 | TrackGlobalMemory(bb, instr, true, true); |
| @@ -428,10 +427,10 @@ u32 ShaderIR::DecodeMemory(NodeBlock& bb, u32 pc) { | |||
| 428 | case OpCode::Id::ATOMS: { | 427 | case OpCode::Id::ATOMS: { |
| 429 | UNIMPLEMENTED_IF_MSG(instr.atoms.operation == AtomicOp::Inc || | 428 | UNIMPLEMENTED_IF_MSG(instr.atoms.operation == AtomicOp::Inc || |
| 430 | instr.atoms.operation == AtomicOp::Dec, | 429 | instr.atoms.operation == AtomicOp::Dec, |
| 431 | "operation={}", static_cast<int>(instr.atoms.operation.Value())); | 430 | "operation={}", instr.atoms.operation.Value()); |
| 432 | UNIMPLEMENTED_IF_MSG(instr.atoms.type == AtomicType::S64 || | 431 | UNIMPLEMENTED_IF_MSG(instr.atoms.type == AtomicType::S64 || |
| 433 | instr.atoms.type == AtomicType::U64, | 432 | instr.atoms.type == AtomicType::U64, |
| 434 | "type={}", static_cast<int>(instr.atoms.type.Value())); | 433 | "type={}", instr.atoms.type.Value()); |
| 435 | const bool is_signed = | 434 | const bool is_signed = |
| 436 | instr.atoms.type == AtomicType::S32 || instr.atoms.type == AtomicType::S64; | 435 | instr.atoms.type == AtomicType::S32 || instr.atoms.type == AtomicType::S64; |
| 437 | const s32 offset = instr.atoms.GetImmediateOffset(); | 436 | const s32 offset = instr.atoms.GetImmediateOffset(); |
diff --git a/src/video_core/shader/decode/other.cpp b/src/video_core/shader/decode/other.cpp index 1db500bc4..d3ea07aac 100644 --- a/src/video_core/shader/decode/other.cpp +++ b/src/video_core/shader/decode/other.cpp | |||
| @@ -34,14 +34,13 @@ u32 ShaderIR::DecodeOther(NodeBlock& bb, u32 pc) { | |||
| 34 | break; | 34 | break; |
| 35 | } | 35 | } |
| 36 | case OpCode::Id::EXIT: { | 36 | case OpCode::Id::EXIT: { |
| 37 | const Tegra::Shader::ConditionCode cc = instr.flow_condition_code; | 37 | const ConditionCode cc = instr.flow_condition_code; |
| 38 | UNIMPLEMENTED_IF_MSG(cc != Tegra::Shader::ConditionCode::T, "EXIT condition code used: {}", | 38 | UNIMPLEMENTED_IF_MSG(cc != ConditionCode::T, "EXIT condition code used: {}", cc); |
| 39 | static_cast<u32>(cc)); | ||
| 40 | 39 | ||
| 41 | switch (instr.flow.cond) { | 40 | switch (instr.flow.cond) { |
| 42 | case Tegra::Shader::FlowCondition::Always: | 41 | case Tegra::Shader::FlowCondition::Always: |
| 43 | bb.push_back(Operation(OperationCode::Exit)); | 42 | bb.push_back(Operation(OperationCode::Exit)); |
| 44 | if (instr.pred.pred_index == static_cast<u64>(Tegra::Shader::Pred::UnusedIndex)) { | 43 | if (instr.pred.pred_index == static_cast<u64>(Pred::UnusedIndex)) { |
| 45 | // If this is an unconditional exit then just end processing here, | 44 | // If this is an unconditional exit then just end processing here, |
| 46 | // otherwise we have to account for the possibility of the condition | 45 | // otherwise we have to account for the possibility of the condition |
| 47 | // not being met, so continue processing the next instruction. | 46 | // not being met, so continue processing the next instruction. |
| @@ -56,17 +55,15 @@ u32 ShaderIR::DecodeOther(NodeBlock& bb, u32 pc) { | |||
| 56 | break; | 55 | break; |
| 57 | 56 | ||
| 58 | default: | 57 | default: |
| 59 | UNIMPLEMENTED_MSG("Unhandled flow condition: {}", | 58 | UNIMPLEMENTED_MSG("Unhandled flow condition: {}", instr.flow.cond.Value()); |
| 60 | static_cast<u32>(instr.flow.cond.Value())); | ||
| 61 | } | 59 | } |
| 62 | break; | 60 | break; |
| 63 | } | 61 | } |
| 64 | case OpCode::Id::KIL: { | 62 | case OpCode::Id::KIL: { |
| 65 | UNIMPLEMENTED_IF(instr.flow.cond != Tegra::Shader::FlowCondition::Always); | 63 | UNIMPLEMENTED_IF(instr.flow.cond != Tegra::Shader::FlowCondition::Always); |
| 66 | 64 | ||
| 67 | const Tegra::Shader::ConditionCode cc = instr.flow_condition_code; | 65 | const ConditionCode cc = instr.flow_condition_code; |
| 68 | UNIMPLEMENTED_IF_MSG(cc != Tegra::Shader::ConditionCode::T, "KIL condition code used: {}", | 66 | UNIMPLEMENTED_IF_MSG(cc != ConditionCode::T, "KIL condition code used: {}", cc); |
| 69 | static_cast<u32>(cc)); | ||
| 70 | 67 | ||
| 71 | bb.push_back(Operation(OperationCode::Discard)); | 68 | bb.push_back(Operation(OperationCode::Discard)); |
| 72 | break; | 69 | break; |
| @@ -130,8 +127,7 @@ u32 ShaderIR::DecodeOther(NodeBlock& bb, u32 pc) { | |||
| 130 | return Immediate(0u); | 127 | return Immediate(0u); |
| 131 | } | 128 | } |
| 132 | default: | 129 | default: |
| 133 | UNIMPLEMENTED_MSG("Unhandled system move: {}", | 130 | UNIMPLEMENTED_MSG("Unhandled system move: {}", instr.sys20.Value()); |
| 134 | static_cast<u32>(instr.sys20.Value())); | ||
| 135 | return Immediate(0u); | 131 | return Immediate(0u); |
| 136 | } | 132 | } |
| 137 | }(); | 133 | }(); |
| @@ -181,8 +177,8 @@ u32 ShaderIR::DecodeOther(NodeBlock& bb, u32 pc) { | |||
| 181 | } | 177 | } |
| 182 | const Node branch = Operation(OperationCode::BranchIndirect, operand); | 178 | const Node branch = Operation(OperationCode::BranchIndirect, operand); |
| 183 | 179 | ||
| 184 | const Tegra::Shader::ConditionCode cc = instr.flow_condition_code; | 180 | const ConditionCode cc = instr.flow_condition_code; |
| 185 | if (cc != Tegra::Shader::ConditionCode::T) { | 181 | if (cc != ConditionCode::T) { |
| 186 | bb.push_back(Conditional(GetConditionCode(cc), {branch})); | 182 | bb.push_back(Conditional(GetConditionCode(cc), {branch})); |
| 187 | } else { | 183 | } else { |
| 188 | bb.push_back(branch); | 184 | bb.push_back(branch); |
| @@ -218,9 +214,8 @@ u32 ShaderIR::DecodeOther(NodeBlock& bb, u32 pc) { | |||
| 218 | break; | 214 | break; |
| 219 | } | 215 | } |
| 220 | case OpCode::Id::SYNC: { | 216 | case OpCode::Id::SYNC: { |
| 221 | const Tegra::Shader::ConditionCode cc = instr.flow_condition_code; | 217 | const ConditionCode cc = instr.flow_condition_code; |
| 222 | UNIMPLEMENTED_IF_MSG(cc != Tegra::Shader::ConditionCode::T, "SYNC condition code used: {}", | 218 | UNIMPLEMENTED_IF_MSG(cc != ConditionCode::T, "SYNC condition code used: {}", cc); |
| 223 | static_cast<u32>(cc)); | ||
| 224 | 219 | ||
| 225 | if (decompiled) { | 220 | if (decompiled) { |
| 226 | break; | 221 | break; |
| @@ -231,9 +226,8 @@ u32 ShaderIR::DecodeOther(NodeBlock& bb, u32 pc) { | |||
| 231 | break; | 226 | break; |
| 232 | } | 227 | } |
| 233 | case OpCode::Id::BRK: { | 228 | case OpCode::Id::BRK: { |
| 234 | const Tegra::Shader::ConditionCode cc = instr.flow_condition_code; | 229 | const ConditionCode cc = instr.flow_condition_code; |
| 235 | UNIMPLEMENTED_IF_MSG(cc != Tegra::Shader::ConditionCode::T, "BRK condition code used: {}", | 230 | UNIMPLEMENTED_IF_MSG(cc != ConditionCode::T, "BRK condition code used: {}", cc); |
| 236 | static_cast<u32>(cc)); | ||
| 237 | if (decompiled) { | 231 | if (decompiled) { |
| 238 | break; | 232 | break; |
| 239 | } | 233 | } |
| @@ -306,7 +300,7 @@ u32 ShaderIR::DecodeOther(NodeBlock& bb, u32 pc) { | |||
| 306 | case Tegra::Shader::MembarType::GL: | 300 | case Tegra::Shader::MembarType::GL: |
| 307 | return OperationCode::MemoryBarrierGlobal; | 301 | return OperationCode::MemoryBarrierGlobal; |
| 308 | default: | 302 | default: |
| 309 | UNIMPLEMENTED_MSG("MEMBAR type={}", static_cast<int>(instr.membar.type.Value())); | 303 | UNIMPLEMENTED_MSG("MEMBAR type={}", instr.membar.type.Value()); |
| 310 | return OperationCode::MemoryBarrierGlobal; | 304 | return OperationCode::MemoryBarrierGlobal; |
| 311 | } | 305 | } |
| 312 | }(); | 306 | }(); |
diff --git a/src/video_core/shader/decode/shift.cpp b/src/video_core/shader/decode/shift.cpp index d4ffa8014..a53819c15 100644 --- a/src/video_core/shader/decode/shift.cpp +++ b/src/video_core/shader/decode/shift.cpp | |||
| @@ -125,7 +125,7 @@ u32 ShaderIR::DecodeShift(NodeBlock& bb, u32 pc) { | |||
| 125 | case OpCode::Id::SHF_LEFT_IMM: { | 125 | case OpCode::Id::SHF_LEFT_IMM: { |
| 126 | UNIMPLEMENTED_IF(instr.generates_cc); | 126 | UNIMPLEMENTED_IF(instr.generates_cc); |
| 127 | UNIMPLEMENTED_IF_MSG(instr.shf.xmode != ShfXmode::None, "xmode={}", | 127 | UNIMPLEMENTED_IF_MSG(instr.shf.xmode != ShfXmode::None, "xmode={}", |
| 128 | static_cast<int>(instr.shf.xmode.Value())); | 128 | instr.shf.xmode.Value()); |
| 129 | 129 | ||
| 130 | if (instr.is_b_imm) { | 130 | if (instr.is_b_imm) { |
| 131 | op_b = Immediate(static_cast<u32>(instr.shf.immediate)); | 131 | op_b = Immediate(static_cast<u32>(instr.shf.immediate)); |
diff --git a/src/video_core/shader/decode/texture.cpp b/src/video_core/shader/decode/texture.cpp index 02fdccd86..fb18f631f 100644 --- a/src/video_core/shader/decode/texture.cpp +++ b/src/video_core/shader/decode/texture.cpp | |||
| @@ -34,7 +34,7 @@ static std::size_t GetCoordCount(TextureType texture_type) { | |||
| 34 | case TextureType::TextureCube: | 34 | case TextureType::TextureCube: |
| 35 | return 3; | 35 | return 3; |
| 36 | default: | 36 | default: |
| 37 | UNIMPLEMENTED_MSG("Unhandled texture type: {}", static_cast<u32>(texture_type)); | 37 | UNIMPLEMENTED_MSG("Unhandled texture type: {}", texture_type); |
| 38 | return 0; | 38 | return 0; |
| 39 | } | 39 | } |
| 40 | } | 40 | } |
| @@ -255,8 +255,7 @@ u32 ShaderIR::DecodeTexture(NodeBlock& bb, u32 pc) { | |||
| 255 | break; | 255 | break; |
| 256 | } | 256 | } |
| 257 | default: | 257 | default: |
| 258 | UNIMPLEMENTED_MSG("Unhandled texture query type: {}", | 258 | UNIMPLEMENTED_MSG("Unhandled texture query type: {}", instr.txq.query_type.Value()); |
| 259 | static_cast<u32>(instr.txq.query_type.Value())); | ||
| 260 | } | 259 | } |
| 261 | break; | 260 | break; |
| 262 | } | 261 | } |
| @@ -302,7 +301,7 @@ u32 ShaderIR::DecodeTexture(NodeBlock& bb, u32 pc) { | |||
| 302 | case TextureType::TextureCube: | 301 | case TextureType::TextureCube: |
| 303 | return 3; | 302 | return 3; |
| 304 | default: | 303 | default: |
| 305 | UNIMPLEMENTED_MSG("Unhandled texture type {}", static_cast<int>(texture_type)); | 304 | UNIMPLEMENTED_MSG("Unhandled texture type {}", texture_type); |
| 306 | return 2; | 305 | return 2; |
| 307 | } | 306 | } |
| 308 | }(); | 307 | }(); |
| @@ -595,7 +594,7 @@ Node4 ShaderIR::GetTextureCode(Instruction instr, TextureType texture_type, | |||
| 595 | lod = GetRegister(instr.gpr20.Value() + bias_offset); | 594 | lod = GetRegister(instr.gpr20.Value() + bias_offset); |
| 596 | break; | 595 | break; |
| 597 | default: | 596 | default: |
| 598 | UNIMPLEMENTED_MSG("Unimplemented process mode={}", static_cast<u32>(process_mode)); | 597 | UNIMPLEMENTED_MSG("Unimplemented process mode={}", process_mode); |
| 599 | break; | 598 | break; |
| 600 | } | 599 | } |
| 601 | 600 | ||
diff --git a/src/video_core/shader/decode/warp.cpp b/src/video_core/shader/decode/warp.cpp index 11b77f795..37433d783 100644 --- a/src/video_core/shader/decode/warp.cpp +++ b/src/video_core/shader/decode/warp.cpp | |||
| @@ -27,7 +27,7 @@ OperationCode GetOperationCode(VoteOperation vote_op) { | |||
| 27 | case VoteOperation::Eq: | 27 | case VoteOperation::Eq: |
| 28 | return OperationCode::VoteEqual; | 28 | return OperationCode::VoteEqual; |
| 29 | default: | 29 | default: |
| 30 | UNREACHABLE_MSG("Invalid vote operation={}", static_cast<u64>(vote_op)); | 30 | UNREACHABLE_MSG("Invalid vote operation={}", vote_op); |
| 31 | return OperationCode::VoteAll; | 31 | return OperationCode::VoteAll; |
| 32 | } | 32 | } |
| 33 | } | 33 | } |
diff --git a/src/video_core/shader/node_helper.cpp b/src/video_core/shader/node_helper.cpp index 7bf4ff387..6a5b6940d 100644 --- a/src/video_core/shader/node_helper.cpp +++ b/src/video_core/shader/node_helper.cpp | |||
| @@ -107,7 +107,7 @@ OperationCode SignedToUnsignedCode(OperationCode operation_code, bool is_signed) | |||
| 107 | UNREACHABLE_MSG("Can't apply absolute to an unsigned integer"); | 107 | UNREACHABLE_MSG("Can't apply absolute to an unsigned integer"); |
| 108 | return {}; | 108 | return {}; |
| 109 | default: | 109 | default: |
| 110 | UNREACHABLE_MSG("Unknown signed operation with code={}", static_cast<u32>(operation_code)); | 110 | UNREACHABLE_MSG("Unknown signed operation with code={}", operation_code); |
| 111 | return {}; | 111 | return {}; |
| 112 | } | 112 | } |
| 113 | } | 113 | } |
diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp index 879088a27..e1ab3e6e0 100644 --- a/src/video_core/shader/shader_ir.cpp +++ b/src/video_core/shader/shader_ir.cpp | |||
| @@ -171,7 +171,7 @@ Node ShaderIR::ConvertIntegerSize(Node value, Register::Size size, bool is_signe | |||
| 171 | // Default - do nothing | 171 | // Default - do nothing |
| 172 | return value; | 172 | return value; |
| 173 | default: | 173 | default: |
| 174 | UNREACHABLE_MSG("Unimplemented conversion size: {}", static_cast<u32>(size)); | 174 | UNREACHABLE_MSG("Unimplemented conversion size: {}", size); |
| 175 | return value; | 175 | return value; |
| 176 | } | 176 | } |
| 177 | } | 177 | } |
| @@ -336,15 +336,15 @@ OperationCode ShaderIR::GetPredicateCombiner(PredOperation operation) { | |||
| 336 | return operation_table[index]; | 336 | return operation_table[index]; |
| 337 | } | 337 | } |
| 338 | 338 | ||
| 339 | Node ShaderIR::GetConditionCode(Tegra::Shader::ConditionCode cc) const { | 339 | Node ShaderIR::GetConditionCode(ConditionCode cc) const { |
| 340 | switch (cc) { | 340 | switch (cc) { |
| 341 | case Tegra::Shader::ConditionCode::NEU: | 341 | case ConditionCode::NEU: |
| 342 | return GetInternalFlag(InternalFlag::Zero, true); | 342 | return GetInternalFlag(InternalFlag::Zero, true); |
| 343 | case Tegra::Shader::ConditionCode::FCSM_TR: | 343 | case ConditionCode::FCSM_TR: |
| 344 | UNIMPLEMENTED_MSG("EXIT.FCSM_TR is not implemented"); | 344 | UNIMPLEMENTED_MSG("EXIT.FCSM_TR is not implemented"); |
| 345 | return MakeNode<PredicateNode>(Pred::NeverExecute, false); | 345 | return MakeNode<PredicateNode>(Pred::NeverExecute, false); |
| 346 | default: | 346 | default: |
| 347 | UNIMPLEMENTED_MSG("Unimplemented condition code: {}", static_cast<u32>(cc)); | 347 | UNIMPLEMENTED_MSG("Unimplemented condition code: {}", cc); |
| 348 | return MakeNode<PredicateNode>(Pred::NeverExecute, false); | 348 | return MakeNode<PredicateNode>(Pred::NeverExecute, false); |
| 349 | } | 349 | } |
| 350 | } | 350 | } |
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp index 1688267bb..937e29d1e 100644 --- a/src/video_core/surface.cpp +++ b/src/video_core/surface.cpp | |||
| @@ -28,7 +28,7 @@ SurfaceTarget SurfaceTargetFromTextureType(Tegra::Texture::TextureType texture_t | |||
| 28 | case Tegra::Texture::TextureType::Texture2DArray: | 28 | case Tegra::Texture::TextureType::Texture2DArray: |
| 29 | return SurfaceTarget::Texture2DArray; | 29 | return SurfaceTarget::Texture2DArray; |
| 30 | default: | 30 | default: |
| 31 | LOG_CRITICAL(HW_GPU, "Unimplemented texture_type={}", static_cast<u32>(texture_type)); | 31 | LOG_CRITICAL(HW_GPU, "Unimplemented texture_type={}", texture_type); |
| 32 | UNREACHABLE(); | 32 | UNREACHABLE(); |
| 33 | return SurfaceTarget::Texture2D; | 33 | return SurfaceTarget::Texture2D; |
| 34 | } | 34 | } |
| @@ -47,7 +47,7 @@ bool SurfaceTargetIsLayered(SurfaceTarget target) { | |||
| 47 | case SurfaceTarget::TextureCubeArray: | 47 | case SurfaceTarget::TextureCubeArray: |
| 48 | return true; | 48 | return true; |
| 49 | default: | 49 | default: |
| 50 | LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", static_cast<u32>(target)); | 50 | LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", target); |
| 51 | UNREACHABLE(); | 51 | UNREACHABLE(); |
| 52 | return false; | 52 | return false; |
| 53 | } | 53 | } |
| @@ -66,7 +66,7 @@ bool SurfaceTargetIsArray(SurfaceTarget target) { | |||
| 66 | case SurfaceTarget::TextureCubeArray: | 66 | case SurfaceTarget::TextureCubeArray: |
| 67 | return true; | 67 | return true; |
| 68 | default: | 68 | default: |
| 69 | LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", static_cast<u32>(target)); | 69 | LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", target); |
| 70 | UNREACHABLE(); | 70 | UNREACHABLE(); |
| 71 | return false; | 71 | return false; |
| 72 | } | 72 | } |
| @@ -85,7 +85,7 @@ PixelFormat PixelFormatFromDepthFormat(Tegra::DepthFormat format) { | |||
| 85 | case Tegra::DepthFormat::D32_FLOAT_S8X24_UINT: | 85 | case Tegra::DepthFormat::D32_FLOAT_S8X24_UINT: |
| 86 | return PixelFormat::D32_FLOAT_S8_UINT; | 86 | return PixelFormat::D32_FLOAT_S8_UINT; |
| 87 | default: | 87 | default: |
| 88 | UNIMPLEMENTED_MSG("Unimplemented format={}", static_cast<u32>(format)); | 88 | UNIMPLEMENTED_MSG("Unimplemented format={}", format); |
| 89 | return PixelFormat::S8_UINT_D24_UNORM; | 89 | return PixelFormat::S8_UINT_D24_UNORM; |
| 90 | } | 90 | } |
| 91 | } | 91 | } |
| @@ -183,7 +183,7 @@ PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) | |||
| 183 | case Tegra::RenderTargetFormat::R8_UINT: | 183 | case Tegra::RenderTargetFormat::R8_UINT: |
| 184 | return PixelFormat::R8_UINT; | 184 | return PixelFormat::R8_UINT; |
| 185 | default: | 185 | default: |
| 186 | UNIMPLEMENTED_MSG("Unimplemented format={}", static_cast<int>(format)); | 186 | UNIMPLEMENTED_MSG("Unimplemented format={}", format); |
| 187 | return PixelFormat::A8B8G8R8_UNORM; | 187 | return PixelFormat::A8B8G8R8_UNORM; |
| 188 | } | 188 | } |
| 189 | } | 189 | } |
| @@ -197,7 +197,7 @@ PixelFormat PixelFormatFromGPUPixelFormat(Tegra::FramebufferConfig::PixelFormat | |||
| 197 | case Tegra::FramebufferConfig::PixelFormat::B8G8R8A8_UNORM: | 197 | case Tegra::FramebufferConfig::PixelFormat::B8G8R8A8_UNORM: |
| 198 | return PixelFormat::B8G8R8A8_UNORM; | 198 | return PixelFormat::B8G8R8A8_UNORM; |
| 199 | default: | 199 | default: |
| 200 | UNIMPLEMENTED_MSG("Unimplemented format={}", static_cast<u32>(format)); | 200 | UNIMPLEMENTED_MSG("Unimplemented format={}", format); |
| 201 | return PixelFormat::A8B8G8R8_UNORM; | 201 | return PixelFormat::A8B8G8R8_UNORM; |
| 202 | } | 202 | } |
| 203 | } | 203 | } |
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp index 305297719..96f93246d 100644 --- a/src/video_core/texture_cache/surface_params.cpp +++ b/src/video_core/texture_cache/surface_params.cpp | |||
| @@ -398,9 +398,9 @@ std::string SurfaceParams::TargetName() const { | |||
| 398 | case SurfaceTarget::TextureCubeArray: | 398 | case SurfaceTarget::TextureCubeArray: |
| 399 | return "CubeArray"; | 399 | return "CubeArray"; |
| 400 | default: | 400 | default: |
| 401 | LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", static_cast<u32>(target)); | 401 | LOG_CRITICAL(HW_GPU, "Unimplemented surface_target={}", target); |
| 402 | UNREACHABLE(); | 402 | UNREACHABLE(); |
| 403 | return fmt::format("TUK({})", static_cast<u32>(target)); | 403 | return fmt::format("TUK({})", target); |
| 404 | } | 404 | } |
| 405 | } | 405 | } |
| 406 | 406 | ||
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index ea835c59f..581d8dd5b 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -1191,9 +1191,8 @@ private: | |||
| 1191 | const SurfaceParams& src_params = src->GetSurfaceParams(); | 1191 | const SurfaceParams& src_params = src->GetSurfaceParams(); |
| 1192 | const SurfaceParams& dst_params = dst->GetSurfaceParams(); | 1192 | const SurfaceParams& dst_params = dst->GetSurfaceParams(); |
| 1193 | if (!format_compatibility.TestCopy(src_params.pixel_format, dst_params.pixel_format)) { | 1193 | if (!format_compatibility.TestCopy(src_params.pixel_format, dst_params.pixel_format)) { |
| 1194 | LOG_ERROR(HW_GPU, "Illegal copy between formats={{{}, {}}}", | 1194 | LOG_ERROR(HW_GPU, "Illegal copy between formats={{{}, {}}}", dst_params.pixel_format, |
| 1195 | static_cast<int>(dst_params.pixel_format), | 1195 | src_params.pixel_format); |
| 1196 | static_cast<int>(src_params.pixel_format)); | ||
| 1197 | return; | 1196 | return; |
| 1198 | } | 1197 | } |
| 1199 | ImageCopy(src, dst, copy); | 1198 | ImageCopy(src, dst, copy); |
diff --git a/src/video_core/textures/convert.cpp b/src/video_core/textures/convert.cpp index 962921483..bd1aebf02 100644 --- a/src/video_core/textures/convert.cpp +++ b/src/video_core/textures/convert.cpp | |||
| @@ -82,7 +82,7 @@ void ConvertFromHostToGuest(u8* data, PixelFormat pixel_format, u32 width, u32 h | |||
| 82 | bool convert_astc, bool convert_s8z24) { | 82 | bool convert_astc, bool convert_s8z24) { |
| 83 | if (convert_astc && IsPixelFormatASTC(pixel_format)) { | 83 | if (convert_astc && IsPixelFormatASTC(pixel_format)) { |
| 84 | LOG_CRITICAL(HW_GPU, "Conversion of format {} after texture flushing is not implemented", | 84 | LOG_CRITICAL(HW_GPU, "Conversion of format {} after texture flushing is not implemented", |
| 85 | static_cast<u32>(pixel_format)); | 85 | pixel_format); |
| 86 | UNREACHABLE(); | 86 | UNREACHABLE(); |
| 87 | 87 | ||
| 88 | } else if (convert_s8z24 && pixel_format == PixelFormat::S8_UINT_D24_UNORM) { | 88 | } else if (convert_s8z24 && pixel_format == PixelFormat::S8_UINT_D24_UNORM) { |