config, video_core: null gpu configuration added
This commit is contained in:
parent
b0243dd3e5
commit
d752aa5357
|
@ -18,6 +18,7 @@ std::string logType = "sync";
|
||||||
bool isDebugDump = false;
|
bool isDebugDump = false;
|
||||||
bool isLibc = true;
|
bool isLibc = true;
|
||||||
bool isShowSplash = false;
|
bool isShowSplash = false;
|
||||||
|
bool isNullGpu = false;
|
||||||
|
|
||||||
bool isLleLibc() {
|
bool isLleLibc() {
|
||||||
return isLibc;
|
return isLibc;
|
||||||
|
@ -54,6 +55,10 @@ bool showSplash() {
|
||||||
return isShowSplash;
|
return isShowSplash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool nullGpu() {
|
||||||
|
return isNullGpu;
|
||||||
|
}
|
||||||
|
|
||||||
void load(const std::filesystem::path& path) {
|
void load(const std::filesystem::path& path) {
|
||||||
// If the configuration file does not exist, create it and return
|
// If the configuration file does not exist, create it and return
|
||||||
std::error_code error;
|
std::error_code error;
|
||||||
|
@ -90,6 +95,7 @@ void load(const std::filesystem::path& path) {
|
||||||
screenWidth = toml::find_or<toml::integer>(gpu, "screenWidth", screenWidth);
|
screenWidth = toml::find_or<toml::integer>(gpu, "screenWidth", screenWidth);
|
||||||
screenHeight = toml::find_or<toml::integer>(gpu, "screenHeight", screenHeight);
|
screenHeight = toml::find_or<toml::integer>(gpu, "screenHeight", screenHeight);
|
||||||
gpuId = toml::find_or<toml::integer>(gpu, "gpuId", 0);
|
gpuId = toml::find_or<toml::integer>(gpu, "gpuId", 0);
|
||||||
|
isNullGpu = toml::find_or<toml::boolean>(gpu, "nullGpu", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.contains("Debug")) {
|
if (data.contains("Debug")) {
|
||||||
|
@ -135,6 +141,7 @@ void save(const std::filesystem::path& path) {
|
||||||
data["GPU"]["gpuId"] = gpuId;
|
data["GPU"]["gpuId"] = gpuId;
|
||||||
data["GPU"]["screenWidth"] = screenWidth;
|
data["GPU"]["screenWidth"] = screenWidth;
|
||||||
data["GPU"]["screenHeight"] = screenHeight;
|
data["GPU"]["screenHeight"] = screenHeight;
|
||||||
|
data["GPU"]["nullGpu"] = isNullGpu;
|
||||||
data["Debug"]["DebugDump"] = isDebugDump;
|
data["Debug"]["DebugDump"] = isDebugDump;
|
||||||
data["LLE"]["libc"] = isLibc;
|
data["LLE"]["libc"] = isLibc;
|
||||||
|
|
||||||
|
|
|
@ -21,5 +21,6 @@ s32 getGpuId();
|
||||||
bool debugDump();
|
bool debugDump();
|
||||||
bool isLleLibc();
|
bool isLleLibc();
|
||||||
bool showSplash();
|
bool showSplash();
|
||||||
|
bool nullGpu();
|
||||||
|
|
||||||
}; // namespace Config
|
}; // namespace Config
|
||||||
|
|
|
@ -108,7 +108,9 @@ void Liverpool::ProcessCmdList(const u32* cmdbuf, u32 size_in_bytes) {
|
||||||
regs.index_base_address.base_addr_hi.Assign(draw_index->index_base_hi);
|
regs.index_base_address.base_addr_hi.Assign(draw_index->index_base_hi);
|
||||||
regs.num_indices = draw_index->index_count;
|
regs.num_indices = draw_index->index_count;
|
||||||
regs.draw_initiator = draw_index->draw_initiator;
|
regs.draw_initiator = draw_index->draw_initiator;
|
||||||
|
if (rasterizer) {
|
||||||
rasterizer->DrawIndex();
|
rasterizer->DrawIndex();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PM4ItOpcode::DrawIndexAuto: {
|
case PM4ItOpcode::DrawIndexAuto: {
|
||||||
|
|
|
@ -644,7 +644,7 @@ private:
|
||||||
void ProcessCmdList(const u32* cmdbuf, u32 size_in_bytes);
|
void ProcessCmdList(const u32* cmdbuf, u32 size_in_bytes);
|
||||||
void Process(std::stop_token stoken);
|
void Process(std::stop_token stoken);
|
||||||
|
|
||||||
Vulkan::Rasterizer* rasterizer;
|
Vulkan::Rasterizer* rasterizer{};
|
||||||
std::jthread process_thread{};
|
std::jthread process_thread{};
|
||||||
std::queue<std::span<const u32>> gfx_ring{};
|
std::queue<std::span<const u32>> gfx_ring{};
|
||||||
std::condition_variable_any cv_submit{};
|
std::condition_variable_any cv_submit{};
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include "common/config.h"
|
||||||
#include "video_core/amdgpu/liverpool.h"
|
#include "video_core/amdgpu/liverpool.h"
|
||||||
#include "video_core/renderer_vulkan/vk_instance.h"
|
#include "video_core/renderer_vulkan/vk_instance.h"
|
||||||
#include "video_core/renderer_vulkan/vk_rasterizer.h"
|
#include "video_core/renderer_vulkan/vk_rasterizer.h"
|
||||||
|
@ -19,7 +20,9 @@ Rasterizer::Rasterizer(const Instance& instance_, Scheduler& scheduler_,
|
||||||
: instance{instance_}, scheduler{scheduler_}, texture_cache{texture_cache_},
|
: instance{instance_}, scheduler{scheduler_}, texture_cache{texture_cache_},
|
||||||
liverpool{liverpool_}, pipeline_cache{instance, scheduler, liverpool},
|
liverpool{liverpool_}, pipeline_cache{instance, scheduler, liverpool},
|
||||||
vertex_index_buffer{instance, scheduler, VertexIndexFlags, 64_MB} {
|
vertex_index_buffer{instance, scheduler, VertexIndexFlags, 64_MB} {
|
||||||
|
if (!Config::nullGpu()) {
|
||||||
liverpool->BindRasterizer(this);
|
liverpool->BindRasterizer(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rasterizer::~Rasterizer() = default;
|
Rasterizer::~Rasterizer() = default;
|
||||||
|
|
Loading…
Reference in New Issue