fix: clang format

This commit is contained in:
Exverge 2024-04-06 21:01:21 -04:00
parent c3584e6c39
commit 32c49173ad
No known key found for this signature in database
GPG key ID: 19AAFC0AC6A9B35A
5 changed files with 18 additions and 18 deletions

View file

@ -255,7 +255,7 @@ printf( "string = \"%s\"\n", [string cStringUsingEncoding: NSASCIIStringEncoding
```objc ```objc
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSString* string = [NSString stringWithCString: "Hello World" encoding: NSASCIIStringEncoding]; NSString* string = [NSString stringWithCString: "Hello World" encoding: NSASCIIStringEncoding];
printf( "string = \"%s\"\n", [string cStringUsingEncoding: NSASCIIStringEncoding] ); printf( "string = \"%s\"\n", [string cStringUsingEncoding: NSASCIIStringEncoding] );
[pool release]; [pool release];

View file

@ -292,8 +292,8 @@ struct NullRenderWidget : public RenderWidget {
GRenderWindow::GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_, GRenderWindow::GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_,
std::shared_ptr<InputCommon::InputSubsystem> input_subsystem_, std::shared_ptr<InputCommon::InputSubsystem> input_subsystem_,
Core::System& system_) Core::System& system_)
: QWidget(parent), emu_thread(emu_thread_), input_subsystem{std::move(input_subsystem_)}, : QWidget(parent),
system{system_} { emu_thread(emu_thread_), input_subsystem{std::move(input_subsystem_)}, system{system_} {
setWindowTitle(QStringLiteral("suyu %1 | %2-%3") setWindowTitle(QStringLiteral("suyu %1 | %2-%3")
.arg(QString::fromUtf8(Common::g_build_name), .arg(QString::fromUtf8(Common::g_build_name),
QString::fromUtf8(Common::g_scm_branch), QString::fromUtf8(Common::g_scm_branch),

View file

@ -39,12 +39,12 @@ BufferView::~BufferView() {
} }
Buffer::Buffer(BufferCacheRuntime& runtime, VideoCommon::NullBufferParams null_params) Buffer::Buffer(BufferCacheRuntime& runtime, VideoCommon::NullBufferParams null_params)
: VideoCommon::BufferBase(null_params), buffer{runtime.CreateNullBuffer()}, is_null{true}, : BufferBase(null_params), buffer{runtime.CreateNullBuffer()}, is_null{true},
view(buffer, 0, BufferCacheRuntime::NULL_BUFFER_SIZE) {} view(buffer, 0, BufferCacheRuntime::NULL_BUFFER_SIZE) {}
Buffer::Buffer(BufferCacheRuntime& runtime, DAddr cpu_addr_, u64 size_bytes_) Buffer::Buffer(BufferCacheRuntime& runtime, DAddr cpu_addr_, u64 size_bytes_)
: VideoCommon::BufferBase(cpu_addr_, size_bytes_), : BufferBase(cpu_addr_, size_bytes_), buffer{CreatePrivateBuffer(runtime.device, size_bytes_)},
buffer{CreatePrivateBuffer(runtime.device, size_bytes_)}, view(buffer, 0, size_bytes_) {} view(buffer, 0, size_bytes_) {}
BufferView Buffer::View(u32 offset, u32 size, VideoCore::Surface::PixelFormat format) { BufferView Buffer::View(u32 offset, u32 size, VideoCore::Surface::PixelFormat format) {
return BufferView(buffer, offset, size, format); return BufferView(buffer, offset, size, format);

View file

@ -2,13 +2,13 @@
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#include "common/alignment.h" #include "common/alignment.h"
#include "video_core/control/channel_state.h"
#include "video_core/host1x/host1x.h"
#include "video_core/memory_manager.h"
#include "video_core/buffer_cache/buffer_cache.h" #include "video_core/buffer_cache/buffer_cache.h"
#include "video_core/control/channel_state.h"
#include "video_core/engines/draw_manager.h" #include "video_core/engines/draw_manager.h"
#include "video_core/engines/kepler_compute.h" #include "video_core/engines/kepler_compute.h"
#include "video_core/engines/maxwell_3d.h" #include "video_core/engines/maxwell_3d.h"
#include "video_core/host1x/host1x.h"
#include "video_core/memory_manager.h"
#include "video_core/renderer_metal/mtl_command_recorder.h" #include "video_core/renderer_metal/mtl_command_recorder.h"
#include "video_core/renderer_metal/mtl_device.h" #include "video_core/renderer_metal/mtl_device.h"
#include "video_core/renderer_metal/mtl_rasterizer.h" #include "video_core/renderer_metal/mtl_rasterizer.h"
@ -40,8 +40,8 @@ RasterizerMetal::~RasterizerMetal() = default;
void RasterizerMetal::Draw(bool is_indexed, u32 instance_count) { void RasterizerMetal::Draw(bool is_indexed, u32 instance_count) {
// TODO: uncomment // TODO: uncomment
//command_recorder.CheckIfRenderPassIsActive(); // command_recorder.CheckIfRenderPassIsActive();
//const auto& draw_state = maxwell3d->draw_manager->GetDrawState(); // const auto& draw_state = maxwell3d->draw_manager->GetDrawState();
if (is_indexed) { if (is_indexed) {
LOG_DEBUG(Render_Metal, "indexed"); LOG_DEBUG(Render_Metal, "indexed");
/*[command_buffer drawIndexedPrimitives:MTLPrimitiveTypeTriangle /*[command_buffer drawIndexedPrimitives:MTLPrimitiveTypeTriangle
@ -52,13 +52,13 @@ void RasterizerMetal::Draw(bool is_indexed, u32 instance_count) {
instanceCount:draw_params.num_instances instanceCount:draw_params.num_instances
baseVertex:draw_params.base_vertex baseVertex:draw_params.base_vertex
baseInstance:draw_params.base_instance];*/ baseInstance:draw_params.base_instance];*/
//cmdbuf.DrawIndexed(draw_params.num_vertices, draw_params.num_instances, // cmdbuf.DrawIndexed(draw_params.num_vertices, draw_params.num_instances,
// draw_params.first_index, draw_params.base_vertex, // draw_params.first_index, draw_params.base_vertex,
// draw_params.base_instance); // draw_params.base_instance);
} else { } else {
LOG_DEBUG(Render_Metal, "not indexed"); LOG_DEBUG(Render_Metal, "not indexed");
//cmdbuf.Draw(draw_params.num_vertices, draw_params.num_instances, // cmdbuf.Draw(draw_params.num_vertices, draw_params.num_instances,
// draw_params.base_vertex, draw_params.base_instance); // draw_params.base_vertex, draw_params.base_instance);
} }
} }

View file

@ -12,8 +12,8 @@ namespace Metal {
RendererMetal::RendererMetal(Core::Frontend::EmuWindow& emu_window, RendererMetal::RendererMetal(Core::Frontend::EmuWindow& emu_window,
Tegra::MaxwellDeviceMemoryManager& device_memory_, Tegra::GPU& gpu_, Tegra::MaxwellDeviceMemoryManager& device_memory_, Tegra::GPU& gpu_,
std::unique_ptr<Core::Frontend::GraphicsContext> context_) std::unique_ptr<Core::Frontend::GraphicsContext> context_)
: RendererBase(emu_window, std::move(context_)), device_memory{device_memory_}, gpu{gpu_}, : RendererBase(emu_window, std::move(context_)),
device{}, command_recorder(device), device_memory{device_memory_}, gpu{gpu_}, device{}, command_recorder(device),
swap_chain(device, command_recorder, swap_chain(device, command_recorder,
static_cast<CA::MetalLayer*>(render_window.GetWindowInfo().render_surface)), static_cast<CA::MetalLayer*>(render_window.GetWindowInfo().render_surface)),
rasterizer(gpu_, device_memory, device, command_recorder, swap_chain) {} rasterizer(gpu_, device_memory, device, command_recorder, swap_chain) {}