[D3D12] Switch from gflags to cvars
This commit is contained in:
@@ -347,7 +347,7 @@ VkPipeline PipelineCache::GetPipeline(const RenderState* render_state,
|
||||
}
|
||||
|
||||
// Dump shader disassembly.
|
||||
if (FLAGS_vulkan_dump_disasm) {
|
||||
if (cvars::vulkan_dump_disasm) {
|
||||
if (device_->HasEnabledExtension(VK_AMD_SHADER_INFO_EXTENSION_NAME)) {
|
||||
DumpShaderDisasmAMD(pipeline);
|
||||
} else if (device_->device_info().properties.vendorID == 0x10DE) {
|
||||
@@ -387,8 +387,8 @@ bool PipelineCache::TranslateShader(VulkanShader* shader,
|
||||
}
|
||||
|
||||
// Dump shader files if desired.
|
||||
if (!FLAGS_dump_shaders.empty()) {
|
||||
shader->Dump(FLAGS_dump_shaders, "vk");
|
||||
if (!cvars::dump_shaders.empty()) {
|
||||
shader->Dump(cvars::dump_shaders, "vk");
|
||||
}
|
||||
|
||||
return shader->is_valid();
|
||||
@@ -1396,7 +1396,7 @@ PipelineCache::UpdateStatus PipelineCache::UpdateMultisampleState() {
|
||||
// PA_SU_SC_MODE_CNTL MSAA_ENABLE (0x10000)
|
||||
// If set, all samples will be sampled at set locations. Otherwise, they're
|
||||
// all sampled from the pixel center.
|
||||
if (FLAGS_vulkan_native_msaa) {
|
||||
if (cvars::vulkan_native_msaa) {
|
||||
auto msaa_num_samples =
|
||||
static_cast<MsaaSamples>((regs.rb_surface_info >> 16) & 0x3);
|
||||
switch (msaa_num_samples) {
|
||||
|
||||
@@ -17,9 +17,6 @@ project("xenia-gpu-vulkan")
|
||||
})
|
||||
defines({
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/gflags/src",
|
||||
})
|
||||
local_platform_files()
|
||||
files({
|
||||
"shaders/bin/*.h",
|
||||
@@ -34,7 +31,6 @@ project("xenia-gpu-vulkan-trace-viewer")
|
||||
links({
|
||||
"aes_128",
|
||||
"capstone",
|
||||
"gflags",
|
||||
"glslang-spirv",
|
||||
"imgui",
|
||||
"libavcodec",
|
||||
@@ -62,9 +58,6 @@ project("xenia-gpu-vulkan-trace-viewer")
|
||||
})
|
||||
defines({
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/gflags/src",
|
||||
})
|
||||
files({
|
||||
"vulkan_trace_viewer_main.cc",
|
||||
"../../base/main_"..platform_suffix..".cc",
|
||||
@@ -91,7 +84,6 @@ project("xenia-gpu-vulkan-trace-viewer")
|
||||
if not os.isfile(user_file) then
|
||||
debugdir(project_root)
|
||||
debugargs({
|
||||
"--flagfile=scratch/flags.txt",
|
||||
"2>&1",
|
||||
"1>scratch/stdout-trace-viewer.txt",
|
||||
})
|
||||
@@ -105,7 +97,6 @@ project("xenia-gpu-vulkan-trace-dump")
|
||||
links({
|
||||
"aes_128",
|
||||
"capstone",
|
||||
"gflags",
|
||||
"glslang-spirv",
|
||||
"imgui",
|
||||
"libavcodec",
|
||||
@@ -133,9 +124,6 @@ project("xenia-gpu-vulkan-trace-dump")
|
||||
})
|
||||
defines({
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/third_party/gflags/src",
|
||||
})
|
||||
files({
|
||||
"vulkan_trace_dump_main.cc",
|
||||
"../../base/main_"..platform_suffix..".cc",
|
||||
@@ -156,7 +144,6 @@ project("xenia-gpu-vulkan-trace-dump")
|
||||
if not os.isfile(user_file) then
|
||||
debugdir(project_root)
|
||||
debugargs({
|
||||
"--flagfile=scratch/flags.txt",
|
||||
"2>&1",
|
||||
"1>scratch/stdout-trace-dump.txt",
|
||||
})
|
||||
|
||||
@@ -194,7 +194,7 @@ VkResult CachedTileView::Initialize(VkCommandBuffer command_buffer) {
|
||||
image_info.extent.depth = 1;
|
||||
image_info.mipLevels = 1;
|
||||
image_info.arrayLayers = 1;
|
||||
if (FLAGS_vulkan_native_msaa) {
|
||||
if (cvars::vulkan_native_msaa) {
|
||||
auto msaa_samples = static_cast<MsaaSamples>(key.msaa_samples);
|
||||
switch (msaa_samples) {
|
||||
case MsaaSamples::k1X:
|
||||
@@ -422,7 +422,7 @@ CachedRenderPass::~CachedRenderPass() {
|
||||
|
||||
VkResult CachedRenderPass::Initialize() {
|
||||
VkSampleCountFlagBits sample_count;
|
||||
if (FLAGS_vulkan_native_msaa) {
|
||||
if (cvars::vulkan_native_msaa) {
|
||||
switch (config.surface_msaa) {
|
||||
case MsaaSamples::k1X:
|
||||
sample_count = VK_SAMPLE_COUNT_1_BIT;
|
||||
@@ -534,7 +534,7 @@ VkResult CachedRenderPass::Initialize() {
|
||||
bool CachedRenderPass::IsCompatible(
|
||||
const RenderConfiguration& desired_config) const {
|
||||
if (config.surface_msaa != desired_config.surface_msaa &&
|
||||
FLAGS_vulkan_native_msaa) {
|
||||
cvars::vulkan_native_msaa) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1040,7 +1040,7 @@ bool TextureCache::UploadTexture(VkCommandBuffer command_buffer,
|
||||
unpack_offset += ComputeMipStorage(src, mip);
|
||||
}
|
||||
|
||||
if (FLAGS_texture_dump) {
|
||||
if (cvars::texture_dump) {
|
||||
TextureDump(src, unpack_buffer, unpack_length);
|
||||
}
|
||||
|
||||
|
||||
@@ -356,7 +356,7 @@ void VulkanCommandProcessor::BeginFrame() {
|
||||
// The capture will end when these commands are submitted to the queue.
|
||||
static uint32_t frame = 0;
|
||||
if (device_->is_renderdoc_attached() && !capturing_ &&
|
||||
(FLAGS_vulkan_renderdoc_capture_all || trace_requested_)) {
|
||||
(cvars::vulkan_renderdoc_capture_all || trace_requested_)) {
|
||||
if (queue_mutex_) {
|
||||
queue_mutex_->lock();
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "xenia/gpu/vulkan/vulkan_gpu_flags.h"
|
||||
|
||||
DEFINE_bool(vulkan_renderdoc_capture_all, false,
|
||||
"Capture everything with RenderDoc.");
|
||||
DEFINE_bool(vulkan_native_msaa, false, "Use native MSAA");
|
||||
"Capture everything with RenderDoc.", "Vulkan");
|
||||
DEFINE_bool(vulkan_native_msaa, false, "Use native MSAA", "Vulkan");
|
||||
DEFINE_bool(vulkan_dump_disasm, false,
|
||||
"Dump shader disassembly. NVIDIA only supported.");
|
||||
"Dump shader disassembly. NVIDIA only supported.", "Vulkan");
|
||||
|
||||
@@ -10,9 +10,8 @@
|
||||
#ifndef XENIA_GPU_VULKAN_VULKAN_GPU_FLAGS_H_
|
||||
#define XENIA_GPU_VULKAN_VULKAN_GPU_FLAGS_H_
|
||||
|
||||
#include <gflags/gflags.h>
|
||||
|
||||
#define FINE_GRAINED_DRAW_SCOPES 1
|
||||
#include "xenia/base/cvar.h"
|
||||
|
||||
DECLARE_bool(vulkan_renderdoc_capture_all);
|
||||
DECLARE_bool(vulkan_native_msaa);
|
||||
|
||||
Reference in New Issue
Block a user