mirror of
https://github.com/azahar-emu/azahar
synced 2025-11-06 23:19:57 +01:00
Applied clang-format-18 to codebase
This commit is contained in:
parent
3e02c29225
commit
fd55b4fd6c
@ -42,7 +42,9 @@ struct CaptureSession final {
|
||||
|
||||
#define MEMBER(type, name, func) \
|
||||
struct type##Deleter { \
|
||||
void operator()(type* ptr) { type##_##func(ptr); } \
|
||||
void operator()(type* ptr) { \
|
||||
type##_##func(ptr); \
|
||||
} \
|
||||
}; \
|
||||
std::unique_ptr<type, type##Deleter> name
|
||||
|
||||
|
||||
@ -40,8 +40,8 @@ class SharedContext_Android : public Frontend::GraphicsContext {
|
||||
public:
|
||||
SharedContext_Android(EGLDisplay egl_display, EGLConfig egl_config,
|
||||
EGLContext egl_share_context)
|
||||
: egl_display{egl_display}, egl_surface{eglCreatePbufferSurface(egl_display, egl_config,
|
||||
egl_empty_attribs.data())},
|
||||
: egl_display{egl_display},
|
||||
egl_surface{eglCreatePbufferSurface(egl_display, egl_config, egl_empty_attribs.data())},
|
||||
egl_context{eglCreateContext(egl_display, egl_config, egl_share_context,
|
||||
egl_context_attribs.data())} {
|
||||
ASSERT_MSG(egl_surface, "eglCreatePbufferSurface() failed!");
|
||||
|
||||
@ -215,8 +215,8 @@ Joystick::~Joystick() {
|
||||
}
|
||||
|
||||
ButtonFactory::ButtonFactory()
|
||||
: button_list{std::make_shared<ButtonList>()}, analog_button_list{
|
||||
std::make_shared<AnalogButtonList>()} {}
|
||||
: button_list{std::make_shared<ButtonList>()},
|
||||
analog_button_list{std::make_shared<AnalogButtonList>()} {}
|
||||
|
||||
std::unique_ptr<Input::ButtonDevice> ButtonFactory::Create(const Common::ParamPackage& params) {
|
||||
if (params.Has("axis")) {
|
||||
|
||||
@ -342,8 +342,7 @@ void JNICALL Java_org_citra_citra_1emu_NativeLibrary_initializeGpuDriver(
|
||||
GetJString(env, custom_driver_name), GetJString(env, file_redirect_dir));
|
||||
}
|
||||
|
||||
void JNICALL Java_org_citra_citra_1emu_NativeLibrary_enableAdrenoTurboMode(JNIEnv* env,
|
||||
jobject obj,
|
||||
void JNICALL Java_org_citra_citra_1emu_NativeLibrary_enableAdrenoTurboMode(JNIEnv* env, jobject obj,
|
||||
jboolean enable) {
|
||||
EnableAdrenoTurboMode(enable);
|
||||
}
|
||||
|
||||
@ -41,6 +41,7 @@
|
||||
#include "citra_qt/bootmanager.h"
|
||||
#include "citra_qt/camera/qt_multimedia_camera.h"
|
||||
#include "citra_qt/camera/still_image_camera.h"
|
||||
#include "citra_qt/citra_qt.h"
|
||||
#include "citra_qt/compatibility_list.h"
|
||||
#include "citra_qt/configuration/config.h"
|
||||
#include "citra_qt/configuration/configure_dialog.h"
|
||||
@ -62,7 +63,6 @@
|
||||
#include "citra_qt/game_list.h"
|
||||
#include "citra_qt/hotkeys.h"
|
||||
#include "citra_qt/loading_screen.h"
|
||||
#include "citra_qt/citra_qt.h"
|
||||
#include "citra_qt/movie/movie_play_dialog.h"
|
||||
#include "citra_qt/movie/movie_record_dialog.h"
|
||||
#include "citra_qt/multiplayer/state.h"
|
||||
@ -766,7 +766,8 @@ void GMainWindow::InitializeHotkeys() {
|
||||
// QShortcut Hotkeys
|
||||
const auto connect_shortcut = [&](const QString& action_name, const auto& function) {
|
||||
const auto* hotkey = hotkey_registry.GetHotkey(main_window, action_name, this);
|
||||
const auto* secondary_hotkey = hotkey_registry.GetHotkey(main_window, action_name, secondary_window);
|
||||
const auto* secondary_hotkey =
|
||||
hotkey_registry.GetHotkey(main_window, action_name, secondary_window);
|
||||
connect(hotkey, &QShortcut::activated, this, function);
|
||||
connect(secondary_hotkey, &QShortcut::activated, this, function);
|
||||
};
|
||||
|
||||
@ -13,9 +13,8 @@
|
||||
#include "ui_configure_cheats.h"
|
||||
|
||||
ConfigureCheats::ConfigureCheats(Cheats::CheatEngine& cheat_engine_, u64 title_id_, QWidget* parent)
|
||||
: QWidget(parent),
|
||||
ui(std::make_unique<Ui::ConfigureCheats>()), cheat_engine{cheat_engine_}, title_id{
|
||||
title_id_} {
|
||||
: QWidget(parent), ui(std::make_unique<Ui::ConfigureCheats>()), cheat_engine{cheat_engine_},
|
||||
title_id{title_id_} {
|
||||
// Setup gui control settings
|
||||
ui->setupUi(this);
|
||||
ui->tableCheats->setColumnWidth(0, 30);
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <QColorDialog>
|
||||
#include "common/settings.h"
|
||||
#include "citra_qt/configuration/configuration_shared.h"
|
||||
#include "citra_qt/configuration/configure_layout.h"
|
||||
#include "common/settings.h"
|
||||
#include "ui_configure_layout.h"
|
||||
#ifdef ENABLE_OPENGL
|
||||
#include "video_core/renderer_opengl/post_processing_opengl.h"
|
||||
|
||||
@ -141,8 +141,8 @@ QString BreakPointModel::DebugContextEventToString(Pica::DebugContext::Event eve
|
||||
|
||||
GraphicsBreakPointsWidget::GraphicsBreakPointsWidget(
|
||||
std::shared_ptr<Pica::DebugContext> debug_context, QWidget* parent)
|
||||
: QDockWidget(tr("Pica Breakpoints"), parent), Pica::DebugContext::BreakPointObserver(
|
||||
debug_context) {
|
||||
: QDockWidget(tr("Pica Breakpoints"), parent),
|
||||
Pica::DebugContext::BreakPointObserver(debug_context) {
|
||||
setObjectName(QStringLiteral("PicaBreakPointsWidget"));
|
||||
|
||||
status_text = new QLabel(tr("Emulation running"));
|
||||
|
||||
@ -25,11 +25,11 @@
|
||||
#include <QToolButton>
|
||||
#include <QTreeView>
|
||||
#include <fmt/format.h>
|
||||
#include "citra_qt/citra_qt.h"
|
||||
#include "citra_qt/compatibility_list.h"
|
||||
#include "citra_qt/game_list.h"
|
||||
#include "citra_qt/game_list_p.h"
|
||||
#include "citra_qt/game_list_worker.h"
|
||||
#include "citra_qt/citra_qt.h"
|
||||
#include "citra_qt/uisettings.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/settings.h"
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
#include "ui_movie_play_dialog.h"
|
||||
|
||||
MoviePlayDialog::MoviePlayDialog(QWidget* parent, GameList* game_list_, const Core::System& system_)
|
||||
: QDialog(parent),
|
||||
ui(std::make_unique<Ui::MoviePlayDialog>()), game_list{game_list_}, system{system_} {
|
||||
: QDialog(parent), ui(std::make_unique<Ui::MoviePlayDialog>()), game_list{game_list_},
|
||||
system{system_} {
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
#include <QInputDialog>
|
||||
#include <QList>
|
||||
#include <QtConcurrent/QtConcurrentRun>
|
||||
#include "citra_qt/game_list_p.h"
|
||||
#include "citra_qt/citra_qt.h"
|
||||
#include "citra_qt/game_list_p.h"
|
||||
#include "citra_qt/multiplayer/lobby.h"
|
||||
#include "citra_qt/multiplayer/lobby_p.h"
|
||||
#include "citra_qt/multiplayer/message.h"
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
#include "citra_sdl/emu_window/emu_window_sdl2_vk.h"
|
||||
#endif
|
||||
#include "SDL_messagebox.h"
|
||||
#include "citra_meta/common_strings.h"
|
||||
#include "common/common_paths.h"
|
||||
#include "common/detached_tasks.h"
|
||||
#include "common/file_util.h"
|
||||
@ -41,7 +42,6 @@
|
||||
#include "core/hle/service/cfg/cfg.h"
|
||||
#include "core/movie.h"
|
||||
#include "input_common/main.h"
|
||||
#include "citra_meta/common_strings.h"
|
||||
#include "network/network.h"
|
||||
#include "video_core/gpu.h"
|
||||
#include "video_core/renderer_base.h"
|
||||
@ -391,8 +391,8 @@ void LaunchSdlFrontend(int argc, char** argv) {
|
||||
|
||||
const auto scope = emu_window->Acquire();
|
||||
|
||||
LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname,
|
||||
Common::g_scm_branch, Common::g_scm_desc);
|
||||
LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname, Common::g_scm_branch,
|
||||
Common::g_scm_desc);
|
||||
Settings::LogSettings();
|
||||
|
||||
const Core::System::ResultStatus load_result{
|
||||
|
||||
@ -599,14 +599,14 @@ public:
|
||||
template <typename G = E, std::enable_if_t<std::is_constructible_v<E, G&&>>* = nullptr,
|
||||
std::enable_if_t<!std::is_convertible_v<G&&, E>>* = nullptr>
|
||||
constexpr explicit Expected(Unexpected<G>&& e) noexcept(std::is_nothrow_constructible_v<E, G&&>)
|
||||
: impl_base{unexpect_t{}, std::move(e.value())}, ctor_base{
|
||||
detail::default_constructor_tag{}} {}
|
||||
: impl_base{unexpect_t{}, std::move(e.value())},
|
||||
ctor_base{detail::default_constructor_tag{}} {}
|
||||
|
||||
template <typename G = E, std::enable_if_t<std::is_constructible_v<E, G&&>>* = nullptr,
|
||||
std::enable_if_t<std::is_convertible_v<G&&, E>>* = nullptr>
|
||||
constexpr Expected(Unexpected<G>&& e) noexcept(std::is_nothrow_constructible_v<E, G&&>)
|
||||
: impl_base{unexpect_t{}, std::move(e.value())}, ctor_base{
|
||||
detail::default_constructor_tag{}} {}
|
||||
: impl_base{unexpect_t{}, std::move(e.value())},
|
||||
ctor_base{detail::default_constructor_tag{}} {}
|
||||
|
||||
template <typename... Args, std::enable_if_t<std::is_constructible_v<E, Args&&...>>* = nullptr>
|
||||
constexpr explicit Expected(unexpect_t, Args&&... args)
|
||||
|
||||
@ -221,8 +221,8 @@ public:
|
||||
explicit Setting(const Type& default_val, const Type& min_val, const Type& max_val,
|
||||
const std::string& name)
|
||||
requires(ranged)
|
||||
: value{default_val},
|
||||
default_value{default_val}, maximum{max_val}, minimum{min_val}, label{name} {}
|
||||
: value{default_val}, default_value{default_val}, maximum{max_val}, minimum{min_val},
|
||||
label{name} {}
|
||||
|
||||
/**
|
||||
* Returns a reference to the setting's value.
|
||||
@ -479,8 +479,7 @@ struct Values {
|
||||
// TODO: Add a null renderer backend for this, perhaps.
|
||||
#error "At least one renderer must be enabled."
|
||||
#endif
|
||||
GraphicsAPI::Software, GraphicsAPI::Vulkan, "graphics_api"
|
||||
};
|
||||
GraphicsAPI::Software, GraphicsAPI::Vulkan, "graphics_api"};
|
||||
SwitchableSetting<u32> physical_device{0, "physical_device"};
|
||||
Setting<bool> use_gles{false, "use_gles"};
|
||||
Setting<bool> renderer_debug{false, "renderer_debug"};
|
||||
|
||||
@ -396,7 +396,9 @@ public:
|
||||
// _DEFINE_SWIZZLER2 defines a single such function, DEFINE_SWIZZLER2 defines all of them for all
|
||||
// component names (x<->r) and permutations (xy<->yx)
|
||||
#define _DEFINE_SWIZZLER2(a, b, name) \
|
||||
[[nodiscard]] constexpr Vec2<T> name() const { return Vec2<T>(a, b); }
|
||||
[[nodiscard]] constexpr Vec2<T> name() const { \
|
||||
return Vec2<T>(a, b); \
|
||||
}
|
||||
#define DEFINE_SWIZZLER2(a, b, a2, b2, a3, b3, a4, b4) \
|
||||
_DEFINE_SWIZZLER2(a, b, a##b); \
|
||||
_DEFINE_SWIZZLER2(a, b, a2##b2); \
|
||||
@ -596,7 +598,9 @@ public:
|
||||
// DEFINE_SWIZZLER2_COMP2 defines two component functions for all component names (x<->r) and
|
||||
// permutations (xy<->yx)
|
||||
#define _DEFINE_SWIZZLER2(a, b, name) \
|
||||
[[nodiscard]] constexpr Vec2<T> name() const { return Vec2<T>(a, b); }
|
||||
[[nodiscard]] constexpr Vec2<T> name() const { \
|
||||
return Vec2<T>(a, b); \
|
||||
}
|
||||
#define DEFINE_SWIZZLER2_COMP1(a, a2) \
|
||||
_DEFINE_SWIZZLER2(a, a, a##a); \
|
||||
_DEFINE_SWIZZLER2(a, a, a2##a2)
|
||||
@ -621,7 +625,9 @@ public:
|
||||
#undef _DEFINE_SWIZZLER2
|
||||
|
||||
#define _DEFINE_SWIZZLER3(a, b, c, name) \
|
||||
[[nodiscard]] constexpr Vec3<T> name() const { return Vec3<T>(a, b, c); }
|
||||
[[nodiscard]] constexpr Vec3<T> name() const { \
|
||||
return Vec3<T>(a, b, c); \
|
||||
}
|
||||
#define DEFINE_SWIZZLER3_COMP1(a, a2) \
|
||||
_DEFINE_SWIZZLER3(a, a, a, a##a##a); \
|
||||
_DEFINE_SWIZZLER3(a, a, a, a2##a2##a2)
|
||||
|
||||
@ -43,8 +43,8 @@ struct GPU::Impl {
|
||||
: timing{system.CoreTiming()}, system{system}, memory{system.Memory()},
|
||||
debug_context{Pica::g_debug_context}, pica{memory, debug_context},
|
||||
renderer{VideoCore::CreateRenderer(emu_window, secondary_window, pica, system)},
|
||||
rasterizer{renderer->Rasterizer()}, sw_blitter{std::make_unique<SwRenderer::SwBlitter>(
|
||||
memory, rasterizer)} {}
|
||||
rasterizer{renderer->Rasterizer()},
|
||||
sw_blitter{std::make_unique<SwRenderer::SwBlitter>(memory, rasterizer)} {}
|
||||
~Impl() = default;
|
||||
};
|
||||
|
||||
|
||||
@ -31,9 +31,8 @@ union CommandHeader {
|
||||
static_assert(sizeof(CommandHeader) == sizeof(u32), "CommandHeader has incorrect size!");
|
||||
|
||||
PicaCore::PicaCore(Memory::MemorySystem& memory_, std::shared_ptr<DebugContext> debug_context_)
|
||||
: memory{memory_}, debug_context{std::move(debug_context_)}, geometry_pipeline{regs.internal,
|
||||
gs_unit,
|
||||
gs_setup},
|
||||
: memory{memory_}, debug_context{std::move(debug_context_)},
|
||||
geometry_pipeline{regs.internal, gs_unit, gs_setup},
|
||||
shader_engine{CreateEngine(Settings::values.use_shader_jit.GetValue())} {
|
||||
InitializeRegs();
|
||||
|
||||
|
||||
@ -55,12 +55,12 @@ OGLProgram CreateProgram(std::string_view frag) {
|
||||
|
||||
BlitHelper::BlitHelper(const Driver& driver_)
|
||||
: driver{driver_}, linear_sampler{CreateSampler(GL_LINEAR)},
|
||||
nearest_sampler{CreateSampler(GL_NEAREST)}, bicubic_program{CreateProgram(
|
||||
HostShaders::BICUBIC_FRAG)},
|
||||
nearest_sampler{CreateSampler(GL_NEAREST)},
|
||||
bicubic_program{CreateProgram(HostShaders::BICUBIC_FRAG)},
|
||||
scale_force_program{CreateProgram(HostShaders::SCALE_FORCE_FRAG)},
|
||||
xbrz_program{CreateProgram(HostShaders::XBRZ_FREESCALE_FRAG)},
|
||||
mmpx_program{CreateProgram(HostShaders::MMPX_FRAG)}, gradient_x_program{CreateProgram(
|
||||
HostShaders::X_GRADIENT_FRAG)},
|
||||
mmpx_program{CreateProgram(HostShaders::MMPX_FRAG)},
|
||||
gradient_x_program{CreateProgram(HostShaders::X_GRADIENT_FRAG)},
|
||||
gradient_y_program{CreateProgram(HostShaders::Y_GRADIENT_FRAG)},
|
||||
refine_program{CreateProgram(HostShaders::REFINE_FRAG)},
|
||||
d24s8_to_rgba8{CreateProgram(HostShaders::D24S8_TO_RGBA8_FRAG)},
|
||||
|
||||
@ -970,10 +970,9 @@ void RasterizerOpenGL::SyncAndUploadLUTsLF() {
|
||||
if (fs_uniform_block_data.fog_lut_dirty || invalidate) {
|
||||
std::array<Common::Vec2f, 128> new_data;
|
||||
|
||||
std::transform(pica.fog.lut.begin(), pica.fog.lut.end(), new_data.begin(),
|
||||
[](const auto& entry) {
|
||||
return Common::Vec2f{entry.ToFloat(), entry.DiffToFloat()};
|
||||
});
|
||||
std::transform(
|
||||
pica.fog.lut.begin(), pica.fog.lut.end(), new_data.begin(),
|
||||
[](const auto& entry) { return Common::Vec2f{entry.ToFloat(), entry.DiffToFloat()}; });
|
||||
|
||||
if (new_data != fog_lut_data || invalidate) {
|
||||
fog_lut_data = new_data;
|
||||
|
||||
@ -331,8 +331,8 @@ public:
|
||||
ShaderProgramManager::ShaderProgramManager(Frontend::EmuWindow& emu_window_, const Driver& driver_,
|
||||
bool separable)
|
||||
: emu_window{emu_window_}, driver{driver_},
|
||||
strict_context_required{emu_window.StrictContextRequired()}, impl{std::make_unique<Impl>(
|
||||
driver_, separable)} {}
|
||||
strict_context_required{emu_window.StrictContextRequired()},
|
||||
impl{std::make_unique<Impl>(driver_, separable)} {}
|
||||
|
||||
ShaderProgramManager::~ShaderProgramManager() = default;
|
||||
|
||||
|
||||
@ -602,8 +602,8 @@ void Surface::BlitScale(const VideoCore::TextureBlit& blit, bool up_scale) {
|
||||
|
||||
Framebuffer::Framebuffer(TextureRuntime& runtime, const VideoCore::FramebufferParams& params,
|
||||
const Surface* color, const Surface* depth)
|
||||
: VideoCore::FramebufferParams{params}, res_scale{color ? color->res_scale
|
||||
: (depth ? depth->res_scale : 1u)} {
|
||||
: VideoCore::FramebufferParams{params},
|
||||
res_scale{color ? color->res_scale : (depth ? depth->res_scale : 1u)} {
|
||||
|
||||
if (shadow_rendering && !color) {
|
||||
return;
|
||||
|
||||
@ -75,9 +75,8 @@ static std::array<GLfloat, 3 * 2> MakeOrthographicMatrix(const float width, cons
|
||||
RendererOpenGL::RendererOpenGL(Core::System& system, Pica::PicaCore& pica_,
|
||||
Frontend::EmuWindow& window, Frontend::EmuWindow* secondary_window)
|
||||
: VideoCore::RendererBase{system, window, secondary_window}, pica{pica_},
|
||||
rasterizer{system.Memory(), pica, system.CustomTexManager(), *this, driver}, frame_dumper{
|
||||
system,
|
||||
window} {
|
||||
rasterizer{system.Memory(), pica, system.CustomTexManager(), *this, driver},
|
||||
frame_dumper{system, window} {
|
||||
const bool has_debug_tool = driver.HasDebugTool();
|
||||
window.mailbox = std::make_unique<OGLTextureMailbox>(has_debug_tool);
|
||||
if (secondary_window) {
|
||||
|
||||
@ -132,14 +132,14 @@ std::string GetReadableVersion(u32 version) {
|
||||
} // Anonymous namespace
|
||||
|
||||
Instance::Instance(bool enable_validation, bool dump_command_buffers)
|
||||
: library{OpenLibrary()}, instance{CreateInstance(*library,
|
||||
Frontend::WindowSystemType::Headless,
|
||||
enable_validation, dump_command_buffers)},
|
||||
: library{OpenLibrary()},
|
||||
instance{CreateInstance(*library, Frontend::WindowSystemType::Headless, enable_validation,
|
||||
dump_command_buffers)},
|
||||
physical_devices{instance->enumeratePhysicalDevices()} {}
|
||||
|
||||
Instance::Instance(Frontend::EmuWindow& window, u32 physical_device_index)
|
||||
: library{OpenLibrary(&window)}, instance{CreateInstance(
|
||||
*library, window.GetWindowInfo().type,
|
||||
: library{OpenLibrary(&window)},
|
||||
instance{CreateInstance(*library, window.GetWindowInfo().type,
|
||||
Settings::values.renderer_debug.GetValue(),
|
||||
Settings::values.dump_command_buffers.GetValue())},
|
||||
debug_callback{CreateDebugCallback(*instance, debug_utils_supported)},
|
||||
|
||||
@ -100,8 +100,8 @@ bool CanBlitToSwapchain(const vk::PhysicalDevice& physical_device, vk::Format fo
|
||||
PresentWindow::PresentWindow(Frontend::EmuWindow& emu_window_, const Instance& instance_,
|
||||
Scheduler& scheduler_)
|
||||
: emu_window{emu_window_}, instance{instance_}, scheduler{scheduler_},
|
||||
surface{CreateSurface(instance.GetInstance(), emu_window)},
|
||||
next_surface{surface}, swapchain{instance, emu_window.GetFramebufferLayout().width,
|
||||
surface{CreateSurface(instance.GetInstance(), emu_window)}, next_surface{surface},
|
||||
swapchain{instance, emu_window.GetFramebufferLayout().width,
|
||||
emu_window.GetFramebufferLayout().height, surface},
|
||||
graphics_queue{instance.GetGraphicsQueue()}, present_renderpass{CreateRenderpass()},
|
||||
vsync_enabled{Settings::values.use_vsync_new.GetValue()},
|
||||
|
||||
@ -62,11 +62,8 @@ RasterizerVulkan::RasterizerVulkan(Memory::MemorySystem& memory, Pica::PicaCore&
|
||||
DescriptorUpdateQueue& update_queue_, u32 image_count)
|
||||
: RasterizerAccelerated{memory, pica}, instance{instance}, scheduler{scheduler},
|
||||
renderpass_cache{renderpass_cache}, update_queue{update_queue_},
|
||||
pipeline_cache{instance, scheduler, renderpass_cache, update_queue}, runtime{instance,
|
||||
scheduler,
|
||||
renderpass_cache,
|
||||
update_queue,
|
||||
image_count},
|
||||
pipeline_cache{instance, scheduler, renderpass_cache, update_queue},
|
||||
runtime{instance, scheduler, renderpass_cache, update_queue, image_count},
|
||||
res_cache{memory, custom_tex_manager, runtime, regs, renderer},
|
||||
stream_buffer{instance, scheduler, BUFFER_USAGE, STREAM_BUFFER_SIZE},
|
||||
uniform_buffer{instance, scheduler, vk::BufferUsageFlagBits::eUniformBuffer,
|
||||
@ -966,10 +963,9 @@ void RasterizerVulkan::SyncAndUploadLUTsLF() {
|
||||
if (fs_uniform_block_data.fog_lut_dirty || invalidate) {
|
||||
std::array<Common::Vec2f, 128> new_data;
|
||||
|
||||
std::transform(pica.fog.lut.begin(), pica.fog.lut.end(), new_data.begin(),
|
||||
[](const auto& entry) {
|
||||
return Common::Vec2f{entry.ToFloat(), entry.DiffToFloat()};
|
||||
});
|
||||
std::transform(
|
||||
pica.fog.lut.begin(), pica.fog.lut.end(), new_data.begin(),
|
||||
[](const auto& entry) { return Common::Vec2f{entry.ToFloat(), entry.DiffToFloat()}; });
|
||||
|
||||
if (new_data != fog_lut_data || invalidate) {
|
||||
fog_lut_data = new_data;
|
||||
|
||||
@ -1450,8 +1450,8 @@ void Surface::BlitScale(const VideoCore::TextureBlit& blit, bool up_scale) {
|
||||
|
||||
Framebuffer::Framebuffer(TextureRuntime& runtime, const VideoCore::FramebufferParams& params,
|
||||
Surface* color, Surface* depth)
|
||||
: VideoCore::FramebufferParams{params}, res_scale{color ? color->res_scale
|
||||
: (depth ? depth->res_scale : 1u)} {
|
||||
: VideoCore::FramebufferParams{params},
|
||||
res_scale{color ? color->res_scale : (depth ? depth->res_scale : 1u)} {
|
||||
auto& renderpass_cache = runtime.GetRenderpassCache();
|
||||
if (shadow_rendering && !color) {
|
||||
return;
|
||||
@ -1544,8 +1544,8 @@ Sampler::Sampler(TextureRuntime& runtime, const VideoCore::SamplerParams& params
|
||||
Sampler::~Sampler() = default;
|
||||
|
||||
DebugScope::DebugScope(TextureRuntime& runtime, Common::Vec4f color, std::string_view label)
|
||||
: scheduler{runtime.GetScheduler()}, has_debug_tool{
|
||||
runtime.GetInstance().HasDebuggingToolAttached()} {
|
||||
: scheduler{runtime.GetScheduler()},
|
||||
has_debug_tool{runtime.GetInstance().HasDebuggingToolAttached()} {
|
||||
if (!has_debug_tool) {
|
||||
return;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user