mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
make clang-format happy
This commit is contained in:
parent
3e694d6bab
commit
7419457efd
|
|
@ -214,8 +214,8 @@ public:
|
||||||
bool isDevKit = false;
|
bool isDevKit = false;
|
||||||
|
|
||||||
Ref<Budget> createProcessTypeBudget(Budget::ProcessType processType,
|
Ref<Budget> createProcessTypeBudget(Budget::ProcessType processType,
|
||||||
std::string_view name,
|
std::string_view name,
|
||||||
std::span<const BudgetInfo> items) {
|
std::span<const BudgetInfo> items) {
|
||||||
auto budget = orbis::knew<orbis::Budget>(name, processType, items);
|
auto budget = orbis::knew<orbis::Budget>(name, processType, items);
|
||||||
processTypeBudgets[static_cast<int>(processType)] =
|
processTypeBudgets[static_cast<int>(processType)] =
|
||||||
orbis::knew<orbis::Budget>(name, processType, items);
|
orbis::knew<orbis::Budget>(name, processType, items);
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#include "KernelContext.hpp"
|
#include "KernelContext.hpp"
|
||||||
#include "sys/sysproto.hpp"
|
#include "sys/sysproto.hpp"
|
||||||
#include "thread/Process.hpp"
|
#include "thread/Process.hpp"
|
||||||
#include "thread/Thread.hpp"
|
|
||||||
#include "thread/ProcessOps.hpp"
|
#include "thread/ProcessOps.hpp"
|
||||||
|
#include "thread/Thread.hpp"
|
||||||
#include "ucontext.hpp"
|
#include "ucontext.hpp"
|
||||||
#include "utils/Logs.hpp"
|
#include "utils/Logs.hpp"
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
|
|
|
||||||
|
|
@ -489,7 +489,8 @@ void _orbis_log_print(LogLevel lvl, std::string_view msg,
|
||||||
for (std::size_t i = 0; i < args_count; i++) {
|
for (std::size_t i = 0; i < args_count; i++) {
|
||||||
if (i)
|
if (i)
|
||||||
text += ", ";
|
text += ", ";
|
||||||
names.remove_prefix(std::min(names.find_first_not_of(" \t\n\r"), names.length()));
|
names.remove_prefix(
|
||||||
|
std::min(names.find_first_not_of(" \t\n\r"), names.length()));
|
||||||
std::string_view name = names.substr(0, names.find_first_of(','));
|
std::string_view name = names.substr(0, names.find_first_of(','));
|
||||||
names.remove_prefix(std::min(name.size() + 1, names.size()));
|
names.remove_prefix(std::min(name.size() + 1, names.size()));
|
||||||
text += name;
|
text += name;
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ void cell_audio_config::reset(bool backend_changed)
|
||||||
|
|
||||||
desired_full_buffers = buffering_enabled ? static_cast<u32>(desired_buffer_duration / audio_block_period) + 3 : 2;
|
desired_full_buffers = buffering_enabled ? static_cast<u32>(desired_buffer_duration / audio_block_period) + 3 : 2;
|
||||||
|
|
||||||
if (desired_full_buffers > MAX_AUDIO_BUFFERS + EXTRA_AUDIO_BUFFERS)
|
if (desired_full_buffers > MAX_AUDIO_BUFFERS + EXTRA_AUDIO_BUFFERS)
|
||||||
{
|
{
|
||||||
cellAudio.error("%s: desired_full_buffers truncation: value = %d, frame size = %f, output channel count = %d, input channel count = %d, desired buffer duration = %d",
|
cellAudio.error("%s: desired_full_buffers truncation: value = %d, frame size = %f, output channel count = %d, input channel count = %d, desired buffer duration = %d",
|
||||||
backend->GetName(), desired_full_buffers, cb_frame_len, ch_cnt, audio_channels, desired_buffer_duration);
|
backend->GetName(), desired_full_buffers, cb_frame_len, ch_cnt, audio_channels, desired_buffer_duration);
|
||||||
|
|
|
||||||
|
|
@ -70,8 +70,7 @@ struct Context : spv::Context {
|
||||||
|
|
||||||
std::pair<ir::Value, bool> getOrCreateLabel(ir::Location loc, ir::Region body,
|
std::pair<ir::Value, bool> getOrCreateLabel(ir::Location loc, ir::Region body,
|
||||||
std::uint64_t address);
|
std::uint64_t address);
|
||||||
Builder createBuilder(ir::Region bodyRegion,
|
Builder createBuilder(ir::Region bodyRegion, std::uint64_t address);
|
||||||
std::uint64_t address);
|
|
||||||
|
|
||||||
ir::Value createCast(ir::Location loc, Builder &builder, ir::Value targetType,
|
ir::Value createCast(ir::Location loc, Builder &builder, ir::Value targetType,
|
||||||
ir::Value value);
|
ir::Value value);
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ public:
|
||||||
void setInsertionPoint(Instruction inst) { mInsertionPoint = inst; }
|
void setInsertionPoint(Instruction inst) { mInsertionPoint = inst; }
|
||||||
|
|
||||||
InsertionPoint saveInsertionPoint() {
|
InsertionPoint saveInsertionPoint() {
|
||||||
return { mInsertionStorage, mInsertionPoint };
|
return {mInsertionStorage, mInsertionPoint};
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, typename... ArgsT>
|
template <typename T, typename... ArgsT>
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ inline void RegionLikeImpl::addChild(Instruction node) {
|
||||||
assert(node != thisInst);
|
assert(node != thisInst);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
node.get()->parent = this;
|
node.get()->parent = this;
|
||||||
if (first == nullptr) {
|
if (first == nullptr) {
|
||||||
first = node;
|
first = node;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "PrintOptions.hpp"
|
|
||||||
#include "Location.hpp"
|
#include "Location.hpp"
|
||||||
#include "Node.hpp"
|
#include "Node.hpp"
|
||||||
#include "Operand.hpp"
|
#include "Operand.hpp"
|
||||||
|
#include "PrintOptions.hpp"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
|
@ -60,7 +60,8 @@ struct NodeImpl {
|
||||||
void setLocation(Location newLocation) { location = newLocation; }
|
void setLocation(Location newLocation) { location = newLocation; }
|
||||||
Location getLocation() const { return location; }
|
Location getLocation() const { return location; }
|
||||||
|
|
||||||
virtual void print(std::ostream &os, NameStorage &ns, const PrintOptions &opts) const = 0;
|
virtual void print(std::ostream &os, NameStorage &ns,
|
||||||
|
const PrintOptions &opts) const = 0;
|
||||||
virtual Node clone(Context &context, CloneMap &map) const = 0;
|
virtual Node clone(Context &context, CloneMap &map) const = 0;
|
||||||
};
|
};
|
||||||
} // namespace shader::ir
|
} // namespace shader::ir
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,8 @@ template <typename T> struct PrintableWrapper : PointerWrapper<T> {
|
||||||
using PointerWrapper<T>::PointerWrapper;
|
using PointerWrapper<T>::PointerWrapper;
|
||||||
using PointerWrapper<T>::operator=;
|
using PointerWrapper<T>::operator=;
|
||||||
|
|
||||||
void print(std::ostream &os, NameStorage &ns, const PrintOptions &opts = {}) const {
|
void print(std::ostream &os, NameStorage &ns,
|
||||||
|
const PrintOptions &opts = {}) const {
|
||||||
if constexpr (requires { this->impl->print(os, ns, opts); }) {
|
if constexpr (requires { this->impl->print(os, ns, opts); }) {
|
||||||
this->impl->print(os, ns, opts);
|
this->impl->print(os, ns, opts);
|
||||||
} else if constexpr (requires { this->impl->print(os, ns); }) {
|
} else if constexpr (requires { this->impl->print(os, ns); }) {
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,7 @@ struct RegionLikeWrapper : BaseWrapper<ImplT> {
|
||||||
this->impl->printRegion(os, ns, opts);
|
this->impl->printRegion(os, ns, opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto getParent() const {
|
auto getParent() const { return this->impl->getParent(); }
|
||||||
return this->impl->getParent();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RegionLikeImpl;
|
struct RegionLikeImpl;
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,11 @@ struct ValueImpl : InstructionImpl {
|
||||||
using InstructionImpl::InstructionImpl;
|
using InstructionImpl::InstructionImpl;
|
||||||
|
|
||||||
void addUse(Instruction user, int operandIndex) {
|
void addUse(Instruction user, int operandIndex) {
|
||||||
uses.insert({.user=user, .node=this, .operandIndex=operandIndex});
|
uses.insert({.user = user, .node = this, .operandIndex = operandIndex});
|
||||||
}
|
}
|
||||||
|
|
||||||
void removeUse(Instruction user, int operandIndex) {
|
void removeUse(Instruction user, int operandIndex) {
|
||||||
uses.erase({.user=user, .node=this, .operandIndex=operandIndex});
|
uses.erase({.user = user, .node = this, .operandIndex = operandIndex});
|
||||||
}
|
}
|
||||||
|
|
||||||
std::set<Instruction> getUserList() const {
|
std::set<Instruction> getUserList() const {
|
||||||
|
|
|
||||||
|
|
@ -374,7 +374,8 @@ struct ResourcesBuilder {
|
||||||
} else if (auto value = inst.cast<ir::Value>()) {
|
} else if (auto value = inst.cast<ir::Value>()) {
|
||||||
resourcePhi.addOperand(value);
|
resourcePhi.addOperand(value);
|
||||||
} else {
|
} else {
|
||||||
auto block = resources.context.create<ir::Block>(inst.getLocation(), ir::Kind::Builtin, ir::builtin::BLOCK);
|
auto block = resources.context.create<ir::Block>(
|
||||||
|
inst.getLocation(), ir::Kind::Builtin, ir::builtin::BLOCK);
|
||||||
inst.erase();
|
inst.erase();
|
||||||
block.addChild(inst);
|
block.addChild(inst);
|
||||||
resourcePhi.addOperand(block);
|
resourcePhi.addOperand(block);
|
||||||
|
|
@ -1112,7 +1113,7 @@ static void expToSpv(GcnConverter &converter, gcn::Stage stage,
|
||||||
};
|
};
|
||||||
|
|
||||||
rx::println(stderr, "exp target {}.{}", targetToString(target),
|
rx::println(stderr, "exp target {}.{}", targetToString(target),
|
||||||
swizzleToString(swizzle));
|
swizzleToString(swizzle));
|
||||||
std::abort();
|
std::abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -406,7 +406,7 @@ static orbis::ErrorCode gc_ioctl(orbis::File *file, std::uint64_t request,
|
||||||
case 0x802450c9: {
|
case 0x802450c9: {
|
||||||
// used during Net initialization
|
// used during Net initialization
|
||||||
rx::println(stderr, "***WARNING*** Unknown gc ioctl_{:x}(0x{:x})", request,
|
rx::println(stderr, "***WARNING*** Unknown gc ioctl_{:x}(0x{:x})", request,
|
||||||
(unsigned long)*(std::uint32_t *)argp);
|
(unsigned long)*(std::uint32_t *)argp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -653,7 +653,7 @@ SysResult thr_wake(orbis::Thread *thread, orbis::slong id) {
|
||||||
SysResult sigreturn(orbis::Thread *thread,
|
SysResult sigreturn(orbis::Thread *thread,
|
||||||
orbis::ptr<orbis::UContext> context) {
|
orbis::ptr<orbis::UContext> context) {
|
||||||
rx::thread::setContext(thread, *context);
|
rx::thread::setContext(thread, *context);
|
||||||
return{};
|
return {};
|
||||||
}
|
}
|
||||||
SysResult thr_set_name(orbis::Thread *thread, orbis::slong id,
|
SysResult thr_set_name(orbis::Thread *thread, orbis::slong id,
|
||||||
orbis::ptr<const char> name) {
|
orbis::ptr<const char> name) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@ template <typename RT, typename... ArgsT> class FunctionRef<RT(ArgsT...)> {
|
||||||
public:
|
public:
|
||||||
constexpr FunctionRef() = default;
|
constexpr FunctionRef() = default;
|
||||||
|
|
||||||
template <typename T> requires (!std::is_same_v<std::remove_cvref_t<T>, FunctionRef>)
|
template <typename T>
|
||||||
|
requires(!std::is_same_v<std::remove_cvref_t<T>, FunctionRef>)
|
||||||
constexpr FunctionRef(T &&object)
|
constexpr FunctionRef(T &&object)
|
||||||
requires requires(ArgsT... args) { RT(object(args...)); }
|
requires requires(ArgsT... args) { RT(object(args...)); }
|
||||||
: context(
|
: context(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue