[Config] - add cvars for internal resolution
This commit is contained in:
parent
b3820be4da
commit
b2c37c26ce
|
@ -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"
|
||||
|
@ -32,6 +33,9 @@
|
|||
#include "xenia/ui/d3d12/d3d12_util.h"
|
||||
#include "xenia/ui/d3d12/pools.h"
|
||||
|
||||
DECLARE_int32(internal_tile_height);
|
||||
DECLARE_int32(internal_tile_width);
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
namespace d3d12 {
|
||||
|
@ -479,13 +483,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 = 1280;
|
||||
static constexpr uint32_t kSwapTextureHeight = 720;
|
||||
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 = 1280;
|
||||
video_mode->display_height = 720;
|
||||
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