[Config] - add config cvars for internal resolution
This commit is contained in:
parent
a3fcaf24b5
commit
7446d74ac4
|
@ -62,8 +62,8 @@ namespace d3d12 {
|
|||
constexpr uint32_t D3D12CommandProcessor::kQueueFrames;
|
||||
constexpr uint32_t
|
||||
D3D12CommandProcessor::RootExtraParameterIndices::kUnavailable;
|
||||
constexpr uint32_t D3D12CommandProcessor::kSwapTextureWidth;
|
||||
constexpr uint32_t D3D12CommandProcessor::kSwapTextureHeight;
|
||||
// constexpr uint32_t D3D12CommandProcessor::kSwapTextureWidth();
|
||||
// constexpr uint32_t D3D12CommandProcessor::kSwapTextureHeight();
|
||||
constexpr uint32_t D3D12CommandProcessor::kScratchBufferSizeIncrement;
|
||||
|
||||
D3D12CommandProcessor::D3D12CommandProcessor(
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include "xenia/base/cvar.h"
|
||||
#include "xenia/gpu/command_processor.h"
|
||||
#include "xenia/gpu/d3d12/d3d12_graphics_system.h"
|
||||
#include "xenia/gpu/d3d12/deferred_command_list.h"
|
||||
|
@ -31,6 +32,9 @@
|
|||
#include "xenia/ui/d3d12/d3d12_context.h"
|
||||
#include "xenia/ui/d3d12/pools.h"
|
||||
|
||||
DECLARE_int32(internal_tile_height);
|
||||
DECLARE_int32(internal_tile_width);
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
namespace d3d12 {
|
||||
|
@ -324,13 +328,18 @@ class D3D12CommandProcessor : public CommandProcessor {
|
|||
uint8_t* gamma_ramp_upload_mapping_ = nullptr;
|
||||
D3D12_PLACED_SUBRESOURCE_FOOTPRINT gamma_ramp_footprints_[kQueueFrames * 2];
|
||||
|
||||
static constexpr uint32_t kSwapTextureWidth = 1920;
|
||||
static constexpr uint32_t kSwapTextureHeight = 1080;
|
||||
static constexpr uint32_t kSwapTextureWidth() {
|
||||
return cvars::internal_tile_width;
|
||||
}
|
||||
static constexpr uint32_t kSwapTextureHeight() {
|
||||
return cvars::internal_tile_height;
|
||||
}
|
||||
|
||||
inline std::pair<uint32_t, uint32_t> GetSwapTextureSize() const {
|
||||
if (texture_cache_->IsResolutionScale2X()) {
|
||||
return std::make_pair(kSwapTextureWidth * 2, kSwapTextureHeight * 2);
|
||||
return std::make_pair(kSwapTextureWidth() * 2, kSwapTextureHeight() * 2);
|
||||
}
|
||||
return std::make_pair(kSwapTextureWidth, kSwapTextureHeight);
|
||||
return std::make_pair(kSwapTextureWidth(), kSwapTextureHeight());
|
||||
}
|
||||
ID3D12Resource* swap_texture_ = nullptr;
|
||||
D3D12_PLACED_SUBRESOURCE_FOOTPRINT swap_texture_copy_footprint_;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "xenia/kernel/xboxkrnl/xboxkrnl_video.h"
|
||||
|
||||
#include "xenia/base/cvar.h"
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/emulator.h"
|
||||
#include "xenia/gpu/graphics_system.h"
|
||||
|
@ -28,6 +29,9 @@ DEFINE_double(kernel_display_gamma_power, 2.22222233,
|
|||
"Display gamma to use with kernel_display_gamma_type 3.",
|
||||
"Kernel");
|
||||
|
||||
DEFINE_int32(internal_tile_height, 720, "guest resolution height", "Video");
|
||||
DEFINE_int32(internal_tile_width, 1280, "guest resolution width", "Video");
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
namespace xboxkrnl {
|
||||
|
@ -132,8 +136,8 @@ DECLARE_XBOXKRNL_EXPORT1(VdGetCurrentDisplayInformation, kVideo, kStub);
|
|||
void VdQueryVideoMode(pointer_t<X_VIDEO_MODE> video_mode) {
|
||||
// TODO(benvanik): get info from actual display.
|
||||
video_mode.Zero();
|
||||
video_mode->display_width = 1920;
|
||||
video_mode->display_height = 1080;
|
||||
video_mode->display_width = cvars::internal_tile_width;
|
||||
video_mode->display_height = cvars::internal_tile_height;
|
||||
video_mode->is_interlaced = 0;
|
||||
video_mode->is_widescreen = 1;
|
||||
video_mode->is_hi_def = 1;
|
||||
|
|
Loading…
Reference in New Issue