Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ROOTSIG 1.2 support #23

Merged
merged 1 commit into from
Apr 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion dxgi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ enum FLMASK : uint32_t
#pragma warning(disable : 4063 4702)
#endif

#if !defined(NTDDI_WIN10_CU)
#define D3D_ROOT_SIGNATURE_VERSION_1_2 static_cast<D3D_ROOT_SIGNATURE_VERSION>(0x3)
#pragma warning(disable : 4063 4702)
#endif

//-----------------------------------------------------------------------------
namespace
{
Expand Down Expand Up @@ -319,7 +324,7 @@ namespace
return D3D_ROOT_SIGNATURE_VERSION_1_0;

D3D12_FEATURE_DATA_ROOT_SIGNATURE rootSigOpt = {};
rootSigOpt.HighestVersion = D3D_ROOT_SIGNATURE_VERSION_1_1;
rootSigOpt.HighestVersion = D3D_ROOT_SIGNATURE_VERSION_1_2;
HRESULT hr = device->CheckFeatureSupport(D3D12_FEATURE_ROOT_SIGNATURE, &rootSigOpt, sizeof(rootSigOpt));
while (hr == E_INVALIDARG && rootSigOpt.HighestVersion > D3D_ROOT_SIGNATURE_VERSION_1_0)
{
Expand Down Expand Up @@ -4391,6 +4396,7 @@ namespace
{
case D3D_ROOT_SIGNATURE_VERSION_1_0: rootSig = "1.0"; break;
case D3D_ROOT_SIGNATURE_VERSION_1_1: rootSig = "1.1"; break;
case D3D_ROOT_SIGNATURE_VERSION_1_2: rootSig = "1.2"; break;
}

char heap[16];
Expand Down Expand Up @@ -4550,6 +4556,10 @@ namespace
LVYESNO("Dynamic IB strip-cut support", d3d12opts15.DynamicIndexBufferStripCutSupported);
LVYESNO("Dynamic depth bias support", d3d12opts16.DynamicDepthBiasSupported);
#endif

#if defined(NTDDI_WIN10_CU)
LVYESNO("GPU upload heap support", d3d12opts16.GPUUploadHeapSupported);
#endif
}
else
{
Expand Down Expand Up @@ -4608,6 +4618,10 @@ namespace
PRINTYESNO("Dynamic IB strip-cut support", d3d12opts15.DynamicIndexBufferStripCutSupported);
PRINTYESNO("Dynamic depth bias support", d3d12opts16.DynamicDepthBiasSupported);
#endif

#if defined(NTDDI_WIN10_CU)
PRINTYESNO("GPU upload heap support", d3d12opts16.GPUUploadHeapSupported);
#endif
}

return S_OK;
Expand Down Expand Up @@ -4835,6 +4849,12 @@ namespace
writeable_msaa_txt = d3d12opts14.WriteableMSAATexturesSupported ? c_szYes : c_szNo;
#endif

const char* nonNormalizedCoords = nullptr;
#if defined(NTDDI_WIN10_CU)
auto d3d12opts17 = GetD3D12Options<D3D12_FEATURE_D3D12_OPTIONS17, D3D12_FEATURE_DATA_D3D12_OPTIONS17>(pDevice);
nonNormalizedCoords = d3d12opts17.NonNormalizedCoordinateSamplersSupported ? c_szYes : c_szNo;
#endif

if (!pPrintInfo)
{
LVYESNO("Double-precision Shaders", d3d12opts.DoublePrecisionFloatShaderOps);
Expand Down Expand Up @@ -4914,6 +4934,11 @@ namespace
{
LVLINE("Writeable MSAA textures", writeable_msaa_txt);
}

if (nonNormalizedCoords)
{
LVLINE("Non-normalized sampler coordinates", nonNormalizedCoords);
}
}
else
{
Expand Down Expand Up @@ -4994,6 +5019,11 @@ namespace
{
PRINTLINE("Writeable MSAA textures", writeable_msaa_txt);
}

if (nonNormalizedCoords)
{
PRINTLINE("Non-normalized sampler coordinates", nonNormalizedCoords);
}
}

return S_OK;
Expand Down