mirror of
https://git.suyu.dev/suyu/suyu
synced 2025-09-19 20:48:00 -05:00
Revert "Quality-of-Life Improvements"
This commit is contained in:
@@ -18,8 +18,8 @@ namespace Tegra {
|
||||
|
||||
CDmaPusher::CDmaPusher(Host1x::Host1x& host1x_, s32 id)
|
||||
: host1x{host1x_}, memory_manager{host1x.GMMU()},
|
||||
host_processor{std::make_unique<Host1x::Control>(host1x_)},
|
||||
current_class{static_cast<ChClassId>(id)} {
|
||||
host_processor{std::make_unique<Host1x::Control>(host1x_)}, current_class{
|
||||
static_cast<ChClassId>(id)} {
|
||||
thread = std::jthread([this](std::stop_token stop_token) { ProcessEntries(stop_token); });
|
||||
}
|
||||
|
||||
|
@@ -18,8 +18,8 @@ constexpr u32 ComputeInline = 0x6D;
|
||||
|
||||
DmaPusher::DmaPusher(Core::System& system_, GPU& gpu_, MemoryManager& memory_manager_,
|
||||
Control::ChannelState& channel_state_)
|
||||
: gpu{gpu_}, system{system_}, memory_manager{memory_manager_},
|
||||
puller{gpu_, memory_manager_, *this, channel_state_} {}
|
||||
: gpu{gpu_}, system{system_}, memory_manager{memory_manager_}, puller{gpu_, memory_manager_,
|
||||
*this, channel_state_} {}
|
||||
|
||||
DmaPusher::~DmaPusher() = default;
|
||||
|
||||
|
@@ -24,8 +24,9 @@ constexpr u32 MacroRegistersStart = 0xE00;
|
||||
|
||||
Maxwell3D::Maxwell3D(Core::System& system_, MemoryManager& memory_manager_)
|
||||
: draw_manager{std::make_unique<DrawManager>(this)}, system{system_},
|
||||
memory_manager{memory_manager_}, macro_engine{GetMacroEngine(*this)},
|
||||
upload_state{memory_manager, regs.upload} {
|
||||
memory_manager{memory_manager_}, macro_engine{GetMacroEngine(*this)}, upload_state{
|
||||
memory_manager,
|
||||
regs.upload} {
|
||||
dirty.flags.flip();
|
||||
InitializeRegisterDefaults();
|
||||
execution_mask.reset();
|
||||
|
@@ -21,8 +21,8 @@ namespace Tegra::Engines {
|
||||
|
||||
Puller::Puller(GPU& gpu_, MemoryManager& memory_manager_, DmaPusher& dma_pusher_,
|
||||
Control::ChannelState& channel_state_)
|
||||
: gpu{gpu_}, memory_manager{memory_manager_}, dma_pusher{dma_pusher_},
|
||||
channel_state{channel_state_} {}
|
||||
: gpu{gpu_}, memory_manager{memory_manager_}, dma_pusher{dma_pusher_}, channel_state{
|
||||
channel_state_} {}
|
||||
|
||||
Puller::~Puller() = default;
|
||||
|
||||
|
@@ -11,8 +11,8 @@ namespace Tegra {
|
||||
|
||||
Decoder::Decoder(Host1x::Host1x& host1x_, s32 id_, const Host1x::NvdecCommon::NvdecRegisters& regs_,
|
||||
Host1x::FrameQueue& frame_queue_)
|
||||
: host1x(host1x_), memory_manager{host1x.GMMU()}, regs{regs_}, id{id_},
|
||||
frame_queue{frame_queue_} {}
|
||||
: host1x(host1x_), memory_manager{host1x.GMMU()}, regs{regs_}, id{id_}, frame_queue{
|
||||
frame_queue_} {}
|
||||
|
||||
Decoder::~Decoder() = default;
|
||||
|
||||
|
@@ -9,8 +9,8 @@
|
||||
namespace Tegra::Host1x {
|
||||
|
||||
Host1x::Host1x(Core::System& system_)
|
||||
: system{system_}, syncpoint_manager{}, memory_manager(system.DeviceMemory()),
|
||||
gmmu_manager{system, memory_manager, 32, 0, 12},
|
||||
: system{system_}, syncpoint_manager{},
|
||||
memory_manager(system.DeviceMemory()), gmmu_manager{system, memory_manager, 32, 0, 12},
|
||||
allocator{std::make_unique<Common::FlatAllocator<u32, 0, 32>>(1 << 12)} {}
|
||||
|
||||
Host1x::~Host1x() = default;
|
||||
|
@@ -94,8 +94,8 @@ void SwizzleSurface(std::span<u8> output, u32 out_stride, std::span<const u8> in
|
||||
} // namespace
|
||||
|
||||
Vic::Vic(Host1x& host1x_, s32 id_, u32 syncpt, FrameQueue& frame_queue_)
|
||||
: CDmaPusher{host1x_, id_}, id{id_}, syncpoint{syncpt}, frame_queue{frame_queue_},
|
||||
has_sse41{HasSSE41()} {
|
||||
: CDmaPusher{host1x_, id_}, id{id_}, syncpoint{syncpt},
|
||||
frame_queue{frame_queue_}, has_sse41{HasSSE41()} {
|
||||
LOG_INFO(HW_GPU, "Created vic {}", id);
|
||||
}
|
||||
|
||||
|
@@ -28,8 +28,8 @@ MemoryManager::MemoryManager(Core::System& system_, MaxwellDeviceMemoryManager&
|
||||
split_address{split_address_}, page_bits{page_bits_}, big_page_bits{big_page_bits_},
|
||||
entries{}, big_entries{}, page_table{address_space_bits, address_space_bits + page_bits - 38,
|
||||
page_bits != big_page_bits ? page_bits : 0},
|
||||
kind_map{PTEKind::INVALID},
|
||||
unique_identifier{unique_identifier_generator.fetch_add(1, std::memory_order_acq_rel)},
|
||||
kind_map{PTEKind::INVALID}, unique_identifier{unique_identifier_generator.fetch_add(
|
||||
1, std::memory_order_acq_rel)},
|
||||
accumulator{std::make_unique<VideoCommon::InvalidationAccumulator>()} {
|
||||
address_space_size = 1ULL << address_space_bits;
|
||||
page_size = 1ULL << page_bits;
|
||||
|
@@ -115,8 +115,8 @@ struct QueryCacheBase<Traits>::QueryCacheBaseImpl {
|
||||
QueryCacheBaseImpl(QueryCacheBase<Traits>* owner_, VideoCore::RasterizerInterface& rasterizer_,
|
||||
Tegra::MaxwellDeviceMemoryManager& device_memory_, RuntimeType& runtime_,
|
||||
Tegra::GPU& gpu_)
|
||||
: owner{owner_}, rasterizer{rasterizer_}, device_memory{device_memory_}, runtime{runtime_},
|
||||
gpu{gpu_} {
|
||||
: owner{owner_}, rasterizer{rasterizer_},
|
||||
device_memory{device_memory_}, runtime{runtime_}, gpu{gpu_} {
|
||||
streamer_mask = 0;
|
||||
for (size_t i = 0; i < static_cast<size_t>(QueryType::MaxQueryTypes); i++) {
|
||||
streamers[i] = runtime.GetStreamerInterface(static_cast<QueryType>(i));
|
||||
|
@@ -31,8 +31,8 @@ ComputePipeline::ComputePipeline(const Device& device, TextureCache& texture_cac
|
||||
BufferCache& buffer_cache_, ProgramManager& program_manager_,
|
||||
const Shader::Info& info_, std::string code,
|
||||
std::vector<u32> code_v, bool force_context_flush)
|
||||
: texture_cache{texture_cache_}, buffer_cache{buffer_cache_}, program_manager{program_manager_},
|
||||
info{info_} {
|
||||
: texture_cache{texture_cache_}, buffer_cache{buffer_cache_},
|
||||
program_manager{program_manager_}, info{info_} {
|
||||
switch (device.GetShaderBackend()) {
|
||||
case Settings::ShaderBackend::Glsl:
|
||||
source_program = CreateProgram(code, GL_COMPUTE_SHADER);
|
||||
|
@@ -66,8 +66,9 @@ bool QueryCache::AnyCommandQueued() const noexcept {
|
||||
|
||||
HostCounter::HostCounter(QueryCache& cache_, std::shared_ptr<HostCounter> dependency_,
|
||||
VideoCore::QueryType type_)
|
||||
: HostCounterBase{std::move(dependency_)}, cache{cache_}, type{type_},
|
||||
query{cache.AllocateQuery(type)} {
|
||||
: HostCounterBase{std::move(dependency_)}, cache{cache_}, type{type_}, query{
|
||||
cache.AllocateQuery(
|
||||
type)} {
|
||||
glBeginQuery(GetTarget(type), query.handle);
|
||||
}
|
||||
|
||||
|
@@ -1,19 +1,27 @@
|
||||
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <memory>
|
||||
|
||||
#include <glad/glad.h>
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "common/microprofile.h"
|
||||
#include "common/settings.h"
|
||||
#include "common/telemetry.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/frontend/emu_window.h"
|
||||
#include "core/telemetry_session.h"
|
||||
#include "video_core/capture.h"
|
||||
#include "video_core/present.h"
|
||||
#include "video_core/renderer_opengl/gl_blit_screen.h"
|
||||
#include "video_core/renderer_opengl/gl_rasterizer.h"
|
||||
#include "video_core/renderer_opengl/gl_shader_manager.h"
|
||||
#include "video_core/renderer_opengl/gl_shader_util.h"
|
||||
#include "video_core/renderer_opengl/renderer_opengl.h"
|
||||
#include "video_core/textures/decoders.h"
|
||||
|
||||
@@ -82,18 +90,20 @@ void APIENTRY DebugHandler(GLenum source, GLenum type, GLuint id, GLenum severit
|
||||
}
|
||||
} // Anonymous namespace
|
||||
|
||||
RendererOpenGL::RendererOpenGL(Core::Frontend::EmuWindow& emu_window_,
|
||||
RendererOpenGL::RendererOpenGL(Core::TelemetrySession& telemetry_session_,
|
||||
Core::Frontend::EmuWindow& emu_window_,
|
||||
Tegra::MaxwellDeviceMemoryManager& device_memory_, Tegra::GPU& gpu_,
|
||||
std::unique_ptr<Core::Frontend::GraphicsContext> context_)
|
||||
: RendererBase{emu_window_, std::move(context_)}, emu_window{emu_window_},
|
||||
device_memory{device_memory_}, gpu{gpu_}, device{emu_window_}, state_tracker{},
|
||||
program_manager{device},
|
||||
: RendererBase{emu_window_, std::move(context_)}, telemetry_session{telemetry_session_},
|
||||
emu_window{emu_window_}, device_memory{device_memory_}, gpu{gpu_}, device{emu_window_},
|
||||
state_tracker{}, program_manager{device},
|
||||
rasterizer(emu_window, gpu, device_memory, device, program_manager, state_tracker) {
|
||||
if (Settings::values.renderer_debug && GLAD_GL_KHR_debug) {
|
||||
glEnable(GL_DEBUG_OUTPUT);
|
||||
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
|
||||
glDebugMessageCallback(DebugHandler, nullptr);
|
||||
}
|
||||
AddTelemetryFields();
|
||||
|
||||
// Initialize default attributes to match hardware's disabled attributes
|
||||
GLint max_attribs{};
|
||||
@@ -145,6 +155,21 @@ void RendererOpenGL::Composite(std::span<const Tegra::FramebufferConfig> framebu
|
||||
render_window.OnFrameDisplayed();
|
||||
}
|
||||
|
||||
void RendererOpenGL::AddTelemetryFields() {
|
||||
const char* const gl_version{reinterpret_cast<char const*>(glGetString(GL_VERSION))};
|
||||
const char* const gpu_vendor{reinterpret_cast<char const*>(glGetString(GL_VENDOR))};
|
||||
const char* const gpu_model{reinterpret_cast<char const*>(glGetString(GL_RENDERER))};
|
||||
|
||||
LOG_INFO(Render_OpenGL, "GL_VERSION: {}", gl_version);
|
||||
LOG_INFO(Render_OpenGL, "GL_VENDOR: {}", gpu_vendor);
|
||||
LOG_INFO(Render_OpenGL, "GL_RENDERER: {}", gpu_model);
|
||||
|
||||
constexpr auto user_system = Common::Telemetry::FieldType::UserSystem;
|
||||
telemetry_session.AddField(user_system, "GPU_Vendor", std::string(gpu_vendor));
|
||||
telemetry_session.AddField(user_system, "GPU_Model", std::string(gpu_model));
|
||||
telemetry_session.AddField(user_system, "GPU_OpenGL_Version", std::string(gl_version));
|
||||
}
|
||||
|
||||
void RendererOpenGL::RenderToBuffer(std::span<const Tegra::FramebufferConfig> framebuffers,
|
||||
const Layout::FramebufferLayout& layout, void* dst) {
|
||||
GLint old_read_fb;
|
||||
|
@@ -34,7 +34,8 @@ class BlitScreen;
|
||||
|
||||
class RendererOpenGL final : public VideoCore::RendererBase {
|
||||
public:
|
||||
explicit RendererOpenGL(Core::Frontend::EmuWindow& emu_window_,
|
||||
explicit RendererOpenGL(Core::TelemetrySession& telemetry_session_,
|
||||
Core::Frontend::EmuWindow& emu_window_,
|
||||
Tegra::MaxwellDeviceMemoryManager& device_memory_, Tegra::GPU& gpu_,
|
||||
std::unique_ptr<Core::Frontend::GraphicsContext> context_);
|
||||
~RendererOpenGL() override;
|
||||
@@ -52,11 +53,14 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void AddTelemetryFields();
|
||||
|
||||
void RenderToBuffer(std::span<const Tegra::FramebufferConfig> framebuffers,
|
||||
const Layout::FramebufferLayout& layout, void* dst);
|
||||
void RenderScreenshot(std::span<const Tegra::FramebufferConfig> framebuffers);
|
||||
void RenderAppletCaptureLayer(std::span<const Tegra::FramebufferConfig> framebuffers);
|
||||
|
||||
Core::TelemetrySession& telemetry_session;
|
||||
Core::Frontend::EmuWindow& emu_window;
|
||||
Tegra::MaxwellDeviceMemoryManager& device_memory;
|
||||
Tegra::GPU& gpu;
|
||||
|
@@ -24,8 +24,8 @@ using PushConstants = std::array<u32, 4 * 4>;
|
||||
|
||||
FSR::FSR(const Device& device, MemoryAllocator& memory_allocator, size_t image_count,
|
||||
VkExtent2D extent)
|
||||
: m_device{device}, m_memory_allocator{memory_allocator}, m_image_count{image_count},
|
||||
m_extent{extent} {
|
||||
: m_device{device}, m_memory_allocator{memory_allocator},
|
||||
m_image_count{image_count}, m_extent{extent} {
|
||||
|
||||
CreateImages();
|
||||
CreateRenderPasses();
|
||||
|
@@ -1,17 +1,24 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "common/polyfill_ranges.h"
|
||||
#include "common/scope_exit.h"
|
||||
#include "common/settings.h"
|
||||
#include "common/telemetry.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/frontend/graphics_context.h"
|
||||
#include "core/telemetry_session.h"
|
||||
#include "video_core/capture.h"
|
||||
#include "video_core/gpu.h"
|
||||
#include "video_core/present.h"
|
||||
@@ -46,6 +53,37 @@ constexpr VkExtent3D CaptureImageExtent{
|
||||
};
|
||||
|
||||
constexpr VkFormat CaptureFormat = VK_FORMAT_A8B8G8R8_UNORM_PACK32;
|
||||
|
||||
std::string GetReadableVersion(u32 version) {
|
||||
return fmt::format("{}.{}.{}", VK_VERSION_MAJOR(version), VK_VERSION_MINOR(version),
|
||||
VK_VERSION_PATCH(version));
|
||||
}
|
||||
|
||||
std::string GetDriverVersion(const Device& device) {
|
||||
// Extracted from
|
||||
// https://github.com/SaschaWillems/vulkan.gpuinfo.org/blob/5dddea46ea1120b0df14eef8f15ff8e318e35462/functions.php#L308-L314
|
||||
const u32 version = device.GetDriverVersion();
|
||||
|
||||
if (device.GetDriverID() == VK_DRIVER_ID_NVIDIA_PROPRIETARY) {
|
||||
const u32 major = (version >> 22) & 0x3ff;
|
||||
const u32 minor = (version >> 14) & 0x0ff;
|
||||
const u32 secondary = (version >> 6) & 0x0ff;
|
||||
const u32 tertiary = version & 0x003f;
|
||||
return fmt::format("{}.{}.{}.{}", major, minor, secondary, tertiary);
|
||||
}
|
||||
if (device.GetDriverID() == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) {
|
||||
const u32 major = version >> 14;
|
||||
const u32 minor = version & 0x3fff;
|
||||
return fmt::format("{}.{}", major, minor);
|
||||
}
|
||||
return GetReadableVersion(version);
|
||||
}
|
||||
|
||||
std::string BuildCommaSeparatedExtensions(
|
||||
const std::set<std::string, std::less<>>& available_extensions) {
|
||||
return fmt::format("{}", fmt::join(available_extensions, ","));
|
||||
}
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
Device CreateDevice(const vk::Instance& instance, const vk::InstanceDispatch& dld,
|
||||
@@ -60,11 +98,12 @@ Device CreateDevice(const vk::Instance& instance, const vk::InstanceDispatch& dl
|
||||
return Device(*instance, physical_device, surface, dld);
|
||||
}
|
||||
|
||||
RendererVulkan::RendererVulkan(Core::Frontend::EmuWindow& emu_window,
|
||||
RendererVulkan::RendererVulkan(Core::TelemetrySession& telemetry_session_,
|
||||
Core::Frontend::EmuWindow& emu_window,
|
||||
Tegra::MaxwellDeviceMemoryManager& device_memory_, Tegra::GPU& gpu_,
|
||||
std::unique_ptr<Core::Frontend::GraphicsContext> context_) try
|
||||
: RendererBase(emu_window, std::move(context_)), device_memory(device_memory_), gpu(gpu_),
|
||||
library(OpenLibrary(context.get())),
|
||||
: RendererBase(emu_window, std::move(context_)), telemetry_session(telemetry_session_),
|
||||
device_memory(device_memory_), gpu(gpu_), library(OpenLibrary(context.get())),
|
||||
instance(CreateInstance(*library, dld, VK_API_VERSION_1_1, render_window.GetWindowInfo().type,
|
||||
Settings::values.renderer_debug.GetValue())),
|
||||
debug_messenger(Settings::values.renderer_debug ? CreateDebugUtilsCallback(instance)
|
||||
@@ -89,6 +128,7 @@ RendererVulkan::RendererVulkan(Core::Frontend::EmuWindow& emu_window,
|
||||
turbo_mode.emplace(instance, dld);
|
||||
scheduler.RegisterOnSubmit([this] { turbo_mode->QueueSubmitted(); });
|
||||
}
|
||||
Report();
|
||||
} catch (const vk::Exception& exception) {
|
||||
LOG_ERROR(Render_Vulkan, "Vulkan initialization failed with error: {}", exception.what());
|
||||
throw std::runtime_error{fmt::format("Vulkan initialization error {}", exception.what())};
|
||||
@@ -126,6 +166,32 @@ void RendererVulkan::Composite(std::span<const Tegra::FramebufferConfig> framebu
|
||||
rasterizer.TickFrame();
|
||||
}
|
||||
|
||||
void RendererVulkan::Report() const {
|
||||
using namespace Common::Literals;
|
||||
const std::string vendor_name{device.GetVendorName()};
|
||||
const std::string model_name{device.GetModelName()};
|
||||
const std::string driver_version = GetDriverVersion(device);
|
||||
const std::string driver_name = fmt::format("{} {}", vendor_name, driver_version);
|
||||
|
||||
const std::string api_version = GetReadableVersion(device.ApiVersion());
|
||||
|
||||
const std::string extensions = BuildCommaSeparatedExtensions(device.GetAvailableExtensions());
|
||||
|
||||
const auto available_vram = static_cast<f64>(device.GetDeviceLocalMemory()) / f64{1_GiB};
|
||||
|
||||
LOG_INFO(Render_Vulkan, "Driver: {}", driver_name);
|
||||
LOG_INFO(Render_Vulkan, "Device: {}", model_name);
|
||||
LOG_INFO(Render_Vulkan, "Vulkan: {}", api_version);
|
||||
LOG_INFO(Render_Vulkan, "Available VRAM: {:.2f} GiB", available_vram);
|
||||
|
||||
static constexpr auto field = Common::Telemetry::FieldType::UserSystem;
|
||||
telemetry_session.AddField(field, "GPU_Vendor", vendor_name);
|
||||
telemetry_session.AddField(field, "GPU_Model", model_name);
|
||||
telemetry_session.AddField(field, "GPU_Vulkan_Driver", driver_name);
|
||||
telemetry_session.AddField(field, "GPU_Vulkan_Version", api_version);
|
||||
telemetry_session.AddField(field, "GPU_Vulkan_Extensions", extensions);
|
||||
}
|
||||
|
||||
vk::Buffer RendererVulkan::RenderToBuffer(std::span<const Tegra::FramebufferConfig> framebuffers,
|
||||
const Layout::FramebufferLayout& layout, VkFormat format,
|
||||
VkDeviceSize buffer_size) {
|
||||
|
@@ -40,7 +40,8 @@ Device CreateDevice(const vk::Instance& instance, const vk::InstanceDispatch& dl
|
||||
|
||||
class RendererVulkan final : public VideoCore::RendererBase {
|
||||
public:
|
||||
explicit RendererVulkan(Core::Frontend::EmuWindow& emu_window,
|
||||
explicit RendererVulkan(Core::TelemetrySession& telemtry_session,
|
||||
Core::Frontend::EmuWindow& emu_window,
|
||||
Tegra::MaxwellDeviceMemoryManager& device_memory_, Tegra::GPU& gpu_,
|
||||
std::unique_ptr<Core::Frontend::GraphicsContext> context_);
|
||||
~RendererVulkan() override;
|
||||
@@ -58,12 +59,15 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void Report() const;
|
||||
|
||||
vk::Buffer RenderToBuffer(std::span<const Tegra::FramebufferConfig> framebuffers,
|
||||
const Layout::FramebufferLayout& layout, VkFormat format,
|
||||
VkDeviceSize buffer_size);
|
||||
void RenderScreenshot(std::span<const Tegra::FramebufferConfig> framebuffers);
|
||||
void RenderAppletCaptureLayer(std::span<const Tegra::FramebufferConfig> framebuffers);
|
||||
|
||||
Core::TelemetrySession& telemetry_session;
|
||||
Tegra::MaxwellDeviceMemoryManager& device_memory;
|
||||
Tegra::GPU& gpu;
|
||||
|
||||
|
@@ -531,8 +531,8 @@ ASTCDecoderPass::ASTCDecoderPass(const Device& device_, Scheduler& scheduler_,
|
||||
ASTC_PASS_DESCRIPTOR_UPDATE_TEMPLATE_ENTRY, ASTC_BANK_INFO,
|
||||
COMPUTE_PUSH_CONSTANT_RANGE<sizeof(AstcPushConstants)>, ASTC_DECODER_COMP_SPV),
|
||||
scheduler{scheduler_}, staging_buffer_pool{staging_buffer_pool_},
|
||||
compute_pass_descriptor_queue{compute_pass_descriptor_queue_},
|
||||
memory_allocator{memory_allocator_} {}
|
||||
compute_pass_descriptor_queue{compute_pass_descriptor_queue_}, memory_allocator{
|
||||
memory_allocator_} {}
|
||||
|
||||
ASTCDecoderPass::~ASTCDecoderPass() = default;
|
||||
|
||||
|
@@ -31,8 +31,8 @@ ComputePipeline::ComputePipeline(const Device& device_, vk::PipelineCache& pipel
|
||||
PipelineStatistics* pipeline_statistics,
|
||||
VideoCore::ShaderNotify* shader_notify, const Shader::Info& info_,
|
||||
vk::ShaderModule spv_module_)
|
||||
: device{device_}, pipeline_cache(pipeline_cache_),
|
||||
guest_descriptor_queue{guest_descriptor_queue_}, info{info_},
|
||||
: device{device_},
|
||||
pipeline_cache(pipeline_cache_), guest_descriptor_queue{guest_descriptor_queue_}, info{info_},
|
||||
spv_module(std::move(spv_module_)) {
|
||||
if (shader_notify) {
|
||||
shader_notify->MarkShaderBuilding();
|
||||
|
@@ -100,8 +100,8 @@ PresentManager::PresentManager(const vk::Instance& instance_,
|
||||
Swapchain& swapchain_, vk::SurfaceKHR& surface_)
|
||||
: instance{instance_}, render_window{render_window_}, device{device_},
|
||||
memory_allocator{memory_allocator_}, scheduler{scheduler_}, swapchain{swapchain_},
|
||||
surface{surface_},
|
||||
blit_supported{CanBlitToSwapchain(device.GetPhysical(), swapchain.GetImageViewFormat())},
|
||||
surface{surface_}, blit_supported{CanBlitToSwapchain(device.GetPhysical(),
|
||||
swapchain.GetImageViewFormat())},
|
||||
use_present_thread{Settings::values.async_presentation.GetValue()} {
|
||||
SetImageCount();
|
||||
|
||||
|
@@ -1161,9 +1161,10 @@ struct QueryCacheRuntimeImpl {
|
||||
StagingBufferPool& staging_pool_,
|
||||
ComputePassDescriptorQueue& compute_pass_descriptor_queue,
|
||||
DescriptorPool& descriptor_pool)
|
||||
: rasterizer{rasterizer_}, device_memory{device_memory_}, buffer_cache{buffer_cache_},
|
||||
device{device_}, memory_allocator{memory_allocator_}, scheduler{scheduler_},
|
||||
staging_pool{staging_pool_}, guest_streamer(0, runtime),
|
||||
: rasterizer{rasterizer_}, device_memory{device_memory_},
|
||||
buffer_cache{buffer_cache_}, device{device_},
|
||||
memory_allocator{memory_allocator_}, scheduler{scheduler_}, staging_pool{staging_pool_},
|
||||
guest_streamer(0, runtime),
|
||||
sample_streamer(static_cast<size_t>(QueryType::ZPassPixelCount64), runtime, rasterizer,
|
||||
device, scheduler, memory_allocator, compute_pass_descriptor_queue,
|
||||
descriptor_pool),
|
||||
|
@@ -49,8 +49,8 @@ size_t GetStreamBufferSize(const Device& device) {
|
||||
StagingBufferPool::StagingBufferPool(const Device& device_, MemoryAllocator& memory_allocator_,
|
||||
Scheduler& scheduler_)
|
||||
: device{device_}, memory_allocator{memory_allocator_}, scheduler{scheduler_},
|
||||
stream_buffer_size{GetStreamBufferSize(device)},
|
||||
region_size{stream_buffer_size / StagingBufferPool::NUM_SYNCS} {
|
||||
stream_buffer_size{GetStreamBufferSize(device)}, region_size{stream_buffer_size /
|
||||
StagingBufferPool::NUM_SYNCS} {
|
||||
VkBufferCreateInfo stream_ci = {
|
||||
.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
|
||||
.pNext = nullptr,
|
||||
|
@@ -398,8 +398,8 @@ u32 GraphicsEnvironment::ReadViewportTransformState() {
|
||||
ComputeEnvironment::ComputeEnvironment(Tegra::Engines::KeplerCompute& kepler_compute_,
|
||||
Tegra::MemoryManager& gpu_memory_, GPUVAddr program_base_,
|
||||
u32 start_address_)
|
||||
: GenericEnvironment{gpu_memory_, program_base_, start_address_},
|
||||
kepler_compute{&kepler_compute_} {
|
||||
: GenericEnvironment{gpu_memory_, program_base_, start_address_}, kepler_compute{
|
||||
&kepler_compute_} {
|
||||
const auto& qmd{kepler_compute->launch_description};
|
||||
stage = Shader::Stage::Compute;
|
||||
local_memory_size = qmd.local_pos_alloc + qmd.local_crs_alloc;
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#include "common/logging/log.h"
|
||||
#include "common/settings.h"
|
||||
#include "core/core.h"
|
||||
#include "video_core/host1x/gpu_device_memory_manager.h"
|
||||
#include "video_core/host1x/host1x.h"
|
||||
#include "video_core/renderer_base.h"
|
||||
#include "video_core/renderer_null/renderer_null.h"
|
||||
@@ -18,15 +19,16 @@ namespace {
|
||||
std::unique_ptr<VideoCore::RendererBase> CreateRenderer(
|
||||
Core::System& system, Core::Frontend::EmuWindow& emu_window, Tegra::GPU& gpu,
|
||||
std::unique_ptr<Core::Frontend::GraphicsContext> context) {
|
||||
auto& telemetry_session = system.TelemetrySession();
|
||||
auto& device_memory = system.Host1x().MemoryManager();
|
||||
|
||||
switch (Settings::values.renderer_backend.GetValue()) {
|
||||
case Settings::RendererBackend::OpenGL:
|
||||
return std::make_unique<OpenGL::RendererOpenGL>(emu_window, device_memory, gpu,
|
||||
std::move(context));
|
||||
return std::make_unique<OpenGL::RendererOpenGL>(telemetry_session, emu_window,
|
||||
device_memory, gpu, std::move(context));
|
||||
case Settings::RendererBackend::Vulkan:
|
||||
return std::make_unique<Vulkan::RendererVulkan>(emu_window, device_memory, gpu,
|
||||
std::move(context));
|
||||
return std::make_unique<Vulkan::RendererVulkan>(telemetry_session, emu_window,
|
||||
device_memory, gpu, std::move(context));
|
||||
case Settings::RendererBackend::Null:
|
||||
return std::make_unique<Null::RendererNull>(emu_window, gpu, std::move(context));
|
||||
default:
|
||||
|
@@ -625,8 +625,8 @@ class Image {
|
||||
public:
|
||||
explicit Image(VkImage handle_, VkDevice owner_, VmaAllocator allocator_,
|
||||
VmaAllocation allocation_, const DeviceDispatch& dld_) noexcept
|
||||
: handle{handle_}, owner{owner_}, allocator{allocator_}, allocation{allocation_},
|
||||
dld{&dld_} {}
|
||||
: handle{handle_}, owner{owner_}, allocator{allocator_},
|
||||
allocation{allocation_}, dld{&dld_} {}
|
||||
Image() = default;
|
||||
|
||||
Image(const Image&) = delete;
|
||||
@@ -680,8 +680,8 @@ public:
|
||||
explicit Buffer(VkBuffer handle_, VkDevice owner_, VmaAllocator allocator_,
|
||||
VmaAllocation allocation_, std::span<u8> mapped_, bool is_coherent_,
|
||||
const DeviceDispatch& dld_) noexcept
|
||||
: handle{handle_}, owner{owner_}, allocator{allocator_}, allocation{allocation_},
|
||||
mapped{mapped_}, is_coherent{is_coherent_}, dld{&dld_} {}
|
||||
: handle{handle_}, owner{owner_}, allocator{allocator_},
|
||||
allocation{allocation_}, mapped{mapped_}, is_coherent{is_coherent_}, dld{&dld_} {}
|
||||
Buffer() = default;
|
||||
|
||||
Buffer(const Buffer&) = delete;
|
||||
@@ -689,8 +689,8 @@ public:
|
||||
|
||||
Buffer(Buffer&& rhs) noexcept
|
||||
: handle{std::exchange(rhs.handle, nullptr)}, owner{rhs.owner}, allocator{rhs.allocator},
|
||||
allocation{rhs.allocation}, mapped{rhs.mapped}, is_coherent{rhs.is_coherent},
|
||||
dld{rhs.dld} {}
|
||||
allocation{rhs.allocation}, mapped{rhs.mapped},
|
||||
is_coherent{rhs.is_coherent}, dld{rhs.dld} {}
|
||||
|
||||
Buffer& operator=(Buffer&& rhs) noexcept {
|
||||
Release();
|
||||
|
Reference in New Issue
Block a user