Compare commits

...

41 Commits

Author SHA1 Message Date
g
2737d7414f Merge remote-tracking branch 'upstream/master' 2024-01-09 01:14:17 +09:00
Rashi Abramson
7af47f0d1c
Update README.md to better format options 2023-12-19 09:41:51 -08:00
Rashi Abramson
34d12c690e
Update README.md to link to fork with HDR 2023-12-19 09:40:48 -08:00
ge9
fe98ccff70
Merge pull request #8 from maxboone/patch-1
Add requirement for nefcon
2022-10-13 17:56:25 +09:00
Max Boone
335037871e
Add requirement for nefcon
extras bucket is required because of dependency on nefcon
2022-10-13 04:19:25 +02:00
ge9
c66e5be801 Merge remote-tracking branch 'upstream/master' 2022-07-21 11:50:52 +09:00
Rashi Abramson
19d2239d98
Merge pull request #28 from sitiom/patch-1
Point to the repo of the fork itself
2022-07-12 10:58:58 -07:00
ge9
5eeb1311b7
Merge pull request #5 from sitiom/patch-2
Update manual installation guide
2022-07-11 23:24:25 +09:00
sitiom
263ac01a8e
Update README.md 2022-07-11 16:40:11 +08:00
sitiom
e05854eb5b
Update manual installation guide 2022-07-11 16:38:11 +08:00
sitiom
5c6793720d
Point to the repo of the fork itself 2022-07-11 16:29:39 +08:00
ge9
c9c0eae131
Merge pull request #4 from sitiom/patch-2
Add License and Acknowledgements section
2022-07-11 17:15:44 +09:00
sitiom
a5e97012f7
Add License and Acknowledgements section 2022-07-11 16:12:07 +08:00
ge9
cffce6af60
Merge pull request #3 from sitiom/patch-1
Add installation and configuration section
2022-07-11 17:05:59 +09:00
sitiom
a75a4d8060
Add installation and configuration section 2022-07-11 13:13:40 +08:00
ge9
cde53a0889
Merge pull request #2 from Wind0S/patch-2
Update README.md
2022-06-28 23:19:26 +09:00
ge9
75707a5e55
Merge branch 'master' into patch-2 2022-06-28 23:19:04 +09:00
ge9
ad441382ec
Merge pull request #1 from Wind0S/patch-1
Update option.txt
2022-06-28 23:15:18 +09:00
ge9
9dbc9e3cdb
Merge branch 'roshkins:master' into master 2022-03-08 17:10:39 +09:00
Rashi Abramson
df7238c1f2
Update README.md 2022-02-20 14:06:48 -08:00
ge9
d9d032b07b Merge remote-tracking branch 'upstream/master' 2022-01-11 16:18:12 +09:00
Rashi Abramson
42a964a2be Revert "Update README.md"
This reverts commit a5a9541f935b5915227f4394e2a8b3adf5ff822d.
2021-12-09 12:58:21 -08:00
Rashi Abramson
a5a9541f93
Update README.md 2021-12-09 12:47:38 -08:00
Rashi Abramson
adcdfc65dd
Update README.md 2021-11-02 14:21:50 -07:00
Rashi Abramson
39c61844a2
Update README.md 2021-10-06 11:43:04 -07:00
Wind0S
484343a7d2
Update README.md
Old version linked in the README. This caused me to be unaware of the new version with the configuration option.txt file. I recommend this link so it will always be the latest when clicked.
2021-10-06 03:09:04 -04:00
Wind0S
696592047a
Update option.txt
Typo fixed.
Mush → Must
2021-10-06 02:42:06 -04:00
ge9
fb4e50672d Use option.txt 2021-09-11 14:31:32 +09:00
ge9
218cdbbe40 Use option.txt 2021-09-11 14:26:47 +09:00
Rashi Abramson
c6132571f4
Merge pull request #3 from ge9/master
Increased resolution
2021-08-11 21:58:26 -07:00
Rashi Abramson
3aeac47cce
Update README.md 2021-08-11 09:55:46 -07:00
ge9
930582b7a5 Add more target modes 2021-08-11 01:47:15 +11:00
ge9
a2ddf27195 increase resolution, only 1 monitor 2021-08-05 20:56:18 +09:00
ge9
43a3ec388b change project properties 2021-08-05 20:38:26 +09:00
Rashi Abramson
0f6fef7300
Update README.md 2021-04-20 14:46:06 -07:00
Rashi Abramson
2316a3e836
Update README.md 2021-04-09 14:56:10 -07:00
Rashi Abramson
fc8048a627
Update README.md 2021-04-08 15:49:00 -07:00
Rashi Abramson
b16ba13c0b
Update README.md 2021-04-08 15:24:56 -07:00
Rashi Abramson
899ab22246
Update README.md 2021-04-08 13:53:25 -07:00
Rashi Abramson
10ac866f5d
Update README.md 2021-04-08 13:30:48 -07:00
Rashi Abramson
e8d50b1017
Update README.md 2021-04-08 13:30:21 -07:00
4 changed files with 175 additions and 66 deletions

View File

@ -17,6 +17,11 @@ Environment:
#include "Driver.h"
#include "Driver.tmh"
#include<fstream>
#include<sstream>
#include<string>
#include<tuple>
#include<vector>
using namespace std;
using namespace Microsoft::IndirectDisp;
@ -37,6 +42,10 @@ EVT_IDD_CX_MONITOR_QUERY_TARGET_MODES IddSampleMonitorQueryModes;
EVT_IDD_CX_MONITOR_ASSIGN_SWAPCHAIN IddSampleMonitorAssignSwapChain;
EVT_IDD_CX_MONITOR_UNASSIGN_SWAPCHAIN IddSampleMonitorUnassignSwapChain;
vector<tuple<int, int, int>> monitorModes;
vector< DISPLAYCONFIG_VIDEO_SIGNAL_INFO> s_KnownMonitorModes2;
UINT numVirtualDisplays;
struct IndirectDeviceContextWrapper
{
IndirectDeviceContext* pContext;
@ -87,7 +96,32 @@ extern "C" NTSTATUS DriverEntry(
return Status;
}
vector<string> split(string& input, char delimiter)
{
istringstream stream(input);
string field;
vector<string> result;
while (getline(stream, field, delimiter)) {
result.push_back(field);
}
return result;
}
void loadOptions(string filepath) {
ifstream ifs(filepath);
string line;
vector<tuple<int, int, int>> res;
getline(ifs, line);//num of displays
numVirtualDisplays = stoi(line);
while (getline(ifs, line)) {
vector<string> strvec = split(line, ',');
if (strvec.size() == 3 && strvec[0].substr(0, 1) != "#") {
res.push_back({ stoi(strvec[0]),stoi(strvec[1]),stoi(strvec[2]) });
}
}
monitorModes = res; return;
}
_Use_decl_annotations_
NTSTATUS IddSampleDeviceAdd(WDFDRIVER Driver, PWDFDEVICE_INIT pDeviceInit)
{
@ -107,7 +141,7 @@ NTSTATUS IddSampleDeviceAdd(WDFDRIVER Driver, PWDFDEVICE_INIT pDeviceInit)
// If the driver wishes to handle custom IoDeviceControl requests, it's necessary to use this callback since IddCx
// redirects IoDeviceControl requests to an internal queue. This sample does not need this.
// IddConfig.EvtIddCxDeviceIoControl = IddSampleIoDeviceControl;
loadOptions("C:\\IddSampleDriver\\option.txt");
IddConfig.EvtIddCxAdapterInitFinished = IddSampleAdapterInitFinished;
IddConfig.EvtIddCxParseMonitorDescription = IddSampleParseMonitorDescription;
@ -241,7 +275,7 @@ void SwapChainProcessor::Run()
// For improved performance, make use of the Multimedia Class Scheduler Service, which will intelligently
// prioritize this thread for improved throughput in high CPU-load scenarios.
DWORD AvTask = 0;
HANDLE AvTaskHandle = AvSetMmThreadCharacteristics(L"Distribution", &AvTask);
HANDLE AvTaskHandle = AvSetMmThreadCharacteristicsW(L"Distribution", &AvTask);
RunCore();
@ -285,7 +319,7 @@ void SwapChainProcessor::RunCore()
if (hr == E_PENDING)
{
// We must wait for a new buffer
HANDLE WaitHandles [] =
HANDLE WaitHandles[] =
{
m_hAvailableBufferEvent,
m_hTerminateEvent.Get()
@ -352,59 +386,37 @@ void SwapChainProcessor::RunCore()
const UINT64 MHZ = 1000000;
const UINT64 KHZ = 1000;
// A list of modes exposed by the sample monitor EDID - FOR SAMPLE PURPOSES ONLY
const DISPLAYCONFIG_VIDEO_SIGNAL_INFO IndirectDeviceContext::s_KnownMonitorModes[] =
{
// 800 x 600 @ 60Hz
{
40 * MHZ, // pixel clock rate [Hz]
{ 40 * MHZ, 800 + 256 }, // fractional horizontal refresh rate [Hz]
{ 40 * MHZ, (800 + 256) * (600 + 28) }, // fractional vertical refresh rate [Hz]
{ 800, 600 }, // (horizontal, vertical) active pixel resolution
{ 800 + 256, 600 + 28 }, // (horizontal, vertical) total pixel resolution
{ { 255, 0 }}, // video standard and vsync divider
DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE
},
// 640 x 480 @ 60Hz
{
25175 * KHZ, // pixel clock rate [Hz]
{ 25175 * KHZ, 640 + 160 }, // fractional horizontal refresh rate [Hz]
{ 25175 * KHZ, (640 + 160) * (480 + 46) }, // fractional vertical refresh rate [Hz]
{ 640, 480 }, // (horizontal, vertical) active pixel resolution
{ 640 + 160, 480 + 46 }, // (horizontal, vertical) blanking pixel resolution
{ { 255, 0 } }, // video standard and vsync divider
DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE
},
// 800 x 600 @ 60Hz
{
40 * MHZ, // pixel clock rate [Hz]
{ 40 * MHZ, 800 + 256 }, // fractional horizontal refresh rate [Hz]
{ 40 * MHZ, (800 + 256) * (600 + 28) }, // fractional vertical refresh rate [Hz]
{ 1920, 1280 }, // (horizontal, vertical) active pixel resolution
{ 1920 + 256, 1280 + 28 }, // (horizontal, vertical) total pixel resolution
constexpr DISPLAYCONFIG_VIDEO_SIGNAL_INFO dispinfo(UINT32 h, UINT32 v, UINT32 r) {
const UINT32 clock_rate = r * (v + 4) * (v + 4) + 1000;
return {
clock_rate, // pixel clock rate [Hz]
{ clock_rate, v + 4 }, // fractional horizontal refresh rate [Hz]
{ clock_rate, (v + 4) * (v + 4) }, // fractional vertical refresh rate [Hz]
{ h, v }, // (horizontal, vertical) active pixel resolution
{ h + 4, v + 4 }, // (horizontal, vertical) total pixel resolution
{ { 255, 0 }}, // video standard and vsync divider
DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE
},
};
};
}
// This is a sample monitor EDID - FOR SAMPLE PURPOSES ONLY
const BYTE IndirectDeviceContext::s_KnownMonitorEdid[] =
{
/* 0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x79,0x5E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA6,0x01,0x03,0x80,0x28,
0x1E,0x78,0x0A,0xEE,0x91,0xA3,0x54,0x4C,0x99,0x26,0x0F,0x50,0x54,0x20,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0xA0,0x0F,0x20,0x00,0x31,0x58,0x1C,0x20,0x28,0x80,0x14,0x00,
0x90,0x2C,0x11,0x00,0x00,0x1E,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6E */
/* 0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x79,0x5E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xA6,0x01,0x03,0x80,0x28,
0x1E,0x78,0x0A,0xEE,0x91,0xA3,0x54,0x4C,0x99,0x26,0x0F,0x50,0x54,0x20,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0xA0,0x0F,0x20,0x00,0x31,0x58,0x1C,0x20,0x28,0x80,0x14,0x00,
0x90,0x2C,0x11,0x00,0x00,0x1E,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6E */
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x31, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x16, 0x01, 0x03, 0x6D, 0x32, 0x1C, 0x78, 0xEA, 0x5E, 0xC0, 0xA4, 0x59, 0x4A, 0x98, 0x25,
0x20, 0x50, 0x54, 0x00, 0x00, 0x00, 0xD1, 0xC0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x3A, 0x80, 0x18, 0x71, 0x38, 0x2D, 0x40, 0x58, 0x2C,
0x45, 0x00, 0xF4, 0x19, 0x11, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x4C, 0x69, 0x6E,
0x75, 0x78, 0x20, 0x23, 0x30, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xFD, 0x00, 0x3B,
0x3D, 0x42, 0x44, 0x0F, 0x00, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xFC,
0x00, 0x4C, 0x69, 0x6E, 0x75, 0x78, 0x20, 0x46, 0x48, 0x44, 0x0A, 0x20, 0x20, 0x20, 0x00, 0x05
0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x31, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x16, 0x01, 0x03, 0x6D, 0x32, 0x1C, 0x78, 0xEA, 0x5E, 0xC0, 0xA4, 0x59, 0x4A, 0x98, 0x25,
0x20, 0x50, 0x54, 0x00, 0x00, 0x00, 0xD1, 0xC0, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x3A, 0x80, 0x18, 0x71, 0x38, 0x2D, 0x40, 0x58, 0x2C,
0x45, 0x00, 0xF4, 0x19, 0x11, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x4C, 0x69, 0x6E,
0x75, 0x78, 0x20, 0x23, 0x30, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xFD, 0x00, 0x3B,
0x3D, 0x42, 0x44, 0x0F, 0x00, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0xFC,
0x00, 0x4C, 0x69, 0x6E, 0x75, 0x78, 0x20, 0x46, 0x48, 0x44, 0x0A, 0x20, 0x20, 0x20, 0x00, 0x05
};
@ -418,7 +430,7 @@ IndirectDeviceContext::~IndirectDeviceContext()
m_ProcessingThread.reset();
}
#define NUM_VIRTUAL_DISPLAYS 5
#define NUM_VIRTUAL_DISPLAYS 1
void IndirectDeviceContext::InitAdapter()
{
@ -433,7 +445,7 @@ void IndirectDeviceContext::InitAdapter()
AdapterCaps.Size = sizeof(AdapterCaps);
// Declare basic feature support for the adapter (required)
AdapterCaps.MaxMonitorsSupported = NUM_VIRTUAL_DISPLAYS;
AdapterCaps.MaxMonitorsSupported = numVirtualDisplays;
AdapterCaps.EndPointDiagnostics.Size = sizeof(AdapterCaps.EndPointDiagnostics);
AdapterCaps.EndPointDiagnostics.GammaSupport = IDDCX_FEATURE_IMPLEMENTATION_NONE;
AdapterCaps.EndPointDiagnostics.TransmissionType = IDDCX_TRANSMISSION_TYPE_WIRED_OTHER;
@ -476,10 +488,10 @@ void IndirectDeviceContext::InitAdapter()
void IndirectDeviceContext::FinishInit()
{
for (unsigned int i = 0; i < NUM_VIRTUAL_DISPLAYS; i++) {
for (unsigned int i = 0; i < numVirtualDisplays; i++) {
CreateMonitor(i);
}
}
}
void IndirectDeviceContext::CreateMonitor(unsigned int index) {
// ==============================
@ -593,7 +605,6 @@ NTSTATUS IddSampleAdapterCommitModes(IDDCX_ADAPTER AdapterObject, const IDARG_IN
return STATUS_SUCCESS;
}
_Use_decl_annotations_
NTSTATUS IddSampleParseMonitorDescription(const IDARG_IN_PARSEMONITORDESCRIPTION* pInArgs, IDARG_OUT_PARSEMONITORDESCRIPTION* pOutArgs)
{
@ -602,9 +613,12 @@ NTSTATUS IddSampleParseMonitorDescription(const IDARG_IN_PARSEMONITORDESCRIPTION
// this sample driver, we hard-code the EDID, so this function can generate known modes.
// ==============================
pOutArgs->MonitorModeBufferOutputCount = ARRAYSIZE(IndirectDeviceContext::s_KnownMonitorModes);
for (int i = 0; i < monitorModes.size(); i++) {
s_KnownMonitorModes2.push_back(dispinfo(std::get<0>(monitorModes[i]), std::get<1>(monitorModes[i]), std::get<2>(monitorModes[i])));
}
pOutArgs->MonitorModeBufferOutputCount = (UINT)monitorModes.size();
if (pInArgs->MonitorModeBufferInputCount < ARRAYSIZE(IndirectDeviceContext::s_KnownMonitorModes))
if (pInArgs->MonitorModeBufferInputCount < monitorModes.size())
{
// Return success if there was no buffer, since the caller was only asking for a count of modes
return (pInArgs->MonitorModeBufferInputCount > 0) ? STATUS_BUFFER_TOO_SMALL : STATUS_SUCCESS;
@ -612,11 +626,11 @@ NTSTATUS IddSampleParseMonitorDescription(const IDARG_IN_PARSEMONITORDESCRIPTION
else
{
// Copy the known modes to the output buffer
for (DWORD ModeIndex = 0; ModeIndex < ARRAYSIZE(IndirectDeviceContext::s_KnownMonitorModes); ModeIndex++)
for (DWORD ModeIndex = 0; ModeIndex < monitorModes.size(); ModeIndex++)
{
pInArgs->pMonitorModes[ModeIndex].Size = sizeof(IDDCX_MONITOR_MODE);
pInArgs->pMonitorModes[ModeIndex].Origin = IDDCX_MONITOR_MODE_ORIGIN_MONITORDESCRIPTOR;
pInArgs->pMonitorModes[ModeIndex].MonitorVideoSignalInfo = IndirectDeviceContext::s_KnownMonitorModes[ModeIndex];
pInArgs->pMonitorModes[ModeIndex].MonitorVideoSignalInfo = s_KnownMonitorModes2[ModeIndex];
}
// Set the preferred mode as represented in the EDID
@ -668,20 +682,19 @@ void CreateTargetMode(IDDCX_TARGET_MODE& Mode, UINT Width, UINT Height, UINT VSy
}
_Use_decl_annotations_
NTSTATUS IddSampleMonitorQueryModes(IDDCX_MONITOR MonitorObject, const IDARG_IN_QUERYTARGETMODES* pInArgs, IDARG_OUT_QUERYTARGETMODES* pOutArgs)
NTSTATUS IddSampleMonitorQueryModes(IDDCX_MONITOR MonitorObject, const IDARG_IN_QUERYTARGETMODES* pInArgs, IDARG_OUT_QUERYTARGETMODES* pOutArgs)////////////////////////////////////////////////////////////////////////////////
{
UNREFERENCED_PARAMETER(MonitorObject);
vector<IDDCX_TARGET_MODE> TargetModes(4);
vector<IDDCX_TARGET_MODE> TargetModes(monitorModes.size());
// Create a set of modes supported for frame processing and scan-out. These are typically not based on the
// monitor's descriptor and instead are based on the static processing capability of the device. The OS will
// report the available set of modes for a given output as the intersection of monitor modes with target modes.
CreateTargetMode(TargetModes[0], 1920, 1080, 60);
CreateTargetMode(TargetModes[1], 1024, 768, 60);
CreateTargetMode(TargetModes[2], 800, 600, 60);
CreateTargetMode(TargetModes[3], 640, 480, 60);
for (int i = 0; i < monitorModes.size(); i++) {
CreateTargetMode(TargetModes[i], std::get<0>(monitorModes[i]), std::get<1>(monitorModes[i]), std::get<2>(monitorModes[i]));
}
pOutArgs->TargetModeBufferOutputCount = (UINT)TargetModes.size();
@ -709,4 +722,4 @@ NTSTATUS IddSampleMonitorUnassignSwapChain(IDDCX_MONITOR MonitorObject)
return STATUS_SUCCESS;
}
#pragma endregion
#pragma endregion

View File

@ -177,10 +177,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<DebuggerFlavor>DbgengRemoteDebugger</DebuggerFlavor>
<RunCodeAnalysis>true</RunCodeAnalysis>
<Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebuggerFlavor>DbgengRemoteDebugger</DebuggerFlavor>
<RunCodeAnalysis>true</RunCodeAnalysis>
<Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<DebuggerFlavor>DbgengRemoteDebugger</DebuggerFlavor>
@ -245,6 +247,9 @@
<Link>
<AdditionalDependencies>%(AdditionalDependencies);OneCoreUAP.lib;avrt.lib</AdditionalDependencies>
</Link>
<DriverSign>
<FileDigestAlgorithm>SHA256</FileDigestAlgorithm>
</DriverSign>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile>

View File

@ -1,7 +1,45 @@
License MIT and CC0 or Public Domain (for changes I made, check with Microsoft for their license), whichever is least restrictive -- Use it
AS IS - NO IMPLICIT OR EXPLICIT warranty This may break your computer, it didn't break mine. It runs in User Mode which means it's less likely to cause system instability like the Blue Screen of Death.
Check out the latest release to download, or find other versions below:
# Newer Versions
# Fork that is easy to install
https://github.com/ge9/IddSampleDriver
## Fork with HDR
https://github.com/itsmikethetech/Virtual-Display-Driver
If you want me to build on this donate eth or similar here: 0xB01b6328F8Be53c852a54432bbEe630cE0Bd559a
I now have a NEAR address: moopaloo.near
Thanks to https://github.com/akatrevorjay/edid-generator for the hi-res EDID.
# Indirect Display Driver Sample #
This is a sample driver that shows how to create a Windows Indirect Display Driver using the IddCx class extension driver.
## Installation
### Scoop (recommended)
If you have [Scoop](https://scoop.sh/), you can easily install this driver in one go. In an elevated prompt, run:
```powershell
scoop bucket add extras
scoop bucket add nonportable
scoop install iddsampledriver-ge9-np -g
```
The driver should be automatically installed and should be working out of the box.
### Manually
1. Download the latest version from the [releases](https://github.com/ge9/IddSampleDriver/releases/latest) page, and extract the contents to a folder.
2. Copy `option.txt` to `C:\IddSampleDriver\option.txt` before installing the driver **(important!)**.
3. See the [guide](https://github.com/roshkins/IddSampleDriver/releases) in [roshkins repo](https://github.com/roshkins/IddSampleDriver) for the rest of the installation steps.
## Configuration
Configure `C:\IddSampleDriver\option.txt` to set the number of monitors and resolutions.
See `option.txt`
## Background reading ##
Start at the [Indirect Display Driver Model Overview](https://msdn.microsoft.com/en-us/library/windows/hardware/mt761968(v=vs.85).aspx) on MSDN.
@ -31,4 +69,17 @@ The INF file included in the sample needs updating for production use. One field
Ensure the device information reported to `IddCxAdapterInitAsync` is accurate. This information determines how the device is reported to the OS and what static features (like support for gamma tables) the device will have available. If some information cannot be known immediately in the `EvtDeviceD0Entry` callback, IddCx allows the driver to call `IddCxAdapterInitAsync` at any point after D0 entry, before D0 exit.
Careful attention should be paid to the frame processing loop. This will directly impact the performance of the user's system, so making use of the [Multimedia Class Scheduler Service](https://msdn.microsoft.com/en-us/library/windows/desktop/ms684247(v=vs.85).aspx) and DXGI's support for [GPU prioritization](https://msdn.microsoft.com/en-us/library/windows/desktop/bb174534(v=vs.85).aspx) should be considered. Any significant work should be performed outside the main processing loop, such as by queuing work in a thread pool. See `SwapChainProcessor::RunCore` for more information.
Careful attention should be paid to the frame processing loop. This will directly impact the performance of the user's system, so making use of the [Multimedia Class Scheduler Service](https://msdn.microsoft.com/en-us/library/windows/desktop/ms684247(v=vs.85).aspx) and DXGI's support for [GPU prioritization](https://msdn.microsoft.com/en-us/library/windows/desktop/bb174534(v=vs.85).aspx) should be considered. Any significant work should be performed outside the main processing loop, such as by queuing work in a thread pool. See `SwapChainProcessor::RunCore` for more information.
## License
License MIT and CC0 or Public Domain (for changes I made, check with Microsoft for their license), whichever is least restrictive -- Use it
AS IS - NO IMPLICIT OR EXPLICIT warranty This may break your computer, it didn't break mine. It runs in User Mode which means it's less likely to cause system instability like the Blue Screen of Death.
## Acknowledgements
See the original repo below:
https://github.com/roshkins/IddSampleDriver
Thanks to https://github.com/akatrevorjay/edid-generator for the hi-res EDID.

40
option.txt Normal file
View File

@ -0,0 +1,40 @@
1
#lines beginning with "#" are ignored (comment)
#the first line must be a positive integer (small number (<5) is recommended)), NOT comment
#(currently) the location of this file must be "C:\IddSampleDriver\option.txt" (hard-coded)
#numbers should be separated by comma
#spaces before number are allowed
640, 480, 60
800, 600, 60
1024, 768, 60
1152, 864, 60
1280, 600, 60
1280, 720, 60
1280, 768, 60
1280, 800, 60
1280, 960, 60
1280, 1024, 60
1360, 768, 60
1366, 768, 60
1400, 1050, 60
1440, 900, 60
1600, 900, 60
1680, 1050, 60
1600, 1024, 60
1920, 1080, 60
1920, 1200, 60
1920, 1440, 60
2560, 1440, 60
2560, 1600, 60
2880, 1620, 60
2880, 1800, 60
3008, 1692, 60
3200, 1800, 60
3200, 2400, 60
3840, 2160, 60
3840, 2400, 60
4096, 2304, 60
4096, 2560, 60
5120, 2880, 60
6016, 3384, 60
7680, 4320, 60