diff --git a/AnKi/Gr/Common.h b/AnKi/Gr/Common.h index 944ce2b7f..1664a85de 100644 --- a/AnKi/Gr/Common.h +++ b/AnKi/Gr/Common.h @@ -520,6 +520,8 @@ enum class TextureUsageBit : U32 | kTransferDestination | kGenerateMipmaps, kAll = kAllRead | kAllWrite, kAllShaderResource = kAllSampled | kAllStorage, + kAllSrv = (kAllSampled | kAllStorage) & kAllRead, + kAllUav = kAllStorage & kAllWrite, }; ANKI_ENUM_ALLOW_NUMERIC_OPERATIONS(TextureUsageBit) diff --git a/AnKi/Gr/D3D/D3DGrManager.cpp b/AnKi/Gr/D3D/D3DGrManager.cpp index 6e65c7103..b1c2ad14e 100644 --- a/AnKi/Gr/D3D/D3DGrManager.cpp +++ b/AnKi/Gr/D3D/D3DGrManager.cpp @@ -29,7 +29,7 @@ // Use the Agility SDK extern "C" { -__declspec(dllexport) extern const UINT D3D12SDKVersion = 613; // Number taken from the download page +__declspec(dllexport) extern const UINT D3D12SDKVersion = 614; // Number taken from the download page __declspec(dllexport) extern const char* D3D12SDKPath = ".\\"; // The D3D12Core.dll should be in the same dir as the .exe } @@ -41,6 +41,7 @@ BoolCVar g_vsyncCVar(CVarSubsystem::kGr, "Vsync", false, "Enable or not vsync"); BoolCVar g_debugMarkersCVar(CVarSubsystem::kGr, "DebugMarkers", false, "Enable or not debug markers"); BoolCVar g_meshShadersCVar(CVarSubsystem::kGr, "MeshShaders", false, "Enable or not mesh shaders"); static NumericCVar g_deviceCVar(CVarSubsystem::kGr, "Device", 0, 0, 16, "Choose an available device. Devices are sorted by performance"); +static BoolCVar g_rayTracingCVar(CVarSubsystem::kGr, "RayTracing", false, "Try enabling ray tracing"); static LONG NTAPI vexHandler(PEXCEPTION_POINTERS exceptionInfo) { @@ -407,7 +408,7 @@ Error GrManagerImpl::initInternal(const GrManagerInitInfo& init) // Create device ComPtr dev; - ANKI_D3D_CHECK(D3D12CreateDevice(adapters[chosenPhysDevIdx].m_adapter.Get(), D3D_FEATURE_LEVEL_12_1, IID_PPV_ARGS(&dev))); + ANKI_D3D_CHECK(D3D12CreateDevice(adapters[chosenPhysDevIdx].m_adapter.Get(), D3D_FEATURE_LEVEL_12_2, IID_PPV_ARGS(&dev))); ANKI_D3D_CHECK(dev->QueryInterface(IID_PPV_ARGS(&m_device))); if(g_validationCVar.get()) @@ -426,17 +427,6 @@ Error GrManagerImpl::initInternal(const GrManagerInitInfo& init) } } - // Capabilities - { - D3D12_FEATURE_DATA_D3D12_OPTIONS16 options16; - ANKI_D3D_CHECK(m_device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS16, &options16, sizeof(options16))); - m_d3dCapabilities.m_rebar = options16.GPUUploadHeapSupported; - if(!m_d3dCapabilities.m_rebar) - { - ANKI_D3D_LOGW("ReBAR not supported"); - } - } - // Create queues { D3D12_COMMAND_QUEUE_DESC queueDesc = {}; @@ -449,6 +439,43 @@ Error GrManagerImpl::initInternal(const GrManagerInitInfo& init) ANKI_D3D_CHECK(m_queues[GpuQueueType::kGeneral]->GetTimestampFrequency(&m_timestampFrequency)); } + // Set device capabilities (taken from mesa's dozen driver) + { + D3D12_FEATURE_DATA_D3D12_OPTIONS16 options16; + ANKI_D3D_CHECK(m_device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS16, &options16, sizeof(options16))); + D3D12_FEATURE_DATA_ARCHITECTURE architecture = {.NodeIndex = 0}; + ANKI_D3D_CHECK(m_device->CheckFeatureSupport(D3D12_FEATURE_ARCHITECTURE, &architecture, sizeof(architecture))); + + m_d3dCapabilities.m_rebar = options16.GPUUploadHeapSupported; + if(!m_d3dCapabilities.m_rebar) + { + ANKI_D3D_LOGW("ReBAR not supported"); + } + + m_capabilities.m_uniformBufferBindOffsetAlignment = D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT; + m_capabilities.m_uniformBufferMaxRange = D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT * D3D12_STANDARD_VECTOR_SIZE * sizeof(F32); + m_capabilities.m_storageBufferBindOffsetAlignment = D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT; + m_capabilities.m_storageBufferMaxRange = 1 << D3D12_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP; + m_capabilities.m_texelBufferBindOffsetAlignment = 32; + m_capabilities.m_textureBufferMaxRange = kMaxU32; // ? + m_capabilities.m_pushConstantsSize = kMaxPushConstantSize; + m_capabilities.m_computeSharedMemorySize = D3D12_CS_TGSM_REGISTER_COUNT * sizeof(F32); + m_capabilities.m_accelerationStructureBuildScratchOffsetAlignment = 32; // ? + m_capabilities.m_sbtRecordAlignment = 32; // ? + m_capabilities.m_maxDrawIndirectCount = kMaxU32; + m_capabilities.m_discreteGpu = !architecture.UMA; + m_capabilities.m_majorApiVersion = 12; + m_capabilities.m_rayTracingEnabled = g_rayTracingCVar.get(); + m_capabilities.m_64bitAtomics = true; + m_capabilities.m_vrs = true; + m_capabilities.m_samplingFilterMinMax = true; + m_capabilities.m_unalignedBbpTextureFormats = false; + m_capabilities.m_dlss = false; + m_capabilities.m_meshShaders = true; + m_capabilities.m_pipelineQuery = true; + m_capabilities.m_barycentrics = true; + } + // Other systems DescriptorFactory::allocateSingleton(); ANKI_CHECK(DescriptorFactory::getSingleton().init()); @@ -504,11 +531,14 @@ void GrManagerImpl::destroy() void GrManagerImpl::waitAllQueues() { - for(GpuQueueType queueType : EnumIterable()) + if(FenceFactory::isAllocated()) { - MicroFencePtr fence = FenceFactory::getSingleton().newInstance(); - fence->gpuSignal(queueType); - fence->clientWait(kMaxSecond); + for(GpuQueueType queueType : EnumIterable()) + { + MicroFencePtr fence = FenceFactory::getSingleton().newInstance(); + fence->gpuSignal(queueType); + fence->clientWait(kMaxSecond); + } } } diff --git a/AnKi/Gr/D3D/D3DTexture.cpp b/AnKi/Gr/D3D/D3DTexture.cpp index f1caecde5..985a34804 100644 --- a/AnKi/Gr/D3D/D3DTexture.cpp +++ b/AnKi/Gr/D3D/D3DTexture.cpp @@ -131,7 +131,7 @@ Error TextureImpl::initInternal(ID3D12Resource* external, const TextureInitInfo& desc.SampleDesc.Count = 1; desc.SampleDesc.Quality = 0; desc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN; - desc.Flags = D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS; + desc.Flags = {}; if(!!(m_usage & TextureUsageBit::kAllFramebuffer) && m_aspect == DepthStencilAspectBit::kNone) { @@ -257,9 +257,49 @@ void TextureImpl::initView(const TextureSubresourceDescriptor& subresource, Text { const TextureView tview(this, subresource); + ANKI_ASSERT(tview.getSubresource().m_depthStencilAspect != DepthStencilAspectBit::kDepthStencil && "Can only create a single plane SRV"); + D3D12_SHADER_RESOURCE_VIEW_DESC desc = {}; - desc.Format = DXGI_FORMAT(m_format); + if(!m_aspect) + { + desc.Format = DXGI_FORMAT(m_format); + } + else + { + // D3D doesn't like depth formats as SRVs + switch(m_format) + { + case Format::kD16_Unorm: + desc.Format = DXGI_FORMAT(Format::kR16_Unorm); + break; + case Format::kD32_Sfloat: + desc.Format = DXGI_FORMAT(Format::kR32_Sfloat); + break; + case Format::kD24_Unorm_S8_Uint: + if(tview.getSubresource().m_depthStencilAspect == DepthStencilAspectBit::kDepth) + { + desc.Format = DXGI_FORMAT_R24_UNORM_X8_TYPELESS; + } + else + { + desc.Format = DXGI_FORMAT_X24_TYPELESS_G8_UINT; + } + break; + case Format::kD32_Sfloat_S8_Uint: + if(tview.getSubresource().m_depthStencilAspect == DepthStencilAspectBit::kDepth) + { + desc.Format = DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS; + } + else + { + desc.Format = DXGI_FORMAT_R32G8X24_TYPELESS; + } + break; + default: + ANKI_ASSERT(0); + } + } const U32 faceCount = textureTypeIsCube(m_texType) ? 6 : 1; const U32 surfaceCount = faceCount * m_layerCount; @@ -501,7 +541,16 @@ D3D12_TEXTURE_BARRIER TextureImpl::computeBarrierInfo(TextureUsageBit before, Te barrier.Subresources.NumMipLevels = 1; barrier.Subresources.FirstArraySlice = subresource.m_layer * faceCount + subresource.m_face; barrier.Subresources.NumArraySlices = 1; - barrier.Subresources.FirstPlane = !!(subresource.m_depthStencilAspect & DepthStencilAspectBit::kDepth) ? 0 : 1; + + if(!!(subresource.m_depthStencilAspect & DepthStencilAspectBit::kDepth) || subresource.m_depthStencilAspect == DepthStencilAspectBit::kNone) + { + barrier.Subresources.FirstPlane = 0; + } + else + { + barrier.Subresources.FirstPlane = 1; + } + barrier.Subresources.NumPlanes = (subresource.m_depthStencilAspect == DepthStencilAspectBit::kDepthStencil) ? 2 : 1; } @@ -638,36 +687,46 @@ D3D12_BARRIER_LAYOUT TextureImpl::computeLayout(TextureUsageBit usage) const } else if(depthStencil) { - if(!(usage & ~(TextureUsageBit::kAllSampled | TextureUsageBit::kFramebufferRead))) + if((usage & TextureUsageBit::kAllSampled) == usage) { - // Only depth tests and sampled + // Only sampled + out = D3D12_BARRIER_LAYOUT_SHADER_RESOURCE; + } + else if((usage & TextureUsageBit::kFramebufferRead) == usage) + { + // Only FB read out = D3D12_BARRIER_LAYOUT_DEPTH_STENCIL_READ; } + else if((usage & (TextureUsageBit::kAllSampled | TextureUsageBit::kFramebufferRead)) == usage) + { + // Only depth tests and sampled + out = D3D12_BARRIER_LAYOUT_COMMON; + } else { // Only attachment write, the rest (eg transfer) are not supported for now - ANKI_ASSERT(usage == TextureUsageBit::kFramebufferWrite || usage == TextureUsageBit::kAllFramebuffer); + ANKI_ASSERT(usage == TextureUsageBit::kAllFramebuffer || usage == TextureUsageBit::kFramebufferWrite); out = D3D12_BARRIER_LAYOUT_DEPTH_STENCIL_WRITE; } } - else if(!(usage & ~TextureUsageBit::kAllFramebuffer)) + else if((usage & TextureUsageBit::kAllFramebuffer) == usage) { // Color attachment out = D3D12_BARRIER_LAYOUT_RENDER_TARGET; } - else if(!(usage & ~TextureUsageBit::kFramebufferShadingRate)) + else if((usage & TextureUsageBit::kFramebufferShadingRate) == usage) { // SRI out = D3D12_BARRIER_LAYOUT_SHADING_RATE_SOURCE; } - else if(!(usage & ~TextureUsageBit::kAllStorage)) + else if((usage & TextureUsageBit::kAllUav) == usage) { - // Only image load/store + // UAV out = D3D12_BARRIER_LAYOUT_UNORDERED_ACCESS; } - else if(!(usage & ~TextureUsageBit::kAllSampled)) + else if((usage & TextureUsageBit::kAllSrv) == usage) { - // Only sampled + // SRV out = D3D12_BARRIER_LAYOUT_SHADER_RESOURCE; } else if(usage == TextureUsageBit::kGenerateMipmaps) diff --git a/AnKi/Renderer/Tonemapping.cpp b/AnKi/Renderer/Tonemapping.cpp index 7fb998059..22c242040 100644 --- a/AnKi/Renderer/Tonemapping.cpp +++ b/AnKi/Renderer/Tonemapping.cpp @@ -38,7 +38,7 @@ Error Tonemapping::initInternal() const TextureInitInfo texinit = getRenderer().create2DRenderTargetInitInfo(1, 1, Format::kR16G16_Sfloat, usage, "ExposureAndAvgLum1x1"); ClearValue clearValue; clearValue.m_colorf = {0.5f, 0.5f, 0.5f, 0.5f}; - m_exposureAndAvgLuminance1x1 = getRenderer().createAndClearRenderTarget(texinit, TextureUsageBit::kAllStorage, clearValue); + m_exposureAndAvgLuminance1x1 = getRenderer().createAndClearRenderTarget(texinit, TextureUsageBit::kStorageComputeRead, clearValue); return Error::kNone; } @@ -46,7 +46,8 @@ Error Tonemapping::initInternal() void Tonemapping::importRenderTargets(RenderingContext& ctx) { // Just import it. It will not be used in resource tracking - m_runCtx.m_exposureLuminanceHandle = ctx.m_renderGraphDescr.importRenderTarget(m_exposureAndAvgLuminance1x1.get(), TextureUsageBit::kAllStorage); + m_runCtx.m_exposureLuminanceHandle = + ctx.m_renderGraphDescr.importRenderTarget(m_exposureAndAvgLuminance1x1.get(), TextureUsageBit::kStorageComputeRead); } void Tonemapping::populateRenderGraph(RenderingContext& ctx) diff --git a/ThirdParty/AgilitySdk/README.md b/ThirdParty/AgilitySdk/README.md index be5083e0a..2fcefd073 100644 --- a/ThirdParty/AgilitySdk/README.md +++ b/ThirdParty/AgilitySdk/README.md @@ -13,40 +13,8 @@ The included licenses apply to the following files: ## Changelog -### Version 1.613.3 - -- Same as 1.613.2, with minor updates shown at the end of this list: -- Work Graphs -- Generic Programs in State objects -- Shader Model 6.8 - - Work Graphs support - - Start Vertex/Instance Location - - Wave Size Range - - Expanded Comparison Sampling -- GPU Upload Heaps (requires preview or future OS) -- Incrementing Constants in ExecuteIndirect -- Minor updates for .3: - - Honor root signature associations added to export in collections when the export is imported into generic program in an executable state object. - - Propagate root signatures to exports that have bindings and no root signatures within the scope of a generic program, like what happens with PSOs - - Other ganeric programs releated bug fixes, additional validation and optimizations - - For state objectgs, minor fixes to subobject association logic in edge cases involving collections to more precisely match spec wording - -### Version 1.613.2 - -- Same as 1.613.1, with minor updates shown at the end of this list: -- Work Graphs -- Generic Programs in State objects -- Shader Model 6.8 - - Work Graphs support - - Start Vertex/Instance Location - - Wave Size Range - - Expanded Comparison Sampling -- GPU Upload Heaps (requires preview or future OS) -- Incrementing Constants in ExecuteIndirect -- Minor updates for .2: - - Close validation hole: Prevent use of features in incompatible state object types, such as defining generic program components (like rast state) in a raytracing pipeline. - - Debug layer fixes around lifetime management of program identifiers (e.g. the handles for the new generic programs) - - ExecuteIndirect validation was too strict: buffer size only needs to be big enough for the number of commands * stride, _minus the unused space at end of last command_ +### Version 1.614.0 +- Enabled R9G9B9E5_SHAREDEXP format for Render Target and Unordered Access Views ### Version 1.613.1 diff --git a/ThirdParty/AgilitySdk/bin/x64/D3D12Core.dll b/ThirdParty/AgilitySdk/bin/x64/D3D12Core.dll index 8b0611af6..b45a9b645 100644 Binary files a/ThirdParty/AgilitySdk/bin/x64/D3D12Core.dll and b/ThirdParty/AgilitySdk/bin/x64/D3D12Core.dll differ diff --git a/ThirdParty/AgilitySdk/bin/x64/D3D12Core.pdb b/ThirdParty/AgilitySdk/bin/x64/D3D12Core.pdb index 07bd9e805..8b8bda93e 100644 Binary files a/ThirdParty/AgilitySdk/bin/x64/D3D12Core.pdb and b/ThirdParty/AgilitySdk/bin/x64/D3D12Core.pdb differ diff --git a/ThirdParty/AgilitySdk/bin/x64/d3d12SDKLayers.dll b/ThirdParty/AgilitySdk/bin/x64/d3d12SDKLayers.dll index d5c7f0039..9f22f7089 100644 Binary files a/ThirdParty/AgilitySdk/bin/x64/d3d12SDKLayers.dll and b/ThirdParty/AgilitySdk/bin/x64/d3d12SDKLayers.dll differ diff --git a/ThirdParty/AgilitySdk/bin/x64/d3d12SDKLayers.pdb b/ThirdParty/AgilitySdk/bin/x64/d3d12SDKLayers.pdb index 5bd67e731..0079e399b 100644 Binary files a/ThirdParty/AgilitySdk/bin/x64/d3d12SDKLayers.pdb and b/ThirdParty/AgilitySdk/bin/x64/d3d12SDKLayers.pdb differ diff --git a/ThirdParty/AgilitySdk/bin/x64/d3dconfig.exe b/ThirdParty/AgilitySdk/bin/x64/d3dconfig.exe index 483a71c26..2ba94cdfc 100644 Binary files a/ThirdParty/AgilitySdk/bin/x64/d3dconfig.exe and b/ThirdParty/AgilitySdk/bin/x64/d3dconfig.exe differ diff --git a/ThirdParty/AgilitySdk/bin/x64/d3dconfig.pdb b/ThirdParty/AgilitySdk/bin/x64/d3dconfig.pdb index 5da8b8e18..286af5f2a 100644 Binary files a/ThirdParty/AgilitySdk/bin/x64/d3dconfig.pdb and b/ThirdParty/AgilitySdk/bin/x64/d3dconfig.pdb differ diff --git a/ThirdParty/AgilitySdk/include/d3d12.h b/ThirdParty/AgilitySdk/include/d3d12.h index 7a47038f1..684ef13d7 100644 --- a/ThirdParty/AgilitySdk/include/d3d12.h +++ b/ThirdParty/AgilitySdk/include/d3d12.h @@ -1102,7 +1102,7 @@ extern "C"{ #define D3D12_PIXEL_ADDRESS_RANGE_BIT_COUNT ( 15 ) -#define D3D12_PREVIEW_SDK_VERSION ( 713 ) +#define D3D12_PREVIEW_SDK_VERSION ( 714 ) #define D3D12_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT ( 16 ) @@ -1235,7 +1235,7 @@ extern "C"{ #define D3D12_RS_SET_SHADING_RATE_COMBINER_COUNT ( 2 ) -#define D3D12_SDK_VERSION ( 613 ) +#define D3D12_SDK_VERSION ( 614 ) #define D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES ( 32 ) diff --git a/ThirdParty/AgilitySdk/include/d3d12.idl b/ThirdParty/AgilitySdk/include/d3d12.idl index c915a6e1c..cb9f45679 100644 --- a/ThirdParty/AgilitySdk/include/d3d12.idl +++ b/ThirdParty/AgilitySdk/include/d3d12.idl @@ -293,7 +293,7 @@ const UINT D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_END = 0xffffffff; const UINT D3D12_OS_RESERVED_REGISTER_SPACE_VALUES_START = 0xfffffff8; const UINT D3D12_PACKED_TILE = 0xffffffff; const UINT D3D12_PIXEL_ADDRESS_RANGE_BIT_COUNT = 15; -const UINT D3D12_PREVIEW_SDK_VERSION = 713; +const UINT D3D12_PREVIEW_SDK_VERSION = 714; const UINT D3D12_PRE_SCISSOR_PIXEL_ADDRESS_RANGE_BIT_COUNT = 16; const UINT D3D12_PS_CS_UAV_REGISTER_COMPONENTS = 1; const UINT D3D12_PS_CS_UAV_REGISTER_COUNT = 8; @@ -361,7 +361,7 @@ const UINT D3D12_REQ_TEXTURECUBE_DIMENSION = 16384; const UINT D3D12_RESINFO_INSTRUCTION_MISSING_COMPONENT_RETVAL = 0; const UINT D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES = 0xffffffff; const UINT D3D12_RS_SET_SHADING_RATE_COMBINER_COUNT = 2; -const UINT D3D12_SDK_VERSION = 613; +const UINT D3D12_SDK_VERSION = 614; const UINT D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES = 32; const UINT D3D12_SHADER_MAJOR_VERSION = 5; const UINT D3D12_SHADER_MAX_INSTANCES = 65535; @@ -1030,7 +1030,7 @@ typedef enum D3D12_FEATURE D3D12_FEATURE_PREDICATION = 50, D3D12_FEATURE_PLACED_RESOURCE_SUPPORT_INFO = 51, D3D12_FEATURE_HARDWARE_COPY = 52, - D3D12_FEATURE_D3D12_OPTIONS21 = 53 + D3D12_FEATURE_D3D12_OPTIONS21 = 53, } D3D12_FEATURE; typedef enum D3D12_SHADER_MIN_PRECISION_SUPPORT @@ -1621,6 +1621,7 @@ typedef struct D3D12_FEATURE_DATA_HARDWARE_COPY [annotation("_Out_")] BOOL Supported; } D3D12_FEATURE_DATA_HARDWARE_COPY; + typedef struct D3D12_RESOURCE_ALLOCATION_INFO { UINT64 SizeInBytes; @@ -1779,6 +1780,7 @@ typedef struct D3D12_RESOURCE_DESC1 } D3D12_RESOURCE_DESC1; + typedef struct D3D12_DEPTH_STENCIL_VALUE { FLOAT Depth; @@ -5430,6 +5432,7 @@ interface ID3D12Resource2 } + [uuid(572F7389-2168-49E3-9693-D6DF5871BF6D), object, local, pointer_default(unique)] interface ID3D12Heap1 : ID3D12Heap @@ -6063,6 +6066,7 @@ interface ID3D12Device14 : ID3D12Device13 [out, iid_is(riid), annotation("_COM_Outptr_")] void** ppvRootSignature); }; + [uuid(bc66d368-7373-4943-8757-fc87dc79e476), object, local, pointer_default(unique)] interface ID3D12VirtualizationGuestDevice : IUnknown @@ -6089,7 +6093,6 @@ interface ID3D12Tools } - typedef struct D3D12_SUBRESOURCE_DATA { const void* pData; diff --git a/ThirdParty/AgilitySdk/include/d3d12sdklayers.h b/ThirdParty/AgilitySdk/include/d3d12sdklayers.h index 7951a9eec..3bab2e37e 100644 --- a/ThirdParty/AgilitySdk/include/d3d12sdklayers.h +++ b/ThirdParty/AgilitySdk/include/d3d12sdklayers.h @@ -3314,8 +3314,39 @@ enum D3D12_MESSAGE_ID D3D12_MESSAGE_ID_RECREATEAT_INSUFFICIENT_SUPPORT = 1386, D3D12_MESSAGE_ID_GPU_BASED_VALIDATION_STRUCTURED_BUFFER_STRIDE_MISMATCH = 1387, D3D12_MESSAGE_ID_DISPATCH_GRAPH_INVALID = 1388, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_TARGET_FORMAT_INVALID = 1389, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_TARGET_DIMENSION_INVALID = 1390, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_SOURCE_COLOR_FORMAT_INVALID = 1391, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_SOURCE_DEPTH_FORMAT_INVALID = 1392, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_EXPOSURE_SCALE_FORMAT_INVALID = 1393, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_ENGINE_CREATE_FLAGS_INVALID = 1394, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_EXTENSION_INTERNAL_LOAD_FAILURE = 1395, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_EXTENSION_INTERNAL_ENGINE_CREATION_ERROR = 1396, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_EXTENSION_INTERNAL_UPSCALER_CREATION_ERROR = 1397, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_EXTENSION_INTERNAL_UPSCALER_EXECUTION_ERROR = 1398, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_REGION_INVALID = 1399, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_TIME_DELTA_INVALID = 1400, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_REQUIRED_TEXTURE_IS_NULL = 1401, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_MOTION_VECTORS_FORMAT_INVALID = 1402, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_FLAGS_INVALID = 1403, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_FORMAT_INVALID = 1404, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_EXPOSURE_SCALE_TEXTURE_SIZE_INVALID = 1405, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_VARIANT_INDEX_OUT_OF_BOUNDS = 1406, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_VARIANT_ID_NOT_FOUND = 1407, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_DUPLICATE_VARIANT_ID = 1408, + D3D12_MESSAGE_ID_DIRECTSR_OUT_OF_MEMORY = 1409, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_UNEXPECTED_TEXTURE_IS_IGNORED = 1410, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EVICT_UNDERFLOW = 1411, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_OPTIONAL_TEXTURE_IS_NULL = 1412, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_INVALID_CAMERA_JITTER = 1413, D3D12_MESSAGE_ID_CREATE_STATE_OBJECT_WARNING = 1414, - D3D12_MESSAGE_ID_D3D12_MESSAGES_END = ( D3D12_MESSAGE_ID_CREATE_STATE_OBJECT_WARNING + 1 ) + D3D12_MESSAGE_ID_GUID_TEXTURE_LAYOUT_UNSUPPORTED = 1415, + D3D12_MESSAGE_ID_RESOLVE_ENCODER_INPUT_PARAM_LAYOUT_INVALID_PARAMETERS = 1416, + D3D12_MESSAGE_ID_INVALID_BARRIER_ACCESS = 1417, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INSTANCE_COUNT_ZERO = 1418, + D3D12_MESSAGE_ID_DESCRIPTOR_HEAP_NOT_SET_BEFORE_ROOT_SIGNATURE_WITH_DIRECTLY_INDEXED_FLAG = 1419, + D3D12_MESSAGE_ID_DIFFERENT_DESCRIPTOR_HEAP_SET_AFTER_ROOT_SIGNATURE_WITH_DIRECTLY_INDEXED_FLAG = 1420, + D3D12_MESSAGE_ID_D3D12_MESSAGES_END = ( D3D12_MESSAGE_ID_DIFFERENT_DESCRIPTOR_HEAP_SET_AFTER_ROOT_SIGNATURE_WITH_DIRECTLY_INDEXED_FLAG + 1 ) } D3D12_MESSAGE_ID; typedef struct D3D12_MESSAGE diff --git a/ThirdParty/AgilitySdk/include/d3d12sdklayers.idl b/ThirdParty/AgilitySdk/include/d3d12sdklayers.idl index c9f2d0dcc..36e7d5d45 100644 --- a/ThirdParty/AgilitySdk/include/d3d12sdklayers.idl +++ b/ThirdParty/AgilitySdk/include/d3d12sdklayers.idl @@ -1455,7 +1455,7 @@ typedef enum D3D12_MESSAGE_ID { D3D12_MESSAGE_ID_PROBABLE_PIX_EVENT_LEAK = 1383, D3D12_MESSAGE_ID_PIX_EVENT_UNDERFLOW = 1384, - + D3D12_MESSAGE_ID_RECREATEAT_INVALID_TARGET = 1385, D3D12_MESSAGE_ID_RECREATEAT_INSUFFICIENT_SUPPORT = 1386, @@ -1463,7 +1463,38 @@ typedef enum D3D12_MESSAGE_ID { D3D12_MESSAGE_ID_DISPATCH_GRAPH_INVALID = 1388, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_TARGET_FORMAT_INVALID = 1389, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_TARGET_DIMENSION_INVALID = 1390, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_SOURCE_COLOR_FORMAT_INVALID = 1391, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_SOURCE_DEPTH_FORMAT_INVALID = 1392, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_EXPOSURE_SCALE_FORMAT_INVALID = 1393, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_ENGINE_CREATE_FLAGS_INVALID = 1394, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_EXTENSION_INTERNAL_LOAD_FAILURE = 1395, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_EXTENSION_INTERNAL_ENGINE_CREATION_ERROR = 1396, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_EXTENSION_INTERNAL_UPSCALER_CREATION_ERROR = 1397, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_EXTENSION_INTERNAL_UPSCALER_EXECUTION_ERROR = 1398, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_REGION_INVALID = 1399, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_TIME_DELTA_INVALID = 1400, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_REQUIRED_TEXTURE_IS_NULL = 1401, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_MOTION_VECTORS_FORMAT_INVALID = 1402, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_FLAGS_INVALID = 1403, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_FORMAT_INVALID = 1404, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_EXPOSURE_SCALE_TEXTURE_SIZE_INVALID = 1405, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_VARIANT_INDEX_OUT_OF_BOUNDS = 1406, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_VARIANT_ID_NOT_FOUND = 1407, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_DUPLICATE_VARIANT_ID = 1408, + D3D12_MESSAGE_ID_DIRECTSR_OUT_OF_MEMORY = 1409, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_UNEXPECTED_TEXTURE_IS_IGNORED = 1410, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EVICT_UNDERFLOW = 1411, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_OPTIONAL_TEXTURE_IS_NULL = 1412, + D3D12_MESSAGE_ID_DIRECTSR_SUPERRES_UPSCALER_EXECUTE_INVALID_CAMERA_JITTER = 1413, D3D12_MESSAGE_ID_CREATE_STATE_OBJECT_WARNING = 1414, + D3D12_MESSAGE_ID_GUID_TEXTURE_LAYOUT_UNSUPPORTED = 1415, + D3D12_MESSAGE_ID_RESOLVE_ENCODER_INPUT_PARAM_LAYOUT_INVALID_PARAMETERS = 1416, + D3D12_MESSAGE_ID_INVALID_BARRIER_ACCESS = 1417, + D3D12_MESSAGE_ID_COMMAND_LIST_DRAW_INSTANCE_COUNT_ZERO = 1418, + D3D12_MESSAGE_ID_DESCRIPTOR_HEAP_NOT_SET_BEFORE_ROOT_SIGNATURE_WITH_DIRECTLY_INDEXED_FLAG = 1419, + D3D12_MESSAGE_ID_DIFFERENT_DESCRIPTOR_HEAP_SET_AFTER_ROOT_SIGNATURE_WITH_DIRECTLY_INDEXED_FLAG = 1420, D3D12_MESSAGE_ID_D3D12_MESSAGES_END } D3D12_MESSAGE_ID; diff --git a/ThirdParty/AgilitySdk/include/d3d12video.h b/ThirdParty/AgilitySdk/include/d3d12video.h index d0d1e81b3..e38f12f06 100644 --- a/ThirdParty/AgilitySdk/include/d3d12video.h +++ b/ThirdParty/AgilitySdk/include/d3d12video.h @@ -7449,7 +7449,8 @@ enum D3D12_VIDEO_ENCODER_SUPPORT_FLAGS D3D12_VIDEO_ENCODER_SUPPORT_FLAG_SEQUENCE_GOP_RECONFIGURATION_AVAILABLE = 0x800, D3D12_VIDEO_ENCODER_SUPPORT_FLAG_MOTION_ESTIMATION_PRECISION_MODE_LIMIT_AVAILABLE = 0x1000, D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RATE_CONTROL_EXTENSION1_SUPPORT = 0x2000, - D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RATE_CONTROL_QUALITY_VS_SPEED_AVAILABLE = 0x4000 + D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RATE_CONTROL_QUALITY_VS_SPEED_AVAILABLE = 0x4000, + D3D12_VIDEO_ENCODER_SUPPORT_FLAG_READABLE_RECONSTRUCTED_PICTURE_LAYOUT_AVAILABLE = 0x8000 } D3D12_VIDEO_ENCODER_SUPPORT_FLAGS; DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_ENCODER_SUPPORT_FLAGS) diff --git a/ThirdParty/AgilitySdk/include/d3d12video.idl b/ThirdParty/AgilitySdk/include/d3d12video.idl index 270fe12a2..6e3fba3ae 100644 --- a/ThirdParty/AgilitySdk/include/d3d12video.idl +++ b/ThirdParty/AgilitySdk/include/d3d12video.idl @@ -95,7 +95,6 @@ typedef enum D3D12_FEATURE_VIDEO D3D12_FEATURE_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_CONFIG = 46, D3D12_FEATURE_VIDEO_ENCODER_SUPPORT1 = 47, - } D3D12_FEATURE_VIDEO; typedef enum D3D12_BITSTREAM_ENCRYPTION_TYPE @@ -2517,6 +2516,7 @@ typedef enum D3D12_VIDEO_ENCODER_SUPPORT_FLAGS D3D12_VIDEO_ENCODER_SUPPORT_FLAG_MOTION_ESTIMATION_PRECISION_MODE_LIMIT_AVAILABLE = 0x1000, D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RATE_CONTROL_EXTENSION1_SUPPORT = 0x2000, D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RATE_CONTROL_QUALITY_VS_SPEED_AVAILABLE = 0x4000, + D3D12_VIDEO_ENCODER_SUPPORT_FLAG_READABLE_RECONSTRUCTED_PICTURE_LAYOUT_AVAILABLE = 0x8000, } D3D12_VIDEO_ENCODER_SUPPORT_FLAGS; cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(D3D12_VIDEO_ENCODER_SUPPORT_FLAGS)") diff --git a/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_core.h b/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_core.h index a93ff5b5c..87814fb8e 100644 --- a/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_core.h +++ b/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_core.h @@ -1495,6 +1495,7 @@ inline const CD3DX12_RESOURCE_DESC1* D3DX12ConditionallyExpandAPIDesc( } } + //------------------------------------------------------------------------------------------------ struct CD3DX12_VIEW_INSTANCING_DESC : public D3D12_VIEW_INSTANCING_DESC { @@ -1532,4 +1533,5 @@ struct CD3DX12_RT_FORMAT_ARRAY : public D3D12_RT_FORMAT_ARRAY memcpy(RTFormats, pFormats, sizeof(RTFormats)); // assumes ARRAY_SIZE(pFormats) == ARRAY_SIZE(RTFormats) } -}; \ No newline at end of file +}; + diff --git a/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_pipeline_state_stream.h b/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_pipeline_state_stream.h index 5591a9329..a3ee813c6 100644 --- a/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_pipeline_state_stream.h +++ b/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_pipeline_state_stream.h @@ -11,8 +11,8 @@ #error D3DX12 requires C++ #endif -#include "d3d12.h" #include "d3dx12_default.h" +#include "d3d12.h" #include "d3dx12_core.h" //------------------------------------------------------------------------------------------------ @@ -1494,3 +1494,4 @@ inline HRESULT D3DX12ParsePipelineStream(const D3D12_PIPELINE_STATE_STREAM_DESC& return S_OK; } + diff --git a/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_resource_helpers.h b/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_resource_helpers.h index 902ec0cd6..c0c540c52 100644 --- a/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_resource_helpers.h +++ b/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_resource_helpers.h @@ -11,9 +11,9 @@ #error D3DX12 requires C++ #endif +#include "d3dx12_property_format_table.h" #include "d3d12.h" #include "d3dx12_core.h" -#include "d3dx12_property_format_table.h" //------------------------------------------------------------------------------------------------ template inline void D3D12DecomposeSubresource( UINT Subresource, UINT MipLevels, UINT ArraySize, _Out_ T& MipSlice, _Out_ U& ArraySlice, _Out_ V& PlaneSlice ) noexcept diff --git a/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_state_object.h b/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_state_object.h index f74d25773..8f3456b6a 100644 --- a/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_state_object.h +++ b/ThirdParty/AgilitySdk/include/d3dx12/d3dx12_state_object.h @@ -11,8 +11,8 @@ #error D3DX12 requires C++ #endif -#include "d3d12.h" #include "d3dx12_default.h" +#include "d3d12.h" #include "d3dx12_core.h" //================================================================================================ @@ -2151,3 +2151,4 @@ class CD3DX12_WORK_GRAPH_SUBOBJECT #undef D3DX12_COM_PTR #undef D3DX12_COM_PTR_GET #undef D3DX12_COM_PTR_ADDRESSOF +