Skip to content

Commit a2ddf27

Browse files
committed
increase resolution, only 1 monitor
1 parent 43a3ec3 commit a2ddf27

File tree

1 file changed

+28
-8
lines changed

1 file changed

+28
-8
lines changed

IddSampleDriver/Driver.cpp

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ void SwapChainProcessor::Run()
241241
// For improved performance, make use of the Multimedia Class Scheduler Service, which will intelligently
242242
// prioritize this thread for improved throughput in high CPU-load scenarios.
243243
DWORD AvTask = 0;
244-
HANDLE AvTaskHandle = AvSetMmThreadCharacteristics(L"Distribution", &AvTask);
244+
HANDLE AvTaskHandle = AvSetMmThreadCharacteristicsW(L"Distribution", &AvTask);
245245

246246
RunCore();
247247

@@ -385,6 +385,24 @@ const DISPLAYCONFIG_VIDEO_SIGNAL_INFO IndirectDeviceContext::s_KnownMonitorModes
385385
{ { 255, 0 }}, // video standard and vsync divider
386386
DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE
387387
},
388+
{
389+
229009 * KHZ, // pixel clock rate [Hz]
390+
{ 229009 * KHZ, 2560 + 40 }, // fractional horizontal refresh rate [Hz]
391+
{ 229009 * KHZ, (2560 + 40) * (1440 + 28) }, // fractional vertical refresh rate [Hz]
392+
{ 2560, 1440 }, // (horizontal, vertical) active pixel resolution
393+
{ 2560 + 40, 1440 + 28 }, // (horizontal, vertical) total pixel resolution
394+
{ { 255, 0 }}, // video standard and vsync divider
395+
DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE
396+
},
397+
{
398+
509367 * KHZ, // pixel clock rate [Hz]
399+
{ 509367 * KHZ, 3840 + 40 }, // fractional horizontal refresh rate [Hz]
400+
{ 509367 * KHZ, (3840 + 40) * (2160 + 28) }, // fractional vertical refresh rate [Hz]
401+
{ 3840, 2160 }, // (horizontal, vertical) active pixel resolution
402+
{ 3840 + 40, 2160 + 28 }, // (horizontal, vertical) total pixel resolution
403+
{ { 255, 0 }}, // video standard and vsync divider
404+
DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE
405+
},
388406
};
389407

390408
// This is a sample monitor EDID - FOR SAMPLE PURPOSES ONLY
@@ -418,7 +436,7 @@ IndirectDeviceContext::~IndirectDeviceContext()
418436
m_ProcessingThread.reset();
419437
}
420438

421-
#define NUM_VIRTUAL_DISPLAYS 5
439+
#define NUM_VIRTUAL_DISPLAYS 1
422440

423441
void IndirectDeviceContext::InitAdapter()
424442
{
@@ -672,16 +690,18 @@ NTSTATUS IddSampleMonitorQueryModes(IDDCX_MONITOR MonitorObject, const IDARG_IN_
672690
{
673691
UNREFERENCED_PARAMETER(MonitorObject);
674692

675-
vector<IDDCX_TARGET_MODE> TargetModes(4);
693+
vector<IDDCX_TARGET_MODE> TargetModes(6);
676694

677695
// Create a set of modes supported for frame processing and scan-out. These are typically not based on the
678696
// monitor's descriptor and instead are based on the static processing capability of the device. The OS will
679697
// report the available set of modes for a given output as the intersection of monitor modes with target modes.
680698

681-
CreateTargetMode(TargetModes[0], 1920, 1080, 60);
682-
CreateTargetMode(TargetModes[1], 1024, 768, 60);
683-
CreateTargetMode(TargetModes[2], 800, 600, 60);
684-
CreateTargetMode(TargetModes[3], 640, 480, 60);
699+
CreateTargetMode(TargetModes[0], 3840, 2160, 60);
700+
CreateTargetMode(TargetModes[1], 2560, 1440, 60);
701+
CreateTargetMode(TargetModes[2], 1920, 1080, 60);
702+
CreateTargetMode(TargetModes[3], 1024, 768, 60);
703+
CreateTargetMode(TargetModes[4], 800, 600, 60);
704+
CreateTargetMode(TargetModes[5], 640, 480, 60);
685705

686706
pOutArgs->TargetModeBufferOutputCount = (UINT)TargetModes.size();
687707

@@ -709,4 +729,4 @@ NTSTATUS IddSampleMonitorUnassignSwapChain(IDDCX_MONITOR MonitorObject)
709729
return STATUS_SUCCESS;
710730
}
711731

712-
#pragma endregion
732+
#pragma endregion

0 commit comments

Comments
 (0)