Browse Source
[icc] fix intel c++ compiler errors (#146)
[icc] fix intel c++ compiler errors (#146)
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/146 Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>pull/167/head
committed by
crueter
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
9 changed files with 119 additions and 108 deletions
-
31docs/build/Linux.md
-
134src/CMakeLists.txt
-
4src/audio_core/sink/sink_stream.cpp
-
4src/hid_core/resources/npad/npad_vibration.cpp
-
14src/input_common/drivers/sdl_driver.cpp
-
4src/input_common/input_engine.cpp
-
6src/shader_recompiler/backend/spirv/emit_spirv_floating_point.cpp
-
10src/shader_recompiler/frontend/maxwell/decode.cpp
-
20src/shader_recompiler/frontend/maxwell/opcodes.cpp
@ -1,25 +1,25 @@ |
|||||
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
|
||||
#include <array>
|
#include <array>
|
||||
|
#include <string_view>
|
||||
|
|
||||
#include "shader_recompiler/exception.h"
|
#include "shader_recompiler/exception.h"
|
||||
#include "shader_recompiler/frontend/maxwell/opcodes.h"
|
#include "shader_recompiler/frontend/maxwell/opcodes.h"
|
||||
|
|
||||
namespace Shader::Maxwell { |
namespace Shader::Maxwell { |
||||
namespace { |
|
||||
constexpr std::array NAME_TABLE{ |
|
||||
|
|
||||
|
const char* NameOf(Opcode opcode) { |
||||
|
constexpr const char* NAME_TABLE[] = { |
||||
#define INST(name, cute, encode) cute,
|
#define INST(name, cute, encode) cute,
|
||||
#include "maxwell.inc"
|
#include "maxwell.inc"
|
||||
#undef INST
|
#undef INST
|
||||
}; |
|
||||
} // Anonymous namespace
|
|
||||
|
|
||||
const char* NameOf(Opcode opcode) { |
|
||||
if (static_cast<size_t>(opcode) >= NAME_TABLE.size()) { |
|
||||
throw InvalidArgument("Invalid opcode with raw value {}", static_cast<int>(opcode)); |
|
||||
} |
|
||||
return NAME_TABLE[static_cast<size_t>(opcode)]; |
|
||||
|
}; |
||||
|
if (size_t(opcode) >= sizeof(NAME_TABLE) / sizeof(NAME_TABLE[0])) |
||||
|
throw InvalidArgument("Invalid opcode with raw value {}", int(opcode)); |
||||
|
return NAME_TABLE[size_t(opcode)]; |
||||
} |
} |
||||
|
|
||||
} // namespace Shader::Maxwell
|
} // namespace Shader::Maxwell
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue