diff --git a/framework/decode/CMakeLists.txt b/framework/decode/CMakeLists.txt index 00840de1e4..8e20921c74 100644 --- a/framework/decode/CMakeLists.txt +++ b/framework/decode/CMakeLists.txt @@ -56,6 +56,7 @@ target_sources(gfxrecon_decode ${CMAKE_CURRENT_LIST_DIR}/info_consumer.h ${CMAKE_CURRENT_LIST_DIR}/info_decoder.h ${CMAKE_CURRENT_LIST_DIR}/info_decoder.cpp + $<$:${CMAKE_CURRENT_LIST_DIR}/dx_feature_data_decoder.h> $<$:${CMAKE_CURRENT_LIST_DIR}/dx_replay_options.h> $<$:${CMAKE_CURRENT_LIST_DIR}/dx12_optimize_options.h> $<$:${CMAKE_CURRENT_LIST_DIR}/dx12_object_info.h> diff --git a/framework/decode/custom_dx12_struct_decoders.cpp b/framework/decode/custom_dx12_struct_decoders.cpp index fde7243cfe..525578f09c 100644 --- a/framework/decode/custom_dx12_struct_decoders.cpp +++ b/framework/decode/custom_dx12_struct_decoders.cpp @@ -1,5 +1,6 @@ /* ** Copyright (c) 2021 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -1207,5 +1208,589 @@ size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D12_SAM return bytes_read; } +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_SUBRESOURCE_DATA* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_SUBRESOURCE_DATA* value = wrapper->decoded_value; + + bytes_read += wrapper->pSysMem.DecodeVoid((buffer + bytes_read), (buffer_size - bytes_read)); + value->pSysMem = wrapper->pSysMem.GetPointer(); + bytes_read += + ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SysMemPitch)); + bytes_read += + ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SysMemSlicePitch)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BUFFER_SRV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_BUFFER_SRV* value = wrapper->decoded_value; + + bytes_read += + ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstElement)); + bytes_read += + ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumElements)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_SHADER_RESOURCE_VIEW_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + bytes_read += + ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ViewDimension)); + + switch (value->ViewDimension) + { + case D3D11_SRV_DIMENSION_BUFFER: + wrapper->Buffer = DecodeAllocator::Allocate(); + wrapper->Buffer->decoded_value = &(value->Buffer); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Buffer); + break; + case D3D11_SRV_DIMENSION_TEXTURE1D: + wrapper->Texture1D = DecodeAllocator::Allocate(); + wrapper->Texture1D->decoded_value = &(value->Texture1D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture1D); + break; + case D3D11_SRV_DIMENSION_TEXTURE1DARRAY: + wrapper->Texture1DArray = DecodeAllocator::Allocate(); + wrapper->Texture1DArray->decoded_value = &(value->Texture1DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture1DArray); + break; + case D3D11_SRV_DIMENSION_TEXTURE2D: + wrapper->Texture2D = DecodeAllocator::Allocate(); + wrapper->Texture2D->decoded_value = &(value->Texture2D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2D); + break; + case D3D11_SRV_DIMENSION_TEXTURE2DARRAY: + wrapper->Texture2DArray = DecodeAllocator::Allocate(); + wrapper->Texture2DArray->decoded_value = &(value->Texture2DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DArray); + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMS: + wrapper->Texture2DMS = DecodeAllocator::Allocate(); + wrapper->Texture2DMS->decoded_value = &(value->Texture2DMS); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DMS); + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY: + wrapper->Texture2DMSArray = DecodeAllocator::Allocate(); + wrapper->Texture2DMSArray->decoded_value = &(value->Texture2DMSArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DMSArray); + break; + case D3D11_SRV_DIMENSION_TEXTURE3D: + wrapper->Texture3D = DecodeAllocator::Allocate(); + wrapper->Texture3D->decoded_value = &(value->Texture3D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture3D); + break; + case D3D11_SRV_DIMENSION_TEXTURECUBE: + wrapper->TextureCube = DecodeAllocator::Allocate(); + wrapper->TextureCube->decoded_value = &(value->TextureCube); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->TextureCube); + break; + case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY: + wrapper->TextureCubeArray = DecodeAllocator::Allocate(); + wrapper->TextureCubeArray->decoded_value = &(value->TextureCubeArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->TextureCubeArray); + break; + case D3D11_SRV_DIMENSION_BUFFEREX: + wrapper->BufferEx = DecodeAllocator::Allocate(); + wrapper->BufferEx->decoded_value = &(value->BufferEx); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->BufferEx); + break; + default: + break; + } + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BUFFER_RTV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_BUFFER_RTV* value = wrapper->decoded_value; + + bytes_read += + ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstElement)); + bytes_read += + ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumElements)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_UNORDERED_ACCESS_VIEW_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + bytes_read += + ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ViewDimension)); + + switch (value->ViewDimension) + { + case D3D11_UAV_DIMENSION_BUFFER: + wrapper->Buffer = DecodeAllocator::Allocate(); + wrapper->Buffer->decoded_value = &(value->Buffer); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Buffer); + break; + case D3D11_UAV_DIMENSION_TEXTURE1D: + wrapper->Texture1D = DecodeAllocator::Allocate(); + wrapper->Texture1D->decoded_value = &(value->Texture1D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture1D); + break; + case D3D11_UAV_DIMENSION_TEXTURE1DARRAY: + wrapper->Texture1DArray = DecodeAllocator::Allocate(); + wrapper->Texture1DArray->decoded_value = &(value->Texture1DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture1DArray); + break; + case D3D11_UAV_DIMENSION_TEXTURE2D: + wrapper->Texture2D = DecodeAllocator::Allocate(); + wrapper->Texture2D->decoded_value = &(value->Texture2D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2D); + break; + case D3D11_UAV_DIMENSION_TEXTURE2DARRAY: + wrapper->Texture2DArray = DecodeAllocator::Allocate(); + wrapper->Texture2DArray->decoded_value = &(value->Texture2DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DArray); + break; + case D3D11_UAV_DIMENSION_TEXTURE3D: + wrapper->Texture3D = DecodeAllocator::Allocate(); + wrapper->Texture3D->decoded_value = &(value->Texture3D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture3D); + break; + default: + break; + } + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RENDER_TARGET_VIEW_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_RENDER_TARGET_VIEW_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + bytes_read += + ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ViewDimension)); + + switch (value->ViewDimension) + { + case D3D11_RTV_DIMENSION_BUFFER: + wrapper->Buffer = DecodeAllocator::Allocate(); + wrapper->Buffer->decoded_value = &(value->Buffer); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Buffer); + break; + case D3D11_RTV_DIMENSION_TEXTURE1D: + wrapper->Texture1D = DecodeAllocator::Allocate(); + wrapper->Texture1D->decoded_value = &(value->Texture1D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture1D); + break; + case D3D11_RTV_DIMENSION_TEXTURE1DARRAY: + wrapper->Texture1DArray = DecodeAllocator::Allocate(); + wrapper->Texture1DArray->decoded_value = &(value->Texture1DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture1DArray); + break; + case D3D11_RTV_DIMENSION_TEXTURE2D: + wrapper->Texture2D = DecodeAllocator::Allocate(); + wrapper->Texture2D->decoded_value = &(value->Texture2D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2D); + break; + case D3D11_RTV_DIMENSION_TEXTURE2DARRAY: + wrapper->Texture2DArray = DecodeAllocator::Allocate(); + wrapper->Texture2DArray->decoded_value = &(value->Texture2DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DArray); + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMS: + wrapper->Texture2DMS = DecodeAllocator::Allocate(); + wrapper->Texture2DMS->decoded_value = &(value->Texture2DMS); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DMS); + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY: + wrapper->Texture2DMSArray = DecodeAllocator::Allocate(); + wrapper->Texture2DMSArray->decoded_value = &(value->Texture2DMSArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DMSArray); + break; + case D3D11_RTV_DIMENSION_TEXTURE3D: + wrapper->Texture3D = DecodeAllocator::Allocate(); + wrapper->Texture3D->decoded_value = &(value->Texture3D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture3D); + break; + default: + break; + } + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_DEPTH_STENCIL_VIEW_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_DEPTH_STENCIL_VIEW_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + bytes_read += + ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ViewDimension)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Flags)); + + switch (value->ViewDimension) + { + case D3D11_DSV_DIMENSION_TEXTURE1D: + wrapper->Texture1D = DecodeAllocator::Allocate(); + wrapper->Texture1D->decoded_value = &(value->Texture1D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture1D); + break; + case D3D11_DSV_DIMENSION_TEXTURE1DARRAY: + wrapper->Texture1DArray = DecodeAllocator::Allocate(); + wrapper->Texture1DArray->decoded_value = &(value->Texture1DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture1DArray); + break; + case D3D11_DSV_DIMENSION_TEXTURE2D: + wrapper->Texture2D = DecodeAllocator::Allocate(); + wrapper->Texture2D->decoded_value = &(value->Texture2D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2D); + break; + case D3D11_DSV_DIMENSION_TEXTURE2DARRAY: + wrapper->Texture2DArray = DecodeAllocator::Allocate(); + wrapper->Texture2DArray->decoded_value = &(value->Texture2DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DArray); + break; + case D3D11_DSV_DIMENSION_TEXTURE2DMS: + wrapper->Texture2DMS = DecodeAllocator::Allocate(); + wrapper->Texture2DMS->decoded_value = &(value->Texture2DMS); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DMS); + break; + case D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY: + wrapper->Texture2DMSArray = DecodeAllocator::Allocate(); + wrapper->Texture2DMSArray->decoded_value = &(value->Texture2DMSArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DMSArray); + break; + default: + break; + } + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_SHADER_RESOURCE_VIEW_DESC1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + bytes_read += + ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ViewDimension)); + + switch (value->ViewDimension) + { + case D3D11_SRV_DIMENSION_BUFFER: + wrapper->Buffer = DecodeAllocator::Allocate(); + wrapper->Buffer->decoded_value = &(value->Buffer); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Buffer); + break; + case D3D11_SRV_DIMENSION_TEXTURE1D: + wrapper->Texture1D = DecodeAllocator::Allocate(); + wrapper->Texture1D->decoded_value = &(value->Texture1D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture1D); + break; + case D3D11_SRV_DIMENSION_TEXTURE1DARRAY: + wrapper->Texture1DArray = DecodeAllocator::Allocate(); + wrapper->Texture1DArray->decoded_value = &(value->Texture1DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture1DArray); + break; + case D3D11_SRV_DIMENSION_TEXTURE2D: + wrapper->Texture2D = DecodeAllocator::Allocate(); + wrapper->Texture2D->decoded_value = &(value->Texture2D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2D); + break; + case D3D11_SRV_DIMENSION_TEXTURE2DARRAY: + wrapper->Texture2DArray = DecodeAllocator::Allocate(); + wrapper->Texture2DArray->decoded_value = &(value->Texture2DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DArray); + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMS: + wrapper->Texture2DMS = DecodeAllocator::Allocate(); + wrapper->Texture2DMS->decoded_value = &(value->Texture2DMS); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DMS); + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY: + wrapper->Texture2DMSArray = DecodeAllocator::Allocate(); + wrapper->Texture2DMSArray->decoded_value = &(value->Texture2DMSArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DMSArray); + break; + case D3D11_SRV_DIMENSION_TEXTURE3D: + wrapper->Texture3D = DecodeAllocator::Allocate(); + wrapper->Texture3D->decoded_value = &(value->Texture3D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture3D); + break; + case D3D11_SRV_DIMENSION_TEXTURECUBE: + wrapper->TextureCube = DecodeAllocator::Allocate(); + wrapper->TextureCube->decoded_value = &(value->TextureCube); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->TextureCube); + break; + case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY: + wrapper->TextureCubeArray = DecodeAllocator::Allocate(); + wrapper->TextureCubeArray->decoded_value = &(value->TextureCubeArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->TextureCubeArray); + break; + case D3D11_SRV_DIMENSION_BUFFEREX: + wrapper->BufferEx = DecodeAllocator::Allocate(); + wrapper->BufferEx->decoded_value = &(value->BufferEx); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->BufferEx); + break; + default: + break; + } + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_UNORDERED_ACCESS_VIEW_DESC1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + bytes_read += + ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ViewDimension)); + + switch (value->ViewDimension) + { + case D3D11_UAV_DIMENSION_BUFFER: + wrapper->Buffer = DecodeAllocator::Allocate(); + wrapper->Buffer->decoded_value = &(value->Buffer); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Buffer); + break; + case D3D11_UAV_DIMENSION_TEXTURE1D: + wrapper->Texture1D = DecodeAllocator::Allocate(); + wrapper->Texture1D->decoded_value = &(value->Texture1D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture1D); + break; + case D3D11_UAV_DIMENSION_TEXTURE1DARRAY: + wrapper->Texture1DArray = DecodeAllocator::Allocate(); + wrapper->Texture1DArray->decoded_value = &(value->Texture1DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture1DArray); + break; + case D3D11_UAV_DIMENSION_TEXTURE2D: + wrapper->Texture2D = DecodeAllocator::Allocate(); + wrapper->Texture2D->decoded_value = &(value->Texture2D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2D); + break; + case D3D11_UAV_DIMENSION_TEXTURE2DARRAY: + wrapper->Texture2DArray = DecodeAllocator::Allocate(); + wrapper->Texture2DArray->decoded_value = &(value->Texture2DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DArray); + break; + case D3D11_UAV_DIMENSION_TEXTURE3D: + wrapper->Texture3D = DecodeAllocator::Allocate(); + wrapper->Texture3D->decoded_value = &(value->Texture3D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture3D); + break; + default: + break; + } + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RENDER_TARGET_VIEW_DESC1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_RENDER_TARGET_VIEW_DESC1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + bytes_read += + ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ViewDimension)); + + switch (value->ViewDimension) + { + case D3D11_RTV_DIMENSION_BUFFER: + wrapper->Buffer = DecodeAllocator::Allocate(); + wrapper->Buffer->decoded_value = &(value->Buffer); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Buffer); + break; + case D3D11_RTV_DIMENSION_TEXTURE1D: + wrapper->Texture1D = DecodeAllocator::Allocate(); + wrapper->Texture1D->decoded_value = &(value->Texture1D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture1D); + break; + case D3D11_RTV_DIMENSION_TEXTURE1DARRAY: + wrapper->Texture1DArray = DecodeAllocator::Allocate(); + wrapper->Texture1DArray->decoded_value = &(value->Texture1DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture1DArray); + break; + case D3D11_RTV_DIMENSION_TEXTURE2D: + wrapper->Texture2D = DecodeAllocator::Allocate(); + wrapper->Texture2D->decoded_value = &(value->Texture2D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2D); + break; + case D3D11_RTV_DIMENSION_TEXTURE2DARRAY: + wrapper->Texture2DArray = DecodeAllocator::Allocate(); + wrapper->Texture2DArray->decoded_value = &(value->Texture2DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DArray); + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMS: + wrapper->Texture2DMS = DecodeAllocator::Allocate(); + wrapper->Texture2DMS->decoded_value = &(value->Texture2DMS); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DMS); + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY: + wrapper->Texture2DMSArray = DecodeAllocator::Allocate(); + wrapper->Texture2DMSArray->decoded_value = &(value->Texture2DMSArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DMSArray); + break; + case D3D11_RTV_DIMENSION_TEXTURE3D: + wrapper->Texture3D = DecodeAllocator::Allocate(); + wrapper->Texture3D->decoded_value = &(value->Texture3D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture3D); + break; + default: + break; + } + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_COLOR* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_COLOR* value = wrapper->decoded_value; + + // D3D11_VIDEO_COLOR contains an anonymous union consisting of two structures with identical layouts, so we just + // need to decode one of them. + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &value->RGBA.R); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &value->RGBA.G); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &value->RGBA.B); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &value->RGBA.A); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_PROTECTION_FLAGS* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_PROTECTION_FLAGS* value = wrapper->decoded_value; + + uint32_t flags = 0; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &flags); + value->Flags.ProtectionEnabled = flags; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &flags); + value->Flags.OverlayOrFullscreenRequired = flags; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &flags); + value->Flags.Reserved = flags; + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* value = wrapper->decoded_value; + + wrapper->DecodeProfile = DecodeAllocator::Allocate(); + wrapper->DecodeProfile->decoded_value = &(value->DecodeProfile); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->DecodeProfile); + bytes_read += + ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ViewDimension)); + + switch (value->ViewDimension) + { + case D3D11_VDOV_DIMENSION_TEXTURE2D: + wrapper->Texture2D = DecodeAllocator::Allocate(); + wrapper->Texture2D->decoded_value = &(value->Texture2D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2D); + break; + default: + break; + } + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FourCC)); + bytes_read += + ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ViewDimension)); + + switch (value->ViewDimension) + { + case D3D11_VPIV_DIMENSION_TEXTURE2D: + wrapper->Texture2D = DecodeAllocator::Allocate(); + wrapper->Texture2D->decoded_value = &(value->Texture2D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2D); + break; + default: + break; + } + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* value = wrapper->decoded_value; + + bytes_read += + ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ViewDimension)); + + switch (value->ViewDimension) + { + case D3D11_VPOV_DIMENSION_TEXTURE2D: + wrapper->Texture2D = DecodeAllocator::Allocate(); + wrapper->Texture2D->decoded_value = &(value->Texture2D); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2D); + break; + case D3D11_VPOV_DIMENSION_TEXTURE2DARRAY: + wrapper->Texture2DArray = DecodeAllocator::Allocate(); + wrapper->Texture2DArray->decoded_value = &(value->Texture2DArray); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Texture2DArray); + break; + default: + break; + } + + return bytes_read; +} + GFXRECON_END_NAMESPACE(decode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/decode/custom_dx12_struct_decoders.h b/framework/decode/custom_dx12_struct_decoders.h index 6e255fc7ad..3ab73abdf3 100644 --- a/framework/decode/custom_dx12_struct_decoders.h +++ b/framework/decode/custom_dx12_struct_decoders.h @@ -1,5 +1,6 @@ /* ** Copyright (c) 2021 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -31,6 +32,7 @@ #include "util/defines.h" #include +#include GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(decode) @@ -298,6 +300,173 @@ struct Decoded_D3D12_SAMPLER_DESC2 PointerDecoder FloatBorderColor; }; +struct Decoded_D3D11_SUBRESOURCE_DATA +{ + using struct_type = D3D11_SUBRESOURCE_DATA; + + D3D11_SUBRESOURCE_DATA* decoded_value{ nullptr }; + PointerDecoder pSysMem; +}; + +struct Decoded_D3D11_BUFFER_SRV +{ + using struct_type = D3D11_BUFFER_SRV; + + D3D11_BUFFER_SRV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC +{ + using struct_type = D3D11_SHADER_RESOURCE_VIEW_DESC; + + D3D11_SHADER_RESOURCE_VIEW_DESC* decoded_value{ nullptr }; + Decoded_D3D11_BUFFER_SRV* Buffer{ nullptr }; + Decoded_D3D11_TEX1D_SRV* Texture1D{ nullptr }; + Decoded_D3D11_TEX1D_ARRAY_SRV* Texture1DArray{ nullptr }; + Decoded_D3D11_TEX2D_SRV* Texture2D{ nullptr }; + Decoded_D3D11_TEX2D_ARRAY_SRV* Texture2DArray{ nullptr }; + Decoded_D3D11_TEX2DMS_SRV* Texture2DMS{ nullptr }; + Decoded_D3D11_TEX2DMS_ARRAY_SRV* Texture2DMSArray{ nullptr }; + Decoded_D3D11_TEX3D_SRV* Texture3D{ nullptr }; + Decoded_D3D11_TEXCUBE_SRV* TextureCube{ nullptr }; + Decoded_D3D11_TEXCUBE_ARRAY_SRV* TextureCubeArray{ nullptr }; + Decoded_D3D11_BUFFEREX_SRV* BufferEx{ nullptr }; +}; + +struct Decoded_D3D11_BUFFER_RTV +{ + using struct_type = D3D11_BUFFER_RTV; + + D3D11_BUFFER_RTV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC +{ + using struct_type = D3D11_UNORDERED_ACCESS_VIEW_DESC; + + D3D11_UNORDERED_ACCESS_VIEW_DESC* decoded_value{ nullptr }; + Decoded_D3D11_BUFFER_UAV* Buffer{ nullptr }; + Decoded_D3D11_TEX1D_UAV* Texture1D{ nullptr }; + Decoded_D3D11_TEX1D_ARRAY_UAV* Texture1DArray{ nullptr }; + Decoded_D3D11_TEX2D_UAV* Texture2D{ nullptr }; + Decoded_D3D11_TEX2D_ARRAY_UAV* Texture2DArray{ nullptr }; + Decoded_D3D11_TEX3D_UAV* Texture3D{ nullptr }; +}; + +struct Decoded_D3D11_RENDER_TARGET_VIEW_DESC +{ + using struct_type = D3D11_RENDER_TARGET_VIEW_DESC; + + D3D11_RENDER_TARGET_VIEW_DESC* decoded_value{ nullptr }; + Decoded_D3D11_BUFFER_RTV* Buffer{ nullptr }; + Decoded_D3D11_TEX1D_RTV* Texture1D{ nullptr }; + Decoded_D3D11_TEX1D_ARRAY_RTV* Texture1DArray{ nullptr }; + Decoded_D3D11_TEX2D_RTV* Texture2D{ nullptr }; + Decoded_D3D11_TEX2D_ARRAY_RTV* Texture2DArray{ nullptr }; + Decoded_D3D11_TEX2DMS_RTV* Texture2DMS{ nullptr }; + Decoded_D3D11_TEX2DMS_ARRAY_RTV* Texture2DMSArray{ nullptr }; + Decoded_D3D11_TEX3D_RTV* Texture3D{ nullptr }; +}; + +struct Decoded_D3D11_DEPTH_STENCIL_VIEW_DESC +{ + using struct_type = D3D11_DEPTH_STENCIL_VIEW_DESC; + + D3D11_DEPTH_STENCIL_VIEW_DESC* decoded_value{ nullptr }; + Decoded_D3D11_TEX1D_DSV* Texture1D{ nullptr }; + Decoded_D3D11_TEX1D_ARRAY_DSV* Texture1DArray{ nullptr }; + Decoded_D3D11_TEX2D_DSV* Texture2D{ nullptr }; + Decoded_D3D11_TEX2D_ARRAY_DSV* Texture2DArray{ nullptr }; + Decoded_D3D11_TEX2DMS_DSV* Texture2DMS{ nullptr }; + Decoded_D3D11_TEX2DMS_ARRAY_DSV* Texture2DMSArray{ nullptr }; +}; + +struct Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC1 +{ + using struct_type = D3D11_SHADER_RESOURCE_VIEW_DESC1; + + D3D11_SHADER_RESOURCE_VIEW_DESC1* decoded_value{ nullptr }; + Decoded_D3D11_BUFFER_SRV* Buffer{ nullptr }; + Decoded_D3D11_TEX1D_SRV* Texture1D{ nullptr }; + Decoded_D3D11_TEX1D_ARRAY_SRV* Texture1DArray{ nullptr }; + Decoded_D3D11_TEX2D_SRV1* Texture2D{ nullptr }; + Decoded_D3D11_TEX2D_ARRAY_SRV1* Texture2DArray{ nullptr }; + Decoded_D3D11_TEX2DMS_SRV* Texture2DMS{ nullptr }; + Decoded_D3D11_TEX2DMS_ARRAY_SRV* Texture2DMSArray{ nullptr }; + Decoded_D3D11_TEX3D_SRV* Texture3D{ nullptr }; + Decoded_D3D11_TEXCUBE_SRV* TextureCube{ nullptr }; + Decoded_D3D11_TEXCUBE_ARRAY_SRV* TextureCubeArray{ nullptr }; + Decoded_D3D11_BUFFEREX_SRV* BufferEx{ nullptr }; +}; + +struct Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC1 +{ + using struct_type = D3D11_UNORDERED_ACCESS_VIEW_DESC1; + + D3D11_UNORDERED_ACCESS_VIEW_DESC1* decoded_value{ nullptr }; + Decoded_D3D11_BUFFER_UAV* Buffer{ nullptr }; + Decoded_D3D11_TEX1D_UAV* Texture1D{ nullptr }; + Decoded_D3D11_TEX1D_ARRAY_UAV* Texture1DArray{ nullptr }; + Decoded_D3D11_TEX2D_UAV1* Texture2D{ nullptr }; + Decoded_D3D11_TEX2D_ARRAY_UAV1* Texture2DArray{ nullptr }; + Decoded_D3D11_TEX3D_UAV* Texture3D{ nullptr }; +}; + +struct Decoded_D3D11_RENDER_TARGET_VIEW_DESC1 +{ + using struct_type = D3D11_RENDER_TARGET_VIEW_DESC1; + + D3D11_RENDER_TARGET_VIEW_DESC1* decoded_value{ nullptr }; + Decoded_D3D11_BUFFER_RTV* Buffer{ nullptr }; + Decoded_D3D11_TEX1D_RTV* Texture1D{ nullptr }; + Decoded_D3D11_TEX1D_ARRAY_RTV* Texture1DArray{ nullptr }; + Decoded_D3D11_TEX2D_RTV1* Texture2D{ nullptr }; + Decoded_D3D11_TEX2D_ARRAY_RTV1* Texture2DArray{ nullptr }; + Decoded_D3D11_TEX2DMS_RTV* Texture2DMS{ nullptr }; + Decoded_D3D11_TEX2DMS_ARRAY_RTV* Texture2DMSArray{ nullptr }; + Decoded_D3D11_TEX3D_RTV* Texture3D{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_COLOR +{ + using struct_type = D3D11_VIDEO_COLOR; + + D3D11_VIDEO_COLOR* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_AUTHENTICATED_PROTECTION_FLAGS +{ + using struct_type = D3D11_AUTHENTICATED_PROTECTION_FLAGS; + + D3D11_AUTHENTICATED_PROTECTION_FLAGS* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC +{ + using struct_type = D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC; + + D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* decoded_value{ nullptr }; + Decoded_GUID* DecodeProfile{ nullptr }; + Decoded_D3D11_TEX2D_VDOV* Texture2D{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC +{ + using struct_type = D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC; + + D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* decoded_value{ nullptr }; + Decoded_D3D11_TEX2D_VPIV* Texture2D{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC +{ + using struct_type = D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC; + + D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* decoded_value{ nullptr }; + Decoded_D3D11_TEX2D_VPOV* Texture2D{ nullptr }; + Decoded_D3D11_TEX2D_ARRAY_VPOV* Texture2DArray{ nullptr }; +}; + GFXRECON_END_NAMESPACE(decode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/decode/custom_dx12_struct_decoders_forward.h b/framework/decode/custom_dx12_struct_decoders_forward.h index 9c7200a5cf..f73943ca8d 100644 --- a/framework/decode/custom_dx12_struct_decoders_forward.h +++ b/framework/decode/custom_dx12_struct_decoders_forward.h @@ -1,5 +1,6 @@ /* ** Copyright (c) 2021 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -51,6 +52,21 @@ struct Decoded_D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS; struct Decoded_D3D12_VERSIONED_DEVICE_REMOVED_EXTENDED_DATA; struct Decoded_D3D12_RENDER_PASS_BEGINNING_ACCESS; struct Decoded_D3D12_RENDER_PASS_ENDING_ACCESS; +struct Decoded_D3D11_SUBRESOURCE_DATA; +struct Decoded_D3D11_BUFFER_SRV; +struct Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC; +struct Decoded_D3D11_BUFFER_RTV; +struct Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC; +struct Decoded_D3D11_RENDER_TARGET_VIEW_DESC; +struct Decoded_D3D11_DEPTH_STENCIL_VIEW_DESC; +struct Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC1; +struct Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC1; +struct Decoded_D3D11_RENDER_TARGET_VIEW_DESC1; +struct Decoded_D3D11_VIDEO_COLOR; +struct Decoded_D3D11_AUTHENTICATED_PROTECTION_FLAGS; +struct Decoded_D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC; +struct Decoded_D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC; +struct Decoded_D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC; size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D12_CLEAR_VALUE* wrapper); size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D12_RESOURCE_BARRIER* wrapper); @@ -71,6 +87,20 @@ size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D12_VERSIONED_DEVICE_REMOVED_EXTENDED_DATA* wrapper); size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D12_RENDER_PASS_BEGINNING_ACCESS* wrapper); size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D12_RENDER_PASS_ENDING_ACCESS* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_SUBRESOURCE_DATA* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BUFFER_SRV* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RENDER_TARGET_VIEW_DESC* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_DEPTH_STENCIL_VIEW_DESC* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC1* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC1* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RENDER_TARGET_VIEW_DESC1* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_COLOR* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_PROTECTION_FLAGS* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* wrapper); // Platform types. struct Decoded_LARGE_INTEGER; diff --git a/framework/decode/decode_api_detection.cpp b/framework/decode/decode_api_detection.cpp index c72f81ee2f..c16bf15c13 100644 --- a/framework/decode/decode_api_detection.cpp +++ b/framework/decode/decode_api_detection.cpp @@ -1,5 +1,6 @@ /* ** Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -29,7 +30,11 @@ GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(decode) -bool DetectAPIs(const std::string& input_filename, bool& dx12_detected, bool& vulkan_detected, bool no_block_limit) +bool DetectAPIs(const std::string& input_filename, + bool& dx11_detected, + bool& dx12_detected, + bool& vulkan_detected, + bool no_block_limit) { dx12_detected = false; vulkan_detected = false; @@ -61,6 +66,11 @@ bool DetectAPIs(const std::string& input_filename, bool& dx12_detected, bool& vu #endif file_processor.ProcessAllFrames(); #if defined(D3D12_SUPPORT) + if (dx12_detection_consumer.WasD3D11APIDetected()) + { + dx11_detected = true; + } + if (dx12_detection_consumer.WasD3D12APIDetected()) { dx12_detected = true; @@ -79,7 +89,7 @@ bool DetectAPIs(const std::string& input_filename, bool& dx12_detected, bool& vu vulkan_detected = true; } } - return dx12_detected || vulkan_detected; + return dx11_detected || dx12_detected || vulkan_detected; } GFXRECON_END_NAMESPACE(decode) diff --git a/framework/decode/decode_api_detection.h b/framework/decode/decode_api_detection.h index f1e463d942..6468a58558 100644 --- a/framework/decode/decode_api_detection.h +++ b/framework/decode/decode_api_detection.h @@ -1,6 +1,7 @@ /* ** Copyright (c) 2022 LunarG, Inc. ** Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -38,6 +39,7 @@ GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(decode) bool DetectAPIs(const std::string& input_filename, + bool& dx11_detected, bool& dx12_detected, bool& vulkan_detected, bool no_block_limit = false); diff --git a/framework/decode/decode_json_util.h b/framework/decode/decode_json_util.h index a045f77c66..8410937945 100644 --- a/framework/decode/decode_json_util.h +++ b/framework/decode/decode_json_util.h @@ -1,6 +1,7 @@ /* ** Copyright (c) 2022-2023 LunarG, Inc. ** Copyright (c) 2023 Valve Corporation +** Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -203,6 +204,30 @@ void HandleToJson(nlohmann::ordered_json& jdata, } } +template +void HandleToJson(nlohmann::ordered_json& jdata, + const HandlePointerDecoder& data, + const util::JsonOptions& options = util::JsonOptions()) +{ + if (data.GetPointer()) + { + const auto decoded_value = data.GetPointer(); + const auto length = data.GetLength(); + + if (data.IsArray()) + { + for (size_t i = 0; i < length; ++i) + { + HandleToJson(jdata[i], decoded_value[i], options); + } + } + else if (length == 1) + { + HandleToJson(jdata, *decoded_value, options); + } + } +} + /// @brief Thunk to HandleToJson to allow the standard FieldToJson name to be /// used for pointers and arrays where the type of the HandlePointerDecoder /// allows the correct version to be resolved. @@ -214,6 +239,14 @@ void FieldToJson(nlohmann::ordered_json& jdata, HandleToJson(jdata, data, options); } +template +void FieldToJson(nlohmann::ordered_json& jdata, + const HandlePointerDecoder& data, + const util::JsonOptions& options = util::JsonOptions()) +{ + HandleToJson(jdata, data, options); +} + // Same as array FieldToJson above but converts elements pointed-to to hexadecimal template void FieldToJsonAsHex(nlohmann::ordered_json& jdata, diff --git a/framework/decode/dx12_consumer_base.h b/framework/decode/dx12_consumer_base.h index 119193c5e5..f014828c4e 100644 --- a/framework/decode/dx12_consumer_base.h +++ b/framework/decode/dx12_consumer_base.h @@ -1,6 +1,7 @@ /* ** Copyright (c) 2023 Valve Corporation ** Copyright (c) 2021, 2023 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -27,11 +28,14 @@ #include "decode/metadata_consumer_base.h" #include "decode/marker_consumer_base.h" #include "decode/api_decoder.h" +#include "decode/dx_feature_data_decoder.h" #include "decode/handle_pointer_decoder.h" #include "decode/struct_pointer_decoder.h" #include "format/api_call_id.h" #include +#include +#include #include GFXRECON_BEGIN_NAMESPACE(gfxrecon) @@ -57,20 +61,18 @@ class Dx12ConsumerBase : public MetadataConsumerBase, public MarkerConsumerBase virtual void ProcessDx12RuntimeInfo(const format::Dx12RuntimeInfoCommandHeader& runtime_info_header) {} - virtual void Process_ID3D12Device_CheckFeatureSupport(format::HandleId object_id, - HRESULT original_result, - D3D12_FEATURE feature, - const void* capture_feature_data, - void* replay_feature_data, - UINT feature_data_size) + virtual void Process_ID3D12Device_CheckFeatureSupport(format::HandleId object_id, + HRESULT original_result, + D3D12_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) {} - virtual void Process_IDXGIFactory5_CheckFeatureSupport(format::HandleId object_id, - HRESULT original_result, - DXGI_FEATURE feature, - const void* capture_feature_data, - void* replay_feature_data, - UINT feature_data_size) + virtual void Process_IDXGIFactory5_CheckFeatureSupport(format::HandleId object_id, + HRESULT original_result, + DXGI_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) {} virtual void Process_ID3D12Resource_WriteToSubresource(format::HandleId object_id, @@ -85,6 +87,98 @@ class Dx12ConsumerBase : public MetadataConsumerBase, public MarkerConsumerBase virtual void ProcessSetEnvironmentVariablesCommand(format::SetEnvironmentVariablesCommand& header, const char* env_string) {}; + virtual void Process_ID3D11Device_CheckFeatureSupport(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) + {} + + virtual void Process_ID3D11Device_CreateBuffer(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppBuffer) + {} + + virtual void + Process_ID3D11Device_CreateTexture1D(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture1D) + {} + + virtual void + Process_ID3D11Device_CreateTexture2D(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture2D) + {} + + virtual void + Process_ID3D11Device_CreateTexture3D(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture3D) + {} + + virtual void Process_ID3D11DeviceContext_UpdateSubresource(const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) + {} + + virtual void Process_ID3D11DeviceContext1_UpdateSubresource1(const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch, + UINT CopyFlags) + {} + + virtual void + Process_ID3D11Device3_CreateTexture2D1(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture2D) + {} + + virtual void + Process_ID3D11Device3_CreateTexture3D1(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture3D) + {} + + virtual void Process_ID3D11Device3_WriteToSubresource(const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) + {} + virtual void SetCurrentBlockIndex(uint64_t block_index) override { block_index_ = block_index; } void SetCurrentApiCallId(format::ApiCallId api_call_id) { current_api_call_id_ = api_call_id; } diff --git a/framework/decode/dx12_decoder_base.cpp b/framework/decode/dx12_decoder_base.cpp index c84f9dbf7b..94564c1cd4 100644 --- a/framework/decode/dx12_decoder_base.cpp +++ b/framework/decode/dx12_decoder_base.cpp @@ -1,6 +1,7 @@ /* ** Copyright (c) 2021 LunarG, Inc. ** Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -547,14 +548,21 @@ size_t Dx12DecoderBase::Decode_IDXGIFactory5_CheckFeatureSupport(format::HandleI bytes_read += ValueDecoder::DecodeInt32Value( (parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + // NOTE: This value should have been encoded as a pointer, but because it was not we can emulate a buffer + // containing an encoded pointer, which can then be processed with a PointerDecoder. + int32_t pointer_buffer[] = { + format::PointerAttributes::kIsSingle | + format::PointerAttributes::kHasData, // Flags for non-null single value encoding with no address. + allow_tearing + }; + + DxFeatureDataPointerDecoder feature_data; + feature_data.DecodeInt32(reinterpret_cast(pointer_buffer), sizeof(pointer_buffer)); + for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory5_CheckFeatureSupport(object_id, - return_value, - feature, - static_cast(&allow_tearing), - static_cast(&allow_tearing), - feature_data_size); + consumer->Process_IDXGIFactory5_CheckFeatureSupport( + object_id, return_value, feature, &feature_data, feature_data_size); } } break; @@ -600,14 +608,391 @@ size_t Dx12DecoderBase::Decode_ID3D12Resource_WriteToSubresource(format::HandleI return bytes_read; } +size_t Dx12DecoderBase::Decode_ID3D11Device_CheckFeatureSupport(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size) +{ + size_t bytes_read = 0; + D3D11_FEATURE feature{}; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &feature); + + switch (feature) + { + case D3D11_FEATURE_THREADING: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_DOUBLES: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_FORMAT_SUPPORT: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_FORMAT_SUPPORT2: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_D3D11_OPTIONS: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_ARCHITECTURE_INFO: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_D3D9_OPTIONS: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_D3D9_SHADOW_SUPPORT: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_D3D11_OPTIONS1: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_MARKER_SUPPORT: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_D3D9_OPTIONS1: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_D3D11_OPTIONS2: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_D3D11_OPTIONS3: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_D3D11_OPTIONS4: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_SHADER_CACHE: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + case D3D11_FEATURE_D3D11_OPTIONS5: + bytes_read += DecodeCheckD3D11FeatureSupport( + call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + break; + // TODO: This requires code generated from the 10.0.22000.194 Windows SDK + // case D3D11_FEATURE_DISPLAYABLE: + // bytes_read += DecodeCheckD3D11FeatureSupport( + // call_info, object_id, feature, (parameter_buffer + bytes_read), (buffer_size - bytes_read)); + // break; + default: + GFXRECON_LOG_FATAL("Failed to decode ID3D11Device::CheckFeatureSupport pFeatureData parameter with " + "unrecognized D3D11_FEATURE type %d", + feature); + break; + } + + return bytes_read; +} + +size_t Dx12DecoderBase::Decode_ID3D11Device_CreateBuffer(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + StructPointerDecoder pInitialData; + HandlePointerDecoder ppBuffer; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pInitialData.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppBuffer.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += + ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D11Device_CreateBuffer( + call_info, object_id, return_value, &pDesc, &pInitialData, &ppBuffer); + } + + return bytes_read; +} + +size_t Dx12DecoderBase::Decode_ID3D11Device_CreateTexture1D(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + StructPointerDecoder pInitialData; + HandlePointerDecoder ppTexture1D; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pInitialData.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppTexture1D.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += + ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D11Device_CreateTexture1D( + call_info, object_id, return_value, &pDesc, &pInitialData, &ppTexture1D); + } + return bytes_read; +} + +size_t Dx12DecoderBase::Decode_ID3D11Device_CreateTexture2D(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + StructPointerDecoder pInitialData; + HandlePointerDecoder ppTexture2D; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pInitialData.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppTexture2D.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += + ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D11Device_CreateTexture2D( + call_info, object_id, return_value, &pDesc, &pInitialData, &ppTexture2D); + } + + return bytes_read; +} + +size_t Dx12DecoderBase::Decode_ID3D11Device_CreateTexture3D(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + StructPointerDecoder pInitialData; + HandlePointerDecoder ppTexture3D; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pInitialData.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppTexture3D.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += + ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D11Device_CreateTexture3D( + call_info, object_id, return_value, &pDesc, &pInitialData, &ppTexture3D); + } + + return bytes_read; +} + +size_t Dx12DecoderBase::Decode_ID3D11DeviceContext_UpdateSubresource(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDstResource; + UINT DstSubresource; + StructPointerDecoder pDstBox; + PointerDecoder pSrcData; + UINT SrcRowPitch; + UINT SrcDepthPitch; + + bytes_read += + ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); + bytes_read += + ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstSubresource); + bytes_read += pDstBox.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pSrcData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += + ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcRowPitch); + bytes_read += + ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcDepthPitch); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D11DeviceContext_UpdateSubresource( + call_info, object_id, pDstResource, DstSubresource, &pDstBox, &pSrcData, SrcRowPitch, SrcDepthPitch); + } + + return bytes_read; +} + +size_t Dx12DecoderBase::Decode_ID3D11DeviceContext1_UpdateSubresource1(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDstResource; + UINT DstSubresource; + StructPointerDecoder pDstBox; + PointerDecoder pSrcData; + UINT SrcRowPitch; + UINT SrcDepthPitch; + UINT CopyFlags; + + bytes_read += + ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); + bytes_read += + ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstSubresource); + bytes_read += pDstBox.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pSrcData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += + ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcRowPitch); + bytes_read += + ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcDepthPitch); + bytes_read += + ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CopyFlags); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D11DeviceContext1_UpdateSubresource1(call_info, + object_id, + pDstResource, + DstSubresource, + &pDstBox, + &pSrcData, + SrcRowPitch, + SrcDepthPitch, + CopyFlags); + } + + return bytes_read; +} + +size_t Dx12DecoderBase::Decode_ID3D11Device3_CreateTexture2D1(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + StructPointerDecoder pInitialData; + HandlePointerDecoder ppTexture2D; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pInitialData.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppTexture2D.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += + ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D11Device3_CreateTexture2D1( + call_info, object_id, return_value, &pDesc, &pInitialData, &ppTexture2D); + } + + return bytes_read; +} + +size_t Dx12DecoderBase::Decode_ID3D11Device3_CreateTexture3D1(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + StructPointerDecoder pInitialData; + HandlePointerDecoder ppTexture3D; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pInitialData.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppTexture3D.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += + ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D11Device3_CreateTexture3D1( + call_info, object_id, return_value, &pDesc, &pInitialData, &ppTexture3D); + } + + return bytes_read; +} + +size_t Dx12DecoderBase::Decode_ID3D11Device3_WriteToSubresource(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDstResource; + UINT DstSubresource; + StructPointerDecoder pDstBox; + PointerDecoder pSrcData; + UINT SrcRowPitch; + UINT SrcDepthPitch; + + bytes_read += + ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); + bytes_read += + ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstSubresource); + bytes_read += pDstBox.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pSrcData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += + ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcRowPitch); + bytes_read += + ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcDepthPitch); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D11Device3_WriteToSubresource( + call_info, object_id, pDstResource, DstSubresource, &pDstBox, &pSrcData, SrcRowPitch, SrcDepthPitch); + } + + return bytes_read; +} + void Dx12DecoderBase::DecodeMethodCall(format::ApiCallId call_id, format::HandleId object_id, - const ApiCallInfo& call_options, + const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { - GFXRECON_UNREFERENCED_PARAMETER(call_options); - switch (call_id) { case format::ApiCallId::ApiCall_ID3D12Device_CheckFeatureSupport: @@ -619,6 +1004,36 @@ void Dx12DecoderBase::DecodeMethodCall(format::ApiCallId call_id, case format::ApiCallId::ApiCall_ID3D12Resource_WriteToSubresource: Decode_ID3D12Resource_WriteToSubresource(object_id, parameter_buffer, buffer_size); break; + case format::ApiCallId::ApiCall_ID3D11Device_CheckFeatureSupport: + Decode_ID3D11Device_CheckFeatureSupport(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateBuffer: + Decode_ID3D11Device_CreateBuffer(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateTexture1D: + Decode_ID3D11Device_CreateTexture1D(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateTexture2D: + Decode_ID3D11Device_CreateTexture2D(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateTexture3D: + Decode_ID3D11Device_CreateTexture3D(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_UpdateSubresource: + Decode_ID3D11DeviceContext_UpdateSubresource(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_UpdateSubresource1: + Decode_ID3D11DeviceContext1_UpdateSubresource1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateTexture2D1: + Decode_ID3D11Device3_CreateTexture2D1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateTexture3D1: + Decode_ID3D11Device3_CreateTexture3D1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device3_WriteToSubresource: + Decode_ID3D11Device3_WriteToSubresource(object_id, call_info, parameter_buffer, buffer_size); + break; default: break; } diff --git a/framework/decode/dx12_decoder_base.h b/framework/decode/dx12_decoder_base.h index 63b0261b22..c49d65046c 100644 --- a/framework/decode/dx12_decoder_base.h +++ b/framework/decode/dx12_decoder_base.h @@ -1,5 +1,6 @@ /* ** Copyright (c) 2021 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -24,6 +25,7 @@ #define GFXRECON_DECODE_DX12_DECODER_BASE_H #include "decode/api_decoder.h" +#include "decode/dx_feature_data_decoder.h" #include "decode/struct_pointer_decoder.h" #include "generated/generated_dx12_consumer.h" #include "decoder_util.h" @@ -60,13 +62,16 @@ class Dx12DecoderBase : public ApiDecoder { auto family_id = format::GetApiCallFamily(call_id); return ((family_id == format::ApiFamilyId::ApiFamily_Dxgi) || - (family_id == format::ApiFamilyId::ApiFamily_D3D12)); + (family_id == format::ApiFamilyId::ApiFamily_D3D12) || + (family_id == format::ApiFamilyId::ApiFamily_D3D11) || + (family_id == format::ApiFamilyId::ApiFamily_D3D11On12)); } virtual bool SupportsMetaDataId(format::MetaDataId meta_data_id) override { format::ApiFamilyId api = format::GetMetaDataApi(meta_data_id); - return (api == format::ApiFamilyId::ApiFamily_Dxgi) || (api == format::ApiFamilyId::ApiFamily_D3D12); + return (api == format::ApiFamilyId::ApiFamily_Dxgi) || (api == format::ApiFamilyId::ApiFamily_D3D12) || + (api == format::ApiFamilyId::ApiFamily_D3D11); } virtual void DecodeFunctionCall(format::ApiCallId call_id, @@ -229,9 +234,9 @@ class Dx12DecoderBase : public ApiDecoder { size_t bytes_read = 0; - StructPointerDecoder feature_data; - UINT feature_data_size; - HRESULT return_value; + DxFeatureDataStructPointerDecoder feature_data; + UINT feature_data_size; + HRESULT return_value; bytes_read += feature_data.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeUInt32Value( @@ -239,16 +244,38 @@ class Dx12DecoderBase : public ApiDecoder bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); - auto* capture_data = feature_data.GetPointer(); - if (capture_data != nullptr) + for (auto consumer : GetConsumers()) { - feature_data.AllocateOutputData(1, *capture_data); + consumer->Process_ID3D12Device_CheckFeatureSupport( + object_id, return_value, feature, &feature_data, feature_data_size); } + return bytes_read; + } + + template + size_t DecodeCheckD3D11FeatureSupport(const ApiCallInfo& call_info, + format::HandleId object_id, + D3D11_FEATURE feature, + const uint8_t* parameter_buffer, + size_t buffer_size) + { + size_t bytes_read = 0; + + DxFeatureDataStructPointerDecoder feature_data; + UINT feature_data_size; + HRESULT return_value; + + bytes_read += feature_data.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value( + (parameter_buffer + bytes_read), (buffer_size - bytes_read), &feature_data_size); + bytes_read += + ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CheckFeatureSupport( - object_id, return_value, feature, capture_data, feature_data.GetOutputPointer(), feature_data_size); + consumer->Process_ID3D11Device_CheckFeatureSupport( + call_info, object_id, return_value, feature, &feature_data, feature_data_size); } return bytes_read; @@ -266,6 +293,56 @@ class Dx12DecoderBase : public ApiDecoder const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CheckFeatureSupport(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size); + + size_t Decode_ID3D11Device_CreateBuffer(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size); + + size_t Decode_ID3D11Device_CreateTexture1D(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size); + + size_t Decode_ID3D11Device_CreateTexture2D(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size); + + size_t Decode_ID3D11Device_CreateTexture3D(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size); + + size_t Decode_ID3D11DeviceContext_UpdateSubresource(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size); + + size_t Decode_ID3D11DeviceContext1_UpdateSubresource1(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size); + + size_t Decode_ID3D11Device3_CreateTexture2D1(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size); + + size_t Decode_ID3D11Device3_CreateTexture3D1(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size); + + size_t Decode_ID3D11Device3_WriteToSubresource(format::HandleId object_id, + const ApiCallInfo& call_info, + const uint8_t* parameter_buffer, + size_t buffer_size); + private: std::vector consumers_; }; diff --git a/framework/decode/dx12_detection_consumer.h b/framework/decode/dx12_detection_consumer.h index a8cd62638e..6bf3276cb2 100644 --- a/framework/decode/dx12_detection_consumer.h +++ b/framework/decode/dx12_detection_consumer.h @@ -1,6 +1,7 @@ /* ** Copyright (c) 2024 LunarG, Inc. ** Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -41,26 +42,60 @@ class Dx12DetectionConsumer : public Dx12Consumer static const uint64_t kNoBlockLimit = 0; Dx12DetectionConsumer(uint64_t block_limit = kDefaultBlockLimit) : - block_limit_(block_limit), dx12_consumer_usage_(false) + block_limit_(block_limit), dx11_consumer_usage_(false), dx12_consumer_usage_(false) {} + bool WasD3D11APIDetected() { return dx11_consumer_usage_; } bool WasD3D12APIDetected() { return dx12_consumer_usage_; } - virtual void Process_D3D12CreateDevice(const gfxrecon::decode::ApiCallInfo& call_info, - HRESULT return_value, - gfxrecon::format::HandleId pAdapter, - D3D_FEATURE_LEVEL MinimumFeatureLevel, - gfxrecon::decode::Decoded_GUID riid, - gfxrecon::decode::HandlePointerDecoder* ppDevice) + virtual void Process_D3D12CreateDevice(const gfxrecon::decode::ApiCallInfo&, + HRESULT, + gfxrecon::format::HandleId, + D3D_FEATURE_LEVEL, + gfxrecon::decode::Decoded_GUID, + gfxrecon::decode::HandlePointerDecoder*) { dx12_consumer_usage_ = true; } - + virtual void Process_D3D11CreateDevice(const ApiCallInfo&, + HRESULT, + format::HandleId, + D3D_DRIVER_TYPE, + uint64_t, + UINT, + PointerDecoder*, + UINT, + UINT, + HandlePointerDecoder*, + PointerDecoder*, + HandlePointerDecoder*) + { + dx11_consumer_usage_ = true; + } + virtual void Process_D3D11CreateDeviceAndSwapChain(const ApiCallInfo&, + HRESULT, + format::HandleId, + D3D_DRIVER_TYPE, + uint64_t, + UINT, + PointerDecoder*, + UINT, + UINT, + StructPointerDecoder*, + HandlePointerDecoder*, + HandlePointerDecoder*, + PointerDecoder*, + HandlePointerDecoder*) + { + dx11_consumer_usage_ = true; + } virtual bool IsComplete(uint64_t block_index) override { - return ((block_limit_ != kNoBlockLimit) && (block_index > block_limit_)) || WasD3D12APIDetected(); + return ((block_limit_ != kNoBlockLimit) && (block_index > block_limit_)) || WasD3D11APIDetected() || + WasD3D12APIDetected(); } private: const uint64_t block_limit_; + bool dx11_consumer_usage_; bool dx12_consumer_usage_; }; diff --git a/framework/decode/dx12_json_consumer_base.cpp b/framework/decode/dx12_json_consumer_base.cpp index 164e0dd8e7..20f4f12a6a 100644 --- a/framework/decode/dx12_json_consumer_base.cpp +++ b/framework/decode/dx12_json_consumer_base.cpp @@ -1,5 +1,6 @@ /* ** Copyright (c) 2023 LunarG, Inc. +** Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -179,12 +180,11 @@ void Dx12JsonConsumerBase::ProcessDx12RuntimeInfo(const format::Dx12RuntimeInfoC writer_->WriteBlockEnd(); } -void Dx12JsonConsumerBase::Process_ID3D12Device_CheckFeatureSupport(format::HandleId object_id, - HRESULT original_result, - D3D12_FEATURE feature, - const void* capture_feature_data, - void* replay_feature_data, - UINT feature_data_size) +void Dx12JsonConsumerBase::Process_ID3D12Device_CheckFeatureSupport(format::HandleId object_id, + HRESULT original_result, + D3D12_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) { using namespace gfxrecon::util; ApiCallInfo call_info; @@ -193,27 +193,207 @@ void Dx12JsonConsumerBase::Process_ID3D12Device_CheckFeatureSupport(format::Hand nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D12Device", object_id, "CheckFeatureSupport"); - const JsonOptions& options = writer_->GetOptions(); - HresultToJson(method[format::kNameReturn], original_result, options); + const JsonOptions& json_options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], original_result, json_options); nlohmann::ordered_json& args = method[format::kNameArgs]; { - FieldToJson(args["Feature"], feature, options); - FieldToJson(args["pFeatureSupportData"], nullptr, options); - FieldToJson(args["FeatureSupportDataSize"], feature_data_size, options); - /// @todo Complete conversion of the void * contents of Process_ID3D12Device_CheckFeatureSupport. See - /// - FieldToJson( - args[format::kNameWarning], "Incomplete conversion: pFeatureSupportData not supported yet.", options); + FieldToJson(args["Feature"], feature, json_options); + if (feature_data) + { + switch (feature) + { + case D3D12_FEATURE_D3D12_OPTIONS: + { + const auto data = feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_ARCHITECTURE: + { + const auto data = feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_FEATURE_LEVELS: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_FORMAT_SUPPORT: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_FORMAT_INFO: + { + const auto data = feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_SHADER_MODEL: + { + const auto data = feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_D3D12_OPTIONS1: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_SUPPORT: + { + const auto data = + feature_data + ->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_ROOT_SIGNATURE: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_ARCHITECTURE1: + { + const auto data = feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_D3D12_OPTIONS2: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_SHADER_CACHE: + { + const auto data = feature_data->GetStructPointerDecoder(); + reinterpret_cast*>(feature_data); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_COMMAND_QUEUE_PRIORITY: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_D3D12_OPTIONS3: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_EXISTING_HEAPS: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_D3D12_OPTIONS4: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_SERIALIZATION: + { + const auto data = feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_CROSS_NODE: + { + const auto data = feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_D3D12_OPTIONS5: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_D3D12_OPTIONS6: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_QUERY_META_COMMAND: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_D3D12_OPTIONS7: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_TYPE_COUNT: + { + const auto data = feature_data->GetStructPointerDecoder< + Decoded_D3D12_FEATURE_DATA_PROTECTED_RESOURCE_SESSION_TYPE_COUNT>(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D12_FEATURE_PROTECTED_RESOURCE_SESSION_TYPES: + { + const auto data = + feature_data + ->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + default: + { + break; + } + } + } } writer_->WriteBlockEnd(); } -void Dx12JsonConsumerBase::Process_IDXGIFactory5_CheckFeatureSupport(format::HandleId object_id, - HRESULT original_result, - DXGI_FEATURE feature, - const void* capture_feature_data, - void* replay_feature_data, - UINT feature_data_size) +void Dx12JsonConsumerBase::Process_IDXGIFactory5_CheckFeatureSupport(format::HandleId object_id, + HRESULT original_result, + DXGI_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) { using namespace gfxrecon::util; ApiCallInfo call_info; @@ -227,12 +407,23 @@ void Dx12JsonConsumerBase::Process_IDXGIFactory5_CheckFeatureSupport(format::Han nlohmann::ordered_json& args = method[format::kNameArgs]; { FieldToJson(args["Feature"], feature, options); - FieldToJson(args["pFeatureSupportData"], nullptr, options); - FieldToJson(args["FeatureSupportDataSize"], feature_data_size, options); - /// @todo Complete conversion of the void * contents of Process_IDXGIFactory5_CheckFeatureSupport. See - /// - FieldToJson( - args[format::kNameWarning], "Incomplete conversion: pFeatureSupportData not supported yet.", options); + if (!feature_data->IsNull()) + { + switch (feature) + { + case DXGI_FEATURE_PRESENT_ALLOW_TEARING: + { + FieldToJson(args["pFeatureSupportData"], + *reinterpret_cast(feature_data->GetPointer()), + options); + break; + } + default: + { + break; + } + } + } } writer_->WriteBlockEnd(); } @@ -266,5 +457,268 @@ void Dx12JsonConsumerBase::Process_ID3D12Resource_WriteToSubresource(format::Han } writer_->WriteBlockEnd(); } + +void Dx12JsonConsumerBase::Process_ID3D11Device_CheckFeatureSupport(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) +{ + + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = + writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CheckFeatureSupport"); + const JsonOptions& json_options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, json_options); + auto& args = method[format::kNameArgs]; + { + FieldToJson(args["Feature"], feature, json_options); + + if (feature_data) + { + switch (feature) + { + case D3D11_FEATURE_THREADING: + { + const auto data = feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_DOUBLES: + { + const auto data = feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_FORMAT_SUPPORT: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_FORMAT_SUPPORT2: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_D3D11_OPTIONS: + { + const auto data = feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_ARCHITECTURE_INFO: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_D3D9_OPTIONS: + { + const auto data = feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT: + { + const auto data = + feature_data + ->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_D3D9_SHADOW_SUPPORT: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_D3D11_OPTIONS1: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT: + { + const auto data = + feature_data + ->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_MARKER_SUPPORT: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_D3D9_OPTIONS1: + { + const auto data = feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_D3D11_OPTIONS2: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_D3D11_OPTIONS3: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_D3D11_OPTIONS4: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_SHADER_CACHE: + { + const auto data = feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + case D3D11_FEATURE_D3D11_OPTIONS5: + { + const auto data = + feature_data->GetStructPointerDecoder(); + FieldToJson(args["pFeatureSupportData"], data, json_options); + break; + } + default: + { + break; + } + } + } + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumerBase::Process_ID3D11DeviceContext_UpdateSubresource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = + writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "UpdateSubresource"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDstResource"], pDstResource, options); + FieldToJson(args["DstSubresource"], DstSubresource, options); + FieldToJson(args["pDstBox"], pDstBox, options); + RepresentBinaryFile(*writer_, + args["pSrcData"], + "ID3D11DeviceContext_UpdateSubresource.bin", + pSrcData->GetLength(), + pSrcData->GetPointer()); + FieldToJson(args["SrcRowPitch"], SrcRowPitch, options); + FieldToJson(args["SrcDepthPitch"], SrcDepthPitch, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumerBase::Process_ID3D11DeviceContext1_UpdateSubresource1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch, + UINT CopyFlags) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = + writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "UpdateSubresource1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDstResource"], pDstResource, options); + FieldToJson(args["DstSubresource"], DstSubresource, options); + FieldToJson(args["pDstBox"], pDstBox, options); + RepresentBinaryFile(*writer_, + args["pSrcData"], + "ID3D11DeviceContext1_UpdateSubresource1.bin", + pSrcData->GetLength(), + pSrcData->GetPointer()); + FieldToJson(args["SrcRowPitch"], SrcRowPitch, options); + FieldToJson(args["SrcDepthPitch"], SrcDepthPitch, options); + FieldToJson(args["CopyFlags"], CopyFlags, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumerBase::Process_ID3D11Device3_WriteToSubresource(const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = + writer_->WriteApiCallStart(call_info, "ID3D11Device3", object_id, "WriteToSubresource"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDstResource"], pDstResource, options); + FieldToJson(args["DstSubresource"], DstSubresource, options); + FieldToJson(args["pDstBox"], pDstBox, options); + RepresentBinaryFile(*writer_, + args["pSrcData"], + "ID3D11Device3_WriteToSubresource.bin", + pSrcData->GetLength(), + pSrcData->GetPointer()); + FieldToJson(args["SrcRowPitch"], SrcRowPitch, options); + FieldToJson(args["SrcDepthPitch"], SrcDepthPitch, options); + } + writer_->WriteBlockEnd(); +} + GFXRECON_END_NAMESPACE(decode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/decode/dx12_json_consumer_base.h b/framework/decode/dx12_json_consumer_base.h index f0fb3c0542..e8ddf37ce0 100644 --- a/framework/decode/dx12_json_consumer_base.h +++ b/framework/decode/dx12_json_consumer_base.h @@ -1,5 +1,6 @@ /* ** Copyright (c) 2023 LunarG, Inc. +** Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -65,20 +66,18 @@ class Dx12JsonConsumerBase : public Dx12Consumer /// @defGroup CustomFunctions DX12 functions and methods which require fully custom handling. /// @{ /// Data must be extracted from the void pointer depending on the value of feature. - void Process_ID3D12Device_CheckFeatureSupport(format::HandleId object_id, - HRESULT original_result, - D3D12_FEATURE feature, - const void* capture_feature_data, - void* replay_feature_data, - UINT feature_data_size) override; + void Process_ID3D12Device_CheckFeatureSupport(format::HandleId object_id, + HRESULT original_result, + D3D12_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) override; /// Data must be extracted from the void pointer depending on the value of feature. - void Process_IDXGIFactory5_CheckFeatureSupport(format::HandleId object_id, - HRESULT original_result, - DXGI_FEATURE feature, - const void* capture_feature_data, - void* replay_feature_data, - UINT feature_data_size) override; + void Process_IDXGIFactory5_CheckFeatureSupport(format::HandleId object_id, + HRESULT original_result, + DXGI_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) override; /// This is only custom because codegen gives pSrcData type uint64_t instead of void*. /// @@ -89,6 +88,42 @@ class Dx12JsonConsumerBase : public Dx12Consumer void* pSrcData, UINT SrcRowPitch, UINT SrcDepthPitch) override; + + virtual void Process_ID3D11Device_CheckFeatureSupport(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) override; + + virtual void Process_ID3D11DeviceContext_UpdateSubresource(const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) override; + + virtual void Process_ID3D11DeviceContext1_UpdateSubresource1(const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch, + UINT CopyFlags) override; + + virtual void Process_ID3D11Device3_WriteToSubresource(const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) override; + /// @} protected: JsonWriter* writer_{ nullptr }; diff --git a/framework/decode/dx12_object_info.h b/framework/decode/dx12_object_info.h index 876ee136d7..41b8b47f16 100644 --- a/framework/decode/dx12_object_info.h +++ b/framework/decode/dx12_object_info.h @@ -1,6 +1,7 @@ /* ** Copyright (c) 2021-2023 LunarG, Inc. ** Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -65,7 +66,39 @@ enum class DxObjectInfoType : uint32_t kID3D12CommandSignatureInfo, kID3D12CommandListInfo, kID3D12RootSignatureInfo, - kID3D12StateObjectInfo + kID3D12StateObjectInfo, + kID3D11DeviceContextInfo, + kID3D11ResourceInfo +}; + +// +// Enumerations for storing variable length array replay sizes. +// +enum class VariableLengthArrayIndices : uint32_t +{ + kDxgiObjectArrayGetPrivateData = 0, + kDxgiOutputArrayGetDisplayModeList, + kDxgiOutput1ArrayGetDisplayModeList1, + kD3D12ObjectArrayGetPrivateData, + kD3D12Device5ArrayEnumerateMetaCommands, + kD3D12Device5ArrayEnumerateMetaCommandParameters, + kD3D12InfoQueueArrayGetMessage, + kD3D12InfoQueueArrayGetStorageFilter, + kD3D12InfoQueueArrayGetRetrievalFilter, + kD3D12ShaderCacheSessionArrayFindValue, + kD3D11DeviceChildArrayGetPrivateData, + kD3D11ClassInstanceArrayGetInstanceName, + kD3D11ClassInstanceArrayGetTypeName, + kD3D11DeviceContextArrayPSGetShader, + kD3D11DeviceContextArrayVSGetShader, + kD3D11DeviceContextArrayGSGetShader, + kD3D11DeviceContextArrayRSGetViewports, + kD3D11DeviceContextArrayRSGetScissorRects, + kD3D11DeviceContextArrayHSGetShader, + kD3D11DeviceContextArrayDSGetShader, + kD3D11DeviceContextArrayCSGetShader, + kD3D11DeviceArrayCheckCounter, + kD3D11DeviceArrayGetPrivateData, }; // @@ -197,11 +230,12 @@ struct DxObjectExtraInfo struct DxObjectInfo { // Standard info stored for all DX objects. - IUnknown* object{ nullptr }; - format::HandleId capture_id{ format::kNullHandleId }; - uint64_t ref_count{ 1 }; - uint64_t extra_ref{ 0 }; - std::unique_ptr extra_info; + IUnknown* object{ nullptr }; + format::HandleId capture_id{ format::kNullHandleId }; + uint64_t ref_count{ 1 }; + uint64_t extra_ref{ 0 }; + std::unique_ptr extra_info; + std::unordered_map array_counts; }; struct DxgiSwapchainInfo : DxObjectExtraInfo @@ -219,7 +253,10 @@ struct DxgiSwapchainInfo : DxObjectExtraInfo graphics::dx12::ID3D12CommandQueueComPtr command_queue{ nullptr - }; ///< The command queue that was used to create the swapchain. + }; ///< The command queue that was used to create the swapchain for d3d12. + graphics::dx12::ID3D11DeviceComPtr device{ + nullptr + }; ///< The device that was used to create the swapchain for d3d11. bool is_fullscreen{ false }; ///< Swapchain full screen flag. }; @@ -427,6 +464,27 @@ struct D3D12StateObjectInfo : DxObjectExtraInfo std::map> shader_id_lrs_map; }; +struct D3D11DeviceContextInfo : DxObjectExtraInfo +{ + static constexpr DxObjectInfoType kType = DxObjectInfoType::kID3D11DeviceContextInfo; + static constexpr char kObjectType[] = "ID3D11DeviceContext"; + D3D11DeviceContextInfo() : DxObjectExtraInfo(kType) {} + + bool needs_update_subresource_adjustment{ false }; +}; + +struct D3D11ResourceInfo : DxObjectExtraInfo +{ + static constexpr DxObjectInfoType kType = DxObjectInfoType::kID3D11ResourceInfo; + static constexpr char kObjectType[] = "ID3D11Resource"; + D3D11ResourceInfo() : DxObjectExtraInfo(kType) {} + + D3D11_RESOURCE_DIMENSION dimension{ D3D11_RESOURCE_DIMENSION_UNKNOWN }; + DXGI_FORMAT format{ DXGI_FORMAT_UNKNOWN }; + std::unordered_map> + mapped_memory_info; ///< Map subresource index to per-context mapped memory info. +}; + GFXRECON_END_NAMESPACE(decode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/decode/dx12_replay_consumer_base.cpp b/framework/decode/dx12_replay_consumer_base.cpp index 16ff2225c5..45cbd68ad8 100644 --- a/framework/decode/dx12_replay_consumer_base.cpp +++ b/framework/decode/dx12_replay_consumer_base.cpp @@ -1,6 +1,7 @@ /* ** Copyright (c) 2021-2023 LunarG, Inc. ** Copyright (c) 2021-2023 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -73,13 +74,52 @@ void InitialResourceExtraInfo(HandlePointerDecoder* resource_decoder, SetExtraInfo(resource_decoder, std::move(extra_info)); } +template +static HRESULT CreateDeferredContext(DxObjectInfo* replay_object_info, + HRESULT original_result, + UINT context_flags, + HandlePointerDecoder* deferred_context, + HRESULT (STDMETHODCALLTYPE DeviceT::*CreateDeferredContextFunc)(UINT, + DeviceContextT**)) +{ + GFXRECON_UNREFERENCED_PARAMETER(original_result); + + GFXRECON_ASSERT((replay_object_info != nullptr) && (replay_object_info->object != nullptr) && + (deferred_context != nullptr)); + + auto replay_object = static_cast(replay_object_info->object); + + auto deferred_context_object = deferred_context->GetHandlePointer(); + auto result = (replay_object->*CreateDeferredContextFunc)(context_flags, deferred_context_object); + if (SUCCEEDED(result) && (deferred_context_object != nullptr) && (*deferred_context_object != nullptr)) + { + auto deferred_context_info = std::make_unique(); + + // Check device features. Note that when trimming a replay, this API call will be recorded to the trimmed file, + // but will not have been present in the original capture. To limit the addition of replay API calls during + // recapture, this call is deferred until it is needed instead of being made at device creation. + auto threading_feature_data = D3D11_FEATURE_DATA_THREADING{ FALSE, FALSE }; + auto check_feature_result = replay_object->CheckFeatureSupport( + D3D11_FEATURE_THREADING, &threading_feature_data, sizeof(threading_feature_data)); + + if (SUCCEEDED(check_feature_result) && !threading_feature_data.DriverCommandLists) + { + deferred_context_info->needs_update_subresource_adjustment = true; + } + + SetExtraInfo(deferred_context, std::move(deferred_context_info)); + } + + return result; +} + Dx12ReplayConsumerBase::Dx12ReplayConsumerBase(std::shared_ptr application, const DxReplayOptions& options) : application_(application), options_(options), current_message_length_(0), info_queue_(nullptr), resource_data_util_(nullptr), - frame_buffer_renderer_(nullptr), debug_layer_enabled_(false), set_auto_breadcrumbs_enablement_(false), - set_breadcrumb_context_enablement_(false), set_page_fault_enablement_(false), loading_trim_state_(false), - fps_info_(nullptr), frame_end_marker_count_(0) + frame_buffer_renderer12_(nullptr), frame_buffer_renderer11_(nullptr), debug_layer_enabled_(false), + set_auto_breadcrumbs_enablement_(false), set_breadcrumb_context_enablement_(false), + set_page_fault_enablement_(false), loading_trim_state_(false), fps_info_(nullptr), frame_end_marker_count_(0) { if (options_.enable_validation_layer) { @@ -257,12 +297,76 @@ void Dx12ReplayConsumerBase::ProcessFillMemoryCommand(uint64_t memory_id, if (entry != mapped_memory_.end()) { + GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, offset); GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, size); - auto copy_size = static_cast(size); - auto mapped_pointer = static_cast(entry->second.data_pointer) + offset; + auto& mapped_memory_entry = entry->second; + auto copy_offset = static_cast(offset); + auto copy_size = static_cast(size); + auto mapped_pointer = static_cast(mapped_memory_entry.data_pointer) + copy_offset; + + if (mapped_memory_entry.resource_info == nullptr) + { + // This is a DX12 resource. + util::platform::MemoryCopy(mapped_pointer, copy_size, data, copy_size); + } + else + { + // This is a DX11 resource that may require row or depth pitch adjustments. + auto resource_info = mapped_memory_entry.resource_info; + auto alignment_mismatch = false; + + GFXRECON_ASSERT(resource_info->dimension != D3D11_RESOURCE_DIMENSION_UNKNOWN); + + // Only texture alignments need to be checked. + if (((resource_info->dimension != D3D11_RESOURCE_DIMENSION_BUFFER) && + (mapped_memory_entry.capture_row_pitch_ != mapped_memory_entry.replay_row_pitch_)) || + ((resource_info->dimension == D3D11_RESOURCE_DIMENSION_TEXTURE3D) && + (mapped_memory_entry.capture_slice_pitch_ != mapped_memory_entry.replay_slice_pitch_))) + { + alignment_mismatch = true; + } + + if (!alignment_mismatch) + { + util::platform::MemoryCopy(mapped_pointer, copy_size, data, copy_size); + } + else + { + const uint8_t* src = static_cast(data); + uint8_t* dst = static_cast(mapped_memory_entry.data_pointer); - util::platform::MemoryCopy(mapped_pointer, copy_size, data, copy_size); + if (resource_info->dimension == D3D11_RESOURCE_DIMENSION_TEXTURE1D) + { + graphics::dx12::CopyAlignedTexture1D(src, + dst, + mapped_memory_entry.capture_row_pitch_, + mapped_memory_entry.replay_row_pitch_, + copy_offset, + copy_size); + } + else if (resource_info->dimension == D3D11_RESOURCE_DIMENSION_TEXTURE2D) + { + graphics::dx12::CopyAlignedTexture2D(src, + dst, + mapped_memory_entry.capture_row_pitch_, + mapped_memory_entry.replay_row_pitch_, + copy_offset, + copy_size); + } + else if (resource_info->dimension == D3D11_RESOURCE_DIMENSION_TEXTURE3D) + { + graphics::dx12::CopyAlignedTexture3D(src, + dst, + mapped_memory_entry.capture_row_pitch_, + mapped_memory_entry.replay_row_pitch_, + mapped_memory_entry.capture_slice_pitch_, + mapped_memory_entry.replay_slice_pitch_, + copy_offset, + copy_size); + } + } + } ApplyFillMemoryResourceValueCommand(offset, size, data, static_cast(entry->second.data_pointer)); @@ -685,6 +789,17 @@ void* Dx12ReplayConsumerBase::PreProcessExternalObject(uint64_t object_ } break; } + case format::ApiCallId::ApiCall_D3D11CreateDevice: + case format::ApiCallId::ApiCall_D3D11CreateDeviceAndSwapChain: + if (object_id != format::kNullHandleId) + { + // Return null for the custom software module parameter. + // TODO: This may also require a change to the D3D_DRIVER_TYPE. + GFXRECON_LOG_WARNING("The captured application called %s with a handle to a custom software module, " + "which will be ignored for replay.", + call_name) + } + break; default: GFXRECON_LOG_WARNING("Skipping object handle mapping for unsupported external object type processed by %s", call_name); @@ -761,18 +876,37 @@ void Dx12ReplayConsumerBase::PrePresent(DxObjectInfo* swapchain_object_info, UIN auto swapchain = static_cast(swapchain_object_info->object); auto swapchain_extra_info = GetExtraInfo(swapchain_object_info); - if (swapchain_extra_info && swapchain_extra_info->command_queue) + if (swapchain_extra_info) { - graphics::dx12::TakeScreenshot(frame_buffer_renderer_, - swapchain_extra_info->command_queue, - swapchain, - screenshot_handler_->GetCurrentFrame(), - screenshot_file_prefix_, - screenshot_format_); + if (swapchain_extra_info->command_queue) + { + graphics::dx12::TakeScreenshot(frame_buffer_renderer12_, + swapchain_extra_info->command_queue, + swapchain, + screenshot_handler_->GetCurrentFrame(), + screenshot_file_prefix_, + screenshot_format_); + } + else if (swapchain_extra_info->device) + { + graphics::dx12::TakeScreenshot(frame_buffer_renderer11_, + swapchain_extra_info->device, + swapchain, + screenshot_handler_->GetCurrentFrame(), + screenshot_file_prefix_, + screenshot_format_); + } + else + { + GFXRECON_LOG_ERROR("Failed to get the ID3D12CommandQueue or ID3D11Device associated with the " + "presented swap chain. " + "GFXReconstruct is unable to take a screenshot."); + } } else { - GFXRECON_LOG_ERROR("Failed to get the ID3D12CommandQueue associated with the presented swap chain. " + GFXRECON_LOG_ERROR("Failed to get the ID3D12CommandQueue or ID3D11Device associated with the " + "presented swap chain. " "GFXReconstruct is unable to take a screenshot."); } } @@ -893,8 +1027,14 @@ Dx12ReplayConsumerBase::OverrideCreateSwapChain(DxObjectInfo* hwnd_id = meta_info->OutputWindow; } - SetSwapchainInfo( - object_info, window, hwnd_id, hwnd, desc_pointer->BufferCount, device, desc_pointer->Windowed); + SetSwapchainInfo(object_info, + window, + hwnd_id, + hwnd, + desc_pointer->SwapEffect, + desc_pointer->BufferCount, + device, + desc_pointer->Windowed); } else { @@ -1007,6 +1147,183 @@ HRESULT Dx12ReplayConsumerBase::OverrideD3D12DeviceFactoryCreateDevice(DxObjectI return replay_result; } +HRESULT Dx12ReplayConsumerBase::OverrideD3D11CreateDevice(HRESULT original_result, + DxObjectInfo* adapter_info, + D3D_DRIVER_TYPE driver_type, + uint64_t software, + UINT flags, + PointerDecoder* feature_levels, + UINT num_feature_levels, + UINT sdk_version, + HandlePointerDecoder* device, + PointerDecoder* feature_level, + HandlePointerDecoder* immediate_context) +{ + GFXRECON_UNREFERENCED_PARAMETER(original_result); + + GFXRECON_ASSERT((feature_levels != nullptr) && (device != nullptr) && (feature_level != nullptr) && + (immediate_context != nullptr)); + + auto adapter = reinterpret_cast(GetCreateDeviceAdapter(adapter_info)); + + auto in_Software = static_cast( + PreProcessExternalObject(software, format::ApiCallId::ApiCall_D3D11CreateDevice, "D3D11CreateDevice")); + + auto device_pointer = device->GetHandlePointer(); + auto immediate_context_pointer = immediate_context->GetHandlePointer(); + + if (options_.enable_validation_layer) + { + flags |= D3D11_CREATE_DEVICE_DEBUG; + } + + auto result = D3D11CreateDevice(adapter, + driver_type, + in_Software, + flags, + feature_levels->GetPointer(), + num_feature_levels, + sdk_version, + device_pointer, + feature_level->GetOutputPointer(), + immediate_context_pointer); + + if (SUCCEEDED(result) && (device_pointer != nullptr)) + { + auto device_ptr = reinterpret_cast(*device_pointer); + graphics::dx12::MarkActiveAdapter(device_ptr, adapters_); + } + + return result; +} + +HRESULT Dx12ReplayConsumerBase::OverrideD3D11CreateDeviceAndSwapChain( + HRESULT original_result, + DxObjectInfo* adapter_info, + D3D_DRIVER_TYPE driver_type, + uint64_t software, + UINT flags, + PointerDecoder* feature_levels, + UINT num_feature_levels, + UINT sdk_version, + StructPointerDecoder* swapchain_desc, + HandlePointerDecoder* swapchain, + HandlePointerDecoder* device, + PointerDecoder* feature_level, + HandlePointerDecoder* immediate_context) +{ + GFXRECON_UNREFERENCED_PARAMETER(original_result); + + GFXRECON_ASSERT((feature_levels != nullptr) && (swapchain_desc != nullptr) && (swapchain != nullptr) && + (device != nullptr) && (feature_level != nullptr) && (immediate_context != nullptr)); + + auto swapchain_desc_pointer = swapchain_desc->GetPointer(); + HRESULT result = E_FAIL; + Window* window = nullptr; + auto wsi_context = application_ ? application_->GetWsiContext("", true) : nullptr; + auto window_factory = wsi_context ? wsi_context->GetWindowFactory() : nullptr; + + if (swapchain_desc_pointer != nullptr) + { + // If a swap chain is being created, create a window for the swap chain. + if (window_factory != nullptr) + { + ReplaceWindowedResolution(swapchain_desc_pointer->BufferDesc.Width, + swapchain_desc_pointer->BufferDesc.Height); + window = window_factory->Create(options_.window_topleft_x, + options_.window_topleft_y, + swapchain_desc_pointer->BufferDesc.Width, + swapchain_desc_pointer->BufferDesc.Height, + options_.force_windowed || options_.force_windowed_origin); + } + + if (window != nullptr) + { + HWND hwnd{}; + if (window->GetNativeHandle(Window::kWin32HWnd, reinterpret_cast(&hwnd))) + { + swapchain_desc_pointer->OutputWindow = hwnd; + } + else + { + GFXRECON_LOG_FATAL("Failed to retrieve handle from window."); + window_factory->Destroy(window); + } + } + else + { + GFXRECON_LOG_FATAL("Failed to create a window. Replay cannot continue."); + } + } + + auto adapter = reinterpret_cast(GetCreateDeviceAdapter(adapter_info)); + + auto in_Software = static_cast(PreProcessExternalObject( + software, format::ApiCallId::ApiCall_D3D11CreateDeviceAndSwapChain, "D3D11CreateDeviceAndSwapChain")); + + auto swapchain_pointer = swapchain->GetHandlePointer(); + auto device_pointer = device->GetHandlePointer(); + auto immediate_context_pointer = immediate_context->GetHandlePointer(); + + if (options_.enable_validation_layer) + { + flags |= D3D11_CREATE_DEVICE_DEBUG; + } + + result = D3D11CreateDeviceAndSwapChain(adapter, + driver_type, + in_Software, + flags, + feature_levels->GetPointer(), + num_feature_levels, + sdk_version, + swapchain_desc_pointer, + swapchain_pointer, + device_pointer, + feature_level->GetOutputPointer(), + immediate_context_pointer); + + if (SUCCEEDED(result)) + { + if (device_pointer != nullptr) + { + auto device_ptr = reinterpret_cast(*device_pointer); + graphics::dx12::MarkActiveAdapter(device_ptr, adapters_); + } + + if (swapchain_desc_pointer != nullptr) + { + auto object_info = static_cast(swapchain->GetConsumerData(0)); + auto meta_info = swapchain_desc->GetMetaStructPointer(); + uint64_t hwnd_id = 0; + + if (meta_info != nullptr) + { + hwnd_id = meta_info->OutputWindow; + } + + SetSwapchainInfo(object_info, + window, + hwnd_id, + swapchain_desc_pointer->OutputWindow, + swapchain_desc_pointer->SwapEffect, + swapchain_desc_pointer->BufferCount, + device_pointer ? *device_pointer : nullptr, + swapchain_desc_pointer->Windowed); + } + } + else + { + if (window != nullptr) + { + GFXRECON_ASSERT(window_factory != nullptr); + window_factory->Destroy(window); + } + } + + return result; +} + void Dx12ReplayConsumerBase::ProcessDxgiAdapterInfo(const format::DxgiAdapterInfoCommandHeader& adapter_info_header) { // Only check this if the block is not of a software adapter @@ -1123,16 +1440,14 @@ void Dx12ReplayConsumerBase::InitializeD3D12Device(HandlePointerDecoder* void Dx12ReplayConsumerBase::DetectAdapters() { - IDXGIFactory1* factory1 = nullptr; + graphics::dx12::IDXGIFactory1ComPtr factory1; - HRESULT result = CreateDXGIFactory1(IID_IDXGIFactory1, reinterpret_cast(&factory1)); + HRESULT result = CreateDXGIFactory1(IID_PPV_ARGS(&factory1)); if (SUCCEEDED(result)) { - graphics::dx12::TrackAdapters(result, reinterpret_cast(&factory1), adapters_); + graphics::dx12::TrackAdapters(factory1, adapters_); render_adapter_ = graphics::dx12::GetAdapterbyIndex(adapters_, options_.override_gpu_index); - - factory1->Release(); } } @@ -2405,7 +2720,15 @@ HRESULT Dx12ReplayConsumerBase::OverrideGetBuffer(DxObjectInfo* r if (swapchain_info->image_ids[buffer] == format::kNullHandleId) { auto object_info = static_cast(surface->GetConsumerData(0)); - InitialResourceExtraInfo(surface, D3D12_RESOURCE_STATE_PRESENT, false); + + // Ensure that the retrieved buffer is a D3D12 resource prior to casting to ID3D12Resource. + const auto& buffer_iid = *riid.decoded_value; + if (IsEqualIID(buffer_iid, __uuidof(ID3D12Resource)) || + IsEqualIID(buffer_iid, __uuidof(ID3D12Resource1)) || + IsEqualIID(buffer_iid, __uuidof(ID3D12Resource2))) + { + InitialResourceExtraInfo(surface, D3D12_RESOURCE_STATE_PRESENT, false); + } // Increment the replay reference to prevent the swapchain image info entry from being removed from the // object info table while the swapchain is active. @@ -2647,6 +2970,7 @@ HRESULT Dx12ReplayConsumerBase::CreateSwapChainForHwnd( window, hwnd_id, hwnd, + desc_pointer->SwapEffect, desc_pointer->BufferCount, device, (full_screen_desc_ptr == nullptr)); @@ -2670,13 +2994,14 @@ HRESULT Dx12ReplayConsumerBase::CreateSwapChainForHwnd( return result; } -void Dx12ReplayConsumerBase::SetSwapchainInfo(DxObjectInfo* info, - Window* window, - uint64_t hwnd_id, - HWND hwnd, - uint32_t image_count, - IUnknown* queue_iunknown, - bool windowed) +void Dx12ReplayConsumerBase::SetSwapchainInfo(DxObjectInfo* info, + Window* window, + uint64_t hwnd_id, + HWND hwnd, + DXGI_SWAP_EFFECT swap_effect, + uint32_t image_count, + IUnknown* queue_iunknown, + bool windowed) { if (window != nullptr) { @@ -2687,18 +3012,38 @@ void Dx12ReplayConsumerBase::SetSwapchainInfo(DxObjectInfo* info, auto swapchain_info = std::make_unique(); swapchain_info->window = window; swapchain_info->hwnd_id = hwnd_id; - swapchain_info->image_ids.resize(image_count); swapchain_info->is_fullscreen = !windowed; - std::fill(swapchain_info->image_ids.begin(), swapchain_info->image_ids.end(), format::kNullHandleId); - // Get the ID3D12CommandQueue from the IUnknown queue object. - HRESULT hr = queue_iunknown->QueryInterface(IID_PPV_ARGS(&swapchain_info->command_queue)); - if (FAILED(hr)) + if (queue_iunknown != nullptr) + { + // TODO: Add a method for obtaining the appropriate object from IUnknown without using QueryInterface, + // so it is not recorded by recapture for trimming. The device or queue could be stored in a separate + // data structure that avoids the call. + HRESULT hr = queue_iunknown->QueryInterface(IID_PPV_ARGS(&swapchain_info->command_queue)); + if (FAILED(hr)) + { + hr = queue_iunknown->QueryInterface(IID_PPV_ARGS(&swapchain_info->device)); + if (FAILED(hr)) + { + GFXRECON_LOG_WARNING("Failed to get an ID3D12CommandQueue interface or ID3D11Device interface " + "from the IUnknown* device argument to CreateSwapChain."); + } + } + } + + if ((swap_effect == DXGI_SWAP_EFFECT_DISCARD) || + (swapchain_info->device && (swap_effect == DXGI_SWAP_EFFECT_FLIP_DISCARD))) { - GFXRECON_LOG_WARNING("Failed to get the ID3D12CommandQueue interface from the IUnknown* device " - "argument to CreateSwapChain."); + // For these swap effect cases, only the image at index 0 can be acquired. + swapchain_info->image_ids.resize(1); + } + else + { + swapchain_info->image_ids.resize(image_count); } + std::fill(swapchain_info->image_ids.begin(), swapchain_info->image_ids.end(), format::kNullHandleId); + info->extra_info = std::move(swapchain_info); // Functions such as CreateSwapChainForCoreWindow and CreateSwapchainForComposition, which are mapped to @@ -2734,8 +3079,43 @@ void Dx12ReplayConsumerBase::ResetSwapchainImages(DxObjectInfo* info, swapchain_info->image_ids.resize(buffer_count); std::fill(swapchain_info->image_ids.begin(), swapchain_info->image_ids.end(), format::kNullHandleId); + // When width and/or height are zero, the swapchain will resize its width and/or height to match the size of the + // client area of the target window. + auto window = swapchain_info->window; + + if (width == 0) + { + auto hwnd = HWND{}; + auto success = window->GetNativeHandle(Window::kWin32HWnd, reinterpret_cast(&hwnd)); + + if (success) + { + RECT rect{}; + success = GetClientRect(hwnd, &rect); + + if (success) + { + if (width == 0) + { + width = rect.right - rect.left; + } + + if (height == 0) + { + height = rect.bottom - rect.top; + } + } + } + + if (!success) + { + GFXRECON_LOG_FATAL("Failed to retrieve the dimensions of the target window's client area when resizing " + "the swap chain with width and/or height equal to zero.") + } + } + // Resize the swapchain's window. - swapchain_info->window->SetSize(width, height); + window->SetSize(width, height); } } @@ -3202,38 +3582,48 @@ void Dx12ReplayConsumerBase::InitializeScreenshotHandler() std::make_unique(options_.screenshot_format, options_.screenshot_ranges); } -void Dx12ReplayConsumerBase::Process_ID3D12Device_CheckFeatureSupport(format::HandleId object_id, - HRESULT original_result, - D3D12_FEATURE feature, - const void* capture_feature_data, - void* replay_feature_data, - UINT feature_data_size) +void Dx12ReplayConsumerBase::Process_ID3D12Device_CheckFeatureSupport(format::HandleId object_id, + HRESULT original_result, + D3D12_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) { - GFXRECON_UNREFERENCED_PARAMETER(capture_feature_data); + GFXRECON_ASSERT(feature_data != nullptr); auto replay_object = MapObject(object_id); - if ((replay_object != nullptr) && (replay_feature_data != nullptr)) + if (!feature_data->IsNull()) + { + feature_data->AllocateOutputData(1); + } + + if (replay_object != nullptr) { - auto replay_result = replay_object->CheckFeatureSupport(feature, replay_feature_data, feature_data_size); + auto replay_result = + replay_object->CheckFeatureSupport(feature, feature_data->GetOutputPointer(), feature_data_size); CheckReplayResult("ID3D12Device::CheckFeatureSupport", original_result, replay_result); } } -void Dx12ReplayConsumerBase::Process_IDXGIFactory5_CheckFeatureSupport(format::HandleId object_id, - HRESULT original_result, - DXGI_FEATURE feature, - const void* capture_feature_data, - void* replay_feature_data, - UINT feature_data_size) +void Dx12ReplayConsumerBase::Process_IDXGIFactory5_CheckFeatureSupport(format::HandleId object_id, + HRESULT original_result, + DXGI_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) { - GFXRECON_UNREFERENCED_PARAMETER(capture_feature_data); + GFXRECON_ASSERT(feature_data != nullptr); auto replay_object = MapObject(object_id); - if ((replay_object != nullptr) && (replay_feature_data != nullptr)) + if (!feature_data->IsNull()) + { + feature_data->AllocateOutputData(1); + } + + if (replay_object != nullptr) { - auto replay_result = replay_object->CheckFeatureSupport(feature, replay_feature_data, feature_data_size); + auto replay_result = + replay_object->CheckFeatureSupport(feature, feature_data->GetOutputPointer(), feature_data_size); CheckReplayResult("IDXGIFactory5::CheckFeatureSupport", original_result, replay_result); } } @@ -3255,6 +3645,399 @@ void Dx12ReplayConsumerBase::Process_ID3D12Resource_WriteToSubresource(format::H } } +void Dx12ReplayConsumerBase::Process_ID3D11Device_CheckFeatureSupport(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) +{ + GFXRECON_ASSERT(feature_data != nullptr); + + auto replay_object = MapObject(object_id); + + if (!feature_data->IsNull()) + { + feature_data->AllocateOutputData(1); + } + + if (replay_object != nullptr) + { + auto replay_result = + replay_object->CheckFeatureSupport(feature, feature_data->GetOutputPointer(), feature_data_size); + CheckReplayResult("ID3D11Device::CheckFeatureSupport", return_value, replay_result); + } +} + +void Dx12ReplayConsumerBase::Process_ID3D11Device_CreateBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppBuffer) +{ + auto replay_object = MapObject(object_id); + if (replay_object != nullptr) + { + if (!ppBuffer->IsNull()) + { + ppBuffer->SetHandleLength(1); + } + + auto out_p_ppBuffer = ppBuffer->GetPointer(); + auto out_hp_ppBuffer = ppBuffer->GetHandlePointer(); + auto replay_result = + replay_object->CreateBuffer(pDesc->GetPointer(), pInitialData->GetPointer(), out_hp_ppBuffer); + + if (SUCCEEDED(replay_result)) + { + auto object_info = DxObjectInfo{}; + auto resource_info = std::make_unique(); + + resource_info->dimension = D3D11_RESOURCE_DIMENSION_BUFFER; + object_info.extra_info = std::move(resource_info); + + AddObject( + out_p_ppBuffer, out_hp_ppBuffer, std::move(object_info), format::ApiCall_ID3D11Device_CreateBuffer); + } + + CheckReplayResult("ID3D11Device_CreateBuffer", return_value, replay_result); + } +} + +void Dx12ReplayConsumerBase::Process_ID3D11Device_CreateTexture1D( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture1D) +{ + auto replay_object = MapObject(object_id); + if (replay_object != nullptr) + { + if (!ppTexture1D->IsNull()) + { + ppTexture1D->SetHandleLength(1); + } + + auto in_pDesc = pDesc->GetPointer(); + auto out_p_ppTexture1D = ppTexture1D->GetPointer(); + auto out_hp_ppTexture1D = ppTexture1D->GetHandlePointer(); + auto replay_result = replay_object->CreateTexture1D(in_pDesc, pInitialData->GetPointer(), out_hp_ppTexture1D); + + if (SUCCEEDED(replay_result)) + { + auto object_info = DxObjectInfo{}; + auto resource_info = std::make_unique(); + + resource_info->dimension = D3D11_RESOURCE_DIMENSION_TEXTURE1D; + if (in_pDesc != nullptr) + { + resource_info->format = in_pDesc->Format; + } + object_info.extra_info = std::move(resource_info); + + AddObject(out_p_ppTexture1D, + out_hp_ppTexture1D, + std::move(object_info), + format::ApiCall_ID3D11Device_CreateTexture1D); + } + + CheckReplayResult("ID3D11Device_CreateTexture1D", return_value, replay_result); + } +} + +void Dx12ReplayConsumerBase::Process_ID3D11Device_CreateTexture2D( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture2D) +{ + auto replay_object = MapObject(object_id); + if (replay_object != nullptr) + { + if (!ppTexture2D->IsNull()) + { + ppTexture2D->SetHandleLength(1); + } + + auto in_pDesc = pDesc->GetPointer(); + auto out_p_ppTexture2D = ppTexture2D->GetPointer(); + auto out_hp_ppTexture2D = ppTexture2D->GetHandlePointer(); + auto replay_result = replay_object->CreateTexture2D(in_pDesc, pInitialData->GetPointer(), out_hp_ppTexture2D); + + if (SUCCEEDED(replay_result)) + { + auto object_info = DxObjectInfo{}; + auto resource_info = std::make_unique(); + + resource_info->dimension = D3D11_RESOURCE_DIMENSION_TEXTURE2D; + if (in_pDesc != nullptr) + { + resource_info->format = in_pDesc->Format; + } + object_info.extra_info = std::move(resource_info); + + AddObject(out_p_ppTexture2D, + out_hp_ppTexture2D, + std::move(object_info), + format::ApiCall_ID3D11Device_CreateTexture2D); + } + + CheckReplayResult("ID3D11Device_CreateTexture2D", return_value, replay_result); + } +} + +void Dx12ReplayConsumerBase::Process_ID3D11Device_CreateTexture3D( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture3D) +{ + auto replay_object = MapObject(object_id); + if (replay_object != nullptr) + { + if (!ppTexture3D->IsNull()) + { + ppTexture3D->SetHandleLength(1); + } + + auto in_pDesc = pDesc->GetPointer(); + auto out_p_ppTexture3D = ppTexture3D->GetPointer(); + auto out_hp_ppTexture3D = ppTexture3D->GetHandlePointer(); + auto replay_result = replay_object->CreateTexture3D(in_pDesc, pInitialData->GetPointer(), out_hp_ppTexture3D); + + if (SUCCEEDED(replay_result)) + { + auto object_info = DxObjectInfo{}; + auto resource_info = std::make_unique(); + + resource_info->dimension = D3D11_RESOURCE_DIMENSION_TEXTURE3D; + if (in_pDesc != nullptr) + { + resource_info->format = in_pDesc->Format; + } + object_info.extra_info = std::move(resource_info); + + AddObject(out_p_ppTexture3D, + out_hp_ppTexture3D, + std::move(object_info), + format::ApiCall_ID3D11Device_CreateTexture3D); + } + + CheckReplayResult("ID3D11Device_CreateTexture3D", return_value, replay_result); + } +} + +void Dx12ReplayConsumerBase::Process_ID3D11DeviceContext_UpdateSubresource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) +{ + auto replay_object_info = GetObjectInfo(object_id); + if ((replay_object_info != nullptr) && (replay_object_info->object != nullptr)) + { + auto replay_object = static_cast(replay_object_info->object); + auto in_pDstBox = pDstBox->GetPointer(); + auto in_pSrcData = pSrcData->GetPointer(); + ID3D11Resource* in_pDstResource = nullptr; + + auto resource_info = GetObjectInfo(pDstResource); + if (resource_info != nullptr) + { + in_pDstResource = static_cast(resource_info->object); + + // Currently, only deferred contexts have extra info. + if ((in_pSrcData != nullptr) && (replay_object_info->extra_info != nullptr)) + { + auto context_extra_info = GetExtraInfo(replay_object_info); + if ((context_extra_info != nullptr) && + graphics::dx12::NeedUpdateSubresourceAdjustment( + context_extra_info->needs_update_subresource_adjustment, in_pDstBox)) + { + auto resource_extra_info = GetExtraInfo(resource_info); + auto adjustment_offset = + graphics::dx12::GetUpdateSubresourceAdjustmentOffset(resource_extra_info->dimension, + resource_extra_info->format, + in_pDstBox, + SrcRowPitch, + SrcDepthPitch); + + if (adjustment_offset > 0) + { + GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, adjustment_offset); + auto offset = static_cast(adjustment_offset); + auto src_data_length = pSrcData->GetLength(); + auto adjustment_size = offset + src_data_length; + + static thread_local std::unique_ptr> adjustment_buffer; + if (adjustment_buffer == nullptr) + { + // Start with a very large buffer to avoid having to resize the buffer on each call to + // UpdateSubresource. So far, the largest resource requiring adjustment had a size of 131MB. + constexpr auto kDefaultUpdateSubresourceAdjustmentBufferSize = 132u * 1024u * 1024u; + adjustment_buffer = + std::make_unique>(kDefaultUpdateSubresourceAdjustmentBufferSize); + } + else if (adjustment_buffer->size() < offset) + { + GFXRECON_LOG_INFO("PERFORMANCE WARNING: The size of the buffer allocated for the " + "ID3D11DeviceContext::UpdateSubresource deferred context workaround was " + "insufficient and the buffer had to be resized."); + adjustment_buffer->resize(offset); + } + + adjustment_buffer->insert( + std::next(adjustment_buffer->begin(), offset), in_pSrcData, in_pSrcData + src_data_length); + + in_pSrcData = adjustment_buffer->data(); + } + } + } + } + + replay_object->UpdateSubresource( + in_pDstResource, DstSubresource, in_pDstBox, in_pSrcData, SrcRowPitch, SrcDepthPitch); + } +} + +void Dx12ReplayConsumerBase::Process_ID3D11DeviceContext1_UpdateSubresource1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch, + UINT CopyFlags) +{ + auto replay_object = MapObject(object_id); + if (replay_object != nullptr) + { + auto in_pDstResource = MapObject(pDstResource); + auto in_pSrcData = pSrcData->GetPointer(); + replay_object->UpdateSubresource1( + in_pDstResource, DstSubresource, pDstBox->GetPointer(), in_pSrcData, SrcRowPitch, SrcDepthPitch, CopyFlags); + } +} + +void Dx12ReplayConsumerBase::Process_ID3D11Device3_CreateTexture2D1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture2D) +{ + auto replay_object = MapObject(object_id); + if (replay_object != nullptr) + { + if (!ppTexture2D->IsNull()) + { + ppTexture2D->SetHandleLength(1); + } + + auto in_pDesc = pDesc->GetPointer(); + auto out_p_ppTexture2D = ppTexture2D->GetPointer(); + auto out_hp_ppTexture2D = ppTexture2D->GetHandlePointer(); + auto replay_result = replay_object->CreateTexture2D1(in_pDesc, pInitialData->GetPointer(), out_hp_ppTexture2D); + + if (SUCCEEDED(replay_result)) + { + auto object_info = DxObjectInfo{}; + auto resource_info = std::make_unique(); + + resource_info->dimension = D3D11_RESOURCE_DIMENSION_TEXTURE2D; + if (in_pDesc != nullptr) + { + resource_info->format = in_pDesc->Format; + } + object_info.extra_info = std::move(resource_info); + + AddObject(out_p_ppTexture2D, + out_hp_ppTexture2D, + std::move(object_info), + format::ApiCall_ID3D11Device3_CreateTexture2D1); + } + + CheckReplayResult("ID3D11Device3_CreateTexture2D1", return_value, replay_result); + } +} + +void Dx12ReplayConsumerBase::Process_ID3D11Device3_CreateTexture3D1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture3D) +{ + auto replay_object = MapObject(object_id); + if (replay_object != nullptr) + { + if (!ppTexture3D->IsNull()) + { + ppTexture3D->SetHandleLength(1); + } + + auto in_pDesc = pDesc->GetPointer(); + auto out_p_ppTexture3D = ppTexture3D->GetPointer(); + auto out_hp_ppTexture3D = ppTexture3D->GetHandlePointer(); + auto replay_result = replay_object->CreateTexture3D1(in_pDesc, pInitialData->GetPointer(), out_hp_ppTexture3D); + + if (SUCCEEDED(replay_result)) + { + auto object_info = DxObjectInfo{}; + auto resource_info = std::make_unique(); + + resource_info->dimension = D3D11_RESOURCE_DIMENSION_TEXTURE3D; + if (in_pDesc != nullptr) + { + resource_info->format = in_pDesc->Format; + } + object_info.extra_info = std::move(resource_info); + + AddObject(out_p_ppTexture3D, + out_hp_ppTexture3D, + std::move(object_info), + format::ApiCall_ID3D11Device3_CreateTexture3D1); + } + + CheckReplayResult("ID3D11Device3_CreateTexture3D1", return_value, replay_result); + } +} + +void Dx12ReplayConsumerBase::Process_ID3D11Device3_WriteToSubresource(const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) +{ + auto replay_object = MapObject(object_id); + if (replay_object != nullptr) + { + auto in_pDstResource = MapObject(pDstResource); + auto in_pSrcData = pSrcData->GetPointer(); + replay_object->WriteToSubresource( + in_pDstResource, DstSubresource, pDstBox->GetPointer(), in_pSrcData, SrcRowPitch, SrcDepthPitch); + } +} + IDXGIAdapter* Dx12ReplayConsumerBase::GetAdapter() { IDXGIAdapter* adapter_found = render_adapter_; @@ -4119,6 +4902,178 @@ void Dx12ReplayConsumerBase::OverrideIASetVertexBuffers( } } +HRESULT Dx12ReplayConsumerBase::OverrideDeviceContextMap( + DxObjectInfo* replay_object_info, + HRESULT return_value, + DxObjectInfo* resource_object_info, + UINT subresource, + D3D11_MAP map_type, + UINT map_flags, + StructPointerDecoder* mapped_resource) +{ + assert((replay_object_info != nullptr) && (replay_object_info->object != nullptr) && + (resource_object_info != nullptr) && (resource_object_info->object != nullptr) && + (mapped_resource != nullptr)); + + auto id_pointer = mapped_resource->GetMetaStructPointer(); + auto capture_data_pointer = mapped_resource->GetPointer(); + auto replay_data_pointer = mapped_resource->GetOutputPointer(); + auto replay_object = static_cast(replay_object_info->object); + auto resource_object = static_cast(resource_object_info->object); + + auto result = replay_object->Map(resource_object, subresource, map_type, map_flags, replay_data_pointer); + if (replay_data_pointer != nullptr) + { + if (SUCCEEDED(result) && (id_pointer != nullptr) && (id_pointer->pData != format::kNullHandleId) && + (replay_data_pointer->pData != nullptr)) + { + GFXRECON_ASSERT(resource_object_info->extra_info != nullptr); + + auto resource_info = GetExtraInfo(resource_object_info); + auto& memory_info = resource_info->mapped_memory_info[subresource][replay_object_info->capture_id]; + memory_info.memory_id = id_pointer->pData; + ++(memory_info.count); + + mapped_memory_[id_pointer->pData] = { + replay_data_pointer->pData, resource_object_info->capture_id, resource_info, + capture_data_pointer->RowPitch, capture_data_pointer->DepthPitch, replay_data_pointer->RowPitch, + replay_data_pointer->DepthPitch + }; + } + } + + return result; +} + +void Dx12ReplayConsumerBase::OverrideDeviceContextUnmap(DxObjectInfo* replay_object_info, + DxObjectInfo* resource_object_info, + UINT subresource) +{ + assert((replay_object_info != nullptr) && (replay_object_info->object != nullptr) && + (resource_object_info != nullptr) && (resource_object_info->object != nullptr)); + + auto replay_object = static_cast(replay_object_info->object); + auto resource_object = static_cast(resource_object_info->object); + + auto resource_info = GetExtraInfo(resource_object_info); + if (resource_info != nullptr) + { + auto subresource_entry = resource_info->mapped_memory_info.find(subresource); + if (subresource_entry != resource_info->mapped_memory_info.end()) + { + auto device_context_entry = subresource_entry->second.find(replay_object_info->capture_id); + if (device_context_entry != subresource_entry->second.end()) + { + auto& memory_info = device_context_entry->second; + + assert(memory_info.count > 0); + + --(memory_info.count); + if (memory_info.count == 0) + { + mapped_memory_.erase(memory_info.memory_id); + subresource_entry->second.erase(device_context_entry); + } + } + } + } + + replay_object->Unmap(resource_object, subresource); +} + +HRESULT Dx12ReplayConsumerBase::OverrideDeviceContextGetData(DxObjectInfo* replay_object_info, + HRESULT original_result, + DxObjectInfo* async_object_info, + PointerDecoder* data, + UINT data_size, + UINT get_data_flags) + +{ + assert((replay_object_info != nullptr) && (replay_object_info->object != nullptr) && + (async_object_info != nullptr) && (async_object_info->object != nullptr) && (data != nullptr)); + + auto replay_data_pointer = data->GetOutputPointer(); + auto replay_object = static_cast(replay_object_info->object); + auto async_object = static_cast(async_object_info->object); + + // Loop on success codes such as S_FALSE when S_OK was captured, to ensure that replay + // does not advance before an event is complete. + // If you find this loop to be infinite, consider adding a limit in the same way + // it is done for the Vulkan GetEventStatus and GetQueryPoolResults overrides. + auto result = S_FALSE; + do + { + result = replay_object->GetData(async_object, replay_data_pointer, data_size, get_data_flags); + } while ((original_result == S_OK) && (result == S_FALSE)); + + if ((result == S_OK) && (original_result == S_FALSE)) + { + // Silence warnings that replay returned S_OK (event complete), when capture returned S_FALSE (event not + // complete), by returning the value of original_result. + return S_FALSE; + } + + return result; +} + +HRESULT +Dx12ReplayConsumerBase::OverrideCreateDeferredContext(DxObjectInfo* replay_object_info, + HRESULT original_result, + UINT context_flags, + HandlePointerDecoder* deferred_context) +{ + return CreateDeferredContext( + replay_object_info, original_result, context_flags, deferred_context, &ID3D11Device::CreateDeferredContext); +} + +HRESULT +Dx12ReplayConsumerBase::OverrideCreateDeferredContext1(DxObjectInfo* replay_object_info, + HRESULT original_result, + UINT context_flags, + HandlePointerDecoder* deferred_context) +{ + return CreateDeferredContext( + replay_object_info, original_result, context_flags, deferred_context, &ID3D11Device1::CreateDeferredContext1); +} + +HRESULT +Dx12ReplayConsumerBase::OverrideCreateDeferredContext2(DxObjectInfo* replay_object_info, + HRESULT original_result, + UINT context_flags, + HandlePointerDecoder* deferred_context) +{ + return CreateDeferredContext( + replay_object_info, original_result, context_flags, deferred_context, &ID3D11Device2::CreateDeferredContext2); +} + +HRESULT +Dx12ReplayConsumerBase::OverrideCreateDeferredContext3(DxObjectInfo* replay_object_info, + HRESULT original_result, + UINT context_flags, + HandlePointerDecoder* deferred_context) +{ + return CreateDeferredContext( + replay_object_info, original_result, context_flags, deferred_context, &ID3D11Device3::CreateDeferredContext3); +} + +void Dx12ReplayConsumerBase::OverrideDevice3ReadFromSubresource(DxObjectInfo* replay_object_info, + uint64_t dst_data, + UINT dst_row_pitch, + UINT dst_depth_pitch, + DxObjectInfo* src_resource, + UINT src_subresource, + StructPointerDecoder* src_box) +{ + GFXRECON_UNREFERENCED_PARAMETER(replay_object_info); + GFXRECON_UNREFERENCED_PARAMETER(dst_data); + GFXRECON_UNREFERENCED_PARAMETER(dst_row_pitch); + GFXRECON_UNREFERENCED_PARAMETER(dst_depth_pitch); + GFXRECON_UNREFERENCED_PARAMETER(src_subresource); + GFXRECON_UNREFERENCED_PARAMETER(src_box); + + // TODO: Implement function +} + void Dx12ReplayConsumerBase::WaitForCommandListExecution(D3D12CommandQueueInfo* queue_info, uint64_t value) { GFXRECON_ASSERT(queue_info->sync_fence != nullptr); diff --git a/framework/decode/dx12_replay_consumer_base.h b/framework/decode/dx12_replay_consumer_base.h index 03d21930bc..78c90ac7fa 100644 --- a/framework/decode/dx12_replay_consumer_base.h +++ b/framework/decode/dx12_replay_consumer_base.h @@ -1,6 +1,7 @@ /* ** Copyright (c) 2021-2022 LunarG, Inc. ** Copyright (c) 2021-2024 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -37,6 +38,7 @@ #include "graphics/dx12_gpu_va_map.h" #include "graphics/dx12_resource_data_util.h" #include "graphics/dx12_image_renderer.h" +#include "graphics/dx11_image_renderer.h" #include "decode/screenshot_handler_base.h" #include "graphics/fps_info.h" #include "graphics/dx12_util.h" @@ -105,19 +107,17 @@ class Dx12ReplayConsumerBase : public Dx12Consumer std::vector& geometry_descs, const uint8_t* build_inputs_data) override; - virtual void Process_ID3D12Device_CheckFeatureSupport(format::HandleId object_id, - HRESULT original_result, - D3D12_FEATURE feature, - const void* capture_feature_data, - void* replay_feature_data, - UINT feature_data_size) override; + virtual void Process_ID3D12Device_CheckFeatureSupport(format::HandleId object_id, + HRESULT original_result, + D3D12_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) override; - virtual void Process_IDXGIFactory5_CheckFeatureSupport(format::HandleId object_id, - HRESULT original_result, - DXGI_FEATURE feature, - const void* capture_feature_data, - void* replay_feature_data, - UINT feature_data_size) override; + virtual void Process_IDXGIFactory5_CheckFeatureSupport(format::HandleId object_id, + HRESULT original_result, + DXGI_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) override; virtual void Process_ID3D12Resource_WriteToSubresource(format::HandleId object_id, HRESULT return_value, @@ -214,6 +214,88 @@ class Dx12ReplayConsumerBase : public Dx12Consumer Decoded_D3D12_CPU_DESCRIPTOR_HANDLE SrcDescriptorRangeStart, D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType); + virtual void Process_ID3D11Device_CheckFeatureSupport(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_FEATURE feature, + DxFeatureDataDecoder* feature_data, + UINT feature_data_size) override; + + virtual void Process_ID3D11Device_CreateBuffer(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppBuffer) override; + + virtual void + Process_ID3D11Device_CreateTexture1D(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture1D) override; + + virtual void + Process_ID3D11Device_CreateTexture2D(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture2D) override; + + virtual void + Process_ID3D11Device_CreateTexture3D(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture3D) override; + + virtual void Process_ID3D11DeviceContext_UpdateSubresource(const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) override; + + virtual void Process_ID3D11DeviceContext1_UpdateSubresource1(const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch, + UINT CopyFlags) override; + + virtual void + Process_ID3D11Device3_CreateTexture2D1(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture2D) override; + + virtual void + Process_ID3D11Device3_CreateTexture3D1(const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture3D) override; + + virtual void Process_ID3D11Device3_WriteToSubresource(const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + StructPointerDecoder* pDstBox, + PointerDecoder* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) override; + template T* MapObject(const format::HandleId id) { @@ -261,7 +343,7 @@ class Dx12ReplayConsumerBase : public Dx12Consumer if (handles_pointer != nullptr) { // The handle and ID array sizes are expected to be the same for mapping operations. - assert(handles_len == handles_pointer->GetLength()); + assert((handles_len == handles_pointer->GetLength()) || (handles_len == 0xffffffff)); handles = object_mapping::MapObjectArray(handles_pointer, object_info_table_); } @@ -269,25 +351,52 @@ class Dx12ReplayConsumerBase : public Dx12Consumer return handles; } + template + void SetDebugObjectName(T object, const format::HandleId p_id, format::ApiCallId call_id) + { + GFXRECON_ASSERT(object != nullptr); + const std::wstring constructed_name = ConstructObjectName(p_id, call_id); + + HRESULT res = object->SetPrivateData(WKPDID_D3DDebugObjectNameW, + static_cast(constructed_name.length() * sizeof(wchar_t)), + constructed_name.c_str()); + GFXRECON_ASSERT(SUCCEEDED(res)); + } + template void SetObjectName(const format::HandleId* p_id, T** pp_object, format::ApiCallId call_id) { if ((p_id != nullptr) && (pp_object != nullptr) && (*pp_object != nullptr)) { - // Restrict ID3D12Object name overriding to D3D12 create calls - if (format::GetApiCallFamily(call_id) == format::ApiFamilyId::ApiFamily_D3D12) + // Restrict ID3D12Object name overriding to D3D11 and D3D12 create calls + auto api_family = format::GetApiCallFamily(call_id); + if (api_family == format::ApiFamilyId::ApiFamily_D3D12) { IUnknown* iunknown = reinterpret_cast(*pp_object); graphics::dx12::ID3D12ObjectComPtr object; // See if this is a D3D12Object - if (SUCCEEDED(iunknown->QueryInterface(IID_ID3D12Object, reinterpret_cast(&object)))) + if (SUCCEEDED(iunknown->QueryInterface(IID_PPV_ARGS(&object)))) { - const std::wstring constructed_name = ConstructObjectName(*p_id, call_id); + SetDebugObjectName(object, *p_id, call_id); + } + } + else if (api_family == format::ApiFamilyId::ApiFamily_D3D11) + { + IUnknown* iunknown = reinterpret_cast(*pp_object); - HRESULT res = object->SetName(constructed_name.c_str()); - GFXRECON_ASSERT(res == S_OK); + graphics::dx12::ID3D11DeviceChildComPtr device_child; + graphics::dx12::ID3D11DeviceComPtr device; + + // See if this is a ID3D11DeviceChild or ID3D11Device. + if (SUCCEEDED(iunknown->QueryInterface(IID_PPV_ARGS(&device_child)))) + { + SetDebugObjectName(device_child, *p_id, call_id); + } + else if (SUCCEEDED(iunknown->QueryInterface(IID_PPV_ARGS(&device)))) + { + SetDebugObjectName(device, *p_id, call_id); } } } @@ -304,6 +413,75 @@ class Dx12ReplayConsumerBase : public Dx12Consumer } } + template + void AddObjects( + const format::HandleId* p_ids, size_t ids_len, T** pp_objects, size_t objects_len, format::ApiCallId call_id) + { + if ((p_ids != nullptr) && (pp_objects != nullptr)) + { + size_t len = objects_len; + if (ids_len < objects_len) + { + len = ids_len; + + // More objects were retrieved at replay than were retrieved at capture. The additional objects do not + // have IDs and cannot be added to the object table. Release the objects to avoid leaking. + for (auto i = ids_len; i < objects_len; ++i) + { + reinterpret_cast(pp_objects[i])->Release(); + } + } + + for (size_t i = 0; i < len; ++i) + { + object_mapping::AddObject(&p_ids[i], &pp_objects[i], &object_info_table_); + + if (options_.override_object_names) + { + SetObjectName(&p_ids[i], &pp_objects[i], call_id); + } + } + } + } + + template + void AddObjects(const format::HandleId* p_ids, + size_t ids_len, + T** pp_objects, + size_t objects_len, + std::vector&& initial_infos, + format::ApiCallId call_id) + { + if ((p_ids != nullptr) && (pp_objects != nullptr)) + { + size_t len = objects_len; + if (ids_len < objects_len) + { + len = ids_len; + + // More objects were retrieved at replay than were retrieved at capture. The additional objects do not + // have IDs and cannot be added to the object table. Release the objects to avoid leaking. + for (auto i = ids_len; i < objects_len; ++i) + { + reinterpret_cast(pp_objects[i])->Release(); + } + } + + assert(len <= initial_infos.size()); + + for (size_t i = 0; i < len; ++i) + { + auto info_iter = std::next(initial_infos.begin(), i); + object_mapping::AddObject(&p_ids[i], &pp_objects[i], std::move(*info_iter), &object_info_table_); + + if (options_.override_object_names) + { + SetObjectName(&p_ids[i], &pp_objects[i], call_id); + } + } + } + } + void CheckReplayResult(const char* call_name, HRESULT capture_result, HRESULT replay_result); void* PreProcessExternalObject(uint64_t object_id, format::ApiCallId call_id, const char* call_name); @@ -374,6 +552,32 @@ class Dx12ReplayConsumerBase : public Dx12Consumer Decoded_GUID riid, HandlePointerDecoder* device); + HRESULT OverrideD3D11CreateDevice(HRESULT original_result, + DxObjectInfo* adapter_info, + D3D_DRIVER_TYPE driver_type, + uint64_t software, + UINT flags, + PointerDecoder* feature_levels, + UINT num_feature_levels, + UINT sdk_version, + HandlePointerDecoder* device, + PointerDecoder* feature_level, + HandlePointerDecoder* immediate_context); + + HRESULT OverrideD3D11CreateDeviceAndSwapChain(HRESULT original_result, + DxObjectInfo* adapter_info, + D3D_DRIVER_TYPE driver_type, + uint64_t software, + UINT flags, + PointerDecoder* feature_levels, + UINT num_feature_levels, + UINT sdk_version, + StructPointerDecoder* swapchain_desc, + HandlePointerDecoder* swapchain, + HandlePointerDecoder* device, + PointerDecoder* feature_level, + HandlePointerDecoder* immediate_context); + void ProcessDxgiAdapterInfo(const format::DxgiAdapterInfoCommandHeader& adapter_info_header); void InitCommandQueueExtraInfo(ID3D12Device* device, HandlePointerDecoder* command_queue_decoder); @@ -852,6 +1056,52 @@ class Dx12ReplayConsumerBase : public Dx12Consumer void OverrideExecuteBundle(DxObjectInfo* replay_object_info, DxObjectInfo* command_list_object_info); + HRESULT OverrideDeviceContextMap(DxObjectInfo* replay_object_info, + HRESULT return_value, + DxObjectInfo* resource_object_info, + UINT subresource, + D3D11_MAP map_type, + UINT map_flags, + StructPointerDecoder* mapped_resource); + + void + OverrideDeviceContextUnmap(DxObjectInfo* replay_object_info, DxObjectInfo* resource_object_info, UINT subresource); + + HRESULT OverrideDeviceContextGetData(DxObjectInfo* replay_object_info, + HRESULT original_result, + DxObjectInfo* async_object_info, + PointerDecoder* data, + UINT data_size, + UINT get_data_flags); + + HRESULT OverrideCreateDeferredContext(DxObjectInfo* replay_object_info, + HRESULT original_result, + UINT context_flags, + HandlePointerDecoder* deferred_context); + + HRESULT OverrideCreateDeferredContext1(DxObjectInfo* replay_object_info, + HRESULT original_result, + UINT context_flags, + HandlePointerDecoder* deferred_context); + + HRESULT OverrideCreateDeferredContext2(DxObjectInfo* replay_object_info, + HRESULT original_result, + UINT context_flags, + HandlePointerDecoder* deferred_context); + + HRESULT OverrideCreateDeferredContext3(DxObjectInfo* replay_object_info, + HRESULT original_result, + UINT context_flags, + HandlePointerDecoder* deferred_context); + + void OverrideDevice3ReadFromSubresource(DxObjectInfo* replay_object_info, + uint64_t dst_data, + UINT dst_row_pitch, + UINT dst_depth_pitch, + DxObjectInfo* src_resource, + UINT src_subresource, + StructPointerDecoder* src_box); + const Dx12ObjectInfoTable& GetObjectInfoTable() const { return object_info_table_; } Dx12ObjectInfoTable& GetObjectInfoTable() { return object_info_table_; } @@ -895,14 +1145,72 @@ class Dx12ReplayConsumerBase : public Dx12Consumer Dx12ResourceValueMapper* GetResourceValueMapper() { return resource_value_mapper_.get(); } + template + void SetOutputArrayCount(format::HandleId object_id, VariableLengthArrayIndices index, CountT count) + { + auto info = GetObjectInfo(object_id); + if (info != nullptr) + { + info->array_counts[index] = static_cast(count); + } + } + + template + CountT GetOutputArrayCount(const char* func_name, + HRESULT original_result, + format::HandleId object_id, + VariableLengthArrayIndices index, + const PointerDecoder* original_count, + const ArrayT* original_array) + { + assert((original_count != nullptr) && (original_array != nullptr)); + + CountT replay_count = 0; + + if (!original_count->IsNull()) + { + // Start with array count set equal to the capture count and then adjust if the replay count is different. + replay_count = (*original_count->GetPointer()); + + // When the array parameter is not null, adjust the count using the value stored by the previous call with a + // null array parameter. But only adjust the replay array count if the call succeeded on capture so that + // errors generated at capture continue to be generated at replay. + if (!original_array->IsNull() && (original_result == S_OK)) + { + auto info = GetObjectInfo(object_id); + if (info != nullptr) + { + auto entry = info->array_counts.find(index); + if ((entry != info->array_counts.end()) && (entry->second != replay_count)) + { + GFXRECON_LOG_INFO("Replay adjusted the %s array count: capture count = %" PRIuPTR + ", replay count = %" PRIuPTR, + func_name, + static_cast(replay_count), + entry->second); + replay_count = static_cast(entry->second); + } + } + } + } + + return replay_count; + } + + protected: DxReplayOptions options_; std::unique_ptr dump_resources_{ nullptr }; private: struct MappedMemoryEntry { - void* data_pointer{ 0 }; - format::HandleId resource_id{ format::kNullHandleId }; + void* data_pointer{ 0 }; + format::HandleId resource_id{ format::kNullHandleId }; + D3D11ResourceInfo* resource_info{ nullptr }; + uint32_t capture_row_pitch_{ 0 }; + uint32_t capture_slice_pitch_{ 0 }; + uint32_t replay_row_pitch_{ 0 }; + uint32_t replay_slice_pitch_{ 0 }; }; struct ResourceInitInfo @@ -950,13 +1258,14 @@ class Dx12ReplayConsumerBase : public Dx12Consumer DxObjectInfo* restrict_to_output_info, HandlePointerDecoder* swapchain); - void SetSwapchainInfo(DxObjectInfo* info, - Window* window, - uint64_t hwnd_id, - HWND hwnd, - uint32_t image_count, - IUnknown* queue_iunknown, - bool windowed); + void SetSwapchainInfo(DxObjectInfo* info, + Window* window, + uint64_t hwnd_id, + HWND hwnd, + DXGI_SWAP_EFFECT swap_effect, + uint32_t image_count, + IUnknown* queue_iunknown, + bool windowed); void ResetSwapchainImages(DxObjectInfo* info, uint32_t buffer_count, uint32_t width, uint32_t height); @@ -1021,7 +1330,8 @@ class Dx12ReplayConsumerBase : public Dx12Consumer std::wstring ConstructObjectName(format::HandleId capture_id, format::ApiCallId call_id); - std::unique_ptr frame_buffer_renderer_; + std::unique_ptr frame_buffer_renderer11_; + std::unique_ptr frame_buffer_renderer12_; Dx12ObjectInfoTable object_info_table_; std::shared_ptr application_; std::unordered_set active_windows_; diff --git a/framework/decode/dx12_stats_consumer.h b/framework/decode/dx12_stats_consumer.h index e007b9c411..d4621d0f98 100644 --- a/framework/decode/dx12_stats_consumer.h +++ b/framework/decode/dx12_stats_consumer.h @@ -231,10 +231,22 @@ class Dx12StatsConsumer : public Dx12Consumer { if (swapchain_id_ == object_id) { - swapchain_width_ = Width; - swapchain_height_ = Height; + // When width and/or height are zero, the swapchain will resize its width and/or height to match the size of + // the client area of the target window. + if ((Width != 0) || (Height != 0)) + { + if (Width != 0) + { + swapchain_width_ = Width; + } + + if (Height != 0) + { + swapchain_height_ = Height; + } - swapchain_info_found_ = true; + swapchain_info_found_ = true; + } } } diff --git a/framework/decode/dx_feature_data_decoder.h b/framework/decode/dx_feature_data_decoder.h new file mode 100644 index 0000000000..fbc6ed7541 --- /dev/null +++ b/framework/decode/dx_feature_data_decoder.h @@ -0,0 +1,265 @@ +/* +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and associated documentation files (the "Software"), +** to deal in the Software without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Software, and to permit persons to whom the +** Software is furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +*/ + +#ifndef GFXRECON_DECODE_DX_FEATURE_DATA_DECODER_H +#define GFXRECON_DECODE_DX_FEATURE_DATA_DECODER_H + +#include "decode/pointer_decoder.h" +#include "decode/pointer_decoder_base.h" +#include "decode/struct_pointer_decoder.h" +#include "util/logging.h" + +GFXRECON_BEGIN_NAMESPACE(gfxrecon) +GFXRECON_BEGIN_NAMESPACE(decode) + +class DxFeatureDataDecoder +{ + public: + virtual ~DxFeatureDataDecoder() {} + + virtual bool IsNull() const = 0; + + virtual bool HasAddress() const = 0; + + virtual bool HasData() const = 0; + + virtual bool IsArray() const = 0; + + virtual uint32_t GetAttributeMask() const = 0; + + virtual uint64_t GetAddress() const = 0; + + virtual size_t GetLength() const = 0; + + virtual void* GetPointer() = 0; + + virtual const void* GetPointer() const = 0; + + virtual size_t GetOutputLength() const = 0; + + virtual void* GetOutputPointer() = 0; + + virtual const void* GetOutputPointer() const = 0; + + virtual void* AllocateOutputData(size_t len) = 0; + + template + PointerDecoder* GetPointerDecoder() + { + return reinterpret_cast*>(GetPointerDecoderBase()); + } + + template + const PointerDecoder* GetPointerDecoder() const + { + return reinterpret_cast*>(GetPointerDecoderBase()); + } + + template + StructPointerDecoder* GetStructPointerDecoder() + { + return reinterpret_cast*>(GetStructPointerDecoderBase()); + } + + template + const StructPointerDecoder* GetStructPointerDecoder() const + { + return reinterpret_cast*>(GetStructPointerDecoderBase()); + } + + protected: + virtual PointerDecoderBase* GetPointerDecoderBase() + { + GFXRECON_LOG_FATAL("Invalid DxFeatureDataDecoder type conversion"); + return nullptr; + } + + virtual const PointerDecoderBase* GetPointerDecoderBase() const + { + GFXRECON_LOG_FATAL("Invalid DxFeatureDataDecoder type conversion"); + return nullptr; + } + + virtual PointerDecoderBase* GetStructPointerDecoderBase() + { + GFXRECON_LOG_FATAL("Invalid DxFeatureDataDecoder type conversion"); + return nullptr; + } + + virtual const PointerDecoderBase* GetStructPointerDecoderBase() const + { + GFXRECON_LOG_FATAL("Invalid DxFeatureDataDecoder type conversion"); + return nullptr; + } +}; + +template +class DxFeatureDataPointerDecoder : public DxFeatureDataDecoder +{ + public: + // Generic override methods. + bool IsNull() const override { return decoder_.IsNull(); } + + bool HasAddress() const override { return decoder_.HasAddress(); } + + bool HasData() const override { return decoder_.HasData(); } + + bool IsArray() const override { return decoder_.IsArray(); } + + uint32_t GetAttributeMask() const override { return decoder_.GetAttributeMask(); } + + uint64_t GetAddress() const override { return decoder_.GetAddress(); } + + size_t GetLength() const override { return decoder_.GetLength(); } + + void* GetPointer() override { return GetPointerT(); } + + const void* GetPointer() const override { return GetPointerT(); } + + size_t GetOutputLength() const override { return decoder_.GetOutputLength(); } + + void* GetOutputPointer() override { return GetOutputPointerT(); } + + const void* GetOutputPointer() const override { return GetOutputPointerT(); } + + void* AllocateOutputData(size_t len) override { return AllocateOutputDataT(len); } + + // Type specific methods. + T* GetPointerT() { return decoder_.GetPointer(); } + + const T* GetPointerT() const { return decoder_.GetPointer(); } + + OutputT* GetOutputPointerT() { return decoder_.GetOutputPointer(); } + + const OutputT* GetOutputPointerT() const { return decoder_.GetOutputPointer(); } + + T* AllocateOutputDataT(size_t len) + { + if (!IsNull()) + { + const auto value = GetPointerT(); + GFXRECON_ASSERT(value != nullptr); + return decoder_.AllocateOutputData(len, *value); + } + + return decoder_.AllocateOutputData(len); + } + + // clang-format off + size_t DecodeInt8(const uint8_t* buffer, size_t buffer_size) { return decoder_.DecodeInt8(buffer, buffer_size); } + size_t DecodeUInt16(const uint8_t* buffer, size_t buffer_size) { return decoder_.DecodeUInt16(buffer, buffer_size); } + size_t DecodeInt32(const uint8_t* buffer, size_t buffer_size) { return decoder_.DecodeInt32(buffer, buffer_size); } + size_t DecodeUInt32(const uint8_t* buffer, size_t buffer_size) { return decoder_.DecodeUInt32(buffer, buffer_size); } + size_t DecodeInt64(const uint8_t* buffer, size_t buffer_size) { return decoder_.DecodeInt64(buffer, buffer_size); } + size_t DecodeUInt64(const uint8_t* buffer, size_t buffer_size) { return decoder_.DecodeUInt64(buffer, buffer_size); } + size_t DecodeFloat(const uint8_t* buffer, size_t buffer_size) { return decoder_.DecodeFloat(buffer, buffer_size); } + size_t DecodeVoidPtr(const uint8_t* buffer, size_t buffer_size) { return decoder_.DecodeVoidPtr(buffer, buffer_size); } + size_t DecodeUInt8(const uint8_t* buffer, size_t buffer_size) { return decoder_.DecodeUInt8(buffer, buffer_size); } + size_t DecodeVoid(const uint8_t* buffer, size_t buffer_size) { return decoder_.DecodeVoid(buffer, buffer_size); } + size_t DecodeEnum(const uint8_t* buffer, size_t buffer_size) { return decoder_.DecodeEnum(buffer, buffer_size); } + size_t DecodeFlags(const uint8_t* buffer, size_t buffer_size) { return decoder_.DecodeFlags>(buffer, buffer_size); } + size_t DecodeHandleId(const uint8_t* buffer, size_t buffer_size) { return decoder_.DecodeHandleId(buffer, buffer_size); } + size_t DecodeSizeT(const uint8_t* buffer, size_t buffer_size) { return decoder_.DecodeSizeT(buffer, buffer_size); } + // clang-format on + + protected: + PointerDecoderBase* GetPointerDecoderBase() override { return &decoder_; } + + const PointerDecoderBase* GetPointerDecoderBase() const override { return &decoder_; } + + private: + PointerDecoder decoder_; +}; + +template +class DxFeatureDataStructPointerDecoder : public DxFeatureDataDecoder +{ + public: + // Generic override methods. + bool IsNull() const override { return decoder_.IsNull(); } + + bool HasAddress() const override { return decoder_.HasAddress(); } + + bool HasData() const override { return decoder_.HasData(); } + + bool IsArray() const override { return decoder_.IsArray(); } + + uint32_t GetAttributeMask() const override { return decoder_.GetAttributeMask(); } + + uint64_t GetAddress() const override { return decoder_.GetAddress(); } + + size_t GetLength() const override { return decoder_.GetLength(); } + + void* GetPointer() override { return GetPointerT(); } + + const void* GetPointer() const override { return GetPointerT(); } + + size_t GetOutputLength() const override { return decoder_.GetOutputLength(); } + + void* GetOutputPointer() override { return GetOutputPointerT(); } + + const void* GetOutputPointer() const override { return GetOutputPointerT(); } + + void* AllocateOutputData(size_t len) override { return AllocateOutputDataT(len); } + + // Type specific methods. + T* GetMetaStructPointerT() { return decoder_.GetMetaStructPointer(); } + + const T* GetMetaStructPointerT() const { return decoder_.GetMetaStructPointer(); } + + typename T::struct_type* GetPointerT() { return decoder_.GetPointer(); } + + const typename T::struct_type* GetPointerT() const { return decoder_.GetPointer(); } + + typename T::struct_type* GetOutputPointerT() { return decoder_.GetOutputPointer(); } + + const typename T::struct_type* GetOutputPointerT() const { return decoder_.GetOutputPointer(); } + + typename T::struct_type* AllocateOutputDataT(size_t len) + { + if (!IsNull()) + { + // Some feature data values are inout parameters, requiring the memory allocated for output data to be + // initialized with the decoded value to ensure that it contains the expected in parameter values. + const auto value = GetPointerT(); + GFXRECON_ASSERT(value != nullptr); + return decoder_.AllocateOutputData(len, *value); + } + + return decoder_.AllocateOutputData(len); + } + + size_t Decode(const uint8_t* buffer, size_t buffer_size) { return decoder_.Decode(buffer, buffer_size); } + + protected: + PointerDecoderBase* GetStructPointerDecoderBase() override { return &decoder_; } + + const PointerDecoderBase* GetStructPointerDecoderBase() const override { return &decoder_; } + + private: + StructPointerDecoder decoder_; +}; + +GFXRECON_END_NAMESPACE(decode) +GFXRECON_END_NAMESPACE(gfxrecon) + +#endif // GFXRECON_DECODE_DX_FEATURE_DATA_DECODER_H diff --git a/framework/decode/file_processor.cpp b/framework/decode/file_processor.cpp index 304fe3bc2f..501f3999c1 100644 --- a/framework/decode/file_processor.cpp +++ b/framework/decode/file_processor.cpp @@ -2,6 +2,7 @@ ** Copyright (c) 2018-2020,2022 Valve Corporation ** Copyright (c) 2018-2020,2022 LunarG, Inc. ** Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -886,7 +887,10 @@ bool FileProcessor::ProcessMetaData(const format::BlockHeader& block_header, for { for (auto decoder : decoders_) { - decoder->DispatchDriverInfo(header.thread_id, header); + if (decoder->SupportsMetaDataId(meta_data_id)) + { + decoder->DispatchDriverInfo(header.thread_id, header); + } } } } diff --git a/framework/decode/pointer_decoder.h b/framework/decode/pointer_decoder.h index fbe126324c..47e540390e 100644 --- a/framework/decode/pointer_decoder.h +++ b/framework/decode/pointer_decoder.h @@ -205,7 +205,7 @@ class PointerDecoder : public PointerDecoderBase } else { - // The external memory cacpacity is not large enough to contain the full decoded array. + // The external memory capacity is not large enough to contain the full decoded array. ValueDecoder::DecodeArrayFrom(buffer, buffer_size, data_, capacity_); GFXRECON_LOG_WARNING("Pointer decoder's external memory capacity (%" PRIuPTR @@ -229,7 +229,7 @@ class PointerDecoder : public PointerDecoderBase size_t capacity_; ///< Size of external memory allocation referenced by #data_ when #is_memory_external_ is true. bool is_memory_external_; ///< Indicates that the memory referenced by #data_ is an external allocation. - /// Optional memory allocated for output pramaters when retrieving data from a function call. Allows both the data + /// Optional memory allocated for output parameters when retrieving data from a function call. Allows both the data /// read from the file and the data retrieved from an API call to exist simultaneously, allowing the values to be /// compared. OutputT* output_data_{ nullptr }; diff --git a/framework/decode/string_decoder.h b/framework/decode/string_decoder.h index a6c18a52a8..14caa3e9ab 100644 --- a/framework/decode/string_decoder.h +++ b/framework/decode/string_decoder.h @@ -1,6 +1,7 @@ /* ** Copyright (c) 2018-2020 Valve Corporation ** Copyright (c) 2018-2020 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -46,6 +47,18 @@ class BasicStringDecoder : public PointerDecoderBase const CharT* GetPointer() const { return data_; } + CharT* GetOutputPointer() { return output_data_; } + + CharT* AllocateOutputData(size_t len) + { + output_len_ = len; + + // Default initialize output_data_ + output_data_ = DecodeAllocator::Allocate(len); + + return output_data_; + } + void SetExternalMemory(CharT* data, size_t capacity) { if ((data != nullptr) && (capacity > 0)) @@ -117,9 +130,17 @@ class BasicStringDecoder : public PointerDecoderBase } private: + /// Memory to hold decoded data. Points to an internal allocation when #is_memory_external_ is false and + /// to an externally provided allocation when #is_memory_external_ is true. CharT* data_; size_t capacity_; bool is_memory_external_; + + /// Optional memory allocated for output parameters when retrieving data from a function call. Allows both the data + /// read from the file and the data retrieved from an API call to exist simultaneously, allowing the values to be + /// compared. + CharT* output_data_{ nullptr }; + size_t output_len_; ///< Size of #output_data_. }; typedef BasicStringDecoder StringDecoder; diff --git a/framework/encode/CMakeLists.txt b/framework/encode/CMakeLists.txt index 8e9e2eb0fd..d9f82f0a02 100644 --- a/framework/encode/CMakeLists.txt +++ b/framework/encode/CMakeLists.txt @@ -47,6 +47,8 @@ target_sources(gfxrecon_encode $<$:${CMAKE_CURRENT_LIST_DIR}/custom_dx12_api_call_encoders.cpp> $<$:${CMAKE_CURRENT_LIST_DIR}/custom_dx12_array_size_2d.h> $<$:${CMAKE_CURRENT_LIST_DIR}/custom_dx12_wrapper_commands.h> + $<$:${CMAKE_CURRENT_LIST_DIR}/custom_dx12_wrapper_creators.h> + $<$:${CMAKE_CURRENT_LIST_DIR}/custom_dx12_wrapper_creators.cpp> $<$:${CMAKE_CURRENT_LIST_DIR}/custom_dx12_struct_encoders.h> $<$:${CMAKE_CURRENT_LIST_DIR}/custom_dx12_struct_encoders.cpp> $<$:${CMAKE_CURRENT_LIST_DIR}/custom_dx12_struct_unwrappers.h> @@ -55,6 +57,7 @@ target_sources(gfxrecon_encode $<$:${CMAKE_CURRENT_LIST_DIR}/custom_dx12_command_list_util.cpp> ${CMAKE_CURRENT_LIST_DIR}/custom_vulkan_struct_handle_wrappers.h ${CMAKE_CURRENT_LIST_DIR}/custom_vulkan_struct_handle_wrappers.cpp + $<$:${CMAKE_CURRENT_LIST_DIR}/d3d11_dispatch_table.h> $<$:${CMAKE_CURRENT_LIST_DIR}/d3d12_capture_manager.h> $<$:${CMAKE_CURRENT_LIST_DIR}/d3d12_capture_manager.cpp> $<$:${CMAKE_CURRENT_LIST_DIR}/d3d12_dispatch_table.h> diff --git a/framework/encode/api_capture_manager.h b/framework/encode/api_capture_manager.h index 6f38c35283..4705857a6a 100644 --- a/framework/encode/api_capture_manager.h +++ b/framework/encode/api_capture_manager.h @@ -188,6 +188,14 @@ class ApiCaptureManager } void WriteToFile(const void* data, size_t size) { common_manager_->WriteToFile(data, size); } + // TODO: Temporary function to allow D3D12 and D3D11 API IDs to be written from the same process, needed until + // D3D11, D3D12, and DXGI can each have their own separate API capture managers within the same process. + void WriteFillMemoryCmd( + format::ApiFamilyId api_family, format::HandleId memory_id, uint64_t offset, uint64_t size, const void* data) + { + common_manager_->WriteFillMemoryCmd(api_family, memory_id, offset, size, data); + } + template void CombineAndWriteToFile(const std::pair (&buffers)[N]) { diff --git a/framework/encode/custom_dx12_api_call_encoders.cpp b/framework/encode/custom_dx12_api_call_encoders.cpp index 4c8a130315..78fc941355 100644 --- a/framework/encode/custom_dx12_api_call_encoders.cpp +++ b/framework/encode/custom_dx12_api_call_encoders.cpp @@ -1,5 +1,6 @@ /* ** Copyright (c) 2021 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to @@ -33,6 +34,78 @@ GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(encode) +static auto GetResourceInfo(ID3D11Resource_Wrapper* wrapper) +{ + auto info = std::shared_ptr{}; + auto dimension = D3D11_RESOURCE_DIMENSION{}; + auto wrapped_object = wrapper->GetWrappedObjectAs(); + + wrapped_object->GetType(&dimension); + + switch (dimension) + { + case D3D11_RESOURCE_DIMENSION_BUFFER: + info = static_cast(wrapper)->GetObjectInfo(); + break; + case D3D11_RESOURCE_DIMENSION_TEXTURE1D: + info = static_cast(wrapper)->GetObjectInfo(); + break; + case D3D11_RESOURCE_DIMENSION_TEXTURE2D: + info = static_cast(wrapper)->GetObjectInfo(); + break; + case D3D11_RESOURCE_DIMENSION_TEXTURE3D: + info = static_cast(wrapper)->GetObjectInfo(); + break; + default: + GFXRECON_LOG_ERROR("Mapped ID3D11Resource object with capture ID = %" PRIx64 + " has type of D3D11_RESOURCE_DIMENSION_UNKNOWN ", + wrapper->GetCaptureId()); + break; + } + + return info; +} + +static void EncodeD3D11SubresourceDataPtr(ParameterEncoder* encoder, + const D3D11_BUFFER_DESC* desc, + const D3D11_SUBRESOURCE_DATA* value) +{ + GFXRECON_ASSERT(desc != nullptr); + + encoder->EncodeStructPtrPreamble(value); + if (value != nullptr) + { + auto initial_data_size = 0; + if (desc != nullptr) + { + initial_data_size = desc->ByteWidth; + } + + encoder->EncodeVoidArray(value->pSysMem, initial_data_size); + encoder->EncodeUInt32Value(value->SysMemPitch); + encoder->EncodeUInt32Value(value->SysMemSlicePitch); + } +} + +template +static void +EncodeD3D11SubresourceDataPtr(ParameterEncoder* encoder, const ResourceDesc* desc, const D3D11_SUBRESOURCE_DATA* value) +{ + auto array_size = graphics::dx12::GetNumSubresources(desc); + encoder->EncodeStructArrayPreamble(value, array_size); + if (value != nullptr) + { + for (auto i = 0u; i < array_size; ++i) + { + auto subresource_value = &value[i]; + auto initial_data_size = graphics::dx12::GetSubresourceSize(desc, subresource_value, i); + encoder->EncodeVoidArray(subresource_value->pSysMem, initial_data_size); + encoder->EncodeUInt32Value(subresource_value->SysMemPitch); + encoder->EncodeUInt32Value(subresource_value->SysMemSlicePitch); + } + } +} + void Encode_ID3D12Device_CheckFeatureSupport(ID3D12Device_Wrapper* wrapper, HRESULT result, D3D12_FEATURE Feature, @@ -99,5 +172,292 @@ void Encode_ID3D12Resource_WriteToSubresource(ID3D12Resource_Wrapper* wrapper, } } +void Encode_ID3D11DeviceContext_UpdateSubresource(ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Resource* pDstResource, + UINT DstSubresource, + const D3D11_BOX* pDstBox, + const void* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture( + format::ApiCallId::ApiCall_ID3D11DeviceContext_UpdateSubresource, wrapper->GetCaptureId()); + if (encoder) + { + encoder->EncodeObjectValue(pDstResource); + encoder->EncodeUInt32Value(DstSubresource); + EncodeStructPtr(encoder, pDstBox); + + auto resource_wrapper = reinterpret_cast(pDstResource); + auto resource_info = GetResourceInfo(resource_wrapper); + auto size = graphics::dx12::GetSubresourceWriteDataSize(resource_info->dimension, + resource_info->format, + resource_info->width, + resource_info->height, + resource_info->depth_or_array_size, + resource_info->mip_levels, + DstSubresource, + pDstBox, + SrcRowPitch, + SrcDepthPitch); + GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, size); + + auto adjusted_src_data = reinterpret_cast(pSrcData); + auto context_info = wrapper->GetObjectInfo(); + if (graphics::dx12::NeedUpdateSubresourceAdjustment(context_info->needs_update_subresource_adjustment, pDstBox)) + { + // To obtain the address of the data to be used for the update, the pSrcData offset adjustment that the + // calling application was required to apply must be removed. + adjusted_src_data += graphics::dx12::GetUpdateSubresourceAdjustmentOffset( + resource_info->dimension, resource_info->format, pDstBox, SrcRowPitch, SrcDepthPitch); + } + + encoder->EncodeVoidArray(adjusted_src_data, static_cast(size)); + encoder->EncodeUInt32Value(SrcRowPitch); + encoder->EncodeUInt32Value(SrcDepthPitch); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device_CheckFeatureSupport(ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + D3D11_FEATURE Feature, + void* pFeatureSupportData, + UINT FeatureSupportDataSize) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture( + format::ApiCallId::ApiCall_ID3D11Device_CheckFeatureSupport, wrapper->GetCaptureId()); + if (encoder) + { + encoder->EncodeEnumValue(Feature); + EncodeD3D11FeatureStruct(encoder, pFeatureSupportData, Feature); + encoder->EncodeUInt32Value(FeatureSupportDataSize); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device_CreateBuffer(ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_BUFFER_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Buffer** ppBuffer) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture( + format::ApiCallId::ApiCall_ID3D11Device_CreateBuffer, wrapper->GetCaptureId()); + if (encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pDesc); + EncodeD3D11SubresourceDataPtr(encoder, pDesc, pInitialData); + encoder->EncodeObjectPtr(ppBuffer, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture( + return_value, IID_ID3D11Buffer, reinterpret_cast(ppBuffer), wrapper); + } +} + +void Encode_ID3D11Device_CreateTexture1D(ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_TEXTURE1D_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture1D** ppTexture1D) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture( + format::ApiCallId::ApiCall_ID3D11Device_CreateTexture1D, wrapper->GetCaptureId()); + if (encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pDesc); + EncodeD3D11SubresourceDataPtr(encoder, pDesc, pInitialData); + encoder->EncodeObjectPtr(ppTexture1D, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture( + return_value, IID_ID3D11Texture1D, reinterpret_cast(ppTexture1D), wrapper); + } +} + +void Encode_ID3D11Device_CreateTexture2D(ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_TEXTURE2D_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture2D** ppTexture2D) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture( + format::ApiCallId::ApiCall_ID3D11Device_CreateTexture2D, wrapper->GetCaptureId()); + if (encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pDesc); + EncodeD3D11SubresourceDataPtr(encoder, pDesc, pInitialData); + encoder->EncodeObjectPtr(ppTexture2D, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture( + return_value, IID_ID3D11Texture2D, reinterpret_cast(ppTexture2D), wrapper); + } +} + +void Encode_ID3D11Device_CreateTexture3D(ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_TEXTURE3D_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture3D** ppTexture3D) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture( + format::ApiCallId::ApiCall_ID3D11Device_CreateTexture3D, wrapper->GetCaptureId()); + if (encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pDesc); + EncodeD3D11SubresourceDataPtr(encoder, pDesc, pInitialData); + encoder->EncodeObjectPtr(ppTexture3D, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture( + return_value, IID_ID3D11Texture3D, reinterpret_cast(ppTexture3D), wrapper); + } +} + +void Encode_ID3D11DeviceContext1_UpdateSubresource1(ID3D11DeviceContext1_Wrapper* wrapper, + ID3D11Resource* pDstResource, + UINT DstSubresource, + const D3D11_BOX* pDstBox, + const void* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch, + UINT CopyFlags) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture( + format::ApiCallId::ApiCall_ID3D11DeviceContext1_UpdateSubresource1, wrapper->GetCaptureId()); + if (encoder) + { + encoder->EncodeObjectValue(pDstResource); + encoder->EncodeUInt32Value(DstSubresource); + EncodeStructPtr(encoder, pDstBox); + + auto resource_wrapper = reinterpret_cast(pDstResource); + auto info = GetResourceInfo(resource_wrapper); + auto size = graphics::dx12::GetSubresourceWriteDataSize(info->dimension, + info->format, + info->width, + info->height, + info->depth_or_array_size, + info->mip_levels, + DstSubresource, + pDstBox, + SrcRowPitch, + SrcDepthPitch); + GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, size); + + encoder->EncodeVoidArray(pSrcData, static_cast(size)); + + encoder->EncodeUInt32Value(SrcRowPitch); + encoder->EncodeUInt32Value(SrcDepthPitch); + encoder->EncodeUInt32Value(CopyFlags); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device3_CreateTexture2D1(ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + const D3D11_TEXTURE2D_DESC1* pDesc1, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture2D1** ppTexture2D) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture( + format::ApiCallId::ApiCall_ID3D11Device3_CreateTexture2D1, wrapper->GetCaptureId()); + if (encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pDesc1); + EncodeD3D11SubresourceDataPtr(encoder, pDesc1, pInitialData); + encoder->EncodeObjectPtr(ppTexture2D, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture( + return_value, IID_ID3D11Texture2D1, reinterpret_cast(ppTexture2D), wrapper); + } +} + +void Encode_ID3D11Device3_CreateTexture3D1(ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + const D3D11_TEXTURE3D_DESC1* pDesc1, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture3D1** ppTexture3D) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture( + format::ApiCallId::ApiCall_ID3D11Device3_CreateTexture3D1, wrapper->GetCaptureId()); + if (encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pDesc1); + EncodeD3D11SubresourceDataPtr(encoder, pDesc1, pInitialData); + encoder->EncodeObjectPtr(ppTexture3D, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture( + return_value, IID_ID3D11Texture3D1, reinterpret_cast(ppTexture3D), wrapper); + } +} + +void Encode_ID3D11Device3_WriteToSubresource(ID3D11Device3_Wrapper* wrapper, + ID3D11Resource* pDstResource, + UINT DstSubresource, + const D3D11_BOX* pDstBox, + const void* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture( + format::ApiCallId::ApiCall_ID3D11Device3_WriteToSubresource, wrapper->GetCaptureId()); + if (encoder) + { + encoder->EncodeObjectValue(pDstResource); + encoder->EncodeUInt32Value(DstSubresource); + EncodeStructPtr(encoder, pDstBox); + + auto resource_wrapper = reinterpret_cast(pDstResource); + auto info = GetResourceInfo(resource_wrapper); + auto size = graphics::dx12::GetSubresourceWriteDataSize(info->dimension, + info->format, + info->width, + info->height, + info->depth_or_array_size, + info->mip_levels, + DstSubresource, + pDstBox, + SrcRowPitch, + SrcDepthPitch); + GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, size); + + encoder->EncodeVoidArray(pSrcData, static_cast(size)); + + encoder->EncodeUInt32Value(SrcRowPitch); + encoder->EncodeUInt32Value(SrcDepthPitch); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/custom_dx12_api_call_encoders.h b/framework/encode/custom_dx12_api_call_encoders.h index cd43833048..d2ef36708f 100644 --- a/framework/encode/custom_dx12_api_call_encoders.h +++ b/framework/encode/custom_dx12_api_call_encoders.h @@ -1,5 +1,6 @@ /* ** Copyright (c) 2021 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a copy ** of this software and associated documentation files (the "Software"), to @@ -28,6 +29,7 @@ #include "generated/generated_dx12_wrappers.h" #include "util/defines.h" +#include #include #include @@ -54,6 +56,73 @@ void Encode_ID3D12Resource_WriteToSubresource(ID3D12Resource_Wrapper* wrapper, UINT SrcRowPitch, UINT SrcDepthPitch); +void Encode_ID3D11DeviceContext_UpdateSubresource(ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Resource* pDstResource, + UINT DstSubresource, + const D3D11_BOX* pDstBox, + const void* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch); + +void Encode_ID3D11Device_CheckFeatureSupport(ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + D3D11_FEATURE Feature, + void* pFeatureSupportData, + UINT FeatureSupportDataSize); + +void Encode_ID3D11Device_CreateBuffer(ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_BUFFER_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Buffer** ppBuffer); + +void Encode_ID3D11Device_CreateTexture1D(ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_TEXTURE1D_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture1D** ppTexture1D); + +void Encode_ID3D11Device_CreateTexture2D(ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_TEXTURE2D_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture2D** ppTexture2D); + +void Encode_ID3D11Device_CreateTexture3D(ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_TEXTURE3D_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture3D** ppTexture3D); + +void Encode_ID3D11DeviceContext1_UpdateSubresource1(ID3D11DeviceContext1_Wrapper* wrapper, + ID3D11Resource* pDstResource, + UINT DstSubresource, + const D3D11_BOX* pDstBox, + const void* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch, + UINT CopyFlags); + +void Encode_ID3D11Device3_CreateTexture2D1(ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + const D3D11_TEXTURE2D_DESC1* pDesc1, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture2D1** ppTexture2D); + +void Encode_ID3D11Device3_CreateTexture3D1(ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + const D3D11_TEXTURE3D_DESC1* pDesc1, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture3D1** ppTexture3D); + +void Encode_ID3D11Device3_WriteToSubresource(ID3D11Device3_Wrapper* wrapper, + ID3D11Resource* pDstResource, + UINT DstSubresource, + const D3D11_BOX* pDstBox, + const void* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch); + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/custom_dx12_struct_encoders.cpp b/framework/encode/custom_dx12_struct_encoders.cpp index 223cc8ecab..3bac1a63c7 100644 --- a/framework/encode/custom_dx12_struct_encoders.cpp +++ b/framework/encode/custom_dx12_struct_encoders.cpp @@ -1,6 +1,7 @@ /* ** Copyright (c) 2021 LunarG, Inc. ** Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -446,6 +447,315 @@ void EncodeStruct(ParameterEncoder* encoder, const D3D12_RENDER_PASS_ENDING_ACCE } } +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BUFFER_SRV& value) +{ + encoder->EncodeUInt32Value(value.FirstElement); + encoder->EncodeUInt32Value(value.NumElements); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_SHADER_RESOURCE_VIEW_DESC& value) +{ + encoder->EncodeEnumValue(value.Format); + encoder->EncodeEnumValue(value.ViewDimension); + + switch (value.ViewDimension) + { + case D3D11_SRV_DIMENSION_BUFFER: + EncodeStruct(encoder, value.Buffer); + break; + case D3D11_SRV_DIMENSION_TEXTURE1D: + EncodeStruct(encoder, value.Texture1D); + break; + case D3D11_SRV_DIMENSION_TEXTURE1DARRAY: + EncodeStruct(encoder, value.Texture1DArray); + break; + case D3D11_SRV_DIMENSION_TEXTURE2D: + EncodeStruct(encoder, value.Texture2D); + break; + case D3D11_SRV_DIMENSION_TEXTURE2DARRAY: + EncodeStruct(encoder, value.Texture2DArray); + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMS: + EncodeStruct(encoder, value.Texture2DMS); + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY: + EncodeStruct(encoder, value.Texture2DMSArray); + break; + case D3D11_SRV_DIMENSION_TEXTURE3D: + EncodeStruct(encoder, value.Texture3D); + break; + case D3D11_SRV_DIMENSION_TEXTURECUBE: + EncodeStruct(encoder, value.TextureCube); + break; + case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY: + EncodeStruct(encoder, value.TextureCubeArray); + break; + case D3D11_SRV_DIMENSION_BUFFEREX: + EncodeStruct(encoder, value.BufferEx); + break; + default: + break; + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BUFFER_RTV& value) +{ + encoder->EncodeUInt32Value(value.FirstElement); + encoder->EncodeUInt32Value(value.NumElements); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RENDER_TARGET_VIEW_DESC& value) +{ + encoder->EncodeEnumValue(value.Format); + encoder->EncodeEnumValue(value.ViewDimension); + + switch (value.ViewDimension) + { + case D3D11_RTV_DIMENSION_BUFFER: + EncodeStruct(encoder, value.Buffer); + break; + case D3D11_RTV_DIMENSION_TEXTURE1D: + EncodeStruct(encoder, value.Texture1D); + break; + case D3D11_RTV_DIMENSION_TEXTURE1DARRAY: + EncodeStruct(encoder, value.Texture1DArray); + break; + case D3D11_RTV_DIMENSION_TEXTURE2D: + EncodeStruct(encoder, value.Texture2D); + break; + case D3D11_RTV_DIMENSION_TEXTURE2DARRAY: + EncodeStruct(encoder, value.Texture2DArray); + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMS: + EncodeStruct(encoder, value.Texture2DMS); + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY: + EncodeStruct(encoder, value.Texture2DMSArray); + break; + case D3D11_RTV_DIMENSION_TEXTURE3D: + EncodeStruct(encoder, value.Texture3D); + break; + default: + break; + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_DEPTH_STENCIL_VIEW_DESC& value) +{ + encoder->EncodeEnumValue(value.Format); + encoder->EncodeEnumValue(value.ViewDimension); + encoder->EncodeEnumValue(value.Flags); + + switch (value.ViewDimension) + { + case D3D11_DSV_DIMENSION_TEXTURE1D: + EncodeStruct(encoder, value.Texture1D); + break; + case D3D11_DSV_DIMENSION_TEXTURE1DARRAY: + EncodeStruct(encoder, value.Texture1DArray); + break; + case D3D11_DSV_DIMENSION_TEXTURE2D: + EncodeStruct(encoder, value.Texture2D); + break; + case D3D11_DSV_DIMENSION_TEXTURE2DARRAY: + EncodeStruct(encoder, value.Texture2DArray); + break; + case D3D11_DSV_DIMENSION_TEXTURE2DMS: + EncodeStruct(encoder, value.Texture2DMS); + break; + case D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY: + EncodeStruct(encoder, value.Texture2DMSArray); + break; + default: + break; + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_UNORDERED_ACCESS_VIEW_DESC& value) +{ + encoder->EncodeEnumValue(value.Format); + encoder->EncodeEnumValue(value.ViewDimension); + + switch (value.ViewDimension) + { + case D3D11_UAV_DIMENSION_BUFFER: + EncodeStruct(encoder, value.Buffer); + break; + case D3D11_UAV_DIMENSION_TEXTURE1D: + EncodeStruct(encoder, value.Texture1D); + break; + case D3D11_UAV_DIMENSION_TEXTURE1DARRAY: + EncodeStruct(encoder, value.Texture1DArray); + break; + case D3D11_UAV_DIMENSION_TEXTURE2D: + EncodeStruct(encoder, value.Texture2D); + break; + case D3D11_UAV_DIMENSION_TEXTURE2DARRAY: + EncodeStruct(encoder, value.Texture2DArray); + break; + case D3D11_UAV_DIMENSION_TEXTURE3D: + EncodeStruct(encoder, value.Texture3D); + break; + default: + break; + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_SHADER_RESOURCE_VIEW_DESC1& value) +{ + encoder->EncodeEnumValue(value.Format); + encoder->EncodeEnumValue(value.ViewDimension); + + switch (value.ViewDimension) + { + case D3D11_SRV_DIMENSION_BUFFER: + EncodeStruct(encoder, value.Buffer); + break; + case D3D11_SRV_DIMENSION_TEXTURE1D: + EncodeStruct(encoder, value.Texture1D); + break; + case D3D11_SRV_DIMENSION_TEXTURE1DARRAY: + EncodeStruct(encoder, value.Texture1DArray); + break; + case D3D11_SRV_DIMENSION_TEXTURE2D: + EncodeStruct(encoder, value.Texture2D); + break; + case D3D11_SRV_DIMENSION_TEXTURE2DARRAY: + EncodeStruct(encoder, value.Texture2DArray); + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMS: + EncodeStruct(encoder, value.Texture2DMS); + break; + case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY: + EncodeStruct(encoder, value.Texture2DMSArray); + break; + case D3D11_SRV_DIMENSION_TEXTURE3D: + EncodeStruct(encoder, value.Texture3D); + break; + case D3D11_SRV_DIMENSION_TEXTURECUBE: + EncodeStruct(encoder, value.TextureCube); + break; + case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY: + EncodeStruct(encoder, value.TextureCubeArray); + break; + case D3D11_SRV_DIMENSION_BUFFEREX: + EncodeStruct(encoder, value.BufferEx); + break; + default: + break; + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RENDER_TARGET_VIEW_DESC1& value) +{ + encoder->EncodeEnumValue(value.Format); + encoder->EncodeEnumValue(value.ViewDimension); + + switch (value.ViewDimension) + { + case D3D11_RTV_DIMENSION_BUFFER: + EncodeStruct(encoder, value.Buffer); + break; + case D3D11_RTV_DIMENSION_TEXTURE1D: + EncodeStruct(encoder, value.Texture1D); + break; + case D3D11_RTV_DIMENSION_TEXTURE1DARRAY: + EncodeStruct(encoder, value.Texture1DArray); + break; + case D3D11_RTV_DIMENSION_TEXTURE2D: + EncodeStruct(encoder, value.Texture2D); + break; + case D3D11_RTV_DIMENSION_TEXTURE2DARRAY: + EncodeStruct(encoder, value.Texture2DArray); + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMS: + EncodeStruct(encoder, value.Texture2DMS); + break; + case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY: + EncodeStruct(encoder, value.Texture2DMSArray); + break; + case D3D11_RTV_DIMENSION_TEXTURE3D: + EncodeStruct(encoder, value.Texture3D); + break; + default: + break; + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_UNORDERED_ACCESS_VIEW_DESC1& value) +{ + encoder->EncodeEnumValue(value.Format); + encoder->EncodeEnumValue(value.ViewDimension); + + switch (value.ViewDimension) + { + case D3D11_UAV_DIMENSION_BUFFER: + EncodeStruct(encoder, value.Buffer); + break; + case D3D11_UAV_DIMENSION_TEXTURE1D: + EncodeStruct(encoder, value.Texture1D); + break; + case D3D11_UAV_DIMENSION_TEXTURE1DARRAY: + EncodeStruct(encoder, value.Texture1DArray); + break; + case D3D11_UAV_DIMENSION_TEXTURE2D: + EncodeStruct(encoder, value.Texture2D); + break; + case D3D11_UAV_DIMENSION_TEXTURE2DARRAY: + EncodeStruct(encoder, value.Texture2DArray); + break; + case D3D11_UAV_DIMENSION_TEXTURE3D: + EncodeStruct(encoder, value.Texture3D); + break; + default: + break; + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_COLOR& value) +{ + EncodeStruct(encoder, value.RGBA); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_PROTECTION_FLAGS& value) +{ + encoder->EncodeUInt32Value(value.Flags.ProtectionEnabled); + encoder->EncodeUInt32Value(value.Flags.OverlayOrFullscreenRequired); + encoder->EncodeUInt32Value(value.Flags.Reserved); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC& value) +{ + EncodeStruct(encoder, value.DecodeProfile); + encoder->EncodeEnumValue(value.ViewDimension); + EncodeStruct(encoder, value.Texture2D); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC& value) +{ + encoder->EncodeUInt32Value(value.FourCC); + encoder->EncodeEnumValue(value.ViewDimension); + EncodeStruct(encoder, value.Texture2D); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC& value) +{ + encoder->EncodeEnumValue(value.ViewDimension); + EncodeStruct(encoder, value.Texture2D); + + switch (value.ViewDimension) + { + case D3D11_VPOV_DIMENSION_TEXTURE2D: + EncodeStruct(encoder, value.Texture2D); + break; + case D3D11_VPOV_DIMENSION_TEXTURE2DARRAY: + EncodeStruct(encoder, value.Texture2DArray); + break; + default: + break; + } +} + void EncodeStruct(ParameterEncoder* encoder, const LARGE_INTEGER& value) { encoder->EncodeInt64Value(value.QuadPart); @@ -636,6 +946,83 @@ void EncodeStruct(ParameterEncoder* encoder, const D3D12_PIPELINE_STATE_STREAM_D } } +void EncodeD3D11FeatureStruct(ParameterEncoder* encoder, void* feature_data, D3D11_FEATURE feature) +{ + switch (feature) + { + case D3D11_FEATURE_THREADING: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_DOUBLES: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_FORMAT_SUPPORT: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_FORMAT_SUPPORT2: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_D3D11_OPTIONS: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_ARCHITECTURE_INFO: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_D3D9_OPTIONS: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_D3D9_SHADOW_SUPPORT: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_D3D11_OPTIONS1: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT: + EncodeStructPtr(encoder, + reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_MARKER_SUPPORT: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_D3D9_OPTIONS1: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_D3D11_OPTIONS2: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_D3D11_OPTIONS3: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_D3D11_OPTIONS4: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_SHADER_CACHE: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + case D3D11_FEATURE_D3D11_OPTIONS5: + EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + break; + // TODO: This requires code generated from the 10.0.22000.194 Windows SDK + // case D3D11_FEATURE_DISPLAYABLE: + // EncodeStructPtr(encoder, reinterpret_cast(feature_data)); + // break; + default: + GFXRECON_LOG_WARNING("Failed to encode ID3D11Device::CheckFeatureSupport pFeatureData parameter with " + "unrecognized D3D11_FEATURE type %d", + feature); + break; + } +} + void EncodeD3D12FeatureStruct(ParameterEncoder* encoder, void* feature_data, D3D12_FEATURE feature) { switch (feature) diff --git a/framework/encode/custom_dx12_struct_encoders.h b/framework/encode/custom_dx12_struct_encoders.h index 8ff7ade53f..46bf8b773e 100644 --- a/framework/encode/custom_dx12_struct_encoders.h +++ b/framework/encode/custom_dx12_struct_encoders.h @@ -1,5 +1,6 @@ /* ** Copyright (c) 2021 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -26,6 +27,8 @@ #include "encode/parameter_encoder.h" #include "util/defines.h" +#include +#include #include #include @@ -52,6 +55,20 @@ void EncodeStruct(ParameterEncoder* encoder, const D3D12_BUILD_RAYTRACING_ACCELE void EncodeStruct(ParameterEncoder* encoder, const D3D12_VERSIONED_DEVICE_REMOVED_EXTENDED_DATA& value); void EncodeStruct(ParameterEncoder* encoder, const D3D12_RENDER_PASS_BEGINNING_ACCESS& value); void EncodeStruct(ParameterEncoder* encoder, const D3D12_RENDER_PASS_ENDING_ACCESS& value); +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BUFFER_SRV& value); +void EncodeStruct(ParameterEncoder* encoder, const D3D11_SHADER_RESOURCE_VIEW_DESC& value); +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BUFFER_RTV& value); +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RENDER_TARGET_VIEW_DESC& value); +void EncodeStruct(ParameterEncoder* encoder, const D3D11_DEPTH_STENCIL_VIEW_DESC& value); +void EncodeStruct(ParameterEncoder* encoder, const D3D11_UNORDERED_ACCESS_VIEW_DESC& value); +void EncodeStruct(ParameterEncoder* encoder, const D3D11_SHADER_RESOURCE_VIEW_DESC1& value); +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RENDER_TARGET_VIEW_DESC1& value); +void EncodeStruct(ParameterEncoder* encoder, const D3D11_UNORDERED_ACCESS_VIEW_DESC1& value); +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_COLOR& value); +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_PROTECTION_FLAGS& value); +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC& value); +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC& value); +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC& value); // Platform types. void EncodeStruct(ParameterEncoder* encoder, const LARGE_INTEGER& value); @@ -61,6 +78,7 @@ void EncodeStruct(ParameterEncoder* encoder, const D3D12_PIPELINE_STATE_STREAM_D void EncodeStruct(ParameterEncoder* encoder, const D3D12_STATE_OBJECT_DESC& value); void EncodeStruct(ParameterEncoder* encoder, const D3D12_STATE_SUBOBJECT& value); void EncodeStruct(ParameterEncoder* encoder, const D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION& value); +void EncodeD3D11FeatureStruct(ParameterEncoder* encoder, void* feature_data, D3D11_FEATURE feature); void EncodeD3D12FeatureStruct(ParameterEncoder* encoder, void* feature_data, D3D12_FEATURE feature); void EncodeDXGIFeatureStruct(ParameterEncoder* encoder, void* feature_data, DXGI_FEATURE feature); void EncodeStruct(ParameterEncoder* encoder, const D3D12_BARRIER_GROUP& value); diff --git a/framework/encode/custom_dx12_wrapper_commands.h b/framework/encode/custom_dx12_wrapper_commands.h index d2847ab394..eb2080287e 100644 --- a/framework/encode/custom_dx12_wrapper_commands.h +++ b/framework/encode/custom_dx12_wrapper_commands.h @@ -1,6 +1,7 @@ /* ** Copyright (c) 2021 LunarG, Inc. ** Copyright (c) 2021-2023 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -766,6 +767,354 @@ struct CustomWrapperPostCall } }; +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_D3D11CreateDevice(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_D3D11CreateDeviceAndSwapChain(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device_CreateBuffer(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device_CreateDeferredContext(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device_CreateTexture1D(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device_CreateTexture2D(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device1_CreateDeferredContext1(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device2_CreateDeferredContext2(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device3_CreateDeferredContext3(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device3_CreateTexture2D1(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device_CreateTexture3D(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device3_CreateTexture3D1(args...); + } +}; + +template <> +inline void CustomWrapperDestroyCall(ID3D11Buffer_Wrapper* wrapper) +{ + D3D12CaptureManager::Get()->Destroy_ID3D11Buffer(wrapper); +} + +template <> +inline void CustomWrapperDestroyCall(ID3D11Texture1D_Wrapper* wrapper) +{ + D3D12CaptureManager::Get()->Destroy_ID3D11Texture1D(wrapper); +} + +template <> +inline void CustomWrapperDestroyCall(ID3D11Texture2D_Wrapper* wrapper) +{ + D3D12CaptureManager::Get()->Destroy_ID3D11Texture2D(wrapper); +} + +template <> +inline void CustomWrapperDestroyCall(ID3D11Texture3D_Wrapper* wrapper) +{ + D3D12CaptureManager::Get()->Destroy_ID3D11Texture3D(wrapper); +} + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11DeviceContext_Map(args...); + } +}; + +template <> +struct CustomWrapperPreCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PreProcess_ID3D11DeviceContext_Unmap(args...); + } +}; + +template <> +struct CustomWrapperPreCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PreProcess_ID3D11DeviceContext_Dispatch(args...); + } +}; + +template <> +struct CustomWrapperPreCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PreProcess_ID3D11DeviceContext_DispatchIndirect(args...); + } +}; + +template <> +struct CustomWrapperPreCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PreProcess_ID3D11DeviceContext_Draw(args...); + } +}; + +template <> +struct CustomWrapperPreCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PreProcess_ID3D11DeviceContext_DrawAuto(args...); + } +}; + +template <> +struct CustomWrapperPreCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PreProcess_ID3D11DeviceContext_DrawIndexed(args...); + } +}; + +template <> +struct CustomWrapperPreCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PreProcess_ID3D11DeviceContext_DrawIndexedInstanced(args...); + } +}; + +template <> +struct CustomWrapperPreCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PreProcess_ID3D11DeviceContext_DrawIndexedInstancedIndirect(args...); + } +}; + +template <> +struct CustomWrapperPreCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PreProcess_ID3D11DeviceContext_DrawInstanced(args...); + } +}; + +template <> +struct CustomWrapperPreCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PreProcess_ID3D11DeviceContext_DrawInstancedIndirect(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device_CreateShaderResourceView(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device_CreateShaderResourceView1(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device_CreateUnorderedAccessView(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device_CreateUnorderedAccessView1(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device_CreateRenderTargetView(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device_CreateRenderTargetView1(args...); + } +}; + +template <> +struct CustomWrapperPostCall +{ + template + static void Dispatch(D3D12CaptureManager* manager, Args... args) + { + manager->PostProcess_ID3D11Device_CreateDepthStencilView(args...); + } +}; + +template <> +inline void CustomWrapperDestroyCall(ID3D11ShaderResourceView_Wrapper* wrapper) +{ + D3D12CaptureManager::Get()->Destroy_ID3D11ShaderResourceView(wrapper); +} + +template <> +inline void CustomWrapperDestroyCall(ID3D11UnorderedAccessView_Wrapper* wrapper) +{ + D3D12CaptureManager::Get()->Destroy_ID3D11UnorderedAccessView(wrapper); +} + +template <> +inline void CustomWrapperDestroyCall(ID3D11RenderTargetView_Wrapper* wrapper) +{ + D3D12CaptureManager::Get()->Destroy_ID3D11RenderTargetView(wrapper); +} + +template <> +inline void CustomWrapperDestroyCall(ID3D11DepthStencilView_Wrapper* wrapper) +{ + D3D12CaptureManager::Get()->Destroy_ID3D11DepthStencilView(wrapper); +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/custom_dx12_wrapper_creators.cpp b/framework/encode/custom_dx12_wrapper_creators.cpp new file mode 100644 index 0000000000..4f53ec7551 --- /dev/null +++ b/framework/encode/custom_dx12_wrapper_creators.cpp @@ -0,0 +1,68 @@ +/* +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. +** +** Permission is hereby granted, free of charge, to any person obtaining a copy +** of this software and associated documentation files (the "Software"), to +** deal in the Software without restriction, including without limitation the +** rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +** sell copies of the Software, and to permit persons to whom the Software is +** furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +** IN THE SOFTWARE. +*/ + +#include "encode/custom_dx12_wrapper_creators.h" + +#include "generated/generated_dx12_wrappers.h" +#include "generated/generated_dx12_wrapper_creators.h" +#include "util/logging.h" + +#include + +GFXRECON_BEGIN_NAMESPACE(gfxrecon) +GFXRECON_BEGIN_NAMESPACE(encode) + +void WrapID3D11Resource(REFIID riid, void** object, DxWrapperResources* resources) +{ + GFXRECON_UNREFERENCED_PARAMETER(riid); + GFXRECON_ASSERT((object != nullptr) && (*object != nullptr) && IsEqualIID(riid, IID_ID3D11Resource)); + + auto resource = reinterpret_cast(object); + auto type = D3D11_RESOURCE_DIMENSION{}; + (*resource)->GetType(&type); + + if (type == D3D11_RESOURCE_DIMENSION_TEXTURE2D) + { + WrapID3D11Texture2D(IID_ID3D11Texture2D, object, resources); + } + else if (type == D3D11_RESOURCE_DIMENSION_BUFFER) + { + WrapID3D11Buffer(IID_ID3D11Buffer, object, resources); + } + else if (type == D3D11_RESOURCE_DIMENSION_TEXTURE3D) + { + WrapID3D11Texture1D(IID_ID3D11Texture1D, object, resources); + } + else if (type == D3D11_RESOURCE_DIMENSION_TEXTURE1D) + { + WrapID3D11Texture3D(IID_ID3D11Texture3D, object, resources); + } + else + { + GFXRECON_LOG_DEBUG( + "An object wrapper for an ID3D11Resource object could not be created because the resource dimension type " + "is unknown. GFXReconstruct cannot track the object and may produce an invalid capture"); + } +} + +GFXRECON_END_NAMESPACE(encode) +GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/custom_dx12_wrapper_creators.h b/framework/encode/custom_dx12_wrapper_creators.h new file mode 100644 index 0000000000..596dfc1a60 --- /dev/null +++ b/framework/encode/custom_dx12_wrapper_creators.h @@ -0,0 +1,40 @@ +/* +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. +** +** Permission is hereby granted, free of charge, to any person obtaining a copy +** of this software and associated documentation files (the "Software"), to +** deal in the Software without restriction, including without limitation the +** rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +** sell copies of the Software, and to permit persons to whom the Software is +** furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +** IN THE SOFTWARE. +*/ + +#ifndef GFXRECON_CUSTOM_DX12_WRAPPER_CREATORS_H +#define GFXRECON_CUSTOM_DX12_WRAPPER_CREATORS_H + +#include "encode/dx12_object_wrapper_resources.h" +#include "util/defines.h" + +#include +#include + +GFXRECON_BEGIN_NAMESPACE(gfxrecon) +GFXRECON_BEGIN_NAMESPACE(encode) + +void WrapID3D11Resource(REFIID riid, void** object, DxWrapperResources* resources); + +GFXRECON_END_NAMESPACE(encode) +GFXRECON_END_NAMESPACE(gfxrecon) + +#endif // GFXRECON_CUSTOM_DX12_WRAPPER_CREATORS_H diff --git a/framework/encode/d3d11_dispatch_table.h b/framework/encode/d3d11_dispatch_table.h new file mode 100644 index 0000000000..d9fcab1444 --- /dev/null +++ b/framework/encode/d3d11_dispatch_table.h @@ -0,0 +1,56 @@ +/* +** Copyright (c) 2020-2021 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and associated documentation files (the "Software"), +** to deal in the Software without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Software, and to permit persons to whom the +** Software is furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +*/ + +#ifndef GFXRECON_ENCODE_D3D11_DISPATCH_TABLE_H +#define GFXRECON_ENCODE_D3D11_DISPATCH_TABLE_H + +#include "util/defines.h" +#include "util/logging.h" + +#include +#include + +// d3d11on12.h will include the d3d12.h from the Windows SDK directory, not the d3d12.h from the Agility SDK that is +// included in the GFXReconstruct source tree. To prevent a conflict between the Windows SDK and Agility SDK +// versions, include d3d12.h from the Agility SDK before including the d3d11on12.h header. +#include +#include + +GFXRECON_BEGIN_NAMESPACE(gfxrecon) +GFXRECON_BEGIN_NAMESPACE(encode) + +struct D3D11DispatchTable +{ + // Functions processed for capture. These are the D3D11 functions exported by d3d11.dll and documented on MSDN. + PFN_D3D11_CREATE_DEVICE D3D11CreateDevice{ nullptr }; + PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN D3D11CreateDeviceAndSwapChain{ nullptr }; + PFN_D3D11ON12_CREATE_DEVICE D3D11On12CreateDevice{ nullptr }; +}; + +GFXRECON_END_NAMESPACE(encode) +GFXRECON_END_NAMESPACE(gfxrecon) + +typedef bool (*PFN_InitializeD3D11Capture)(gfxrecon::encode::D3D11DispatchTable*); +typedef void (*PFN_ReleaseD3D11Capture)(gfxrecon::encode::D3D11DispatchTable*); + +#endif // GFXRECON_ENCODE_D3D11_DISPATCH_TABLE_H diff --git a/framework/encode/d3d12_capture_manager.cpp b/framework/encode/d3d12_capture_manager.cpp index 1cd0f6d1c5..05eb51b719 100644 --- a/framework/encode/d3d12_capture_manager.cpp +++ b/framework/encode/d3d12_capture_manager.cpp @@ -2,6 +2,7 @@ ** Copyright (c) 2018-2020 Valve Corporation ** Copyright (c) 2018-2021 LunarG, Inc. ** Copyright (c) 2021-2024 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -41,7 +42,8 @@ thread_local uint32_t D3D12CaptureManager::call_scope_ = 0; D3D12CaptureManager::D3D12CaptureManager() : ApiCaptureManager(format::ApiFamilyId::ApiFamily_D3D12), dxgi_dispatch_table_{}, d3d12_dispatch_table_{}, debug_layer_enabled_(false), debug_device_lost_enabled_(false), - track_enable_debug_layer_object_id_(format::kNullHandleId), frame_buffer_renderer_(nullptr) + track_enable_debug_layer_object_id_(format::kNullHandleId), frame_buffer_renderer12_(nullptr), + frame_buffer_renderer11_(nullptr) {} bool D3D12CaptureManager::CreateInstance() @@ -175,48 +177,77 @@ void D3D12CaptureManager::WriteTrackedState(util::FileOutputStream* file_stream, state_tracker_->WriteState(&state_writer, GetCurrentFrame()); } -void D3D12CaptureManager::PreAcquireSwapChainImages(IDXGISwapChain_Wrapper* wrapper, - IUnknown* command_queue, - uint32_t image_count, - DXGI_SWAP_EFFECT swap_effect) +void D3D12CaptureManager::InitializeSwapChainInfo(IDXGISwapChain_Wrapper* wrapper, + IUnknown* unknown, + uint32_t buffer_count, + DXGI_SWAP_EFFECT swap_effect) { - // We only expect to process the DXGI_SWAP_EFFECT_FLIP_* effects with DX12. - if ((swap_effect != DXGI_SWAP_EFFECT_DISCARD) && (swap_effect != DXGI_SWAP_EFFECT_SEQUENTIAL)) - { - assert(wrapper != nullptr); + GFXRECON_ASSERT(wrapper != nullptr); - auto info = wrapper->GetObjectInfo(); - assert(info != nullptr); - if (command_queue != nullptr) - { - info->command_queue_id = GetDx12WrappedId(command_queue); + auto info = wrapper->GetObjectInfo(); + GFXRECON_ASSERT(info != nullptr); + + info->buffer_count = buffer_count; + info->swap_effect = swap_effect; - // Get the ID3D12CommandQueue from the IUnknown queue object. - HRESULT hr = command_queue->QueryInterface(IID_PPV_ARGS(&info->command_queue)); - if (FAILED(hr)) + if (unknown != nullptr) + { + // Attempt to retrieve an ID3D12CommandQueue interface from the IUnknown interface. + HRESULT hr = unknown->QueryInterface(IID_PPV_ARGS(&info->command_queue)); + if (SUCCEEDED(hr)) + { + info->command_queue_id = GetDx12WrappedId(unknown); + } + else + { + // Attempt to retrieve an ID3D11Device interface from the IUnknown interface. + hr = unknown->QueryInterface(IID_PPV_ARGS(&info->device)); + if (SUCCEEDED(hr)) { - GFXRECON_LOG_WARNING("Failed to get the ID3D12CommandQueue interface from the IUnknown* device " - "argument to CreateSwapChain."); + info->device_id = GetDx12WrappedId(unknown); } } + } + + AcquireSwapChainImages(wrapper->GetWrappedObjectAs(), info.get(), buffer_count); +} + +void D3D12CaptureManager::AcquireSwapChainImages(IDXGISwapChain* swap_chain, + IDXGISwapChainInfo* info, + uint32_t image_count) +{ + GFXRECON_ASSERT((swap_chain != nullptr) && (info != nullptr)); + + if (info->child_images.empty()) + { + auto acquirable_image_count = image_count; + + // Only the image at index 0 can be retrieved when using DXGI_SWAP_EFFECT_DISCARD. With D3D11, + // DXGI_SWAP_EFFECT_FLIP_DISCARD has the same index 0 limitation as DXGI_SWAP_EFFECT_DISCARD. For this case, the + // image only needs to be acquired once after swap chain creation or buffer resize. + if ((info->swap_effect == DXGI_SWAP_EFFECT_DISCARD) || + ((info->device_id != format::kNullHandleId) && (info->swap_effect == DXGI_SWAP_EFFECT_FLIP_DISCARD))) + { + acquirable_image_count = 1; + } + + info->child_images.resize(acquirable_image_count); - if (info->child_images.empty()) + if (IsCaptureModeTrack()) { - auto swap_chain = wrapper->GetWrappedObjectAs(); - info->child_images.resize(image_count); - info->swap_effect = swap_effect; + // TODO: In VK version, this thing is done in InitializeGroupObjectState, + // This might need to be removed to InitializeGroupObjectState when it's ready. + info->image_acquired_info.resize(acquirable_image_count); + } - if (IsCaptureModeTrack()) - { - // TODO: In VK version, this thing is done in InitializeGroupObjectState, - // This might need to be removed to InitializeGroupObjectState when it's ready. - info->image_acquired_info.resize(image_count); - } + for (uint32_t i = 0; i < acquirable_image_count; ++i) + { + auto result = E_FAIL; - for (uint32_t i = 0; i < image_count; ++i) + if (info->command_queue_id != format::kNullHandleId) { ID3D12Resource* resource = nullptr; - auto result = swap_chain->GetBuffer(i, IID_PPV_ARGS(&resource)); + result = swap_chain->GetBuffer(i, IID_PPV_ARGS(&resource)); if (SUCCEEDED(result)) { WrapID3D12Resource(IID_PPV_ARGS(&resource), nullptr); @@ -231,19 +262,43 @@ void D3D12CaptureManager::PreAcquireSwapChainImages(IDXGISwapChain_Wrapper* wrap // state. InitializeSwapChainBufferResourceInfo(resource_wrapper, D3D12_RESOURCE_STATE_PRESENT); } + } + else if (info->device_id != format::kNullHandleId) + { + ID3D11Texture2D* texture2d = nullptr; + result = swap_chain->GetBuffer(i, IID_PPV_ARGS(&texture2d)); + if (SUCCEEDED(result)) + { + // Retrieve the desc struct from the unwrapped object so that the API call is not recorded. + auto desc = D3D11_TEXTURE2D_DESC{}; + texture2d->GetDesc(&desc); + + WrapID3D11Texture2D(IID_PPV_ARGS(&texture2d), nullptr); + + // Convert the application reference to an internal-only reference to avoid altering the + // application reference count by only holding an internal reference to the wrapped texture. + ID3D11Texture2D_Wrapper* texture2d_wrapper = reinterpret_cast(texture2d); + texture2d_wrapper->MakeRefInternal(); + info->child_images[i] = texture2d_wrapper; + + // Initialize members of ID3D11Texture2DInfo for texture2d_wrapper in order to track swap chain + // buffer state and assist with capturing mapped memory writes. + InitializeID3D11Texture2DInfo(texture2d_wrapper, &desc); + } + } + + if (FAILED(result)) + { + if (result == E_NOINTERFACE) + { + GFXRECON_LOG_WARNING("IDXGISwapChain::GetBuffer() returned E_NOINTERFACE when called with " + "IID_ID3D12Resource and IID_ID3D11Texture2D, ensure that the captured " + "application is using the Direct3D API"); + } else { - if (result == E_NOINTERFACE) - { - GFXRECON_LOG_WARNING( - "IDXGISwapChain::GetBuffer() returned E_NOINTERFACE when called with IID_ID3D12Resource, " - "ensure that the captured application is using the D3D12 API"); - } - else - { - GFXRECON_LOG_WARNING( - "IDXGISwapChain::GetBuffer() failed when attempting to pre-acquire swapchain images"); - } + GFXRECON_LOG_WARNING( + "IDXGISwapChain::GetBuffer() failed when attempting to pre-acquire swap chain images"); } } } @@ -276,17 +331,15 @@ void D3D12CaptureManager::ResizeSwapChainImages(IDXGISwapChain_Wrapper* wrapper, auto info = wrapper->GetObjectInfo(); GFXRECON_ASSERT(info != nullptr); - // If ResizeBuffers is called with buffer_count == 0, the number of swapchain buffers doesn't change, so read it - // from the DXGI_SWAP_CHAIN_DESC. + // If ResizeBuffers is called with buffer_count == 0, the number of swap chain buffers doesn't change, so use + // the value stored at swap chain creation. UINT final_buffer_count = buffer_count; if (final_buffer_count == 0) { - DXGI_SWAP_CHAIN_DESC swapchain_desc; - wrapper->GetWrappedObjectAs()->GetDesc(&swapchain_desc); - final_buffer_count = swapchain_desc.BufferCount; + final_buffer_count = info->buffer_count; } - PreAcquireSwapChainImages(wrapper, nullptr, final_buffer_count, info->swap_effect); + AcquireSwapChainImages(wrapper->GetWrappedObjectAs(), info.get(), final_buffer_count); if (IsCaptureModeTrack()) { @@ -400,24 +453,25 @@ void D3D12CaptureManager::InitializeSwapChainBufferResourceInfo(ID3D12Resource_W } } -void D3D12CaptureManager::InitializeID3D12DeviceInfo(IUnknown* adapter, void** device) +void D3D12CaptureManager::InitializeID3D12DeviceInfo(ID3D12Device_Wrapper* device_wrapper) { - GFXRECON_ASSERT(device != nullptr); - GFXRECON_ASSERT(*device != nullptr); + GFXRECON_ASSERT(device_wrapper != nullptr); - if ((device != nullptr) && (*device != nullptr)) + if (device_wrapper != nullptr) { - auto device_wrapper = reinterpret_cast(*device); - auto info = device_wrapper->GetObjectInfo(); + auto info = device_wrapper->GetObjectInfo(); if (info != nullptr) { + auto wrapped_device = device_wrapper->GetWrappedObjectAs(); + + // TODO: When info->adapter3 is acquired, its ref count is incremented but it is never released; it should + // be stored in a COM pointer. graphics::dx12::GetAdapterAndIndexbyDevice( - reinterpret_cast(*device), info->adapter3, info->adapter_node_index, adapters_); + wrapped_device, info->adapter3, info->adapter_node_index, adapters_); // Cache info on device features: - auto wrapped_device = device_wrapper->GetWrappedObjectAs(); - info->is_uma = graphics::dx12::IsUma(wrapped_device); + info->is_uma = graphics::dx12::IsUma(wrapped_device); } } } @@ -490,6 +544,59 @@ uint64_t D3D12CaptureManager::GetResourceSizeInBytes(ID3D12Device8_Wrapper* return graphics::dx12::GetResourceSizeInBytes(device, desc); } +void D3D12CaptureManager::ProcessMappedMemory(format::ApiFamilyId api_family) +{ + if (GetMemoryTrackingMode() == CaptureSettings::MemoryTrackingMode::kPageGuard) + { + util::PageGuardManager* manager = util::PageGuardManager::Get(); + assert(manager != nullptr); + + manager->ProcessMemoryEntries([this, api_family]( + uint64_t memory_id, void* start_address, size_t offset, size_t size) { + if (RvAnnotationActive() == true) + { + resource_value_annotator_->ScanForGPUVA( + memory_id, reinterpret_cast(start_address) + offset, size, offset); + } + + WriteFillMemoryCmd(api_family, memory_id, offset, size, start_address); + }); + } + else if (GetMemoryTrackingMode() == CaptureSettings::MemoryTrackingMode::kUnassisted) + { + std::lock_guard lock(GetMappedMemoryLock()); + for (auto resource_wrapper : mapped_resources_) + { + auto info = resource_wrapper->GetObjectInfo(); + + for (size_t i = 0; i < info->num_subresources; ++i) + { + // If the memory is mapped, write the entire mapped region. + auto size = info->subresource_sizes[i]; + const auto& mapped_subresource = info->mapped_subresources[i]; + if (mapped_subresource.data != nullptr) + { + // we only need to handle data != nullptr case because no mapped memory and shadow memory + // be tracked for data == nullptr, also no corresponding memory data for WriteFillMemoryCmd + // writing to trace file. + if (RvAnnotationActive() == true) + { + resource_value_annotator_->ScanForGPUVA(reinterpret_cast(mapped_subresource.data), + reinterpret_cast(mapped_subresource.data), + size, + 0); + } + WriteFillMemoryCmd(api_family, + reinterpret_cast(mapped_subresource.data), + 0, + size, + mapped_subresource.data); + } + } + } + } +} + void D3D12CaptureManager::PostProcess_IDXGIFactory_CreateSwapChain(IDXGIFactory_Wrapper* wrapper, HRESULT result, IUnknown* device, @@ -503,7 +610,7 @@ void D3D12CaptureManager::PostProcess_IDXGIFactory_CreateSwapChain(IDXGIFactory_ { auto swap_chain_wrapper = reinterpret_cast(*swap_chain); - PreAcquireSwapChainImages(swap_chain_wrapper, device, desc->BufferCount, desc->SwapEffect); + InitializeSwapChainInfo(swap_chain_wrapper, device, desc->BufferCount, desc->SwapEffect); } } @@ -527,7 +634,7 @@ void D3D12CaptureManager::PostProcess_IDXGIFactory2_CreateSwapChainForHwnd( { auto swap_chain_wrapper = reinterpret_cast(*swap_chain); - PreAcquireSwapChainImages(swap_chain_wrapper, device, desc->BufferCount, desc->SwapEffect); + InitializeSwapChainInfo(swap_chain_wrapper, device, desc->BufferCount, desc->SwapEffect); } } @@ -548,7 +655,7 @@ void D3D12CaptureManager::PostProcess_IDXGIFactory2_CreateSwapChainForCoreWindow { auto swap_chain_wrapper = reinterpret_cast(*swap_chain); - PreAcquireSwapChainImages(swap_chain_wrapper, device, desc->BufferCount, desc->SwapEffect); + InitializeSwapChainInfo(swap_chain_wrapper, device, desc->BufferCount, desc->SwapEffect); } } @@ -567,7 +674,7 @@ void D3D12CaptureManager::PostProcess_IDXGIFactory2_CreateSwapChainForCompositio { auto swap_chain_wrapper = reinterpret_cast(*swap_chain); - PreAcquireSwapChainImages(swap_chain_wrapper, device, desc->BufferCount, desc->SwapEffect); + InitializeSwapChainInfo(swap_chain_wrapper, device, desc->BufferCount, desc->SwapEffect); } } @@ -591,18 +698,28 @@ void D3D12CaptureManager::PrePresent(IDXGISwapChain_Wrapper* swapchain_wrapper) if (swapchain_info->command_queue) { auto swapchain = swapchain_wrapper->GetWrappedObjectAs(); - - gfxrecon::graphics::dx12::TakeScreenshot(frame_buffer_renderer_, + gfxrecon::graphics::dx12::TakeScreenshot(frame_buffer_renderer12_, swapchain_info->command_queue, swapchain, GetCurrentFrame(), common_manager_->GetScreenshotPrefix(), common_manager_->GetScreenshotFormat()); } + else if (swapchain_info->device) + { + auto swapchain = swapchain_wrapper->GetWrappedObjectAs(); + gfxrecon::graphics::dx12::TakeScreenshot(frame_buffer_renderer11_, + swapchain_info->device, + swapchain, + GetCurrentFrame(), + common_manager_->GetScreenshotPrefix(), + common_manager_->GetScreenshotFormat()); + } else { - GFXRECON_LOG_ERROR("Failed to get the ID3D12CommandQueue associated with the presented swap chain. " - "GFXReconstruct is unable to take a screenshot."); + GFXRECON_LOG_ERROR( + "Failed to get the ID3D12CommandQueue or ID3D11Device associated with the presented swap chain. " + "GFXReconstruct is unable to take a screenshot."); } } } @@ -1724,52 +1841,7 @@ void D3D12CaptureManager::PreProcess_ID3D12CommandQueue_ExecuteCommandLists(ID3D GFXRECON_UNREFERENCED_PARAMETER(wrapper); GFXRECON_UNREFERENCED_PARAMETER(num_lists); GFXRECON_UNREFERENCED_PARAMETER(lists); - - if (GetMemoryTrackingMode() == CaptureSettings::MemoryTrackingMode::kPageGuard) - { - util::PageGuardManager* manager = util::PageGuardManager::Get(); - assert(manager != nullptr); - - manager->ProcessMemoryEntries([this](uint64_t memory_id, void* start_address, size_t offset, size_t size) { - if (RvAnnotationActive() == true) - { - resource_value_annotator_->ScanForGPUVA( - memory_id, reinterpret_cast(start_address) + offset, size, offset); - } - WriteFillMemoryCmd(memory_id, offset, size, start_address); - }); - } - else if (GetMemoryTrackingMode() == CaptureSettings::MemoryTrackingMode::kUnassisted) - { - std::lock_guard lock(GetMappedMemoryLock()); - for (auto resource_wrapper : mapped_resources_) - { - auto info = resource_wrapper->GetObjectInfo(); - - for (size_t i = 0; i < info->num_subresources; ++i) - { - // If the memory is mapped, write the entire mapped region. - auto size = info->subresource_sizes[i]; - const auto& mapped_subresource = info->mapped_subresources[i]; - if (mapped_subresource.data != nullptr) - { - // we only need to handle data != nullptr case because no mapped memory and shadow memory - // be tracked for data == nullptr, also no corresponding memory data for WriteFillMemoryCmd - // writing to trace file. - if (RvAnnotationActive() == true) - { - resource_value_annotator_->ScanForGPUVA(reinterpret_cast(mapped_subresource.data), - reinterpret_cast(mapped_subresource.data), - size, - 0); - } - WriteFillMemoryCmd( - reinterpret_cast(mapped_subresource.data), 0, size, mapped_subresource.data); - } - } - } - } - + ProcessMappedMemory(format::ApiFamilyId::ApiFamily_D3D12); PreQueueSubmit(); } @@ -2287,33 +2359,31 @@ void D3D12CaptureManager::PostProcess_D3D12CreateDevice( { if (result == S_OK) { - if (ppDevice != nullptr) + if ((ppDevice != nullptr) && (*ppDevice != nullptr)) { - InitializeID3D12DeviceInfo(pAdapter, ppDevice); + auto device_wrapper = reinterpret_cast(*ppDevice); - auto device = reinterpret_cast(*ppDevice); + InitializeID3D12DeviceInfo(device_wrapper); - if (device != nullptr) - { - format::DxgiAdapterDesc* active_adapter = graphics::dx12::MarkActiveAdapter(device, adapters_); + auto wrapped_device = device_wrapper->GetWrappedObjectAs(); + format::DxgiAdapterDesc* active_adapter = graphics::dx12::MarkActiveAdapter(wrapped_device, adapters_); - // Write adapter desc to file if it was marked active, and has not already been seen - auto adapter_id = GetDx12WrappedId(pAdapter); - if (active_adapter != nullptr) - { - graphics::dx12::InjectAdapterCaptureId(active_adapter->extra_info, adapter_id); - WriteDxgiAdapterInfoCommand(*active_adapter); - } - else + // Write adapter desc to file if it was marked active, and has not already been seen. + auto adapter_id = GetDx12WrappedId(pAdapter); + if (active_adapter != nullptr) + { + graphics::dx12::InjectAdapterCaptureId(active_adapter->extra_info, adapter_id); + WriteDxgiAdapterInfoCommand(format::ApiFamilyId::ApiFamily_D3D12, *active_adapter); + } + else + { + // we have to write adapter if it is already marked active and as a result active_adapter is null + // this is essential for marking active adapter for system with multiple GPUs + auto parent_adapter = graphics::dx12::GetAdapterDescByLUID(wrapped_device->GetAdapterLuid(), adapters_); + if (parent_adapter != nullptr) { - // we have to write adapter if it is already marked active and as a result active_adapter is null - // this is essential for marking active adapter for system with multiple GPUs - auto parent_adapter = graphics::dx12::GetAdapterDescByLUID(device->GetAdapterLuid(), adapters_); - if (parent_adapter != nullptr) - { - graphics::dx12::InjectAdapterCaptureId(parent_adapter->extra_info, adapter_id); - WriteDxgiAdapterInfoCommand(*parent_adapter); - } + graphics::dx12::InjectAdapterCaptureId(parent_adapter->extra_info, adapter_id); + WriteDxgiAdapterInfoCommand(format::ApiFamilyId::ApiFamily_D3D12, *parent_adapter); } } } @@ -2774,7 +2844,8 @@ void D3D12CaptureManager::PostProcess_ID3D12StateObjectProperties_GetShaderIdent } } -void D3D12CaptureManager::WriteDxgiAdapterInfoCommand(const format::DxgiAdapterDesc& adapter_desc) +void D3D12CaptureManager::WriteDxgiAdapterInfoCommand(format::ApiFamilyId api_family, + const format::DxgiAdapterDesc& adapter_desc) { if ((IsCaptureModeWrite())) { @@ -2787,7 +2858,7 @@ void D3D12CaptureManager::WriteDxgiAdapterInfoCommand(const format::DxgiAdapterD adapter_info_header.meta_header.block_header.type = format::BlockType::kMetaDataBlock; adapter_info_header.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(adapter_info_header); adapter_info_header.meta_header.meta_data_id = - format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_D3D12, format::MetaDataType::kDxgiAdapterInfoCommand); + format::MakeMetaDataId(api_family, format::MetaDataType::kDxgiAdapterInfoCommand); adapter_info_header.thread_id = thread_data->thread_id_; util::platform::MemoryCopy(&adapter_info_header.adapter_desc, @@ -2799,7 +2870,7 @@ void D3D12CaptureManager::WriteDxgiAdapterInfoCommand(const format::DxgiAdapterD } } -void D3D12CaptureManager::WriteDxgiAdapterInfo() +void D3D12CaptureManager::WriteDxgiAdapterInfo(format::ApiFamilyId api_family) { for (const auto& adapter : adapters_) { @@ -2808,27 +2879,1382 @@ void D3D12CaptureManager::WriteDxgiAdapterInfo() // Write adapter desc to file if it was marked active if (adapter.second.active == true) { - WriteDxgiAdapterInfoCommand(replay_adapter_desc); + WriteDxgiAdapterInfoCommand(api_family, replay_adapter_desc); } } } void D3D12CaptureManager::PostProcess_CreateDXGIFactory(HRESULT result, REFIID riid, void** ppFactory) { - graphics::dx12::TrackAdapters(result, ppFactory, adapters_); + if (SUCCEEDED(result) && (ppFactory != nullptr) && (*ppFactory != nullptr)) + { + graphics::dx12::TrackAdapters(GetWrappedObject(reinterpret_cast(*ppFactory)), + adapters_); + } } void D3D12CaptureManager::PostProcess_CreateDXGIFactory1(HRESULT result, REFIID riid, void** ppFactory) { - graphics::dx12::TrackAdapters(result, ppFactory, adapters_); + if (SUCCEEDED(result) && (ppFactory != nullptr) && (*ppFactory != nullptr)) + { + graphics::dx12::TrackAdapters(GetWrappedObject(reinterpret_cast(*ppFactory)), + adapters_); + } } void D3D12CaptureManager::PostProcess_CreateDXGIFactory2(HRESULT result, UINT Flags, REFIID riid, void** ppFactory) { - graphics::dx12::TrackAdapters(result, ppFactory, adapters_); + if (SUCCEEDED(result) && (ppFactory != nullptr) && (*ppFactory != nullptr)) + { + graphics::dx12::TrackAdapters(GetWrappedObject(reinterpret_cast(*ppFactory)), + adapters_); + } +} + +std::shared_ptr D3D12CaptureManager::GetResourceInfo(ID3D11Resource_Wrapper* wrapper) +{ + auto info = std::shared_ptr{}; + auto dimension = D3D11_RESOURCE_DIMENSION{}; + auto wrapped_object = wrapper->GetWrappedObjectAs(); + + wrapped_object->GetType(&dimension); + + switch (dimension) + { + case D3D11_RESOURCE_DIMENSION_BUFFER: + info = static_cast(wrapper)->GetObjectInfo(); + break; + case D3D11_RESOURCE_DIMENSION_TEXTURE1D: + info = static_cast(wrapper)->GetObjectInfo(); + break; + case D3D11_RESOURCE_DIMENSION_TEXTURE2D: + info = static_cast(wrapper)->GetObjectInfo(); + break; + case D3D11_RESOURCE_DIMENSION_TEXTURE3D: + info = static_cast(wrapper)->GetObjectInfo(); + break; + default: + GFXRECON_LOG_ERROR("Mapped ID3D11Resource object with capture ID = %" PRIx64 + " has type of D3D11_RESOURCE_DIMENSION_UNKNOWN ", + wrapper->GetCaptureId()); + break; + } + + return info; +} + +void* D3D12CaptureManager::AllocateMappedResourceMemory(util::PageGuardManager* manager, + MappedSubresource& mapped_subresource, + size_t size) +{ + // Ensure that the mapped subresource has a unique ID for tracking. + if (mapped_subresource.tracker_id == 0) + { + // This function should only be called when mapped_memory_lock_ is locked, so no need for additional + // synchronization around the ID calculation. + static uint64_t subresource_id = 0; + mapped_subresource.tracker_id = ++subresource_id; + } + + return manager->AddTrackedMemory(mapped_subresource.tracker_id, + reinterpret_cast(mapped_subresource.data), + mapped_subresource.data, + 0, + size, + mapped_subresource.shadow_allocation, + true, + false); +} + +void* D3D12CaptureManager::AllocateMappedResourceMemoryDeferred(util::WriteWatchTracker* deferred_tracker, + MappedSubresource& mapped_subresource, + size_t size) +{ + // Ensure that the mapped subresource has a unique ID for tracking. + if (mapped_subresource.tracker_id == 0) + { + // This function should only be called when mapped_memory_lock_ is locked, so no need for additional + // synchronization around the ID calculation. + static uint64_t subresource_id = 0; + mapped_subresource.tracker_id = ++subresource_id; + } + + return deferred_tracker->AddTrackedMemory(mapped_subresource.tracker_id, + reinterpret_cast(mapped_subresource.data), + mapped_subresource.data, + size, + mapped_subresource.shadow_allocation); +} + +void* D3D12CaptureManager::GetMappedResourceMemory(util::PageGuardManager* manager, + const MappedSubresource& mapped_subresource) +{ + GFXRECON_ASSERT(mapped_subresource.tracker_id != 0); + + // If the get fails, return the original pointer returned by Map. + auto shadow_memory = mapped_subresource.data; + auto found = manager->GetTrackedMemory(mapped_subresource.tracker_id, &shadow_memory); + + if (!found) + { + GFXRECON_LOG_ERROR("Failed to find tracked memory object for a previously mapped resource.") + } + + return shadow_memory; +} + +void* D3D12CaptureManager::GetMappedResourceMemoryDeferred(util::WriteWatchTracker* deferred_tracker, + const MappedSubresource& mapped_subresource) +{ + GFXRECON_ASSERT(mapped_subresource.tracker_id != 0); + + // If the get fails, return the original pointer returned by Map. + auto shadow_memory = mapped_subresource.data; + auto found = deferred_tracker->GetTrackedMemory(mapped_subresource.tracker_id, &shadow_memory); + + if (!found) + { + GFXRECON_LOG_ERROR("Failed to find tracked memory object for a previously mapped resource.") + } + + return shadow_memory; +} + +void* D3D12CaptureManager::UpdateDiscardedResourceMemory(util::PageGuardManager* manager, + const MappedSubresource& mapped_subresource) +{ + // Update the memory ID that will be written to the capture file with the address of the + // new mapped allocation returned for D3D11_MAP_DISCARD. + GFXRECON_ASSERT(mapped_subresource.tracker_id != 0); + + // If the update fails, return the original pointer returned by Map. + auto shadow_memory = mapped_subresource.data; + auto found = manager->UpdateTrackedMemory(mapped_subresource.tracker_id, + reinterpret_cast(mapped_subresource.data), + mapped_subresource.data, + &shadow_memory); + + if (!found) + { + GFXRECON_LOG_ERROR("Failed to update the memory ID for a mapped resource."); + } + + return shadow_memory; +} + +void* D3D12CaptureManager::UpdateDiscardedResourceMemoryDeferred(util::WriteWatchTracker* deferred_tracker, + const MappedSubresource& mapped_subresource) +{ + // Update the memory ID that will be written to the capture file with the address of the + // new mapped allocation returned for D3D11_MAP_DISCARD. + GFXRECON_ASSERT(mapped_subresource.tracker_id != 0); + + // If the update fails, return the original pointer returned by Map. + auto shadow_memory = mapped_subresource.data; + auto found = deferred_tracker->UpdateTrackedMemory(mapped_subresource.tracker_id, + reinterpret_cast(mapped_subresource.data), + mapped_subresource.data, + &shadow_memory); + + if (!found) + { + GFXRECON_LOG_ERROR("Failed to update the memory ID for a mapped resource."); + } + + return shadow_memory; +} + +void D3D12CaptureManager::FreeMappedResourceMemory(ID3D11Resource_Wrapper* wrapper) +{ + if ((wrapper != nullptr) && (GetMemoryTrackingMode() == CaptureSettings::MemoryTrackingMode::kPageGuard)) + { + auto resource_info = GetResourceInfo(wrapper); + if (resource_info != nullptr) + { + for (auto& mapped_info_entry : resource_info->mapped_info) + { + auto& mapped_info = mapped_info_entry.second; + auto& mapped_subresources = mapped_info.mapped_subresources; + auto& context_info = mapped_info.mapped_context; + GFXRECON_ASSERT(context_info != nullptr); + + if (!context_info->is_deferred) + { + auto manager = util::PageGuardManager::Get(); + GFXRECON_ASSERT(manager != nullptr); + + for (auto i = 0u; i < resource_info->num_subresources; ++i) + { + auto& mapped_subresource = mapped_subresources[i]; + + if (mapped_subresource.shadow_allocation != util::PageGuardManager::kNullShadowHandle) + { + // The resource was assigned a persistent memory allocation and left in the memory + // tracker until it was released. + manager->RemoveTrackedMemory(mapped_subresource.tracker_id); + manager->FreePersistentShadowMemory(mapped_subresource.shadow_allocation); + } + else if (mapped_subresource.data != nullptr) + { + // The resource was not unmapped before being released. + manager->RemoveTrackedMemory(mapped_subresource.tracker_id); + } + } + } + else + { + auto& tracker = context_info->deferred_tracker; + GFXRECON_ASSERT(tracker != nullptr); + + for (auto i = 0u; i < resource_info->num_subresources; ++i) + { + auto& mapped_subresource = mapped_subresources[i]; + + GFXRECON_ASSERT(mapped_subresource.shadow_allocation != + util::PageGuardManager::kNullShadowHandle); + + tracker->RemoveTrackedMemory(mapped_subresource.tracker_id); + tracker->FreePersistentShadowMemory(mapped_subresource.shadow_allocation); + } + } + } + } + } +} + +void D3D12CaptureManager::ProcessMapDiscardNoOverwriteUnmapped(format::HandleId context_id, + std::shared_ptr& context_info, + std::shared_ptr& resource_info, + MappedSubresource& mapped_subresource, + D3D11_MAP map_type, + D3D11_MAPPED_SUBRESOURCE* mapped_subresource_data, + size_t size) +{ + GFXRECON_ASSERT(context_info != nullptr); + + if (!context_info->is_deferred) + { + util::PageGuardManager* manager = util::PageGuardManager::Get(); + assert(manager != nullptr); + + if (mapped_subresource.shadow_allocation == util::PageGuardManager::kNullShadowHandle) + { + if ((mapped_subresource.tracker_id != 0) && (map_type == D3D11_MAP_WRITE_NO_OVERWRITE)) + { + // If a resource has previously been mapped with D3D11_MAP_WRITE or + // D3D11_MAP_READ_WRITE, its current content will not be copied to the persistent + // memory allocation, possibly producing an invalid result if the current content is + // expected to be preserved. + GFXRECON_LOG_WARNING_ONCE("A mapped resource that has previously been mapped with " + "D3D11_MAP_WRITE or D3D11_MAP_READ_WRITE has been mapped " + "with D3D11_MAP_WRITE_NO_OVERWRITE. This case " + "is unexpected and may not be handled correctly."); + } + + // When mapped for discard, the previous content of the memory does not need to be + // preserved and a persistent allocation can be created to skip allocating and + // copying each time the discarded memory is mapped. + mapped_subresource.shadow_allocation = manager->AllocatePersistentShadowMemory(size); + + mapped_subresource_data->pData = AllocateMappedResourceMemory(manager, mapped_subresource, size); + } + else if (map_type == D3D11_MAP_WRITE_DISCARD) + { + // Update the memory ID and pointer that will be written to the capture file with the + // address of the new mapped allocation. + mapped_subresource_data->pData = UpdateDiscardedResourceMemory(manager, mapped_subresource); + } + else + { + // Retrieve the shadow memory pointer to return to the caller for the + // D3D11_MAP_WRITE_NO_OVERWRITE case. + mapped_subresource_data->pData = GetMappedResourceMemory(manager, mapped_subresource); + } + } + else + { + if (mapped_subresource.shadow_allocation == util::WriteWatchTracker::kNullShadowHandle) + { + if ((mapped_subresource.tracker_id != 0) && (map_type == D3D11_MAP_WRITE_NO_OVERWRITE)) + { + // If a resource has previously been mapped with D3D11_MAP_WRITE or + // D3D11_MAP_READ_WRITE, its current content will not be copied to the persistent + // memory allocation, possibly producing an invalid result if the current content is + // expected to be preserved. + GFXRECON_LOG_WARNING_ONCE("A mapped resource that has previously been mapped with " + "D3D11_MAP_WRITE or D3D11_MAP_READ_WRITE has been mapped " + "with D3D11_MAP_WRITE_NO_OVERWRITE. This case " + "is unexpected and may not be handled correctly."); + } + + if (context_info->deferred_tracker == nullptr) + { + context_info->deferred_tracker = std::make_unique(); + } + + auto& deferred_tracker = context_info->deferred_tracker; + + // When mapped for discard, the previous content of the memory does not need to be + // preserved and a persistent allocation can be created to skip allocating and + // copying each time the discarded memory is mapped. + mapped_subresource.shadow_allocation = deferred_tracker->AllocatePersistentShadowMemory(size); + + mapped_subresource_data->pData = + AllocateMappedResourceMemoryDeferred(deferred_tracker.get(), mapped_subresource, size); + } + else if (map_type == D3D11_MAP_WRITE_DISCARD) + { + // Update the memory ID and pointer that will be written to the capture file with the + // address of the new mapped allocation. + mapped_subresource_data->pData = + UpdateDiscardedResourceMemoryDeferred(context_info->deferred_tracker.get(), mapped_subresource); + } + else + { + // Retrieve the shadow memory pointer to return to the caller for the + // D3D11_MAP_WRITE_NO_OVERWRITE case. + mapped_subresource_data->pData = + GetMappedResourceMemoryDeferred(context_info->deferred_tracker.get(), mapped_subresource); + } + } +} + +void D3D12CaptureManager::ProcessMapDiscardMapped(std::shared_ptr& context_info, + MappedSubresource& mapped_subresource, + D3D11_MAP map_type, + D3D11_MAPPED_SUBRESOURCE* mapped_subresource_data) +{ + GFXRECON_ASSERT(context_info != nullptr); + + if (!context_info->is_deferred) + { + util::PageGuardManager* manager = util::PageGuardManager::Get(); + assert(manager != nullptr); + + // Process any dirty pages that may be pending on the current memory ID before updating it. + manager->ProcessMemoryEntry( + mapped_subresource.tracker_id, [this](uint64_t memory_id, void* start_address, size_t offset, size_t size) { + WriteFillMemoryCmd(format::ApiFamilyId::ApiFamily_D3D11, memory_id, offset, size, start_address); + }); + + // Update the memory ID and pointer that will be written to the capture file with the + // address of the new mapped allocation. + mapped_subresource_data->pData = UpdateDiscardedResourceMemory(manager, mapped_subresource); + } + else + { + GFXRECON_ASSERT(context_info->deferred_tracker != nullptr); + + auto& deferred_tracker = context_info->deferred_tracker; + + // Process any dirty pages that may be pending on the current memory ID before updating it. + deferred_tracker->ProcessMemoryEntry( + mapped_subresource.tracker_id, [this](uint64_t memory_id, void* start_address, size_t offset, size_t size) { + WriteFillMemoryCmd(format::ApiFamilyId::ApiFamily_D3D11, memory_id, offset, size, start_address); + }); + + // Update the memory ID and pointer that will be written to the capture file with the address of the new mapped + // allocation. + mapped_subresource_data->pData = + UpdateDiscardedResourceMemoryDeferred(deferred_tracker.get(), mapped_subresource); + } +} + +void D3D12CaptureManager::ProcessUnmap(std::shared_ptr& context_info, + MappedSubresource& mapped_subresource) +{ + GFXRECON_ASSERT(context_info != nullptr); + + if (!context_info->is_deferred) + { + auto manager = util::PageGuardManager::Get(); + GFXRECON_ASSERT(manager != nullptr); + + manager->ProcessMemoryEntry( + mapped_subresource.tracker_id, [this](uint64_t memory_id, void* start_address, size_t offset, size_t size) { + WriteFillMemoryCmd(format::ApiFamilyId::ApiFamily_D3D11, memory_id, offset, size, start_address); + }); + + // Persistent allocations created for D3D11_MAP_DISCARD and D3D11_MAP_NO_OVERWRITE will + // stay in the memory tracker until the resource is destroyed. For legal Map/Unmap + // usage, where memory is mapped and unmapped between draw/dispatch calls, this reduces + // capture overhead by eliminating frequent add/remove operations from the page guard + // manager. For illegal Map/Unmap usage, where an application continues to write to + // memory after Unmap, this allows those writes to be detected. + if (mapped_subresource.shadow_allocation == util::PageGuardManager::kNullShadowHandle) + { + manager->RemoveTrackedMemory(mapped_subresource.tracker_id); + mapped_subresource.tracker_id = 0; + } + } + else + { + auto& tracker = context_info->deferred_tracker; + GFXRECON_ASSERT(tracker != nullptr); + + tracker->ProcessMemoryEntry( + mapped_subresource.tracker_id, [this](uint64_t memory_id, void* start_address, size_t offset, size_t size) { + WriteFillMemoryCmd(format::ApiFamilyId::ApiFamily_D3D11, memory_id, offset, size, start_address); + }); + } +} + +void D3D12CaptureManager::InitializeID3D11Texture2DInfo(ID3D11Texture2D_Wrapper* wrapper, + const D3D11_TEXTURE2D_DESC* desc) +{ + GFXRECON_ASSERT((wrapper != nullptr) && (desc != nullptr)); + auto info = wrapper->GetObjectInfo(); + info->dimension = D3D11_RESOURCE_DIMENSION_TEXTURE2D; + info->format = desc->Format; + info->width = desc->Width; + info->height = desc->Height; + info->depth_or_array_size = desc->ArraySize; + info->mip_levels = graphics::dx12::GetNumMipLevels(desc->MipLevels, desc->Width, desc->Height); + info->num_subresources = graphics::dx12::GetNumSubresources(desc); +} + +HRESULT D3D12CaptureManager::OverrideD3D11CreateDevice(IDXGIAdapter* adapter, + D3D_DRIVER_TYPE driver_type, + HMODULE software, + UINT flags, + const D3D_FEATURE_LEVEL* feature_levels, + UINT num_feature_levels, + UINT sdk_version, + ID3D11Device** device, + D3D_FEATURE_LEVEL* feature_level, + ID3D11DeviceContext** immediate_context) +{ + if (GetDebugLayerSetting()) + { + flags |= D3D11_CREATE_DEVICE_DEBUG; + } + + return d3d11_dispatch_table_.D3D11CreateDevice(adapter, + driver_type, + software, + flags, + feature_levels, + num_feature_levels, + sdk_version, + device, + feature_level, + immediate_context); +} + +HRESULT D3D12CaptureManager::OverrideD3D11CreateDeviceAndSwapChain(IDXGIAdapter* adapter, + D3D_DRIVER_TYPE driver_type, + HMODULE software, + UINT flags, + const D3D_FEATURE_LEVEL* feature_levels, + UINT num_feature_levels, + UINT sdk_version, + const DXGI_SWAP_CHAIN_DESC* swap_chain_desc, + IDXGISwapChain** swap_chain, + ID3D11Device** device, + D3D_FEATURE_LEVEL* feature_level, + ID3D11DeviceContext** immediate_context) +{ + if (GetDebugLayerSetting()) + { + flags |= D3D11_CREATE_DEVICE_DEBUG; + } + + return d3d11_dispatch_table_.D3D11CreateDeviceAndSwapChain(adapter, + driver_type, + software, + flags, + feature_levels, + num_feature_levels, + sdk_version, + swap_chain_desc, + swap_chain, + device, + feature_level, + immediate_context); +} + +void D3D12CaptureManager::PostProcess_D3D11CreateDevice(HRESULT result, + IDXGIAdapter* adapter, + D3D_DRIVER_TYPE driver_type, + HMODULE software, + UINT flags, + const D3D_FEATURE_LEVEL* feature_levels, + UINT num_feature_levels, + UINT sdk_version, + ID3D11Device** device, + D3D_FEATURE_LEVEL* feature_level, + ID3D11DeviceContext** immediate_context) +{ + GFXRECON_UNREFERENCED_PARAMETER(driver_type); + GFXRECON_UNREFERENCED_PARAMETER(software); + GFXRECON_UNREFERENCED_PARAMETER(flags); + GFXRECON_UNREFERENCED_PARAMETER(feature_levels); + GFXRECON_UNREFERENCED_PARAMETER(num_feature_levels); + GFXRECON_UNREFERENCED_PARAMETER(sdk_version); + GFXRECON_UNREFERENCED_PARAMETER(feature_level); + GFXRECON_UNREFERENCED_PARAMETER(immediate_context); + + if (SUCCEEDED(result)) + { + if ((device != nullptr) && (*device != nullptr)) + { + auto wrapped_device = GetWrappedObject(*device); + auto wrapped_adapter = GetWrappedObject(adapter); + + format::DxgiAdapterDesc* active_adapter = nullptr; + + // Ensure that adapters are tracked. + if (adapters_.empty()) + { + HRESULT factory_result = E_FAIL; + graphics::dx12::IDXGIFactoryComPtr factory; + + if (wrapped_adapter != nullptr) + { + factory_result = wrapped_adapter->GetParent(IID_PPV_ARGS(&factory)); + } + else + { + auto device_adapter = graphics::dx12::GetAdapter(wrapped_device); + if (device_adapter != nullptr) + { + factory_result = device_adapter->GetParent(IID_PPV_ARGS(&factory)); + } + } + + if (SUCCEEDED(factory_result)) + { + graphics::dx12::TrackAdapters(factory, adapters_); + } + } + + if (wrapped_adapter != nullptr) + { + DXGI_ADAPTER_DESC desc{}; + wrapped_adapter->GetDesc(&desc); + + active_adapter = graphics::dx12::MarkActiveAdapter(desc.AdapterLuid, adapters_); + } + else + { + active_adapter = graphics::dx12::MarkActiveAdapter(wrapped_device, adapters_); + } + + // Write adapter desc to file if it was marked active, and has not already been seen. + auto adapter_id = GetDx12WrappedId(adapter); + if (active_adapter != nullptr) + { + graphics::dx12::InjectAdapterCaptureId(active_adapter->extra_info, adapter_id); + WriteDxgiAdapterInfoCommand(format::ApiFamilyId::ApiFamily_D3D11, *active_adapter); + } + else + { + // we have to write adapter if it is already marked active and as a result active_adapter is null + // this is essential for marking active adapter for system with multiple GPUs + auto parent_adapter = + graphics::dx12::GetAdapterDescByLUID(graphics::dx12::GetAdapterLuid(wrapped_device), adapters_); + if (parent_adapter != nullptr) + { + graphics::dx12::InjectAdapterCaptureId(parent_adapter->extra_info, adapter_id); + WriteDxgiAdapterInfoCommand(format::ApiFamilyId::ApiFamily_D3D11, *parent_adapter); + } + } + + WriteDx11DriverInfo(); + + // Check device features. + auto threading_feature_data = D3D11_FEATURE_DATA_THREADING{ FALSE, FALSE }; + auto check_feature_result = wrapped_device->CheckFeatureSupport( + D3D11_FEATURE_THREADING, &threading_feature_data, sizeof(threading_feature_data)); + if (SUCCEEDED(check_feature_result) && threading_feature_data.DriverCommandLists) + { + auto device_info = reinterpret_cast(*device)->GetObjectInfo(); + device_info->supports_command_lists = true; + } + } + } +} + +void D3D12CaptureManager::PostProcess_D3D11CreateDeviceAndSwapChain(HRESULT result, + IDXGIAdapter* adapter, + D3D_DRIVER_TYPE driver_type, + HMODULE software, + UINT flags, + const D3D_FEATURE_LEVEL* feature_levels, + UINT num_feature_levels, + UINT sdk_version, + const DXGI_SWAP_CHAIN_DESC* swap_chain_desc, + IDXGISwapChain** swap_chain, + ID3D11Device** device, + D3D_FEATURE_LEVEL* feature_level, + ID3D11DeviceContext** immediate_context) +{ + // Apply the same device processing that would be performed for D3D11CreateDevice. + PostProcess_D3D11CreateDevice(result, + adapter, + driver_type, + software, + flags, + feature_levels, + num_feature_levels, + sdk_version, + device, + feature_level, + immediate_context); + + if (SUCCEEDED(result) && (swap_chain_desc != nullptr) && (swap_chain != nullptr) && ((*swap_chain) != nullptr)) + { + auto swap_chain_wrapper = reinterpret_cast(*swap_chain); + + if (device != nullptr) + { + InitializeSwapChainInfo( + swap_chain_wrapper, *device, swap_chain_desc->BufferCount, swap_chain_desc->SwapEffect); + } + else + { + InitializeSwapChainInfo( + swap_chain_wrapper, nullptr, swap_chain_desc->BufferCount, swap_chain_desc->SwapEffect); + } + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device_CreateBuffer(ID3D11Device_Wrapper* wrapper, + HRESULT result, + const D3D11_BUFFER_DESC* desc, + const D3D11_SUBRESOURCE_DATA* initial_data, + ID3D11Buffer** buffer) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(initial_data); + GFXRECON_ASSERT(desc != nullptr); + + if (SUCCEEDED(result) && (buffer != nullptr) && (*buffer != nullptr)) + { + auto info = reinterpret_cast(*buffer)->GetObjectInfo(); + info->dimension = D3D11_RESOURCE_DIMENSION_BUFFER; + info->width = desc->ByteWidth; + info->num_subresources = 1; + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device_CreateDeferredContext(ID3D11Device_Wrapper* wrapper, + HRESULT result, + UINT context_flags, + ID3D11DeviceContext** deferred_context) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + + if (SUCCEEDED(result) && (deferred_context != nullptr) && (*deferred_context != nullptr)) + { + auto device_info = wrapper->GetObjectInfo(); + auto device_context_info = reinterpret_cast(*deferred_context)->GetObjectInfo(); + device_context_info->is_deferred = true; + device_context_info->needs_update_subresource_adjustment = !device_info->supports_command_lists; + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device1_CreateDeferredContext1(ID3D11Device_Wrapper* wrapper, + HRESULT result, + UINT context_flags, + ID3D11DeviceContext1** deferred_context) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + + if (SUCCEEDED(result) && (deferred_context != nullptr) && (*deferred_context != nullptr)) + { + auto device_info = wrapper->GetObjectInfo(); + auto device_context_info = reinterpret_cast(*deferred_context)->GetObjectInfo(); + device_context_info->is_deferred = true; + device_context_info->needs_update_subresource_adjustment = !device_info->supports_command_lists; + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device2_CreateDeferredContext2(ID3D11Device_Wrapper* wrapper, + HRESULT result, + UINT context_flags, + ID3D11DeviceContext2** deferred_context) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + + if (SUCCEEDED(result) && (deferred_context != nullptr) && (*deferred_context != nullptr)) + { + auto device_info = wrapper->GetObjectInfo(); + auto device_context_info = reinterpret_cast(*deferred_context)->GetObjectInfo(); + device_context_info->is_deferred = true; + device_context_info->needs_update_subresource_adjustment = !device_info->supports_command_lists; + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device3_CreateDeferredContext3(ID3D11Device_Wrapper* wrapper, + HRESULT result, + UINT context_flags, + ID3D11DeviceContext3** deferred_context) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + + if (SUCCEEDED(result) && (deferred_context != nullptr) && (*deferred_context != nullptr)) + { + auto device_info = wrapper->GetObjectInfo(); + auto device_context_info = reinterpret_cast(*deferred_context)->GetObjectInfo(); + device_context_info->is_deferred = true; + device_context_info->needs_update_subresource_adjustment = !device_info->supports_command_lists; + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device_CreateTexture1D(ID3D11Device_Wrapper* wrapper, + HRESULT result, + const D3D11_TEXTURE1D_DESC* desc, + const D3D11_SUBRESOURCE_DATA* initial_data, + ID3D11Texture1D** texture1D) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(initial_data); + GFXRECON_ASSERT(desc != nullptr); + + if (SUCCEEDED(result) && (texture1D != nullptr) && (*texture1D != nullptr)) + { + auto info = reinterpret_cast(*texture1D)->GetObjectInfo(); + info->dimension = D3D11_RESOURCE_DIMENSION_TEXTURE1D; + info->format = desc->Format; + info->width = desc->Width; + info->depth_or_array_size = desc->ArraySize; + info->mip_levels = graphics::dx12::GetNumMipLevels(desc->MipLevels, desc->Width); + info->num_subresources = graphics::dx12::GetNumSubresources(desc); + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device_CreateTexture2D(ID3D11Device_Wrapper* wrapper, + HRESULT result, + const D3D11_TEXTURE2D_DESC* desc, + const D3D11_SUBRESOURCE_DATA* initial_data, + ID3D11Texture2D** texture2D) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(initial_data); + GFXRECON_ASSERT(desc != nullptr); + + if (SUCCEEDED(result) && (texture2D != nullptr) && (*texture2D != nullptr)) + { + InitializeID3D11Texture2DInfo(reinterpret_cast(*texture2D), desc); + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device3_CreateTexture2D1(ID3D11Device_Wrapper* wrapper, + HRESULT result, + const D3D11_TEXTURE2D_DESC1* desc1, + const D3D11_SUBRESOURCE_DATA* initial_data, + ID3D11Texture2D1** texture2D) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(initial_data); + GFXRECON_ASSERT(desc1 != nullptr); + + if (SUCCEEDED(result) && (texture2D != nullptr) && (*texture2D != nullptr)) + { + auto info = reinterpret_cast(*texture2D)->GetObjectInfo(); + info->dimension = D3D11_RESOURCE_DIMENSION_TEXTURE2D; + info->format = desc1->Format; + info->width = desc1->Width; + info->height = desc1->Height; + info->depth_or_array_size = desc1->ArraySize; + info->mip_levels = graphics::dx12::GetNumMipLevels(desc1->MipLevels, desc1->Width, desc1->Height); + info->num_subresources = graphics::dx12::GetNumSubresources(desc1); + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device_CreateTexture3D(ID3D11Device_Wrapper* wrapper, + HRESULT result, + const D3D11_TEXTURE3D_DESC* desc, + const D3D11_SUBRESOURCE_DATA* initial_data, + ID3D11Texture3D** texture3D) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(initial_data); + GFXRECON_ASSERT(desc != nullptr); + + if (SUCCEEDED(result) && (texture3D != nullptr) && (*texture3D != nullptr)) + { + auto info = reinterpret_cast(*texture3D)->GetObjectInfo(); + info->dimension = D3D11_RESOURCE_DIMENSION_TEXTURE3D; + info->format = desc->Format; + info->width = desc->Width; + info->height = desc->Height; + info->depth_or_array_size = desc->Depth; + info->mip_levels = graphics::dx12::GetNumMipLevels(desc->MipLevels, desc->Width, desc->Height, desc->Depth); + info->num_subresources = graphics::dx12::GetNumSubresources(desc); + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device3_CreateTexture3D1(ID3D11Device_Wrapper* wrapper, + HRESULT result, + const D3D11_TEXTURE3D_DESC1* desc1, + const D3D11_SUBRESOURCE_DATA* initial_data, + ID3D11Texture3D1** texture3D) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(initial_data); + GFXRECON_ASSERT(desc1 != nullptr); + + if (SUCCEEDED(result) && (texture3D != nullptr) && (*texture3D != nullptr)) + { + auto info = reinterpret_cast(*texture3D)->GetObjectInfo(); + info->dimension = D3D11_RESOURCE_DIMENSION_TEXTURE3D; + info->format = desc1->Format; + info->width = desc1->Width; + info->height = desc1->Height; + info->depth_or_array_size = desc1->Depth; + info->mip_levels = graphics::dx12::GetNumMipLevels(desc1->MipLevels, desc1->Width, desc1->Height, desc1->Depth); + info->num_subresources = graphics::dx12::GetNumSubresources(desc1); + } +} + +void D3D12CaptureManager::Destroy_ID3D11Buffer(ID3D11Buffer_Wrapper* wrapper) +{ + FreeMappedResourceMemory(wrapper); +} + +void D3D12CaptureManager::Destroy_ID3D11Texture1D(ID3D11Texture1D_Wrapper* wrapper) +{ + FreeMappedResourceMemory(wrapper); +} + +void D3D12CaptureManager::Destroy_ID3D11Texture2D(ID3D11Texture2D_Wrapper* wrapper) +{ + FreeMappedResourceMemory(wrapper); +} + +void D3D12CaptureManager::Destroy_ID3D11Texture3D(ID3D11Texture3D_Wrapper* wrapper) +{ + FreeMappedResourceMemory(wrapper); +} + +void D3D12CaptureManager::PostProcess_ID3D11DeviceContext_Map(ID3D11DeviceContext_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + UINT subresource, + D3D11_MAP map_type, + UINT map_flags, + D3D11_MAPPED_SUBRESOURCE* mapped_subresource_data) +{ + GFXRECON_ASSERT(wrapper != nullptr); + + if (SUCCEEDED(result) && (resource != nullptr)) + { + auto resource_wrapper = reinterpret_cast(resource); + auto resource_info = GetResourceInfo(resource_wrapper); + if (resource_info != nullptr) + { + assert((subresource < resource_info->num_subresources)); + + auto context_info = wrapper->GetObjectInfo(); + GFXRECON_ASSERT(context_info != nullptr); + + // Get or initialize the per-context mapped memory info entry. + auto entry = std::unordered_map::iterator{}; + auto context_id = wrapper->GetCaptureId(); + + { + std::lock_guard lock(GetMappedMemoryLock()); + + entry = resource_info->mapped_info.find(context_id); + if (entry == resource_info->mapped_info.end()) + { + auto& pair = resource_info->mapped_info.emplace( + context_id, + ResourceTrackingInfo{ + std::make_unique(resource_info->num_subresources), + std::make_unique(resource_info->num_subresources), + context_info }); + + entry = pair.first; + } + } + + auto& mapped_info = entry->second; + auto& mapped_subresource = mapped_info.mapped_subresources[subresource]; + + if ((mapped_subresource_data != nullptr) && (mapped_subresource_data->pData != nullptr) && + (map_type != D3D11_MAP_READ)) + { + mapped_subresource.data = mapped_subresource_data->pData; + + if (++mapped_subresource.map_count == 1) + { + // Calculate and store the subresource size on first use. This size is used with kPageGuard when + // adding an entry to PageGuardManager on Map or with kUnassisted when writing memory to the file on + // Unmap. + auto& subresource_size = mapped_info.subresource_sizes[subresource]; + if (subresource_size == 0) + { + subresource_size = graphics::dx12::GetSubresourceSize(resource_info->dimension, + resource_info->format, + resource_info->width, + resource_info->height, + resource_info->depth_or_array_size, + resource_info->mip_levels, + mapped_subresource_data->RowPitch, + mapped_subresource_data->DepthPitch, + subresource); + } + + if (GetMemoryTrackingMode() == CaptureSettings::MemoryTrackingMode::kPageGuard) + { + GFXRECON_CHECK_CONVERSION_DATA_LOSS(size_t, subresource_size); + auto size = static_cast(subresource_size); + + if ((map_type == D3D11_MAP_WRITE_DISCARD) || (map_type == D3D11_MAP_WRITE_NO_OVERWRITE)) + { + ProcessMapDiscardNoOverwriteUnmapped(context_id, + context_info, + resource_info, + mapped_subresource, + map_type, + mapped_subresource_data, + size); + } + else + { + util::PageGuardManager* manager = util::PageGuardManager::Get(); + assert(manager != nullptr); + + // The D3D11_MAP_WRITE and D3D11_MAP_READ_WRITE cases use standard memory tracking + // where an entry for the mapped memory will be added to the memory tracker at Map and + // removed at Unmap, the memory tracker will allocate the shadow memory, and the content of + // the memory returned by Map will be copied to the shadow memory. + if (mapped_subresource.shadow_allocation == util::PageGuardManager::kNullShadowHandle) + { + mapped_subresource_data->pData = + AllocateMappedResourceMemory(manager, mapped_subresource, size); + } + else + { + GFXRECON_LOG_WARNING_ONCE("A mapped resource that has previously been assigned a " + "persistent memory allocation has been mapped with " + "D3D11_MAP_WRITE or D3D11_MAP_READ_WRITE. This case " + "is unexpected and may not be handled correctly."); + + // When a resource has previously been mapped with D3D11_MAP_WRITE_DISCARD or + // D3D11_MAP_WRITE_NO_OVERWRITE and has been assigned a persistent memory allocation, + // its entry will remain in the memory tracker until it is released. Retrieve the + // existing shadow memory pointer to return to the caller. If the caller specified + // D3D11_MAP_READ_WRITE, the content of the shadow memory may not be valid for reading. + mapped_subresource_data->pData = GetMappedResourceMemory(manager, mapped_subresource); + } + } + } + } + else + { + // The application has mapped the same ID3D11Resource object more than once and the pageguard + // manager is already tracking it, so we will return the pointer obtained from the pageguard manager + // on the first map call for the non WRITE_DISCARD case. If the memory was mapped with + // WRITE_DISCARD, a new allocation was created and we need to update the pageguard manager. Note + // that the D3D11 runtime will report an error for this case, while also returning S_OK, and the + // resource will be fully unmapped by the first Unmap() call regardless of the number of times it + // has been mapped. + if (GetMemoryTrackingMode() == CaptureSettings::MemoryTrackingMode::kPageGuard) + { + // Return the shadow memory that was allocated for the previous map operation. + util::PageGuardManager* manager = util::PageGuardManager::Get(); + assert(manager != nullptr); + + if (map_type == D3D11_MAP_WRITE_DISCARD) + { + ProcessMapDiscardMapped( + context_info, mapped_subresource, map_type, mapped_subresource_data); + } + else + { + mapped_subresource_data->pData = GetMappedResourceMemory(manager, mapped_subresource); + } + } + } + } + } + } +} + +void D3D12CaptureManager::PreProcess_ID3D11DeviceContext_Unmap(ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Resource* resource, + UINT subresource) +{ + GFXRECON_ASSERT(wrapper != nullptr); + + if (resource != nullptr) + { + auto resource_wrapper = reinterpret_cast(resource); + + auto info = GetResourceInfo(resource_wrapper); + if (info != nullptr) + { + assert((subresource < info->num_subresources)); + + auto entry = std::unordered_map::iterator{}; + auto found = false; + + { + std::lock_guard lock(GetMappedMemoryLock()); + entry = info->mapped_info.find(wrapper->GetCaptureId()); + found = entry != info->mapped_info.end(); + } + + if (found) + { + auto& mapped_info = entry->second; + auto& mapped_subresource = mapped_info.mapped_subresources[subresource]; + + // Note that memory tracking ignores the case where a resource was mapped for use with + // WriteToSubresource, where the Map D3D11_MAPPED_SUBRESOURCE parameter was NULL. + if (mapped_subresource.data != nullptr) + { + if (mapped_subresource.map_count > 0) + { + // The D3D11 runtime will report an error when a subresource is mapped more than once, but may + // also return S_OK. The resource will be fully unmapped by the first Unmap() call regardless of + // the number of times it has been mapped. + mapped_subresource.map_count = 0; + + if (GetMemoryTrackingMode() == CaptureSettings::MemoryTrackingMode::kPageGuard) + { + auto context_info = wrapper->GetObjectInfo(); + ProcessUnmap(context_info, mapped_subresource); + } + else if (GetMemoryTrackingMode() == CaptureSettings::MemoryTrackingMode::kUnassisted) + { + uint64_t offset = 0; + uint64_t size = mapped_info.subresource_sizes[subresource]; + + WriteFillMemoryCmd(format::ApiFamilyId::ApiFamily_D3D11, + reinterpret_cast(mapped_subresource.data), + offset, + size, + mapped_subresource.data); + } + + mapped_subresource.data = nullptr; + } + else + { + GFXRECON_LOG_WARNING("Attempting to unmap ID3D11Resource object with capture ID = %" PRIx64 + " that is not currently mapped", + resource_wrapper->GetCaptureId()); + } + } + } + else + { + GFXRECON_LOG_WARNING( + "Attempting to unmap ID3D11Resource object with capture ID = %" PRIx64 + " that has not been mapped by ID3D11DeviceContext object with capture ID = %" PRIx64, + resource_wrapper->GetCaptureId(), + wrapper->GetCaptureId()); + } + } + } +} + +void D3D12CaptureManager::PreProcess_ID3D11DeviceContext_Dispatch(ID3D11DeviceContext_Wrapper* wrapper, + UINT thread_group_count_x, + UINT thread_group_count_y, + UINT thread_group_count_z) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(thread_group_count_x); + GFXRECON_UNREFERENCED_PARAMETER(thread_group_count_y); + GFXRECON_UNREFERENCED_PARAMETER(thread_group_count_z); + + auto context_info = wrapper->GetObjectInfo(); + if (!context_info->is_deferred) + { + ProcessMappedMemory(format::ApiFamilyId::ApiFamily_D3D11); + } +} + +void D3D12CaptureManager::PreProcess_ID3D11DeviceContext_DispatchIndirect(ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* buffer_for_args, + UINT aligned_byte_offset_for_args) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(buffer_for_args); + GFXRECON_UNREFERENCED_PARAMETER(aligned_byte_offset_for_args); + + auto context_info = wrapper->GetObjectInfo(); + if (!context_info->is_deferred) + { + ProcessMappedMemory(format::ApiFamilyId::ApiFamily_D3D11); + } +} + +void D3D12CaptureManager::PreProcess_ID3D11DeviceContext_Draw(ID3D11DeviceContext_Wrapper* wrapper, + UINT vertex_count, + UINT start_vertex_location) +{ + GFXRECON_UNREFERENCED_PARAMETER(vertex_count); + GFXRECON_UNREFERENCED_PARAMETER(start_vertex_location); + + auto context_info = wrapper->GetObjectInfo(); + if (!context_info->is_deferred) + { + ProcessMappedMemory(format::ApiFamilyId::ApiFamily_D3D11); + } +} + +void D3D12CaptureManager::PreProcess_ID3D11DeviceContext_DrawAuto(ID3D11DeviceContext_Wrapper* wrapper) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + + auto context_info = wrapper->GetObjectInfo(); + if (!context_info->is_deferred) + { + ProcessMappedMemory(format::ApiFamilyId::ApiFamily_D3D11); + } +} + +void D3D12CaptureManager::PreProcess_ID3D11DeviceContext_DrawIndexed(ID3D11DeviceContext_Wrapper* wrapper, + UINT index_count, + UINT start_index_location, + INT base_vertex_location) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(index_count); + GFXRECON_UNREFERENCED_PARAMETER(start_index_location); + GFXRECON_UNREFERENCED_PARAMETER(base_vertex_location); + + auto context_info = wrapper->GetObjectInfo(); + if (!context_info->is_deferred) + { + ProcessMappedMemory(format::ApiFamilyId::ApiFamily_D3D11); + } +} + +void D3D12CaptureManager::PreProcess_ID3D11DeviceContext_DrawIndexedInstanced(ID3D11DeviceContext_Wrapper* wrapper, + UINT index_count_per_instance, + UINT instance_count, + UINT start_index_location, + INT base_vertex_location, + UINT start_instance_location) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(index_count_per_instance); + GFXRECON_UNREFERENCED_PARAMETER(instance_count); + GFXRECON_UNREFERENCED_PARAMETER(start_index_location); + GFXRECON_UNREFERENCED_PARAMETER(base_vertex_location); + GFXRECON_UNREFERENCED_PARAMETER(start_instance_location); + + auto context_info = wrapper->GetObjectInfo(); + if (!context_info->is_deferred) + { + ProcessMappedMemory(format::ApiFamilyId::ApiFamily_D3D11); + } +} + +void D3D12CaptureManager::PreProcess_ID3D11DeviceContext_DrawIndexedInstancedIndirect( + ID3D11DeviceContext_Wrapper* wrapper, ID3D11Buffer* buffer_for_args, UINT aligned_byte_offset_for_args) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(buffer_for_args); + GFXRECON_UNREFERENCED_PARAMETER(aligned_byte_offset_for_args); + + auto context_info = wrapper->GetObjectInfo(); + if (!context_info->is_deferred) + { + ProcessMappedMemory(format::ApiFamilyId::ApiFamily_D3D11); + } +} + +void D3D12CaptureManager::PreProcess_ID3D11DeviceContext_DrawInstanced(ID3D11DeviceContext_Wrapper* wrapper, + UINT vertex_count_per_instance, + UINT instance_count, + UINT start_vertex_location, + UINT start_instance_location) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(vertex_count_per_instance); + GFXRECON_UNREFERENCED_PARAMETER(instance_count); + GFXRECON_UNREFERENCED_PARAMETER(start_vertex_location); + GFXRECON_UNREFERENCED_PARAMETER(start_instance_location); + + auto context_info = wrapper->GetObjectInfo(); + if (!context_info->is_deferred) + { + ProcessMappedMemory(format::ApiFamilyId::ApiFamily_D3D11); + } +} + +void D3D12CaptureManager::PreProcess_ID3D11DeviceContext_DrawInstancedIndirect(ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* buffer_for_args, + UINT aligned_byte_offset_for_args) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(buffer_for_args); + GFXRECON_UNREFERENCED_PARAMETER(aligned_byte_offset_for_args); + + auto context_info = wrapper->GetObjectInfo(); + if (!context_info->is_deferred) + { + ProcessMappedMemory(format::ApiFamilyId::ApiFamily_D3D11); + } +} + +void D3D12CaptureManager::AddViewResourceRef(ID3D11ViewInfo* info, ID3D11Resource* resource) +{ + GFXRECON_ASSERT((info != nullptr) && (resource != nullptr)); + auto resource_wrapper = reinterpret_cast(resource); + resource_wrapper->AddRefInternal(); + info->resource = resource_wrapper; +} + +void D3D12CaptureManager::ReleaseViewResourceRef(ID3D11ViewInfo* info) +{ + GFXRECON_ASSERT((info != nullptr) && (info->resource != nullptr)); + info->resource->ReleaseRefInternal(); +} + +void D3D12CaptureManager::PostProcess_ID3D11Device_CreateShaderResourceView(ID3D11Device_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + const D3D11_SHADER_RESOURCE_VIEW_DESC* desc, + ID3D11ShaderResourceView** srview) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(desc); + + if (SUCCEEDED(result) && (srview != nullptr) && (*srview != nullptr)) + { + auto info = reinterpret_cast(*srview)->GetObjectInfo(); + AddViewResourceRef(info.get(), resource); + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device_CreateShaderResourceView1( + ID3D11Device3_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + const D3D11_SHADER_RESOURCE_VIEW_DESC1* desc1, + ID3D11ShaderResourceView1** srview1) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(desc1); + + if (SUCCEEDED(result) && (srview1 != nullptr) && (*srview1 != nullptr)) + { + auto info = reinterpret_cast(*srview1)->GetObjectInfo(); + AddViewResourceRef(info.get(), resource); + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device_CreateUnorderedAccessView( + ID3D11Device_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + const D3D11_UNORDERED_ACCESS_VIEW_DESC* desc, + ID3D11UnorderedAccessView** uaview) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(desc); + + if (SUCCEEDED(result) && (uaview != nullptr) && (*uaview != nullptr)) + { + auto info = reinterpret_cast(*uaview)->GetObjectInfo(); + AddViewResourceRef(info.get(), resource); + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device_CreateUnorderedAccessView1( + ID3D11Device3_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + const D3D11_UNORDERED_ACCESS_VIEW_DESC1* desc1, + ID3D11UnorderedAccessView1** uaview1) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(desc1); + + if (SUCCEEDED(result) && (uaview1 != nullptr) && (*uaview1 != nullptr)) + { + auto info = reinterpret_cast(*uaview1)->GetObjectInfo(); + AddViewResourceRef(info.get(), resource); + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device_CreateRenderTargetView(ID3D11Device_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + const D3D11_RENDER_TARGET_VIEW_DESC* desc, + ID3D11RenderTargetView** rtview) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(desc); + + if (SUCCEEDED(result) && (rtview != nullptr) && (*rtview != nullptr)) + { + auto info = reinterpret_cast(*rtview)->GetObjectInfo(); + AddViewResourceRef(info.get(), resource); + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device_CreateRenderTargetView1(ID3D11Device3_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + const D3D11_RENDER_TARGET_VIEW_DESC1* desc1, + ID3D11RenderTargetView1** rtview1) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(desc1); + + if (SUCCEEDED(result) && (rtview1 != nullptr) && (*rtview1 != nullptr)) + { + auto info = reinterpret_cast(*rtview1)->GetObjectInfo(); + AddViewResourceRef(info.get(), resource); + } +} + +void D3D12CaptureManager::PostProcess_ID3D11Device_CreateDepthStencilView(ID3D11Device_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + const D3D11_DEPTH_STENCIL_VIEW_DESC* desc, + ID3D11DepthStencilView** depth_stencil_view) +{ + GFXRECON_UNREFERENCED_PARAMETER(wrapper); + GFXRECON_UNREFERENCED_PARAMETER(desc); + + if (SUCCEEDED(result) && (depth_stencil_view != nullptr) && (*depth_stencil_view != nullptr)) + { + auto info = reinterpret_cast(*depth_stencil_view)->GetObjectInfo(); + AddViewResourceRef(info.get(), resource); + } +} + +void D3D12CaptureManager::Destroy_ID3D11ShaderResourceView(ID3D11ShaderResourceView_Wrapper* wrapper) +{ + GFXRECON_ASSERT(wrapper != nullptr); + auto info = wrapper->GetObjectInfo(); + ReleaseViewResourceRef(info.get()); +} + +void D3D12CaptureManager::Destroy_ID3D11RenderTargetView(ID3D11RenderTargetView_Wrapper* wrapper) +{ + GFXRECON_ASSERT(wrapper != nullptr); + auto info = wrapper->GetObjectInfo(); + ReleaseViewResourceRef(info.get()); +} + +void D3D12CaptureManager::Destroy_ID3D11UnorderedAccessView(ID3D11UnorderedAccessView_Wrapper* wrapper) +{ + GFXRECON_ASSERT(wrapper != nullptr); + auto info = wrapper->GetObjectInfo(); + ReleaseViewResourceRef(info.get()); +} + +void D3D12CaptureManager::Destroy_ID3D11DepthStencilView(ID3D11DepthStencilView_Wrapper* wrapper) +{ + GFXRECON_ASSERT(wrapper != nullptr); + auto info = wrapper->GetObjectInfo(); + ReleaseViewResourceRef(info.get()); } -void D3D12CaptureManager::WriteDx12DriverInfo() +void D3D12CaptureManager::WriteDxDriverInfo(format::ApiFamilyId api_family) { if (IsCaptureModeWrite()) { @@ -2837,14 +4263,14 @@ void D3D12CaptureManager::WriteDx12DriverInfo() gfxrecon::graphics::dx12::GetActiveAdapterLuids(adapters_, adapter_luids); - if (util::driverinfo::GetDriverInfo(driverinfo, format::ApiFamilyId::ApiFamily_D3D12, adapter_luids) == true) + if (util::driverinfo::GetDriverInfo(driverinfo, api_family, adapter_luids) == true) { - WriteDriverInfoCommand(driverinfo); + WriteDriverInfoCommand(api_family, driverinfo); } } } -void D3D12CaptureManager::WriteDriverInfoCommand(const std::string& info) +void D3D12CaptureManager::WriteDriverInfoCommand(format::ApiFamilyId api_family, const std::string& info) { if ((IsCaptureModeWrite())) { @@ -2858,7 +4284,7 @@ void D3D12CaptureManager::WriteDriverInfoCommand(const std::string& info) driver_info_header.meta_header.block_header.type = format::BlockType::kMetaDataBlock; driver_info_header.meta_header.block_header.size = format::GetMetaDataBlockBaseSize(driver_info_header); driver_info_header.meta_header.meta_data_id = - format::MakeMetaDataId(format::ApiFamilyId::ApiFamily_D3D12, format::MetaDataType::kDriverInfoCommand); + format::MakeMetaDataId(api_family, format::MetaDataType::kDriverInfoCommand); driver_info_header.thread_id = GetThreadData()->thread_id_; WriteToFile(&driver_info_header, sizeof(driver_info_header)); diff --git a/framework/encode/d3d12_capture_manager.h b/framework/encode/d3d12_capture_manager.h index 16b510d7fb..909e99a1a2 100644 --- a/framework/encode/d3d12_capture_manager.h +++ b/framework/encode/d3d12_capture_manager.h @@ -2,6 +2,7 @@ ** Copyright (c) 2018-2020 Valve Corporation ** Copyright (c) 2018-2021 LunarG, Inc. ** Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -31,11 +32,13 @@ #include #include "encode/ags_dispatch_table.h" +#include "encode/d3d11_dispatch_table.h" #include "encode/d3d12_dispatch_table.h" #include "encode/dx12_state_tracker.h" #include "encode/dxgi_dispatch_table.h" #include "encode/dx12_rv_annotator.h" #include "generated/generated_dx12_wrappers.h" +#include "graphics/dx11_image_renderer.h" #include "graphics/dx12_image_renderer.h" GFXRECON_BEGIN_NAMESPACE(gfxrecon) @@ -95,6 +98,18 @@ class D3D12CaptureManager : public ApiCaptureManager //---------------------------------------------------------------------------- void InitAgsDispatchTable(const AgsDispatchTable& dispatch_table) { ags_dispatch_table_ = dispatch_table; } + /// \brief Initializes the D3D11 dispatch table. + /// + /// Initializes the CaptureManager's internal D3D11 dispatch table with + /// functions loaded from the D3D11 system DLL. This dispatch table will be + /// used by the 'wrapper' functions to invoke the 'real' D3D11 function prior + /// to processing the function parameters for encoding. + /// + /// \param dispatch_table A D3D11DispatchTable object containing the DXGI + /// function pointers to be used for initialization. + //---------------------------------------------------------------------------- + void InitD3D11DispatchTable(const D3D11DispatchTable& dispatch_table) { d3d11_dispatch_table_ = dispatch_table; } + //---------------------------------------------------------------------------- /// \brief Retrieves the DXGI dispatch table. /// @@ -128,6 +143,17 @@ class D3D12CaptureManager : public ApiCaptureManager //---------------------------------------------------------------------------- const D3D12DispatchTable& GetD3D12DispatchTable() const { return d3d12_dispatch_table_; } + //---------------------------------------------------------------------------- + /// \brief Retrieves the D3D11 dispatch table. + /// + /// Retrieves the CaptureManager's internal D3D11 dispatch table. Intended to be + /// used by the 'wrapper' functions when invoking the 'real' D3D11 functions. + /// + /// \return A D3D11DispatchTable object containing D3D11 function pointers + /// retrieved from the system DLL. + //---------------------------------------------------------------------------- + const D3D11DispatchTable& GetD3D11DispatchTable() const { return d3d11_dispatch_table_; } + //---------------------------------------------------------------------------- /// \brief Increments the scope count for the current thread. /// @@ -176,6 +202,26 @@ class D3D12CaptureManager : public ApiCaptureManager EndMethodCallCapture(); } + template + void EndCreateMethodCallCapture(REFIID riid, void** handle, ParentWrapper* create_object_wrapper) + { + if (IsCaptureModeTrack()) + { + if ((handle != nullptr) && (*handle != nullptr)) + { + assert(state_tracker_ != nullptr); + + auto thread_data = GetThreadData(); + assert(thread_data != nullptr); + + state_tracker_->AddEntry( + riid, handle, thread_data->call_id_, create_object_wrapper, thread_data->parameter_buffer_.get()); + } + } + + EndMethodCallCapture(); + } + void EndCreateDescriptorMethodCallCapture(D3D12_CPU_DESCRIPTOR_HANDLE dest_descriptor, ID3D12Device_Wrapper* create_object_wrapper); @@ -713,6 +759,30 @@ class D3D12CaptureManager : public ApiCaptureManager const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_INPUTS* pDesc, D3D12_RAYTRACING_ACCELERATION_STRUCTURE_PREBUILD_INFO* pInfo); + HRESULT OverrideD3D11CreateDevice(IDXGIAdapter* adapter, + D3D_DRIVER_TYPE driver_type, + HMODULE software, + UINT flags, + const D3D_FEATURE_LEVEL* feature_levels, + UINT num_feature_levels, + UINT sdk_version, + ID3D11Device** device, + D3D_FEATURE_LEVEL* feature_level, + ID3D11DeviceContext** immediate_context); + + HRESULT OverrideD3D11CreateDeviceAndSwapChain(IDXGIAdapter* adapter, + D3D_DRIVER_TYPE driver_type, + HMODULE software, + UINT flags, + const D3D_FEATURE_LEVEL* feature_levels, + UINT num_feature_levels, + UINT sdk_version, + const DXGI_SWAP_CHAIN_DESC* swap_chain_desc, + IDXGISwapChain** swap_chain, + ID3D11Device** device, + D3D_FEATURE_LEVEL* feature_level, + ID3D11DeviceContext** immediate_context); + virtual CaptureSettings::TraceSettings GetDefaultTraceSettings(); inline format::HandleId GetEnableDebugLayerObjectId() { return track_enable_debug_layer_object_id_; } @@ -735,9 +805,13 @@ class D3D12CaptureManager : public ApiCaptureManager void PostProcess_ID3D12StateObjectProperties_GetShaderIdentifier( ID3D12StateObjectProperties_Wrapper* properties_wrapper, void* result, LPCWSTR export_name); - void WriteDx12DriverInfo(); + void WriteDxDriverInfo(format::ApiFamilyId api_family); + + void WriteDx11DriverInfo() { WriteDxDriverInfo(format::ApiFamilyId::ApiFamily_D3D11); } - void WriteDriverInfoCommand(const std::string& info); + void WriteDx12DriverInfo() { WriteDxDriverInfo(format::ApiFamilyId::ApiFamily_D3D12); } + + void WriteDriverInfoCommand(format::ApiFamilyId api_family, const std::string& info); void WriteDx12RuntimeInfo(); @@ -749,7 +823,200 @@ class D3D12CaptureManager : public ApiCaptureManager void PostProcess_CreateDXGIFactory2(HRESULT result, UINT Flags, REFIID riid, void** ppFactory); - void WriteDxgiAdapterInfo(); + void PostProcess_D3D11CreateDevice(HRESULT result, + IDXGIAdapter* adapter, + D3D_DRIVER_TYPE driver_type, + HMODULE software, + UINT flags, + const D3D_FEATURE_LEVEL* feature_levels, + UINT num_feature_levels, + UINT sdk_version, + ID3D11Device** device, + D3D_FEATURE_LEVEL* feature_level, + ID3D11DeviceContext** immediate_context); + + void PostProcess_D3D11CreateDeviceAndSwapChain(HRESULT result, + IDXGIAdapter* adapter, + D3D_DRIVER_TYPE driver_type, + HMODULE software, + UINT flags, + const D3D_FEATURE_LEVEL* feature_levels, + UINT num_feature_levels, + UINT sdk_version, + const DXGI_SWAP_CHAIN_DESC* swap_chain_desc, + IDXGISwapChain** swap_chain, + ID3D11Device** device, + D3D_FEATURE_LEVEL* feature_level, + ID3D11DeviceContext** immediate_context); + + void PostProcess_ID3D11Device_CreateBuffer(ID3D11Device_Wrapper* wrapper, + HRESULT result, + const D3D11_BUFFER_DESC* desc, + const D3D11_SUBRESOURCE_DATA* initial_data, + ID3D11Buffer** buffer); + + void PostProcess_ID3D11Device_CreateDeferredContext(ID3D11Device_Wrapper* wrapper, + HRESULT result, + UINT context_flags, + ID3D11DeviceContext** deferred_context); + + void PostProcess_ID3D11Device1_CreateDeferredContext1(ID3D11Device_Wrapper* wrapper, + HRESULT result, + UINT context_flags, + ID3D11DeviceContext1** deferred_context); + + void PostProcess_ID3D11Device2_CreateDeferredContext2(ID3D11Device_Wrapper* wrapper, + HRESULT result, + UINT context_flags, + ID3D11DeviceContext2** deferred_context); + + void PostProcess_ID3D11Device3_CreateDeferredContext3(ID3D11Device_Wrapper* wrapper, + HRESULT result, + UINT context_flags, + ID3D11DeviceContext3** deferred_context); + + void PostProcess_ID3D11Device_CreateTexture1D(ID3D11Device_Wrapper* wrapper, + HRESULT result, + const D3D11_TEXTURE1D_DESC* desc, + const D3D11_SUBRESOURCE_DATA* initial_data, + ID3D11Texture1D** texture1D); + + void PostProcess_ID3D11Device_CreateTexture2D(ID3D11Device_Wrapper* wrapper, + HRESULT result, + const D3D11_TEXTURE2D_DESC* desc, + const D3D11_SUBRESOURCE_DATA* initial_data, + ID3D11Texture2D** texture2D); + + void PostProcess_ID3D11Device3_CreateTexture2D1(ID3D11Device_Wrapper* wrapper, + HRESULT result, + const D3D11_TEXTURE2D_DESC1* desc1, + const D3D11_SUBRESOURCE_DATA* initial_data, + ID3D11Texture2D1** texture2D); + + void PostProcess_ID3D11Device_CreateTexture3D(ID3D11Device_Wrapper* wrapper, + HRESULT result, + const D3D11_TEXTURE3D_DESC* desc, + const D3D11_SUBRESOURCE_DATA* initial_data, + ID3D11Texture3D** texture3D); + + void PostProcess_ID3D11Device3_CreateTexture3D1(ID3D11Device_Wrapper* wrapper, + HRESULT result, + const D3D11_TEXTURE3D_DESC1* desc1, + const D3D11_SUBRESOURCE_DATA* initial_data, + ID3D11Texture3D1** texture3D); + + void Destroy_ID3D11Buffer(ID3D11Buffer_Wrapper* wrapper); + + void Destroy_ID3D11Texture1D(ID3D11Texture1D_Wrapper* wrapper); + + void Destroy_ID3D11Texture2D(ID3D11Texture2D_Wrapper* wrapper); + + void Destroy_ID3D11Texture3D(ID3D11Texture3D_Wrapper* wrapper); + + void PostProcess_ID3D11DeviceContext_Map(ID3D11DeviceContext_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + UINT subresource, + D3D11_MAP map_type, + UINT map_flags, + D3D11_MAPPED_SUBRESOURCE* mapped_subresource_data); + + void PreProcess_ID3D11DeviceContext_Unmap(ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Resource* resource, + UINT subresource); + + void PreProcess_ID3D11DeviceContext_Dispatch(ID3D11DeviceContext_Wrapper* wrapper, + UINT thread_group_count_x, + UINT thread_group_count_y, + UINT thread_group_count_z); + + void PreProcess_ID3D11DeviceContext_DispatchIndirect(ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* buffer_for_args, + UINT aligned_byte_offset_for_args); + + void PreProcess_ID3D11DeviceContext_Draw(ID3D11DeviceContext_Wrapper* wrapper, + UINT vertex_count, + UINT start_vertex_location); + + void PreProcess_ID3D11DeviceContext_DrawAuto(ID3D11DeviceContext_Wrapper* wrapper); + + void PreProcess_ID3D11DeviceContext_DrawIndexed(ID3D11DeviceContext_Wrapper* wrapper, + UINT index_count, + UINT start_index_location, + INT base_vertex_location); + + void PreProcess_ID3D11DeviceContext_DrawIndexedInstanced(ID3D11DeviceContext_Wrapper* wrapper, + UINT index_count_per_instance, + UINT instance_count, + UINT start_index_location, + INT base_vertex_location, + UINT start_instance_location); + + void PreProcess_ID3D11DeviceContext_DrawIndexedInstancedIndirect(ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* buffer_for_args, + UINT aligned_byte_offset_for_args); + + void PreProcess_ID3D11DeviceContext_DrawInstanced(ID3D11DeviceContext_Wrapper* wrapper, + UINT vertex_count_per_instance, + UINT instance_count, + UINT start_vertex_location, + UINT start_instance_location); + + void PreProcess_ID3D11DeviceContext_DrawInstancedIndirect(ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* buffer_for_args, + UINT aligned_byte_offset_for_args); + + void PostProcess_ID3D11Device_CreateShaderResourceView(ID3D11Device_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + const D3D11_SHADER_RESOURCE_VIEW_DESC* desc, + ID3D11ShaderResourceView** srview); + + void PostProcess_ID3D11Device_CreateShaderResourceView1(ID3D11Device3_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + const D3D11_SHADER_RESOURCE_VIEW_DESC1* desc1, + ID3D11ShaderResourceView1** srview1); + + void PostProcess_ID3D11Device_CreateUnorderedAccessView(ID3D11Device_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + const D3D11_UNORDERED_ACCESS_VIEW_DESC* desc, + ID3D11UnorderedAccessView** uaview); + + void PostProcess_ID3D11Device_CreateUnorderedAccessView1(ID3D11Device3_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + const D3D11_UNORDERED_ACCESS_VIEW_DESC1* desc1, + ID3D11UnorderedAccessView1** uaview1); + + void PostProcess_ID3D11Device_CreateRenderTargetView(ID3D11Device_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + const D3D11_RENDER_TARGET_VIEW_DESC* desc, + ID3D11RenderTargetView** rtview); + + void PostProcess_ID3D11Device_CreateRenderTargetView1(ID3D11Device3_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + const D3D11_RENDER_TARGET_VIEW_DESC1* desc1, + ID3D11RenderTargetView1** rtview1); + + void PostProcess_ID3D11Device_CreateDepthStencilView(ID3D11Device_Wrapper* wrapper, + HRESULT result, + ID3D11Resource* resource, + const D3D11_DEPTH_STENCIL_VIEW_DESC* desc, + ID3D11DepthStencilView** depth_stencil_view); + + void Destroy_ID3D11ShaderResourceView(ID3D11ShaderResourceView_Wrapper* wrapper); + + void Destroy_ID3D11RenderTargetView(ID3D11RenderTargetView_Wrapper* wrapper); + + void Destroy_ID3D11UnorderedAccessView(ID3D11UnorderedAccessView_Wrapper* wrapper); + + void Destroy_ID3D11DepthStencilView(ID3D11DepthStencilView_Wrapper* wrapper); + + void WriteDxgiAdapterInfo(format::ApiFamilyId api_family); bool IsAccelerationStructureResource(format::HandleId id); @@ -771,10 +1038,12 @@ class D3D12CaptureManager : public ApiCaptureManager virtual void WriteTrackedState(util::FileOutputStream* file_stream, format::ThreadId thread_id) override; - void PreAcquireSwapChainImages(IDXGISwapChain_Wrapper* wrapper, - IUnknown* command_queue, - uint32_t image_count, - DXGI_SWAP_EFFECT swap_effect); + void InitializeSwapChainInfo(IDXGISwapChain_Wrapper* wrapper, + IUnknown* unknown, + uint32_t buffer_count, + DXGI_SWAP_EFFECT swap_effect); + + void AcquireSwapChainImages(IDXGISwapChain* swap_chain, IDXGISwapChainInfo* info, uint32_t image_count); void ReleaseSwapChainImages(IDXGISwapChain_Wrapper* wrapper); @@ -796,10 +1065,10 @@ class D3D12CaptureManager : public ApiCaptureManager void InitializeSwapChainBufferResourceInfo(ID3D12Resource_Wrapper* resource_wrapper, D3D12_RESOURCE_STATES initial_state); - void InitializeID3D12DeviceInfo(IUnknown* pAdapter, void** device); + void InitializeID3D12DeviceInfo(ID3D12Device_Wrapper* device_wrapper); private: - void WriteDxgiAdapterInfoCommand(const format::DxgiAdapterDesc& adapter_desc); + void WriteDxgiAdapterInfoCommand(format::ApiFamilyId api_family, const format::DxgiAdapterDesc& adapter_desc); void CheckWriteWatchIgnored(D3D12_HEAP_FLAGS flags, format::HandleId id); bool UseWriteWatch(D3D12_HEAP_TYPE type, D3D12_HEAP_FLAGS flags, D3D12_CPU_PAGE_PROPERTY page_property); void EnableWriteWatch(D3D12_HEAP_FLAGS& flags, D3D12_HEAP_PROPERTIES& properties); @@ -807,18 +1076,48 @@ class D3D12CaptureManager : public ApiCaptureManager uint64_t GetResourceSizeInBytes(ID3D12Device_Wrapper* device_wrapper, const D3D12_RESOURCE_DESC* desc); uint64_t GetResourceSizeInBytes(ID3D12Device8_Wrapper* device_wrapper, const D3D12_RESOURCE_DESC1* desc); void UpdateSwapChainSize(uint32_t width, uint32_t height, IDXGISwapChain1* swapchain); + void ProcessMappedMemory(format::ApiFamilyId api_family); PFN_D3D12_GET_DEBUG_INTERFACE GetDebugInterfacePtr(); void EnableDebugLayer(); void EnableDRED(); bool RvAnnotationActive(); - void PrePresent(IDXGISwapChain_Wrapper* wrapper); - void PostPresent(IDXGISwapChain_Wrapper* wrapper, UINT flags); + void PrePresent(IDXGISwapChain_Wrapper* wrapper); + void PostPresent(IDXGISwapChain_Wrapper* wrapper, UINT flags); + std::shared_ptr GetResourceInfo(ID3D11Resource_Wrapper* wrapper); + void* + AllocateMappedResourceMemory(util::PageGuardManager* manager, MappedSubresource& mapped_subresource, size_t size); + void* AllocateMappedResourceMemoryDeferred(util::WriteWatchTracker* deferred_tracker, + MappedSubresource& mapped_subresource, + size_t size); + void* GetMappedResourceMemory(util::PageGuardManager* manager, const MappedSubresource& mapped_subresource); + void* GetMappedResourceMemoryDeferred(util::WriteWatchTracker* deferred_tracker, + const MappedSubresource& mapped_subresource); + void* UpdateDiscardedResourceMemory(util::PageGuardManager* manager, const MappedSubresource& mapped_subresource); + void* UpdateDiscardedResourceMemoryDeferred(util::WriteWatchTracker* deferred_tracker, + const MappedSubresource& mapped_subresource); + void FreeMappedResourceMemory(ID3D11Resource_Wrapper* wrapper); + void ProcessMapDiscardNoOverwriteUnmapped(format::HandleId context_id, + std::shared_ptr& context_info, + std::shared_ptr& resource_info, + MappedSubresource& mapped_subresource, + D3D11_MAP map_type, + D3D11_MAPPED_SUBRESOURCE* mapped_subresource_data, + size_t size); + void ProcessMapDiscardMapped(std::shared_ptr& context_info, + MappedSubresource& mapped_subresource, + D3D11_MAP map_type, + D3D11_MAPPED_SUBRESOURCE* mapped_subresource_data); + void ProcessUnmap(std::shared_ptr& context_info, MappedSubresource& mapped_subresource); + void InitializeID3D11Texture2DInfo(ID3D11Texture2D_Wrapper* wrapper, const D3D11_TEXTURE2D_DESC* desc); + void AddViewResourceRef(ID3D11ViewInfo* info, ID3D11Resource* resource); + void ReleaseViewResourceRef(ID3D11ViewInfo* info); static D3D12CaptureManager* singleton_; std::set mapped_resources_; ///< Track mapped resources for unassisted tracking mode. DxgiDispatchTable dxgi_dispatch_table_; ///< DXGI dispatch table for functions retrieved from the DXGI DLL. D3D12DispatchTable d3d12_dispatch_table_; ///< D3D12 dispatch table for functions retrieved from the D3D12 DLL. AgsDispatchTable ags_dispatch_table_; ///< ags dispatch table for functions retrieved from the AGS DLL. + D3D11DispatchTable d3d11_dispatch_table_; ///< D3D11 dispatch table for functions retrieved from the D3D11 DLL. int ags_version_{}; ///< ags version. static thread_local uint32_t call_scope_; ///< Per-thread scope count to determine when an intercepted API call is ///< being made directly by the application. @@ -832,7 +1131,8 @@ class D3D12CaptureManager : public ApiCaptureManager std::unique_ptr state_tracker_; - std::unique_ptr frame_buffer_renderer_; + std::unique_ptr frame_buffer_renderer12_; + std::unique_ptr frame_buffer_renderer11_; graphics::dx12::ActiveAdapterMap adapters_; diff --git a/framework/encode/dx12_dll_initializer.h b/framework/encode/dx12_dll_initializer.h index 522b20395b..263dc94aad 100644 --- a/framework/encode/dx12_dll_initializer.h +++ b/framework/encode/dx12_dll_initializer.h @@ -1,5 +1,6 @@ /* ** Copyright (c) 2021 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -34,42 +35,26 @@ GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(encode) -const char kDx12RedistRuntime[] = "D3D12Core.dll"; - -bool FoundRenamedCaptureModule(const std::string& renamed_module) +bool FoundRenamedCaptureModule(HMODULE dll_module, const std::string& renamed_module) { char module_name[MAX_PATH] = {}; - int path_size = GetModuleFileNameA(nullptr, module_name, MAX_PATH); + int path_size = GetModuleFileNameA(dll_module, module_name, MAX_PATH); size_t separator_pos = std::string(module_name).find_last_of(util::filepath::kPathSep); - std::string exe_root = std::string(module_name).substr(0, separator_pos); - std::string legacy_path = exe_root + util::filepath::kPathSep + renamed_module; + std::string module_root = std::string(module_name).substr(0, separator_pos); + std::string legacy_path = module_root + util::filepath::kPathSep + renamed_module; return util::filepath::Exists(legacy_path); } std::string GetWindowsModuleRoot() { - std::string windows_module_root = ""; - - // Get actual Windows folder - char win_dir[MAX_PATH] = {}; - uint32_t windows_dir_result = GetWindowsDirectory(win_dir, MAX_PATH); + std::string windows_module_root; - if (windows_dir_result != 0) + // Get actual System folder. + char system_path[MAX_PATH] = {}; + if (SUCCEEDED(SHGetFolderPath(nullptr, CSIDL_SYSTEM, nullptr, 0, system_path))) { - windows_module_root = std::string(win_dir) + util::filepath::kPathSep + std::string("System32"); - - // Check if app is 32-bit - BOOL process_32_bit = FALSE; - BOOL found_bitness = IsWow64Process(GetCurrentProcess(), &process_32_bit); - - if (found_bitness != 0) - { - if (process_32_bit == TRUE) - { - windows_module_root = std::string(win_dir) + util::filepath::kPathSep + std::string("SysWOW64"); - } - } + windows_module_root = system_path; } return windows_module_root; @@ -113,7 +98,7 @@ bool UpdateModule(const std::string& src, const std::string& dst) return module_up_to_date; } -std::string PrepGfxrRuntimesFolder(const std::string& windows_module_root) +std::string PrepGfxrRuntimesFolder(const std::string& windows_module_root, const char* redist_runtime_name) { std::string gfxr_runtimes_root = ""; @@ -157,12 +142,12 @@ std::string PrepGfxrRuntimesFolder(const std::string& windows_module_root) } // Once created "\AppData\Roaming\GFXReconstruct\dx-runtimes" copy in the current in-box D3D12 runtime - if (gfxr_runtimes_root.empty() == false) + if ((redist_runtime_name != nullptr) && (gfxr_runtimes_root.empty() == false)) { std::string redist_runtime_path_src = - windows_module_root + util::filepath::kPathSep + std::string(kDx12RedistRuntime); + windows_module_root + util::filepath::kPathSep + std::string(redist_runtime_name); std::string redist_runtime_path_dst = - gfxr_runtimes_root + util::filepath::kPathSep + std::string(kDx12RedistRuntime); + gfxr_runtimes_root + util::filepath::kPathSep + std::string(redist_runtime_name); UpdateModule(redist_runtime_path_src, redist_runtime_path_dst); } @@ -171,13 +156,16 @@ std::string PrepGfxrRuntimesFolder(const std::string& windows_module_root) return gfxr_runtimes_root; } -std::string SetupCaptureModule(const std::string& dll_name, const std::string& dll_name_renamed) +std::string SetupCaptureModule(HMODULE dll_module, + const std::string& dll_name, + const std::string& dll_name_renamed, + const char* redist_runtime_name) { // First assume we are starting with the "legacy" method with renamed capture binaries std::string module_path = dll_name_renamed; // If the renamed DLLs are not found beside the app executable, then setup for reading from "\AppData\Roaming" - if (FoundRenamedCaptureModule(dll_name_renamed) == false) + if (FoundRenamedCaptureModule(dll_module, dll_name_renamed) == false) { std::string windows_module_root = GetWindowsModuleRoot(); @@ -185,7 +173,7 @@ std::string SetupCaptureModule(const std::string& dll_name, const std::string& d if (windows_module_root.empty() == false) { // Make sure the roaming folder is present and ready - std::string gfxr_user_roaming_root = PrepGfxrRuntimesFolder(windows_module_root); + std::string gfxr_user_roaming_root = PrepGfxrRuntimesFolder(windows_module_root, redist_runtime_name); if (gfxr_user_roaming_root.empty() == false) { diff --git a/framework/encode/dx12_object_wrapper_info.h b/framework/encode/dx12_object_wrapper_info.h index 04ed2f4b88..b54498b28a 100644 --- a/framework/encode/dx12_object_wrapper_info.h +++ b/framework/encode/dx12_object_wrapper_info.h @@ -1,6 +1,7 @@ /* ** Copyright (c) 2021 LunarG, Inc. ** Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -29,14 +30,16 @@ #include "util/defines.h" #include "util/memory_output_stream.h" #include "util/page_guard_manager.h" +#include "util/write_watch_tracker.h" #include #include #include -#include #include #include +#include +#include GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(encode) @@ -45,6 +48,7 @@ struct IUnknown_Wrapper; class ID3D12Resource_Wrapper; class ID3D12Device_Wrapper; class ID3D12Heap_Wrapper; +class ID3D11Resource_Wrapper; struct GUID_Hash { @@ -105,6 +109,7 @@ struct DxgiWrapperInfo : public DxWrapperInfo struct MappedSubresource { void* data{ nullptr }; + uint64_t tracker_id{ 0 }; uintptr_t shadow_allocation{ util::PageGuardManager::kNullShadowHandle }; int32_t map_count{ 0 }; }; @@ -230,13 +235,25 @@ struct IDXGISwapChainMediaInfo : public DxgiWrapperInfo struct IDXGISwapChainInfo : public DxgiWrapperInfo { - format::HandleId command_queue_id{ format::kNullHandleId }; - DXGI_SWAP_EFFECT swap_effect{}; // Members for general wrapper support. - std::vector child_images; + uint32_t buffer_count{ 0 }; + DXGI_SWAP_EFFECT swap_effect{}; + // Child images requiring an internal reference to prevent the wrapper from being destroyed if the application + // releases its reference to the image before it is done using it, which it assumes to be a safe thing to do because + // the swap chain is assumed to hold an internal reference to the image that keeps it active. This is either an + // ID3D12Resource_Wrapper or an ID3D11Texture2D_Wrapper, stored as the common IUnknown_Wrapper base class type as we + // only need to support reference release operations. + std::vector child_images; + + // D3D12 command queue specified at swap chain creation. + format::HandleId command_queue_id{ format::kNullHandleId }; graphics::dx12::ID3D12CommandQueueComPtr command_queue{ nullptr }; + // D3D11 device specified at swap chain creation. + format::HandleId device_id{ format::kNullHandleId }; + graphics::dx12::ID3D11DeviceComPtr device{ nullptr }; + // Members for trimming state tracking. uint32_t current_back_buffer_index{ std::numeric_limits::max() }; uint32_t last_presented_image{ std::numeric_limits::max() }; @@ -534,6 +551,170 @@ struct AgsContextInfo : public DxWrapperInfo struct AgsDeviceInfo : public DxWrapperInfo {}; +struct ID3D11DeviceContextInfo : public DxWrapperInfo +{ + bool is_deferred{ false }; + bool needs_update_subresource_adjustment{ false }; + std::unique_ptr deferred_tracker; +}; + +struct ID3D11DepthStencilStateInfo : public DxWrapperInfo +{}; + +struct ID3D11BlendStateInfo : public DxWrapperInfo +{}; + +struct ID3D11RasterizerStateInfo : public DxWrapperInfo +{}; + +struct ResourceTrackingInfo +{ + // Subresource sizes to be calculated/used when resource is mapped. Mapped resource RowPitch and DepthPitch values + // have been found to be different for the same resource mapped by different contexts (immediate or deferred), so + // the sizes are calculated per-context. + std::unique_ptr subresource_sizes; + std::unique_ptr mapped_subresources; + std::shared_ptr mapped_context; +}; + +// Parent class for D3D11 buffer and texture resource info. +struct ID3D11ResourceInfo : public DxWrapperInfo +{ + D3D11_RESOURCE_DIMENSION dimension{ D3D11_RESOURCE_DIMENSION_UNKNOWN }; + DXGI_FORMAT format{ DXGI_FORMAT_UNKNOWN }; + uint32_t width{ 0 }; + uint32_t height{ 0 }; + uint32_t depth_or_array_size{ 0 }; + uint32_t mip_levels{ 0 }; + size_t num_subresources{ 0 }; + + // Map ID3D11DeviceContext ID to mapped subresource info. + std::unordered_map mapped_info; +}; + +// Parent class for D3D11 view info. +struct ID3D11ViewInfo : public DxWrapperInfo +{ + // Resource associated to the view, which requires an internal reference. + ID3D11Resource_Wrapper* resource{ nullptr }; +}; + +struct ID3D11BufferInfo : public ID3D11ResourceInfo +{}; + +struct ID3D11Texture1DInfo : public ID3D11ResourceInfo +{}; + +struct ID3D11Texture2DInfo : public ID3D11ResourceInfo +{}; + +struct ID3D11Texture3DInfo : public ID3D11ResourceInfo +{}; + +struct ID3D11ShaderResourceViewInfo : public ID3D11ViewInfo +{}; + +struct ID3D11RenderTargetViewInfo : public ID3D11ViewInfo +{}; + +struct ID3D11DepthStencilViewInfo : public ID3D11ViewInfo +{}; + +struct ID3D11UnorderedAccessViewInfo : public ID3D11ViewInfo +{}; + +struct ID3D11VertexShaderInfo : public DxWrapperInfo +{}; + +struct ID3D11HullShaderInfo : public DxWrapperInfo +{}; + +struct ID3D11DomainShaderInfo : public DxWrapperInfo +{}; + +struct ID3D11GeometryShaderInfo : public DxWrapperInfo +{}; + +struct ID3D11PixelShaderInfo : public DxWrapperInfo +{}; + +struct ID3D11ComputeShaderInfo : public DxWrapperInfo +{}; + +struct ID3D11InputLayoutInfo : public DxWrapperInfo +{}; + +struct ID3D11SamplerStateInfo : public DxWrapperInfo +{}; + +struct ID3D11QueryInfo : public DxWrapperInfo +{}; + +struct ID3D11PredicateInfo : public DxWrapperInfo +{}; + +struct ID3D11CounterInfo : public DxWrapperInfo +{}; + +struct ID3D11ClassInstanceInfo : public DxWrapperInfo +{}; + +struct ID3D11ClassLinkageInfo : public DxWrapperInfo +{}; + +struct ID3D11CommandListInfo : public DxWrapperInfo +{}; + +struct ID3D11VideoDecoderInfo : public DxWrapperInfo +{}; + +struct ID3D11VideoProcessorEnumeratorInfo : public DxWrapperInfo +{}; + +struct ID3D11VideoProcessorInfo : public DxWrapperInfo +{}; + +struct ID3D11AuthenticatedChannelInfo : public DxWrapperInfo +{}; + +struct ID3D11CryptoSessionInfo : public DxWrapperInfo +{}; + +struct ID3D11VideoDecoderOutputViewInfo : public DxWrapperInfo +{}; + +struct ID3D11VideoProcessorInputViewInfo : public DxWrapperInfo +{}; + +struct ID3D11VideoProcessorOutputViewInfo : public DxWrapperInfo +{}; + +struct ID3D11VideoContextInfo : public DxWrapperInfo +{}; + +struct ID3D11VideoDeviceInfo : public DxWrapperInfo +{}; + +struct ID3D11DeviceInfo : public DxWrapperInfo +{ + bool supports_command_lists{ false }; +}; + +struct ID3DDeviceContextStateInfo : public DxWrapperInfo +{}; + +struct ID3D11FenceInfo : public DxWrapperInfo +{}; + +struct ID3D11MultithreadInfo : public DxWrapperInfo +{}; + +struct ID3DUserDefinedAnnotationInfo : public DxWrapperInfo +{}; + +struct ID3D11On12DeviceInfo : public DxWrapperInfo +{}; + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/encode/dx12_object_wrapper_util.h b/framework/encode/dx12_object_wrapper_util.h index 866ee8ef2b..1388a06439 100644 --- a/framework/encode/dx12_object_wrapper_util.h +++ b/framework/encode/dx12_object_wrapper_util.h @@ -1,5 +1,6 @@ /* ** Copyright (c) 2021 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -198,6 +199,52 @@ Object* const* UnwrapObjects(Object* const* objects, uint32_t len, HandleUnwrapM return objects; } +//---------------------------------------------------------------------------- +/// \brief Unwraps an array of handles. +/// +/// Returns an array of unwrapped objects retrieved from the objects in an +/// array of object wrappers. The unwrapped object will be stored at the +/// same index in the array as the object wrapper that is was retrieved from. +/// The caller must provide a pointer to a HandleUnwrapMemory object that +/// will provide the memory used to store the unwrapped objects. If the +/// pointer to the object wrapper array is null, or the array size is zero, +/// the pointer to the object wrapper array will be returned with no other +/// action performed. +/// +/// \param objects Pointer to an array of object wrappers to be +/// processed for unwrapping. +/// \param len Number of items in the array of object wrappers. +/// \param unwrap_memory Pointer to a HandleUnwrapMemory object that will +/// provide the memory used to store the unwrapped +/// objects. +/// +/// \return Pointer to the array of unwrapped objects, stored in memory +/// provided by the HandleUnwrapMemory object, if the array of +/// object wrappers is not empty. Pointer to the array of object +/// wrappers if the array is empty. +//---------------------------------------------------------------------------- +template +Object** UnwrapObjects(Object** objects, uint32_t len, HandleUnwrapMemory* unwrap_memory) +{ + if ((objects != nullptr) && (len > 0)) + { + assert(unwrap_memory != nullptr); + + size_t num_bytes = len * sizeof(Object*); + auto unwrapped_objects = reinterpret_cast(unwrap_memory->GetBuffer(num_bytes)); + + for (uint32_t i = 0; i < len; ++i) + { + unwrapped_objects[i] = GetWrappedObject(objects[i]); + } + + return unwrapped_objects; + } + + // Leave the original memory in place when the pointer is not null, but size is zero. + return objects; +} + //---------------------------------------------------------------------------- /// \brief Utility function to add an object wrapper to a table. /// diff --git a/framework/encode/dx12_state_writer.cpp b/framework/encode/dx12_state_writer.cpp index fabf0d9b6d..1a29154508 100644 --- a/framework/encode/dx12_state_writer.cpp +++ b/framework/encode/dx12_state_writer.cpp @@ -1,6 +1,7 @@ /* ** Copyright (c) 2021 LunarG, Inc. ** Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -102,7 +103,7 @@ void Dx12StateWriter::WriteState(const Dx12StateTable& state_table, uint64_t fra // Write this out before rendering begins // This ensures the replayer gets a chance to process the metadata command - D3D12CaptureManager::Get()->WriteDxgiAdapterInfo(); + D3D12CaptureManager::Get()->WriteDxgiAdapterInfo(format::ApiFamilyId::ApiFamily_D3D12); D3D12CaptureManager::Get()->WriteDx12DriverInfo(); D3D12CaptureManager::Get()->WriteDx12RuntimeInfo(); diff --git a/framework/format/api_call_id.h b/framework/format/api_call_id.h index 0c84d07e15..7049d18e82 100644 --- a/framework/format/api_call_id.h +++ b/framework/format/api_call_id.h @@ -2,6 +2,7 @@ ** Copyright (c) 2018-2023 Valve Corporation ** Copyright (c) 2018-2023 LunarG, Inc. ** Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -1254,6 +1255,406 @@ enum ApiCallId : uint32_t ApiCall_D3D12Last, + ApiCall_D3D11CreateDevice = MakeApiCallId(ApiFamily_D3D11, 0x1000), + ApiCall_D3D11CreateDeviceAndSwapChain = MakeApiCallId(ApiFamily_D3D11, 0x1001), + ApiCall_ID3D11DeviceChild_GetDevice = MakeApiCallId(ApiFamily_D3D11, 0x1002), + ApiCall_ID3D11DeviceChild_GetPrivateData = MakeApiCallId(ApiFamily_D3D11, 0x1003), + ApiCall_ID3D11DeviceChild_SetPrivateData = MakeApiCallId(ApiFamily_D3D11, 0x1004), + ApiCall_ID3D11DeviceChild_SetPrivateDataInterface = MakeApiCallId(ApiFamily_D3D11, 0x1005), + ApiCall_ID3D11DepthStencilState_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x1006), + ApiCall_ID3D11BlendState_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x1007), + ApiCall_ID3D11RasterizerState_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x1008), + ApiCall_ID3D11Resource_GetType = MakeApiCallId(ApiFamily_D3D11, 0x1009), + ApiCall_ID3D11Resource_SetEvictionPriority = MakeApiCallId(ApiFamily_D3D11, 0x100a), + ApiCall_ID3D11Resource_GetEvictionPriority = MakeApiCallId(ApiFamily_D3D11, 0x100b), + ApiCall_ID3D11Buffer_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x100c), + ApiCall_ID3D11Texture1D_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x100d), + ApiCall_ID3D11Texture2D_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x100e), + ApiCall_ID3D11Texture3D_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x100f), + ApiCall_ID3D11View_GetResource = MakeApiCallId(ApiFamily_D3D11, 0x1010), + ApiCall_ID3D11ShaderResourceView_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x1011), + ApiCall_ID3D11RenderTargetView_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x1012), + ApiCall_ID3D11DepthStencilView_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x1013), + ApiCall_ID3D11UnorderedAccessView_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x1014), + ApiCall_ID3D11SamplerState_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x1015), + ApiCall_ID3D11Asynchronous_GetDataSize = MakeApiCallId(ApiFamily_D3D11, 0x1016), + ApiCall_ID3D11Query_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x1017), + ApiCall_ID3D11Counter_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x1018), + ApiCall_ID3D11ClassInstance_GetClassLinkage = MakeApiCallId(ApiFamily_D3D11, 0x1019), + ApiCall_ID3D11ClassInstance_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x101a), + ApiCall_ID3D11ClassInstance_GetInstanceName = MakeApiCallId(ApiFamily_D3D11, 0x101b), + ApiCall_ID3D11ClassInstance_GetTypeName = MakeApiCallId(ApiFamily_D3D11, 0x101c), + ApiCall_ID3D11ClassLinkage_GetClassInstance = MakeApiCallId(ApiFamily_D3D11, 0x101d), + ApiCall_ID3D11ClassLinkage_CreateClassInstance = MakeApiCallId(ApiFamily_D3D11, 0x101e), + ApiCall_ID3D11CommandList_GetContextFlags = MakeApiCallId(ApiFamily_D3D11, 0x101f), + ApiCall_ID3D11DeviceContext_VSSetConstantBuffers = MakeApiCallId(ApiFamily_D3D11, 0x1020), + ApiCall_ID3D11DeviceContext_PSSetShaderResources = MakeApiCallId(ApiFamily_D3D11, 0x1021), + ApiCall_ID3D11DeviceContext_PSSetShader = MakeApiCallId(ApiFamily_D3D11, 0x1022), + ApiCall_ID3D11DeviceContext_PSSetSamplers = MakeApiCallId(ApiFamily_D3D11, 0x1023), + ApiCall_ID3D11DeviceContext_VSSetShader = MakeApiCallId(ApiFamily_D3D11, 0x1024), + ApiCall_ID3D11DeviceContext_DrawIndexed = MakeApiCallId(ApiFamily_D3D11, 0x1025), + ApiCall_ID3D11DeviceContext_Draw = MakeApiCallId(ApiFamily_D3D11, 0x1026), + ApiCall_ID3D11DeviceContext_Map = MakeApiCallId(ApiFamily_D3D11, 0x1027), + ApiCall_ID3D11DeviceContext_Unmap = MakeApiCallId(ApiFamily_D3D11, 0x1028), + ApiCall_ID3D11DeviceContext_PSSetConstantBuffers = MakeApiCallId(ApiFamily_D3D11, 0x1029), + ApiCall_ID3D11DeviceContext_IASetInputLayout = MakeApiCallId(ApiFamily_D3D11, 0x102a), + ApiCall_ID3D11DeviceContext_IASetVertexBuffers = MakeApiCallId(ApiFamily_D3D11, 0x102b), + ApiCall_ID3D11DeviceContext_IASetIndexBuffer = MakeApiCallId(ApiFamily_D3D11, 0x102c), + ApiCall_ID3D11DeviceContext_DrawIndexedInstanced = MakeApiCallId(ApiFamily_D3D11, 0x102d), + ApiCall_ID3D11DeviceContext_DrawInstanced = MakeApiCallId(ApiFamily_D3D11, 0x102e), + ApiCall_ID3D11DeviceContext_GSSetConstantBuffers = MakeApiCallId(ApiFamily_D3D11, 0x102f), + ApiCall_ID3D11DeviceContext_GSSetShader = MakeApiCallId(ApiFamily_D3D11, 0x1030), + ApiCall_ID3D11DeviceContext_IASetPrimitiveTopology = MakeApiCallId(ApiFamily_D3D11, 0x1031), + ApiCall_ID3D11DeviceContext_VSSetShaderResources = MakeApiCallId(ApiFamily_D3D11, 0x1032), + ApiCall_ID3D11DeviceContext_VSSetSamplers = MakeApiCallId(ApiFamily_D3D11, 0x1033), + ApiCall_ID3D11DeviceContext_Begin = MakeApiCallId(ApiFamily_D3D11, 0x1034), + ApiCall_ID3D11DeviceContext_End = MakeApiCallId(ApiFamily_D3D11, 0x1035), + ApiCall_ID3D11DeviceContext_GetData = MakeApiCallId(ApiFamily_D3D11, 0x1036), + ApiCall_ID3D11DeviceContext_SetPredication = MakeApiCallId(ApiFamily_D3D11, 0x1037), + ApiCall_ID3D11DeviceContext_GSSetShaderResources = MakeApiCallId(ApiFamily_D3D11, 0x1038), + ApiCall_ID3D11DeviceContext_GSSetSamplers = MakeApiCallId(ApiFamily_D3D11, 0x1039), + ApiCall_ID3D11DeviceContext_OMSetRenderTargets = MakeApiCallId(ApiFamily_D3D11, 0x103a), + ApiCall_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews = MakeApiCallId(ApiFamily_D3D11, 0x103b), + ApiCall_ID3D11DeviceContext_OMSetBlendState = MakeApiCallId(ApiFamily_D3D11, 0x103c), + ApiCall_ID3D11DeviceContext_OMSetDepthStencilState = MakeApiCallId(ApiFamily_D3D11, 0x103d), + ApiCall_ID3D11DeviceContext_SOSetTargets = MakeApiCallId(ApiFamily_D3D11, 0x103e), + ApiCall_ID3D11DeviceContext_DrawAuto = MakeApiCallId(ApiFamily_D3D11, 0x103f), + ApiCall_ID3D11DeviceContext_DrawIndexedInstancedIndirect = MakeApiCallId(ApiFamily_D3D11, 0x1040), + ApiCall_ID3D11DeviceContext_DrawInstancedIndirect = MakeApiCallId(ApiFamily_D3D11, 0x1041), + ApiCall_ID3D11DeviceContext_Dispatch = MakeApiCallId(ApiFamily_D3D11, 0x1042), + ApiCall_ID3D11DeviceContext_DispatchIndirect = MakeApiCallId(ApiFamily_D3D11, 0x1043), + ApiCall_ID3D11DeviceContext_RSSetState = MakeApiCallId(ApiFamily_D3D11, 0x1044), + ApiCall_ID3D11DeviceContext_RSSetViewports = MakeApiCallId(ApiFamily_D3D11, 0x1045), + ApiCall_ID3D11DeviceContext_RSSetScissorRects = MakeApiCallId(ApiFamily_D3D11, 0x1046), + ApiCall_ID3D11DeviceContext_CopySubresourceRegion = MakeApiCallId(ApiFamily_D3D11, 0x1047), + ApiCall_ID3D11DeviceContext_CopyResource = MakeApiCallId(ApiFamily_D3D11, 0x1048), + ApiCall_ID3D11DeviceContext_UpdateSubresource = MakeApiCallId(ApiFamily_D3D11, 0x1049), + ApiCall_ID3D11DeviceContext_CopyStructureCount = MakeApiCallId(ApiFamily_D3D11, 0x104a), + ApiCall_ID3D11DeviceContext_ClearRenderTargetView = MakeApiCallId(ApiFamily_D3D11, 0x104b), + ApiCall_ID3D11DeviceContext_ClearUnorderedAccessViewUint = MakeApiCallId(ApiFamily_D3D11, 0x104c), + ApiCall_ID3D11DeviceContext_ClearUnorderedAccessViewFloat = MakeApiCallId(ApiFamily_D3D11, 0x104d), + ApiCall_ID3D11DeviceContext_ClearDepthStencilView = MakeApiCallId(ApiFamily_D3D11, 0x104e), + ApiCall_ID3D11DeviceContext_GenerateMips = MakeApiCallId(ApiFamily_D3D11, 0x104f), + ApiCall_ID3D11DeviceContext_SetResourceMinLOD = MakeApiCallId(ApiFamily_D3D11, 0x1050), + ApiCall_ID3D11DeviceContext_GetResourceMinLOD = MakeApiCallId(ApiFamily_D3D11, 0x1051), + ApiCall_ID3D11DeviceContext_ResolveSubresource = MakeApiCallId(ApiFamily_D3D11, 0x1052), + ApiCall_ID3D11DeviceContext_ExecuteCommandList = MakeApiCallId(ApiFamily_D3D11, 0x1053), + ApiCall_ID3D11DeviceContext_HSSetShaderResources = MakeApiCallId(ApiFamily_D3D11, 0x1054), + ApiCall_ID3D11DeviceContext_HSSetShader = MakeApiCallId(ApiFamily_D3D11, 0x1055), + ApiCall_ID3D11DeviceContext_HSSetSamplers = MakeApiCallId(ApiFamily_D3D11, 0x1056), + ApiCall_ID3D11DeviceContext_HSSetConstantBuffers = MakeApiCallId(ApiFamily_D3D11, 0x1057), + ApiCall_ID3D11DeviceContext_DSSetShaderResources = MakeApiCallId(ApiFamily_D3D11, 0x1058), + ApiCall_ID3D11DeviceContext_DSSetShader = MakeApiCallId(ApiFamily_D3D11, 0x1059), + ApiCall_ID3D11DeviceContext_DSSetSamplers = MakeApiCallId(ApiFamily_D3D11, 0x105a), + ApiCall_ID3D11DeviceContext_DSSetConstantBuffers = MakeApiCallId(ApiFamily_D3D11, 0x105b), + ApiCall_ID3D11DeviceContext_CSSetShaderResources = MakeApiCallId(ApiFamily_D3D11, 0x105c), + ApiCall_ID3D11DeviceContext_CSSetUnorderedAccessViews = MakeApiCallId(ApiFamily_D3D11, 0x105d), + ApiCall_ID3D11DeviceContext_CSSetShader = MakeApiCallId(ApiFamily_D3D11, 0x105e), + ApiCall_ID3D11DeviceContext_CSSetSamplers = MakeApiCallId(ApiFamily_D3D11, 0x105f), + ApiCall_ID3D11DeviceContext_CSSetConstantBuffers = MakeApiCallId(ApiFamily_D3D11, 0x1060), + ApiCall_ID3D11DeviceContext_VSGetConstantBuffers = MakeApiCallId(ApiFamily_D3D11, 0x1061), + ApiCall_ID3D11DeviceContext_PSGetShaderResources = MakeApiCallId(ApiFamily_D3D11, 0x1062), + ApiCall_ID3D11DeviceContext_PSGetShader = MakeApiCallId(ApiFamily_D3D11, 0x1063), + ApiCall_ID3D11DeviceContext_PSGetSamplers = MakeApiCallId(ApiFamily_D3D11, 0x1064), + ApiCall_ID3D11DeviceContext_VSGetShader = MakeApiCallId(ApiFamily_D3D11, 0x1065), + ApiCall_ID3D11DeviceContext_PSGetConstantBuffers = MakeApiCallId(ApiFamily_D3D11, 0x1066), + ApiCall_ID3D11DeviceContext_IAGetInputLayout = MakeApiCallId(ApiFamily_D3D11, 0x1067), + ApiCall_ID3D11DeviceContext_IAGetVertexBuffers = MakeApiCallId(ApiFamily_D3D11, 0x1068), + ApiCall_ID3D11DeviceContext_IAGetIndexBuffer = MakeApiCallId(ApiFamily_D3D11, 0x1069), + ApiCall_ID3D11DeviceContext_GSGetConstantBuffers = MakeApiCallId(ApiFamily_D3D11, 0x106a), + ApiCall_ID3D11DeviceContext_GSGetShader = MakeApiCallId(ApiFamily_D3D11, 0x106b), + ApiCall_ID3D11DeviceContext_IAGetPrimitiveTopology = MakeApiCallId(ApiFamily_D3D11, 0x106c), + ApiCall_ID3D11DeviceContext_VSGetShaderResources = MakeApiCallId(ApiFamily_D3D11, 0x106d), + ApiCall_ID3D11DeviceContext_VSGetSamplers = MakeApiCallId(ApiFamily_D3D11, 0x106e), + ApiCall_ID3D11DeviceContext_GetPredication = MakeApiCallId(ApiFamily_D3D11, 0x106f), + ApiCall_ID3D11DeviceContext_GSGetShaderResources = MakeApiCallId(ApiFamily_D3D11, 0x1070), + ApiCall_ID3D11DeviceContext_GSGetSamplers = MakeApiCallId(ApiFamily_D3D11, 0x1071), + ApiCall_ID3D11DeviceContext_OMGetRenderTargets = MakeApiCallId(ApiFamily_D3D11, 0x1072), + ApiCall_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews = MakeApiCallId(ApiFamily_D3D11, 0x1073), + ApiCall_ID3D11DeviceContext_OMGetBlendState = MakeApiCallId(ApiFamily_D3D11, 0x1074), + ApiCall_ID3D11DeviceContext_OMGetDepthStencilState = MakeApiCallId(ApiFamily_D3D11, 0x1075), + ApiCall_ID3D11DeviceContext_SOGetTargets = MakeApiCallId(ApiFamily_D3D11, 0x1076), + ApiCall_ID3D11DeviceContext_RSGetState = MakeApiCallId(ApiFamily_D3D11, 0x1077), + ApiCall_ID3D11DeviceContext_RSGetViewports = MakeApiCallId(ApiFamily_D3D11, 0x1078), + ApiCall_ID3D11DeviceContext_RSGetScissorRects = MakeApiCallId(ApiFamily_D3D11, 0x1079), + ApiCall_ID3D11DeviceContext_HSGetShaderResources = MakeApiCallId(ApiFamily_D3D11, 0x107a), + ApiCall_ID3D11DeviceContext_HSGetShader = MakeApiCallId(ApiFamily_D3D11, 0x107b), + ApiCall_ID3D11DeviceContext_HSGetSamplers = MakeApiCallId(ApiFamily_D3D11, 0x107c), + ApiCall_ID3D11DeviceContext_HSGetConstantBuffers = MakeApiCallId(ApiFamily_D3D11, 0x107d), + ApiCall_ID3D11DeviceContext_DSGetShaderResources = MakeApiCallId(ApiFamily_D3D11, 0x107e), + ApiCall_ID3D11DeviceContext_DSGetShader = MakeApiCallId(ApiFamily_D3D11, 0x107f), + ApiCall_ID3D11DeviceContext_DSGetSamplers = MakeApiCallId(ApiFamily_D3D11, 0x1080), + ApiCall_ID3D11DeviceContext_DSGetConstantBuffers = MakeApiCallId(ApiFamily_D3D11, 0x1081), + ApiCall_ID3D11DeviceContext_CSGetShaderResources = MakeApiCallId(ApiFamily_D3D11, 0x1082), + ApiCall_ID3D11DeviceContext_CSGetUnorderedAccessViews = MakeApiCallId(ApiFamily_D3D11, 0x1083), + ApiCall_ID3D11DeviceContext_CSGetShader = MakeApiCallId(ApiFamily_D3D11, 0x1084), + ApiCall_ID3D11DeviceContext_CSGetSamplers = MakeApiCallId(ApiFamily_D3D11, 0x1085), + ApiCall_ID3D11DeviceContext_CSGetConstantBuffers = MakeApiCallId(ApiFamily_D3D11, 0x1086), + ApiCall_ID3D11DeviceContext_ClearState = MakeApiCallId(ApiFamily_D3D11, 0x1087), + ApiCall_ID3D11DeviceContext_Flush = MakeApiCallId(ApiFamily_D3D11, 0x1088), + ApiCall_ID3D11DeviceContext_GetType = MakeApiCallId(ApiFamily_D3D11, 0x1089), + ApiCall_ID3D11DeviceContext_GetContextFlags = MakeApiCallId(ApiFamily_D3D11, 0x108a), + ApiCall_ID3D11DeviceContext_FinishCommandList = MakeApiCallId(ApiFamily_D3D11, 0x108b), + ApiCall_ID3D11VideoDecoder_GetCreationParameters = MakeApiCallId(ApiFamily_D3D11, 0x108c), + ApiCall_ID3D11VideoDecoder_GetDriverHandle = MakeApiCallId(ApiFamily_D3D11, 0x108d), + ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc = MakeApiCallId(ApiFamily_D3D11, 0x108e), + ApiCall_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat = MakeApiCallId(ApiFamily_D3D11, 0x108f), + ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps = MakeApiCallId(ApiFamily_D3D11, 0x1090), + ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps = MakeApiCallId(ApiFamily_D3D11, 0x1091), + ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate = MakeApiCallId(ApiFamily_D3D11, 0x1092), + ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange = MakeApiCallId(ApiFamily_D3D11, 0x1093), + ApiCall_ID3D11VideoProcessor_GetContentDesc = MakeApiCallId(ApiFamily_D3D11, 0x1094), + ApiCall_ID3D11VideoProcessor_GetRateConversionCaps = MakeApiCallId(ApiFamily_D3D11, 0x1095), + ApiCall_ID3D11AuthenticatedChannel_GetCertificateSize = MakeApiCallId(ApiFamily_D3D11, 0x1096), + ApiCall_ID3D11AuthenticatedChannel_GetCertificate = MakeApiCallId(ApiFamily_D3D11, 0x1097), + ApiCall_ID3D11AuthenticatedChannel_GetChannelHandle = MakeApiCallId(ApiFamily_D3D11, 0x1098), + ApiCall_ID3D11CryptoSession_GetCryptoType = MakeApiCallId(ApiFamily_D3D11, 0x1099), + ApiCall_ID3D11CryptoSession_GetDecoderProfile = MakeApiCallId(ApiFamily_D3D11, 0x109a), + ApiCall_ID3D11CryptoSession_GetCertificateSize = MakeApiCallId(ApiFamily_D3D11, 0x109b), + ApiCall_ID3D11CryptoSession_GetCertificate = MakeApiCallId(ApiFamily_D3D11, 0x109c), + ApiCall_ID3D11CryptoSession_GetCryptoSessionHandle = MakeApiCallId(ApiFamily_D3D11, 0x109d), + ApiCall_ID3D11VideoDecoderOutputView_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x109e), + ApiCall_ID3D11VideoProcessorInputView_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x109f), + ApiCall_ID3D11VideoProcessorOutputView_GetDesc = MakeApiCallId(ApiFamily_D3D11, 0x10a0), + ApiCall_ID3D11VideoContext_GetDecoderBuffer = MakeApiCallId(ApiFamily_D3D11, 0x10a1), + ApiCall_ID3D11VideoContext_ReleaseDecoderBuffer = MakeApiCallId(ApiFamily_D3D11, 0x10a2), + ApiCall_ID3D11VideoContext_DecoderBeginFrame = MakeApiCallId(ApiFamily_D3D11, 0x10a3), + ApiCall_ID3D11VideoContext_DecoderEndFrame = MakeApiCallId(ApiFamily_D3D11, 0x10a4), + ApiCall_ID3D11VideoContext_SubmitDecoderBuffers = MakeApiCallId(ApiFamily_D3D11, 0x10a5), + ApiCall_ID3D11VideoContext_DecoderExtension = MakeApiCallId(ApiFamily_D3D11, 0x10a6), + ApiCall_ID3D11VideoContext_VideoProcessorSetOutputTargetRect = MakeApiCallId(ApiFamily_D3D11, 0x10a7), + ApiCall_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor = MakeApiCallId(ApiFamily_D3D11, 0x10a8), + ApiCall_ID3D11VideoContext_VideoProcessorSetOutputColorSpace = MakeApiCallId(ApiFamily_D3D11, 0x10a9), + ApiCall_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode = MakeApiCallId(ApiFamily_D3D11, 0x10aa), + ApiCall_ID3D11VideoContext_VideoProcessorSetOutputConstriction = MakeApiCallId(ApiFamily_D3D11, 0x10ab), + ApiCall_ID3D11VideoContext_VideoProcessorSetOutputStereoMode = MakeApiCallId(ApiFamily_D3D11, 0x10ac), + ApiCall_ID3D11VideoContext_VideoProcessorSetOutputExtension = MakeApiCallId(ApiFamily_D3D11, 0x10ad), + ApiCall_ID3D11VideoContext_VideoProcessorGetOutputTargetRect = MakeApiCallId(ApiFamily_D3D11, 0x10ae), + ApiCall_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor = MakeApiCallId(ApiFamily_D3D11, 0x10af), + ApiCall_ID3D11VideoContext_VideoProcessorGetOutputColorSpace = MakeApiCallId(ApiFamily_D3D11, 0x10b0), + ApiCall_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode = MakeApiCallId(ApiFamily_D3D11, 0x10b1), + ApiCall_ID3D11VideoContext_VideoProcessorGetOutputConstriction = MakeApiCallId(ApiFamily_D3D11, 0x10b2), + ApiCall_ID3D11VideoContext_VideoProcessorGetOutputStereoMode = MakeApiCallId(ApiFamily_D3D11, 0x10b3), + ApiCall_ID3D11VideoContext_VideoProcessorGetOutputExtension = MakeApiCallId(ApiFamily_D3D11, 0x10b4), + ApiCall_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat = MakeApiCallId(ApiFamily_D3D11, 0x10b5), + ApiCall_ID3D11VideoContext_VideoProcessorSetStreamColorSpace = MakeApiCallId(ApiFamily_D3D11, 0x10b6), + ApiCall_ID3D11VideoContext_VideoProcessorSetStreamOutputRate = MakeApiCallId(ApiFamily_D3D11, 0x10b7), + ApiCall_ID3D11VideoContext_VideoProcessorSetStreamSourceRect = MakeApiCallId(ApiFamily_D3D11, 0x10b8), + ApiCall_ID3D11VideoContext_VideoProcessorSetStreamDestRect = MakeApiCallId(ApiFamily_D3D11, 0x10b9), + ApiCall_ID3D11VideoContext_VideoProcessorSetStreamAlpha = MakeApiCallId(ApiFamily_D3D11, 0x10ba), + ApiCall_ID3D11VideoContext_VideoProcessorSetStreamPalette = MakeApiCallId(ApiFamily_D3D11, 0x10bb), + ApiCall_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio = MakeApiCallId(ApiFamily_D3D11, 0x10bc), + ApiCall_ID3D11VideoContext_VideoProcessorSetStreamLumaKey = MakeApiCallId(ApiFamily_D3D11, 0x10bd), + ApiCall_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat = MakeApiCallId(ApiFamily_D3D11, 0x10be), + ApiCall_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode = MakeApiCallId(ApiFamily_D3D11, 0x10bf), + ApiCall_ID3D11VideoContext_VideoProcessorSetStreamFilter = MakeApiCallId(ApiFamily_D3D11, 0x10c0), + ApiCall_ID3D11VideoContext_VideoProcessorSetStreamExtension = MakeApiCallId(ApiFamily_D3D11, 0x10c1), + ApiCall_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat = MakeApiCallId(ApiFamily_D3D11, 0x10c2), + ApiCall_ID3D11VideoContext_VideoProcessorGetStreamColorSpace = MakeApiCallId(ApiFamily_D3D11, 0x10c3), + ApiCall_ID3D11VideoContext_VideoProcessorGetStreamOutputRate = MakeApiCallId(ApiFamily_D3D11, 0x10c4), + ApiCall_ID3D11VideoContext_VideoProcessorGetStreamSourceRect = MakeApiCallId(ApiFamily_D3D11, 0x10c5), + ApiCall_ID3D11VideoContext_VideoProcessorGetStreamDestRect = MakeApiCallId(ApiFamily_D3D11, 0x10c6), + ApiCall_ID3D11VideoContext_VideoProcessorGetStreamAlpha = MakeApiCallId(ApiFamily_D3D11, 0x10c7), + ApiCall_ID3D11VideoContext_VideoProcessorGetStreamPalette = MakeApiCallId(ApiFamily_D3D11, 0x10c8), + ApiCall_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio = MakeApiCallId(ApiFamily_D3D11, 0x10c9), + ApiCall_ID3D11VideoContext_VideoProcessorGetStreamLumaKey = MakeApiCallId(ApiFamily_D3D11, 0x10ca), + ApiCall_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat = MakeApiCallId(ApiFamily_D3D11, 0x10cb), + ApiCall_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode = MakeApiCallId(ApiFamily_D3D11, 0x10cc), + ApiCall_ID3D11VideoContext_VideoProcessorGetStreamFilter = MakeApiCallId(ApiFamily_D3D11, 0x10cd), + ApiCall_ID3D11VideoContext_VideoProcessorGetStreamExtension = MakeApiCallId(ApiFamily_D3D11, 0x10ce), + ApiCall_ID3D11VideoContext_VideoProcessorBlt = MakeApiCallId(ApiFamily_D3D11, 0x10cf), + ApiCall_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange = MakeApiCallId(ApiFamily_D3D11, 0x10d0), + ApiCall_ID3D11VideoContext_EncryptionBlt = MakeApiCallId(ApiFamily_D3D11, 0x10d1), + ApiCall_ID3D11VideoContext_DecryptionBlt = MakeApiCallId(ApiFamily_D3D11, 0x10d2), + ApiCall_ID3D11VideoContext_StartSessionKeyRefresh = MakeApiCallId(ApiFamily_D3D11, 0x10d3), + ApiCall_ID3D11VideoContext_FinishSessionKeyRefresh = MakeApiCallId(ApiFamily_D3D11, 0x10d4), + ApiCall_ID3D11VideoContext_GetEncryptionBltKey = MakeApiCallId(ApiFamily_D3D11, 0x10d5), + ApiCall_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange = MakeApiCallId(ApiFamily_D3D11, 0x10d6), + ApiCall_ID3D11VideoContext_QueryAuthenticatedChannel = MakeApiCallId(ApiFamily_D3D11, 0x10d7), + ApiCall_ID3D11VideoContext_ConfigureAuthenticatedChannel = MakeApiCallId(ApiFamily_D3D11, 0x10d8), + ApiCall_ID3D11VideoContext_VideoProcessorSetStreamRotation = MakeApiCallId(ApiFamily_D3D11, 0x10d9), + ApiCall_ID3D11VideoContext_VideoProcessorGetStreamRotation = MakeApiCallId(ApiFamily_D3D11, 0x10da), + ApiCall_ID3D11VideoDevice_CreateVideoDecoder = MakeApiCallId(ApiFamily_D3D11, 0x10db), + ApiCall_ID3D11VideoDevice_CreateVideoProcessor = MakeApiCallId(ApiFamily_D3D11, 0x10dc), + ApiCall_ID3D11VideoDevice_CreateAuthenticatedChannel = MakeApiCallId(ApiFamily_D3D11, 0x10dd), + ApiCall_ID3D11VideoDevice_CreateCryptoSession = MakeApiCallId(ApiFamily_D3D11, 0x10de), + ApiCall_ID3D11VideoDevice_CreateVideoDecoderOutputView = MakeApiCallId(ApiFamily_D3D11, 0x10df), + ApiCall_ID3D11VideoDevice_CreateVideoProcessorInputView = MakeApiCallId(ApiFamily_D3D11, 0x10e0), + ApiCall_ID3D11VideoDevice_CreateVideoProcessorOutputView = MakeApiCallId(ApiFamily_D3D11, 0x10e1), + ApiCall_ID3D11VideoDevice_CreateVideoProcessorEnumerator = MakeApiCallId(ApiFamily_D3D11, 0x10e2), + ApiCall_ID3D11VideoDevice_GetVideoDecoderProfileCount = MakeApiCallId(ApiFamily_D3D11, 0x10e3), + ApiCall_ID3D11VideoDevice_GetVideoDecoderProfile = MakeApiCallId(ApiFamily_D3D11, 0x10e4), + ApiCall_ID3D11VideoDevice_CheckVideoDecoderFormat = MakeApiCallId(ApiFamily_D3D11, 0x10e5), + ApiCall_ID3D11VideoDevice_GetVideoDecoderConfigCount = MakeApiCallId(ApiFamily_D3D11, 0x10e6), + ApiCall_ID3D11VideoDevice_GetVideoDecoderConfig = MakeApiCallId(ApiFamily_D3D11, 0x10e7), + ApiCall_ID3D11VideoDevice_GetContentProtectionCaps = MakeApiCallId(ApiFamily_D3D11, 0x10e8), + ApiCall_ID3D11VideoDevice_CheckCryptoKeyExchange = MakeApiCallId(ApiFamily_D3D11, 0x10e9), + ApiCall_ID3D11VideoDevice_SetPrivateData = MakeApiCallId(ApiFamily_D3D11, 0x10ea), + ApiCall_ID3D11VideoDevice_SetPrivateDataInterface = MakeApiCallId(ApiFamily_D3D11, 0x10eb), + ApiCall_ID3D11Device_CreateBuffer = MakeApiCallId(ApiFamily_D3D11, 0x10ec), + ApiCall_ID3D11Device_CreateTexture1D = MakeApiCallId(ApiFamily_D3D11, 0x10ed), + ApiCall_ID3D11Device_CreateTexture2D = MakeApiCallId(ApiFamily_D3D11, 0x10ee), + ApiCall_ID3D11Device_CreateTexture3D = MakeApiCallId(ApiFamily_D3D11, 0x10ef), + ApiCall_ID3D11Device_CreateShaderResourceView = MakeApiCallId(ApiFamily_D3D11, 0x10f0), + ApiCall_ID3D11Device_CreateUnorderedAccessView = MakeApiCallId(ApiFamily_D3D11, 0x10f1), + ApiCall_ID3D11Device_CreateRenderTargetView = MakeApiCallId(ApiFamily_D3D11, 0x10f2), + ApiCall_ID3D11Device_CreateDepthStencilView = MakeApiCallId(ApiFamily_D3D11, 0x10f3), + ApiCall_ID3D11Device_CreateInputLayout = MakeApiCallId(ApiFamily_D3D11, 0x10f4), + ApiCall_ID3D11Device_CreateVertexShader = MakeApiCallId(ApiFamily_D3D11, 0x10f5), + ApiCall_ID3D11Device_CreateGeometryShader = MakeApiCallId(ApiFamily_D3D11, 0x10f6), + ApiCall_ID3D11Device_CreateGeometryShaderWithStreamOutput = MakeApiCallId(ApiFamily_D3D11, 0x10f7), + ApiCall_ID3D11Device_CreatePixelShader = MakeApiCallId(ApiFamily_D3D11, 0x10f8), + ApiCall_ID3D11Device_CreateHullShader = MakeApiCallId(ApiFamily_D3D11, 0x10f9), + ApiCall_ID3D11Device_CreateDomainShader = MakeApiCallId(ApiFamily_D3D11, 0x10fa), + ApiCall_ID3D11Device_CreateComputeShader = MakeApiCallId(ApiFamily_D3D11, 0x10fb), + ApiCall_ID3D11Device_CreateClassLinkage = MakeApiCallId(ApiFamily_D3D11, 0x10fc), + ApiCall_ID3D11Device_CreateBlendState = MakeApiCallId(ApiFamily_D3D11, 0x10fd), + ApiCall_ID3D11Device_CreateDepthStencilState = MakeApiCallId(ApiFamily_D3D11, 0x10fe), + ApiCall_ID3D11Device_CreateRasterizerState = MakeApiCallId(ApiFamily_D3D11, 0x10ff), + ApiCall_ID3D11Device_CreateSamplerState = MakeApiCallId(ApiFamily_D3D11, 0x1100), + ApiCall_ID3D11Device_CreateQuery = MakeApiCallId(ApiFamily_D3D11, 0x1101), + ApiCall_ID3D11Device_CreatePredicate = MakeApiCallId(ApiFamily_D3D11, 0x1102), + ApiCall_ID3D11Device_CreateCounter = MakeApiCallId(ApiFamily_D3D11, 0x1103), + ApiCall_ID3D11Device_CreateDeferredContext = MakeApiCallId(ApiFamily_D3D11, 0x1104), + ApiCall_ID3D11Device_OpenSharedResource = MakeApiCallId(ApiFamily_D3D11, 0x1105), + ApiCall_ID3D11Device_CheckFormatSupport = MakeApiCallId(ApiFamily_D3D11, 0x1106), + ApiCall_ID3D11Device_CheckMultisampleQualityLevels = MakeApiCallId(ApiFamily_D3D11, 0x1107), + ApiCall_ID3D11Device_CheckCounterInfo = MakeApiCallId(ApiFamily_D3D11, 0x1108), + ApiCall_ID3D11Device_CheckCounter = MakeApiCallId(ApiFamily_D3D11, 0x1109), + ApiCall_ID3D11Device_CheckFeatureSupport = MakeApiCallId(ApiFamily_D3D11, 0x110a), + ApiCall_ID3D11Device_GetPrivateData = MakeApiCallId(ApiFamily_D3D11, 0x110b), + ApiCall_ID3D11Device_SetPrivateData = MakeApiCallId(ApiFamily_D3D11, 0x110c), + ApiCall_ID3D11Device_SetPrivateDataInterface = MakeApiCallId(ApiFamily_D3D11, 0x110d), + ApiCall_ID3D11Device_GetFeatureLevel = MakeApiCallId(ApiFamily_D3D11, 0x110e), + ApiCall_ID3D11Device_GetCreationFlags = MakeApiCallId(ApiFamily_D3D11, 0x110f), + ApiCall_ID3D11Device_GetDeviceRemovedReason = MakeApiCallId(ApiFamily_D3D11, 0x1110), + ApiCall_ID3D11Device_GetImmediateContext = MakeApiCallId(ApiFamily_D3D11, 0x1111), + ApiCall_ID3D11Device_SetExceptionMode = MakeApiCallId(ApiFamily_D3D11, 0x1112), + ApiCall_ID3D11Device_GetExceptionMode = MakeApiCallId(ApiFamily_D3D11, 0x1113), + ApiCall_ID3D11BlendState1_GetDesc1 = MakeApiCallId(ApiFamily_D3D11, 0x1114), + ApiCall_ID3D11RasterizerState1_GetDesc1 = MakeApiCallId(ApiFamily_D3D11, 0x1115), + ApiCall_ID3D11DeviceContext1_CopySubresourceRegion1 = MakeApiCallId(ApiFamily_D3D11, 0x1116), + ApiCall_ID3D11DeviceContext1_UpdateSubresource1 = MakeApiCallId(ApiFamily_D3D11, 0x1117), + ApiCall_ID3D11DeviceContext1_DiscardResource = MakeApiCallId(ApiFamily_D3D11, 0x1118), + ApiCall_ID3D11DeviceContext1_DiscardView = MakeApiCallId(ApiFamily_D3D11, 0x1119), + ApiCall_ID3D11DeviceContext1_VSSetConstantBuffers1 = MakeApiCallId(ApiFamily_D3D11, 0x111a), + ApiCall_ID3D11DeviceContext1_HSSetConstantBuffers1 = MakeApiCallId(ApiFamily_D3D11, 0x111b), + ApiCall_ID3D11DeviceContext1_DSSetConstantBuffers1 = MakeApiCallId(ApiFamily_D3D11, 0x111c), + ApiCall_ID3D11DeviceContext1_GSSetConstantBuffers1 = MakeApiCallId(ApiFamily_D3D11, 0x111d), + ApiCall_ID3D11DeviceContext1_PSSetConstantBuffers1 = MakeApiCallId(ApiFamily_D3D11, 0x111e), + ApiCall_ID3D11DeviceContext1_CSSetConstantBuffers1 = MakeApiCallId(ApiFamily_D3D11, 0x111f), + ApiCall_ID3D11DeviceContext1_VSGetConstantBuffers1 = MakeApiCallId(ApiFamily_D3D11, 0x1120), + ApiCall_ID3D11DeviceContext1_HSGetConstantBuffers1 = MakeApiCallId(ApiFamily_D3D11, 0x1121), + ApiCall_ID3D11DeviceContext1_DSGetConstantBuffers1 = MakeApiCallId(ApiFamily_D3D11, 0x1122), + ApiCall_ID3D11DeviceContext1_GSGetConstantBuffers1 = MakeApiCallId(ApiFamily_D3D11, 0x1123), + ApiCall_ID3D11DeviceContext1_PSGetConstantBuffers1 = MakeApiCallId(ApiFamily_D3D11, 0x1124), + ApiCall_ID3D11DeviceContext1_CSGetConstantBuffers1 = MakeApiCallId(ApiFamily_D3D11, 0x1125), + ApiCall_ID3D11DeviceContext1_SwapDeviceContextState = MakeApiCallId(ApiFamily_D3D11, 0x1126), + ApiCall_ID3D11DeviceContext1_ClearView = MakeApiCallId(ApiFamily_D3D11, 0x1127), + ApiCall_ID3D11DeviceContext1_DiscardView1 = MakeApiCallId(ApiFamily_D3D11, 0x1128), + ApiCall_ID3D11VideoContext1_SubmitDecoderBuffers1 = MakeApiCallId(ApiFamily_D3D11, 0x1129), + ApiCall_ID3D11VideoContext1_GetDataForNewHardwareKey = MakeApiCallId(ApiFamily_D3D11, 0x112a), + ApiCall_ID3D11VideoContext1_CheckCryptoSessionStatus = MakeApiCallId(ApiFamily_D3D11, 0x112b), + ApiCall_ID3D11VideoContext1_DecoderEnableDownsampling = MakeApiCallId(ApiFamily_D3D11, 0x112c), + ApiCall_ID3D11VideoContext1_DecoderUpdateDownsampling = MakeApiCallId(ApiFamily_D3D11, 0x112d), + ApiCall_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1 = MakeApiCallId(ApiFamily_D3D11, 0x112e), + ApiCall_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage = MakeApiCallId(ApiFamily_D3D11, 0x112f), + ApiCall_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1 = MakeApiCallId(ApiFamily_D3D11, 0x1130), + ApiCall_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage = MakeApiCallId(ApiFamily_D3D11, 0x1131), + ApiCall_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1 = MakeApiCallId(ApiFamily_D3D11, 0x1132), + ApiCall_ID3D11VideoContext1_VideoProcessorSetStreamMirror = MakeApiCallId(ApiFamily_D3D11, 0x1133), + ApiCall_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1 = MakeApiCallId(ApiFamily_D3D11, 0x1134), + ApiCall_ID3D11VideoContext1_VideoProcessorGetStreamMirror = MakeApiCallId(ApiFamily_D3D11, 0x1135), + ApiCall_ID3D11VideoContext1_VideoProcessorGetBehaviorHints = MakeApiCallId(ApiFamily_D3D11, 0x1136), + ApiCall_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize = MakeApiCallId(ApiFamily_D3D11, 0x1137), + ApiCall_ID3D11VideoDevice1_GetVideoDecoderCaps = MakeApiCallId(ApiFamily_D3D11, 0x1138), + ApiCall_ID3D11VideoDevice1_CheckVideoDecoderDownsampling = MakeApiCallId(ApiFamily_D3D11, 0x1139), + ApiCall_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters = MakeApiCallId(ApiFamily_D3D11, 0x113a), + ApiCall_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion = MakeApiCallId(ApiFamily_D3D11, 0x113b), + ApiCall_ID3D11Device1_GetImmediateContext1 = MakeApiCallId(ApiFamily_D3D11, 0x113c), + ApiCall_ID3D11Device1_CreateDeferredContext1 = MakeApiCallId(ApiFamily_D3D11, 0x113d), + ApiCall_ID3D11Device1_CreateBlendState1 = MakeApiCallId(ApiFamily_D3D11, 0x113e), + ApiCall_ID3D11Device1_CreateRasterizerState1 = MakeApiCallId(ApiFamily_D3D11, 0x113f), + ApiCall_ID3D11Device1_CreateDeviceContextState = MakeApiCallId(ApiFamily_D3D11, 0x1140), + ApiCall_ID3D11Device1_OpenSharedResource1 = MakeApiCallId(ApiFamily_D3D11, 0x1141), + ApiCall_ID3D11Device1_OpenSharedResourceByName = MakeApiCallId(ApiFamily_D3D11, 0x1142), + ApiCall_ID3D11DeviceContext2_UpdateTileMappings = MakeApiCallId(ApiFamily_D3D11, 0x1143), + ApiCall_ID3D11DeviceContext2_CopyTileMappings = MakeApiCallId(ApiFamily_D3D11, 0x1144), + ApiCall_ID3D11DeviceContext2_CopyTiles = MakeApiCallId(ApiFamily_D3D11, 0x1145), + ApiCall_ID3D11DeviceContext2_UpdateTiles = MakeApiCallId(ApiFamily_D3D11, 0x1146), + ApiCall_ID3D11DeviceContext2_ResizeTilePool = MakeApiCallId(ApiFamily_D3D11, 0x1147), + ApiCall_ID3D11DeviceContext2_TiledResourceBarrier = MakeApiCallId(ApiFamily_D3D11, 0x1148), + ApiCall_ID3D11DeviceContext2_IsAnnotationEnabled = MakeApiCallId(ApiFamily_D3D11, 0x1149), + ApiCall_ID3D11DeviceContext2_SetMarkerInt = MakeApiCallId(ApiFamily_D3D11, 0x114a), + ApiCall_ID3D11DeviceContext2_BeginEventInt = MakeApiCallId(ApiFamily_D3D11, 0x114b), + ApiCall_ID3D11DeviceContext2_EndEvent = MakeApiCallId(ApiFamily_D3D11, 0x114c), + ApiCall_ID3D11Device2_GetImmediateContext2 = MakeApiCallId(ApiFamily_D3D11, 0x114d), + ApiCall_ID3D11Device2_CreateDeferredContext2 = MakeApiCallId(ApiFamily_D3D11, 0x114e), + ApiCall_ID3D11Device2_GetResourceTiling = MakeApiCallId(ApiFamily_D3D11, 0x114f), + ApiCall_ID3D11Device2_CheckMultisampleQualityLevels1 = MakeApiCallId(ApiFamily_D3D11, 0x1150), + ApiCall_ID3DUserDefinedAnnotation_BeginEvent = MakeApiCallId(ApiFamily_D3D11, 0x1151), + ApiCall_ID3DUserDefinedAnnotation_EndEvent = MakeApiCallId(ApiFamily_D3D11, 0x1152), + ApiCall_ID3DUserDefinedAnnotation_SetMarker = MakeApiCallId(ApiFamily_D3D11, 0x1153), + ApiCall_ID3DUserDefinedAnnotation_GetStatus = MakeApiCallId(ApiFamily_D3D11, 0x1154), + + // D3D 11.3 + ApiCall_ID3D11Texture2D1_GetDesc1 = MakeApiCallId(ApiFamily_D3D11, 0x1155), + ApiCall_ID3D11Texture3D1_GetDesc1 = MakeApiCallId(ApiFamily_D3D11, 0x1156), + ApiCall_ID3D11RasterizerState2_GetDesc2 = MakeApiCallId(ApiFamily_D3D11, 0x1157), + ApiCall_ID3D11ShaderResourceView1_GetDesc1 = MakeApiCallId(ApiFamily_D3D11, 0x1158), + ApiCall_ID3D11RenderTargetView1_GetDesc1 = MakeApiCallId(ApiFamily_D3D11, 0x1159), + ApiCall_ID3D11UnorderedAccessView1_GetDesc1 = MakeApiCallId(ApiFamily_D3D11, 0x115a), + ApiCall_ID3D11Query1_GetDesc1 = MakeApiCallId(ApiFamily_D3D11, 0x115b), + ApiCall_ID3D11DeviceContext3_Flush1 = MakeApiCallId(ApiFamily_D3D11, 0x115c), + ApiCall_ID3D11DeviceContext3_SetHardwareProtectionState = MakeApiCallId(ApiFamily_D3D11, 0x115d), + ApiCall_ID3D11DeviceContext3_GetHardwareProtectionState = MakeApiCallId(ApiFamily_D3D11, 0x115e), + ApiCall_ID3D11Fence_CreateSharedHandle = MakeApiCallId(ApiFamily_D3D11, 0x115f), + ApiCall_ID3D11Fence_GetCompletedValue = MakeApiCallId(ApiFamily_D3D11, 0x1160), + ApiCall_ID3D11Fence_SetEventOnCompletion = MakeApiCallId(ApiFamily_D3D11, 0x1161), + ApiCall_ID3D11DeviceContext4_Signal = MakeApiCallId(ApiFamily_D3D11, 0x1162), + ApiCall_ID3D11DeviceContext4_Wait = MakeApiCallId(ApiFamily_D3D11, 0x1163), + ApiCall_ID3D11Device3_CreateTexture2D1 = MakeApiCallId(ApiFamily_D3D11, 0x1164), + ApiCall_ID3D11Device3_CreateTexture3D1 = MakeApiCallId(ApiFamily_D3D11, 0x1165), + ApiCall_ID3D11Device3_CreateRasterizerState2 = MakeApiCallId(ApiFamily_D3D11, 0x1167), + ApiCall_ID3D11Device3_CreateShaderResourceView1 = MakeApiCallId(ApiFamily_D3D11, 0x1168), + ApiCall_ID3D11Device3_CreateUnorderedAccessView1 = MakeApiCallId(ApiFamily_D3D11, 0x1169), + ApiCall_ID3D11Device3_CreateRenderTargetView1 = MakeApiCallId(ApiFamily_D3D11, 0x116a), + ApiCall_ID3D11Device3_CreateQuery1 = MakeApiCallId(ApiFamily_D3D11, 0x116b), + ApiCall_ID3D11Device3_GetImmediateContext3 = MakeApiCallId(ApiFamily_D3D11, 0x116c), + ApiCall_ID3D11Device3_CreateDeferredContext3 = MakeApiCallId(ApiFamily_D3D11, 0x116d), + ApiCall_ID3D11Device3_WriteToSubresource = MakeApiCallId(ApiFamily_D3D11, 0x116e), + ApiCall_ID3D11Device3_ReadFromSubresource = MakeApiCallId(ApiFamily_D3D11, 0x116f), + + // D3D 11.4 + ApiCall_ID3D11Device4_RegisterDeviceRemovedEvent = MakeApiCallId(ApiFamily_D3D11, 0x1170), + ApiCall_ID3D11Device4_UnregisterDeviceRemoved = MakeApiCallId(ApiFamily_D3D11, 0x1171), + ApiCall_ID3D11Device5_OpenSharedFence = MakeApiCallId(ApiFamily_D3D11, 0x1172), + ApiCall_ID3D11Device5_CreateFence = MakeApiCallId(ApiFamily_D3D11, 0x1173), + ApiCall_ID3D11Multithread_Enter = MakeApiCallId(ApiFamily_D3D11, 0x1174), + ApiCall_ID3D11Multithread_Leave = MakeApiCallId(ApiFamily_D3D11, 0x1175), + ApiCall_ID3D11Multithread_SetMultithreadProtected = MakeApiCallId(ApiFamily_D3D11, 0x1176), + ApiCall_ID3D11Multithread_GetMultithreadProtected = MakeApiCallId(ApiFamily_D3D11, 0x1177), + ApiCall_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData = MakeApiCallId(ApiFamily_D3D11, 0x1178), + ApiCall_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData = MakeApiCallId(ApiFamily_D3D11, 0x1179), + ApiCall_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData = MakeApiCallId(ApiFamily_D3D11, 0x117a), + ApiCall_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData = MakeApiCallId(ApiFamily_D3D11, 0x117b), + ApiCall_ID3D11VideoDevice2_CheckFeatureSupport = MakeApiCallId(ApiFamily_D3D11, 0x117c), + ApiCall_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT = MakeApiCallId(ApiFamily_D3D11, 0x117d), + ApiCall_ID3D11VideoContext3_DecoderBeginFrame1 = MakeApiCallId(ApiFamily_D3D11, 0x117e), + ApiCall_ID3D11VideoContext3_SubmitDecoderBuffers2 = MakeApiCallId(ApiFamily_D3D11, 0x117f), + + ApiCall_D3D11Last, + + ApiCall_D3D11On12CreateDevice = MakeApiCallId(ApiFamily_D3D11On12, 0x1000), + ApiCall_ID3D11On12Device_CreateWrappedResource = MakeApiCallId(ApiFamily_D3D11On12, 0x1001), + ApiCall_ID3D11On12Device_ReleaseWrappedResources = MakeApiCallId(ApiFamily_D3D11On12, 0x1002), + ApiCall_ID3D11On12Device_AcquireWrappedResources = MakeApiCallId(ApiFamily_D3D11On12, 0x1003), + ApiCall_ID3D11On12Device1_GetD3D12Device = MakeApiCallId(ApiFamily_D3D11On12, 0x1004), + ApiCall_ID3D11On12Device2_UnwrapUnderlyingResource = MakeApiCallId(ApiFamily_D3D11On12, 0x1005), + ApiCall_ID3D11On12Device2_ReturnUnderlyingResource = MakeApiCallId(ApiFamily_D3D11On12, 0x1006), + + ApiCall_D3D11On12Last, + // clang-format on }; diff --git a/framework/generated/base_generators/base_struct_decoders_body_generator.py b/framework/generated/base_generators/base_struct_decoders_body_generator.py index 0319e281ab..edaf929227 100644 --- a/framework/generated/base_generators/base_struct_decoders_body_generator.py +++ b/framework/generated/base_generators/base_struct_decoders_body_generator.py @@ -84,7 +84,7 @@ def make_decode_invocation(self, name, value): type_name = self.make_invocation_type_name(value.base_type) - if self.is_struct(type_name): + if self.is_struct(type_name) or type_name == 'Struct': is_struct = True elif self.is_class(value): is_class = True diff --git a/framework/generated/base_generators/base_struct_decoders_header_generator.py b/framework/generated/base_generators/base_struct_decoders_header_generator.py index a8b8400758..d2375169dd 100644 --- a/framework/generated/base_generators/base_struct_decoders_header_generator.py +++ b/framework/generated/base_generators/base_struct_decoders_header_generator.py @@ -2,6 +2,7 @@ # # Copyright (c) 2018 Valve Corporation # Copyright (c) 2018 LunarG, Inc. +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -72,7 +73,7 @@ def needs_member_declaration(self, name, value): return True elif self.is_handle(value.base_type): return True - elif self.is_struct(value.base_type): + elif self.is_struct(value.base_type) or self.is_union(value.base_type): return True elif self.is_generic_struct_handle_value(name, value.name): return True @@ -100,7 +101,7 @@ def make_member_declarations(self, name, values): body += ' PNextNode* pNext{ nullptr };\n' elif self.needs_member_declaration(name, value): type_name = self.make_decoded_param_type(value) - if self.is_struct(value.base_type): + if self.is_struct(value.base_type) or self.is_union(value.base_type): type_name = '{}*'.format(type_name) default_value = self.get_default_init_value(type_name) @@ -109,7 +110,7 @@ def make_member_declarations(self, name, values): type_name, value.name, default_value ) else: - if self.is_struct(value.base_type): + if self.is_struct(value.base_type) or self.is_union(value.base_type): body += ' {} {}{{ nullptr }};\n'.format( type_name, value.name ) diff --git a/framework/generated/dx12_generators/blacklists.json b/framework/generated/dx12_generators/blacklists.json index 16ecef0ef2..5f494c908b 100644 --- a/framework/generated/dx12_generators/blacklists.json +++ b/framework/generated/dx12_generators/blacklists.json @@ -11,6 +11,24 @@ ], "ID3D12Resource": [ "WriteToSubresource" + ], + "ID3D11Device": [ + "CheckFeatureSupport", + "CreateBuffer", + "CreateTexture1D", + "CreateTexture2D", + "CreateTexture3D" + ], + "ID3D11Device3": [ + "CreateTexture2D1", + "CreateTexture3D1", + "WriteToSubresource" + ], + "ID3D11DeviceContext": [ + "UpdateSubresource" + ], + "ID3D11DeviceContext1": [ + "UpdateSubresource1" ] }, "structures": [ @@ -36,6 +54,21 @@ "D3D12_STATE_SUBOBJECT", "D3D12_SUBOBJECT_TO_EXPORTS_ASSOCIATION", "D3D12_BARRIER_GROUP", - "D3D12_SAMPLER_DESC2" + "D3D12_SAMPLER_DESC2", + "D3D11_SUBRESOURCE_DATA", + "D3D11_BUFFER_SRV", + "D3D11_SHADER_RESOURCE_VIEW_DESC", + "D3D11_BUFFER_RTV", + "D3D11_RENDER_TARGET_VIEW_DESC", + "D3D11_DEPTH_STENCIL_VIEW_DESC", + "D3D11_UNORDERED_ACCESS_VIEW_DESC", + "D3D11_SHADER_RESOURCE_VIEW_DESC1", + "D3D11_RENDER_TARGET_VIEW_DESC1", + "D3D11_UNORDERED_ACCESS_VIEW_DESC1", + "D3D11_VIDEO_COLOR", + "D3D11_AUTHENTICATED_PROTECTION_FLAGS", + "D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC", + "D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC", + "D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC" ] } diff --git a/framework/generated/dx12_generators/capture_overrides.json b/framework/generated/dx12_generators/capture_overrides.json index 0afb3dcfcb..a7d460aa5d 100644 --- a/framework/generated/dx12_generators/capture_overrides.json +++ b/framework/generated/dx12_generators/capture_overrides.json @@ -1,6 +1,8 @@ { "functions": { - "CreateDXGIFactory2": "D3D12CaptureManager::Get()->OverrideCreateDXGIFactory2" + "CreateDXGIFactory2": "D3D12CaptureManager::Get()->OverrideCreateDXGIFactory2", + "D3D11CreateDevice": "D3D12CaptureManager::Get()->OverrideD3D11CreateDevice", + "D3D11CreateDeviceAndSwapChain": "D3D12CaptureManager::Get()->OverrideD3D11CreateDeviceAndSwapChain" }, "classmethods": { "ID3D12DescriptorHeap": { diff --git a/framework/generated/dx12_generators/dx12_CppHeaderParser.py b/framework/generated/dx12_generators/dx12_CppHeaderParser.py index 2a2c3a5a36..efd90f8e0a 100644 --- a/framework/generated/dx12_generators/dx12_CppHeaderParser.py +++ b/framework/generated/dx12_generators/dx12_CppHeaderParser.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # # Copyright (c) 2021 LunarG, Inc. +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -20,22 +21,24 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. +import re from CppHeaderParser import CppHeader, CppHeaderParser SAL_TOKENS = [ '__in_ecount', '__in_ecount_opt', '__RPC__deref_out', '__RPC__deref_out_opt', '__RPC__in', '_Always_', '_COM_Outptr_', - '_COM_Outptr_opt_', '_COM_Outptr_opt_result_maybenull_', - '_Field_size_bytes_full_', '_Field_size_bytes_full_opt_', - '_Field_size_full_', '_Field_size_full_opt_', '_Field_z_', '_In_', - '_In_opt_', '_In_range_', '_In_reads_', '_In_reads_bytes_', - '_In_reads_bytes_opt_', '_In_reads_opt_', '_In_z_', '_Inout_', - '_Inout_opt_', '_Inout_updates_bytes_', '_Out_', '_Out_opt_', - '_Out_writes_', '_Out_writes_all_', '_Out_writes_all_opt_', - '_Out_writes_bytes_', '_Out_writes_bytes_opt_', '_Out_writes_bytes_to_', - '_Out_writes_opt_', '_Out_writes_to_opt_', - '_Outptr_opt_result_bytebuffer_', '_Field_size_', '_In_opt_count_', - '_In_count_' + '_COM_Outptr_opt_', '_COM_Outptr_opt_result_maybenull_', '_Field_size_', + '_Field_size_opt_', '_Field_size_bytes_full_', + '_Field_size_bytes_full_opt_', '_Field_size_full_', + '_Field_size_full_opt_', '_Field_z_', '_In_', '_In_count_', '_In_opt_', + '_In_opt_count_', '_In_opt_bytecount_', '_In_range_', '_In_reads_', + '_In_reads_bytes_', '_In_reads_bytes_opt_', '_In_reads_opt_', '_In_z_', + '_Inout_', '_Inout_opt_', '_Inout_opt_bytecount_', '_Inout_updates_bytes_', + '_Out_', '_Out_opt_', '_Out_writes_', '_Out_writes_all_', + '_Out_writes_all_opt_', '_Out_writes_bytes_', '_Out_writes_bytes_opt_', + '_Out_writes_bytes_to_', '_Out_writes_opt_', '_Out_writes_to_opt_', + '_Outptr_', '_Outptr_result_maybenull_', '_Outptr_result_bytebuffer_','_Outptr_opt_', + '_Outptr_opt_result_maybenull_', '_Outptr_opt_result_bytebuffer_' ] original_warning_print = CppHeaderParser.warning_print @@ -78,10 +81,26 @@ def dx12_is_property_namestack(name_stack): r = True return r - CppHeaderParser.is_method_namestack = dx12_is_method_namestack CppHeaderParser.is_property_namestack = dx12_is_property_namestack +original_evaluate_class_stack = CppHeader._evaluate_class_stack +original_finalize = CppHeader.finalize + + +def dx12_evaluate_class_stack(self): + # Initialize base class' anon union counter on first use. + if self.anon_union_counter < self.anon_union_count: + self.anon_union_counter = self.anon_union_count + original_evaluate_class_stack(self) + +def dx12_finalize(self): + # Before post-parsing cleanup, store anon union counter for initializing other Dx12CppHeader objects. + self.anon_union_count = self.anon_union_counter + original_finalize(self) + +CppHeader._evaluate_class_stack = dx12_evaluate_class_stack +CppHeader.finalize = dx12_finalize class Dx12CppClass(): """This struct is simliar to CppHeaderParser.CppClass. In order to add data into CppHeader manually.""" @@ -94,21 +113,23 @@ def __init__(self): class Dx12CppHeader(CppHeader): - def __init__(self, header_file_name, encoding=None, **kwargs): + def __init__(self, header_file_name, anon_union_count=0, encoding=None, **kwargs): """Method override. Custom CppHeader implementation to modify the content of the header file to remove D3D12 specific syntax before parsing with the CppHeader base class. """ + self.anon_union_count = anon_union_count source = '' with open(header_file_name, 'r') as fd: source = self.preprocess_file(fd.readlines()) CppHeader.__init__(self, source, "string", encoding, **kwargs) def preprocess_file(self, lines): - """Preprocess header file to remove MIDL macros and CINTERACE declarations.""" + """Preprocess header file to remove MIDL macros, CINTERACE declarations, _Inexpressible tags, and D3D11 helper declarations.""" source = '' interface_scope = 0 + helper_scope = False ignore_lines = False enum_scope = False retval_param = False @@ -117,21 +138,41 @@ def preprocess_file(self, lines): if 'DEFINE_ENUM_FLAG_OPERATORS(' in line: continue - + if interface_scope == 0: + # Remove annotations from anon struct declarations to prevent them from being interpreted as the struct name. + line = line.replace( + '__MIDL___MIDL_itf_d3d11', '//__MIDL___MIDL_itf_d3d11' + ) source += line - enum_scope = line.startswith('typedef enum ') - if (line.startswith('#if') and ('!defined(CINTERFACE)' in line)) or enum_scope: + + if line.startswith('typedef enum '): + enum_scope = True + elif line.startswith('#if') and ( + '!defined( D3D11_NO_HELPERS )' in line + ): + helper_scope = True + ignore_lines = True + + if ( + line.startswith('#if') and + ('!defined(CINTERFACE)' in line) + ) or enum_scope or helper_scope: interface_scope = 1 else: if enum_scope: if line.find(', *') != -1: interface_scope = 0 ignore_lines = False + elif helper_scope: + if line.startswith('#endif'): + interface_scope = 0 + helper_scope = False + ignore_lines = False else: if line.startswith('#if'): interface_scope += 1 - + if 'defined(_MSC_VER) || !defined(_WIN32)' in line: retval_param = True @@ -174,5 +215,15 @@ def preprocess_file(self, lines): new_line = new_line.replace( 'END_INTERFACE', '//END_INTERFACE' ) + + if '_Inexpressible_' in new_line: + # Some expressions specified with the _Inexpressible_ SAL token are causing the parser + # to merge the current parameter declaration with the following parameter declaration + # (eg. pDesc->MipLevels). Add quotes to unquoted expressions to avoid the parsing error + # while preserving the original data. + new_line = re.sub( + r'_Inexpressible_\(([^")]+)\)', + '_Inexpressible_("\\1")', new_line + ) source += new_line return source diff --git a/framework/generated/dx12_generators/dx12_api_call_encoders_body_generator.py b/framework/generated/dx12_generators/dx12_api_call_encoders_body_generator.py index ab1c7398a1..28070d9487 100644 --- a/framework/generated/dx12_generators/dx12_api_call_encoders_body_generator.py +++ b/framework/generated/dx12_generators/dx12_api_call_encoders_body_generator.py @@ -2,6 +2,7 @@ # # Copyright (c) 2021 LunarG, Inc. # Copyright (c) 2022 Advanced Micro Devices, Inc. +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -87,6 +88,15 @@ def write_include(self): ) write(code, file=self.outFile) + def get_encode_str_array_length(self, array_length, prefix=''): + if array_length.startswith('* '): + array_length = '({prefix}{} != nullptr) ? {prefix}{} : 0'.format( + array_length[2:], array_length.replace(' ', ''), prefix=prefix + ) + else: + array_length = prefix + array_length + return array_length + def get_encode_struct(self, value, is_generating_struct, is_result): """Method override.""" write_parameter_value = '' @@ -161,16 +171,29 @@ def get_encode_value( omit_output_data = ', omit_output_data' if value.array_length and type(value.array_length) == str: - if value.pointer_count == 2: + if '_result_bytebuffer_' in value.full_type: + # This is a void** pointer to a memory allocation with a size defined by value.array_length, + # not a void* array. For this case, we will encode the content of the memory allocation, and + # need to dereference the void** pointer. + dereference_expr = '({prefix}{param} != nullptr) ? *{prefix}{param} : nullptr'.format(prefix=write_parameter_value, param=value.name) + return 'encoder->Encode{}Array({}, {}{});'.format( + function_name, dereference_expr, + self.get_encode_str_array_length( + value.array_length, write_parameter_value + ), omit_output_data + ) + elif value.pointer_count == 2: method_call = 'Encode{}Array2D'.format(function_name) make_array_2d = ', '.join(self.make_array2d_length_expression(value, caller_values)) return 'encoder->{}({}{}, {});'.format( method_call, write_parameter_value, value.name, make_array_2d ) else: - return 'encoder->Encode{}Array({}{}, {}{}{});'.format( + return 'encoder->Encode{}Array({}{}, {}{});'.format( function_name, write_parameter_value, value.name, - write_parameter_value, value.array_length, omit_output_data + self.get_encode_str_array_length( + value.array_length, write_parameter_value + ), omit_output_data ) elif value.pointer_count == 1: @@ -219,7 +242,7 @@ def get_encode_parameter(self, value, caller_values, is_generating_struct, is_re if is_result and self.is_output(value): omit_output_data = ', omit_output_data' - if self.is_struct(value.base_type): + if self.is_struct(value.base_type) or self.is_union(value.base_type): rtn = self.get_encode_struct( value, is_generating_struct, is_result ) @@ -227,10 +250,17 @@ def get_encode_parameter(self, value, caller_values, is_generating_struct, is_re elif self.is_class(value): if value.array_length and type(value.array_length) == str: if is_generating_struct: - pass + rtn = 'encoder->EncodeObjectArray(value.{}, {}{});'.format( + value.name, + self.get_encode_str_array_length( + value.array_length, 'value.' + ), omit_output_data + ) else: rtn = 'encoder->EncodeObjectArray({}, {}{});'.format( - value.name, value.array_length, omit_output_data + value.name, + self.get_encode_str_array_length(value.array_length), + omit_output_data ) else: if is_generating_struct: @@ -257,6 +287,9 @@ def get_encode_parameter(self, value, caller_values, is_generating_struct, is_re encode_type = self.convert_function(value.base_type) if encode_type == 'String' or encode_type == 'WString': + if value.array_length and value.pointer_count == 1: + # Array length represents a string length parameter, set array_length to 0 so this value is not identified as a string array. + value.array_length = 0 value.pointer_count = 0 function_value = 0 value.array_capacity = 0 @@ -344,6 +377,7 @@ def get_encode_function_body(self, class_name, method_info, is_result): end_call_type = '' end_call_args = '' class_method_name = method_info['name'] + rtn_type = method_info['rtnType'] if class_name: api_or_method = 'Method' @@ -363,9 +397,11 @@ def get_encode_function_body(self, class_name, method_info, is_result): elif is_create_call: begin_call_type = 'Tracked' end_call_type = 'Create' - end_call_args = 'return_value, {}, {}'.format( + end_call_args = '{}, {}'.format( create_object_tuple[0], create_object_tuple[1] ) + if rtn_type.find('void ') == -1: + end_call_args = 'return_value, ' + end_call_args if class_name: # Check that the calling class is a wrapper type that contains object info. Some wrapper types (e.g., IDXGIObject_Wrapper) # do not contain object infos because they are base class interfaces for final types. Cast to IUnknown_Wrapper for types @@ -423,7 +459,6 @@ def get_encode_function_body(self, class_name, method_info, is_result): encode = self.get_encode_parameter(value, param_values, False, is_result) body += ' {}\n'.format(encode) - rtn_type = method_info['rtnType'] if rtn_type.find('void ') == -1 or rtn_type.find('void *') != -1: value = self.get_return_value_info(rtn_type, class_method_name) encode = self.get_encode_parameter(value, [], False, is_result) diff --git a/framework/generated/dx12_generators/dx12_base_generator.py b/framework/generated/dx12_generators/dx12_base_generator.py index 6d12ed2e8d..dc60978b43 100644 --- a/framework/generated/dx12_generators/dx12_base_generator.py +++ b/framework/generated/dx12_generators/dx12_base_generator.py @@ -2,6 +2,7 @@ # # Copyright (c) 2021 LunarG, Inc. # Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -77,7 +78,7 @@ class Dx12BaseGenerator(BaseGenerator): CONVERT_FUNCTION_LIST = [ [['BYTE', 'byte', 'UINT8', 'unsigned char'], 'UInt8'], [['INT8'], 'Int8'], - [['UINT16', 'unsigned short'], 'UInt16'], + [['USHORT','UINT16', 'unsigned short'], 'UInt16'], [['SHORT'], 'Int16'], [ [ @@ -86,7 +87,7 @@ class Dx12BaseGenerator(BaseGenerator): ], 'UInt32' ], [['HRESULT', 'LONG', 'BOOL', 'INT', 'int'], 'Int32'], - [['UINT64', 'D3D12_GPU_VIRTUAL_ADDRESS'], 'UInt64'], + [['ULONGLONG', 'UINT64', 'D3D12_GPU_VIRTUAL_ADDRESS'], 'UInt64'], [['LONG_PTR', 'SIZE_T'], 'SizeT'], [['FLOAT', 'float'], 'Float'], [['void'], 'Void'], @@ -104,6 +105,12 @@ class Dx12BaseGenerator(BaseGenerator): 'InstanceContributionToHitGroupIndex', ':24' ], ['D3D12_RAYTRACING_INSTANCE_DESC', 'Flags', ':8'], + ['D3D11_VIDEO_PROCESSOR_COLOR_SPACE', 'Usage', ':1'], + ['D3D11_VIDEO_PROCESSOR_COLOR_SPACE', 'RGB_Range', ':1'], + ['D3D11_VIDEO_PROCESSOR_COLOR_SPACE', 'YCbCr_Matrix', ':1'], + ['D3D11_VIDEO_PROCESSOR_COLOR_SPACE', 'YCbCr_xvYCC', ':1'], + ['D3D11_VIDEO_PROCESSOR_COLOR_SPACE', 'Nominal_Range', ':2'], + ['D3D11_VIDEO_PROCESSOR_COLOR_SPACE', 'Reserved', ':26'], ] # Dictionary for structs with members that contain objects that must be @@ -202,7 +209,11 @@ def clean_type_define(self, type): ): if rtn: rtn += ' ' - rtn += t + + if t == 'CONST': + rtn += 'const' + else: + rtn += t return rtn def get_return_value_info(self, param_type, function_name): @@ -440,10 +451,13 @@ def get_filtered_struct_names(self): if self.check_blacklist: return [ key for key in self.source_dict['struct_dict'] - if not self.is_struct_black_listed(key) + if not self.is_struct_black_listed(key) and not '::GetPointer(), GetObjectInfoTable());\n' - .format(value.name) - ) + if is_output: + if value.base_type in self.structs_with_objects: + struct_add_object_list.append( + 'AddStructObjects({0}, {0}->GetPointer(), GetObjectInfoTable());\n' + .format(value.name) + ) + elif is_variable_length_array: + # This is an optional output array with an array size parameter that is + # also a pointer. This array parameter may adhere to a pattern that, when + # it is null, the API call will return the expected input array size in + # the value pointed to by the array size parameter. In this case, we can + # store the value returned here and use it to allocate an array of this + # stored size on the next call when the array pointer is not null. + if is_object: + post_call_expr_list.append( + self.make_variable_length_array_post_expr( + name, value + ) + ) + else: + print( + "ERROR: Variable length output array size tracking is not implemented for function calls." + ) if is_class: if is_output: - handle_length = 1 - code += ' if(!{0}->IsNull()) {0}->SetHandleLength({1});\n'\ - .format(value.name, handle_length) - if is_override: - code += ' DxObjectInfo object_info_{0}{{}};\n'\ - ' {0}->SetConsumerData(0, &object_info_{0});\n'\ - .format(value.name) + handles = 1 + if is_variable_length_array: + handles = value.array_length.replace( + ' ', '' + ) + '->GetOutputPointer()' + array_length = value.array_length.replace('* ', '') + # Ensure that the array's output data initialization expression is written to the + # file after the size parameter is initialized, storing the expression string now + # and appending it to the code string immediately before generating the API call, + # after all other parameters have been processed. + set_length_expr = ' if(!{}->IsNull() && !{}->IsNull())\n {{\n {}->SetHandleLength({});\n'.format( + value.name, array_length, value.name, handles + ) + + if is_override: + set_length_expr += ' for (size_t i = 0; i < {1}; ++i) {{ {0}->SetConsumerData(i, &object_info_{0}[i]); }}\n'.format( + value.name, handles + ) + set_length_expr += ' }\n' + else: + set_length_expr += ' }\n' + set_length_expr += ' auto out_p_{0} = {0}->GetPointer();\n'\ + ' auto out_hp_{0} = {0}->GetHandlePointer();\n'.format(value.name) + + # Add a null check to the expression stored in handles for its use here and in the + # AddObjects expression generated below. + handles = '!{}->IsNull() ? {} : 0'.format(array_length, handles) + if is_override: + set_length_expr = ' std::vector object_info_{}({});\n'.format( + value.name, handles + ) + set_length_expr + pre_call_expr_list.append(set_length_expr) else: - code += ' auto out_p_{0} = {0}->GetPointer();\n'\ - ' auto out_hp_{0} = {0}->GetHandlePointer();\n'\ - .format(value.name) + if value.array_length: + if isinstance(value.array_length, str + ) and value.array_length[0] == '*': + handles = value.array_length + '->GetPointer()' + else: + handles = value.array_length + if is_override: + if value.array_length: + code += ' std::vector object_info_{}({});\n'.format( + value.name, handles + ) + else: + code += ' DxObjectInfo object_info_{}{{}};\n'.format( + value.name + ) + code += ' if(!{0}->IsNull())\n {{\n {0}->SetHandleLength({1});\n'\ + .format(value.name, handles) + if value.array_length: + code += ' for (size_t i = 0; i < {1}; ++i) {{ {0}->SetConsumerData(i, &object_info_{0}[i]); }}\n'.format( + value.name, handles + ) + else: + code += ' {0}->SetConsumerData(0, &object_info_{0});\n'\ + .format(value.name) + code += ' }\n' + else: + code += ' if(!{0}->IsNull()) {0}->SetHandleLength({1});\n'\ + .format(value.name, handles) + code += ' auto out_p_{0} = {0}->GetPointer();\n'\ + ' auto out_hp_{0} = {0}->GetHandlePointer();\n'\ + .format(value.name) if is_override: arg_list.append(value.name) + if value.array_length: + add_object_list.append( + 'AddObjects({0}->GetPointer(), {0}->GetLength(), {0}->GetHandlePointer(), {1}'\ + 'std::move(object_info_{0}), format::ApiCall_{2});\n'\ + .format(value.name, handles, name) + ) + else: + add_object_list.append( + 'AddObject({0}->GetPointer(), {0}->GetHandlePointer(), '\ + 'std::move(object_info_{0}), format::ApiCall_{1});\n'\ + .format(value.name, name) + ) else: arg_list.append('out_hp_{}'.format(value.name)) + if value.array_length: + add_object_list.append( + 'AddObjects(out_p_{0}, {0}->GetLength(), out_hp_{0}, {1}, format::ApiCall_{2});\n' + .format(value.name, handles, name) + ) + else: + add_object_list.append( + 'AddObject(out_p_{0}, out_hp_{0}, format::ApiCall_{1});\n'.format( + value.name, name + ) + ) - if is_override: - add_object_list.append( - 'AddObject({0}->GetPointer(), {0}->GetHandlePointer(), std::move(object_info_{0}), format::ApiCall_{1});\n'.format(value.name, name) - ) - else: - add_object_list.append( - 'AddObject(out_p_{0}, out_hp_{0}, format::ApiCall_{1});\n'.format(value.name, name) - ) set_resource_dimension_layout_list.append( 'SetResourceDesc({0}, pDesc);\n'.format( value.name @@ -303,10 +418,16 @@ def make_consumer_func_body(self, return_type, name, values): .format(value.name) arg_list.append('out_op_{}'.format(value.name)) - post_extenal_object_list.append( - 'PostProcessExternalObject(replay_result, out_op_{0}, out_p_{0}, format::ApiCallId::ApiCall_{1}, "{1}");\n' - .format(value.name, name) - ) + if return_type != 'void': + post_extenal_object_list.append( + 'PostProcessExternalObject(replay_result, out_op_{0}, out_p_{0}, format::ApiCallId::ApiCall_{1}, "{1}");\n' + .format(value.name, name) + ) + else: + post_extenal_object_list.append( + 'PostProcessExternalObject(S_OK, out_op_{0}, out_p_{0}, format::ApiCallId::ApiCall_{1}, "{1}");\n' + .format(value.name, name) + ) else: if is_override: @@ -347,7 +468,48 @@ def make_consumer_func_body(self, return_type, name, values): ) arg_list.append('*{}.decoded_value'.format(value.name)) else: - if not is_output: + if is_output: + if is_variable_length_array: + length = value.array_length.replace('* ', '') + # Ensure that the array's output data initialization expression is written to the + # file after the size parameter is initialized, storing the expression string now + # and appending it to the code string immediately before generating the API call, + # after all other parameters have been processed. + pre_call_expr_list.append( + ' if(!{}->IsNull() && !{}->IsNull())\n {{\n {}->AllocateOutputData({}->GetOutputPointer());\n }}\n' + .format( + value.name, length, value.name, + value.array_length.replace(' ', '') + ) + ) + elif value.name in variable_array_lengths: + code += ' if(!{}->IsNull())\n {{\n {}->AllocateOutputData(1, {});\n }}\n'.format( + value.name, value.name, + self.make_variable_length_array_get_count_call( + return_type, name, + **variable_array_lengths[value.name] + ) + ) + else: + length = '1' + # The _result_bytebuffer_ annotation indicates that the parameter is a pointer to a + # pointer to a buffer allocated by the runtime/driver. For this case, only the single + # pointer to the output buffer needs to be allocated. + if value.array_length and ( + not '_result_bytebuffer_' in value.full_type + ): + if isinstance(value.array_length, str + ) and value.array_length[0] == '*': + length = '!{}->IsNull() ? {}->GetPointer() : 0'.format( + value.array_length.replace('* ', ''), + value.array_length.replace(' ', '') + ) + else: + length = value.array_length + code += ' if(!{}->IsNull())\n {{\n {}->AllocateOutputData({});\n }}\n'.format( + value.name, value.name, length + ) + else: map_func = self.MAP_STRUCT_TYPE.get(value.base_type) if map_func: if value.is_array: @@ -380,15 +542,22 @@ def make_consumer_func_body(self, return_type, name, values): elif value.pointer_count > 0 or value.is_array: if is_struct and value.pointer_count == 2 and value.is_const: - code += ' auto in_{0} = {0}->GetPointer();\n'\ - .format(value.name) + if is_output: + code += ' auto in_{0} = {0}->GetOutputPointer();\n'\ + .format(value.name) + else: + code += ' auto in_{0} = {0}->GetPointer();\n'\ + .format(value.name) arg_list.append( 'const_cast(&in_{})'.format( value.base_type, value.name ) ) else: - arg_list.append(value.name + '->GetPointer()') + if is_output: + arg_list.append(value.name + '->GetOutputPointer()') + else: + arg_list.append(value.name + '->GetPointer()') else: if is_struct: @@ -409,6 +578,9 @@ def make_consumer_func_body(self, return_type, name, values): else: arg_list.append(value.name) + for e in pre_call_expr_list: + code += e + indent_length = len(code) code += ' ' if return_type != 'void': @@ -485,18 +657,25 @@ def make_consumer_func_body(self, return_type, name, values): " }\n" ) - if return_type == 'HRESULT': - if len(add_object_list) or len(struct_add_object_list): - code += (" if (SUCCEEDED(replay_result))\n" " {\n") - for e in add_object_list: - code += ' {}'.format(e) - for e in struct_add_object_list: + for e in post_call_expr_list: + code += ' {}'.format(e) + + if len(add_object_list) or len(struct_add_object_list): + scope_indent = ' ' + if return_type == 'HRESULT': + code += " if (SUCCEEDED(replay_result))\n {\n" + scope_indent += ' ' + for e in add_object_list: + code += scope_indent + '{}'.format(e) + for e in struct_add_object_list: + code += scope_indent + '{}'.format(e) + if is_resource_creation_methods: + for e in set_resource_dimension_layout_list: code += ' {}'.format(e) - if is_resource_creation_methods: - for e in set_resource_dimension_layout_list: - code += ' {}'.format(e) + if return_type == 'HRESULT': code += " }\n" + if return_type == 'HRESULT': code += ( ' CheckReplayResult("{}", return_value, replay_result);\n'. format(name) @@ -521,6 +700,55 @@ def make_consumer_func_body(self, return_type, name, values): code += ' {}'.format(e) return code + def find_value(self, name, values): + for value in values: + if value.name == name: + return value + + def is_variable_length_array(self, name, value): + return value.is_array and value.array_length and isinstance( + value.array_length, str + ) and value.array_length.startswith('*') and ( + ('_opt_' in value.full_type) or ( + (name in self.EXTRA_VARIABLE_LENGTH_ARRAYS) and + (value.name in self.EXTRA_VARIABLE_LENGTH_ARRAYS[name]) + ) + ) + + def get_variable_length_array_index_id(self, name): + class_name = name[:name.find('_')][1:].replace('DXGI', 'Dxgi') + method_name = name[name.find('_') + 1:] + index_id = 'VariableLengthArrayIndices::k{}Array{}'.format( + class_name, method_name + ) + return index_id + + def make_variable_length_array_post_expr(self, name, value): + """Generate expressions to store the result of the count query for an array containing a variable number of values.""" + index_id = self.get_variable_length_array_index_id(name) + + length_name = value.array_length + base_length_name = length_name.replace('* ', '') + return 'if ({}->IsNull() && !{}->IsNull()) {{ SetOutputArrayCount(object_id, {}, {}->GetOutputPointer()); }}\n'.format( + value.name, base_length_name, index_id, + length_name.replace(' ', '') + ) + + def make_variable_length_array_get_count_call( + self, return_type, name, array_value, length_value + ): + """Generate expression to call a function that retrieves the count of an array containing a variable number of values.""" + return_value = 'S_OK' + if (return_type == 'HRESULT'): + return_value = 'return_value' + + index_id = self.get_variable_length_array_index_id(name) + + return 'GetOutputArrayCount("{}", {}, object_id, {}, {}, {})'.format( + name.replace('_', '::'), return_value, index_id, length_value.name, + array_value.name + ) + def __load_replay_overrides(self, filename): overrides = json.loads(open(filename, 'r').read()) self.REPLAY_OVERRIDES = overrides diff --git a/framework/generated/dx12_generators/dx12_struct_decoders_forward_generator.py b/framework/generated/dx12_generators/dx12_struct_decoders_forward_generator.py index f390ff2eb3..5dacdfff85 100644 --- a/framework/generated/dx12_generators/dx12_struct_decoders_forward_generator.py +++ b/framework/generated/dx12_generators/dx12_struct_decoders_forward_generator.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # # Copyright (c) 2021 LunarG, Inc. +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -59,7 +60,8 @@ def generate_feature(self): code = '' struct_dict = self.source_dict['struct_dict'] for name in struct_dict: - code += 'struct Decoded_{};\n'.format(name) + if not '.-.bin self.binary_blobs = { - ('D3D12_SHADER_BYTECODE', 'pShaderBytecode') + ('D3D12_SHADER_BYTECODE', 'pShaderBytecode'), + ('D3D11_SUBRESOURCE_DATA', 'pSysMem') } def beginFile(self, gen_opts): @@ -138,7 +140,7 @@ def beginFile(self, gen_opts): def generate_feature(self): struct_dict = self.source_dict['struct_dict'] for k, v in struct_dict.items(): - if not self.is_struct_black_listed(k): + if not self.is_struct_black_listed(k) and (not 'decoded_value) + { + const auto& decoded_value = *data->decoded_value; + const auto& meta_struct = *data; + // This is a bitfield defined as an anonymous struct within a union. + FieldToJson(jdata["ProtectionEnabled"], decoded_value.Flags.ProtectionEnabled, options); + FieldToJson(jdata["OverlayOrFullscreenRequired"], decoded_value.Flags.OverlayOrFullscreenRequired, options); + FieldToJson(jdata["Reserved"], decoded_value.Flags.Reserved, options); + } + } + /** @} */ ''') + '\n' write(custom_impls, file=self.outFile) diff --git a/framework/generated/dx12_generators/dx12_struct_decoders_to_json_header_generator.py b/framework/generated/dx12_generators/dx12_struct_decoders_to_json_header_generator.py index 0114ae51cd..5f4868f929 100644 --- a/framework/generated/dx12_generators/dx12_struct_decoders_to_json_header_generator.py +++ b/framework/generated/dx12_generators/dx12_struct_decoders_to_json_header_generator.py @@ -2,6 +2,7 @@ # # Copyright (c) 2023 Valve Corporation # Copyright (c) 2021-2023 LunarG, Inc. +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -73,7 +74,7 @@ def generate_feature(self): // Reference versions of above which simply pipe through to the pointer versions. ''')) for k, v in struct_dict.items(): - if not self.is_struct_black_listed(k): + if (not self.is_struct_black_listed(k)) and (not ' Named union type with two structs and a uint64_t inside. void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_LARGE_INTEGER* pObj, const util::JsonOptions& options); inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_LARGE_INTEGER& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } + void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_PROTECTION_FLAGS* data, const util::JsonOptions& options); ''' custom_to_fields = format_cpp_code(custom_to_fields) write(custom_to_fields, file=self.outFile) diff --git a/framework/generated/dx12_generators/dx12_struct_object_mappers_body_generator.py b/framework/generated/dx12_generators/dx12_struct_object_mappers_body_generator.py index 2d6aaefe0f..ddc050e4ee 100644 --- a/framework/generated/dx12_generators/dx12_struct_object_mappers_body_generator.py +++ b/framework/generated/dx12_generators/dx12_struct_object_mappers_body_generator.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # # Copyright (c) 2021 LunarG, Inc. +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -130,24 +131,30 @@ def generate_feature(self): def write_struct_member_def(self): for k, v in self.structs_with_objects.items(): - expr = 'void AddStructObjects(const StructPointerDecoder* capture_value, const {0}* new_value, Dx12ObjectInfoTable& object_info_table)\n'.format( - k - ) - expr += '{\n' - expr += ' auto decoded_struct = capture_value->GetMetaStructPointer();\n' - + # Ignore structs with arrays of objects when generating the AddStructObjects function. There are currently no structs containing arrays of + # objects that are used as output parameters, retrieving objects that need to be added to the object map. + value_expr = '' for value in v: if self.is_struct(value.base_type): - expr += ' if(decoded_struct->{0} && new_value->{0})\n'\ + value_expr += ' if(decoded_struct->{0} && new_value->{0})\n'\ ' {{\n'\ ' AddStructObjects(decoded_struct->{0}, new_value->{0}, object_info_table);\n'\ ' }}\n'.format(value.name) - elif self.is_class(value): - expr += ' if(decoded_struct->{0} && new_value->{0})\n'\ + elif self.is_class(value) and (not value.is_array): + value_expr += ' if(decoded_struct->{0} && new_value->{0})\n'\ ' {{\n'\ ' object_mapping::AddObject(&decoded_struct->{0}, const_cast<{1}**>(&new_value->{0}), &object_info_table);\n'\ ' }}\n'.format(value.name, value.base_type) - expr += '}\n' - write(expr, file=self.outFile) + if value_expr: + expr = 'void AddStructObjects(const StructPointerDecoder* capture_value, const {0}* new_value, Dx12ObjectInfoTable& object_info_table)\n'.format( + k + ) + expr += '{\n' + expr += ' auto decoded_struct = capture_value->GetMetaStructPointer();\n' + + expr += value_expr + + expr += '}\n' + write(expr, file=self.outFile) diff --git a/framework/generated/dx12_generators/dx12_struct_unwrappers_body_generator.py b/framework/generated/dx12_generators/dx12_struct_unwrappers_body_generator.py index 0e7f3a4653..5187cea79e 100644 --- a/framework/generated/dx12_generators/dx12_struct_unwrappers_body_generator.py +++ b/framework/generated/dx12_generators/dx12_struct_unwrappers_body_generator.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # # Copyright (c) 2021 LunarG, Inc. +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -67,11 +68,7 @@ def endFile(self): # Find structs with COM object members, which will need to be # unwrapped. - struct_dict = self.source_dict['struct_dict'] - for struct in struct_dict: - self.check_struct_member_handles( - struct, structs_with_objects, None, True - ) + self.check_all_struct_member_handles(structs_with_objects, None, True) # Generate unwrap functions for any structs that were added to # the table. diff --git a/framework/generated/dx12_generators/dx12_struct_unwrappers_header_generator.py b/framework/generated/dx12_generators/dx12_struct_unwrappers_header_generator.py index e85dd276c9..2cd206b240 100644 --- a/framework/generated/dx12_generators/dx12_struct_unwrappers_header_generator.py +++ b/framework/generated/dx12_generators/dx12_struct_unwrappers_header_generator.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # # Copyright (c) 2021 LunarG, Inc. +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -66,11 +67,7 @@ def endFile(self): # Find structs with COM object members, which will need to be # unwrapped. - struct_dict = self.source_dict['struct_dict'] - for struct in struct_dict: - self.check_struct_member_handles( - struct, structs_with_objects, None, True - ) + self.check_all_struct_member_handles(structs_with_objects, None, True) # Generate unwrap functions for any structs that were added to # the list. diff --git a/framework/generated/dx12_generators/dx12_wrapper_body_generator.py b/framework/generated/dx12_generators/dx12_wrapper_body_generator.py index aa3c880b5a..072671c270 100644 --- a/framework/generated/dx12_generators/dx12_wrapper_body_generator.py +++ b/framework/generated/dx12_generators/dx12_wrapper_body_generator.py @@ -2,6 +2,7 @@ # # Copyright (c) 2021 LunarG, Inc. # Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -124,11 +125,9 @@ def generate_feature(self): # Find structs with COM object members, which will need to be # unwrapped. - struct_dict = self.source_dict['struct_dict'] - for s in struct_dict: - self.check_struct_member_handles( - s, self.structs_with_objects, None, True - ) + self.check_all_struct_member_handles( + self.structs_with_objects, None, True + ) header_dict = self.source_dict['header_dict'] self.structs_with_wrap_objects = self.collect_struct_with_objects( @@ -316,8 +315,13 @@ def gen_wrap_object(self, return_type, param_info, indent): tuple[0], tuple[1] ) else: + array_length = tuple[2] + if array_length.startswith('* '): + array_length = '({} != nullptr) ? {} : 0'.format( + array_length[2:], array_length.replace(' ', '') + ) expr += indent + 'WrapObjectArray({}, {}, {}, nullptr);\n'.format( - tuple[0], tuple[1], tuple[2] + tuple[0], tuple[1], array_length ) for value in params_wrap_struct: @@ -452,10 +456,14 @@ def gen_method_post_call( def write_function_def(self, function, indent=''): return_type = function['rtnType'].replace(' *', '*') name = function['name'] - table = 'manager->GetD3D12DispatchTable()' if 'D3D12' in name\ - else 'manager->GetDxgiDispatchTable()' parameters = function['parameters'] + table = 'manager->GetDxgiDispatchTable()' + if 'D3D12' in name: + table = 'manager->GetD3D12DispatchTable()' + elif 'D3D11' in name: + table = 'manager->GetD3D11DispatchTable()' + expr = indent + '{} {}('.format(return_type, name) if parameters: expr += '\n' diff --git a/framework/generated/dx12_generators/dx12_wrapper_creators_header_generator.py b/framework/generated/dx12_generators/dx12_wrapper_creators_header_generator.py index 1831da2aac..bfe91056ee 100644 --- a/framework/generated/dx12_generators/dx12_wrapper_creators_header_generator.py +++ b/framework/generated/dx12_generators/dx12_wrapper_creators_header_generator.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # # Copyright (c) 2021 LunarG, Inc. +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -31,6 +32,9 @@ class Dx12WrapperCreatorsHeaderGenerator(Dx12BaseGenerator): # Default C++ code indentation size. INDENT_SIZE = 4 + # Bases classes that can be retrieved thorugh an API call, which need to be wrapped. + CUSTOM_WRAPPER_OBJECTS = ['ID3D11Resource'] + def __init__( self, source_dict, @@ -91,6 +95,10 @@ def endFile(self): ) code += ' },' write(code, file=self.outFile) + for name in self.CUSTOM_WRAPPER_OBJECTS: + code = indent + code += '{ IID_' + name + ', Wrap' + name + ' },' + write(code, file=self.outFile) indent = self.decrement_indent(indent) write('};', file=self.outFile) self.newline() @@ -195,6 +203,7 @@ def generate_all(self): def write_include(self): code = '' + code += '#include "encode/custom_dx12_wrapper_creators.h"\n' code += '#include "encode/dx12_object_wrapper_resources.h"\n' code += '#include "util/defines.h"\n' code += '#include \n' diff --git a/framework/generated/dx12_generators/json_blocklists.json b/framework/generated/dx12_generators/json_blocklists.json index 0fec2d440f..1bc486216a 100644 --- a/framework/generated/dx12_generators/json_blocklists.json +++ b/framework/generated/dx12_generators/json_blocklists.json @@ -13,6 +13,18 @@ "ID3D12Resource": [ "Comment: WriteToSubresource is needed because codegen gives pSrcData as the wrong type and because thhe manual signature in the base class defining it doesn't match what correct codegen would produce.", "WriteToSubresource" + ], + "ID3D11Device": [ + "CheckFeatureSupport" + ], + "ID3D11Device3": [ + "WriteToSubresource" + ], + "ID3D11DeviceContext": [ + "UpdateSubresource" + ], + "ID3D11DeviceContext1": [ + "UpdateSubresource1" ] }, "todo2": "Remove the ones below which can be handled with anon union support.", diff --git a/framework/generated/dx12_generators/json_headers_blocklists.json b/framework/generated/dx12_generators/json_headers_blocklists.json index 03e635979c..b078e171e7 100644 --- a/framework/generated/dx12_generators/json_headers_blocklists.json +++ b/framework/generated/dx12_generators/json_headers_blocklists.json @@ -13,7 +13,19 @@ "ID3D12Resource": [ "Comment: WriteToSubresource is needed because codegen gives pSrcData as the wrong type and because the manual signature in the base class defining it doesn't match what correct codegen would produce.", "WriteToSubresource" - ] + ], + "ID3D11Device": [ + "CheckFeatureSupport" + ], + "ID3D11Device3": [ + "WriteToSubresource" + ], + "ID3D11DeviceContext": [ + "UpdateSubresource" + ], + "ID3D11DeviceContext1": [ + "UpdateSubresource1" + ] }, "structures-comment": "We don't want to disable any structs from header generation. Even if we make custom bodies, the function protoypes in the headers will be the same so there's no need to type them all out.", "structures": [ diff --git a/framework/generated/dx12_generators/platform_types.json b/framework/generated/dx12_generators/platform_types.json index e0ec2ba99e..73606d8786 100644 --- a/framework/generated/dx12_generators/platform_types.json +++ b/framework/generated/dx12_generators/platform_types.json @@ -3,13 +3,15 @@ "HANDLE" : { "baseType" : "void", "replaceWith" : "void*" }, "HINSTANCE" : { "baseType" : "void", "replaceWith" : "void*" }, "HWND" : { "baseType" : "void", "replaceWith" : "void*" }, - "HMONITOR" : { "baseType" : "void", "replaceWith" : "void*" }, - "HDC" : { "baseType" : "void", "replaceWith" : "void*" }, - "HMODULE" : { "baseType" : "void", "replaceWith" : "void*" }, + "HMONITOR" : { "baseType" : "void", "replaceWith" : "void*" }, + "HDC" : { "baseType" : "void", "replaceWith" : "void*" }, + "HMODULE" : { "baseType" : "void", "replaceWith" : "void*" }, "LPCWSTR" : { "baseType" : "wchar_t", "replaceWith" : "const wchar_t*" }, "D3D12_RECT": { "baseType" : "tagRECT", "replaceWith" : "tagRECT" }, + "D3D11_RECT": { "baseType" : "tagRECT", "replaceWith" : "tagRECT" }, "RECT" : { "baseType" : "tagRECT", "replaceWith" : "tagRECT" }, "POINT" : { "baseType" : "tagPOINT", "replaceWith" : "tagPOINT" }, + "SIZE" : { "baseType" : "tagSIZE", "replaceWith" : "tagSIZE" }, "REFIID" : { "baseType" : "GUID", "replaceWith" : "GUID" }, "REFGUID" : { "baseType" : "GUID", "replaceWith" : "GUID" }, "REFCLSID" : { "baseType" : "GUID", "replaceWith" : "GUID" }, @@ -18,10 +20,14 @@ "ID3DBlob" : { "baseType" : "ID3D10Blob", "replaceWith" : "ID3D10Blob" }, "SECURITY_ATTRIBUTES" : { "baseType" : "_SECURITY_ATTRIBUTES", "replaceWith" : "_SECURITY_ATTRIBUTES" }, "D3D12_PRIMITIVE_TOPOLOGY": { "baseType" : "D3D_PRIMITIVE_TOPOLOGY", "replaceWith" : "D3D_PRIMITIVE_TOPOLOGY" }, + "D3D11_PRIMITIVE_TOPOLOGY": { "baseType" : "D3D_PRIMITIVE_TOPOLOGY", "replaceWith" : "D3D_PRIMITIVE_TOPOLOGY" }, + "D3D11_SRV_DIMENSION" : { "baseType" : "D3D_SRV_DIMENSION", "replaceWith" : "D3D_SRV_DIMENSION" }, "LPCVOID" : { "baseType" : "void", "replaceWith" : "const void*" }, "LPVOID" : { "baseType" : "void", "replaceWith" : "void*" }, "WCHAR" : { "baseType" : "wchar_t", "replaceWith" : "wchar_t" }, - "LPCSTR" : { "baseType" : "char", "replaceWith" : "const char*" } + "LPCSTR" : { "baseType" : "char", "replaceWith" : "const char*" }, + "LPSTR" : { "baseType" : "char", "replaceWith" : "char*" }, + "APP_DEPRECATED_HRESULT":{ "baseType" : "HRESULT", "replaceWith" : "HRESULT" } }, "structs" : [ ] diff --git a/framework/generated/dx12_generators/replay_overrides.json b/framework/generated/dx12_generators/replay_overrides.json index 23c9b2c799..5c2ec08f39 100644 --- a/framework/generated/dx12_generators/replay_overrides.json +++ b/framework/generated/dx12_generators/replay_overrides.json @@ -1,7 +1,9 @@ { "functions": { "CreateDXGIFactory2": "OverrideCreateDXGIFactory2", - "D3D12CreateDevice": "OverrideD3D12CreateDevice" + "D3D12CreateDevice": "OverrideD3D12CreateDevice", + "D3D11CreateDevice": "OverrideD3D11CreateDevice", + "D3D11CreateDeviceAndSwapChain": "OverrideD3D11CreateDeviceAndSwapChain" }, "classmethods": { "IUnknown": { @@ -114,6 +116,24 @@ "SetPipelineState1": "OverrideSetPipelineState1", "BeginRenderPass": "OverrideBeginRenderPass" }, + "ID3D11DeviceContext": { + "GetData": "OverrideDeviceContextGetData", + "Map": "OverrideDeviceContextMap", + "Unmap": "OverrideDeviceContextUnmap" + }, + "ID3D11Device": { + "CreateDeferredContext": "OverrideCreateDeferredContext" + }, + "ID3D11Device1": { + "CreateDeferredContext1": "OverrideCreateDeferredContext1" + }, + "ID3D11Device2": { + "CreateDeferredContext2": "OverrideCreateDeferredContext2" + }, + "ID3D11Device3": { + "CreateDeferredContext3": "OverrideCreateDeferredContext3", + "ReadFromSubresource": "OverrideDevice3ReadFromSubresource" + }, "IDXGIFactory": { "CreateSwapChain": "OverrideCreateSwapChain" }, diff --git a/framework/generated/generate_dx12.py b/framework/generated/generate_dx12.py index dd33791055..ac8800b3a5 100644 --- a/framework/generated/generate_dx12.py +++ b/framework/generated/generate_dx12.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 # # Copyright (c) 2021-2023 LunarG, Inc. +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to @@ -85,11 +86,20 @@ 'd3d12sdklayers.h', ] +DX11_SOURCE_LIST = [ + 'um\\d3d11.h', + 'um\\d3d11_1.h', + 'um\\d3d11_2.h', + 'um\\d3d11_3.h', + 'um\\d3d11_4.h', + 'um\\d3d11on12.h' +] + # The second value is required data. It only generates required data. WINAPI_SOURCE_LIST = [ ['um\\Unknwnbase.h', ['IUnknown']], ['shared\\guiddef.h', ['GUID']], - ['shared\\windef.h', ['tagRECT', 'tagPOINT']], + ['shared\\windef.h', ['tagRECT', 'tagPOINT', 'tagSIZE']], ['um\\minwinbase.h', ['_SECURITY_ATTRIBUTES']], ] @@ -134,20 +144,38 @@ from gencode import GenCode from dx12_generators.dx12_CppHeaderParser import Dx12CppHeader, Dx12CppClass + # CppHeaderParser objects generate a unique name for anonymous unions using a counter that starts from 0. To ensure + # that union names are globally unique, we need each Dx12CppHeader object to initialize its internal counter with a + # cumulative count. + anon_union_counter = 0 + header_dict = {} for source in DXGI_SOURCE_LIST: source_file = os.path.join( WINDOWS_SDK_DIR + 'Include\\' + WINDOWS_SDK_VERSION, source ) print('Parsing', source_file) + header = Dx12CppHeader(source_file, anon_union_counter) + anon_union_counter = header.anon_union_count header_dict[source[source.find('\\') + 1:] - ] = Dx12CppHeader(source_file) + ] = header for source in DX12_SOURCE_LIST: source_file = os.path.join(SCRIPT_DIR, '..', '..', 'external', 'AgilitySDK', 'inc', source) print('Parsing', source_file) - header_dict[source[source.find('\\') + 1:]] = Dx12CppHeader(source_file) + header = Dx12CppHeader(source_file, anon_union_counter) + anon_union_counter = header.anon_union_count + header_dict[source[source.find('\\') + 1:]] = header + + for source in DX11_SOURCE_LIST: + source_file = os.path.join( + WINDOWS_SDK_DIR + 'Include\\' + WINDOWS_SDK_VERSION, source + ) + print('Parsing', source_file) + header = Dx12CppHeader(source_file, anon_union_counter) + anon_union_counter = header.anon_union_count + header_dict[source[source.find('\\') + 1:]] = header for source in WINAPI_SOURCE_LIST: source_file = os.path.join( diff --git a/framework/generated/generated_dx12_add_entries.h b/framework/generated/generated_dx12_add_entries.h index 94a0df0277..da9b160571 100644 --- a/framework/generated/generated_dx12_add_entries.h +++ b/framework/generated/generated_dx12_add_entries.h @@ -202,6 +202,74 @@ const std::unordered_map }, { IID_ID3D12InfoQueue, AddEntry }, { IID_ID3D12InfoQueue1, AddEntry }, + { IID_ID3D11DepthStencilState, AddEntry }, + { IID_ID3D11Buffer, AddEntry }, + { IID_ID3D11Texture1D, AddEntry }, + { IID_ID3D11DepthStencilView, AddEntry }, + { IID_ID3D11VertexShader, AddEntry }, + { IID_ID3D11HullShader, AddEntry }, + { IID_ID3D11DomainShader, AddEntry }, + { IID_ID3D11GeometryShader, AddEntry }, + { IID_ID3D11PixelShader, AddEntry }, + { IID_ID3D11ComputeShader, AddEntry }, + { IID_ID3D11InputLayout, AddEntry }, + { IID_ID3D11SamplerState, AddEntry }, + { IID_ID3D11Predicate, AddEntry }, + { IID_ID3D11Counter, AddEntry }, + { IID_ID3D11ClassInstance, AddEntry }, + { IID_ID3D11ClassLinkage, AddEntry }, + { IID_ID3D11CommandList, AddEntry }, + { IID_ID3D11VideoDecoder, AddEntry }, + { IID_ID3D11VideoProcessor, AddEntry }, + { IID_ID3D11AuthenticatedChannel, AddEntry }, + { IID_ID3D11CryptoSession, AddEntry }, + { IID_ID3D11VideoDecoderOutputView, AddEntry }, + { IID_ID3D11VideoProcessorInputView, AddEntry }, + { IID_ID3D11VideoProcessorOutputView, AddEntry }, + { IID_ID3D11BlendState, AddEntry }, + { IID_ID3D11BlendState1, AddEntry }, + { IID_ID3DDeviceContextState, AddEntry }, + { IID_ID3D11VideoProcessorEnumerator, AddEntry }, + { IID_ID3D11VideoProcessorEnumerator1, AddEntry }, + { IID_ID3DUserDefinedAnnotation, AddEntry }, + { IID_ID3D11Texture2D, AddEntry }, + { IID_ID3D11Texture2D1, AddEntry }, + { IID_ID3D11Texture3D, AddEntry }, + { IID_ID3D11Texture3D1, AddEntry }, + { IID_ID3D11RasterizerState, AddEntry }, + { IID_ID3D11RasterizerState1, AddEntry }, + { IID_ID3D11RasterizerState2, AddEntry }, + { IID_ID3D11ShaderResourceView, AddEntry }, + { IID_ID3D11ShaderResourceView1, AddEntry }, + { IID_ID3D11RenderTargetView, AddEntry }, + { IID_ID3D11RenderTargetView1, AddEntry }, + { IID_ID3D11UnorderedAccessView, AddEntry }, + { IID_ID3D11UnorderedAccessView1, AddEntry }, + { IID_ID3D11Query, AddEntry }, + { IID_ID3D11Query1, AddEntry }, + { IID_ID3D11Fence, AddEntry }, + { IID_ID3D11DeviceContext, AddEntry }, + { IID_ID3D11DeviceContext1, AddEntry }, + { IID_ID3D11DeviceContext2, AddEntry }, + { IID_ID3D11DeviceContext3, AddEntry }, + { IID_ID3D11DeviceContext4, AddEntry }, + { IID_ID3D11Device, AddEntry }, + { IID_ID3D11Device1, AddEntry }, + { IID_ID3D11Device2, AddEntry }, + { IID_ID3D11Device3, AddEntry }, + { IID_ID3D11Device4, AddEntry }, + { IID_ID3D11Device5, AddEntry }, + { IID_ID3D11Multithread, AddEntry }, + { IID_ID3D11VideoDevice, AddEntry }, + { IID_ID3D11VideoDevice1, AddEntry }, + { IID_ID3D11VideoDevice2, AddEntry }, + { IID_ID3D11VideoContext, AddEntry }, + { IID_ID3D11VideoContext1, AddEntry }, + { IID_ID3D11VideoContext2, AddEntry }, + { IID_ID3D11VideoContext3, AddEntry }, + { IID_ID3D11On12Device, AddEntry }, + { IID_ID3D11On12Device1, AddEntry }, + { IID_ID3D11On12Device2, AddEntry }, }; const std::unordered_map,IidHash> kAddEntryVoidFunctionTable @@ -337,6 +405,74 @@ const std::unordered_map }, { IID_ID3D12InfoQueue, AddEntry }, { IID_ID3D12InfoQueue1, AddEntry }, + { IID_ID3D11DepthStencilState, AddEntry }, + { IID_ID3D11Buffer, AddEntry }, + { IID_ID3D11Texture1D, AddEntry }, + { IID_ID3D11DepthStencilView, AddEntry }, + { IID_ID3D11VertexShader, AddEntry }, + { IID_ID3D11HullShader, AddEntry }, + { IID_ID3D11DomainShader, AddEntry }, + { IID_ID3D11GeometryShader, AddEntry }, + { IID_ID3D11PixelShader, AddEntry }, + { IID_ID3D11ComputeShader, AddEntry }, + { IID_ID3D11InputLayout, AddEntry }, + { IID_ID3D11SamplerState, AddEntry }, + { IID_ID3D11Predicate, AddEntry }, + { IID_ID3D11Counter, AddEntry }, + { IID_ID3D11ClassInstance, AddEntry }, + { IID_ID3D11ClassLinkage, AddEntry }, + { IID_ID3D11CommandList, AddEntry }, + { IID_ID3D11VideoDecoder, AddEntry }, + { IID_ID3D11VideoProcessor, AddEntry }, + { IID_ID3D11AuthenticatedChannel, AddEntry }, + { IID_ID3D11CryptoSession, AddEntry }, + { IID_ID3D11VideoDecoderOutputView, AddEntry }, + { IID_ID3D11VideoProcessorInputView, AddEntry }, + { IID_ID3D11VideoProcessorOutputView, AddEntry }, + { IID_ID3D11BlendState, AddEntry }, + { IID_ID3D11BlendState1, AddEntry }, + { IID_ID3DDeviceContextState, AddEntry }, + { IID_ID3D11VideoProcessorEnumerator, AddEntry }, + { IID_ID3D11VideoProcessorEnumerator1, AddEntry }, + { IID_ID3DUserDefinedAnnotation, AddEntry }, + { IID_ID3D11Texture2D, AddEntry }, + { IID_ID3D11Texture2D1, AddEntry }, + { IID_ID3D11Texture3D, AddEntry }, + { IID_ID3D11Texture3D1, AddEntry }, + { IID_ID3D11RasterizerState, AddEntry }, + { IID_ID3D11RasterizerState1, AddEntry }, + { IID_ID3D11RasterizerState2, AddEntry }, + { IID_ID3D11ShaderResourceView, AddEntry }, + { IID_ID3D11ShaderResourceView1, AddEntry }, + { IID_ID3D11RenderTargetView, AddEntry }, + { IID_ID3D11RenderTargetView1, AddEntry }, + { IID_ID3D11UnorderedAccessView, AddEntry }, + { IID_ID3D11UnorderedAccessView1, AddEntry }, + { IID_ID3D11Query, AddEntry }, + { IID_ID3D11Query1, AddEntry }, + { IID_ID3D11Fence, AddEntry }, + { IID_ID3D11DeviceContext, AddEntry }, + { IID_ID3D11DeviceContext1, AddEntry }, + { IID_ID3D11DeviceContext2, AddEntry }, + { IID_ID3D11DeviceContext3, AddEntry }, + { IID_ID3D11DeviceContext4, AddEntry }, + { IID_ID3D11Device, AddEntry }, + { IID_ID3D11Device1, AddEntry }, + { IID_ID3D11Device2, AddEntry }, + { IID_ID3D11Device3, AddEntry }, + { IID_ID3D11Device4, AddEntry }, + { IID_ID3D11Device5, AddEntry }, + { IID_ID3D11Multithread, AddEntry }, + { IID_ID3D11VideoDevice, AddEntry }, + { IID_ID3D11VideoDevice1, AddEntry }, + { IID_ID3D11VideoDevice2, AddEntry }, + { IID_ID3D11VideoContext, AddEntry }, + { IID_ID3D11VideoContext1, AddEntry }, + { IID_ID3D11VideoContext2, AddEntry }, + { IID_ID3D11VideoContext3, AddEntry }, + { IID_ID3D11On12Device, AddEntry }, + { IID_ID3D11On12Device1, AddEntry }, + { IID_ID3D11On12Device2, AddEntry }, }; static DxWrapperInfo* GetWrapperInfo(IUnknown_Wrapper* wrapper) @@ -998,6 +1134,346 @@ static DxWrapperInfo* GetWrapperInfo(IUnknown_Wrapper* wrapper) auto* new_wrapper = reinterpret_cast(wrapper); return new_wrapper->GetObjectInfo().get(); } + if(riid == IID_ID3D11DepthStencilState) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Buffer) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Texture1D) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11DepthStencilView) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VertexShader) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11HullShader) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11DomainShader) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11GeometryShader) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11PixelShader) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11ComputeShader) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11InputLayout) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11SamplerState) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Predicate) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Counter) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11ClassInstance) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11ClassLinkage) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11CommandList) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VideoDecoder) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VideoProcessor) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11AuthenticatedChannel) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11CryptoSession) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VideoDecoderOutputView) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VideoProcessorInputView) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VideoProcessorOutputView) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11BlendState) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11BlendState1) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3DDeviceContextState) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VideoProcessorEnumerator) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VideoProcessorEnumerator1) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3DUserDefinedAnnotation) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Texture2D) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Texture2D1) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Texture3D) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Texture3D1) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11RasterizerState) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11RasterizerState1) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11RasterizerState2) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11ShaderResourceView) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11ShaderResourceView1) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11RenderTargetView) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11RenderTargetView1) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11UnorderedAccessView) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11UnorderedAccessView1) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Query) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Query1) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Fence) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11DeviceContext) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11DeviceContext1) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11DeviceContext2) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11DeviceContext3) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11DeviceContext4) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Device) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Device1) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Device2) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Device3) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Device4) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Device5) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11Multithread) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VideoDevice) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VideoDevice1) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VideoDevice2) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VideoContext) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VideoContext1) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VideoContext2) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11VideoContext3) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11On12Device) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11On12Device1) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } + if(riid == IID_ID3D11On12Device2) + { + auto* new_wrapper = reinterpret_cast(wrapper); + return new_wrapper->GetObjectInfo().get(); + } return nullptr; } diff --git a/framework/generated/generated_dx12_api_call_encoders.cpp b/framework/generated/generated_dx12_api_call_encoders.cpp index 6ef007237d..433413e3b2 100644 --- a/framework/generated/generated_dx12_api_call_encoders.cpp +++ b/framework/generated/generated_dx12_api_call_encoders.cpp @@ -214,8 +214,8 @@ void Encode_IDXGIObject_GetPrivateData( omit_output_data = true; } EncodeStruct(encoder, Name); - encoder->EncodeUInt32Ptr(pDataSize); - encoder->EncodeVoidArray(pData, * pDataSize, omit_output_data); + encoder->EncodeUInt32Ptr(pDataSize, omit_output_data); + encoder->EncodeVoidArray(pData, (pDataSize != nullptr) ? *pDataSize : 0, omit_output_data); encoder->EncodeInt32Value(return_value); D3D12CaptureManager::Get()->EndMethodCallCapture(); } @@ -574,7 +574,7 @@ void Encode_IDXGIOutput_GetDisplayModeList( } encoder->EncodeEnumValue(EnumFormat); encoder->EncodeUInt32Value(Flags); - encoder->EncodeUInt32Ptr(pNumModes); + encoder->EncodeUInt32Ptr(pNumModes, omit_output_data); EncodeStructArray(encoder, pDesc, ((pNumModes == nullptr) ? 0 : *pNumModes), omit_output_data); encoder->EncodeInt32Value(return_value); D3D12CaptureManager::Get()->EndMethodCallCapture(); @@ -2188,7 +2188,7 @@ void Encode_IDXGIOutput1_GetDisplayModeList1( } encoder->EncodeEnumValue(EnumFormat); encoder->EncodeUInt32Value(Flags); - encoder->EncodeUInt32Ptr(pNumModes); + encoder->EncodeUInt32Ptr(pNumModes, omit_output_data); EncodeStructArray(encoder, pDesc, ((pNumModes == nullptr) ? 0 : *pNumModes), omit_output_data); encoder->EncodeInt32Value(return_value); D3D12CaptureManager::Get()->EndMethodCallCapture(); @@ -3849,8 +3849,8 @@ void Encode_ID3D12Object_GetPrivateData( omit_output_data = true; } EncodeStruct(encoder, guid); - encoder->EncodeUInt32Ptr(pDataSize); - encoder->EncodeVoidArray(pData, * pDataSize, omit_output_data); + encoder->EncodeUInt32Ptr(pDataSize, omit_output_data); + encoder->EncodeVoidArray(pData, (pDataSize != nullptr) ? *pDataSize : 0, omit_output_data); encoder->EncodeInt32Value(return_value); D3D12CaptureManager::Get()->EndMethodCallCapture(); } @@ -8100,7 +8100,7 @@ void Encode_ID3D12Device5_EnumerateMetaCommands( { omit_output_data = true; } - encoder->EncodeUInt32Ptr(pNumMetaCommands); + encoder->EncodeUInt32Ptr(pNumMetaCommands, omit_output_data); EncodeStructArray(encoder, pDescs, ((pNumMetaCommands == nullptr) ? 0 : *pNumMetaCommands), omit_output_data); encoder->EncodeInt32Value(return_value); D3D12CaptureManager::Get()->EndMethodCallCapture(); @@ -8127,7 +8127,7 @@ void Encode_ID3D12Device5_EnumerateMetaCommandParameters( EncodeStruct(encoder, CommandId); encoder->EncodeEnumValue(Stage); encoder->EncodeUInt32Ptr(pTotalStructureSizeInBytes, omit_output_data); - encoder->EncodeUInt32Ptr(pParameterCount); + encoder->EncodeUInt32Ptr(pParameterCount, omit_output_data); EncodeStructArray(encoder, pParameterDescs, ((pParameterCount == nullptr) ? 0 : *pParameterCount), omit_output_data); encoder->EncodeInt32Value(return_value); D3D12CaptureManager::Get()->EndMethodCallCapture(); @@ -9076,8 +9076,8 @@ void Encode_ID3D12ShaderCacheSession_FindValue( } encoder->EncodeVoidArray(pKey, KeySize); encoder->EncodeUInt32Value(KeySize); - encoder->EncodeVoidArray(pValue, * pValueSize, omit_output_data); - encoder->EncodeUInt32Ptr(pValueSize); + encoder->EncodeVoidArray(pValue, (pValueSize != nullptr) ? *pValueSize : 0, omit_output_data); + encoder->EncodeUInt32Ptr(pValueSize, omit_output_data); encoder->EncodeInt32Value(return_value); D3D12CaptureManager::Get()->EndMethodCallCapture(); } @@ -10605,7 +10605,7 @@ void Encode_ID3D12InfoQueue_GetMessage( } encoder->EncodeUInt64Value(MessageIndex); EncodeStructArray(encoder, pMessage, ((pMessageByteLength == nullptr) ? 0 : *pMessageByteLength), omit_output_data); - encoder->EncodeSizeTPtr(pMessageByteLength); + encoder->EncodeSizeTPtr(pMessageByteLength, omit_output_data); encoder->EncodeInt32Value(return_value); D3D12CaptureManager::Get()->EndMethodCallCapture(); } @@ -10717,7 +10717,7 @@ void Encode_ID3D12InfoQueue_GetStorageFilter( omit_output_data = true; } EncodeStructArray(encoder, pFilter, ((pFilterByteLength == nullptr) ? 0 : *pFilterByteLength), omit_output_data); - encoder->EncodeSizeTPtr(pFilterByteLength); + encoder->EncodeSizeTPtr(pFilterByteLength, omit_output_data); encoder->EncodeInt32Value(return_value); D3D12CaptureManager::Get()->EndMethodCallCapture(); } @@ -10842,7 +10842,7 @@ void Encode_ID3D12InfoQueue_GetRetrievalFilter( omit_output_data = true; } EncodeStructArray(encoder, pFilter, ((pFilterByteLength == nullptr) ? 0 : *pFilterByteLength), omit_output_data); - encoder->EncodeSizeTPtr(pFilterByteLength); + encoder->EncodeSizeTPtr(pFilterByteLength, omit_output_data); encoder->EncodeInt32Value(return_value); D3D12CaptureManager::Get()->EndMethodCallCapture(); } @@ -11127,7 +11127,7 @@ void Encode_ID3D12InfoQueue1_RegisterMessageCallback( encoder->EncodeFunctionPtr(CallbackFunc); encoder->EncodeEnumValue(CallbackFilterFlags); encoder->EncodeVoidPtr(pContext); - encoder->EncodeUInt32Ptr(pCallbackCookie); + encoder->EncodeUInt32Ptr(pCallbackCookie, omit_output_data); encoder->EncodeInt32Value(return_value); D3D12CaptureManager::Get()->EndMethodCallCapture(); } @@ -11153,6 +11153,8143 @@ void Encode_ID3D12InfoQueue1_UnregisterMessageCallback( } +/* +** This part is generated from d3d11.h in Windows SDK: 10.0.20348.0 +** +*/ + +void Encode_D3D11CreateDevice( + HRESULT return_value, + IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + ID3D11Device** ppDevice, + D3D_FEATURE_LEVEL* pFeatureLevel, + ID3D11DeviceContext** ppImmediateContext) +{ + auto encoder = D3D12CaptureManager::Get()->BeginApiCallCapture(format::ApiCallId::ApiCall_D3D11CreateDevice); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pAdapter); + encoder->EncodeEnumValue(DriverType); + encoder->EncodeVoidPtr(Software); + encoder->EncodeUInt32Value(Flags); + encoder->EncodeEnumArray(pFeatureLevels, FeatureLevels); + encoder->EncodeUInt32Value(FeatureLevels); + encoder->EncodeUInt32Value(SDKVersion); + encoder->EncodeObjectPtr(ppDevice, omit_output_data); + encoder->EncodeEnumPtr(pFeatureLevel, omit_output_data); + encoder->EncodeObjectPtr(ppImmediateContext, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndApiCallCapture(); + } +} + +void Encode_D3D11CreateDeviceAndSwapChain( + HRESULT return_value, + IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, + IDXGISwapChain** ppSwapChain, + ID3D11Device** ppDevice, + D3D_FEATURE_LEVEL* pFeatureLevel, + ID3D11DeviceContext** ppImmediateContext) +{ + auto encoder = D3D12CaptureManager::Get()->BeginApiCallCapture(format::ApiCallId::ApiCall_D3D11CreateDeviceAndSwapChain); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pAdapter); + encoder->EncodeEnumValue(DriverType); + encoder->EncodeVoidPtr(Software); + encoder->EncodeUInt32Value(Flags); + encoder->EncodeEnumArray(pFeatureLevels, FeatureLevels); + encoder->EncodeUInt32Value(FeatureLevels); + encoder->EncodeUInt32Value(SDKVersion); + EncodeStructPtr(encoder, pSwapChainDesc); + encoder->EncodeObjectPtr(ppSwapChain, omit_output_data); + encoder->EncodeObjectPtr(ppDevice, omit_output_data); + encoder->EncodeEnumPtr(pFeatureLevel, omit_output_data); + encoder->EncodeObjectPtr(ppImmediateContext, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndApiCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_INPUT_ELEMENT_DESC& value) +{ + encoder->EncodeString(value.SemanticName); + encoder->EncodeUInt32Value(value.SemanticIndex); + encoder->EncodeEnumValue(value.Format); + encoder->EncodeUInt32Value(value.InputSlot); + encoder->EncodeUInt32Value(value.AlignedByteOffset); + encoder->EncodeEnumValue(value.InputSlotClass); + encoder->EncodeUInt32Value(value.InstanceDataStepRate); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_SO_DECLARATION_ENTRY& value) +{ + encoder->EncodeUInt32Value(value.Stream); + encoder->EncodeString(value.SemanticName); + encoder->EncodeUInt32Value(value.SemanticIndex); + encoder->EncodeUInt8Value(value.StartComponent); + encoder->EncodeUInt8Value(value.ComponentCount); + encoder->EncodeUInt8Value(value.OutputSlot); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIEWPORT& value) +{ + encoder->EncodeFloatValue(value.TopLeftX); + encoder->EncodeFloatValue(value.TopLeftY); + encoder->EncodeFloatValue(value.Width); + encoder->EncodeFloatValue(value.Height); + encoder->EncodeFloatValue(value.MinDepth); + encoder->EncodeFloatValue(value.MaxDepth); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_DRAW_INSTANCED_INDIRECT_ARGS& value) +{ + encoder->EncodeUInt32Value(value.VertexCountPerInstance); + encoder->EncodeUInt32Value(value.InstanceCount); + encoder->EncodeUInt32Value(value.StartVertexLocation); + encoder->EncodeUInt32Value(value.StartInstanceLocation); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS& value) +{ + encoder->EncodeUInt32Value(value.IndexCountPerInstance); + encoder->EncodeUInt32Value(value.InstanceCount); + encoder->EncodeUInt32Value(value.StartIndexLocation); + encoder->EncodeInt32Value(value.BaseVertexLocation); + encoder->EncodeUInt32Value(value.StartInstanceLocation); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BOX& value) +{ + encoder->EncodeUInt32Value(value.left); + encoder->EncodeUInt32Value(value.top); + encoder->EncodeUInt32Value(value.front); + encoder->EncodeUInt32Value(value.right); + encoder->EncodeUInt32Value(value.bottom); + encoder->EncodeUInt32Value(value.back); +} + +void Encode_ID3D11DeviceChild_GetDevice( + ID3D11DeviceChild_Wrapper* wrapper, + ID3D11Device** ppDevice) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceChild_GetDevice, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppDevice); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Device, reinterpret_cast(ppDevice), static_cast(wrapper)); + } +} + +void Encode_ID3D11DeviceChild_GetPrivateData( + ID3D11DeviceChild_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + UINT* pDataSize, + void* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceChild_GetPrivateData, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStruct(encoder, guid); + encoder->EncodeUInt32Ptr(pDataSize, omit_output_data); + encoder->EncodeVoidArray(pData, (pDataSize != nullptr) ? *pDataSize : 0, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceChild_SetPrivateData( + ID3D11DeviceChild_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + UINT DataSize, + const void* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceChild_SetPrivateData, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStruct(encoder, guid); + encoder->EncodeUInt32Value(DataSize); + encoder->EncodeVoidArray(pData, DataSize); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceChild_SetPrivateDataInterface( + ID3D11DeviceChild_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + const IUnknown* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceChild_SetPrivateDataInterface, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStruct(encoder, guid); + encoder->EncodeObjectValue(pData); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_DEPTH_STENCILOP_DESC& value) +{ + encoder->EncodeEnumValue(value.StencilFailOp); + encoder->EncodeEnumValue(value.StencilDepthFailOp); + encoder->EncodeEnumValue(value.StencilPassOp); + encoder->EncodeEnumValue(value.StencilFunc); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_DEPTH_STENCIL_DESC& value) +{ + encoder->EncodeInt32Value(value.DepthEnable); + encoder->EncodeEnumValue(value.DepthWriteMask); + encoder->EncodeEnumValue(value.DepthFunc); + encoder->EncodeInt32Value(value.StencilEnable); + encoder->EncodeUInt8Value(value.StencilReadMask); + encoder->EncodeUInt8Value(value.StencilWriteMask); + EncodeStruct(encoder, value.FrontFace); + EncodeStruct(encoder, value.BackFace); +} + +void Encode_ID3D11DepthStencilState_GetDesc( + ID3D11DepthStencilState_Wrapper* wrapper, + D3D11_DEPTH_STENCIL_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DepthStencilState_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RENDER_TARGET_BLEND_DESC& value) +{ + encoder->EncodeInt32Value(value.BlendEnable); + encoder->EncodeEnumValue(value.SrcBlend); + encoder->EncodeEnumValue(value.DestBlend); + encoder->EncodeEnumValue(value.BlendOp); + encoder->EncodeEnumValue(value.SrcBlendAlpha); + encoder->EncodeEnumValue(value.DestBlendAlpha); + encoder->EncodeEnumValue(value.BlendOpAlpha); + encoder->EncodeUInt8Value(value.RenderTargetWriteMask); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BLEND_DESC& value) +{ + encoder->EncodeInt32Value(value.AlphaToCoverageEnable); + encoder->EncodeInt32Value(value.IndependentBlendEnable); + EncodeStructArray(encoder, value.RenderTarget, 8); +} + +void Encode_ID3D11BlendState_GetDesc( + ID3D11BlendState_Wrapper* wrapper, + D3D11_BLEND_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11BlendState_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RASTERIZER_DESC& value) +{ + encoder->EncodeEnumValue(value.FillMode); + encoder->EncodeEnumValue(value.CullMode); + encoder->EncodeInt32Value(value.FrontCounterClockwise); + encoder->EncodeInt32Value(value.DepthBias); + encoder->EncodeFloatValue(value.DepthBiasClamp); + encoder->EncodeFloatValue(value.SlopeScaledDepthBias); + encoder->EncodeInt32Value(value.DepthClipEnable); + encoder->EncodeInt32Value(value.ScissorEnable); + encoder->EncodeInt32Value(value.MultisampleEnable); + encoder->EncodeInt32Value(value.AntialiasedLineEnable); +} + +void Encode_ID3D11RasterizerState_GetDesc( + ID3D11RasterizerState_Wrapper* wrapper, + D3D11_RASTERIZER_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11RasterizerState_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_MAPPED_SUBRESOURCE& value) +{ + encoder->EncodeVoidPtr(value.pData); + encoder->EncodeUInt32Value(value.RowPitch); + encoder->EncodeUInt32Value(value.DepthPitch); +} + +void Encode_ID3D11Resource_GetType( + ID3D11Resource_Wrapper* wrapper, + D3D11_RESOURCE_DIMENSION* pResourceDimension) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Resource_GetType, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeEnumPtr(pResourceDimension); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Resource_SetEvictionPriority( + ID3D11Resource_Wrapper* wrapper, + UINT EvictionPriority) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Resource_SetEvictionPriority, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(EvictionPriority); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Resource_GetEvictionPriority( + ID3D11Resource_Wrapper* wrapper, + UINT return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Resource_GetEvictionPriority, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BUFFER_DESC& value) +{ + encoder->EncodeUInt32Value(value.ByteWidth); + encoder->EncodeEnumValue(value.Usage); + encoder->EncodeUInt32Value(value.BindFlags); + encoder->EncodeUInt32Value(value.CPUAccessFlags); + encoder->EncodeUInt32Value(value.MiscFlags); + encoder->EncodeUInt32Value(value.StructureByteStride); +} + +void Encode_ID3D11Buffer_GetDesc( + ID3D11Buffer_Wrapper* wrapper, + D3D11_BUFFER_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Buffer_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEXTURE1D_DESC& value) +{ + encoder->EncodeUInt32Value(value.Width); + encoder->EncodeUInt32Value(value.MipLevels); + encoder->EncodeUInt32Value(value.ArraySize); + encoder->EncodeEnumValue(value.Format); + encoder->EncodeEnumValue(value.Usage); + encoder->EncodeUInt32Value(value.BindFlags); + encoder->EncodeUInt32Value(value.CPUAccessFlags); + encoder->EncodeUInt32Value(value.MiscFlags); +} + +void Encode_ID3D11Texture1D_GetDesc( + ID3D11Texture1D_Wrapper* wrapper, + D3D11_TEXTURE1D_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Texture1D_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEXTURE2D_DESC& value) +{ + encoder->EncodeUInt32Value(value.Width); + encoder->EncodeUInt32Value(value.Height); + encoder->EncodeUInt32Value(value.MipLevels); + encoder->EncodeUInt32Value(value.ArraySize); + encoder->EncodeEnumValue(value.Format); + EncodeStruct(encoder, value.SampleDesc); + encoder->EncodeEnumValue(value.Usage); + encoder->EncodeUInt32Value(value.BindFlags); + encoder->EncodeUInt32Value(value.CPUAccessFlags); + encoder->EncodeUInt32Value(value.MiscFlags); +} + +void Encode_ID3D11Texture2D_GetDesc( + ID3D11Texture2D_Wrapper* wrapper, + D3D11_TEXTURE2D_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Texture2D_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEXTURE3D_DESC& value) +{ + encoder->EncodeUInt32Value(value.Width); + encoder->EncodeUInt32Value(value.Height); + encoder->EncodeUInt32Value(value.Depth); + encoder->EncodeUInt32Value(value.MipLevels); + encoder->EncodeEnumValue(value.Format); + encoder->EncodeEnumValue(value.Usage); + encoder->EncodeUInt32Value(value.BindFlags); + encoder->EncodeUInt32Value(value.CPUAccessFlags); + encoder->EncodeUInt32Value(value.MiscFlags); +} + +void Encode_ID3D11Texture3D_GetDesc( + ID3D11Texture3D_Wrapper* wrapper, + D3D11_TEXTURE3D_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Texture3D_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11View_GetResource( + ID3D11View_Wrapper* wrapper, + ID3D11Resource** ppResource) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11View_GetResource, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppResource); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Resource, reinterpret_cast(ppResource), static_cast(wrapper)); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BUFFEREX_SRV& value) +{ + encoder->EncodeUInt32Value(value.FirstElement); + encoder->EncodeUInt32Value(value.NumElements); + encoder->EncodeUInt32Value(value.Flags); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_SRV& value) +{ + encoder->EncodeUInt32Value(value.MostDetailedMip); + encoder->EncodeUInt32Value(value.MipLevels); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_ARRAY_SRV& value) +{ + encoder->EncodeUInt32Value(value.MostDetailedMip); + encoder->EncodeUInt32Value(value.MipLevels); + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_SRV& value) +{ + encoder->EncodeUInt32Value(value.MostDetailedMip); + encoder->EncodeUInt32Value(value.MipLevels); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_SRV& value) +{ + encoder->EncodeUInt32Value(value.MostDetailedMip); + encoder->EncodeUInt32Value(value.MipLevels); + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX3D_SRV& value) +{ + encoder->EncodeUInt32Value(value.MostDetailedMip); + encoder->EncodeUInt32Value(value.MipLevels); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEXCUBE_SRV& value) +{ + encoder->EncodeUInt32Value(value.MostDetailedMip); + encoder->EncodeUInt32Value(value.MipLevels); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEXCUBE_ARRAY_SRV& value) +{ + encoder->EncodeUInt32Value(value.MostDetailedMip); + encoder->EncodeUInt32Value(value.MipLevels); + encoder->EncodeUInt32Value(value.First2DArrayFace); + encoder->EncodeUInt32Value(value.NumCubes); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2DMS_SRV& value) +{ + encoder->EncodeUInt32Value(value.UnusedField_NothingToDefine); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2DMS_ARRAY_SRV& value) +{ + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); +} + +void Encode_ID3D11ShaderResourceView_GetDesc( + ID3D11ShaderResourceView_Wrapper* wrapper, + D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11ShaderResourceView_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_RTV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_ARRAY_RTV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_RTV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2DMS_RTV& value) +{ + encoder->EncodeUInt32Value(value.UnusedField_NothingToDefine); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_RTV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2DMS_ARRAY_RTV& value) +{ + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX3D_RTV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); + encoder->EncodeUInt32Value(value.FirstWSlice); + encoder->EncodeUInt32Value(value.WSize); +} + +void Encode_ID3D11RenderTargetView_GetDesc( + ID3D11RenderTargetView_Wrapper* wrapper, + D3D11_RENDER_TARGET_VIEW_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11RenderTargetView_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_DSV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_ARRAY_DSV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_DSV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_DSV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2DMS_DSV& value) +{ + encoder->EncodeUInt32Value(value.UnusedField_NothingToDefine); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2DMS_ARRAY_DSV& value) +{ + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); +} + +void Encode_ID3D11DepthStencilView_GetDesc( + ID3D11DepthStencilView_Wrapper* wrapper, + D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DepthStencilView_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BUFFER_UAV& value) +{ + encoder->EncodeUInt32Value(value.FirstElement); + encoder->EncodeUInt32Value(value.NumElements); + encoder->EncodeUInt32Value(value.Flags); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_UAV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_ARRAY_UAV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_UAV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_UAV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX3D_UAV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); + encoder->EncodeUInt32Value(value.FirstWSlice); + encoder->EncodeUInt32Value(value.WSize); +} + +void Encode_ID3D11UnorderedAccessView_GetDesc( + ID3D11UnorderedAccessView_Wrapper* wrapper, + D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11UnorderedAccessView_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_SAMPLER_DESC& value) +{ + encoder->EncodeEnumValue(value.Filter); + encoder->EncodeEnumValue(value.AddressU); + encoder->EncodeEnumValue(value.AddressV); + encoder->EncodeEnumValue(value.AddressW); + encoder->EncodeFloatValue(value.MipLODBias); + encoder->EncodeUInt32Value(value.MaxAnisotropy); + encoder->EncodeEnumValue(value.ComparisonFunc); + encoder->EncodeFloatArray(value.BorderColor, 4); + encoder->EncodeFloatValue(value.MinLOD); + encoder->EncodeFloatValue(value.MaxLOD); +} + +void Encode_ID3D11SamplerState_GetDesc( + ID3D11SamplerState_Wrapper* wrapper, + D3D11_SAMPLER_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11SamplerState_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Asynchronous_GetDataSize( + ID3D11Asynchronous_Wrapper* wrapper, + UINT return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Asynchronous_GetDataSize, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_QUERY_DESC& value) +{ + encoder->EncodeEnumValue(value.Query); + encoder->EncodeUInt32Value(value.MiscFlags); +} + +void Encode_ID3D11Query_GetDesc( + ID3D11Query_Wrapper* wrapper, + D3D11_QUERY_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Query_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_QUERY_DATA_TIMESTAMP_DISJOINT& value) +{ + encoder->EncodeUInt64Value(value.Frequency); + encoder->EncodeInt32Value(value.Disjoint); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_QUERY_DATA_PIPELINE_STATISTICS& value) +{ + encoder->EncodeUInt64Value(value.IAVertices); + encoder->EncodeUInt64Value(value.IAPrimitives); + encoder->EncodeUInt64Value(value.VSInvocations); + encoder->EncodeUInt64Value(value.GSInvocations); + encoder->EncodeUInt64Value(value.GSPrimitives); + encoder->EncodeUInt64Value(value.CInvocations); + encoder->EncodeUInt64Value(value.CPrimitives); + encoder->EncodeUInt64Value(value.PSInvocations); + encoder->EncodeUInt64Value(value.HSInvocations); + encoder->EncodeUInt64Value(value.DSInvocations); + encoder->EncodeUInt64Value(value.CSInvocations); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_QUERY_DATA_SO_STATISTICS& value) +{ + encoder->EncodeUInt64Value(value.NumPrimitivesWritten); + encoder->EncodeUInt64Value(value.PrimitivesStorageNeeded); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_COUNTER_DESC& value) +{ + encoder->EncodeEnumValue(value.Counter); + encoder->EncodeUInt32Value(value.MiscFlags); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_COUNTER_INFO& value) +{ + encoder->EncodeEnumValue(value.LastDeviceDependentCounter); + encoder->EncodeUInt32Value(value.NumSimultaneousCounters); + encoder->EncodeUInt8Value(value.NumDetectableParallelUnits); +} + +void Encode_ID3D11Counter_GetDesc( + ID3D11Counter_Wrapper* wrapper, + D3D11_COUNTER_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Counter_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_CLASS_INSTANCE_DESC& value) +{ + encoder->EncodeUInt32Value(value.InstanceId); + encoder->EncodeUInt32Value(value.InstanceIndex); + encoder->EncodeUInt32Value(value.TypeId); + encoder->EncodeUInt32Value(value.ConstantBuffer); + encoder->EncodeUInt32Value(value.BaseConstantBufferOffset); + encoder->EncodeUInt32Value(value.BaseTexture); + encoder->EncodeUInt32Value(value.BaseSampler); + encoder->EncodeInt32Value(value.Created); +} + +void Encode_ID3D11ClassInstance_GetClassLinkage( + ID3D11ClassInstance_Wrapper* wrapper, + ID3D11ClassLinkage** ppLinkage) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11ClassInstance_GetClassLinkage, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppLinkage); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11ClassLinkage, reinterpret_cast(ppLinkage), wrapper); + } +} + +void Encode_ID3D11ClassInstance_GetDesc( + ID3D11ClassInstance_Wrapper* wrapper, + D3D11_CLASS_INSTANCE_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11ClassInstance_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11ClassInstance_GetInstanceName( + ID3D11ClassInstance_Wrapper* wrapper, + LPSTR pInstanceName, + SIZE_T* pBufferLength) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11ClassInstance_GetInstanceName, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeString(pInstanceName); + encoder->EncodeSizeTPtr(pBufferLength); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11ClassInstance_GetTypeName( + ID3D11ClassInstance_Wrapper* wrapper, + LPSTR pTypeName, + SIZE_T* pBufferLength) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11ClassInstance_GetTypeName, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeString(pTypeName); + encoder->EncodeSizeTPtr(pBufferLength); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11ClassLinkage_GetClassInstance( + ID3D11ClassLinkage_Wrapper* wrapper, + HRESULT return_value, + LPCSTR pClassInstanceName, + UINT InstanceIndex, + ID3D11ClassInstance** ppInstance) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11ClassLinkage_GetClassInstance, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeString(pClassInstanceName); + encoder->EncodeUInt32Value(InstanceIndex); + encoder->EncodeObjectPtr(ppInstance, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11ClassInstance, reinterpret_cast(ppInstance), wrapper); + } +} + +void Encode_ID3D11ClassLinkage_CreateClassInstance( + ID3D11ClassLinkage_Wrapper* wrapper, + HRESULT return_value, + LPCSTR pClassTypeName, + UINT ConstantBufferOffset, + UINT ConstantVectorOffset, + UINT TextureOffset, + UINT SamplerOffset, + ID3D11ClassInstance** ppInstance) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11ClassLinkage_CreateClassInstance, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeString(pClassTypeName); + encoder->EncodeUInt32Value(ConstantBufferOffset); + encoder->EncodeUInt32Value(ConstantVectorOffset); + encoder->EncodeUInt32Value(TextureOffset); + encoder->EncodeUInt32Value(SamplerOffset); + encoder->EncodeObjectPtr(ppInstance, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11ClassInstance, reinterpret_cast(ppInstance), wrapper); + } +} + +void Encode_ID3D11CommandList_GetContextFlags( + ID3D11CommandList_Wrapper* wrapper, + UINT return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11CommandList_GetContextFlags, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_THREADING& value) +{ + encoder->EncodeInt32Value(value.DriverConcurrentCreates); + encoder->EncodeInt32Value(value.DriverCommandLists); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_DOUBLES& value) +{ + encoder->EncodeInt32Value(value.DoublePrecisionFloatShaderOps); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_FORMAT_SUPPORT& value) +{ + encoder->EncodeEnumValue(value.InFormat); + encoder->EncodeUInt32Value(value.OutFormatSupport); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_FORMAT_SUPPORT2& value) +{ + encoder->EncodeEnumValue(value.InFormat); + encoder->EncodeUInt32Value(value.OutFormatSupport2); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS& value) +{ + encoder->EncodeInt32Value(value.ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D11_OPTIONS& value) +{ + encoder->EncodeInt32Value(value.OutputMergerLogicOp); + encoder->EncodeInt32Value(value.UAVOnlyRenderingForcedSampleCount); + encoder->EncodeInt32Value(value.DiscardAPIsSeenByDriver); + encoder->EncodeInt32Value(value.FlagsForUpdateAndCopySeenByDriver); + encoder->EncodeInt32Value(value.ClearView); + encoder->EncodeInt32Value(value.CopyWithOverlap); + encoder->EncodeInt32Value(value.ConstantBufferPartialUpdate); + encoder->EncodeInt32Value(value.ConstantBufferOffsetting); + encoder->EncodeInt32Value(value.MapNoOverwriteOnDynamicConstantBuffer); + encoder->EncodeInt32Value(value.MapNoOverwriteOnDynamicBufferSRV); + encoder->EncodeInt32Value(value.MultisampleRTVWithForcedSampleCountOne); + encoder->EncodeInt32Value(value.SAD4ShaderInstructions); + encoder->EncodeInt32Value(value.ExtendedDoublesShaderInstructions); + encoder->EncodeInt32Value(value.ExtendedResourceSharing); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_ARCHITECTURE_INFO& value) +{ + encoder->EncodeInt32Value(value.TileBasedDeferredRenderer); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D9_OPTIONS& value) +{ + encoder->EncodeInt32Value(value.FullNonPow2TextureSupport); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT& value) +{ + encoder->EncodeInt32Value(value.SupportsDepthAsTextureWithLessEqualComparisonFilter); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT& value) +{ + encoder->EncodeUInt32Value(value.PixelShaderMinPrecision); + encoder->EncodeUInt32Value(value.AllOtherShaderStagesMinPrecision); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D11_OPTIONS1& value) +{ + encoder->EncodeEnumValue(value.TiledResourcesTier); + encoder->EncodeInt32Value(value.MinMaxFiltering); + encoder->EncodeInt32Value(value.ClearViewAlsoSupportsDepthOnlyFormats); + encoder->EncodeInt32Value(value.MapOnDefaultBuffers); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT& value) +{ + encoder->EncodeInt32Value(value.SimpleInstancingSupported); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_MARKER_SUPPORT& value) +{ + encoder->EncodeInt32Value(value.Profile); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D9_OPTIONS1& value) +{ + encoder->EncodeInt32Value(value.FullNonPow2TextureSupported); + encoder->EncodeInt32Value(value.DepthAsTextureWithLessEqualComparisonFilterSupported); + encoder->EncodeInt32Value(value.SimpleInstancingSupported); + encoder->EncodeInt32Value(value.TextureCubeFaceRenderTargetWithNonCubeDepthStencilSupported); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D11_OPTIONS2& value) +{ + encoder->EncodeInt32Value(value.PSSpecifiedStencilRefSupported); + encoder->EncodeInt32Value(value.TypedUAVLoadAdditionalFormats); + encoder->EncodeInt32Value(value.ROVsSupported); + encoder->EncodeEnumValue(value.ConservativeRasterizationTier); + encoder->EncodeEnumValue(value.TiledResourcesTier); + encoder->EncodeInt32Value(value.MapOnDefaultTextures); + encoder->EncodeInt32Value(value.StandardSwizzle); + encoder->EncodeInt32Value(value.UnifiedMemoryArchitecture); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D11_OPTIONS3& value) +{ + encoder->EncodeInt32Value(value.VPAndRTArrayIndexFromAnyShaderFeedingRasterizer); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT& value) +{ + encoder->EncodeUInt32Value(value.MaxGPUVirtualAddressBitsPerResource); + encoder->EncodeUInt32Value(value.MaxGPUVirtualAddressBitsPerProcess); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_SHADER_CACHE& value) +{ + encoder->EncodeUInt32Value(value.SupportFlags); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D11_OPTIONS5& value) +{ + encoder->EncodeEnumValue(value.SharedResourceTier); +} + +void Encode_ID3D11DeviceContext_VSSetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_VSSetConstantBuffers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_PSSetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_PSSetShaderResources, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumViews); + encoder->EncodeObjectArray(ppShaderResourceViews, NumViews); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_PSSetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11PixelShader* pPixelShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_PSSetShader, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pPixelShader); + encoder->EncodeObjectArray(ppClassInstances, NumClassInstances); + encoder->EncodeUInt32Value(NumClassInstances); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_PSSetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_PSSetSamplers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumSamplers); + encoder->EncodeObjectArray(ppSamplers, NumSamplers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_VSSetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11VertexShader* pVertexShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_VSSetShader, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVertexShader); + encoder->EncodeObjectArray(ppClassInstances, NumClassInstances); + encoder->EncodeUInt32Value(NumClassInstances); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_DrawIndexed( + ID3D11DeviceContext_Wrapper* wrapper, + UINT IndexCount, + UINT StartIndexLocation, + INT BaseVertexLocation) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawIndexed, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(IndexCount); + encoder->EncodeUInt32Value(StartIndexLocation); + encoder->EncodeInt32Value(BaseVertexLocation); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_Draw( + ID3D11DeviceContext_Wrapper* wrapper, + UINT VertexCount, + UINT StartVertexLocation) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_Draw, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(VertexCount); + encoder->EncodeUInt32Value(StartVertexLocation); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_Map( + ID3D11DeviceContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + UINT Subresource, + D3D11_MAP MapType, + UINT MapFlags, + D3D11_MAPPED_SUBRESOURCE* pMappedResource) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_Map, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pResource); + encoder->EncodeUInt32Value(Subresource); + encoder->EncodeEnumValue(MapType); + encoder->EncodeUInt32Value(MapFlags); + EncodeStructPtr(encoder, pMappedResource, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_Unmap( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Resource* pResource, + UINT Subresource) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_Unmap, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pResource); + encoder->EncodeUInt32Value(Subresource); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_PSSetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_PSSetConstantBuffers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_IASetInputLayout( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11InputLayout* pInputLayout) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_IASetInputLayout, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pInputLayout); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_IASetVertexBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppVertexBuffers, + const UINT* pStrides, + const UINT* pOffsets) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_IASetVertexBuffers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppVertexBuffers, NumBuffers); + encoder->EncodeUInt32Array(pStrides, NumBuffers); + encoder->EncodeUInt32Array(pOffsets, NumBuffers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_IASetIndexBuffer( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* pIndexBuffer, + DXGI_FORMAT Format, + UINT Offset) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_IASetIndexBuffer, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pIndexBuffer); + encoder->EncodeEnumValue(Format); + encoder->EncodeUInt32Value(Offset); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_DrawIndexedInstanced( + ID3D11DeviceContext_Wrapper* wrapper, + UINT IndexCountPerInstance, + UINT InstanceCount, + UINT StartIndexLocation, + INT BaseVertexLocation, + UINT StartInstanceLocation) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawIndexedInstanced, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(IndexCountPerInstance); + encoder->EncodeUInt32Value(InstanceCount); + encoder->EncodeUInt32Value(StartIndexLocation); + encoder->EncodeInt32Value(BaseVertexLocation); + encoder->EncodeUInt32Value(StartInstanceLocation); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_DrawInstanced( + ID3D11DeviceContext_Wrapper* wrapper, + UINT VertexCountPerInstance, + UINT InstanceCount, + UINT StartVertexLocation, + UINT StartInstanceLocation) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawInstanced, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(VertexCountPerInstance); + encoder->EncodeUInt32Value(InstanceCount); + encoder->EncodeUInt32Value(StartVertexLocation); + encoder->EncodeUInt32Value(StartInstanceLocation); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_GSSetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_GSSetConstantBuffers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_GSSetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11GeometryShader* pShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_GSSetShader, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pShader); + encoder->EncodeObjectArray(ppClassInstances, NumClassInstances); + encoder->EncodeUInt32Value(NumClassInstances); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_IASetPrimitiveTopology( + ID3D11DeviceContext_Wrapper* wrapper, + D3D11_PRIMITIVE_TOPOLOGY Topology) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_IASetPrimitiveTopology, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeEnumValue(Topology); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_VSSetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_VSSetShaderResources, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumViews); + encoder->EncodeObjectArray(ppShaderResourceViews, NumViews); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_VSSetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_VSSetSamplers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumSamplers); + encoder->EncodeObjectArray(ppSamplers, NumSamplers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_Begin( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Asynchronous* pAsync) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_Begin, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pAsync); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_End( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Asynchronous* pAsync) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_End, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pAsync); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_GetData( + ID3D11DeviceContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11Asynchronous* pAsync, + void* pData, + UINT DataSize, + UINT GetDataFlags) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_GetData, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pAsync); + encoder->EncodeVoidArray(pData, DataSize, omit_output_data); + encoder->EncodeUInt32Value(DataSize); + encoder->EncodeUInt32Value(GetDataFlags); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_SetPredication( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Predicate* pPredicate, + BOOL PredicateValue) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_SetPredication, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pPredicate); + encoder->EncodeInt32Value(PredicateValue); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_GSSetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_GSSetShaderResources, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumViews); + encoder->EncodeObjectArray(ppShaderResourceViews, NumViews); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_GSSetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_GSSetSamplers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumSamplers); + encoder->EncodeObjectArray(ppSamplers, NumSamplers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_OMSetRenderTargets( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumViews, + ID3D11RenderTargetView* const* ppRenderTargetViews, + ID3D11DepthStencilView* pDepthStencilView) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_OMSetRenderTargets, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(NumViews); + encoder->EncodeObjectArray(ppRenderTargetViews, NumViews); + encoder->EncodeObjectValue(pDepthStencilView); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumRTVs, + ID3D11RenderTargetView* const* ppRenderTargetViews, + ID3D11DepthStencilView* pDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView* const* ppUnorderedAccessViews, + const UINT* pUAVInitialCounts) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(NumRTVs); + encoder->EncodeObjectArray(ppRenderTargetViews, NumRTVs); + encoder->EncodeObjectValue(pDepthStencilView); + encoder->EncodeUInt32Value(UAVStartSlot); + encoder->EncodeUInt32Value(NumUAVs); + encoder->EncodeObjectArray(ppUnorderedAccessViews, NumUAVs); + encoder->EncodeUInt32Array(pUAVInitialCounts, NumUAVs); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_OMSetBlendState( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11BlendState* pBlendState, + const FLOAT BlendFactor [4], + UINT SampleMask) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_OMSetBlendState, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pBlendState); + encoder->EncodeFloatArray(BlendFactor, 4); + encoder->EncodeUInt32Value(SampleMask); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_OMSetDepthStencilState( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11DepthStencilState* pDepthStencilState, + UINT StencilRef) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_OMSetDepthStencilState, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pDepthStencilState); + encoder->EncodeUInt32Value(StencilRef); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_SOSetTargets( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumBuffers, + ID3D11Buffer* const* ppSOTargets, + const UINT* pOffsets) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_SOSetTargets, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppSOTargets, NumBuffers); + encoder->EncodeUInt32Array(pOffsets, NumBuffers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_DrawAuto( + ID3D11DeviceContext_Wrapper* wrapper) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawAuto, wrapper->GetCaptureId()); + if(encoder) + { + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_DrawIndexedInstancedIndirect( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* pBufferForArgs, + UINT AlignedByteOffsetForArgs) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawIndexedInstancedIndirect, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pBufferForArgs); + encoder->EncodeUInt32Value(AlignedByteOffsetForArgs); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_DrawInstancedIndirect( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* pBufferForArgs, + UINT AlignedByteOffsetForArgs) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawInstancedIndirect, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pBufferForArgs); + encoder->EncodeUInt32Value(AlignedByteOffsetForArgs); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_Dispatch( + ID3D11DeviceContext_Wrapper* wrapper, + UINT ThreadGroupCountX, + UINT ThreadGroupCountY, + UINT ThreadGroupCountZ) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_Dispatch, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(ThreadGroupCountX); + encoder->EncodeUInt32Value(ThreadGroupCountY); + encoder->EncodeUInt32Value(ThreadGroupCountZ); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_DispatchIndirect( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* pBufferForArgs, + UINT AlignedByteOffsetForArgs) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DispatchIndirect, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pBufferForArgs); + encoder->EncodeUInt32Value(AlignedByteOffsetForArgs); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_RSSetState( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11RasterizerState* pRasterizerState) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_RSSetState, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pRasterizerState); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_RSSetViewports( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumViewports, + const D3D11_VIEWPORT* pViewports) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_RSSetViewports, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(NumViewports); + EncodeStructArray(encoder, pViewports, NumViewports); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_RSSetScissorRects( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumRects, + const D3D11_RECT* pRects) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_RSSetScissorRects, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(NumRects); + EncodeStructArray(encoder, pRects, NumRects); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_CopySubresourceRegion( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Resource* pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + const D3D11_BOX* pSrcBox) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_CopySubresourceRegion, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pDstResource); + encoder->EncodeUInt32Value(DstSubresource); + encoder->EncodeUInt32Value(DstX); + encoder->EncodeUInt32Value(DstY); + encoder->EncodeUInt32Value(DstZ); + encoder->EncodeObjectValue(pSrcResource); + encoder->EncodeUInt32Value(SrcSubresource); + EncodeStructPtr(encoder, pSrcBox); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_CopyResource( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Resource* pDstResource, + ID3D11Resource* pSrcResource) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_CopyResource, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pDstResource); + encoder->EncodeObjectValue(pSrcResource); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_CopyStructureCount( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* pDstBuffer, + UINT DstAlignedByteOffset, + ID3D11UnorderedAccessView* pSrcView) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_CopyStructureCount, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pDstBuffer); + encoder->EncodeUInt32Value(DstAlignedByteOffset); + encoder->EncodeObjectValue(pSrcView); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_ClearRenderTargetView( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11RenderTargetView* pRenderTargetView, + const FLOAT ColorRGBA [4]) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearRenderTargetView, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pRenderTargetView); + encoder->EncodeFloatArray(ColorRGBA, 4); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_ClearUnorderedAccessViewUint( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11UnorderedAccessView* pUnorderedAccessView, + const UINT Values [4]) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearUnorderedAccessViewUint, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pUnorderedAccessView); + encoder->EncodeUInt32Array(Values, 4); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_ClearUnorderedAccessViewFloat( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11UnorderedAccessView* pUnorderedAccessView, + const FLOAT Values [4]) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearUnorderedAccessViewFloat, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pUnorderedAccessView); + encoder->EncodeFloatArray(Values, 4); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_ClearDepthStencilView( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11DepthStencilView* pDepthStencilView, + UINT ClearFlags, + FLOAT Depth, + UINT8 Stencil) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearDepthStencilView, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pDepthStencilView); + encoder->EncodeUInt32Value(ClearFlags); + encoder->EncodeFloatValue(Depth); + encoder->EncodeUInt8Value(Stencil); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_GenerateMips( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11ShaderResourceView* pShaderResourceView) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_GenerateMips, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pShaderResourceView); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_SetResourceMinLOD( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Resource* pResource, + FLOAT MinLOD) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_SetResourceMinLOD, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pResource); + encoder->EncodeFloatValue(MinLOD); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_GetResourceMinLOD( + ID3D11DeviceContext_Wrapper* wrapper, + FLOAT return_value, + ID3D11Resource* pResource) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_GetResourceMinLOD, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pResource); + encoder->EncodeFloatValue(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_ResolveSubresource( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Resource* pDstResource, + UINT DstSubresource, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + DXGI_FORMAT Format) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_ResolveSubresource, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pDstResource); + encoder->EncodeUInt32Value(DstSubresource); + encoder->EncodeObjectValue(pSrcResource); + encoder->EncodeUInt32Value(SrcSubresource); + encoder->EncodeEnumValue(Format); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_ExecuteCommandList( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11CommandList* pCommandList, + BOOL RestoreContextState) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_ExecuteCommandList, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pCommandList); + encoder->EncodeInt32Value(RestoreContextState); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_HSSetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_HSSetShaderResources, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumViews); + encoder->EncodeObjectArray(ppShaderResourceViews, NumViews); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_HSSetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11HullShader* pHullShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_HSSetShader, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pHullShader); + encoder->EncodeObjectArray(ppClassInstances, NumClassInstances); + encoder->EncodeUInt32Value(NumClassInstances); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_HSSetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_HSSetSamplers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumSamplers); + encoder->EncodeObjectArray(ppSamplers, NumSamplers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_HSSetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_HSSetConstantBuffers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_DSSetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DSSetShaderResources, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumViews); + encoder->EncodeObjectArray(ppShaderResourceViews, NumViews); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_DSSetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11DomainShader* pDomainShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DSSetShader, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pDomainShader); + encoder->EncodeObjectArray(ppClassInstances, NumClassInstances); + encoder->EncodeUInt32Value(NumClassInstances); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_DSSetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DSSetSamplers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumSamplers); + encoder->EncodeObjectArray(ppSamplers, NumSamplers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_DSSetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DSSetConstantBuffers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_CSSetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetShaderResources, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumViews); + encoder->EncodeObjectArray(ppShaderResourceViews, NumViews); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_CSSetUnorderedAccessViews( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView* const* ppUnorderedAccessViews, + const UINT* pUAVInitialCounts) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetUnorderedAccessViews, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumUAVs); + encoder->EncodeObjectArray(ppUnorderedAccessViews, NumUAVs); + encoder->EncodeUInt32Array(pUAVInitialCounts, NumUAVs); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_CSSetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11ComputeShader* pComputeShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetShader, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pComputeShader); + encoder->EncodeObjectArray(ppClassInstances, NumClassInstances); + encoder->EncodeUInt32Value(NumClassInstances); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_CSSetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetSamplers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumSamplers); + encoder->EncodeObjectArray(ppSamplers, NumSamplers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_CSSetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetConstantBuffers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_VSGetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_VSGetConstantBuffers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), wrapper); + } +} + +void Encode_ID3D11DeviceContext_PSGetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_PSGetShaderResources, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumViews); + encoder->EncodeObjectArray(ppShaderResourceViews, NumViews); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11ShaderResourceView, reinterpret_cast(ppShaderResourceViews), wrapper); + } +} + +void Encode_ID3D11DeviceContext_PSGetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11PixelShader** ppPixelShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_PSGetShader, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppPixelShader); + encoder->EncodeObjectArray(ppClassInstances, (pNumClassInstances != nullptr) ? *pNumClassInstances : 0); + encoder->EncodeUInt32Ptr(pNumClassInstances); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_PSGetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_PSGetSamplers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumSamplers); + encoder->EncodeObjectArray(ppSamplers, NumSamplers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11SamplerState, reinterpret_cast(ppSamplers), wrapper); + } +} + +void Encode_ID3D11DeviceContext_VSGetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11VertexShader** ppVertexShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_VSGetShader, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppVertexShader); + encoder->EncodeObjectArray(ppClassInstances, (pNumClassInstances != nullptr) ? *pNumClassInstances : 0); + encoder->EncodeUInt32Ptr(pNumClassInstances); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_PSGetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_PSGetConstantBuffers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), wrapper); + } +} + +void Encode_ID3D11DeviceContext_IAGetInputLayout( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11InputLayout** ppInputLayout) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_IAGetInputLayout, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppInputLayout); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11InputLayout, reinterpret_cast(ppInputLayout), wrapper); + } +} + +void Encode_ID3D11DeviceContext_IAGetVertexBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppVertexBuffers, + UINT* pStrides, + UINT* pOffsets) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_IAGetVertexBuffers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppVertexBuffers, NumBuffers); + encoder->EncodeUInt32Array(pStrides, NumBuffers); + encoder->EncodeUInt32Array(pOffsets, NumBuffers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(ppVertexBuffers), wrapper); + } +} + +void Encode_ID3D11DeviceContext_IAGetIndexBuffer( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer** pIndexBuffer, + DXGI_FORMAT* Format, + UINT* Offset) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_IAGetIndexBuffer, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(pIndexBuffer); + encoder->EncodeEnumPtr(Format); + encoder->EncodeUInt32Ptr(Offset); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(pIndexBuffer), wrapper); + } +} + +void Encode_ID3D11DeviceContext_GSGetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_GSGetConstantBuffers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), wrapper); + } +} + +void Encode_ID3D11DeviceContext_GSGetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11GeometryShader** ppGeometryShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_GSGetShader, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppGeometryShader); + encoder->EncodeObjectArray(ppClassInstances, (pNumClassInstances != nullptr) ? *pNumClassInstances : 0); + encoder->EncodeUInt32Ptr(pNumClassInstances); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_IAGetPrimitiveTopology( + ID3D11DeviceContext_Wrapper* wrapper, + D3D11_PRIMITIVE_TOPOLOGY* pTopology) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_IAGetPrimitiveTopology, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeEnumPtr(pTopology); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_VSGetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_VSGetShaderResources, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumViews); + encoder->EncodeObjectArray(ppShaderResourceViews, NumViews); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11ShaderResourceView, reinterpret_cast(ppShaderResourceViews), wrapper); + } +} + +void Encode_ID3D11DeviceContext_VSGetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_VSGetSamplers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumSamplers); + encoder->EncodeObjectArray(ppSamplers, NumSamplers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11SamplerState, reinterpret_cast(ppSamplers), wrapper); + } +} + +void Encode_ID3D11DeviceContext_GetPredication( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Predicate** ppPredicate, + BOOL* pPredicateValue) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_GetPredication, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppPredicate); + encoder->EncodeInt32Ptr(pPredicateValue); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Predicate, reinterpret_cast(ppPredicate), wrapper); + } +} + +void Encode_ID3D11DeviceContext_GSGetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_GSGetShaderResources, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumViews); + encoder->EncodeObjectArray(ppShaderResourceViews, NumViews); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11ShaderResourceView, reinterpret_cast(ppShaderResourceViews), wrapper); + } +} + +void Encode_ID3D11DeviceContext_GSGetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_GSGetSamplers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumSamplers); + encoder->EncodeObjectArray(ppSamplers, NumSamplers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11SamplerState, reinterpret_cast(ppSamplers), wrapper); + } +} + +void Encode_ID3D11DeviceContext_OMGetRenderTargets( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumViews, + ID3D11RenderTargetView** ppRenderTargetViews, + ID3D11DepthStencilView** ppDepthStencilView) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_OMGetRenderTargets, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(NumViews); + encoder->EncodeObjectArray(ppRenderTargetViews, NumViews); + encoder->EncodeObjectPtr(ppDepthStencilView); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumRTVs, + ID3D11RenderTargetView** ppRenderTargetViews, + ID3D11DepthStencilView** ppDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView** ppUnorderedAccessViews) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(NumRTVs); + encoder->EncodeObjectArray(ppRenderTargetViews, NumRTVs); + encoder->EncodeObjectPtr(ppDepthStencilView); + encoder->EncodeUInt32Value(UAVStartSlot); + encoder->EncodeUInt32Value(NumUAVs); + encoder->EncodeObjectArray(ppUnorderedAccessViews, NumUAVs); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_OMGetBlendState( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11BlendState** ppBlendState, + FLOAT BlendFactor [4], + UINT* pSampleMask) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_OMGetBlendState, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppBlendState); + encoder->EncodeFloatArray(BlendFactor, 4); + encoder->EncodeUInt32Ptr(pSampleMask); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11BlendState, reinterpret_cast(ppBlendState), wrapper); + } +} + +void Encode_ID3D11DeviceContext_OMGetDepthStencilState( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11DepthStencilState** ppDepthStencilState, + UINT* pStencilRef) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_OMGetDepthStencilState, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppDepthStencilState); + encoder->EncodeUInt32Ptr(pStencilRef); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11DepthStencilState, reinterpret_cast(ppDepthStencilState), wrapper); + } +} + +void Encode_ID3D11DeviceContext_SOGetTargets( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumBuffers, + ID3D11Buffer** ppSOTargets) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_SOGetTargets, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppSOTargets, NumBuffers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(ppSOTargets), wrapper); + } +} + +void Encode_ID3D11DeviceContext_RSGetState( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11RasterizerState** ppRasterizerState) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_RSGetState, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppRasterizerState); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11RasterizerState, reinterpret_cast(ppRasterizerState), wrapper); + } +} + +void Encode_ID3D11DeviceContext_RSGetViewports( + ID3D11DeviceContext_Wrapper* wrapper, + UINT* pNumViewports, + D3D11_VIEWPORT* pViewports) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_RSGetViewports, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Ptr(pNumViewports); + EncodeStructArray(encoder, pViewports, ((pNumViewports == nullptr) ? 0 : *pNumViewports)); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_RSGetScissorRects( + ID3D11DeviceContext_Wrapper* wrapper, + UINT* pNumRects, + D3D11_RECT* pRects) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_RSGetScissorRects, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Ptr(pNumRects); + EncodeStructArray(encoder, pRects, ((pNumRects == nullptr) ? 0 : *pNumRects)); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_HSGetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_HSGetShaderResources, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumViews); + encoder->EncodeObjectArray(ppShaderResourceViews, NumViews); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11ShaderResourceView, reinterpret_cast(ppShaderResourceViews), wrapper); + } +} + +void Encode_ID3D11DeviceContext_HSGetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11HullShader** ppHullShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_HSGetShader, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppHullShader); + encoder->EncodeObjectArray(ppClassInstances, (pNumClassInstances != nullptr) ? *pNumClassInstances : 0); + encoder->EncodeUInt32Ptr(pNumClassInstances); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_HSGetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_HSGetSamplers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumSamplers); + encoder->EncodeObjectArray(ppSamplers, NumSamplers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11SamplerState, reinterpret_cast(ppSamplers), wrapper); + } +} + +void Encode_ID3D11DeviceContext_HSGetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_HSGetConstantBuffers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), wrapper); + } +} + +void Encode_ID3D11DeviceContext_DSGetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DSGetShaderResources, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumViews); + encoder->EncodeObjectArray(ppShaderResourceViews, NumViews); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11ShaderResourceView, reinterpret_cast(ppShaderResourceViews), wrapper); + } +} + +void Encode_ID3D11DeviceContext_DSGetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11DomainShader** ppDomainShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DSGetShader, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppDomainShader); + encoder->EncodeObjectArray(ppClassInstances, (pNumClassInstances != nullptr) ? *pNumClassInstances : 0); + encoder->EncodeUInt32Ptr(pNumClassInstances); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_DSGetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DSGetSamplers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumSamplers); + encoder->EncodeObjectArray(ppSamplers, NumSamplers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11SamplerState, reinterpret_cast(ppSamplers), wrapper); + } +} + +void Encode_ID3D11DeviceContext_DSGetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_DSGetConstantBuffers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), wrapper); + } +} + +void Encode_ID3D11DeviceContext_CSGetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetShaderResources, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumViews); + encoder->EncodeObjectArray(ppShaderResourceViews, NumViews); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11ShaderResourceView, reinterpret_cast(ppShaderResourceViews), wrapper); + } +} + +void Encode_ID3D11DeviceContext_CSGetUnorderedAccessViews( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView** ppUnorderedAccessViews) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetUnorderedAccessViews, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumUAVs); + encoder->EncodeObjectArray(ppUnorderedAccessViews, NumUAVs); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11UnorderedAccessView, reinterpret_cast(ppUnorderedAccessViews), wrapper); + } +} + +void Encode_ID3D11DeviceContext_CSGetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11ComputeShader** ppComputeShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetShader, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppComputeShader); + encoder->EncodeObjectArray(ppClassInstances, (pNumClassInstances != nullptr) ? *pNumClassInstances : 0); + encoder->EncodeUInt32Ptr(pNumClassInstances); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_CSGetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetSamplers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumSamplers); + encoder->EncodeObjectArray(ppSamplers, NumSamplers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11SamplerState, reinterpret_cast(ppSamplers), wrapper); + } +} + +void Encode_ID3D11DeviceContext_CSGetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetConstantBuffers, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), wrapper); + } +} + +void Encode_ID3D11DeviceContext_ClearState( + ID3D11DeviceContext_Wrapper* wrapper) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearState, wrapper->GetCaptureId()); + if(encoder) + { + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_Flush( + ID3D11DeviceContext_Wrapper* wrapper) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_Flush, wrapper->GetCaptureId()); + if(encoder) + { + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_GetType( + ID3D11DeviceContext_Wrapper* wrapper, + D3D11_DEVICE_CONTEXT_TYPE return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_GetType, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeEnumValue(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_GetContextFlags( + ID3D11DeviceContext_Wrapper* wrapper, + UINT return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_GetContextFlags, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext_FinishCommandList( + ID3D11DeviceContext_Wrapper* wrapper, + HRESULT return_value, + BOOL RestoreDeferredContextState, + ID3D11CommandList** ppCommandList) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext_FinishCommandList, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeInt32Value(RestoreDeferredContextState); + encoder->EncodeObjectPtr(ppCommandList, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11CommandList, reinterpret_cast(ppCommandList), wrapper); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const CD3D11_VIDEO_DEFAULT& value) +{ +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_DESC& value) +{ + EncodeStruct(encoder, value.Guid); + encoder->EncodeUInt32Value(value.SampleWidth); + encoder->EncodeUInt32Value(value.SampleHeight); + encoder->EncodeEnumValue(value.OutputFormat); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_CONFIG& value) +{ + EncodeStruct(encoder, value.guidConfigBitstreamEncryption); + EncodeStruct(encoder, value.guidConfigMBcontrolEncryption); + EncodeStruct(encoder, value.guidConfigResidDiffEncryption); + encoder->EncodeUInt32Value(value.ConfigBitstreamRaw); + encoder->EncodeUInt32Value(value.ConfigMBcontrolRasterOrder); + encoder->EncodeUInt32Value(value.ConfigResidDiffHost); + encoder->EncodeUInt32Value(value.ConfigSpatialResid8); + encoder->EncodeUInt32Value(value.ConfigResid8Subtraction); + encoder->EncodeUInt32Value(value.ConfigSpatialHost8or9Clipping); + encoder->EncodeUInt32Value(value.ConfigSpatialResidInterleaved); + encoder->EncodeUInt32Value(value.ConfigIntraResidUnsigned); + encoder->EncodeUInt32Value(value.ConfigResidDiffAccelerator); + encoder->EncodeUInt32Value(value.ConfigHostInverseScan); + encoder->EncodeUInt32Value(value.ConfigSpecificIDCT); + encoder->EncodeUInt32Value(value.Config4GroupedCoefs); + encoder->EncodeUInt16Value(value.ConfigMinRenderTargetBuffCount); + encoder->EncodeUInt16Value(value.ConfigDecoderSpecific); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AES_CTR_IV& value) +{ + encoder->EncodeUInt64Value(value.IV); + encoder->EncodeUInt64Value(value.Count); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_ENCRYPTED_BLOCK_INFO& value) +{ + encoder->EncodeUInt32Value(value.NumEncryptedBytesAtBeginning); + encoder->EncodeUInt32Value(value.NumBytesInSkipPattern); + encoder->EncodeUInt32Value(value.NumBytesInEncryptPattern); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_BUFFER_DESC& value) +{ + encoder->EncodeEnumValue(value.BufferType); + encoder->EncodeUInt32Value(value.BufferIndex); + encoder->EncodeUInt32Value(value.DataOffset); + encoder->EncodeUInt32Value(value.DataSize); + encoder->EncodeUInt32Value(value.FirstMBaddress); + encoder->EncodeUInt32Value(value.NumMBsInBuffer); + encoder->EncodeUInt32Value(value.Width); + encoder->EncodeUInt32Value(value.Height); + encoder->EncodeUInt32Value(value.Stride); + encoder->EncodeUInt32Value(value.ReservedBits); + encoder->EncodeVoidArray(value.pIV, value.IVSize); + encoder->EncodeUInt32Value(value.IVSize); + encoder->EncodeInt32Value(value.PartialEncryption); + EncodeStruct(encoder, value.EncryptedBlockInfo); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_EXTENSION& value) +{ + encoder->EncodeUInt32Value(value.Function); + encoder->EncodeVoidArray(value.pPrivateInputData, value.PrivateInputDataSize); + encoder->EncodeUInt32Value(value.PrivateInputDataSize); + encoder->EncodeVoidArray(value.pPrivateOutputData, value.PrivateOutputDataSize); + encoder->EncodeUInt32Value(value.PrivateOutputDataSize); + encoder->EncodeUInt32Value(value.ResourceCount); + encoder->EncodeObjectArray(value.ppResourceList, value.ResourceCount); +} + +void Encode_ID3D11VideoDecoder_GetCreationParameters( + ID3D11VideoDecoder_Wrapper* wrapper, + HRESULT return_value, + D3D11_VIDEO_DECODER_DESC* pVideoDesc, + D3D11_VIDEO_DECODER_CONFIG* pConfig) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDecoder_GetCreationParameters, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pVideoDesc, omit_output_data); + EncodeStructPtr(encoder, pConfig, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDecoder_GetDriverHandle( + ID3D11VideoDecoder_Wrapper* wrapper, + HRESULT return_value, + HANDLE* pDriverHandle) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDecoder_GetDriverHandle, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeVoidPtrPtr(pDriverHandle, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_CAPS& value) +{ + encoder->EncodeUInt32Value(value.DeviceCaps); + encoder->EncodeUInt32Value(value.FeatureCaps); + encoder->EncodeUInt32Value(value.FilterCaps); + encoder->EncodeUInt32Value(value.InputFormatCaps); + encoder->EncodeUInt32Value(value.AutoStreamCaps); + encoder->EncodeUInt32Value(value.StereoCaps); + encoder->EncodeUInt32Value(value.RateConversionCapsCount); + encoder->EncodeUInt32Value(value.MaxInputStreams); + encoder->EncodeUInt32Value(value.MaxStreamStates); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS& value) +{ + encoder->EncodeUInt32Value(value.PastFrames); + encoder->EncodeUInt32Value(value.FutureFrames); + encoder->EncodeUInt32Value(value.ProcessorCaps); + encoder->EncodeUInt32Value(value.ITelecineCaps); + encoder->EncodeUInt32Value(value.CustomRateCount); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_CONTENT_PROTECTION_CAPS& value) +{ + encoder->EncodeUInt32Value(value.Caps); + encoder->EncodeUInt32Value(value.KeyExchangeTypeCount); + encoder->EncodeUInt32Value(value.BlockAlignmentSize); + encoder->EncodeUInt64Value(value.ProtectedMemorySize); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_CUSTOM_RATE& value) +{ + EncodeStruct(encoder, value.CustomRate); + encoder->EncodeUInt32Value(value.OutputFrames); + encoder->EncodeInt32Value(value.InputInterlaced); + encoder->EncodeUInt32Value(value.InputFramesOrFields); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_FILTER_RANGE& value) +{ + encoder->EncodeInt32Value(value.Minimum); + encoder->EncodeInt32Value(value.Maximum); + encoder->EncodeInt32Value(value.Default); + encoder->EncodeFloatValue(value.Multiplier); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_CONTENT_DESC& value) +{ + encoder->EncodeEnumValue(value.InputFrameFormat); + EncodeStruct(encoder, value.InputFrameRate); + encoder->EncodeUInt32Value(value.InputWidth); + encoder->EncodeUInt32Value(value.InputHeight); + EncodeStruct(encoder, value.OutputFrameRate); + encoder->EncodeUInt32Value(value.OutputWidth); + encoder->EncodeUInt32Value(value.OutputHeight); + encoder->EncodeEnumValue(value.Usage); +} + +void Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc( + ID3D11VideoProcessorEnumerator_Wrapper* wrapper, + HRESULT return_value, + D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pContentDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pContentDesc, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat( + ID3D11VideoProcessorEnumerator_Wrapper* wrapper, + HRESULT return_value, + DXGI_FORMAT Format, + UINT* pFlags) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeEnumValue(Format); + encoder->EncodeUInt32Ptr(pFlags, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps( + ID3D11VideoProcessorEnumerator_Wrapper* wrapper, + HRESULT return_value, + D3D11_VIDEO_PROCESSOR_CAPS* pCaps) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pCaps, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps( + ID3D11VideoProcessorEnumerator_Wrapper* wrapper, + HRESULT return_value, + UINT TypeIndex, + D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* pCaps) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt32Value(TypeIndex); + EncodeStructPtr(encoder, pCaps, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate( + ID3D11VideoProcessorEnumerator_Wrapper* wrapper, + HRESULT return_value, + UINT TypeIndex, + UINT CustomRateIndex, + D3D11_VIDEO_PROCESSOR_CUSTOM_RATE* pRate) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt32Value(TypeIndex); + encoder->EncodeUInt32Value(CustomRateIndex); + EncodeStructPtr(encoder, pRate, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange( + ID3D11VideoProcessorEnumerator_Wrapper* wrapper, + HRESULT return_value, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + D3D11_VIDEO_PROCESSOR_FILTER_RANGE* pRange) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeEnumValue(Filter); + EncodeStructPtr(encoder, pRange, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_COLOR_RGBA& value) +{ + encoder->EncodeFloatValue(value.R); + encoder->EncodeFloatValue(value.G); + encoder->EncodeFloatValue(value.B); + encoder->EncodeFloatValue(value.A); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_COLOR_YCbCrA& value) +{ + encoder->EncodeFloatValue(value.Y); + encoder->EncodeFloatValue(value.Cb); + encoder->EncodeFloatValue(value.Cr); + encoder->EncodeFloatValue(value.A); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_COLOR_SPACE& value) +{ + encoder->EncodeUInt32Value(value.Usage); + encoder->EncodeUInt32Value(value.RGB_Range); + encoder->EncodeUInt32Value(value.YCbCr_Matrix); + encoder->EncodeUInt32Value(value.YCbCr_xvYCC); + encoder->EncodeUInt32Value(value.Nominal_Range); + encoder->EncodeUInt32Value(value.Reserved); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_STREAM& value) +{ + encoder->EncodeInt32Value(value.Enable); + encoder->EncodeUInt32Value(value.OutputIndex); + encoder->EncodeUInt32Value(value.InputFrameOrField); + encoder->EncodeUInt32Value(value.PastFrames); + encoder->EncodeUInt32Value(value.FutureFrames); + encoder->EncodeObjectArray(value.ppPastSurfaces, value.PastFrames); + encoder->EncodeObjectValue(value.pInputSurface); + encoder->EncodeObjectArray(value.ppFutureSurfaces, value.FutureFrames); + encoder->EncodeObjectArray(value.ppPastSurfacesRight, value.PastFrames); + encoder->EncodeObjectValue(value.pInputSurfaceRight); + encoder->EncodeObjectArray(value.ppFutureSurfacesRight, value.FutureFrames); +} + +void Encode_ID3D11VideoProcessor_GetContentDesc( + ID3D11VideoProcessor_Wrapper* wrapper, + D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoProcessor_GetContentDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoProcessor_GetRateConversionCaps( + ID3D11VideoProcessor_Wrapper* wrapper, + D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* pCaps) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoProcessor_GetRateConversionCaps, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pCaps); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_OMAC& value) +{ + encoder->EncodeUInt8Array(value.Omac, 16); +} + +void Encode_ID3D11AuthenticatedChannel_GetCertificateSize( + ID3D11AuthenticatedChannel_Wrapper* wrapper, + HRESULT return_value, + UINT* pCertificateSize) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11AuthenticatedChannel_GetCertificateSize, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt32Ptr(pCertificateSize, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11AuthenticatedChannel_GetCertificate( + ID3D11AuthenticatedChannel_Wrapper* wrapper, + HRESULT return_value, + UINT CertificateSize, + BYTE* pCertificate) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11AuthenticatedChannel_GetCertificate, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt32Value(CertificateSize); + encoder->EncodeUInt8Array(pCertificate, CertificateSize /sizeof BYTE, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11AuthenticatedChannel_GetChannelHandle( + ID3D11AuthenticatedChannel_Wrapper* wrapper, + HANDLE* pChannelHandle) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11AuthenticatedChannel_GetChannelHandle, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeVoidPtrPtr(pChannelHandle); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_INPUT& value) +{ + EncodeStruct(encoder, value.QueryType); + encoder->EncodeVoidPtr(value.hChannel); + encoder->EncodeUInt32Value(value.SequenceNumber); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_OUTPUT& value) +{ + EncodeStruct(encoder, value.omac); + EncodeStruct(encoder, value.QueryType); + encoder->EncodeVoidPtr(value.hChannel); + encoder->EncodeUInt32Value(value.SequenceNumber); + encoder->EncodeInt32Value(value.ReturnCode); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT& value) +{ + EncodeStruct(encoder, value.Output); + EncodeStruct(encoder, value.ProtectionFlags); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT& value) +{ + EncodeStruct(encoder, value.Output); + encoder->EncodeEnumValue(value.ChannelType); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT& value) +{ + EncodeStruct(encoder, value.Output); + encoder->EncodeVoidPtr(value.DeviceHandle); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT& value) +{ + EncodeStruct(encoder, value.Input); + encoder->EncodeVoidPtr(value.DecoderHandle); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT& value) +{ + EncodeStruct(encoder, value.Output); + encoder->EncodeVoidPtr(value.DecoderHandle); + encoder->EncodeVoidPtr(value.CryptoSessionHandle); + encoder->EncodeVoidPtr(value.DeviceHandle); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT& value) +{ + EncodeStruct(encoder, value.Output); + encoder->EncodeUInt32Value(value.RestrictedSharedResourceProcessCount); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT& value) +{ + EncodeStruct(encoder, value.Input); + encoder->EncodeUInt32Value(value.ProcessIndex); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT& value) +{ + EncodeStruct(encoder, value.Output); + encoder->EncodeUInt32Value(value.ProcessIndex); + encoder->EncodeEnumValue(value.ProcessIdentifier); + encoder->EncodeVoidPtr(value.ProcessHandle); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT& value) +{ + EncodeStruct(encoder, value.Output); + encoder->EncodeUInt32Value(value.UnrestrictedProtectedSharedResourceCount); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT& value) +{ + EncodeStruct(encoder, value.Input); + encoder->EncodeVoidPtr(value.DeviceHandle); + encoder->EncodeVoidPtr(value.CryptoSessionHandle); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT& value) +{ + EncodeStruct(encoder, value.Output); + encoder->EncodeVoidPtr(value.DeviceHandle); + encoder->EncodeVoidPtr(value.CryptoSessionHandle); + encoder->EncodeUInt32Value(value.OutputIDCount); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT& value) +{ + EncodeStruct(encoder, value.Input); + encoder->EncodeVoidPtr(value.DeviceHandle); + encoder->EncodeVoidPtr(value.CryptoSessionHandle); + encoder->EncodeUInt32Value(value.OutputIDIndex); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT& value) +{ + EncodeStruct(encoder, value.Output); + encoder->EncodeVoidPtr(value.DeviceHandle); + encoder->EncodeVoidPtr(value.CryptoSessionHandle); + encoder->EncodeUInt32Value(value.OutputIDIndex); + encoder->EncodeUInt64Value(value.OutputID); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT& value) +{ + EncodeStruct(encoder, value.Output); + encoder->EncodeEnumValue(value.BusType); + encoder->EncodeInt32Value(value.AccessibleInContiguousBlocks); + encoder->EncodeInt32Value(value.AccessibleInNonContiguousBlocks); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT& value) +{ + EncodeStruct(encoder, value.Output); + encoder->EncodeUInt32Value(value.EncryptionGuidCount); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT& value) +{ + EncodeStruct(encoder, value.Input); + encoder->EncodeUInt32Value(value.EncryptionGuidIndex); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT& value) +{ + EncodeStruct(encoder, value.Output); + encoder->EncodeUInt32Value(value.EncryptionGuidIndex); + EncodeStruct(encoder, value.EncryptionGuid); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT& value) +{ + EncodeStruct(encoder, value.Output); + EncodeStruct(encoder, value.EncryptionGuid); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_CONFIGURE_INPUT& value) +{ + EncodeStruct(encoder, value.omac); + EncodeStruct(encoder, value.ConfigureType); + encoder->EncodeVoidPtr(value.hChannel); + encoder->EncodeUInt32Value(value.SequenceNumber); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_CONFIGURE_OUTPUT& value) +{ + EncodeStruct(encoder, value.omac); + EncodeStruct(encoder, value.ConfigureType); + encoder->EncodeVoidPtr(value.hChannel); + encoder->EncodeUInt32Value(value.SequenceNumber); + encoder->EncodeInt32Value(value.ReturnCode); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT& value) +{ + EncodeStruct(encoder, value.Parameters); + encoder->EncodeUInt32Value(value.StartSequenceQuery); + encoder->EncodeUInt32Value(value.StartSequenceConfigure); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT& value) +{ + EncodeStruct(encoder, value.Parameters); + EncodeStruct(encoder, value.Protections); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT& value) +{ + EncodeStruct(encoder, value.Parameters); + encoder->EncodeVoidPtr(value.DecoderHandle); + encoder->EncodeVoidPtr(value.CryptoSessionHandle); + encoder->EncodeVoidPtr(value.DeviceHandle); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT& value) +{ + EncodeStruct(encoder, value.Parameters); + encoder->EncodeEnumValue(value.ProcessType); + encoder->EncodeVoidPtr(value.ProcessHandle); + encoder->EncodeInt32Value(value.AllowAccess); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT& value) +{ + EncodeStruct(encoder, value.Parameters); + EncodeStruct(encoder, value.EncryptionGuid); +} + +void Encode_ID3D11CryptoSession_GetCryptoType( + ID3D11CryptoSession_Wrapper* wrapper, + GUID* pCryptoType) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11CryptoSession_GetCryptoType, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pCryptoType); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11CryptoSession_GetDecoderProfile( + ID3D11CryptoSession_Wrapper* wrapper, + GUID* pDecoderProfile) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11CryptoSession_GetDecoderProfile, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDecoderProfile); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11CryptoSession_GetCertificateSize( + ID3D11CryptoSession_Wrapper* wrapper, + HRESULT return_value, + UINT* pCertificateSize) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11CryptoSession_GetCertificateSize, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt32Ptr(pCertificateSize, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11CryptoSession_GetCertificate( + ID3D11CryptoSession_Wrapper* wrapper, + HRESULT return_value, + UINT CertificateSize, + BYTE* pCertificate) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11CryptoSession_GetCertificate, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt32Value(CertificateSize); + encoder->EncodeUInt8Array(pCertificate, CertificateSize /sizeof BYTE, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11CryptoSession_GetCryptoSessionHandle( + ID3D11CryptoSession_Wrapper* wrapper, + HANDLE* pCryptoSessionHandle) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11CryptoSession_GetCryptoSessionHandle, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeVoidPtrPtr(pCryptoSessionHandle); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_VDOV& value) +{ + encoder->EncodeUInt32Value(value.ArraySlice); +} + +void Encode_ID3D11VideoDecoderOutputView_GetDesc( + ID3D11VideoDecoderOutputView_Wrapper* wrapper, + D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDecoderOutputView_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_VPIV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); + encoder->EncodeUInt32Value(value.ArraySlice); +} + +void Encode_ID3D11VideoProcessorInputView_GetDesc( + ID3D11VideoProcessorInputView_Wrapper* wrapper, + D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoProcessorInputView_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_VPOV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_VPOV& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); +} + +void Encode_ID3D11VideoProcessorOutputView_GetDesc( + ID3D11VideoProcessorOutputView_Wrapper* wrapper, + D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoProcessorOutputView_GetDesc, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_GetDecoderBuffer( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type, + UINT* pBufferSize, + void** ppBuffer) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_GetDecoderBuffer, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pDecoder); + encoder->EncodeEnumValue(Type); + encoder->EncodeUInt32Ptr(pBufferSize, omit_output_data); + encoder->EncodeVoidArray((ppBuffer != nullptr) ? *ppBuffer : nullptr, (pBufferSize != nullptr) ? *pBufferSize : 0, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_ReleaseDecoderBuffer( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_ReleaseDecoderBuffer, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pDecoder); + encoder->EncodeEnumValue(Type); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_DecoderBeginFrame( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + ID3D11VideoDecoderOutputView* pView, + UINT ContentKeySize, + const void* pContentKey) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_DecoderBeginFrame, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pDecoder); + encoder->EncodeObjectValue(pView); + encoder->EncodeUInt32Value(ContentKeySize); + encoder->EncodeVoidArray(pContentKey, ContentKeySize); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_DecoderEndFrame( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_DecoderEndFrame, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pDecoder); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_SubmitDecoderBuffers( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + UINT NumBuffers, + const D3D11_VIDEO_DECODER_BUFFER_DESC* pBufferDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_SubmitDecoderBuffers, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pDecoder); + encoder->EncodeUInt32Value(NumBuffers); + EncodeStructArray(encoder, pBufferDesc, NumBuffers); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_DecoderExtension( + ID3D11VideoContext_Wrapper* wrapper, + APP_DEPRECATED_HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + const D3D11_VIDEO_DECODER_EXTENSION* pExtensionData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_DecoderExtension, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pDecoder); + EncodeStructPtr(encoder, pExtensionData); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetOutputTargetRect( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL Enable, + const RECT* pRect) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputTargetRect, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeInt32Value(Enable); + EncodeStructPtr(encoder, pRect); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL YCbCr, + const D3D11_VIDEO_COLOR* pColor) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeInt32Value(YCbCr); + EncodeStructPtr(encoder, pColor); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetOutputColorSpace( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + const D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputColorSpace, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + EncodeStructPtr(encoder, pColorSpace); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE AlphaFillMode, + UINT StreamIndex) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeEnumValue(AlphaFillMode); + encoder->EncodeUInt32Value(StreamIndex); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetOutputConstriction( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL Enable, + SIZE Size) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputConstriction, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeInt32Value(Enable); + EncodeStruct(encoder, Size); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetOutputStereoMode( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL Enable) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputStereoMode, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeInt32Value(Enable); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetOutputExtension( + ID3D11VideoContext_Wrapper* wrapper, + APP_DEPRECATED_HRESULT return_value, + ID3D11VideoProcessor* pVideoProcessor, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputExtension, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + EncodeStructPtr(encoder, pExtensionGuid); + encoder->EncodeUInt32Value(DataSize); + encoder->EncodeVoidPtr(pData); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetOutputTargetRect( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL* Enabled, + RECT* pRect) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputTargetRect, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeInt32Ptr(Enabled); + EncodeStructPtr(encoder, pRect); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pYCbCr, + D3D11_VIDEO_COLOR* pColor) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeInt32Ptr(pYCbCr); + EncodeStructPtr(encoder, pColor); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetOutputColorSpace( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputColorSpace, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + EncodeStructPtr(encoder, pColorSpace); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE* pAlphaFillMode, + UINT* pStreamIndex) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeEnumPtr(pAlphaFillMode); + encoder->EncodeUInt32Ptr(pStreamIndex); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetOutputConstriction( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pEnabled, + SIZE* pSize) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputConstriction, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeInt32Ptr(pEnabled); + EncodeStructPtr(encoder, pSize); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetOutputStereoMode( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pEnabled) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputStereoMode, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeInt32Ptr(pEnabled); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetOutputExtension( + ID3D11VideoContext_Wrapper* wrapper, + APP_DEPRECATED_HRESULT return_value, + ID3D11VideoProcessor* pVideoProcessor, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputExtension, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + EncodeStructPtr(encoder, pExtensionGuid); + encoder->EncodeUInt32Value(DataSize); + encoder->EncodeVoidArray(pData, DataSize); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_FRAME_FORMAT FrameFormat) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeEnumValue(FrameFormat); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamColorSpace( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + const D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamColorSpace, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + EncodeStructPtr(encoder, pColorSpace); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamOutputRate( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate, + BOOL RepeatFrame, + const DXGI_RATIONAL* pCustomRate) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamOutputRate, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeEnumValue(OutputRate); + encoder->EncodeInt32Value(RepeatFrame); + EncodeStructPtr(encoder, pCustomRate); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamSourceRect( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + const RECT* pRect) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamSourceRect, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Value(Enable); + EncodeStructPtr(encoder, pRect); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamDestRect( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + const RECT* pRect) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamDestRect, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Value(Enable); + EncodeStructPtr(encoder, pRect); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamAlpha( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Alpha) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamAlpha, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Value(Enable); + encoder->EncodeFloatValue(Alpha); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamPalette( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + UINT Count, + const UINT* pEntries) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamPalette, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeUInt32Value(Count); + encoder->EncodeUInt32Array(pEntries, Count); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + const DXGI_RATIONAL* pSourceAspectRatio, + const DXGI_RATIONAL* pDestinationAspectRatio) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Value(Enable); + EncodeStructPtr(encoder, pSourceAspectRatio); + EncodeStructPtr(encoder, pDestinationAspectRatio); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamLumaKey( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Lower, + FLOAT Upper) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamLumaKey, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Value(Enable); + encoder->EncodeFloatValue(Lower); + encoder->EncodeFloatValue(Upper); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT Format, + BOOL LeftViewFrame0, + BOOL BaseViewFrame0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode, + int MonoOffset) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Value(Enable); + encoder->EncodeEnumValue(Format); + encoder->EncodeInt32Value(LeftViewFrame0); + encoder->EncodeInt32Value(BaseViewFrame0); + encoder->EncodeEnumValue(FlipMode); + encoder->EncodeInt32Value(MonoOffset); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Value(Enable); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamFilter( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + BOOL Enable, + int Level) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamFilter, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeEnumValue(Filter); + encoder->EncodeInt32Value(Enable); + encoder->EncodeInt32Value(Level); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamExtension( + ID3D11VideoContext_Wrapper* wrapper, + APP_DEPRECATED_HRESULT return_value, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamExtension, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + EncodeStructPtr(encoder, pExtensionGuid); + encoder->EncodeUInt32Value(DataSize); + encoder->EncodeVoidPtr(pData); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_FRAME_FORMAT* pFrameFormat) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeEnumPtr(pFrameFormat); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamColorSpace( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamColorSpace, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + EncodeStructPtr(encoder, pColorSpace); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamOutputRate( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE* pOutputRate, + BOOL* pRepeatFrame, + DXGI_RATIONAL* pCustomRate) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamOutputRate, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeEnumPtr(pOutputRate); + encoder->EncodeInt32Ptr(pRepeatFrame); + EncodeStructPtr(encoder, pCustomRate); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamSourceRect( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + RECT* pRect) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamSourceRect, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Ptr(pEnabled); + EncodeStructPtr(encoder, pRect); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamDestRect( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + RECT* pRect) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamDestRect, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Ptr(pEnabled); + EncodeStructPtr(encoder, pRect); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamAlpha( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + FLOAT* pAlpha) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamAlpha, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Ptr(pEnabled); + encoder->EncodeFloatPtr(pAlpha); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamPalette( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + UINT Count, + UINT* pEntries) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamPalette, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeUInt32Value(Count); + encoder->EncodeUInt32Array(pEntries, Count); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + DXGI_RATIONAL* pSourceAspectRatio, + DXGI_RATIONAL* pDestinationAspectRatio) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Ptr(pEnabled); + EncodeStructPtr(encoder, pSourceAspectRatio); + EncodeStructPtr(encoder, pDestinationAspectRatio); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamLumaKey( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + FLOAT* pLower, + FLOAT* pUpper) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamLumaKey, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Ptr(pEnabled); + encoder->EncodeFloatPtr(pLower); + encoder->EncodeFloatPtr(pUpper); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnable, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT* pFormat, + BOOL* pLeftViewFrame0, + BOOL* pBaseViewFrame0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE* pFlipMode, + int* MonoOffset) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Ptr(pEnable); + encoder->EncodeEnumPtr(pFormat); + encoder->EncodeInt32Ptr(pLeftViewFrame0); + encoder->EncodeInt32Ptr(pBaseViewFrame0); + encoder->EncodeEnumPtr(pFlipMode); + encoder->EncodeInt32Ptr(MonoOffset); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Ptr(pEnabled); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamFilter( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + BOOL* pEnabled, + int* pLevel) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamFilter, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeEnumValue(Filter); + encoder->EncodeInt32Ptr(pEnabled); + encoder->EncodeInt32Ptr(pLevel); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamExtension( + ID3D11VideoContext_Wrapper* wrapper, + APP_DEPRECATED_HRESULT return_value, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamExtension, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + EncodeStructPtr(encoder, pExtensionGuid); + encoder->EncodeUInt32Value(DataSize); + encoder->EncodeVoidArray(pData, DataSize); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorBlt( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoProcessor* pVideoProcessor, + ID3D11VideoProcessorOutputView* pView, + UINT OutputFrame, + UINT StreamCount, + const D3D11_VIDEO_PROCESSOR_STREAM* pStreams) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorBlt, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeObjectValue(pView); + encoder->EncodeUInt32Value(OutputFrame); + encoder->EncodeUInt32Value(StreamCount); + EncodeStructArray(encoder, pStreams, StreamCount); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11CryptoSession* pCryptoSession, + UINT DataSize, + void* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pCryptoSession); + encoder->EncodeUInt32Value(DataSize); + encoder->EncodeVoidArray(pData, DataSize, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_EncryptionBlt( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11CryptoSession* pCryptoSession, + ID3D11Texture2D* pSrcSurface, + ID3D11Texture2D* pDstSurface, + UINT IVSize, + void* pIV) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_EncryptionBlt, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pCryptoSession); + encoder->EncodeObjectValue(pSrcSurface); + encoder->EncodeObjectValue(pDstSurface); + encoder->EncodeUInt32Value(IVSize); + encoder->EncodeVoidArray(pIV, IVSize); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_DecryptionBlt( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11CryptoSession* pCryptoSession, + ID3D11Texture2D* pSrcSurface, + ID3D11Texture2D* pDstSurface, + D3D11_ENCRYPTED_BLOCK_INFO* pEncryptedBlockInfo, + UINT ContentKeySize, + const void* pContentKey, + UINT IVSize, + void* pIV) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_DecryptionBlt, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pCryptoSession); + encoder->EncodeObjectValue(pSrcSurface); + encoder->EncodeObjectValue(pDstSurface); + EncodeStructPtr(encoder, pEncryptedBlockInfo); + encoder->EncodeUInt32Value(ContentKeySize); + encoder->EncodeVoidArray(pContentKey, ContentKeySize); + encoder->EncodeUInt32Value(IVSize); + encoder->EncodeVoidArray(pIV, IVSize); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_StartSessionKeyRefresh( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11CryptoSession* pCryptoSession, + UINT RandomNumberSize, + void* pRandomNumber) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_StartSessionKeyRefresh, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pCryptoSession); + encoder->EncodeUInt32Value(RandomNumberSize); + encoder->EncodeVoidArray(pRandomNumber, RandomNumberSize); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_FinishSessionKeyRefresh( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11CryptoSession* pCryptoSession) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_FinishSessionKeyRefresh, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pCryptoSession); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_GetEncryptionBltKey( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11CryptoSession* pCryptoSession, + UINT KeySize, + void* pReadbackKey) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_GetEncryptionBltKey, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pCryptoSession); + encoder->EncodeUInt32Value(KeySize); + encoder->EncodeVoidArray(pReadbackKey, KeySize, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11AuthenticatedChannel* pChannel, + UINT DataSize, + void* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pChannel); + encoder->EncodeUInt32Value(DataSize); + encoder->EncodeVoidArray(pData, DataSize, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_QueryAuthenticatedChannel( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11AuthenticatedChannel* pChannel, + UINT InputSize, + const void* pInput, + UINT OutputSize, + void* pOutput) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_QueryAuthenticatedChannel, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pChannel); + encoder->EncodeUInt32Value(InputSize); + encoder->EncodeVoidArray(pInput, InputSize); + encoder->EncodeUInt32Value(OutputSize); + encoder->EncodeVoidArray(pOutput, OutputSize, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_ConfigureAuthenticatedChannel( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11AuthenticatedChannel* pChannel, + UINT InputSize, + const void* pInput, + D3D11_AUTHENTICATED_CONFIGURE_OUTPUT* pOutput) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_ConfigureAuthenticatedChannel, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pChannel); + encoder->EncodeUInt32Value(InputSize); + encoder->EncodeVoidArray(pInput, InputSize); + EncodeStructPtr(encoder, pOutput, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamRotation( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_ROTATION Rotation) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamRotation, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Value(Enable); + encoder->EncodeEnumValue(Rotation); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamRotation( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnable, + D3D11_VIDEO_PROCESSOR_ROTATION* pRotation) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamRotation, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Ptr(pEnable); + encoder->EncodeEnumPtr(pRotation); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice_CreateVideoDecoder( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const D3D11_VIDEO_DECODER_DESC* pVideoDesc, + const D3D11_VIDEO_DECODER_CONFIG* pConfig, + ID3D11VideoDecoder** ppDecoder) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoDecoder, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pVideoDesc); + EncodeStructPtr(encoder, pConfig); + encoder->EncodeObjectPtr(ppDecoder, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11VideoDecoder, reinterpret_cast(ppDecoder), wrapper); + } +} + +void Encode_ID3D11VideoDevice_CreateVideoProcessor( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoProcessorEnumerator* pEnum, + UINT RateConversionIndex, + ID3D11VideoProcessor** ppVideoProcessor) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoProcessor, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pEnum); + encoder->EncodeUInt32Value(RateConversionIndex); + encoder->EncodeObjectPtr(ppVideoProcessor, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11VideoProcessor, reinterpret_cast(ppVideoProcessor), wrapper); + } +} + +void Encode_ID3D11VideoDevice_CreateAuthenticatedChannel( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType, + ID3D11AuthenticatedChannel** ppAuthenticatedChannel) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateAuthenticatedChannel, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeEnumValue(ChannelType); + encoder->EncodeObjectPtr(ppAuthenticatedChannel, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11AuthenticatedChannel, reinterpret_cast(ppAuthenticatedChannel), wrapper); + } +} + +void Encode_ID3D11VideoDevice_CreateCryptoSession( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const GUID* pCryptoType, + const GUID* pDecoderProfile, + const GUID* pKeyExchangeType, + ID3D11CryptoSession** ppCryptoSession) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateCryptoSession, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pCryptoType); + EncodeStructPtr(encoder, pDecoderProfile); + EncodeStructPtr(encoder, pKeyExchangeType); + encoder->EncodeObjectPtr(ppCryptoSession, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice_CreateVideoDecoderOutputView( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* pDesc, + ID3D11VideoDecoderOutputView** ppVDOVView) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoDecoderOutputView, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pResource); + EncodeStructPtr(encoder, pDesc); + encoder->EncodeObjectPtr(ppVDOVView, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11VideoDecoderOutputView, reinterpret_cast(ppVDOVView), wrapper); + } +} + +void Encode_ID3D11VideoDevice_CreateVideoProcessorInputView( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + ID3D11VideoProcessorEnumerator* pEnum, + const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* pDesc, + ID3D11VideoProcessorInputView** ppVPIView) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoProcessorInputView, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pResource); + encoder->EncodeObjectValue(pEnum); + EncodeStructPtr(encoder, pDesc); + encoder->EncodeObjectPtr(ppVPIView, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11VideoProcessorInputView, reinterpret_cast(ppVPIView), wrapper); + } +} + +void Encode_ID3D11VideoDevice_CreateVideoProcessorOutputView( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + ID3D11VideoProcessorEnumerator* pEnum, + const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* pDesc, + ID3D11VideoProcessorOutputView** ppVPOView) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoProcessorOutputView, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pResource); + encoder->EncodeObjectValue(pEnum); + EncodeStructPtr(encoder, pDesc); + encoder->EncodeObjectPtr(ppVPOView, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11VideoProcessorOutputView, reinterpret_cast(ppVPOView), wrapper); + } +} + +void Encode_ID3D11VideoDevice_CreateVideoProcessorEnumerator( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pDesc, + ID3D11VideoProcessorEnumerator** ppEnum) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoProcessorEnumerator, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pDesc); + encoder->EncodeObjectPtr(ppEnum, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11VideoProcessorEnumerator, reinterpret_cast(ppEnum), wrapper); + } +} + +void Encode_ID3D11VideoDevice_GetVideoDecoderProfileCount( + ID3D11VideoDevice_Wrapper* wrapper, + UINT return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_GetVideoDecoderProfileCount, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice_GetVideoDecoderProfile( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + UINT Index, + GUID* pDecoderProfile) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_GetVideoDecoderProfile, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt32Value(Index); + EncodeStructPtr(encoder, pDecoderProfile, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice_CheckVideoDecoderFormat( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const GUID* pDecoderProfile, + DXGI_FORMAT Format, + BOOL* pSupported) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_CheckVideoDecoderFormat, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pDecoderProfile); + encoder->EncodeEnumValue(Format); + encoder->EncodeInt32Ptr(pSupported, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice_GetVideoDecoderConfigCount( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const D3D11_VIDEO_DECODER_DESC* pDesc, + UINT* pCount) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_GetVideoDecoderConfigCount, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pDesc); + encoder->EncodeUInt32Ptr(pCount, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice_GetVideoDecoderConfig( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const D3D11_VIDEO_DECODER_DESC* pDesc, + UINT Index, + D3D11_VIDEO_DECODER_CONFIG* pConfig) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_GetVideoDecoderConfig, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pDesc); + encoder->EncodeUInt32Value(Index); + EncodeStructPtr(encoder, pConfig, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice_GetContentProtectionCaps( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const GUID* pCryptoType, + const GUID* pDecoderProfile, + D3D11_VIDEO_CONTENT_PROTECTION_CAPS* pCaps) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_GetContentProtectionCaps, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pCryptoType); + EncodeStructPtr(encoder, pDecoderProfile); + EncodeStructPtr(encoder, pCaps, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice_CheckCryptoKeyExchange( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const GUID* pCryptoType, + const GUID* pDecoderProfile, + UINT Index, + GUID* pKeyExchangeType) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_CheckCryptoKeyExchange, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pCryptoType); + EncodeStructPtr(encoder, pDecoderProfile); + encoder->EncodeUInt32Value(Index); + EncodeStructPtr(encoder, pKeyExchangeType, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice_SetPrivateData( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + UINT DataSize, + const void* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_SetPrivateData, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStruct(encoder, guid); + encoder->EncodeUInt32Value(DataSize); + encoder->EncodeVoidArray(pData, DataSize); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice_SetPrivateDataInterface( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + const IUnknown* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice_SetPrivateDataInterface, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStruct(encoder, guid); + encoder->EncodeObjectValue(pData); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device_CreateShaderResourceView( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc, + ID3D11ShaderResourceView** ppSRView) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateShaderResourceView, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pResource); + EncodeStructPtr(encoder, pDesc); + encoder->EncodeObjectPtr(ppSRView, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11ShaderResourceView, reinterpret_cast(ppSRView), wrapper); + } +} + +void Encode_ID3D11Device_CreateUnorderedAccessView( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc, + ID3D11UnorderedAccessView** ppUAView) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateUnorderedAccessView, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pResource); + EncodeStructPtr(encoder, pDesc); + encoder->EncodeObjectPtr(ppUAView, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11UnorderedAccessView, reinterpret_cast(ppUAView), wrapper); + } +} + +void Encode_ID3D11Device_CreateRenderTargetView( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_RENDER_TARGET_VIEW_DESC* pDesc, + ID3D11RenderTargetView** ppRTView) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateRenderTargetView, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pResource); + EncodeStructPtr(encoder, pDesc); + encoder->EncodeObjectPtr(ppRTView, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11RenderTargetView, reinterpret_cast(ppRTView), wrapper); + } +} + +void Encode_ID3D11Device_CreateDepthStencilView( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc, + ID3D11DepthStencilView** ppDepthStencilView) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateDepthStencilView, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pResource); + EncodeStructPtr(encoder, pDesc); + encoder->EncodeObjectPtr(ppDepthStencilView, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11DepthStencilView, reinterpret_cast(ppDepthStencilView), wrapper); + } +} + +void Encode_ID3D11Device_CreateInputLayout( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_INPUT_ELEMENT_DESC* pInputElementDescs, + UINT NumElements, + const void* pShaderBytecodeWithInputSignature, + SIZE_T BytecodeLength, + ID3D11InputLayout** ppInputLayout) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateInputLayout, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructArray(encoder, pInputElementDescs, NumElements); + encoder->EncodeUInt32Value(NumElements); + encoder->EncodeVoidArray(pShaderBytecodeWithInputSignature, BytecodeLength); + encoder->EncodeSizeTValue(BytecodeLength); + encoder->EncodeObjectPtr(ppInputLayout, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11InputLayout, reinterpret_cast(ppInputLayout), wrapper); + } +} + +void Encode_ID3D11Device_CreateVertexShader( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11VertexShader** ppVertexShader) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateVertexShader, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeVoidArray(pShaderBytecode, BytecodeLength); + encoder->EncodeSizeTValue(BytecodeLength); + encoder->EncodeObjectValue(pClassLinkage); + encoder->EncodeObjectPtr(ppVertexShader, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11VertexShader, reinterpret_cast(ppVertexShader), wrapper); + } +} + +void Encode_ID3D11Device_CreateGeometryShader( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11GeometryShader** ppGeometryShader) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateGeometryShader, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeVoidArray(pShaderBytecode, BytecodeLength); + encoder->EncodeSizeTValue(BytecodeLength); + encoder->EncodeObjectValue(pClassLinkage); + encoder->EncodeObjectPtr(ppGeometryShader, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11GeometryShader, reinterpret_cast(ppGeometryShader), wrapper); + } +} + +void Encode_ID3D11Device_CreateGeometryShaderWithStreamOutput( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const void* pShaderBytecode, + SIZE_T BytecodeLength, + const D3D11_SO_DECLARATION_ENTRY* pSODeclaration, + UINT NumEntries, + const UINT* pBufferStrides, + UINT NumStrides, + UINT RasterizedStream, + ID3D11ClassLinkage* pClassLinkage, + ID3D11GeometryShader** ppGeometryShader) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateGeometryShaderWithStreamOutput, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeVoidArray(pShaderBytecode, BytecodeLength); + encoder->EncodeSizeTValue(BytecodeLength); + EncodeStructArray(encoder, pSODeclaration, NumEntries); + encoder->EncodeUInt32Value(NumEntries); + encoder->EncodeUInt32Array(pBufferStrides, NumStrides); + encoder->EncodeUInt32Value(NumStrides); + encoder->EncodeUInt32Value(RasterizedStream); + encoder->EncodeObjectValue(pClassLinkage); + encoder->EncodeObjectPtr(ppGeometryShader, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11GeometryShader, reinterpret_cast(ppGeometryShader), wrapper); + } +} + +void Encode_ID3D11Device_CreatePixelShader( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11PixelShader** ppPixelShader) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreatePixelShader, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeVoidArray(pShaderBytecode, BytecodeLength); + encoder->EncodeSizeTValue(BytecodeLength); + encoder->EncodeObjectValue(pClassLinkage); + encoder->EncodeObjectPtr(ppPixelShader, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11PixelShader, reinterpret_cast(ppPixelShader), wrapper); + } +} + +void Encode_ID3D11Device_CreateHullShader( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11HullShader** ppHullShader) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateHullShader, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeVoidArray(pShaderBytecode, BytecodeLength); + encoder->EncodeSizeTValue(BytecodeLength); + encoder->EncodeObjectValue(pClassLinkage); + encoder->EncodeObjectPtr(ppHullShader, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11HullShader, reinterpret_cast(ppHullShader), wrapper); + } +} + +void Encode_ID3D11Device_CreateDomainShader( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11DomainShader** ppDomainShader) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateDomainShader, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeVoidArray(pShaderBytecode, BytecodeLength); + encoder->EncodeSizeTValue(BytecodeLength); + encoder->EncodeObjectValue(pClassLinkage); + encoder->EncodeObjectPtr(ppDomainShader, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11DomainShader, reinterpret_cast(ppDomainShader), wrapper); + } +} + +void Encode_ID3D11Device_CreateComputeShader( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11ComputeShader** ppComputeShader) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateComputeShader, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeVoidArray(pShaderBytecode, BytecodeLength); + encoder->EncodeSizeTValue(BytecodeLength); + encoder->EncodeObjectValue(pClassLinkage); + encoder->EncodeObjectPtr(ppComputeShader, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11ComputeShader, reinterpret_cast(ppComputeShader), wrapper); + } +} + +void Encode_ID3D11Device_CreateClassLinkage( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + ID3D11ClassLinkage** ppLinkage) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateClassLinkage, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectPtr(ppLinkage, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11ClassLinkage, reinterpret_cast(ppLinkage), wrapper); + } +} + +void Encode_ID3D11Device_CreateBlendState( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_BLEND_DESC* pBlendStateDesc, + ID3D11BlendState** ppBlendState) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateBlendState, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pBlendStateDesc); + encoder->EncodeObjectPtr(ppBlendState, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11BlendState, reinterpret_cast(ppBlendState), wrapper); + } +} + +void Encode_ID3D11Device_CreateDepthStencilState( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_DEPTH_STENCIL_DESC* pDepthStencilDesc, + ID3D11DepthStencilState** ppDepthStencilState) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateDepthStencilState, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pDepthStencilDesc); + encoder->EncodeObjectPtr(ppDepthStencilState, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11DepthStencilState, reinterpret_cast(ppDepthStencilState), wrapper); + } +} + +void Encode_ID3D11Device_CreateRasterizerState( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_RASTERIZER_DESC* pRasterizerDesc, + ID3D11RasterizerState** ppRasterizerState) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateRasterizerState, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pRasterizerDesc); + encoder->EncodeObjectPtr(ppRasterizerState, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11RasterizerState, reinterpret_cast(ppRasterizerState), wrapper); + } +} + +void Encode_ID3D11Device_CreateSamplerState( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_SAMPLER_DESC* pSamplerDesc, + ID3D11SamplerState** ppSamplerState) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateSamplerState, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pSamplerDesc); + encoder->EncodeObjectPtr(ppSamplerState, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11SamplerState, reinterpret_cast(ppSamplerState), wrapper); + } +} + +void Encode_ID3D11Device_CreateQuery( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_QUERY_DESC* pQueryDesc, + ID3D11Query** ppQuery) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateQuery, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pQueryDesc); + encoder->EncodeObjectPtr(ppQuery, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11Query, reinterpret_cast(ppQuery), wrapper); + } +} + +void Encode_ID3D11Device_CreatePredicate( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_QUERY_DESC* pPredicateDesc, + ID3D11Predicate** ppPredicate) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreatePredicate, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pPredicateDesc); + encoder->EncodeObjectPtr(ppPredicate, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11Predicate, reinterpret_cast(ppPredicate), wrapper); + } +} + +void Encode_ID3D11Device_CreateCounter( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_COUNTER_DESC* pCounterDesc, + ID3D11Counter** ppCounter) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateCounter, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pCounterDesc); + encoder->EncodeObjectPtr(ppCounter, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11Counter, reinterpret_cast(ppCounter), wrapper); + } +} + +void Encode_ID3D11Device_CreateDeferredContext( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + UINT ContextFlags, + ID3D11DeviceContext** ppDeferredContext) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CreateDeferredContext, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt32Value(ContextFlags); + encoder->EncodeObjectPtr(ppDeferredContext, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11DeviceContext, reinterpret_cast(ppDeferredContext), wrapper); + } +} + +void Encode_ID3D11Device_OpenSharedResource( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + HANDLE hResource, + REFIID ReturnedInterface, + void** ppResource) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_OpenSharedResource, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeVoidPtr(hResource); + EncodeStruct(encoder, ReturnedInterface); + encoder->EncodeObjectPtr(ppResource, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, ReturnedInterface, ppResource, wrapper); + } +} + +void Encode_ID3D11Device_CheckFormatSupport( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + DXGI_FORMAT Format, + UINT* pFormatSupport) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CheckFormatSupport, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeEnumValue(Format); + encoder->EncodeUInt32Ptr(pFormatSupport, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device_CheckMultisampleQualityLevels( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + DXGI_FORMAT Format, + UINT SampleCount, + UINT* pNumQualityLevels) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CheckMultisampleQualityLevels, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeEnumValue(Format); + encoder->EncodeUInt32Value(SampleCount); + encoder->EncodeUInt32Ptr(pNumQualityLevels, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device_CheckCounterInfo( + ID3D11Device_Wrapper* wrapper, + D3D11_COUNTER_INFO* pCounterInfo) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CheckCounterInfo, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pCounterInfo); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device_CheckCounter( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_COUNTER_DESC* pDesc, + D3D11_COUNTER_TYPE* pType, + UINT* pActiveCounters, + LPSTR szName, + UINT* pNameLength, + LPSTR szUnits, + UINT* pUnitsLength, + LPSTR szDescription, + UINT* pDescriptionLength) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_CheckCounter, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pDesc); + encoder->EncodeEnumPtr(pType, omit_output_data); + encoder->EncodeUInt32Ptr(pActiveCounters, omit_output_data); + encoder->EncodeString(szName); + encoder->EncodeUInt32Ptr(pNameLength, omit_output_data); + encoder->EncodeString(szUnits); + encoder->EncodeUInt32Ptr(pUnitsLength, omit_output_data); + encoder->EncodeString(szDescription); + encoder->EncodeUInt32Ptr(pDescriptionLength, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device_GetPrivateData( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + UINT* pDataSize, + void* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_GetPrivateData, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStruct(encoder, guid); + encoder->EncodeUInt32Ptr(pDataSize, omit_output_data); + encoder->EncodeVoidArray(pData, (pDataSize != nullptr) ? *pDataSize : 0, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device_SetPrivateData( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + UINT DataSize, + const void* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_SetPrivateData, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStruct(encoder, guid); + encoder->EncodeUInt32Value(DataSize); + encoder->EncodeVoidArray(pData, DataSize); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device_SetPrivateDataInterface( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + const IUnknown* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_SetPrivateDataInterface, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStruct(encoder, guid); + encoder->EncodeObjectValue(pData); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device_GetFeatureLevel( + ID3D11Device_Wrapper* wrapper, + D3D_FEATURE_LEVEL return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_GetFeatureLevel, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeEnumValue(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device_GetCreationFlags( + ID3D11Device_Wrapper* wrapper, + UINT return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_GetCreationFlags, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device_GetDeviceRemovedReason( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_GetDeviceRemovedReason, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device_GetImmediateContext( + ID3D11Device_Wrapper* wrapper, + ID3D11DeviceContext** ppImmediateContext) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_GetImmediateContext, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppImmediateContext); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11DeviceContext, reinterpret_cast(ppImmediateContext), wrapper); + } +} + +void Encode_ID3D11Device_SetExceptionMode( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + UINT RaiseFlags) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_SetExceptionMode, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt32Value(RaiseFlags); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device_GetExceptionMode( + ID3D11Device_Wrapper* wrapper, + UINT return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device_GetExceptionMode, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + + +/* +** This part is generated from d3d11_1.h in Windows SDK: 10.0.20348.0 +** +*/ + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RENDER_TARGET_BLEND_DESC1& value) +{ + encoder->EncodeInt32Value(value.BlendEnable); + encoder->EncodeInt32Value(value.LogicOpEnable); + encoder->EncodeEnumValue(value.SrcBlend); + encoder->EncodeEnumValue(value.DestBlend); + encoder->EncodeEnumValue(value.BlendOp); + encoder->EncodeEnumValue(value.SrcBlendAlpha); + encoder->EncodeEnumValue(value.DestBlendAlpha); + encoder->EncodeEnumValue(value.BlendOpAlpha); + encoder->EncodeEnumValue(value.LogicOp); + encoder->EncodeUInt8Value(value.RenderTargetWriteMask); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BLEND_DESC1& value) +{ + encoder->EncodeInt32Value(value.AlphaToCoverageEnable); + encoder->EncodeInt32Value(value.IndependentBlendEnable); + EncodeStructArray(encoder, value.RenderTarget, 8); +} + +void Encode_ID3D11BlendState1_GetDesc1( + ID3D11BlendState1_Wrapper* wrapper, + D3D11_BLEND_DESC1* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11BlendState1_GetDesc1, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RASTERIZER_DESC1& value) +{ + encoder->EncodeEnumValue(value.FillMode); + encoder->EncodeEnumValue(value.CullMode); + encoder->EncodeInt32Value(value.FrontCounterClockwise); + encoder->EncodeInt32Value(value.DepthBias); + encoder->EncodeFloatValue(value.DepthBiasClamp); + encoder->EncodeFloatValue(value.SlopeScaledDepthBias); + encoder->EncodeInt32Value(value.DepthClipEnable); + encoder->EncodeInt32Value(value.ScissorEnable); + encoder->EncodeInt32Value(value.MultisampleEnable); + encoder->EncodeInt32Value(value.AntialiasedLineEnable); + encoder->EncodeUInt32Value(value.ForcedSampleCount); +} + +void Encode_ID3D11RasterizerState1_GetDesc1( + ID3D11RasterizerState1_Wrapper* wrapper, + D3D11_RASTERIZER_DESC1* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11RasterizerState1_GetDesc1, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext1_CopySubresourceRegion1( + ID3D11DeviceContext1_Wrapper* wrapper, + ID3D11Resource* pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + const D3D11_BOX* pSrcBox, + UINT CopyFlags) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_CopySubresourceRegion1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pDstResource); + encoder->EncodeUInt32Value(DstSubresource); + encoder->EncodeUInt32Value(DstX); + encoder->EncodeUInt32Value(DstY); + encoder->EncodeUInt32Value(DstZ); + encoder->EncodeObjectValue(pSrcResource); + encoder->EncodeUInt32Value(SrcSubresource); + EncodeStructPtr(encoder, pSrcBox); + encoder->EncodeUInt32Value(CopyFlags); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext1_DiscardResource( + ID3D11DeviceContext1_Wrapper* wrapper, + ID3D11Resource* pResource) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_DiscardResource, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pResource); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext1_DiscardView( + ID3D11DeviceContext1_Wrapper* wrapper, + ID3D11View* pResourceView) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_DiscardView, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pResourceView); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext1_VSSetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_VSSetConstantBuffers1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + encoder->EncodeUInt32Array(pFirstConstant, NumBuffers); + encoder->EncodeUInt32Array(pNumConstants, NumBuffers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext1_HSSetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_HSSetConstantBuffers1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + encoder->EncodeUInt32Array(pFirstConstant, NumBuffers); + encoder->EncodeUInt32Array(pNumConstants, NumBuffers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext1_DSSetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_DSSetConstantBuffers1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + encoder->EncodeUInt32Array(pFirstConstant, NumBuffers); + encoder->EncodeUInt32Array(pNumConstants, NumBuffers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext1_GSSetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_GSSetConstantBuffers1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + encoder->EncodeUInt32Array(pFirstConstant, NumBuffers); + encoder->EncodeUInt32Array(pNumConstants, NumBuffers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext1_PSSetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_PSSetConstantBuffers1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + encoder->EncodeUInt32Array(pFirstConstant, NumBuffers); + encoder->EncodeUInt32Array(pNumConstants, NumBuffers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext1_CSSetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_CSSetConstantBuffers1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + encoder->EncodeUInt32Array(pFirstConstant, NumBuffers); + encoder->EncodeUInt32Array(pNumConstants, NumBuffers); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext1_VSGetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_VSGetConstantBuffers1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + encoder->EncodeUInt32Array(pFirstConstant, NumBuffers); + encoder->EncodeUInt32Array(pNumConstants, NumBuffers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), wrapper); + } +} + +void Encode_ID3D11DeviceContext1_HSGetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_HSGetConstantBuffers1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + encoder->EncodeUInt32Array(pFirstConstant, NumBuffers); + encoder->EncodeUInt32Array(pNumConstants, NumBuffers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), wrapper); + } +} + +void Encode_ID3D11DeviceContext1_DSGetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_DSGetConstantBuffers1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + encoder->EncodeUInt32Array(pFirstConstant, NumBuffers); + encoder->EncodeUInt32Array(pNumConstants, NumBuffers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), wrapper); + } +} + +void Encode_ID3D11DeviceContext1_GSGetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_GSGetConstantBuffers1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + encoder->EncodeUInt32Array(pFirstConstant, NumBuffers); + encoder->EncodeUInt32Array(pNumConstants, NumBuffers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), wrapper); + } +} + +void Encode_ID3D11DeviceContext1_PSGetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_PSGetConstantBuffers1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + encoder->EncodeUInt32Array(pFirstConstant, NumBuffers); + encoder->EncodeUInt32Array(pNumConstants, NumBuffers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), wrapper); + } +} + +void Encode_ID3D11DeviceContext1_CSGetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_CSGetConstantBuffers1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(StartSlot); + encoder->EncodeUInt32Value(NumBuffers); + encoder->EncodeObjectArray(ppConstantBuffers, NumBuffers); + encoder->EncodeUInt32Array(pFirstConstant, NumBuffers); + encoder->EncodeUInt32Array(pNumConstants, NumBuffers); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), wrapper); + } +} + +void Encode_ID3D11DeviceContext1_SwapDeviceContextState( + ID3D11DeviceContext1_Wrapper* wrapper, + ID3DDeviceContextState* pState, + ID3DDeviceContextState** ppPreviousState) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_SwapDeviceContextState, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pState); + encoder->EncodeObjectPtr(ppPreviousState); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3DDeviceContextState, reinterpret_cast(ppPreviousState), wrapper); + } +} + +void Encode_ID3D11DeviceContext1_ClearView( + ID3D11DeviceContext1_Wrapper* wrapper, + ID3D11View* pView, + const FLOAT Color [4], + const D3D11_RECT* pRect, + UINT NumRects) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_ClearView, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pView); + encoder->EncodeFloatArray(Color, 4); + EncodeStructArray(encoder, pRect, NumRects); + encoder->EncodeUInt32Value(NumRects); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext1_DiscardView1( + ID3D11DeviceContext1_Wrapper* wrapper, + ID3D11View* pResourceView, + const D3D11_RECT* pRects, + UINT NumRects) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext1_DiscardView1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pResourceView); + EncodeStructArray(encoder, pRects, NumRects); + encoder->EncodeUInt32Value(NumRects); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK& value) +{ + encoder->EncodeUInt32Value(value.ClearSize); + encoder->EncodeUInt32Value(value.EncryptedSize); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_BUFFER_DESC1& value) +{ + encoder->EncodeEnumValue(value.BufferType); + encoder->EncodeUInt32Value(value.DataOffset); + encoder->EncodeUInt32Value(value.DataSize); + encoder->EncodeVoidArray(value.pIV, value.IVSize); + encoder->EncodeUInt32Value(value.IVSize); + EncodeStructArray(encoder, value.pSubSampleMappingBlock, value.SubSampleMappingCount); + encoder->EncodeUInt32Value(value.SubSampleMappingCount); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION& value) +{ + encoder->EncodeObjectValue(value.pCryptoSession); + encoder->EncodeUInt32Value(value.BlobSize); + encoder->EncodeVoidArray(value.pBlob, value.BlobSize); + EncodeStructPtr(encoder, value.pKeyInfoId); + encoder->EncodeUInt32Value(value.PrivateDataSize); + encoder->EncodeVoidArray(value.pPrivateData, value.PrivateDataSize); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT& value) +{ + encoder->EncodeInt32Value(value.Enable); + encoder->EncodeUInt32Value(value.Width); + encoder->EncodeUInt32Value(value.Height); + encoder->EncodeEnumValue(value.Format); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA& value) +{ + encoder->EncodeUInt32Value(value.PrivateDataSize); + encoder->EncodeUInt32Value(value.HWProtectionDataSize); + encoder->EncodeUInt8Array(value.pbInput, 4); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA& value) +{ + encoder->EncodeUInt32Value(value.PrivateDataSize); + encoder->EncodeUInt32Value(value.MaxHWProtectionDataSize); + encoder->EncodeUInt32Value(value.HWProtectionDataSize); + encoder->EncodeUInt64Value(value.TransportTime); + encoder->EncodeUInt64Value(value.ExecutionTime); + encoder->EncodeUInt8Array(value.pbOutput, 4); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA& value) +{ + encoder->EncodeUInt32Value(value.HWProtectionFunctionID); + EncodeStructPtr(encoder, value.pInputData); + EncodeStructPtr(encoder, value.pOutputData); + encoder->EncodeInt32Value(value.Status); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_SAMPLE_DESC& value) +{ + encoder->EncodeUInt32Value(value.Width); + encoder->EncodeUInt32Value(value.Height); + encoder->EncodeEnumValue(value.Format); + encoder->EncodeEnumValue(value.ColorSpace); +} + +void Encode_ID3D11VideoContext1_SubmitDecoderBuffers1( + ID3D11VideoContext1_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + UINT NumBuffers, + const D3D11_VIDEO_DECODER_BUFFER_DESC1* pBufferDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext1_SubmitDecoderBuffers1, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pDecoder); + encoder->EncodeUInt32Value(NumBuffers); + EncodeStructArray(encoder, pBufferDesc, NumBuffers); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext1_GetDataForNewHardwareKey( + ID3D11VideoContext1_Wrapper* wrapper, + HRESULT return_value, + ID3D11CryptoSession* pCryptoSession, + UINT PrivateInputSize, + const void* pPrivatInputData, + UINT64* pPrivateOutputData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext1_GetDataForNewHardwareKey, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pCryptoSession); + encoder->EncodeUInt32Value(PrivateInputSize); + encoder->EncodeVoidArray(pPrivatInputData, PrivateInputSize); + encoder->EncodeUInt64Ptr(pPrivateOutputData, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext1_CheckCryptoSessionStatus( + ID3D11VideoContext1_Wrapper* wrapper, + HRESULT return_value, + ID3D11CryptoSession* pCryptoSession, + D3D11_CRYPTO_SESSION_STATUS* pStatus) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext1_CheckCryptoSessionStatus, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pCryptoSession); + encoder->EncodeEnumPtr(pStatus, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext1_DecoderEnableDownsampling( + ID3D11VideoContext1_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + const D3D11_VIDEO_SAMPLE_DESC* pOutputDesc, + UINT ReferenceFrameCount) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext1_DecoderEnableDownsampling, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pDecoder); + encoder->EncodeEnumValue(InputColorSpace); + EncodeStructPtr(encoder, pOutputDesc); + encoder->EncodeUInt32Value(ReferenceFrameCount); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext1_DecoderUpdateDownsampling( + ID3D11VideoContext1_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + const D3D11_VIDEO_SAMPLE_DESC* pOutputDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext1_DecoderUpdateDownsampling, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pDecoder); + EncodeStructPtr(encoder, pOutputDesc); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + DXGI_COLOR_SPACE_TYPE ColorSpace) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeEnumValue(ColorSpace); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL ShaderUsage) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeInt32Value(ShaderUsage); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + DXGI_COLOR_SPACE_TYPE* pColorSpace) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeEnumPtr(pColorSpace); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pShaderUsage) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeInt32Ptr(pShaderUsage); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_COLOR_SPACE_TYPE ColorSpace) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeEnumValue(ColorSpace); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext1_VideoProcessorSetStreamMirror( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + BOOL FlipHorizontal, + BOOL FlipVertical) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorSetStreamMirror, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Value(Enable); + encoder->EncodeInt32Value(FlipHorizontal); + encoder->EncodeInt32Value(FlipVertical); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_COLOR_SPACE_TYPE* pColorSpace) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeEnumPtr(pColorSpace); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext1_VideoProcessorGetStreamMirror( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnable, + BOOL* pFlipHorizontal, + BOOL* pFlipVertical) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetStreamMirror, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeInt32Ptr(pEnable); + encoder->EncodeInt32Ptr(pFlipHorizontal); + encoder->EncodeInt32Ptr(pFlipVertical); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext1_VideoProcessorGetBehaviorHints( + ID3D11VideoContext1_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoProcessor* pVideoProcessor, + UINT OutputWidth, + UINT OutputHeight, + DXGI_FORMAT OutputFormat, + UINT StreamCount, + const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT* pStreams, + UINT* pBehaviorHints) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetBehaviorHints, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(OutputWidth); + encoder->EncodeUInt32Value(OutputHeight); + encoder->EncodeEnumValue(OutputFormat); + encoder->EncodeUInt32Value(StreamCount); + EncodeStructArray(encoder, pStreams, StreamCount); + encoder->EncodeUInt32Ptr(pBehaviorHints, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize( + ID3D11VideoDevice1_Wrapper* wrapper, + HRESULT return_value, + const GUID* pCryptoType, + const GUID* pDecoderProfile, + const GUID* pKeyExchangeType, + UINT* pPrivateInputSize, + UINT* pPrivateOutputSize) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pCryptoType); + EncodeStructPtr(encoder, pDecoderProfile); + EncodeStructPtr(encoder, pKeyExchangeType); + encoder->EncodeUInt32Ptr(pPrivateInputSize, omit_output_data); + encoder->EncodeUInt32Ptr(pPrivateOutputSize, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice1_GetVideoDecoderCaps( + ID3D11VideoDevice1_Wrapper* wrapper, + HRESULT return_value, + const GUID* pDecoderProfile, + UINT SampleWidth, + UINT SampleHeight, + const DXGI_RATIONAL* pFrameRate, + UINT BitRate, + const GUID* pCryptoType, + UINT* pDecoderCaps) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice1_GetVideoDecoderCaps, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pDecoderProfile); + encoder->EncodeUInt32Value(SampleWidth); + encoder->EncodeUInt32Value(SampleHeight); + EncodeStructPtr(encoder, pFrameRate); + encoder->EncodeUInt32Value(BitRate); + EncodeStructPtr(encoder, pCryptoType); + encoder->EncodeUInt32Ptr(pDecoderCaps, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice1_CheckVideoDecoderDownsampling( + ID3D11VideoDevice1_Wrapper* wrapper, + HRESULT return_value, + const D3D11_VIDEO_DECODER_DESC* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + const D3D11_VIDEO_DECODER_CONFIG* pInputConfig, + const DXGI_RATIONAL* pFrameRate, + const D3D11_VIDEO_SAMPLE_DESC* pOutputDesc, + BOOL* pSupported, + BOOL* pRealTimeHint) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice1_CheckVideoDecoderDownsampling, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pInputDesc); + encoder->EncodeEnumValue(InputColorSpace); + EncodeStructPtr(encoder, pInputConfig); + EncodeStructPtr(encoder, pFrameRate); + EncodeStructPtr(encoder, pOutputDesc); + encoder->EncodeInt32Ptr(pSupported, omit_output_data); + encoder->EncodeInt32Ptr(pRealTimeHint, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters( + ID3D11VideoDevice1_Wrapper* wrapper, + HRESULT return_value, + const D3D11_VIDEO_DECODER_DESC* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + const D3D11_VIDEO_DECODER_CONFIG* pInputConfig, + const DXGI_RATIONAL* pFrameRate, + D3D11_VIDEO_SAMPLE_DESC* pRecommendedOutputDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pInputDesc); + encoder->EncodeEnumValue(InputColorSpace); + EncodeStructPtr(encoder, pInputConfig); + EncodeStructPtr(encoder, pFrameRate); + EncodeStructPtr(encoder, pRecommendedOutputDesc, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion( + ID3D11VideoProcessorEnumerator1_Wrapper* wrapper, + HRESULT return_value, + DXGI_FORMAT InputFormat, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + DXGI_FORMAT OutputFormat, + DXGI_COLOR_SPACE_TYPE OutputColorSpace, + BOOL* pSupported) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeEnumValue(InputFormat); + encoder->EncodeEnumValue(InputColorSpace); + encoder->EncodeEnumValue(OutputFormat); + encoder->EncodeEnumValue(OutputColorSpace); + encoder->EncodeInt32Ptr(pSupported, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device1_GetImmediateContext1( + ID3D11Device1_Wrapper* wrapper, + ID3D11DeviceContext1** ppImmediateContext) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device1_GetImmediateContext1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppImmediateContext); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11DeviceContext1, reinterpret_cast(ppImmediateContext), wrapper); + } +} + +void Encode_ID3D11Device1_CreateDeferredContext1( + ID3D11Device1_Wrapper* wrapper, + HRESULT return_value, + UINT ContextFlags, + ID3D11DeviceContext1** ppDeferredContext) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device1_CreateDeferredContext1, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt32Value(ContextFlags); + encoder->EncodeObjectPtr(ppDeferredContext, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11DeviceContext1, reinterpret_cast(ppDeferredContext), wrapper); + } +} + +void Encode_ID3D11Device1_CreateBlendState1( + ID3D11Device1_Wrapper* wrapper, + HRESULT return_value, + const D3D11_BLEND_DESC1* pBlendStateDesc, + ID3D11BlendState1** ppBlendState) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device1_CreateBlendState1, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pBlendStateDesc); + encoder->EncodeObjectPtr(ppBlendState, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11BlendState1, reinterpret_cast(ppBlendState), wrapper); + } +} + +void Encode_ID3D11Device1_CreateRasterizerState1( + ID3D11Device1_Wrapper* wrapper, + HRESULT return_value, + const D3D11_RASTERIZER_DESC1* pRasterizerDesc, + ID3D11RasterizerState1** ppRasterizerState) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device1_CreateRasterizerState1, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pRasterizerDesc); + encoder->EncodeObjectPtr(ppRasterizerState, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11RasterizerState1, reinterpret_cast(ppRasterizerState), wrapper); + } +} + +void Encode_ID3D11Device1_CreateDeviceContextState( + ID3D11Device1_Wrapper* wrapper, + HRESULT return_value, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + REFIID EmulatedInterface, + D3D_FEATURE_LEVEL* pChosenFeatureLevel, + ID3DDeviceContextState** ppContextState) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device1_CreateDeviceContextState, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt32Value(Flags); + encoder->EncodeEnumArray(pFeatureLevels, FeatureLevels); + encoder->EncodeUInt32Value(FeatureLevels); + encoder->EncodeUInt32Value(SDKVersion); + EncodeStruct(encoder, EmulatedInterface); + encoder->EncodeEnumPtr(pChosenFeatureLevel, omit_output_data); + encoder->EncodeObjectPtr(ppContextState, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3DDeviceContextState, reinterpret_cast(ppContextState), wrapper); + } +} + +void Encode_ID3D11Device1_OpenSharedResource1( + ID3D11Device1_Wrapper* wrapper, + HRESULT return_value, + HANDLE hResource, + REFIID returnedInterface, + void** ppResource) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device1_OpenSharedResource1, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeVoidPtr(hResource); + EncodeStruct(encoder, returnedInterface); + encoder->EncodeObjectPtr(ppResource, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, returnedInterface, ppResource, wrapper); + } +} + +void Encode_ID3D11Device1_OpenSharedResourceByName( + ID3D11Device1_Wrapper* wrapper, + HRESULT return_value, + LPCWSTR lpName, + DWORD dwDesiredAccess, + REFIID returnedInterface, + void** ppResource) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device1_OpenSharedResourceByName, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeWString(lpName); + encoder->EncodeUInt32Value(dwDesiredAccess); + EncodeStruct(encoder, returnedInterface); + encoder->EncodeObjectPtr(ppResource, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, returnedInterface, ppResource, wrapper); + } +} + +void Encode_ID3DUserDefinedAnnotation_BeginEvent( + ID3DUserDefinedAnnotation_Wrapper* wrapper, + INT return_value, + LPCWSTR Name) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3DUserDefinedAnnotation_BeginEvent, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeWString(Name); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3DUserDefinedAnnotation_EndEvent( + ID3DUserDefinedAnnotation_Wrapper* wrapper, + INT return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3DUserDefinedAnnotation_EndEvent, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3DUserDefinedAnnotation_SetMarker( + ID3DUserDefinedAnnotation_Wrapper* wrapper, + LPCWSTR Name) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3DUserDefinedAnnotation_SetMarker, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeWString(Name); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3DUserDefinedAnnotation_GetStatus( + ID3DUserDefinedAnnotation_Wrapper* wrapper, + BOOL return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3DUserDefinedAnnotation_GetStatus, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + + +/* +** This part is generated from d3d11_2.h in Windows SDK: 10.0.20348.0 +** +*/ + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TILED_RESOURCE_COORDINATE& value) +{ + encoder->EncodeUInt32Value(value.X); + encoder->EncodeUInt32Value(value.Y); + encoder->EncodeUInt32Value(value.Z); + encoder->EncodeUInt32Value(value.Subresource); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TILE_REGION_SIZE& value) +{ + encoder->EncodeUInt32Value(value.NumTiles); + encoder->EncodeInt32Value(value.bUseBox); + encoder->EncodeUInt32Value(value.Width); + encoder->EncodeUInt16Value(value.Height); + encoder->EncodeUInt16Value(value.Depth); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_SUBRESOURCE_TILING& value) +{ + encoder->EncodeUInt32Value(value.WidthInTiles); + encoder->EncodeUInt16Value(value.HeightInTiles); + encoder->EncodeUInt16Value(value.DepthInTiles); + encoder->EncodeUInt32Value(value.StartTileIndexInOverallResource); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TILE_SHAPE& value) +{ + encoder->EncodeUInt32Value(value.WidthInTexels); + encoder->EncodeUInt32Value(value.HeightInTexels); + encoder->EncodeUInt32Value(value.DepthInTexels); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_PACKED_MIP_DESC& value) +{ + encoder->EncodeUInt8Value(value.NumStandardMips); + encoder->EncodeUInt8Value(value.NumPackedMips); + encoder->EncodeUInt32Value(value.NumTilesForPackedMips); + encoder->EncodeUInt32Value(value.StartTileIndexInOverallResource); +} + +void Encode_ID3D11DeviceContext2_UpdateTileMappings( + ID3D11DeviceContext2_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pTiledResource, + UINT NumTiledResourceRegions, + const D3D11_TILED_RESOURCE_COORDINATE* pTiledResourceRegionStartCoordinates, + const D3D11_TILE_REGION_SIZE* pTiledResourceRegionSizes, + ID3D11Buffer* pTilePool, + UINT NumRanges, + const UINT* pRangeFlags, + const UINT* pTilePoolStartOffsets, + const UINT* pRangeTileCounts, + UINT Flags) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext2_UpdateTileMappings, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pTiledResource); + encoder->EncodeUInt32Value(NumTiledResourceRegions); + EncodeStructArray(encoder, pTiledResourceRegionStartCoordinates, NumTiledResourceRegions); + EncodeStructArray(encoder, pTiledResourceRegionSizes, NumTiledResourceRegions); + encoder->EncodeObjectValue(pTilePool); + encoder->EncodeUInt32Value(NumRanges); + encoder->EncodeUInt32Array(pRangeFlags, NumRanges); + encoder->EncodeUInt32Array(pTilePoolStartOffsets, NumRanges); + encoder->EncodeUInt32Array(pRangeTileCounts, NumRanges); + encoder->EncodeUInt32Value(Flags); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext2_CopyTileMappings( + ID3D11DeviceContext2_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pDestTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pDestRegionStartCoordinate, + ID3D11Resource* pSourceTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pSourceRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE* pTileRegionSize, + UINT Flags) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext2_CopyTileMappings, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pDestTiledResource); + EncodeStructPtr(encoder, pDestRegionStartCoordinate); + encoder->EncodeObjectValue(pSourceTiledResource); + EncodeStructPtr(encoder, pSourceRegionStartCoordinate); + EncodeStructPtr(encoder, pTileRegionSize); + encoder->EncodeUInt32Value(Flags); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext2_CopyTiles( + ID3D11DeviceContext2_Wrapper* wrapper, + ID3D11Resource* pTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pTileRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE* pTileRegionSize, + ID3D11Buffer* pBuffer, + UINT64 BufferStartOffsetInBytes, + UINT Flags) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext2_CopyTiles, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pTiledResource); + EncodeStructPtr(encoder, pTileRegionStartCoordinate); + EncodeStructPtr(encoder, pTileRegionSize); + encoder->EncodeObjectValue(pBuffer); + encoder->EncodeUInt64Value(BufferStartOffsetInBytes); + encoder->EncodeUInt32Value(Flags); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext2_UpdateTiles( + ID3D11DeviceContext2_Wrapper* wrapper, + ID3D11Resource* pDestTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pDestTileRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE* pDestTileRegionSize, + const void* pSourceTileData, + UINT Flags) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext2_UpdateTiles, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pDestTiledResource); + EncodeStructPtr(encoder, pDestTileRegionStartCoordinate); + EncodeStructPtr(encoder, pDestTileRegionSize); + encoder->EncodeVoidPtr(pSourceTileData); + encoder->EncodeUInt32Value(Flags); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext2_ResizeTilePool( + ID3D11DeviceContext2_Wrapper* wrapper, + HRESULT return_value, + ID3D11Buffer* pTilePool, + UINT64 NewSizeInBytes) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext2_ResizeTilePool, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pTilePool); + encoder->EncodeUInt64Value(NewSizeInBytes); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext2_TiledResourceBarrier( + ID3D11DeviceContext2_Wrapper* wrapper, + ID3D11DeviceChild* pTiledResourceOrViewAccessBeforeBarrier, + ID3D11DeviceChild* pTiledResourceOrViewAccessAfterBarrier) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext2_TiledResourceBarrier, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pTiledResourceOrViewAccessBeforeBarrier); + encoder->EncodeObjectValue(pTiledResourceOrViewAccessAfterBarrier); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext2_IsAnnotationEnabled( + ID3D11DeviceContext2_Wrapper* wrapper, + BOOL return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext2_IsAnnotationEnabled, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext2_SetMarkerInt( + ID3D11DeviceContext2_Wrapper* wrapper, + LPCWSTR pLabel, + INT Data) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext2_SetMarkerInt, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeWString(pLabel); + encoder->EncodeInt32Value(Data); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext2_BeginEventInt( + ID3D11DeviceContext2_Wrapper* wrapper, + LPCWSTR pLabel, + INT Data) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext2_BeginEventInt, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeWString(pLabel); + encoder->EncodeInt32Value(Data); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext2_EndEvent( + ID3D11DeviceContext2_Wrapper* wrapper) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext2_EndEvent, wrapper->GetCaptureId()); + if(encoder) + { + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device2_GetImmediateContext2( + ID3D11Device2_Wrapper* wrapper, + ID3D11DeviceContext2** ppImmediateContext) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device2_GetImmediateContext2, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppImmediateContext); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11DeviceContext2, reinterpret_cast(ppImmediateContext), wrapper); + } +} + +void Encode_ID3D11Device2_CreateDeferredContext2( + ID3D11Device2_Wrapper* wrapper, + HRESULT return_value, + UINT ContextFlags, + ID3D11DeviceContext2** ppDeferredContext) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device2_CreateDeferredContext2, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt32Value(ContextFlags); + encoder->EncodeObjectPtr(ppDeferredContext, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11DeviceContext2, reinterpret_cast(ppDeferredContext), wrapper); + } +} + +void Encode_ID3D11Device2_GetResourceTiling( + ID3D11Device2_Wrapper* wrapper, + ID3D11Resource* pTiledResource, + UINT* pNumTilesForEntireResource, + D3D11_PACKED_MIP_DESC* pPackedMipDesc, + D3D11_TILE_SHAPE* pStandardTileShapeForNonPackedMips, + UINT* pNumSubresourceTilings, + UINT FirstSubresourceTilingToGet, + D3D11_SUBRESOURCE_TILING* pSubresourceTilingsForNonPackedMips) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device2_GetResourceTiling, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pTiledResource); + encoder->EncodeUInt32Ptr(pNumTilesForEntireResource); + EncodeStructPtr(encoder, pPackedMipDesc); + EncodeStructPtr(encoder, pStandardTileShapeForNonPackedMips); + encoder->EncodeUInt32Ptr(pNumSubresourceTilings); + encoder->EncodeUInt32Value(FirstSubresourceTilingToGet); + EncodeStructArray(encoder, pSubresourceTilingsForNonPackedMips, ((pNumSubresourceTilings == nullptr) ? 0 : *pNumSubresourceTilings)); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device2_CheckMultisampleQualityLevels1( + ID3D11Device2_Wrapper* wrapper, + HRESULT return_value, + DXGI_FORMAT Format, + UINT SampleCount, + UINT Flags, + UINT* pNumQualityLevels) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device2_CheckMultisampleQualityLevels1, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeEnumValue(Format); + encoder->EncodeUInt32Value(SampleCount); + encoder->EncodeUInt32Value(Flags); + encoder->EncodeUInt32Ptr(pNumQualityLevels, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + + +/* +** This part is generated from d3d11_3.h in Windows SDK: 10.0.20348.0 +** +*/ + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEXTURE2D_DESC1& value) +{ + encoder->EncodeUInt32Value(value.Width); + encoder->EncodeUInt32Value(value.Height); + encoder->EncodeUInt32Value(value.MipLevels); + encoder->EncodeUInt32Value(value.ArraySize); + encoder->EncodeEnumValue(value.Format); + EncodeStruct(encoder, value.SampleDesc); + encoder->EncodeEnumValue(value.Usage); + encoder->EncodeUInt32Value(value.BindFlags); + encoder->EncodeUInt32Value(value.CPUAccessFlags); + encoder->EncodeUInt32Value(value.MiscFlags); + encoder->EncodeEnumValue(value.TextureLayout); +} + +void Encode_ID3D11Texture2D1_GetDesc1( + ID3D11Texture2D1_Wrapper* wrapper, + D3D11_TEXTURE2D_DESC1* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Texture2D1_GetDesc1, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEXTURE3D_DESC1& value) +{ + encoder->EncodeUInt32Value(value.Width); + encoder->EncodeUInt32Value(value.Height); + encoder->EncodeUInt32Value(value.Depth); + encoder->EncodeUInt32Value(value.MipLevels); + encoder->EncodeEnumValue(value.Format); + encoder->EncodeEnumValue(value.Usage); + encoder->EncodeUInt32Value(value.BindFlags); + encoder->EncodeUInt32Value(value.CPUAccessFlags); + encoder->EncodeUInt32Value(value.MiscFlags); + encoder->EncodeEnumValue(value.TextureLayout); +} + +void Encode_ID3D11Texture3D1_GetDesc1( + ID3D11Texture3D1_Wrapper* wrapper, + D3D11_TEXTURE3D_DESC1* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Texture3D1_GetDesc1, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RASTERIZER_DESC2& value) +{ + encoder->EncodeEnumValue(value.FillMode); + encoder->EncodeEnumValue(value.CullMode); + encoder->EncodeInt32Value(value.FrontCounterClockwise); + encoder->EncodeInt32Value(value.DepthBias); + encoder->EncodeFloatValue(value.DepthBiasClamp); + encoder->EncodeFloatValue(value.SlopeScaledDepthBias); + encoder->EncodeInt32Value(value.DepthClipEnable); + encoder->EncodeInt32Value(value.ScissorEnable); + encoder->EncodeInt32Value(value.MultisampleEnable); + encoder->EncodeInt32Value(value.AntialiasedLineEnable); + encoder->EncodeUInt32Value(value.ForcedSampleCount); + encoder->EncodeEnumValue(value.ConservativeRaster); +} + +void Encode_ID3D11RasterizerState2_GetDesc2( + ID3D11RasterizerState2_Wrapper* wrapper, + D3D11_RASTERIZER_DESC2* pDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11RasterizerState2_GetDesc2, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_SRV1& value) +{ + encoder->EncodeUInt32Value(value.MostDetailedMip); + encoder->EncodeUInt32Value(value.MipLevels); + encoder->EncodeUInt32Value(value.PlaneSlice); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_SRV1& value) +{ + encoder->EncodeUInt32Value(value.MostDetailedMip); + encoder->EncodeUInt32Value(value.MipLevels); + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); + encoder->EncodeUInt32Value(value.PlaneSlice); +} + +void Encode_ID3D11ShaderResourceView1_GetDesc1( + ID3D11ShaderResourceView1_Wrapper* wrapper, + D3D11_SHADER_RESOURCE_VIEW_DESC1* pDesc1) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11ShaderResourceView1_GetDesc1, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc1); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_RTV1& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); + encoder->EncodeUInt32Value(value.PlaneSlice); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_RTV1& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); + encoder->EncodeUInt32Value(value.PlaneSlice); +} + +void Encode_ID3D11RenderTargetView1_GetDesc1( + ID3D11RenderTargetView1_Wrapper* wrapper, + D3D11_RENDER_TARGET_VIEW_DESC1* pDesc1) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11RenderTargetView1_GetDesc1, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc1); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_UAV1& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); + encoder->EncodeUInt32Value(value.PlaneSlice); +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_UAV1& value) +{ + encoder->EncodeUInt32Value(value.MipSlice); + encoder->EncodeUInt32Value(value.FirstArraySlice); + encoder->EncodeUInt32Value(value.ArraySize); + encoder->EncodeUInt32Value(value.PlaneSlice); +} + +void Encode_ID3D11UnorderedAccessView1_GetDesc1( + ID3D11UnorderedAccessView1_Wrapper* wrapper, + D3D11_UNORDERED_ACCESS_VIEW_DESC1* pDesc1) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11UnorderedAccessView1_GetDesc1, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc1); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_QUERY_DESC1& value) +{ + encoder->EncodeEnumValue(value.Query); + encoder->EncodeUInt32Value(value.MiscFlags); + encoder->EncodeEnumValue(value.ContextType); +} + +void Encode_ID3D11Query1_GetDesc1( + ID3D11Query1_Wrapper* wrapper, + D3D11_QUERY_DESC1* pDesc1) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Query1_GetDesc1, wrapper->GetCaptureId()); + if(encoder) + { + EncodeStructPtr(encoder, pDesc1); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext3_Flush1( + ID3D11DeviceContext3_Wrapper* wrapper, + D3D11_CONTEXT_TYPE ContextType, + HANDLE hEvent) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext3_Flush1, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeEnumValue(ContextType); + encoder->EncodeVoidPtr(hEvent); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext3_SetHardwareProtectionState( + ID3D11DeviceContext3_Wrapper* wrapper, + BOOL HwProtectionEnable) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext3_SetHardwareProtectionState, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeInt32Value(HwProtectionEnable); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext3_GetHardwareProtectionState( + ID3D11DeviceContext3_Wrapper* wrapper, + BOOL* pHwProtectionEnable) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext3_GetHardwareProtectionState, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeInt32Ptr(pHwProtectionEnable); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Fence_CreateSharedHandle( + ID3D11Fence_Wrapper* wrapper, + HRESULT return_value, + const SECURITY_ATTRIBUTES* pAttributes, + DWORD dwAccess, + LPCWSTR lpName, + HANDLE* pHandle) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Fence_CreateSharedHandle, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pAttributes); + encoder->EncodeUInt32Value(dwAccess); + encoder->EncodeWString(lpName); + encoder->EncodeVoidPtrPtr(pHandle, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Fence_GetCompletedValue( + ID3D11Fence_Wrapper* wrapper, + UINT64 return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Fence_GetCompletedValue, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt64Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Fence_SetEventOnCompletion( + ID3D11Fence_Wrapper* wrapper, + HRESULT return_value, + UINT64 Value, + HANDLE hEvent) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Fence_SetEventOnCompletion, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt64Value(Value); + encoder->EncodeVoidPtr(hEvent); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext4_Signal( + ID3D11DeviceContext4_Wrapper* wrapper, + HRESULT return_value, + ID3D11Fence* pFence, + UINT64 Value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext4_Signal, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pFence); + encoder->EncodeUInt64Value(Value); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11DeviceContext4_Wait( + ID3D11DeviceContext4_Wrapper* wrapper, + HRESULT return_value, + ID3D11Fence* pFence, + UINT64 Value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11DeviceContext4_Wait, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pFence); + encoder->EncodeUInt64Value(Value); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device3_CreateRasterizerState2( + ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + const D3D11_RASTERIZER_DESC2* pRasterizerDesc, + ID3D11RasterizerState2** ppRasterizerState) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device3_CreateRasterizerState2, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pRasterizerDesc); + encoder->EncodeObjectPtr(ppRasterizerState, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11RasterizerState2, reinterpret_cast(ppRasterizerState), wrapper); + } +} + +void Encode_ID3D11Device3_CreateShaderResourceView1( + ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_SHADER_RESOURCE_VIEW_DESC1* pDesc1, + ID3D11ShaderResourceView1** ppSRView1) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device3_CreateShaderResourceView1, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pResource); + EncodeStructPtr(encoder, pDesc1); + encoder->EncodeObjectPtr(ppSRView1, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11ShaderResourceView1, reinterpret_cast(ppSRView1), wrapper); + } +} + +void Encode_ID3D11Device3_CreateUnorderedAccessView1( + ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_UNORDERED_ACCESS_VIEW_DESC1* pDesc1, + ID3D11UnorderedAccessView1** ppUAView1) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device3_CreateUnorderedAccessView1, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pResource); + EncodeStructPtr(encoder, pDesc1); + encoder->EncodeObjectPtr(ppUAView1, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11UnorderedAccessView1, reinterpret_cast(ppUAView1), wrapper); + } +} + +void Encode_ID3D11Device3_CreateRenderTargetView1( + ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_RENDER_TARGET_VIEW_DESC1* pDesc1, + ID3D11RenderTargetView1** ppRTView1) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device3_CreateRenderTargetView1, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pResource); + EncodeStructPtr(encoder, pDesc1); + encoder->EncodeObjectPtr(ppRTView1, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11RenderTargetView1, reinterpret_cast(ppRTView1), wrapper); + } +} + +void Encode_ID3D11Device3_CreateQuery1( + ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + const D3D11_QUERY_DESC1* pQueryDesc1, + ID3D11Query1** ppQuery1) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device3_CreateQuery1, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStructPtr(encoder, pQueryDesc1); + encoder->EncodeObjectPtr(ppQuery1, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11Query1, reinterpret_cast(ppQuery1), wrapper); + } +} + +void Encode_ID3D11Device3_GetImmediateContext3( + ID3D11Device3_Wrapper* wrapper, + ID3D11DeviceContext3** ppImmediateContext) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device3_GetImmediateContext3, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectPtr(ppImmediateContext); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(IID_ID3D11DeviceContext3, reinterpret_cast(ppImmediateContext), wrapper); + } +} + +void Encode_ID3D11Device3_CreateDeferredContext3( + ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + UINT ContextFlags, + ID3D11DeviceContext3** ppDeferredContext) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device3_CreateDeferredContext3, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt32Value(ContextFlags); + encoder->EncodeObjectPtr(ppDeferredContext, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D11DeviceContext3, reinterpret_cast(ppDeferredContext), wrapper); + } +} + +void Encode_ID3D11Device3_ReadFromSubresource( + ID3D11Device3_Wrapper* wrapper, + void* pDstData, + UINT DstRowPitch, + UINT DstDepthPitch, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + const D3D11_BOX* pSrcBox) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device3_ReadFromSubresource, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeVoidPtr(pDstData); + encoder->EncodeUInt32Value(DstRowPitch); + encoder->EncodeUInt32Value(DstDepthPitch); + encoder->EncodeObjectValue(pSrcResource); + encoder->EncodeUInt32Value(SrcSubresource); + EncodeStructPtr(encoder, pSrcBox); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + + +/* +** This part is generated from d3d11_4.h in Windows SDK: 10.0.20348.0 +** +*/ + +void Encode_ID3D11Device4_RegisterDeviceRemovedEvent( + ID3D11Device4_Wrapper* wrapper, + HRESULT return_value, + HANDLE hEvent, + DWORD* pdwCookie) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device4_RegisterDeviceRemovedEvent, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeVoidPtr(hEvent); + encoder->EncodeUInt32Ptr(pdwCookie, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device4_UnregisterDeviceRemoved( + ID3D11Device4_Wrapper* wrapper, + DWORD dwCookie) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device4_UnregisterDeviceRemoved, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeUInt32Value(dwCookie); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Device5_OpenSharedFence( + ID3D11Device5_Wrapper* wrapper, + HRESULT return_value, + HANDLE hFence, + REFIID ReturnedInterface, + void** ppFence) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device5_OpenSharedFence, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeVoidPtr(hFence); + EncodeStruct(encoder, ReturnedInterface); + encoder->EncodeObjectPtr(ppFence, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, ReturnedInterface, ppFence, wrapper); + } +} + +void Encode_ID3D11Device5_CreateFence( + ID3D11Device5_Wrapper* wrapper, + HRESULT return_value, + UINT64 InitialValue, + D3D11_FENCE_FLAG Flags, + REFIID ReturnedInterface, + void** ppFence) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Device5_CreateFence, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeUInt64Value(InitialValue); + encoder->EncodeEnumValue(Flags); + EncodeStruct(encoder, ReturnedInterface); + encoder->EncodeObjectPtr(ppFence, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, ReturnedInterface, ppFence, wrapper); + } +} + +void Encode_ID3D11Multithread_Enter( + ID3D11Multithread_Wrapper* wrapper) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Multithread_Enter, wrapper->GetCaptureId()); + if(encoder) + { + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Multithread_Leave( + ID3D11Multithread_Wrapper* wrapper) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Multithread_Leave, wrapper->GetCaptureId()); + if(encoder) + { + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Multithread_SetMultithreadProtected( + ID3D11Multithread_Wrapper* wrapper, + BOOL return_value, + BOOL bMTProtect) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Multithread_SetMultithreadProtected, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeInt32Value(bMTProtect); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11Multithread_GetMultithreadProtected( + ID3D11Multithread_Wrapper* wrapper, + BOOL return_value) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11Multithread_GetMultithreadProtected, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData( + ID3D11VideoContext2_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + const void* pHDRMetaData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeEnumValue(Type); + encoder->EncodeUInt32Value(Size); + encoder->EncodeVoidArray(pHDRMetaData, Size); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData( + ID3D11VideoContext2_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + DXGI_HDR_METADATA_TYPE* pType, + UINT Size, + void* pMetaData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeEnumPtr(pType); + encoder->EncodeUInt32Value(Size); + encoder->EncodeVoidArray(pMetaData, Size); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData( + ID3D11VideoContext2_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + const void* pHDRMetaData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeEnumValue(Type); + encoder->EncodeUInt32Value(Size); + encoder->EncodeVoidArray(pHDRMetaData, Size); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData( + ID3D11VideoContext2_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_HDR_METADATA_TYPE* pType, + UINT Size, + void* pMetaData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectValue(pVideoProcessor); + encoder->EncodeUInt32Value(StreamIndex); + encoder->EncodeEnumPtr(pType); + encoder->EncodeUInt32Value(Size); + encoder->EncodeVoidArray(pMetaData, Size); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_VIDEO_DECODER_HISTOGRAM& value) +{ + EncodeStruct(encoder, value.DecoderDesc); + encoder->EncodeEnumValue(value.Components); + encoder->EncodeUInt32Value(value.BinCount); + encoder->EncodeUInt32Value(value.CounterBitDepth); +} + +void Encode_ID3D11VideoDevice2_CheckFeatureSupport( + ID3D11VideoDevice2_Wrapper* wrapper, + HRESULT return_value, + D3D11_FEATURE_VIDEO Feature, + void* pFeatureSupportData, + UINT FeatureSupportDataSize) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice2_CheckFeatureSupport, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeEnumValue(Feature); + encoder->EncodeVoidArray(pFeatureSupportData, FeatureSupportDataSize, omit_output_data); + encoder->EncodeUInt32Value(FeatureSupportDataSize); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT( + ID3D11VideoDevice2_Wrapper* wrapper, + HRESULT return_value, + ID3D11CryptoSession* pCryptoSession, + D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS flags, + UINT DataSize, + void* pData) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pCryptoSession); + encoder->EncodeEnumValue(flags); + encoder->EncodeUInt32Value(DataSize); + encoder->EncodeVoidArray(pData, DataSize, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_BUFFER_DESC2& value) +{ + encoder->EncodeEnumValue(value.BufferType); + encoder->EncodeUInt32Value(value.DataOffset); + encoder->EncodeUInt32Value(value.DataSize); + encoder->EncodeVoidArray(value.pIV, value.IVSize); + encoder->EncodeUInt32Value(value.IVSize); + EncodeStructArray(encoder, value.pSubSampleMappingBlock, value.SubSampleMappingCount); + encoder->EncodeUInt32Value(value.SubSampleMappingCount); + encoder->EncodeUInt32Value(value.cBlocksStripeEncrypted); + encoder->EncodeUInt32Value(value.cBlocksStripeClear); +} + +void Encode_ID3D11VideoContext3_DecoderBeginFrame1( + ID3D11VideoContext3_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + ID3D11VideoDecoderOutputView* pView, + UINT ContentKeySize, + const void* pContentKey, + UINT NumComponentHistograms, + const UINT* pHistogramOffsets, + ID3D11Buffer* const* ppHistogramBuffers) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext3_DecoderBeginFrame1, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pDecoder); + encoder->EncodeObjectValue(pView); + encoder->EncodeUInt32Value(ContentKeySize); + encoder->EncodeVoidArray(pContentKey, ContentKeySize); + encoder->EncodeUInt32Value(NumComponentHistograms); + encoder->EncodeUInt32Array(pHistogramOffsets, NumComponentHistograms); + encoder->EncodeObjectArray(ppHistogramBuffers, NumComponentHistograms); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11VideoContext3_SubmitDecoderBuffers2( + ID3D11VideoContext3_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + UINT NumBuffers, + const D3D11_VIDEO_DECODER_BUFFER_DESC2* pBufferDesc) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11VideoContext3_SubmitDecoderBuffers2, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pDecoder); + encoder->EncodeUInt32Value(NumBuffers); + EncodeStructArray(encoder, pBufferDesc, NumBuffers); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D11_OPTIONS4& value) +{ + encoder->EncodeInt32Value(value.ExtendedNV12SharedTextureSupported); +} + + +/* +** This part is generated from d3d11on12.h in Windows SDK: 10.0.20348.0 +** +*/ + +void Encode_D3D11On12CreateDevice( + HRESULT return_value, + IUnknown* pDevice, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + IUnknown* const* ppCommandQueues, + UINT NumQueues, + UINT NodeMask, + ID3D11Device** ppDevice, + ID3D11DeviceContext** ppImmediateContext, + D3D_FEATURE_LEVEL* pChosenFeatureLevel) +{ + auto encoder = D3D12CaptureManager::Get()->BeginApiCallCapture(format::ApiCallId::ApiCall_D3D11On12CreateDevice); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pDevice); + encoder->EncodeUInt32Value(Flags); + encoder->EncodeEnumArray(pFeatureLevels, FeatureLevels); + encoder->EncodeUInt32Value(FeatureLevels); + encoder->EncodeObjectArray(ppCommandQueues, NumQueues); + encoder->EncodeUInt32Value(NumQueues); + encoder->EncodeUInt32Value(NodeMask); + encoder->EncodeObjectPtr(ppDevice, omit_output_data); + encoder->EncodeObjectPtr(ppImmediateContext, omit_output_data); + encoder->EncodeEnumPtr(pChosenFeatureLevel, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndApiCallCapture(); + } +} + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RESOURCE_FLAGS& value) +{ + encoder->EncodeUInt32Value(value.BindFlags); + encoder->EncodeUInt32Value(value.MiscFlags); + encoder->EncodeUInt32Value(value.CPUAccessFlags); + encoder->EncodeUInt32Value(value.StructureByteStride); +} + +void Encode_ID3D11On12Device_CreateWrappedResource( + ID3D11On12Device_Wrapper* wrapper, + HRESULT return_value, + IUnknown* pResource12, + const D3D11_RESOURCE_FLAGS* pFlags11, + D3D12_RESOURCE_STATES InState, + D3D12_RESOURCE_STATES OutState, + REFIID riid, + void** ppResource11) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11On12Device_CreateWrappedResource, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pResource12); + EncodeStructPtr(encoder, pFlags11); + encoder->EncodeEnumValue(InState); + encoder->EncodeEnumValue(OutState); + EncodeStruct(encoder, riid); + encoder->EncodeObjectPtr(ppResource11, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, riid, ppResource11, wrapper); + } +} + +void Encode_ID3D11On12Device_ReleaseWrappedResources( + ID3D11On12Device_Wrapper* wrapper, + ID3D11Resource* const* ppResources, + UINT NumResources) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11On12Device_ReleaseWrappedResources, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectArray(ppResources, NumResources); + encoder->EncodeUInt32Value(NumResources); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11On12Device_AcquireWrappedResources( + ID3D11On12Device_Wrapper* wrapper, + ID3D11Resource* const* ppResources, + UINT NumResources) +{ + auto encoder = D3D12CaptureManager::Get()->BeginMethodCallCapture(format::ApiCallId::ApiCall_ID3D11On12Device_AcquireWrappedResources, wrapper->GetCaptureId()); + if(encoder) + { + encoder->EncodeObjectArray(ppResources, NumResources); + encoder->EncodeUInt32Value(NumResources); + D3D12CaptureManager::Get()->EndMethodCallCapture(); + } +} + +void Encode_ID3D11On12Device1_GetD3D12Device( + ID3D11On12Device1_Wrapper* wrapper, + HRESULT return_value, + REFIID riid, + void** ppvDevice) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11On12Device1_GetD3D12Device, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + EncodeStruct(encoder, riid); + encoder->EncodeObjectPtr(ppvDevice, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, riid, ppvDevice, wrapper); + } +} + +void Encode_ID3D11On12Device2_UnwrapUnderlyingResource( + ID3D11On12Device2_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource11, + ID3D12CommandQueue* pCommandQueue, + REFIID riid, + void** ppvResource12) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11On12Device2_UnwrapUnderlyingResource, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pResource11); + encoder->EncodeObjectValue(pCommandQueue); + EncodeStruct(encoder, riid); + encoder->EncodeObjectPtr(ppvResource12, omit_output_data); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, riid, ppvResource12, wrapper); + } +} + +void Encode_ID3D11On12Device2_ReturnUnderlyingResource( + ID3D11On12Device2_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource11, + UINT NumSync, + UINT64* pSignalValues, + ID3D12Fence** ppFences) +{ + auto encoder = D3D12CaptureManager::Get()->BeginTrackedMethodCallCapture(format::ApiCallId::ApiCall_ID3D11On12Device2_ReturnUnderlyingResource, wrapper->GetCaptureId()); + if(encoder) + { + bool omit_output_data = false; + if (return_value != S_OK) + { + omit_output_data = true; + } + encoder->EncodeObjectValue(pResource11); + encoder->EncodeUInt32Value(NumSync); + encoder->EncodeUInt64Array(pSignalValues, NumSync); + encoder->EncodeObjectArray(ppFences, NumSync); + encoder->EncodeInt32Value(return_value); + D3D12CaptureManager::Get()->EndCreateMethodCallCapture(return_value, IID_ID3D12Fence, reinterpret_cast(ppFences), wrapper); + } +} + + /* ** This part is generated from Unknwnbase.h in Windows SDK: 10.0.20348.0 ** @@ -11237,6 +19374,12 @@ void EncodeStruct(ParameterEncoder* encoder, const tagPOINT& value) encoder->EncodeInt32Value(value.y); } +void EncodeStruct(ParameterEncoder* encoder, const tagSIZE& value) +{ + encoder->EncodeInt32Value(value.cx); + encoder->EncodeInt32Value(value.cy); +} + /* ** This part is generated from minwinbase.h in Windows SDK: 10.0.20348.0 diff --git a/framework/generated/generated_dx12_api_call_encoders.h b/framework/generated/generated_dx12_api_call_encoders.h index 9a85964bf0..341f6b5ddc 100644 --- a/framework/generated/generated_dx12_api_call_encoders.h +++ b/framework/generated/generated_dx12_api_call_encoders.h @@ -40,6 +40,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -3472,6 +3478,2719 @@ void Encode_ID3D12InfoQueue1_UnregisterMessageCallback( DWORD CallbackCookie); +/* +** This part is generated from d3d11.h in Windows SDK: 10.0.20348.0 +** +*/ + +void Encode_D3D11CreateDevice( + HRESULT return_value, + IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + ID3D11Device** ppDevice, + D3D_FEATURE_LEVEL* pFeatureLevel, + ID3D11DeviceContext** ppImmediateContext); + +void Encode_D3D11CreateDeviceAndSwapChain( + HRESULT return_value, + IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, + IDXGISwapChain** ppSwapChain, + ID3D11Device** ppDevice, + D3D_FEATURE_LEVEL* pFeatureLevel, + ID3D11DeviceContext** ppImmediateContext); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_INPUT_ELEMENT_DESC& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_SO_DECLARATION_ENTRY& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIEWPORT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_DRAW_INSTANCED_INDIRECT_ARGS& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BOX& value); + +void Encode_ID3D11DeviceChild_GetDevice( + ID3D11DeviceChild_Wrapper* wrapper, + ID3D11Device** ppDevice); + +void Encode_ID3D11DeviceChild_GetPrivateData( + ID3D11DeviceChild_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + UINT* pDataSize, + void* pData); + +void Encode_ID3D11DeviceChild_SetPrivateData( + ID3D11DeviceChild_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + UINT DataSize, + const void* pData); + +void Encode_ID3D11DeviceChild_SetPrivateDataInterface( + ID3D11DeviceChild_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + const IUnknown* pData); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_DEPTH_STENCILOP_DESC& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_DEPTH_STENCIL_DESC& value); + +void Encode_ID3D11DepthStencilState_GetDesc( + ID3D11DepthStencilState_Wrapper* wrapper, + D3D11_DEPTH_STENCIL_DESC* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RENDER_TARGET_BLEND_DESC& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BLEND_DESC& value); + +void Encode_ID3D11BlendState_GetDesc( + ID3D11BlendState_Wrapper* wrapper, + D3D11_BLEND_DESC* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RASTERIZER_DESC& value); + +void Encode_ID3D11RasterizerState_GetDesc( + ID3D11RasterizerState_Wrapper* wrapper, + D3D11_RASTERIZER_DESC* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_MAPPED_SUBRESOURCE& value); + +void Encode_ID3D11Resource_GetType( + ID3D11Resource_Wrapper* wrapper, + D3D11_RESOURCE_DIMENSION* pResourceDimension); + +void Encode_ID3D11Resource_SetEvictionPriority( + ID3D11Resource_Wrapper* wrapper, + UINT EvictionPriority); + +void Encode_ID3D11Resource_GetEvictionPriority( + ID3D11Resource_Wrapper* wrapper, + UINT return_value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BUFFER_DESC& value); + +void Encode_ID3D11Buffer_GetDesc( + ID3D11Buffer_Wrapper* wrapper, + D3D11_BUFFER_DESC* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEXTURE1D_DESC& value); + +void Encode_ID3D11Texture1D_GetDesc( + ID3D11Texture1D_Wrapper* wrapper, + D3D11_TEXTURE1D_DESC* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEXTURE2D_DESC& value); + +void Encode_ID3D11Texture2D_GetDesc( + ID3D11Texture2D_Wrapper* wrapper, + D3D11_TEXTURE2D_DESC* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEXTURE3D_DESC& value); + +void Encode_ID3D11Texture3D_GetDesc( + ID3D11Texture3D_Wrapper* wrapper, + D3D11_TEXTURE3D_DESC* pDesc); + +void Encode_ID3D11View_GetResource( + ID3D11View_Wrapper* wrapper, + ID3D11Resource** ppResource); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BUFFEREX_SRV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_SRV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_ARRAY_SRV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_SRV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_SRV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX3D_SRV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEXCUBE_SRV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEXCUBE_ARRAY_SRV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2DMS_SRV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2DMS_ARRAY_SRV& value); + +void Encode_ID3D11ShaderResourceView_GetDesc( + ID3D11ShaderResourceView_Wrapper* wrapper, + D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_RTV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_ARRAY_RTV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_RTV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2DMS_RTV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_RTV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2DMS_ARRAY_RTV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX3D_RTV& value); + +void Encode_ID3D11RenderTargetView_GetDesc( + ID3D11RenderTargetView_Wrapper* wrapper, + D3D11_RENDER_TARGET_VIEW_DESC* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_DSV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_ARRAY_DSV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_DSV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_DSV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2DMS_DSV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2DMS_ARRAY_DSV& value); + +void Encode_ID3D11DepthStencilView_GetDesc( + ID3D11DepthStencilView_Wrapper* wrapper, + D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BUFFER_UAV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_UAV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX1D_ARRAY_UAV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_UAV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_UAV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX3D_UAV& value); + +void Encode_ID3D11UnorderedAccessView_GetDesc( + ID3D11UnorderedAccessView_Wrapper* wrapper, + D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_SAMPLER_DESC& value); + +void Encode_ID3D11SamplerState_GetDesc( + ID3D11SamplerState_Wrapper* wrapper, + D3D11_SAMPLER_DESC* pDesc); + +void Encode_ID3D11Asynchronous_GetDataSize( + ID3D11Asynchronous_Wrapper* wrapper, + UINT return_value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_QUERY_DESC& value); + +void Encode_ID3D11Query_GetDesc( + ID3D11Query_Wrapper* wrapper, + D3D11_QUERY_DESC* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_QUERY_DATA_TIMESTAMP_DISJOINT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_QUERY_DATA_PIPELINE_STATISTICS& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_QUERY_DATA_SO_STATISTICS& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_COUNTER_DESC& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_COUNTER_INFO& value); + +void Encode_ID3D11Counter_GetDesc( + ID3D11Counter_Wrapper* wrapper, + D3D11_COUNTER_DESC* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_CLASS_INSTANCE_DESC& value); + +void Encode_ID3D11ClassInstance_GetClassLinkage( + ID3D11ClassInstance_Wrapper* wrapper, + ID3D11ClassLinkage** ppLinkage); + +void Encode_ID3D11ClassInstance_GetDesc( + ID3D11ClassInstance_Wrapper* wrapper, + D3D11_CLASS_INSTANCE_DESC* pDesc); + +void Encode_ID3D11ClassInstance_GetInstanceName( + ID3D11ClassInstance_Wrapper* wrapper, + LPSTR pInstanceName, + SIZE_T* pBufferLength); + +void Encode_ID3D11ClassInstance_GetTypeName( + ID3D11ClassInstance_Wrapper* wrapper, + LPSTR pTypeName, + SIZE_T* pBufferLength); + +void Encode_ID3D11ClassLinkage_GetClassInstance( + ID3D11ClassLinkage_Wrapper* wrapper, + HRESULT return_value, + LPCSTR pClassInstanceName, + UINT InstanceIndex, + ID3D11ClassInstance** ppInstance); + +void Encode_ID3D11ClassLinkage_CreateClassInstance( + ID3D11ClassLinkage_Wrapper* wrapper, + HRESULT return_value, + LPCSTR pClassTypeName, + UINT ConstantBufferOffset, + UINT ConstantVectorOffset, + UINT TextureOffset, + UINT SamplerOffset, + ID3D11ClassInstance** ppInstance); + +void Encode_ID3D11CommandList_GetContextFlags( + ID3D11CommandList_Wrapper* wrapper, + UINT return_value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_THREADING& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_DOUBLES& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_FORMAT_SUPPORT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_FORMAT_SUPPORT2& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D11_OPTIONS& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_ARCHITECTURE_INFO& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D9_OPTIONS& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D11_OPTIONS1& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_MARKER_SUPPORT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D9_OPTIONS1& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D11_OPTIONS2& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D11_OPTIONS3& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_SHADER_CACHE& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D11_OPTIONS5& value); + +void Encode_ID3D11DeviceContext_VSSetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers); + +void Encode_ID3D11DeviceContext_PSSetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews); + +void Encode_ID3D11DeviceContext_PSSetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11PixelShader* pPixelShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances); + +void Encode_ID3D11DeviceContext_PSSetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers); + +void Encode_ID3D11DeviceContext_VSSetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11VertexShader* pVertexShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances); + +void Encode_ID3D11DeviceContext_DrawIndexed( + ID3D11DeviceContext_Wrapper* wrapper, + UINT IndexCount, + UINT StartIndexLocation, + INT BaseVertexLocation); + +void Encode_ID3D11DeviceContext_Draw( + ID3D11DeviceContext_Wrapper* wrapper, + UINT VertexCount, + UINT StartVertexLocation); + +void Encode_ID3D11DeviceContext_Map( + ID3D11DeviceContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + UINT Subresource, + D3D11_MAP MapType, + UINT MapFlags, + D3D11_MAPPED_SUBRESOURCE* pMappedResource); + +void Encode_ID3D11DeviceContext_Unmap( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Resource* pResource, + UINT Subresource); + +void Encode_ID3D11DeviceContext_PSSetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers); + +void Encode_ID3D11DeviceContext_IASetInputLayout( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11InputLayout* pInputLayout); + +void Encode_ID3D11DeviceContext_IASetVertexBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppVertexBuffers, + const UINT* pStrides, + const UINT* pOffsets); + +void Encode_ID3D11DeviceContext_IASetIndexBuffer( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* pIndexBuffer, + DXGI_FORMAT Format, + UINT Offset); + +void Encode_ID3D11DeviceContext_DrawIndexedInstanced( + ID3D11DeviceContext_Wrapper* wrapper, + UINT IndexCountPerInstance, + UINT InstanceCount, + UINT StartIndexLocation, + INT BaseVertexLocation, + UINT StartInstanceLocation); + +void Encode_ID3D11DeviceContext_DrawInstanced( + ID3D11DeviceContext_Wrapper* wrapper, + UINT VertexCountPerInstance, + UINT InstanceCount, + UINT StartVertexLocation, + UINT StartInstanceLocation); + +void Encode_ID3D11DeviceContext_GSSetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers); + +void Encode_ID3D11DeviceContext_GSSetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11GeometryShader* pShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances); + +void Encode_ID3D11DeviceContext_IASetPrimitiveTopology( + ID3D11DeviceContext_Wrapper* wrapper, + D3D11_PRIMITIVE_TOPOLOGY Topology); + +void Encode_ID3D11DeviceContext_VSSetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews); + +void Encode_ID3D11DeviceContext_VSSetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers); + +void Encode_ID3D11DeviceContext_Begin( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Asynchronous* pAsync); + +void Encode_ID3D11DeviceContext_End( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Asynchronous* pAsync); + +void Encode_ID3D11DeviceContext_GetData( + ID3D11DeviceContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11Asynchronous* pAsync, + void* pData, + UINT DataSize, + UINT GetDataFlags); + +void Encode_ID3D11DeviceContext_SetPredication( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Predicate* pPredicate, + BOOL PredicateValue); + +void Encode_ID3D11DeviceContext_GSSetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews); + +void Encode_ID3D11DeviceContext_GSSetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers); + +void Encode_ID3D11DeviceContext_OMSetRenderTargets( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumViews, + ID3D11RenderTargetView* const* ppRenderTargetViews, + ID3D11DepthStencilView* pDepthStencilView); + +void Encode_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumRTVs, + ID3D11RenderTargetView* const* ppRenderTargetViews, + ID3D11DepthStencilView* pDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView* const* ppUnorderedAccessViews, + const UINT* pUAVInitialCounts); + +void Encode_ID3D11DeviceContext_OMSetBlendState( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11BlendState* pBlendState, + const FLOAT BlendFactor [4], + UINT SampleMask); + +void Encode_ID3D11DeviceContext_OMSetDepthStencilState( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11DepthStencilState* pDepthStencilState, + UINT StencilRef); + +void Encode_ID3D11DeviceContext_SOSetTargets( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumBuffers, + ID3D11Buffer* const* ppSOTargets, + const UINT* pOffsets); + +void Encode_ID3D11DeviceContext_DrawAuto( + ID3D11DeviceContext_Wrapper* wrapper); + +void Encode_ID3D11DeviceContext_DrawIndexedInstancedIndirect( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* pBufferForArgs, + UINT AlignedByteOffsetForArgs); + +void Encode_ID3D11DeviceContext_DrawInstancedIndirect( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* pBufferForArgs, + UINT AlignedByteOffsetForArgs); + +void Encode_ID3D11DeviceContext_Dispatch( + ID3D11DeviceContext_Wrapper* wrapper, + UINT ThreadGroupCountX, + UINT ThreadGroupCountY, + UINT ThreadGroupCountZ); + +void Encode_ID3D11DeviceContext_DispatchIndirect( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* pBufferForArgs, + UINT AlignedByteOffsetForArgs); + +void Encode_ID3D11DeviceContext_RSSetState( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11RasterizerState* pRasterizerState); + +void Encode_ID3D11DeviceContext_RSSetViewports( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumViewports, + const D3D11_VIEWPORT* pViewports); + +void Encode_ID3D11DeviceContext_RSSetScissorRects( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumRects, + const D3D11_RECT* pRects); + +void Encode_ID3D11DeviceContext_CopySubresourceRegion( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Resource* pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + const D3D11_BOX* pSrcBox); + +void Encode_ID3D11DeviceContext_CopyResource( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Resource* pDstResource, + ID3D11Resource* pSrcResource); + +void Encode_ID3D11DeviceContext_CopyStructureCount( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer* pDstBuffer, + UINT DstAlignedByteOffset, + ID3D11UnorderedAccessView* pSrcView); + +void Encode_ID3D11DeviceContext_ClearRenderTargetView( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11RenderTargetView* pRenderTargetView, + const FLOAT ColorRGBA [4]); + +void Encode_ID3D11DeviceContext_ClearUnorderedAccessViewUint( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11UnorderedAccessView* pUnorderedAccessView, + const UINT Values [4]); + +void Encode_ID3D11DeviceContext_ClearUnorderedAccessViewFloat( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11UnorderedAccessView* pUnorderedAccessView, + const FLOAT Values [4]); + +void Encode_ID3D11DeviceContext_ClearDepthStencilView( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11DepthStencilView* pDepthStencilView, + UINT ClearFlags, + FLOAT Depth, + UINT8 Stencil); + +void Encode_ID3D11DeviceContext_GenerateMips( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11ShaderResourceView* pShaderResourceView); + +void Encode_ID3D11DeviceContext_SetResourceMinLOD( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Resource* pResource, + FLOAT MinLOD); + +void Encode_ID3D11DeviceContext_GetResourceMinLOD( + ID3D11DeviceContext_Wrapper* wrapper, + FLOAT return_value, + ID3D11Resource* pResource); + +void Encode_ID3D11DeviceContext_ResolveSubresource( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Resource* pDstResource, + UINT DstSubresource, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + DXGI_FORMAT Format); + +void Encode_ID3D11DeviceContext_ExecuteCommandList( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11CommandList* pCommandList, + BOOL RestoreContextState); + +void Encode_ID3D11DeviceContext_HSSetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews); + +void Encode_ID3D11DeviceContext_HSSetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11HullShader* pHullShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances); + +void Encode_ID3D11DeviceContext_HSSetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers); + +void Encode_ID3D11DeviceContext_HSSetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers); + +void Encode_ID3D11DeviceContext_DSSetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews); + +void Encode_ID3D11DeviceContext_DSSetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11DomainShader* pDomainShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances); + +void Encode_ID3D11DeviceContext_DSSetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers); + +void Encode_ID3D11DeviceContext_DSSetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers); + +void Encode_ID3D11DeviceContext_CSSetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews); + +void Encode_ID3D11DeviceContext_CSSetUnorderedAccessViews( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView* const* ppUnorderedAccessViews, + const UINT* pUAVInitialCounts); + +void Encode_ID3D11DeviceContext_CSSetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11ComputeShader* pComputeShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances); + +void Encode_ID3D11DeviceContext_CSSetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers); + +void Encode_ID3D11DeviceContext_CSSetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers); + +void Encode_ID3D11DeviceContext_VSGetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers); + +void Encode_ID3D11DeviceContext_PSGetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews); + +void Encode_ID3D11DeviceContext_PSGetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11PixelShader** ppPixelShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances); + +void Encode_ID3D11DeviceContext_PSGetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers); + +void Encode_ID3D11DeviceContext_VSGetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11VertexShader** ppVertexShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances); + +void Encode_ID3D11DeviceContext_PSGetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers); + +void Encode_ID3D11DeviceContext_IAGetInputLayout( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11InputLayout** ppInputLayout); + +void Encode_ID3D11DeviceContext_IAGetVertexBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppVertexBuffers, + UINT* pStrides, + UINT* pOffsets); + +void Encode_ID3D11DeviceContext_IAGetIndexBuffer( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Buffer** pIndexBuffer, + DXGI_FORMAT* Format, + UINT* Offset); + +void Encode_ID3D11DeviceContext_GSGetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers); + +void Encode_ID3D11DeviceContext_GSGetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11GeometryShader** ppGeometryShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances); + +void Encode_ID3D11DeviceContext_IAGetPrimitiveTopology( + ID3D11DeviceContext_Wrapper* wrapper, + D3D11_PRIMITIVE_TOPOLOGY* pTopology); + +void Encode_ID3D11DeviceContext_VSGetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews); + +void Encode_ID3D11DeviceContext_VSGetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers); + +void Encode_ID3D11DeviceContext_GetPredication( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11Predicate** ppPredicate, + BOOL* pPredicateValue); + +void Encode_ID3D11DeviceContext_GSGetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews); + +void Encode_ID3D11DeviceContext_GSGetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers); + +void Encode_ID3D11DeviceContext_OMGetRenderTargets( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumViews, + ID3D11RenderTargetView** ppRenderTargetViews, + ID3D11DepthStencilView** ppDepthStencilView); + +void Encode_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumRTVs, + ID3D11RenderTargetView** ppRenderTargetViews, + ID3D11DepthStencilView** ppDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView** ppUnorderedAccessViews); + +void Encode_ID3D11DeviceContext_OMGetBlendState( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11BlendState** ppBlendState, + FLOAT BlendFactor [4], + UINT* pSampleMask); + +void Encode_ID3D11DeviceContext_OMGetDepthStencilState( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11DepthStencilState** ppDepthStencilState, + UINT* pStencilRef); + +void Encode_ID3D11DeviceContext_SOGetTargets( + ID3D11DeviceContext_Wrapper* wrapper, + UINT NumBuffers, + ID3D11Buffer** ppSOTargets); + +void Encode_ID3D11DeviceContext_RSGetState( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11RasterizerState** ppRasterizerState); + +void Encode_ID3D11DeviceContext_RSGetViewports( + ID3D11DeviceContext_Wrapper* wrapper, + UINT* pNumViewports, + D3D11_VIEWPORT* pViewports); + +void Encode_ID3D11DeviceContext_RSGetScissorRects( + ID3D11DeviceContext_Wrapper* wrapper, + UINT* pNumRects, + D3D11_RECT* pRects); + +void Encode_ID3D11DeviceContext_HSGetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews); + +void Encode_ID3D11DeviceContext_HSGetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11HullShader** ppHullShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances); + +void Encode_ID3D11DeviceContext_HSGetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers); + +void Encode_ID3D11DeviceContext_HSGetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers); + +void Encode_ID3D11DeviceContext_DSGetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews); + +void Encode_ID3D11DeviceContext_DSGetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11DomainShader** ppDomainShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances); + +void Encode_ID3D11DeviceContext_DSGetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers); + +void Encode_ID3D11DeviceContext_DSGetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers); + +void Encode_ID3D11DeviceContext_CSGetShaderResources( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews); + +void Encode_ID3D11DeviceContext_CSGetUnorderedAccessViews( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView** ppUnorderedAccessViews); + +void Encode_ID3D11DeviceContext_CSGetShader( + ID3D11DeviceContext_Wrapper* wrapper, + ID3D11ComputeShader** ppComputeShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances); + +void Encode_ID3D11DeviceContext_CSGetSamplers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers); + +void Encode_ID3D11DeviceContext_CSGetConstantBuffers( + ID3D11DeviceContext_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers); + +void Encode_ID3D11DeviceContext_ClearState( + ID3D11DeviceContext_Wrapper* wrapper); + +void Encode_ID3D11DeviceContext_Flush( + ID3D11DeviceContext_Wrapper* wrapper); + +void Encode_ID3D11DeviceContext_GetType( + ID3D11DeviceContext_Wrapper* wrapper, + D3D11_DEVICE_CONTEXT_TYPE return_value); + +void Encode_ID3D11DeviceContext_GetContextFlags( + ID3D11DeviceContext_Wrapper* wrapper, + UINT return_value); + +void Encode_ID3D11DeviceContext_FinishCommandList( + ID3D11DeviceContext_Wrapper* wrapper, + HRESULT return_value, + BOOL RestoreDeferredContextState, + ID3D11CommandList** ppCommandList); + +void EncodeStruct(ParameterEncoder* encoder, const CD3D11_VIDEO_DEFAULT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_DESC& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_CONFIG& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AES_CTR_IV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_ENCRYPTED_BLOCK_INFO& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_BUFFER_DESC& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_EXTENSION& value); + +void Encode_ID3D11VideoDecoder_GetCreationParameters( + ID3D11VideoDecoder_Wrapper* wrapper, + HRESULT return_value, + D3D11_VIDEO_DECODER_DESC* pVideoDesc, + D3D11_VIDEO_DECODER_CONFIG* pConfig); + +void Encode_ID3D11VideoDecoder_GetDriverHandle( + ID3D11VideoDecoder_Wrapper* wrapper, + HRESULT return_value, + HANDLE* pDriverHandle); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_CAPS& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_CONTENT_PROTECTION_CAPS& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_CUSTOM_RATE& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_FILTER_RANGE& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_CONTENT_DESC& value); + +void Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc( + ID3D11VideoProcessorEnumerator_Wrapper* wrapper, + HRESULT return_value, + D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pContentDesc); + +void Encode_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat( + ID3D11VideoProcessorEnumerator_Wrapper* wrapper, + HRESULT return_value, + DXGI_FORMAT Format, + UINT* pFlags); + +void Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps( + ID3D11VideoProcessorEnumerator_Wrapper* wrapper, + HRESULT return_value, + D3D11_VIDEO_PROCESSOR_CAPS* pCaps); + +void Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps( + ID3D11VideoProcessorEnumerator_Wrapper* wrapper, + HRESULT return_value, + UINT TypeIndex, + D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* pCaps); + +void Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate( + ID3D11VideoProcessorEnumerator_Wrapper* wrapper, + HRESULT return_value, + UINT TypeIndex, + UINT CustomRateIndex, + D3D11_VIDEO_PROCESSOR_CUSTOM_RATE* pRate); + +void Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange( + ID3D11VideoProcessorEnumerator_Wrapper* wrapper, + HRESULT return_value, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + D3D11_VIDEO_PROCESSOR_FILTER_RANGE* pRange); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_COLOR_RGBA& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_COLOR_YCbCrA& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_COLOR_SPACE& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_STREAM& value); + +void Encode_ID3D11VideoProcessor_GetContentDesc( + ID3D11VideoProcessor_Wrapper* wrapper, + D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pDesc); + +void Encode_ID3D11VideoProcessor_GetRateConversionCaps( + ID3D11VideoProcessor_Wrapper* wrapper, + D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* pCaps); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_OMAC& value); + +void Encode_ID3D11AuthenticatedChannel_GetCertificateSize( + ID3D11AuthenticatedChannel_Wrapper* wrapper, + HRESULT return_value, + UINT* pCertificateSize); + +void Encode_ID3D11AuthenticatedChannel_GetCertificate( + ID3D11AuthenticatedChannel_Wrapper* wrapper, + HRESULT return_value, + UINT CertificateSize, + BYTE* pCertificate); + +void Encode_ID3D11AuthenticatedChannel_GetChannelHandle( + ID3D11AuthenticatedChannel_Wrapper* wrapper, + HANDLE* pChannelHandle); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_INPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_CONFIGURE_INPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_CONFIGURE_OUTPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT& value); + +void Encode_ID3D11CryptoSession_GetCryptoType( + ID3D11CryptoSession_Wrapper* wrapper, + GUID* pCryptoType); + +void Encode_ID3D11CryptoSession_GetDecoderProfile( + ID3D11CryptoSession_Wrapper* wrapper, + GUID* pDecoderProfile); + +void Encode_ID3D11CryptoSession_GetCertificateSize( + ID3D11CryptoSession_Wrapper* wrapper, + HRESULT return_value, + UINT* pCertificateSize); + +void Encode_ID3D11CryptoSession_GetCertificate( + ID3D11CryptoSession_Wrapper* wrapper, + HRESULT return_value, + UINT CertificateSize, + BYTE* pCertificate); + +void Encode_ID3D11CryptoSession_GetCryptoSessionHandle( + ID3D11CryptoSession_Wrapper* wrapper, + HANDLE* pCryptoSessionHandle); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_VDOV& value); + +void Encode_ID3D11VideoDecoderOutputView_GetDesc( + ID3D11VideoDecoderOutputView_Wrapper* wrapper, + D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_VPIV& value); + +void Encode_ID3D11VideoProcessorInputView_GetDesc( + ID3D11VideoProcessorInputView_Wrapper* wrapper, + D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_VPOV& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_VPOV& value); + +void Encode_ID3D11VideoProcessorOutputView_GetDesc( + ID3D11VideoProcessorOutputView_Wrapper* wrapper, + D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* pDesc); + +void Encode_ID3D11VideoContext_GetDecoderBuffer( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type, + UINT* pBufferSize, + void** ppBuffer); + +void Encode_ID3D11VideoContext_ReleaseDecoderBuffer( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type); + +void Encode_ID3D11VideoContext_DecoderBeginFrame( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + ID3D11VideoDecoderOutputView* pView, + UINT ContentKeySize, + const void* pContentKey); + +void Encode_ID3D11VideoContext_DecoderEndFrame( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder); + +void Encode_ID3D11VideoContext_SubmitDecoderBuffers( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + UINT NumBuffers, + const D3D11_VIDEO_DECODER_BUFFER_DESC* pBufferDesc); + +void Encode_ID3D11VideoContext_DecoderExtension( + ID3D11VideoContext_Wrapper* wrapper, + APP_DEPRECATED_HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + const D3D11_VIDEO_DECODER_EXTENSION* pExtensionData); + +void Encode_ID3D11VideoContext_VideoProcessorSetOutputTargetRect( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL Enable, + const RECT* pRect); + +void Encode_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL YCbCr, + const D3D11_VIDEO_COLOR* pColor); + +void Encode_ID3D11VideoContext_VideoProcessorSetOutputColorSpace( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + const D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace); + +void Encode_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE AlphaFillMode, + UINT StreamIndex); + +void Encode_ID3D11VideoContext_VideoProcessorSetOutputConstriction( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL Enable, + SIZE Size); + +void Encode_ID3D11VideoContext_VideoProcessorSetOutputStereoMode( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL Enable); + +void Encode_ID3D11VideoContext_VideoProcessorSetOutputExtension( + ID3D11VideoContext_Wrapper* wrapper, + APP_DEPRECATED_HRESULT return_value, + ID3D11VideoProcessor* pVideoProcessor, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData); + +void Encode_ID3D11VideoContext_VideoProcessorGetOutputTargetRect( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL* Enabled, + RECT* pRect); + +void Encode_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pYCbCr, + D3D11_VIDEO_COLOR* pColor); + +void Encode_ID3D11VideoContext_VideoProcessorGetOutputColorSpace( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace); + +void Encode_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE* pAlphaFillMode, + UINT* pStreamIndex); + +void Encode_ID3D11VideoContext_VideoProcessorGetOutputConstriction( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pEnabled, + SIZE* pSize); + +void Encode_ID3D11VideoContext_VideoProcessorGetOutputStereoMode( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pEnabled); + +void Encode_ID3D11VideoContext_VideoProcessorGetOutputExtension( + ID3D11VideoContext_Wrapper* wrapper, + APP_DEPRECATED_HRESULT return_value, + ID3D11VideoProcessor* pVideoProcessor, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData); + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_FRAME_FORMAT FrameFormat); + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamColorSpace( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + const D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace); + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamOutputRate( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate, + BOOL RepeatFrame, + const DXGI_RATIONAL* pCustomRate); + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamSourceRect( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + const RECT* pRect); + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamDestRect( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + const RECT* pRect); + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamAlpha( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Alpha); + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamPalette( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + UINT Count, + const UINT* pEntries); + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + const DXGI_RATIONAL* pSourceAspectRatio, + const DXGI_RATIONAL* pDestinationAspectRatio); + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamLumaKey( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Lower, + FLOAT Upper); + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT Format, + BOOL LeftViewFrame0, + BOOL BaseViewFrame0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode, + int MonoOffset); + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable); + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamFilter( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + BOOL Enable, + int Level); + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamExtension( + ID3D11VideoContext_Wrapper* wrapper, + APP_DEPRECATED_HRESULT return_value, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData); + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_FRAME_FORMAT* pFrameFormat); + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamColorSpace( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace); + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamOutputRate( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE* pOutputRate, + BOOL* pRepeatFrame, + DXGI_RATIONAL* pCustomRate); + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamSourceRect( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + RECT* pRect); + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamDestRect( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + RECT* pRect); + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamAlpha( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + FLOAT* pAlpha); + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamPalette( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + UINT Count, + UINT* pEntries); + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + DXGI_RATIONAL* pSourceAspectRatio, + DXGI_RATIONAL* pDestinationAspectRatio); + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamLumaKey( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + FLOAT* pLower, + FLOAT* pUpper); + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnable, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT* pFormat, + BOOL* pLeftViewFrame0, + BOOL* pBaseViewFrame0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE* pFlipMode, + int* MonoOffset); + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled); + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamFilter( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + BOOL* pEnabled, + int* pLevel); + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamExtension( + ID3D11VideoContext_Wrapper* wrapper, + APP_DEPRECATED_HRESULT return_value, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData); + +void Encode_ID3D11VideoContext_VideoProcessorBlt( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoProcessor* pVideoProcessor, + ID3D11VideoProcessorOutputView* pView, + UINT OutputFrame, + UINT StreamCount, + const D3D11_VIDEO_PROCESSOR_STREAM* pStreams); + +void Encode_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11CryptoSession* pCryptoSession, + UINT DataSize, + void* pData); + +void Encode_ID3D11VideoContext_EncryptionBlt( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11CryptoSession* pCryptoSession, + ID3D11Texture2D* pSrcSurface, + ID3D11Texture2D* pDstSurface, + UINT IVSize, + void* pIV); + +void Encode_ID3D11VideoContext_DecryptionBlt( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11CryptoSession* pCryptoSession, + ID3D11Texture2D* pSrcSurface, + ID3D11Texture2D* pDstSurface, + D3D11_ENCRYPTED_BLOCK_INFO* pEncryptedBlockInfo, + UINT ContentKeySize, + const void* pContentKey, + UINT IVSize, + void* pIV); + +void Encode_ID3D11VideoContext_StartSessionKeyRefresh( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11CryptoSession* pCryptoSession, + UINT RandomNumberSize, + void* pRandomNumber); + +void Encode_ID3D11VideoContext_FinishSessionKeyRefresh( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11CryptoSession* pCryptoSession); + +void Encode_ID3D11VideoContext_GetEncryptionBltKey( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11CryptoSession* pCryptoSession, + UINT KeySize, + void* pReadbackKey); + +void Encode_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11AuthenticatedChannel* pChannel, + UINT DataSize, + void* pData); + +void Encode_ID3D11VideoContext_QueryAuthenticatedChannel( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11AuthenticatedChannel* pChannel, + UINT InputSize, + const void* pInput, + UINT OutputSize, + void* pOutput); + +void Encode_ID3D11VideoContext_ConfigureAuthenticatedChannel( + ID3D11VideoContext_Wrapper* wrapper, + HRESULT return_value, + ID3D11AuthenticatedChannel* pChannel, + UINT InputSize, + const void* pInput, + D3D11_AUTHENTICATED_CONFIGURE_OUTPUT* pOutput); + +void Encode_ID3D11VideoContext_VideoProcessorSetStreamRotation( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_ROTATION Rotation); + +void Encode_ID3D11VideoContext_VideoProcessorGetStreamRotation( + ID3D11VideoContext_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnable, + D3D11_VIDEO_PROCESSOR_ROTATION* pRotation); + +void Encode_ID3D11VideoDevice_CreateVideoDecoder( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const D3D11_VIDEO_DECODER_DESC* pVideoDesc, + const D3D11_VIDEO_DECODER_CONFIG* pConfig, + ID3D11VideoDecoder** ppDecoder); + +void Encode_ID3D11VideoDevice_CreateVideoProcessor( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoProcessorEnumerator* pEnum, + UINT RateConversionIndex, + ID3D11VideoProcessor** ppVideoProcessor); + +void Encode_ID3D11VideoDevice_CreateAuthenticatedChannel( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType, + ID3D11AuthenticatedChannel** ppAuthenticatedChannel); + +void Encode_ID3D11VideoDevice_CreateCryptoSession( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const GUID* pCryptoType, + const GUID* pDecoderProfile, + const GUID* pKeyExchangeType, + ID3D11CryptoSession** ppCryptoSession); + +void Encode_ID3D11VideoDevice_CreateVideoDecoderOutputView( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* pDesc, + ID3D11VideoDecoderOutputView** ppVDOVView); + +void Encode_ID3D11VideoDevice_CreateVideoProcessorInputView( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + ID3D11VideoProcessorEnumerator* pEnum, + const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* pDesc, + ID3D11VideoProcessorInputView** ppVPIView); + +void Encode_ID3D11VideoDevice_CreateVideoProcessorOutputView( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + ID3D11VideoProcessorEnumerator* pEnum, + const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* pDesc, + ID3D11VideoProcessorOutputView** ppVPOView); + +void Encode_ID3D11VideoDevice_CreateVideoProcessorEnumerator( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pDesc, + ID3D11VideoProcessorEnumerator** ppEnum); + +void Encode_ID3D11VideoDevice_GetVideoDecoderProfileCount( + ID3D11VideoDevice_Wrapper* wrapper, + UINT return_value); + +void Encode_ID3D11VideoDevice_GetVideoDecoderProfile( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + UINT Index, + GUID* pDecoderProfile); + +void Encode_ID3D11VideoDevice_CheckVideoDecoderFormat( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const GUID* pDecoderProfile, + DXGI_FORMAT Format, + BOOL* pSupported); + +void Encode_ID3D11VideoDevice_GetVideoDecoderConfigCount( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const D3D11_VIDEO_DECODER_DESC* pDesc, + UINT* pCount); + +void Encode_ID3D11VideoDevice_GetVideoDecoderConfig( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const D3D11_VIDEO_DECODER_DESC* pDesc, + UINT Index, + D3D11_VIDEO_DECODER_CONFIG* pConfig); + +void Encode_ID3D11VideoDevice_GetContentProtectionCaps( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const GUID* pCryptoType, + const GUID* pDecoderProfile, + D3D11_VIDEO_CONTENT_PROTECTION_CAPS* pCaps); + +void Encode_ID3D11VideoDevice_CheckCryptoKeyExchange( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + const GUID* pCryptoType, + const GUID* pDecoderProfile, + UINT Index, + GUID* pKeyExchangeType); + +void Encode_ID3D11VideoDevice_SetPrivateData( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + UINT DataSize, + const void* pData); + +void Encode_ID3D11VideoDevice_SetPrivateDataInterface( + ID3D11VideoDevice_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + const IUnknown* pData); + +void Encode_ID3D11Device_CreateShaderResourceView( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc, + ID3D11ShaderResourceView** ppSRView); + +void Encode_ID3D11Device_CreateUnorderedAccessView( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc, + ID3D11UnorderedAccessView** ppUAView); + +void Encode_ID3D11Device_CreateRenderTargetView( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_RENDER_TARGET_VIEW_DESC* pDesc, + ID3D11RenderTargetView** ppRTView); + +void Encode_ID3D11Device_CreateDepthStencilView( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc, + ID3D11DepthStencilView** ppDepthStencilView); + +void Encode_ID3D11Device_CreateInputLayout( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_INPUT_ELEMENT_DESC* pInputElementDescs, + UINT NumElements, + const void* pShaderBytecodeWithInputSignature, + SIZE_T BytecodeLength, + ID3D11InputLayout** ppInputLayout); + +void Encode_ID3D11Device_CreateVertexShader( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11VertexShader** ppVertexShader); + +void Encode_ID3D11Device_CreateGeometryShader( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11GeometryShader** ppGeometryShader); + +void Encode_ID3D11Device_CreateGeometryShaderWithStreamOutput( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const void* pShaderBytecode, + SIZE_T BytecodeLength, + const D3D11_SO_DECLARATION_ENTRY* pSODeclaration, + UINT NumEntries, + const UINT* pBufferStrides, + UINT NumStrides, + UINT RasterizedStream, + ID3D11ClassLinkage* pClassLinkage, + ID3D11GeometryShader** ppGeometryShader); + +void Encode_ID3D11Device_CreatePixelShader( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11PixelShader** ppPixelShader); + +void Encode_ID3D11Device_CreateHullShader( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11HullShader** ppHullShader); + +void Encode_ID3D11Device_CreateDomainShader( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11DomainShader** ppDomainShader); + +void Encode_ID3D11Device_CreateComputeShader( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11ComputeShader** ppComputeShader); + +void Encode_ID3D11Device_CreateClassLinkage( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + ID3D11ClassLinkage** ppLinkage); + +void Encode_ID3D11Device_CreateBlendState( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_BLEND_DESC* pBlendStateDesc, + ID3D11BlendState** ppBlendState); + +void Encode_ID3D11Device_CreateDepthStencilState( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_DEPTH_STENCIL_DESC* pDepthStencilDesc, + ID3D11DepthStencilState** ppDepthStencilState); + +void Encode_ID3D11Device_CreateRasterizerState( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_RASTERIZER_DESC* pRasterizerDesc, + ID3D11RasterizerState** ppRasterizerState); + +void Encode_ID3D11Device_CreateSamplerState( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_SAMPLER_DESC* pSamplerDesc, + ID3D11SamplerState** ppSamplerState); + +void Encode_ID3D11Device_CreateQuery( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_QUERY_DESC* pQueryDesc, + ID3D11Query** ppQuery); + +void Encode_ID3D11Device_CreatePredicate( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_QUERY_DESC* pPredicateDesc, + ID3D11Predicate** ppPredicate); + +void Encode_ID3D11Device_CreateCounter( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_COUNTER_DESC* pCounterDesc, + ID3D11Counter** ppCounter); + +void Encode_ID3D11Device_CreateDeferredContext( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + UINT ContextFlags, + ID3D11DeviceContext** ppDeferredContext); + +void Encode_ID3D11Device_OpenSharedResource( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + HANDLE hResource, + REFIID ReturnedInterface, + void** ppResource); + +void Encode_ID3D11Device_CheckFormatSupport( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + DXGI_FORMAT Format, + UINT* pFormatSupport); + +void Encode_ID3D11Device_CheckMultisampleQualityLevels( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + DXGI_FORMAT Format, + UINT SampleCount, + UINT* pNumQualityLevels); + +void Encode_ID3D11Device_CheckCounterInfo( + ID3D11Device_Wrapper* wrapper, + D3D11_COUNTER_INFO* pCounterInfo); + +void Encode_ID3D11Device_CheckCounter( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + const D3D11_COUNTER_DESC* pDesc, + D3D11_COUNTER_TYPE* pType, + UINT* pActiveCounters, + LPSTR szName, + UINT* pNameLength, + LPSTR szUnits, + UINT* pUnitsLength, + LPSTR szDescription, + UINT* pDescriptionLength); + +void Encode_ID3D11Device_GetPrivateData( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + UINT* pDataSize, + void* pData); + +void Encode_ID3D11Device_SetPrivateData( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + UINT DataSize, + const void* pData); + +void Encode_ID3D11Device_SetPrivateDataInterface( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + REFGUID guid, + const IUnknown* pData); + +void Encode_ID3D11Device_GetFeatureLevel( + ID3D11Device_Wrapper* wrapper, + D3D_FEATURE_LEVEL return_value); + +void Encode_ID3D11Device_GetCreationFlags( + ID3D11Device_Wrapper* wrapper, + UINT return_value); + +void Encode_ID3D11Device_GetDeviceRemovedReason( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value); + +void Encode_ID3D11Device_GetImmediateContext( + ID3D11Device_Wrapper* wrapper, + ID3D11DeviceContext** ppImmediateContext); + +void Encode_ID3D11Device_SetExceptionMode( + ID3D11Device_Wrapper* wrapper, + HRESULT return_value, + UINT RaiseFlags); + +void Encode_ID3D11Device_GetExceptionMode( + ID3D11Device_Wrapper* wrapper, + UINT return_value); + + +/* +** This part is generated from d3d11_1.h in Windows SDK: 10.0.20348.0 +** +*/ + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RENDER_TARGET_BLEND_DESC1& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_BLEND_DESC1& value); + +void Encode_ID3D11BlendState1_GetDesc1( + ID3D11BlendState1_Wrapper* wrapper, + D3D11_BLEND_DESC1* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RASTERIZER_DESC1& value); + +void Encode_ID3D11RasterizerState1_GetDesc1( + ID3D11RasterizerState1_Wrapper* wrapper, + D3D11_RASTERIZER_DESC1* pDesc); + +void Encode_ID3D11DeviceContext1_CopySubresourceRegion1( + ID3D11DeviceContext1_Wrapper* wrapper, + ID3D11Resource* pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + const D3D11_BOX* pSrcBox, + UINT CopyFlags); + +void Encode_ID3D11DeviceContext1_DiscardResource( + ID3D11DeviceContext1_Wrapper* wrapper, + ID3D11Resource* pResource); + +void Encode_ID3D11DeviceContext1_DiscardView( + ID3D11DeviceContext1_Wrapper* wrapper, + ID3D11View* pResourceView); + +void Encode_ID3D11DeviceContext1_VSSetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants); + +void Encode_ID3D11DeviceContext1_HSSetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants); + +void Encode_ID3D11DeviceContext1_DSSetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants); + +void Encode_ID3D11DeviceContext1_GSSetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants); + +void Encode_ID3D11DeviceContext1_PSSetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants); + +void Encode_ID3D11DeviceContext1_CSSetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants); + +void Encode_ID3D11DeviceContext1_VSGetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants); + +void Encode_ID3D11DeviceContext1_HSGetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants); + +void Encode_ID3D11DeviceContext1_DSGetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants); + +void Encode_ID3D11DeviceContext1_GSGetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants); + +void Encode_ID3D11DeviceContext1_PSGetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants); + +void Encode_ID3D11DeviceContext1_CSGetConstantBuffers1( + ID3D11DeviceContext1_Wrapper* wrapper, + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants); + +void Encode_ID3D11DeviceContext1_SwapDeviceContextState( + ID3D11DeviceContext1_Wrapper* wrapper, + ID3DDeviceContextState* pState, + ID3DDeviceContextState** ppPreviousState); + +void Encode_ID3D11DeviceContext1_ClearView( + ID3D11DeviceContext1_Wrapper* wrapper, + ID3D11View* pView, + const FLOAT Color [4], + const D3D11_RECT* pRect, + UINT NumRects); + +void Encode_ID3D11DeviceContext1_DiscardView1( + ID3D11DeviceContext1_Wrapper* wrapper, + ID3D11View* pResourceView, + const D3D11_RECT* pRects, + UINT NumRects); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_BUFFER_DESC1& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_SAMPLE_DESC& value); + +void Encode_ID3D11VideoContext1_SubmitDecoderBuffers1( + ID3D11VideoContext1_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + UINT NumBuffers, + const D3D11_VIDEO_DECODER_BUFFER_DESC1* pBufferDesc); + +void Encode_ID3D11VideoContext1_GetDataForNewHardwareKey( + ID3D11VideoContext1_Wrapper* wrapper, + HRESULT return_value, + ID3D11CryptoSession* pCryptoSession, + UINT PrivateInputSize, + const void* pPrivatInputData, + UINT64* pPrivateOutputData); + +void Encode_ID3D11VideoContext1_CheckCryptoSessionStatus( + ID3D11VideoContext1_Wrapper* wrapper, + HRESULT return_value, + ID3D11CryptoSession* pCryptoSession, + D3D11_CRYPTO_SESSION_STATUS* pStatus); + +void Encode_ID3D11VideoContext1_DecoderEnableDownsampling( + ID3D11VideoContext1_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + const D3D11_VIDEO_SAMPLE_DESC* pOutputDesc, + UINT ReferenceFrameCount); + +void Encode_ID3D11VideoContext1_DecoderUpdateDownsampling( + ID3D11VideoContext1_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + const D3D11_VIDEO_SAMPLE_DESC* pOutputDesc); + +void Encode_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + DXGI_COLOR_SPACE_TYPE ColorSpace); + +void Encode_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL ShaderUsage); + +void Encode_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + DXGI_COLOR_SPACE_TYPE* pColorSpace); + +void Encode_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pShaderUsage); + +void Encode_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_COLOR_SPACE_TYPE ColorSpace); + +void Encode_ID3D11VideoContext1_VideoProcessorSetStreamMirror( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + BOOL FlipHorizontal, + BOOL FlipVertical); + +void Encode_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_COLOR_SPACE_TYPE* pColorSpace); + +void Encode_ID3D11VideoContext1_VideoProcessorGetStreamMirror( + ID3D11VideoContext1_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnable, + BOOL* pFlipHorizontal, + BOOL* pFlipVertical); + +void Encode_ID3D11VideoContext1_VideoProcessorGetBehaviorHints( + ID3D11VideoContext1_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoProcessor* pVideoProcessor, + UINT OutputWidth, + UINT OutputHeight, + DXGI_FORMAT OutputFormat, + UINT StreamCount, + const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT* pStreams, + UINT* pBehaviorHints); + +void Encode_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize( + ID3D11VideoDevice1_Wrapper* wrapper, + HRESULT return_value, + const GUID* pCryptoType, + const GUID* pDecoderProfile, + const GUID* pKeyExchangeType, + UINT* pPrivateInputSize, + UINT* pPrivateOutputSize); + +void Encode_ID3D11VideoDevice1_GetVideoDecoderCaps( + ID3D11VideoDevice1_Wrapper* wrapper, + HRESULT return_value, + const GUID* pDecoderProfile, + UINT SampleWidth, + UINT SampleHeight, + const DXGI_RATIONAL* pFrameRate, + UINT BitRate, + const GUID* pCryptoType, + UINT* pDecoderCaps); + +void Encode_ID3D11VideoDevice1_CheckVideoDecoderDownsampling( + ID3D11VideoDevice1_Wrapper* wrapper, + HRESULT return_value, + const D3D11_VIDEO_DECODER_DESC* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + const D3D11_VIDEO_DECODER_CONFIG* pInputConfig, + const DXGI_RATIONAL* pFrameRate, + const D3D11_VIDEO_SAMPLE_DESC* pOutputDesc, + BOOL* pSupported, + BOOL* pRealTimeHint); + +void Encode_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters( + ID3D11VideoDevice1_Wrapper* wrapper, + HRESULT return_value, + const D3D11_VIDEO_DECODER_DESC* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + const D3D11_VIDEO_DECODER_CONFIG* pInputConfig, + const DXGI_RATIONAL* pFrameRate, + D3D11_VIDEO_SAMPLE_DESC* pRecommendedOutputDesc); + +void Encode_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion( + ID3D11VideoProcessorEnumerator1_Wrapper* wrapper, + HRESULT return_value, + DXGI_FORMAT InputFormat, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + DXGI_FORMAT OutputFormat, + DXGI_COLOR_SPACE_TYPE OutputColorSpace, + BOOL* pSupported); + +void Encode_ID3D11Device1_GetImmediateContext1( + ID3D11Device1_Wrapper* wrapper, + ID3D11DeviceContext1** ppImmediateContext); + +void Encode_ID3D11Device1_CreateDeferredContext1( + ID3D11Device1_Wrapper* wrapper, + HRESULT return_value, + UINT ContextFlags, + ID3D11DeviceContext1** ppDeferredContext); + +void Encode_ID3D11Device1_CreateBlendState1( + ID3D11Device1_Wrapper* wrapper, + HRESULT return_value, + const D3D11_BLEND_DESC1* pBlendStateDesc, + ID3D11BlendState1** ppBlendState); + +void Encode_ID3D11Device1_CreateRasterizerState1( + ID3D11Device1_Wrapper* wrapper, + HRESULT return_value, + const D3D11_RASTERIZER_DESC1* pRasterizerDesc, + ID3D11RasterizerState1** ppRasterizerState); + +void Encode_ID3D11Device1_CreateDeviceContextState( + ID3D11Device1_Wrapper* wrapper, + HRESULT return_value, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + REFIID EmulatedInterface, + D3D_FEATURE_LEVEL* pChosenFeatureLevel, + ID3DDeviceContextState** ppContextState); + +void Encode_ID3D11Device1_OpenSharedResource1( + ID3D11Device1_Wrapper* wrapper, + HRESULT return_value, + HANDLE hResource, + REFIID returnedInterface, + void** ppResource); + +void Encode_ID3D11Device1_OpenSharedResourceByName( + ID3D11Device1_Wrapper* wrapper, + HRESULT return_value, + LPCWSTR lpName, + DWORD dwDesiredAccess, + REFIID returnedInterface, + void** ppResource); + +void Encode_ID3DUserDefinedAnnotation_BeginEvent( + ID3DUserDefinedAnnotation_Wrapper* wrapper, + INT return_value, + LPCWSTR Name); + +void Encode_ID3DUserDefinedAnnotation_EndEvent( + ID3DUserDefinedAnnotation_Wrapper* wrapper, + INT return_value); + +void Encode_ID3DUserDefinedAnnotation_SetMarker( + ID3DUserDefinedAnnotation_Wrapper* wrapper, + LPCWSTR Name); + +void Encode_ID3DUserDefinedAnnotation_GetStatus( + ID3DUserDefinedAnnotation_Wrapper* wrapper, + BOOL return_value); + + +/* +** This part is generated from d3d11_2.h in Windows SDK: 10.0.20348.0 +** +*/ + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TILED_RESOURCE_COORDINATE& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TILE_REGION_SIZE& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_SUBRESOURCE_TILING& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TILE_SHAPE& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_PACKED_MIP_DESC& value); + +void Encode_ID3D11DeviceContext2_UpdateTileMappings( + ID3D11DeviceContext2_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pTiledResource, + UINT NumTiledResourceRegions, + const D3D11_TILED_RESOURCE_COORDINATE* pTiledResourceRegionStartCoordinates, + const D3D11_TILE_REGION_SIZE* pTiledResourceRegionSizes, + ID3D11Buffer* pTilePool, + UINT NumRanges, + const UINT* pRangeFlags, + const UINT* pTilePoolStartOffsets, + const UINT* pRangeTileCounts, + UINT Flags); + +void Encode_ID3D11DeviceContext2_CopyTileMappings( + ID3D11DeviceContext2_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pDestTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pDestRegionStartCoordinate, + ID3D11Resource* pSourceTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pSourceRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE* pTileRegionSize, + UINT Flags); + +void Encode_ID3D11DeviceContext2_CopyTiles( + ID3D11DeviceContext2_Wrapper* wrapper, + ID3D11Resource* pTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pTileRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE* pTileRegionSize, + ID3D11Buffer* pBuffer, + UINT64 BufferStartOffsetInBytes, + UINT Flags); + +void Encode_ID3D11DeviceContext2_UpdateTiles( + ID3D11DeviceContext2_Wrapper* wrapper, + ID3D11Resource* pDestTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pDestTileRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE* pDestTileRegionSize, + const void* pSourceTileData, + UINT Flags); + +void Encode_ID3D11DeviceContext2_ResizeTilePool( + ID3D11DeviceContext2_Wrapper* wrapper, + HRESULT return_value, + ID3D11Buffer* pTilePool, + UINT64 NewSizeInBytes); + +void Encode_ID3D11DeviceContext2_TiledResourceBarrier( + ID3D11DeviceContext2_Wrapper* wrapper, + ID3D11DeviceChild* pTiledResourceOrViewAccessBeforeBarrier, + ID3D11DeviceChild* pTiledResourceOrViewAccessAfterBarrier); + +void Encode_ID3D11DeviceContext2_IsAnnotationEnabled( + ID3D11DeviceContext2_Wrapper* wrapper, + BOOL return_value); + +void Encode_ID3D11DeviceContext2_SetMarkerInt( + ID3D11DeviceContext2_Wrapper* wrapper, + LPCWSTR pLabel, + INT Data); + +void Encode_ID3D11DeviceContext2_BeginEventInt( + ID3D11DeviceContext2_Wrapper* wrapper, + LPCWSTR pLabel, + INT Data); + +void Encode_ID3D11DeviceContext2_EndEvent( + ID3D11DeviceContext2_Wrapper* wrapper); + +void Encode_ID3D11Device2_GetImmediateContext2( + ID3D11Device2_Wrapper* wrapper, + ID3D11DeviceContext2** ppImmediateContext); + +void Encode_ID3D11Device2_CreateDeferredContext2( + ID3D11Device2_Wrapper* wrapper, + HRESULT return_value, + UINT ContextFlags, + ID3D11DeviceContext2** ppDeferredContext); + +void Encode_ID3D11Device2_GetResourceTiling( + ID3D11Device2_Wrapper* wrapper, + ID3D11Resource* pTiledResource, + UINT* pNumTilesForEntireResource, + D3D11_PACKED_MIP_DESC* pPackedMipDesc, + D3D11_TILE_SHAPE* pStandardTileShapeForNonPackedMips, + UINT* pNumSubresourceTilings, + UINT FirstSubresourceTilingToGet, + D3D11_SUBRESOURCE_TILING* pSubresourceTilingsForNonPackedMips); + +void Encode_ID3D11Device2_CheckMultisampleQualityLevels1( + ID3D11Device2_Wrapper* wrapper, + HRESULT return_value, + DXGI_FORMAT Format, + UINT SampleCount, + UINT Flags, + UINT* pNumQualityLevels); + + +/* +** This part is generated from d3d11_3.h in Windows SDK: 10.0.20348.0 +** +*/ + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEXTURE2D_DESC1& value); + +void Encode_ID3D11Texture2D1_GetDesc1( + ID3D11Texture2D1_Wrapper* wrapper, + D3D11_TEXTURE2D_DESC1* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEXTURE3D_DESC1& value); + +void Encode_ID3D11Texture3D1_GetDesc1( + ID3D11Texture3D1_Wrapper* wrapper, + D3D11_TEXTURE3D_DESC1* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RASTERIZER_DESC2& value); + +void Encode_ID3D11RasterizerState2_GetDesc2( + ID3D11RasterizerState2_Wrapper* wrapper, + D3D11_RASTERIZER_DESC2* pDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_SRV1& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_SRV1& value); + +void Encode_ID3D11ShaderResourceView1_GetDesc1( + ID3D11ShaderResourceView1_Wrapper* wrapper, + D3D11_SHADER_RESOURCE_VIEW_DESC1* pDesc1); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_RTV1& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_RTV1& value); + +void Encode_ID3D11RenderTargetView1_GetDesc1( + ID3D11RenderTargetView1_Wrapper* wrapper, + D3D11_RENDER_TARGET_VIEW_DESC1* pDesc1); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_UAV1& value); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_TEX2D_ARRAY_UAV1& value); + +void Encode_ID3D11UnorderedAccessView1_GetDesc1( + ID3D11UnorderedAccessView1_Wrapper* wrapper, + D3D11_UNORDERED_ACCESS_VIEW_DESC1* pDesc1); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_QUERY_DESC1& value); + +void Encode_ID3D11Query1_GetDesc1( + ID3D11Query1_Wrapper* wrapper, + D3D11_QUERY_DESC1* pDesc1); + +void Encode_ID3D11DeviceContext3_Flush1( + ID3D11DeviceContext3_Wrapper* wrapper, + D3D11_CONTEXT_TYPE ContextType, + HANDLE hEvent); + +void Encode_ID3D11DeviceContext3_SetHardwareProtectionState( + ID3D11DeviceContext3_Wrapper* wrapper, + BOOL HwProtectionEnable); + +void Encode_ID3D11DeviceContext3_GetHardwareProtectionState( + ID3D11DeviceContext3_Wrapper* wrapper, + BOOL* pHwProtectionEnable); + +void Encode_ID3D11Fence_CreateSharedHandle( + ID3D11Fence_Wrapper* wrapper, + HRESULT return_value, + const SECURITY_ATTRIBUTES* pAttributes, + DWORD dwAccess, + LPCWSTR lpName, + HANDLE* pHandle); + +void Encode_ID3D11Fence_GetCompletedValue( + ID3D11Fence_Wrapper* wrapper, + UINT64 return_value); + +void Encode_ID3D11Fence_SetEventOnCompletion( + ID3D11Fence_Wrapper* wrapper, + HRESULT return_value, + UINT64 Value, + HANDLE hEvent); + +void Encode_ID3D11DeviceContext4_Signal( + ID3D11DeviceContext4_Wrapper* wrapper, + HRESULT return_value, + ID3D11Fence* pFence, + UINT64 Value); + +void Encode_ID3D11DeviceContext4_Wait( + ID3D11DeviceContext4_Wrapper* wrapper, + HRESULT return_value, + ID3D11Fence* pFence, + UINT64 Value); + +void Encode_ID3D11Device3_CreateRasterizerState2( + ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + const D3D11_RASTERIZER_DESC2* pRasterizerDesc, + ID3D11RasterizerState2** ppRasterizerState); + +void Encode_ID3D11Device3_CreateShaderResourceView1( + ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_SHADER_RESOURCE_VIEW_DESC1* pDesc1, + ID3D11ShaderResourceView1** ppSRView1); + +void Encode_ID3D11Device3_CreateUnorderedAccessView1( + ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_UNORDERED_ACCESS_VIEW_DESC1* pDesc1, + ID3D11UnorderedAccessView1** ppUAView1); + +void Encode_ID3D11Device3_CreateRenderTargetView1( + ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource, + const D3D11_RENDER_TARGET_VIEW_DESC1* pDesc1, + ID3D11RenderTargetView1** ppRTView1); + +void Encode_ID3D11Device3_CreateQuery1( + ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + const D3D11_QUERY_DESC1* pQueryDesc1, + ID3D11Query1** ppQuery1); + +void Encode_ID3D11Device3_GetImmediateContext3( + ID3D11Device3_Wrapper* wrapper, + ID3D11DeviceContext3** ppImmediateContext); + +void Encode_ID3D11Device3_CreateDeferredContext3( + ID3D11Device3_Wrapper* wrapper, + HRESULT return_value, + UINT ContextFlags, + ID3D11DeviceContext3** ppDeferredContext); + +void Encode_ID3D11Device3_ReadFromSubresource( + ID3D11Device3_Wrapper* wrapper, + void* pDstData, + UINT DstRowPitch, + UINT DstDepthPitch, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + const D3D11_BOX* pSrcBox); + + +/* +** This part is generated from d3d11_4.h in Windows SDK: 10.0.20348.0 +** +*/ + +void Encode_ID3D11Device4_RegisterDeviceRemovedEvent( + ID3D11Device4_Wrapper* wrapper, + HRESULT return_value, + HANDLE hEvent, + DWORD* pdwCookie); + +void Encode_ID3D11Device4_UnregisterDeviceRemoved( + ID3D11Device4_Wrapper* wrapper, + DWORD dwCookie); + +void Encode_ID3D11Device5_OpenSharedFence( + ID3D11Device5_Wrapper* wrapper, + HRESULT return_value, + HANDLE hFence, + REFIID ReturnedInterface, + void** ppFence); + +void Encode_ID3D11Device5_CreateFence( + ID3D11Device5_Wrapper* wrapper, + HRESULT return_value, + UINT64 InitialValue, + D3D11_FENCE_FLAG Flags, + REFIID ReturnedInterface, + void** ppFence); + +void Encode_ID3D11Multithread_Enter( + ID3D11Multithread_Wrapper* wrapper); + +void Encode_ID3D11Multithread_Leave( + ID3D11Multithread_Wrapper* wrapper); + +void Encode_ID3D11Multithread_SetMultithreadProtected( + ID3D11Multithread_Wrapper* wrapper, + BOOL return_value, + BOOL bMTProtect); + +void Encode_ID3D11Multithread_GetMultithreadProtected( + ID3D11Multithread_Wrapper* wrapper, + BOOL return_value); + +void Encode_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData( + ID3D11VideoContext2_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + const void* pHDRMetaData); + +void Encode_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData( + ID3D11VideoContext2_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + DXGI_HDR_METADATA_TYPE* pType, + UINT Size, + void* pMetaData); + +void Encode_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData( + ID3D11VideoContext2_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + const void* pHDRMetaData); + +void Encode_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData( + ID3D11VideoContext2_Wrapper* wrapper, + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_HDR_METADATA_TYPE* pType, + UINT Size, + void* pMetaData); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_VIDEO_DECODER_HISTOGRAM& value); + +void Encode_ID3D11VideoDevice2_CheckFeatureSupport( + ID3D11VideoDevice2_Wrapper* wrapper, + HRESULT return_value, + D3D11_FEATURE_VIDEO Feature, + void* pFeatureSupportData, + UINT FeatureSupportDataSize); + +void Encode_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT( + ID3D11VideoDevice2_Wrapper* wrapper, + HRESULT return_value, + ID3D11CryptoSession* pCryptoSession, + D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS flags, + UINT DataSize, + void* pData); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_VIDEO_DECODER_BUFFER_DESC2& value); + +void Encode_ID3D11VideoContext3_DecoderBeginFrame1( + ID3D11VideoContext3_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + ID3D11VideoDecoderOutputView* pView, + UINT ContentKeySize, + const void* pContentKey, + UINT NumComponentHistograms, + const UINT* pHistogramOffsets, + ID3D11Buffer* const* ppHistogramBuffers); + +void Encode_ID3D11VideoContext3_SubmitDecoderBuffers2( + ID3D11VideoContext3_Wrapper* wrapper, + HRESULT return_value, + ID3D11VideoDecoder* pDecoder, + UINT NumBuffers, + const D3D11_VIDEO_DECODER_BUFFER_DESC2* pBufferDesc); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_FEATURE_DATA_D3D11_OPTIONS4& value); + + +/* +** This part is generated from d3d11on12.h in Windows SDK: 10.0.20348.0 +** +*/ + +void Encode_D3D11On12CreateDevice( + HRESULT return_value, + IUnknown* pDevice, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + IUnknown* const* ppCommandQueues, + UINT NumQueues, + UINT NodeMask, + ID3D11Device** ppDevice, + ID3D11DeviceContext** ppImmediateContext, + D3D_FEATURE_LEVEL* pChosenFeatureLevel); + +void EncodeStruct(ParameterEncoder* encoder, const D3D11_RESOURCE_FLAGS& value); + +void Encode_ID3D11On12Device_CreateWrappedResource( + ID3D11On12Device_Wrapper* wrapper, + HRESULT return_value, + IUnknown* pResource12, + const D3D11_RESOURCE_FLAGS* pFlags11, + D3D12_RESOURCE_STATES InState, + D3D12_RESOURCE_STATES OutState, + REFIID riid, + void** ppResource11); + +void Encode_ID3D11On12Device_ReleaseWrappedResources( + ID3D11On12Device_Wrapper* wrapper, + ID3D11Resource* const* ppResources, + UINT NumResources); + +void Encode_ID3D11On12Device_AcquireWrappedResources( + ID3D11On12Device_Wrapper* wrapper, + ID3D11Resource* const* ppResources, + UINT NumResources); + +void Encode_ID3D11On12Device1_GetD3D12Device( + ID3D11On12Device1_Wrapper* wrapper, + HRESULT return_value, + REFIID riid, + void** ppvDevice); + +void Encode_ID3D11On12Device2_UnwrapUnderlyingResource( + ID3D11On12Device2_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource11, + ID3D12CommandQueue* pCommandQueue, + REFIID riid, + void** ppvResource12); + +void Encode_ID3D11On12Device2_ReturnUnderlyingResource( + ID3D11On12Device2_Wrapper* wrapper, + HRESULT return_value, + ID3D11Resource* pResource11, + UINT NumSync, + UINT64* pSignalValues, + ID3D12Fence** ppFences); + + /* ** This part is generated from Unknwnbase.h in Windows SDK: 10.0.20348.0 ** @@ -3509,6 +6228,8 @@ void EncodeStruct(ParameterEncoder* encoder, const tagRECT& value); void EncodeStruct(ParameterEncoder* encoder, const tagPOINT& value); +void EncodeStruct(ParameterEncoder* encoder, const tagSIZE& value); + /* ** This part is generated from minwinbase.h in Windows SDK: 10.0.20348.0 diff --git a/framework/generated/generated_dx12_call_id_to_string.h b/framework/generated/generated_dx12_call_id_to_string.h index 4cfa32598f..33317a7150 100644 --- a/framework/generated/generated_dx12_call_id_to_string.h +++ b/framework/generated/generated_dx12_call_id_to_string.h @@ -1490,6 +1490,1176 @@ inline std::wstring GetDx12CallIdString(format::ApiCallId call_id) case format::ApiCallId::ApiCall_ID3D12InfoQueue1_UnregisterMessageCallback: out = L"ID3D12InfoQueue1_UnregisterMessageCallback"; break; + case format::ApiCallId::ApiCall_D3D11CreateDevice: + out = L"D3D11CreateDevice"; + break; + case format::ApiCallId::ApiCall_D3D11CreateDeviceAndSwapChain: + out = L"D3D11CreateDeviceAndSwapChain"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceChild_GetDevice: + out = L"ID3D11DeviceChild_GetDevice"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceChild_GetPrivateData: + out = L"ID3D11DeviceChild_GetPrivateData"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceChild_SetPrivateData: + out = L"ID3D11DeviceChild_SetPrivateData"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceChild_SetPrivateDataInterface: + out = L"ID3D11DeviceChild_SetPrivateDataInterface"; + break; + case format::ApiCallId::ApiCall_ID3D11DepthStencilState_GetDesc: + out = L"ID3D11DepthStencilState_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11BlendState_GetDesc: + out = L"ID3D11BlendState_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11RasterizerState_GetDesc: + out = L"ID3D11RasterizerState_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11Resource_GetType: + out = L"ID3D11Resource_GetType"; + break; + case format::ApiCallId::ApiCall_ID3D11Resource_SetEvictionPriority: + out = L"ID3D11Resource_SetEvictionPriority"; + break; + case format::ApiCallId::ApiCall_ID3D11Resource_GetEvictionPriority: + out = L"ID3D11Resource_GetEvictionPriority"; + break; + case format::ApiCallId::ApiCall_ID3D11Buffer_GetDesc: + out = L"ID3D11Buffer_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11Texture1D_GetDesc: + out = L"ID3D11Texture1D_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11Texture2D_GetDesc: + out = L"ID3D11Texture2D_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11Texture3D_GetDesc: + out = L"ID3D11Texture3D_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11View_GetResource: + out = L"ID3D11View_GetResource"; + break; + case format::ApiCallId::ApiCall_ID3D11ShaderResourceView_GetDesc: + out = L"ID3D11ShaderResourceView_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11RenderTargetView_GetDesc: + out = L"ID3D11RenderTargetView_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11DepthStencilView_GetDesc: + out = L"ID3D11DepthStencilView_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11UnorderedAccessView_GetDesc: + out = L"ID3D11UnorderedAccessView_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11SamplerState_GetDesc: + out = L"ID3D11SamplerState_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11Asynchronous_GetDataSize: + out = L"ID3D11Asynchronous_GetDataSize"; + break; + case format::ApiCallId::ApiCall_ID3D11Query_GetDesc: + out = L"ID3D11Query_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11Counter_GetDesc: + out = L"ID3D11Counter_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11ClassInstance_GetClassLinkage: + out = L"ID3D11ClassInstance_GetClassLinkage"; + break; + case format::ApiCallId::ApiCall_ID3D11ClassInstance_GetDesc: + out = L"ID3D11ClassInstance_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11ClassInstance_GetInstanceName: + out = L"ID3D11ClassInstance_GetInstanceName"; + break; + case format::ApiCallId::ApiCall_ID3D11ClassInstance_GetTypeName: + out = L"ID3D11ClassInstance_GetTypeName"; + break; + case format::ApiCallId::ApiCall_ID3D11ClassLinkage_GetClassInstance: + out = L"ID3D11ClassLinkage_GetClassInstance"; + break; + case format::ApiCallId::ApiCall_ID3D11ClassLinkage_CreateClassInstance: + out = L"ID3D11ClassLinkage_CreateClassInstance"; + break; + case format::ApiCallId::ApiCall_ID3D11CommandList_GetContextFlags: + out = L"ID3D11CommandList_GetContextFlags"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSSetConstantBuffers: + out = L"ID3D11DeviceContext_VSSetConstantBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSSetShaderResources: + out = L"ID3D11DeviceContext_PSSetShaderResources"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSSetShader: + out = L"ID3D11DeviceContext_PSSetShader"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSSetSamplers: + out = L"ID3D11DeviceContext_PSSetSamplers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSSetShader: + out = L"ID3D11DeviceContext_VSSetShader"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawIndexed: + out = L"ID3D11DeviceContext_DrawIndexed"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_Draw: + out = L"ID3D11DeviceContext_Draw"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_Map: + out = L"ID3D11DeviceContext_Map"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_Unmap: + out = L"ID3D11DeviceContext_Unmap"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSSetConstantBuffers: + out = L"ID3D11DeviceContext_PSSetConstantBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IASetInputLayout: + out = L"ID3D11DeviceContext_IASetInputLayout"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IASetVertexBuffers: + out = L"ID3D11DeviceContext_IASetVertexBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IASetIndexBuffer: + out = L"ID3D11DeviceContext_IASetIndexBuffer"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawIndexedInstanced: + out = L"ID3D11DeviceContext_DrawIndexedInstanced"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawInstanced: + out = L"ID3D11DeviceContext_DrawInstanced"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSSetConstantBuffers: + out = L"ID3D11DeviceContext_GSSetConstantBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSSetShader: + out = L"ID3D11DeviceContext_GSSetShader"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IASetPrimitiveTopology: + out = L"ID3D11DeviceContext_IASetPrimitiveTopology"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSSetShaderResources: + out = L"ID3D11DeviceContext_VSSetShaderResources"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSSetSamplers: + out = L"ID3D11DeviceContext_VSSetSamplers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_Begin: + out = L"ID3D11DeviceContext_Begin"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_End: + out = L"ID3D11DeviceContext_End"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GetData: + out = L"ID3D11DeviceContext_GetData"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_SetPredication: + out = L"ID3D11DeviceContext_SetPredication"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSSetShaderResources: + out = L"ID3D11DeviceContext_GSSetShaderResources"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSSetSamplers: + out = L"ID3D11DeviceContext_GSSetSamplers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMSetRenderTargets: + out = L"ID3D11DeviceContext_OMSetRenderTargets"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews: + out = L"ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMSetBlendState: + out = L"ID3D11DeviceContext_OMSetBlendState"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMSetDepthStencilState: + out = L"ID3D11DeviceContext_OMSetDepthStencilState"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_SOSetTargets: + out = L"ID3D11DeviceContext_SOSetTargets"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawAuto: + out = L"ID3D11DeviceContext_DrawAuto"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawIndexedInstancedIndirect: + out = L"ID3D11DeviceContext_DrawIndexedInstancedIndirect"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawInstancedIndirect: + out = L"ID3D11DeviceContext_DrawInstancedIndirect"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_Dispatch: + out = L"ID3D11DeviceContext_Dispatch"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DispatchIndirect: + out = L"ID3D11DeviceContext_DispatchIndirect"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_RSSetState: + out = L"ID3D11DeviceContext_RSSetState"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_RSSetViewports: + out = L"ID3D11DeviceContext_RSSetViewports"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_RSSetScissorRects: + out = L"ID3D11DeviceContext_RSSetScissorRects"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CopySubresourceRegion: + out = L"ID3D11DeviceContext_CopySubresourceRegion"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CopyResource: + out = L"ID3D11DeviceContext_CopyResource"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_UpdateSubresource: + out = L"ID3D11DeviceContext_UpdateSubresource"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CopyStructureCount: + out = L"ID3D11DeviceContext_CopyStructureCount"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearRenderTargetView: + out = L"ID3D11DeviceContext_ClearRenderTargetView"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearUnorderedAccessViewUint: + out = L"ID3D11DeviceContext_ClearUnorderedAccessViewUint"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearUnorderedAccessViewFloat: + out = L"ID3D11DeviceContext_ClearUnorderedAccessViewFloat"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearDepthStencilView: + out = L"ID3D11DeviceContext_ClearDepthStencilView"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GenerateMips: + out = L"ID3D11DeviceContext_GenerateMips"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_SetResourceMinLOD: + out = L"ID3D11DeviceContext_SetResourceMinLOD"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GetResourceMinLOD: + out = L"ID3D11DeviceContext_GetResourceMinLOD"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_ResolveSubresource: + out = L"ID3D11DeviceContext_ResolveSubresource"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_ExecuteCommandList: + out = L"ID3D11DeviceContext_ExecuteCommandList"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSSetShaderResources: + out = L"ID3D11DeviceContext_HSSetShaderResources"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSSetShader: + out = L"ID3D11DeviceContext_HSSetShader"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSSetSamplers: + out = L"ID3D11DeviceContext_HSSetSamplers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSSetConstantBuffers: + out = L"ID3D11DeviceContext_HSSetConstantBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSSetShaderResources: + out = L"ID3D11DeviceContext_DSSetShaderResources"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSSetShader: + out = L"ID3D11DeviceContext_DSSetShader"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSSetSamplers: + out = L"ID3D11DeviceContext_DSSetSamplers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSSetConstantBuffers: + out = L"ID3D11DeviceContext_DSSetConstantBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetShaderResources: + out = L"ID3D11DeviceContext_CSSetShaderResources"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetUnorderedAccessViews: + out = L"ID3D11DeviceContext_CSSetUnorderedAccessViews"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetShader: + out = L"ID3D11DeviceContext_CSSetShader"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetSamplers: + out = L"ID3D11DeviceContext_CSSetSamplers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetConstantBuffers: + out = L"ID3D11DeviceContext_CSSetConstantBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSGetConstantBuffers: + out = L"ID3D11DeviceContext_VSGetConstantBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSGetShaderResources: + out = L"ID3D11DeviceContext_PSGetShaderResources"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSGetShader: + out = L"ID3D11DeviceContext_PSGetShader"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSGetSamplers: + out = L"ID3D11DeviceContext_PSGetSamplers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSGetShader: + out = L"ID3D11DeviceContext_VSGetShader"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSGetConstantBuffers: + out = L"ID3D11DeviceContext_PSGetConstantBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IAGetInputLayout: + out = L"ID3D11DeviceContext_IAGetInputLayout"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IAGetVertexBuffers: + out = L"ID3D11DeviceContext_IAGetVertexBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IAGetIndexBuffer: + out = L"ID3D11DeviceContext_IAGetIndexBuffer"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSGetConstantBuffers: + out = L"ID3D11DeviceContext_GSGetConstantBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSGetShader: + out = L"ID3D11DeviceContext_GSGetShader"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IAGetPrimitiveTopology: + out = L"ID3D11DeviceContext_IAGetPrimitiveTopology"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSGetShaderResources: + out = L"ID3D11DeviceContext_VSGetShaderResources"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSGetSamplers: + out = L"ID3D11DeviceContext_VSGetSamplers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GetPredication: + out = L"ID3D11DeviceContext_GetPredication"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSGetShaderResources: + out = L"ID3D11DeviceContext_GSGetShaderResources"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSGetSamplers: + out = L"ID3D11DeviceContext_GSGetSamplers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMGetRenderTargets: + out = L"ID3D11DeviceContext_OMGetRenderTargets"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews: + out = L"ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMGetBlendState: + out = L"ID3D11DeviceContext_OMGetBlendState"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMGetDepthStencilState: + out = L"ID3D11DeviceContext_OMGetDepthStencilState"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_SOGetTargets: + out = L"ID3D11DeviceContext_SOGetTargets"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_RSGetState: + out = L"ID3D11DeviceContext_RSGetState"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_RSGetViewports: + out = L"ID3D11DeviceContext_RSGetViewports"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_RSGetScissorRects: + out = L"ID3D11DeviceContext_RSGetScissorRects"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSGetShaderResources: + out = L"ID3D11DeviceContext_HSGetShaderResources"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSGetShader: + out = L"ID3D11DeviceContext_HSGetShader"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSGetSamplers: + out = L"ID3D11DeviceContext_HSGetSamplers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSGetConstantBuffers: + out = L"ID3D11DeviceContext_HSGetConstantBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSGetShaderResources: + out = L"ID3D11DeviceContext_DSGetShaderResources"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSGetShader: + out = L"ID3D11DeviceContext_DSGetShader"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSGetSamplers: + out = L"ID3D11DeviceContext_DSGetSamplers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSGetConstantBuffers: + out = L"ID3D11DeviceContext_DSGetConstantBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetShaderResources: + out = L"ID3D11DeviceContext_CSGetShaderResources"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetUnorderedAccessViews: + out = L"ID3D11DeviceContext_CSGetUnorderedAccessViews"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetShader: + out = L"ID3D11DeviceContext_CSGetShader"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetSamplers: + out = L"ID3D11DeviceContext_CSGetSamplers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetConstantBuffers: + out = L"ID3D11DeviceContext_CSGetConstantBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearState: + out = L"ID3D11DeviceContext_ClearState"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_Flush: + out = L"ID3D11DeviceContext_Flush"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GetType: + out = L"ID3D11DeviceContext_GetType"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GetContextFlags: + out = L"ID3D11DeviceContext_GetContextFlags"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_FinishCommandList: + out = L"ID3D11DeviceContext_FinishCommandList"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDecoder_GetCreationParameters: + out = L"ID3D11VideoDecoder_GetCreationParameters"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDecoder_GetDriverHandle: + out = L"ID3D11VideoDecoder_GetDriverHandle"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc: + out = L"ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat: + out = L"ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps: + out = L"ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps: + out = L"ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate: + out = L"ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange: + out = L"ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessor_GetContentDesc: + out = L"ID3D11VideoProcessor_GetContentDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessor_GetRateConversionCaps: + out = L"ID3D11VideoProcessor_GetRateConversionCaps"; + break; + case format::ApiCallId::ApiCall_ID3D11AuthenticatedChannel_GetCertificateSize: + out = L"ID3D11AuthenticatedChannel_GetCertificateSize"; + break; + case format::ApiCallId::ApiCall_ID3D11AuthenticatedChannel_GetCertificate: + out = L"ID3D11AuthenticatedChannel_GetCertificate"; + break; + case format::ApiCallId::ApiCall_ID3D11AuthenticatedChannel_GetChannelHandle: + out = L"ID3D11AuthenticatedChannel_GetChannelHandle"; + break; + case format::ApiCallId::ApiCall_ID3D11CryptoSession_GetCryptoType: + out = L"ID3D11CryptoSession_GetCryptoType"; + break; + case format::ApiCallId::ApiCall_ID3D11CryptoSession_GetDecoderProfile: + out = L"ID3D11CryptoSession_GetDecoderProfile"; + break; + case format::ApiCallId::ApiCall_ID3D11CryptoSession_GetCertificateSize: + out = L"ID3D11CryptoSession_GetCertificateSize"; + break; + case format::ApiCallId::ApiCall_ID3D11CryptoSession_GetCertificate: + out = L"ID3D11CryptoSession_GetCertificate"; + break; + case format::ApiCallId::ApiCall_ID3D11CryptoSession_GetCryptoSessionHandle: + out = L"ID3D11CryptoSession_GetCryptoSessionHandle"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDecoderOutputView_GetDesc: + out = L"ID3D11VideoDecoderOutputView_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorInputView_GetDesc: + out = L"ID3D11VideoProcessorInputView_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorOutputView_GetDesc: + out = L"ID3D11VideoProcessorOutputView_GetDesc"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_GetDecoderBuffer: + out = L"ID3D11VideoContext_GetDecoderBuffer"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_ReleaseDecoderBuffer: + out = L"ID3D11VideoContext_ReleaseDecoderBuffer"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_DecoderBeginFrame: + out = L"ID3D11VideoContext_DecoderBeginFrame"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_DecoderEndFrame: + out = L"ID3D11VideoContext_DecoderEndFrame"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_SubmitDecoderBuffers: + out = L"ID3D11VideoContext_SubmitDecoderBuffers"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_DecoderExtension: + out = L"ID3D11VideoContext_DecoderExtension"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputTargetRect: + out = L"ID3D11VideoContext_VideoProcessorSetOutputTargetRect"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor: + out = L"ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputColorSpace: + out = L"ID3D11VideoContext_VideoProcessorSetOutputColorSpace"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode: + out = L"ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputConstriction: + out = L"ID3D11VideoContext_VideoProcessorSetOutputConstriction"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputStereoMode: + out = L"ID3D11VideoContext_VideoProcessorSetOutputStereoMode"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputExtension: + out = L"ID3D11VideoContext_VideoProcessorSetOutputExtension"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputTargetRect: + out = L"ID3D11VideoContext_VideoProcessorGetOutputTargetRect"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor: + out = L"ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputColorSpace: + out = L"ID3D11VideoContext_VideoProcessorGetOutputColorSpace"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode: + out = L"ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputConstriction: + out = L"ID3D11VideoContext_VideoProcessorGetOutputConstriction"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputStereoMode: + out = L"ID3D11VideoContext_VideoProcessorGetOutputStereoMode"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputExtension: + out = L"ID3D11VideoContext_VideoProcessorGetOutputExtension"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat: + out = L"ID3D11VideoContext_VideoProcessorSetStreamFrameFormat"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamColorSpace: + out = L"ID3D11VideoContext_VideoProcessorSetStreamColorSpace"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamOutputRate: + out = L"ID3D11VideoContext_VideoProcessorSetStreamOutputRate"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamSourceRect: + out = L"ID3D11VideoContext_VideoProcessorSetStreamSourceRect"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamDestRect: + out = L"ID3D11VideoContext_VideoProcessorSetStreamDestRect"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamAlpha: + out = L"ID3D11VideoContext_VideoProcessorSetStreamAlpha"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamPalette: + out = L"ID3D11VideoContext_VideoProcessorSetStreamPalette"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio: + out = L"ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamLumaKey: + out = L"ID3D11VideoContext_VideoProcessorSetStreamLumaKey"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat: + out = L"ID3D11VideoContext_VideoProcessorSetStreamStereoFormat"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode: + out = L"ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamFilter: + out = L"ID3D11VideoContext_VideoProcessorSetStreamFilter"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamExtension: + out = L"ID3D11VideoContext_VideoProcessorSetStreamExtension"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat: + out = L"ID3D11VideoContext_VideoProcessorGetStreamFrameFormat"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamColorSpace: + out = L"ID3D11VideoContext_VideoProcessorGetStreamColorSpace"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamOutputRate: + out = L"ID3D11VideoContext_VideoProcessorGetStreamOutputRate"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamSourceRect: + out = L"ID3D11VideoContext_VideoProcessorGetStreamSourceRect"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamDestRect: + out = L"ID3D11VideoContext_VideoProcessorGetStreamDestRect"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamAlpha: + out = L"ID3D11VideoContext_VideoProcessorGetStreamAlpha"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamPalette: + out = L"ID3D11VideoContext_VideoProcessorGetStreamPalette"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio: + out = L"ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamLumaKey: + out = L"ID3D11VideoContext_VideoProcessorGetStreamLumaKey"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat: + out = L"ID3D11VideoContext_VideoProcessorGetStreamStereoFormat"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode: + out = L"ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamFilter: + out = L"ID3D11VideoContext_VideoProcessorGetStreamFilter"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamExtension: + out = L"ID3D11VideoContext_VideoProcessorGetStreamExtension"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorBlt: + out = L"ID3D11VideoContext_VideoProcessorBlt"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange: + out = L"ID3D11VideoContext_NegotiateCryptoSessionKeyExchange"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_EncryptionBlt: + out = L"ID3D11VideoContext_EncryptionBlt"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_DecryptionBlt: + out = L"ID3D11VideoContext_DecryptionBlt"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_StartSessionKeyRefresh: + out = L"ID3D11VideoContext_StartSessionKeyRefresh"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_FinishSessionKeyRefresh: + out = L"ID3D11VideoContext_FinishSessionKeyRefresh"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_GetEncryptionBltKey: + out = L"ID3D11VideoContext_GetEncryptionBltKey"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange: + out = L"ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_QueryAuthenticatedChannel: + out = L"ID3D11VideoContext_QueryAuthenticatedChannel"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_ConfigureAuthenticatedChannel: + out = L"ID3D11VideoContext_ConfigureAuthenticatedChannel"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamRotation: + out = L"ID3D11VideoContext_VideoProcessorSetStreamRotation"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamRotation: + out = L"ID3D11VideoContext_VideoProcessorGetStreamRotation"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoDecoder: + out = L"ID3D11VideoDevice_CreateVideoDecoder"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoProcessor: + out = L"ID3D11VideoDevice_CreateVideoProcessor"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateAuthenticatedChannel: + out = L"ID3D11VideoDevice_CreateAuthenticatedChannel"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateCryptoSession: + out = L"ID3D11VideoDevice_CreateCryptoSession"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoDecoderOutputView: + out = L"ID3D11VideoDevice_CreateVideoDecoderOutputView"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoProcessorInputView: + out = L"ID3D11VideoDevice_CreateVideoProcessorInputView"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoProcessorOutputView: + out = L"ID3D11VideoDevice_CreateVideoProcessorOutputView"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoProcessorEnumerator: + out = L"ID3D11VideoDevice_CreateVideoProcessorEnumerator"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_GetVideoDecoderProfileCount: + out = L"ID3D11VideoDevice_GetVideoDecoderProfileCount"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_GetVideoDecoderProfile: + out = L"ID3D11VideoDevice_GetVideoDecoderProfile"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CheckVideoDecoderFormat: + out = L"ID3D11VideoDevice_CheckVideoDecoderFormat"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_GetVideoDecoderConfigCount: + out = L"ID3D11VideoDevice_GetVideoDecoderConfigCount"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_GetVideoDecoderConfig: + out = L"ID3D11VideoDevice_GetVideoDecoderConfig"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_GetContentProtectionCaps: + out = L"ID3D11VideoDevice_GetContentProtectionCaps"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CheckCryptoKeyExchange: + out = L"ID3D11VideoDevice_CheckCryptoKeyExchange"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_SetPrivateData: + out = L"ID3D11VideoDevice_SetPrivateData"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_SetPrivateDataInterface: + out = L"ID3D11VideoDevice_SetPrivateDataInterface"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateBuffer: + out = L"ID3D11Device_CreateBuffer"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateTexture1D: + out = L"ID3D11Device_CreateTexture1D"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateTexture2D: + out = L"ID3D11Device_CreateTexture2D"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateTexture3D: + out = L"ID3D11Device_CreateTexture3D"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateShaderResourceView: + out = L"ID3D11Device_CreateShaderResourceView"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateUnorderedAccessView: + out = L"ID3D11Device_CreateUnorderedAccessView"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateRenderTargetView: + out = L"ID3D11Device_CreateRenderTargetView"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateDepthStencilView: + out = L"ID3D11Device_CreateDepthStencilView"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateInputLayout: + out = L"ID3D11Device_CreateInputLayout"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateVertexShader: + out = L"ID3D11Device_CreateVertexShader"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateGeometryShader: + out = L"ID3D11Device_CreateGeometryShader"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateGeometryShaderWithStreamOutput: + out = L"ID3D11Device_CreateGeometryShaderWithStreamOutput"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreatePixelShader: + out = L"ID3D11Device_CreatePixelShader"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateHullShader: + out = L"ID3D11Device_CreateHullShader"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateDomainShader: + out = L"ID3D11Device_CreateDomainShader"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateComputeShader: + out = L"ID3D11Device_CreateComputeShader"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateClassLinkage: + out = L"ID3D11Device_CreateClassLinkage"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateBlendState: + out = L"ID3D11Device_CreateBlendState"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateDepthStencilState: + out = L"ID3D11Device_CreateDepthStencilState"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateRasterizerState: + out = L"ID3D11Device_CreateRasterizerState"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateSamplerState: + out = L"ID3D11Device_CreateSamplerState"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateQuery: + out = L"ID3D11Device_CreateQuery"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreatePredicate: + out = L"ID3D11Device_CreatePredicate"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateCounter: + out = L"ID3D11Device_CreateCounter"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateDeferredContext: + out = L"ID3D11Device_CreateDeferredContext"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_OpenSharedResource: + out = L"ID3D11Device_OpenSharedResource"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CheckFormatSupport: + out = L"ID3D11Device_CheckFormatSupport"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CheckMultisampleQualityLevels: + out = L"ID3D11Device_CheckMultisampleQualityLevels"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CheckCounterInfo: + out = L"ID3D11Device_CheckCounterInfo"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CheckCounter: + out = L"ID3D11Device_CheckCounter"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_CheckFeatureSupport: + out = L"ID3D11Device_CheckFeatureSupport"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_GetPrivateData: + out = L"ID3D11Device_GetPrivateData"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_SetPrivateData: + out = L"ID3D11Device_SetPrivateData"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_SetPrivateDataInterface: + out = L"ID3D11Device_SetPrivateDataInterface"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_GetFeatureLevel: + out = L"ID3D11Device_GetFeatureLevel"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_GetCreationFlags: + out = L"ID3D11Device_GetCreationFlags"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_GetDeviceRemovedReason: + out = L"ID3D11Device_GetDeviceRemovedReason"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_GetImmediateContext: + out = L"ID3D11Device_GetImmediateContext"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_SetExceptionMode: + out = L"ID3D11Device_SetExceptionMode"; + break; + case format::ApiCallId::ApiCall_ID3D11Device_GetExceptionMode: + out = L"ID3D11Device_GetExceptionMode"; + break; + case format::ApiCallId::ApiCall_ID3D11BlendState1_GetDesc1: + out = L"ID3D11BlendState1_GetDesc1"; + break; + case format::ApiCallId::ApiCall_ID3D11RasterizerState1_GetDesc1: + out = L"ID3D11RasterizerState1_GetDesc1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_CopySubresourceRegion1: + out = L"ID3D11DeviceContext1_CopySubresourceRegion1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_UpdateSubresource1: + out = L"ID3D11DeviceContext1_UpdateSubresource1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_DiscardResource: + out = L"ID3D11DeviceContext1_DiscardResource"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_DiscardView: + out = L"ID3D11DeviceContext1_DiscardView"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_VSSetConstantBuffers1: + out = L"ID3D11DeviceContext1_VSSetConstantBuffers1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_HSSetConstantBuffers1: + out = L"ID3D11DeviceContext1_HSSetConstantBuffers1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_DSSetConstantBuffers1: + out = L"ID3D11DeviceContext1_DSSetConstantBuffers1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_GSSetConstantBuffers1: + out = L"ID3D11DeviceContext1_GSSetConstantBuffers1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_PSSetConstantBuffers1: + out = L"ID3D11DeviceContext1_PSSetConstantBuffers1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_CSSetConstantBuffers1: + out = L"ID3D11DeviceContext1_CSSetConstantBuffers1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_VSGetConstantBuffers1: + out = L"ID3D11DeviceContext1_VSGetConstantBuffers1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_HSGetConstantBuffers1: + out = L"ID3D11DeviceContext1_HSGetConstantBuffers1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_DSGetConstantBuffers1: + out = L"ID3D11DeviceContext1_DSGetConstantBuffers1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_GSGetConstantBuffers1: + out = L"ID3D11DeviceContext1_GSGetConstantBuffers1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_PSGetConstantBuffers1: + out = L"ID3D11DeviceContext1_PSGetConstantBuffers1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_CSGetConstantBuffers1: + out = L"ID3D11DeviceContext1_CSGetConstantBuffers1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_SwapDeviceContextState: + out = L"ID3D11DeviceContext1_SwapDeviceContextState"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_ClearView: + out = L"ID3D11DeviceContext1_ClearView"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_DiscardView1: + out = L"ID3D11DeviceContext1_DiscardView1"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_SubmitDecoderBuffers1: + out = L"ID3D11VideoContext1_SubmitDecoderBuffers1"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_GetDataForNewHardwareKey: + out = L"ID3D11VideoContext1_GetDataForNewHardwareKey"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_CheckCryptoSessionStatus: + out = L"ID3D11VideoContext1_CheckCryptoSessionStatus"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_DecoderEnableDownsampling: + out = L"ID3D11VideoContext1_DecoderEnableDownsampling"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_DecoderUpdateDownsampling: + out = L"ID3D11VideoContext1_DecoderUpdateDownsampling"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1: + out = L"ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage: + out = L"ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1: + out = L"ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage: + out = L"ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1: + out = L"ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorSetStreamMirror: + out = L"ID3D11VideoContext1_VideoProcessorSetStreamMirror"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1: + out = L"ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetStreamMirror: + out = L"ID3D11VideoContext1_VideoProcessorGetStreamMirror"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetBehaviorHints: + out = L"ID3D11VideoContext1_VideoProcessorGetBehaviorHints"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize: + out = L"ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice1_GetVideoDecoderCaps: + out = L"ID3D11VideoDevice1_GetVideoDecoderCaps"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice1_CheckVideoDecoderDownsampling: + out = L"ID3D11VideoDevice1_CheckVideoDecoderDownsampling"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters: + out = L"ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion: + out = L"ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion"; + break; + case format::ApiCallId::ApiCall_ID3D11Device1_GetImmediateContext1: + out = L"ID3D11Device1_GetImmediateContext1"; + break; + case format::ApiCallId::ApiCall_ID3D11Device1_CreateDeferredContext1: + out = L"ID3D11Device1_CreateDeferredContext1"; + break; + case format::ApiCallId::ApiCall_ID3D11Device1_CreateBlendState1: + out = L"ID3D11Device1_CreateBlendState1"; + break; + case format::ApiCallId::ApiCall_ID3D11Device1_CreateRasterizerState1: + out = L"ID3D11Device1_CreateRasterizerState1"; + break; + case format::ApiCallId::ApiCall_ID3D11Device1_CreateDeviceContextState: + out = L"ID3D11Device1_CreateDeviceContextState"; + break; + case format::ApiCallId::ApiCall_ID3D11Device1_OpenSharedResource1: + out = L"ID3D11Device1_OpenSharedResource1"; + break; + case format::ApiCallId::ApiCall_ID3D11Device1_OpenSharedResourceByName: + out = L"ID3D11Device1_OpenSharedResourceByName"; + break; + case format::ApiCallId::ApiCall_ID3DUserDefinedAnnotation_BeginEvent: + out = L"ID3DUserDefinedAnnotation_BeginEvent"; + break; + case format::ApiCallId::ApiCall_ID3DUserDefinedAnnotation_EndEvent: + out = L"ID3DUserDefinedAnnotation_EndEvent"; + break; + case format::ApiCallId::ApiCall_ID3DUserDefinedAnnotation_SetMarker: + out = L"ID3DUserDefinedAnnotation_SetMarker"; + break; + case format::ApiCallId::ApiCall_ID3DUserDefinedAnnotation_GetStatus: + out = L"ID3DUserDefinedAnnotation_GetStatus"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_UpdateTileMappings: + out = L"ID3D11DeviceContext2_UpdateTileMappings"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_CopyTileMappings: + out = L"ID3D11DeviceContext2_CopyTileMappings"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_CopyTiles: + out = L"ID3D11DeviceContext2_CopyTiles"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_UpdateTiles: + out = L"ID3D11DeviceContext2_UpdateTiles"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_ResizeTilePool: + out = L"ID3D11DeviceContext2_ResizeTilePool"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_TiledResourceBarrier: + out = L"ID3D11DeviceContext2_TiledResourceBarrier"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_IsAnnotationEnabled: + out = L"ID3D11DeviceContext2_IsAnnotationEnabled"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_SetMarkerInt: + out = L"ID3D11DeviceContext2_SetMarkerInt"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_BeginEventInt: + out = L"ID3D11DeviceContext2_BeginEventInt"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_EndEvent: + out = L"ID3D11DeviceContext2_EndEvent"; + break; + case format::ApiCallId::ApiCall_ID3D11Device2_GetImmediateContext2: + out = L"ID3D11Device2_GetImmediateContext2"; + break; + case format::ApiCallId::ApiCall_ID3D11Device2_CreateDeferredContext2: + out = L"ID3D11Device2_CreateDeferredContext2"; + break; + case format::ApiCallId::ApiCall_ID3D11Device2_GetResourceTiling: + out = L"ID3D11Device2_GetResourceTiling"; + break; + case format::ApiCallId::ApiCall_ID3D11Device2_CheckMultisampleQualityLevels1: + out = L"ID3D11Device2_CheckMultisampleQualityLevels1"; + break; + case format::ApiCallId::ApiCall_ID3D11Texture2D1_GetDesc1: + out = L"ID3D11Texture2D1_GetDesc1"; + break; + case format::ApiCallId::ApiCall_ID3D11Texture3D1_GetDesc1: + out = L"ID3D11Texture3D1_GetDesc1"; + break; + case format::ApiCallId::ApiCall_ID3D11RasterizerState2_GetDesc2: + out = L"ID3D11RasterizerState2_GetDesc2"; + break; + case format::ApiCallId::ApiCall_ID3D11ShaderResourceView1_GetDesc1: + out = L"ID3D11ShaderResourceView1_GetDesc1"; + break; + case format::ApiCallId::ApiCall_ID3D11RenderTargetView1_GetDesc1: + out = L"ID3D11RenderTargetView1_GetDesc1"; + break; + case format::ApiCallId::ApiCall_ID3D11UnorderedAccessView1_GetDesc1: + out = L"ID3D11UnorderedAccessView1_GetDesc1"; + break; + case format::ApiCallId::ApiCall_ID3D11Query1_GetDesc1: + out = L"ID3D11Query1_GetDesc1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext3_Flush1: + out = L"ID3D11DeviceContext3_Flush1"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext3_SetHardwareProtectionState: + out = L"ID3D11DeviceContext3_SetHardwareProtectionState"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext3_GetHardwareProtectionState: + out = L"ID3D11DeviceContext3_GetHardwareProtectionState"; + break; + case format::ApiCallId::ApiCall_ID3D11Fence_CreateSharedHandle: + out = L"ID3D11Fence_CreateSharedHandle"; + break; + case format::ApiCallId::ApiCall_ID3D11Fence_GetCompletedValue: + out = L"ID3D11Fence_GetCompletedValue"; + break; + case format::ApiCallId::ApiCall_ID3D11Fence_SetEventOnCompletion: + out = L"ID3D11Fence_SetEventOnCompletion"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext4_Signal: + out = L"ID3D11DeviceContext4_Signal"; + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext4_Wait: + out = L"ID3D11DeviceContext4_Wait"; + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateTexture2D1: + out = L"ID3D11Device3_CreateTexture2D1"; + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateTexture3D1: + out = L"ID3D11Device3_CreateTexture3D1"; + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateRasterizerState2: + out = L"ID3D11Device3_CreateRasterizerState2"; + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateShaderResourceView1: + out = L"ID3D11Device3_CreateShaderResourceView1"; + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateUnorderedAccessView1: + out = L"ID3D11Device3_CreateUnorderedAccessView1"; + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateRenderTargetView1: + out = L"ID3D11Device3_CreateRenderTargetView1"; + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateQuery1: + out = L"ID3D11Device3_CreateQuery1"; + break; + case format::ApiCallId::ApiCall_ID3D11Device3_GetImmediateContext3: + out = L"ID3D11Device3_GetImmediateContext3"; + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateDeferredContext3: + out = L"ID3D11Device3_CreateDeferredContext3"; + break; + case format::ApiCallId::ApiCall_ID3D11Device3_WriteToSubresource: + out = L"ID3D11Device3_WriteToSubresource"; + break; + case format::ApiCallId::ApiCall_ID3D11Device3_ReadFromSubresource: + out = L"ID3D11Device3_ReadFromSubresource"; + break; + case format::ApiCallId::ApiCall_ID3D11Device4_RegisterDeviceRemovedEvent: + out = L"ID3D11Device4_RegisterDeviceRemovedEvent"; + break; + case format::ApiCallId::ApiCall_ID3D11Device4_UnregisterDeviceRemoved: + out = L"ID3D11Device4_UnregisterDeviceRemoved"; + break; + case format::ApiCallId::ApiCall_ID3D11Device5_OpenSharedFence: + out = L"ID3D11Device5_OpenSharedFence"; + break; + case format::ApiCallId::ApiCall_ID3D11Device5_CreateFence: + out = L"ID3D11Device5_CreateFence"; + break; + case format::ApiCallId::ApiCall_ID3D11Multithread_Enter: + out = L"ID3D11Multithread_Enter"; + break; + case format::ApiCallId::ApiCall_ID3D11Multithread_Leave: + out = L"ID3D11Multithread_Leave"; + break; + case format::ApiCallId::ApiCall_ID3D11Multithread_SetMultithreadProtected: + out = L"ID3D11Multithread_SetMultithreadProtected"; + break; + case format::ApiCallId::ApiCall_ID3D11Multithread_GetMultithreadProtected: + out = L"ID3D11Multithread_GetMultithreadProtected"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData: + out = L"ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData: + out = L"ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData: + out = L"ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData: + out = L"ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice2_CheckFeatureSupport: + out = L"ID3D11VideoDevice2_CheckFeatureSupport"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT: + out = L"ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext3_DecoderBeginFrame1: + out = L"ID3D11VideoContext3_DecoderBeginFrame1"; + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext3_SubmitDecoderBuffers2: + out = L"ID3D11VideoContext3_SubmitDecoderBuffers2"; + break; + case format::ApiCallId::ApiCall_D3D11On12CreateDevice: + out = L"D3D11On12CreateDevice"; + break; + case format::ApiCallId::ApiCall_ID3D11On12Device_CreateWrappedResource: + out = L"ID3D11On12Device_CreateWrappedResource"; + break; + case format::ApiCallId::ApiCall_ID3D11On12Device_ReleaseWrappedResources: + out = L"ID3D11On12Device_ReleaseWrappedResources"; + break; + case format::ApiCallId::ApiCall_ID3D11On12Device_AcquireWrappedResources: + out = L"ID3D11On12Device_AcquireWrappedResources"; + break; + case format::ApiCallId::ApiCall_ID3D11On12Device1_GetD3D12Device: + out = L"ID3D11On12Device1_GetD3D12Device"; + break; + case format::ApiCallId::ApiCall_ID3D11On12Device2_UnwrapUnderlyingResource: + out = L"ID3D11On12Device2_UnwrapUnderlyingResource"; + break; + case format::ApiCallId::ApiCall_ID3D11On12Device2_ReturnUnderlyingResource: + out = L"ID3D11On12Device2_ReturnUnderlyingResource"; + break; case format::ApiCallId::ApiCall_IUnknown_QueryInterface: out = L"IUnknown_QueryInterface"; break; diff --git a/framework/generated/generated_dx12_command_list_util.h b/framework/generated/generated_dx12_command_list_util.h index c5b4c67c99..c717ccc3bb 100644 --- a/framework/generated/generated_dx12_command_list_util.h +++ b/framework/generated/generated_dx12_command_list_util.h @@ -40,6 +40,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/framework/generated/generated_dx12_consumer.h b/framework/generated/generated_dx12_consumer.h index 7d3c588c56..32efccd24c 100644 --- a/framework/generated/generated_dx12_consumer.h +++ b/framework/generated/generated_dx12_consumer.h @@ -3390,6 +3390,2785 @@ class Dx12Consumer : public Dx12ConsumerBase HRESULT return_value, DWORD CallbackCookie){} +/* +** This part is generated from d3d11.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_D3D11CreateDevice( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pAdapter, + D3D_DRIVER_TYPE DriverType, + uint64_t Software, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + HandlePointerDecoder* ppDevice, + PointerDecoder* pFeatureLevel, + HandlePointerDecoder* ppImmediateContext){} + + virtual void Process_D3D11CreateDeviceAndSwapChain( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pAdapter, + D3D_DRIVER_TYPE DriverType, + uint64_t Software, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + StructPointerDecoder* pSwapChainDesc, + HandlePointerDecoder* ppSwapChain, + HandlePointerDecoder* ppDevice, + PointerDecoder* pFeatureLevel, + HandlePointerDecoder* ppImmediateContext){} + + virtual void Process_ID3D11DeviceChild_GetDevice( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDevice){} + + virtual void Process_ID3D11DeviceChild_GetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + PointerDecoder* pDataSize, + PointerDecoder* pData){} + + virtual void Process_ID3D11DeviceChild_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData){} + + virtual void Process_ID3D11DeviceChild_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData){} + + virtual void Process_ID3D11DepthStencilState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11BlendState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11RasterizerState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11Resource_GetType( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pResourceDimension){} + + virtual void Process_ID3D11Resource_SetEvictionPriority( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT EvictionPriority){} + + virtual void Process_ID3D11Resource_GetEvictionPriority( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value){} + + virtual void Process_ID3D11Buffer_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11Texture1D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11Texture2D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11Texture3D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11View_GetResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResource){} + + virtual void Process_ID3D11ShaderResourceView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11RenderTargetView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11DepthStencilView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11UnorderedAccessView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11SamplerState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11Asynchronous_GetDataSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value){} + + virtual void Process_ID3D11Query_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11Counter_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11ClassInstance_GetClassLinkage( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppLinkage){} + + virtual void Process_ID3D11ClassInstance_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11ClassInstance_GetInstanceName( + const ApiCallInfo& call_info, + format::HandleId object_id, + StringDecoder* pInstanceName, + PointerDecoder* pBufferLength){} + + virtual void Process_ID3D11ClassInstance_GetTypeName( + const ApiCallInfo& call_info, + format::HandleId object_id, + StringDecoder* pTypeName, + PointerDecoder* pBufferLength){} + + virtual void Process_ID3D11ClassLinkage_GetClassInstance( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StringDecoder* pClassInstanceName, + UINT InstanceIndex, + HandlePointerDecoder* ppInstance){} + + virtual void Process_ID3D11ClassLinkage_CreateClassInstance( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StringDecoder* pClassTypeName, + UINT ConstantBufferOffset, + UINT ConstantVectorOffset, + UINT TextureOffset, + UINT SamplerOffset, + HandlePointerDecoder* ppInstance){} + + virtual void Process_ID3D11CommandList_GetContextFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value){} + + virtual void Process_ID3D11DeviceContext_VSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers){} + + virtual void Process_ID3D11DeviceContext_PSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews){} + + virtual void Process_ID3D11DeviceContext_PSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pPixelShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances){} + + virtual void Process_ID3D11DeviceContext_PSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers){} + + virtual void Process_ID3D11DeviceContext_VSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVertexShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances){} + + virtual void Process_ID3D11DeviceContext_DrawIndexed( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT IndexCount, + UINT StartIndexLocation, + INT BaseVertexLocation){} + + virtual void Process_ID3D11DeviceContext_Draw( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT VertexCount, + UINT StartVertexLocation){} + + virtual void Process_ID3D11DeviceContext_Map( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + UINT Subresource, + D3D11_MAP MapType, + UINT MapFlags, + StructPointerDecoder* pMappedResource){} + + virtual void Process_ID3D11DeviceContext_Unmap( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource, + UINT Subresource){} + + virtual void Process_ID3D11DeviceContext_PSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers){} + + virtual void Process_ID3D11DeviceContext_IASetInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pInputLayout){} + + virtual void Process_ID3D11DeviceContext_IASetVertexBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppVertexBuffers, + PointerDecoder* pStrides, + PointerDecoder* pOffsets){} + + virtual void Process_ID3D11DeviceContext_IASetIndexBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pIndexBuffer, + DXGI_FORMAT Format, + UINT Offset){} + + virtual void Process_ID3D11DeviceContext_DrawIndexedInstanced( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT IndexCountPerInstance, + UINT InstanceCount, + UINT StartIndexLocation, + INT BaseVertexLocation, + UINT StartInstanceLocation){} + + virtual void Process_ID3D11DeviceContext_DrawInstanced( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT VertexCountPerInstance, + UINT InstanceCount, + UINT StartVertexLocation, + UINT StartInstanceLocation){} + + virtual void Process_ID3D11DeviceContext_GSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers){} + + virtual void Process_ID3D11DeviceContext_GSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances){} + + virtual void Process_ID3D11DeviceContext_IASetPrimitiveTopology( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D_PRIMITIVE_TOPOLOGY Topology){} + + virtual void Process_ID3D11DeviceContext_VSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews){} + + virtual void Process_ID3D11DeviceContext_VSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers){} + + virtual void Process_ID3D11DeviceContext_Begin( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pAsync){} + + virtual void Process_ID3D11DeviceContext_End( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pAsync){} + + virtual void Process_ID3D11DeviceContext_GetData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pAsync, + PointerDecoder* pData, + UINT DataSize, + UINT GetDataFlags){} + + virtual void Process_ID3D11DeviceContext_SetPredication( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pPredicate, + BOOL PredicateValue){} + + virtual void Process_ID3D11DeviceContext_GSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews){} + + virtual void Process_ID3D11DeviceContext_GSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers){} + + virtual void Process_ID3D11DeviceContext_OMSetRenderTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViews, + HandlePointerDecoder* ppRenderTargetViews, + format::HandleId pDepthStencilView){} + + virtual void Process_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRTVs, + HandlePointerDecoder* ppRenderTargetViews, + format::HandleId pDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews, + PointerDecoder* pUAVInitialCounts){} + + virtual void Process_ID3D11DeviceContext_OMSetBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBlendState, + PointerDecoder BlendFactor [4], + UINT SampleMask){} + + virtual void Process_ID3D11DeviceContext_OMSetDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDepthStencilState, + UINT StencilRef){} + + virtual void Process_ID3D11DeviceContext_SOSetTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumBuffers, + HandlePointerDecoder* ppSOTargets, + PointerDecoder* pOffsets){} + + virtual void Process_ID3D11DeviceContext_DrawAuto( + const ApiCallInfo& call_info, + format::HandleId object_id){} + + virtual void Process_ID3D11DeviceContext_DrawIndexedInstancedIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs){} + + virtual void Process_ID3D11DeviceContext_DrawInstancedIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs){} + + virtual void Process_ID3D11DeviceContext_Dispatch( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT ThreadGroupCountX, + UINT ThreadGroupCountY, + UINT ThreadGroupCountZ){} + + virtual void Process_ID3D11DeviceContext_DispatchIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs){} + + virtual void Process_ID3D11DeviceContext_RSSetState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pRasterizerState){} + + virtual void Process_ID3D11DeviceContext_RSSetViewports( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViewports, + StructPointerDecoder* pViewports){} + + virtual void Process_ID3D11DeviceContext_RSSetScissorRects( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRects, + StructPointerDecoder* pRects){} + + virtual void Process_ID3D11DeviceContext_CopySubresourceRegion( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox){} + + virtual void Process_ID3D11DeviceContext_CopyResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + format::HandleId pSrcResource){} + + virtual void Process_ID3D11DeviceContext_CopyStructureCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstBuffer, + UINT DstAlignedByteOffset, + format::HandleId pSrcView){} + + virtual void Process_ID3D11DeviceContext_ClearRenderTargetView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pRenderTargetView, + PointerDecoder ColorRGBA [4]){} + + virtual void Process_ID3D11DeviceContext_ClearUnorderedAccessViewUint( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pUnorderedAccessView, + PointerDecoder Values [4]){} + + virtual void Process_ID3D11DeviceContext_ClearUnorderedAccessViewFloat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pUnorderedAccessView, + PointerDecoder Values [4]){} + + virtual void Process_ID3D11DeviceContext_ClearDepthStencilView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDepthStencilView, + UINT ClearFlags, + FLOAT Depth, + UINT8 Stencil){} + + virtual void Process_ID3D11DeviceContext_GenerateMips( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pShaderResourceView){} + + virtual void Process_ID3D11DeviceContext_SetResourceMinLOD( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource, + FLOAT MinLOD){} + + virtual void Process_ID3D11DeviceContext_GetResourceMinLOD( + const ApiCallInfo& call_info, + format::HandleId object_id, + FLOAT return_value, + format::HandleId pResource){} + + virtual void Process_ID3D11DeviceContext_ResolveSubresource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + format::HandleId pSrcResource, + UINT SrcSubresource, + DXGI_FORMAT Format){} + + virtual void Process_ID3D11DeviceContext_ExecuteCommandList( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCommandList, + BOOL RestoreContextState){} + + virtual void Process_ID3D11DeviceContext_HSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews){} + + virtual void Process_ID3D11DeviceContext_HSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pHullShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances){} + + virtual void Process_ID3D11DeviceContext_HSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers){} + + virtual void Process_ID3D11DeviceContext_HSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers){} + + virtual void Process_ID3D11DeviceContext_DSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews){} + + virtual void Process_ID3D11DeviceContext_DSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDomainShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances){} + + virtual void Process_ID3D11DeviceContext_DSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers){} + + virtual void Process_ID3D11DeviceContext_DSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers){} + + virtual void Process_ID3D11DeviceContext_CSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews){} + + virtual void Process_ID3D11DeviceContext_CSSetUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews, + PointerDecoder* pUAVInitialCounts){} + + virtual void Process_ID3D11DeviceContext_CSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pComputeShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances){} + + virtual void Process_ID3D11DeviceContext_CSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers){} + + virtual void Process_ID3D11DeviceContext_CSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers){} + + virtual void Process_ID3D11DeviceContext_VSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers){} + + virtual void Process_ID3D11DeviceContext_PSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews){} + + virtual void Process_ID3D11DeviceContext_PSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppPixelShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances){} + + virtual void Process_ID3D11DeviceContext_PSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers){} + + virtual void Process_ID3D11DeviceContext_VSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppVertexShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances){} + + virtual void Process_ID3D11DeviceContext_PSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers){} + + virtual void Process_ID3D11DeviceContext_IAGetInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppInputLayout){} + + virtual void Process_ID3D11DeviceContext_IAGetVertexBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppVertexBuffers, + PointerDecoder* pStrides, + PointerDecoder* pOffsets){} + + virtual void Process_ID3D11DeviceContext_IAGetIndexBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* pIndexBuffer, + PointerDecoder* Format, + PointerDecoder* Offset){} + + virtual void Process_ID3D11DeviceContext_GSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers){} + + virtual void Process_ID3D11DeviceContext_GSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppGeometryShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances){} + + virtual void Process_ID3D11DeviceContext_IAGetPrimitiveTopology( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pTopology){} + + virtual void Process_ID3D11DeviceContext_VSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews){} + + virtual void Process_ID3D11DeviceContext_VSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers){} + + virtual void Process_ID3D11DeviceContext_GetPredication( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppPredicate, + PointerDecoder* pPredicateValue){} + + virtual void Process_ID3D11DeviceContext_GSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews){} + + virtual void Process_ID3D11DeviceContext_GSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers){} + + virtual void Process_ID3D11DeviceContext_OMGetRenderTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViews, + HandlePointerDecoder* ppRenderTargetViews, + HandlePointerDecoder* ppDepthStencilView){} + + virtual void Process_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRTVs, + HandlePointerDecoder* ppRenderTargetViews, + HandlePointerDecoder* ppDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews){} + + virtual void Process_ID3D11DeviceContext_OMGetBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppBlendState, + PointerDecoder BlendFactor [4], + PointerDecoder* pSampleMask){} + + virtual void Process_ID3D11DeviceContext_OMGetDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDepthStencilState, + PointerDecoder* pStencilRef){} + + virtual void Process_ID3D11DeviceContext_SOGetTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumBuffers, + HandlePointerDecoder* ppSOTargets){} + + virtual void Process_ID3D11DeviceContext_RSGetState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppRasterizerState){} + + virtual void Process_ID3D11DeviceContext_RSGetViewports( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pNumViewports, + StructPointerDecoder* pViewports){} + + virtual void Process_ID3D11DeviceContext_RSGetScissorRects( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pNumRects, + StructPointerDecoder* pRects){} + + virtual void Process_ID3D11DeviceContext_HSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews){} + + virtual void Process_ID3D11DeviceContext_HSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppHullShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances){} + + virtual void Process_ID3D11DeviceContext_HSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers){} + + virtual void Process_ID3D11DeviceContext_HSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers){} + + virtual void Process_ID3D11DeviceContext_DSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews){} + + virtual void Process_ID3D11DeviceContext_DSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDomainShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances){} + + virtual void Process_ID3D11DeviceContext_DSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers){} + + virtual void Process_ID3D11DeviceContext_DSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers){} + + virtual void Process_ID3D11DeviceContext_CSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews){} + + virtual void Process_ID3D11DeviceContext_CSGetUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews){} + + virtual void Process_ID3D11DeviceContext_CSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppComputeShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances){} + + virtual void Process_ID3D11DeviceContext_CSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers){} + + virtual void Process_ID3D11DeviceContext_CSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers){} + + virtual void Process_ID3D11DeviceContext_ClearState( + const ApiCallInfo& call_info, + format::HandleId object_id){} + + virtual void Process_ID3D11DeviceContext_Flush( + const ApiCallInfo& call_info, + format::HandleId object_id){} + + virtual void Process_ID3D11DeviceContext_GetType( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D11_DEVICE_CONTEXT_TYPE return_value){} + + virtual void Process_ID3D11DeviceContext_GetContextFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value){} + + virtual void Process_ID3D11DeviceContext_FinishCommandList( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + BOOL RestoreDeferredContextState, + HandlePointerDecoder* ppCommandList){} + + virtual void Process_ID3D11VideoDecoder_GetCreationParameters( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pVideoDesc, + StructPointerDecoder* pConfig){} + + virtual void Process_ID3D11VideoDecoder_GetDriverHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pDriverHandle){} + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pContentDesc){} + + virtual void Process_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + PointerDecoder* pFlags){} + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCaps){} + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT TypeIndex, + StructPointerDecoder* pCaps){} + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT TypeIndex, + UINT CustomRateIndex, + StructPointerDecoder* pRate){} + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + StructPointerDecoder* pRange){} + + virtual void Process_ID3D11VideoProcessor_GetContentDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11VideoProcessor_GetRateConversionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCaps){} + + virtual void Process_ID3D11AuthenticatedChannel_GetCertificateSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pCertificateSize){} + + virtual void Process_ID3D11AuthenticatedChannel_GetCertificate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT CertificateSize, + PointerDecoder* pCertificate){} + + virtual void Process_ID3D11AuthenticatedChannel_GetChannelHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pChannelHandle){} + + virtual void Process_ID3D11CryptoSession_GetCryptoType( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCryptoType){} + + virtual void Process_ID3D11CryptoSession_GetDecoderProfile( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDecoderProfile){} + + virtual void Process_ID3D11CryptoSession_GetCertificateSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pCertificateSize){} + + virtual void Process_ID3D11CryptoSession_GetCertificate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT CertificateSize, + PointerDecoder* pCertificate){} + + virtual void Process_ID3D11CryptoSession_GetCryptoSessionHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pCryptoSessionHandle){} + + virtual void Process_ID3D11VideoDecoderOutputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11VideoProcessorInputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11VideoProcessorOutputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11VideoContext_GetDecoderBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type, + PointerDecoder* pBufferSize, + PointerDecoder* ppBuffer){} + + virtual void Process_ID3D11VideoContext_ReleaseDecoderBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type){} + + virtual void Process_ID3D11VideoContext_DecoderBeginFrame( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + format::HandleId pView, + UINT ContentKeySize, + PointerDecoder* pContentKey){} + + virtual void Process_ID3D11VideoContext_DecoderEndFrame( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder){} + + virtual void Process_ID3D11VideoContext_SubmitDecoderBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc){} + + virtual void Process_ID3D11VideoContext_DecoderExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + StructPointerDecoder* pExtensionData){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputTargetRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable, + StructPointerDecoder* pRect){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL YCbCr, + StructPointerDecoder* pColor){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + StructPointerDecoder* pColorSpace){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE AlphaFillMode, + UINT StreamIndex){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputConstriction( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable, + Decoded_tagSIZE Size){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputStereoMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + uint64_t pData){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputTargetRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* Enabled, + StructPointerDecoder* pRect){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pYCbCr, + StructPointerDecoder* pColor){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + StructPointerDecoder* pColorSpace){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pAlphaFillMode, + PointerDecoder* pStreamIndex){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputConstriction( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pEnabled, + StructPointerDecoder* pSize){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputStereoMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pEnabled){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + PointerDecoder* pData){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_FRAME_FORMAT FrameFormat){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pColorSpace){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamOutputRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate, + BOOL RepeatFrame, + StructPointerDecoder* pCustomRate){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamSourceRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pRect){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamDestRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pRect){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamAlpha( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Alpha){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamPalette( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + UINT Count, + PointerDecoder* pEntries){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pSourceAspectRatio, + StructPointerDecoder* pDestinationAspectRatio){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamLumaKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Lower, + FLOAT Upper){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT Format, + BOOL LeftViewFrame0, + BOOL BaseViewFrame0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode, + int MonoOffset){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamFilter( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + BOOL Enable, + int Level){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + uint64_t pData){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pFrameFormat){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pColorSpace){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamOutputRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pOutputRate, + PointerDecoder* pRepeatFrame, + StructPointerDecoder* pCustomRate){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamSourceRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pRect){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamDestRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pRect){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamAlpha( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + PointerDecoder* pAlpha){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamPalette( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + UINT Count, + PointerDecoder* pEntries){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pSourceAspectRatio, + StructPointerDecoder* pDestinationAspectRatio){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamLumaKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + PointerDecoder* pLower, + PointerDecoder* pUpper){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pFormat, + PointerDecoder* pLeftViewFrame0, + PointerDecoder* pBaseViewFrame0, + PointerDecoder* pFlipMode, + PointerDecoder* MonoOffset){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamFilter( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + PointerDecoder* pEnabled, + PointerDecoder* pLevel){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + PointerDecoder* pData){} + + virtual void Process_ID3D11VideoContext_VideoProcessorBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + format::HandleId pView, + UINT OutputFrame, + UINT StreamCount, + StructPointerDecoder* pStreams){} + + virtual void Process_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT DataSize, + PointerDecoder* pData){} + + virtual void Process_ID3D11VideoContext_EncryptionBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + format::HandleId pSrcSurface, + format::HandleId pDstSurface, + UINT IVSize, + PointerDecoder* pIV){} + + virtual void Process_ID3D11VideoContext_DecryptionBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + format::HandleId pSrcSurface, + format::HandleId pDstSurface, + StructPointerDecoder* pEncryptedBlockInfo, + UINT ContentKeySize, + PointerDecoder* pContentKey, + UINT IVSize, + PointerDecoder* pIV){} + + virtual void Process_ID3D11VideoContext_StartSessionKeyRefresh( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + UINT RandomNumberSize, + PointerDecoder* pRandomNumber){} + + virtual void Process_ID3D11VideoContext_FinishSessionKeyRefresh( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession){} + + virtual void Process_ID3D11VideoContext_GetEncryptionBltKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT KeySize, + PointerDecoder* pReadbackKey){} + + virtual void Process_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT DataSize, + PointerDecoder* pData){} + + virtual void Process_ID3D11VideoContext_QueryAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT InputSize, + PointerDecoder* pInput, + UINT OutputSize, + PointerDecoder* pOutput){} + + virtual void Process_ID3D11VideoContext_ConfigureAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT InputSize, + PointerDecoder* pInput, + StructPointerDecoder* pOutput){} + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamRotation( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_ROTATION Rotation){} + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamRotation( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pRotation){} + + virtual void Process_ID3D11VideoDevice_CreateVideoDecoder( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pVideoDesc, + StructPointerDecoder* pConfig, + HandlePointerDecoder* ppDecoder){} + + virtual void Process_ID3D11VideoDevice_CreateVideoProcessor( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pEnum, + UINT RateConversionIndex, + HandlePointerDecoder* ppVideoProcessor){} + + virtual void Process_ID3D11VideoDevice_CreateAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType, + HandlePointerDecoder* ppAuthenticatedChannel){} + + virtual void Process_ID3D11VideoDevice_CreateCryptoSession( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pKeyExchangeType, + HandlePointerDecoder* ppCryptoSession){} + + virtual void Process_ID3D11VideoDevice_CreateVideoDecoderOutputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVDOVView){} + + virtual void Process_ID3D11VideoDevice_CreateVideoProcessorInputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + format::HandleId pEnum, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVPIView){} + + virtual void Process_ID3D11VideoDevice_CreateVideoProcessorOutputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + format::HandleId pEnum, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVPOView){} + + virtual void Process_ID3D11VideoDevice_CreateVideoProcessorEnumerator( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppEnum){} + + virtual void Process_ID3D11VideoDevice_GetVideoDecoderProfileCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value){} + + virtual void Process_ID3D11VideoDevice_GetVideoDecoderProfile( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT Index, + StructPointerDecoder* pDecoderProfile){} + + virtual void Process_ID3D11VideoDevice_CheckVideoDecoderFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDecoderProfile, + DXGI_FORMAT Format, + PointerDecoder* pSupported){} + + virtual void Process_ID3D11VideoDevice_GetVideoDecoderConfigCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + PointerDecoder* pCount){} + + virtual void Process_ID3D11VideoDevice_GetVideoDecoderConfig( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + UINT Index, + StructPointerDecoder* pConfig){} + + virtual void Process_ID3D11VideoDevice_GetContentProtectionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pCaps){} + + virtual void Process_ID3D11VideoDevice_CheckCryptoKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + UINT Index, + StructPointerDecoder* pKeyExchangeType){} + + virtual void Process_ID3D11VideoDevice_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData){} + + virtual void Process_ID3D11VideoDevice_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData){} + + virtual void Process_ID3D11Device_CreateShaderResourceView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppSRView){} + + virtual void Process_ID3D11Device_CreateUnorderedAccessView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppUAView){} + + virtual void Process_ID3D11Device_CreateRenderTargetView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppRTView){} + + virtual void Process_ID3D11Device_CreateDepthStencilView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppDepthStencilView){} + + virtual void Process_ID3D11Device_CreateInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputElementDescs, + UINT NumElements, + PointerDecoder* pShaderBytecodeWithInputSignature, + SIZE_T BytecodeLength, + HandlePointerDecoder* ppInputLayout){} + + virtual void Process_ID3D11Device_CreateVertexShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppVertexShader){} + + virtual void Process_ID3D11Device_CreateGeometryShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppGeometryShader){} + + virtual void Process_ID3D11Device_CreateGeometryShaderWithStreamOutput( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + StructPointerDecoder* pSODeclaration, + UINT NumEntries, + PointerDecoder* pBufferStrides, + UINT NumStrides, + UINT RasterizedStream, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppGeometryShader){} + + virtual void Process_ID3D11Device_CreatePixelShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppPixelShader){} + + virtual void Process_ID3D11Device_CreateHullShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppHullShader){} + + virtual void Process_ID3D11Device_CreateDomainShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppDomainShader){} + + virtual void Process_ID3D11Device_CreateComputeShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppComputeShader){} + + virtual void Process_ID3D11Device_CreateClassLinkage( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + HandlePointerDecoder* ppLinkage){} + + virtual void Process_ID3D11Device_CreateBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pBlendStateDesc, + HandlePointerDecoder* ppBlendState){} + + virtual void Process_ID3D11Device_CreateDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDepthStencilDesc, + HandlePointerDecoder* ppDepthStencilState){} + + virtual void Process_ID3D11Device_CreateRasterizerState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState){} + + virtual void Process_ID3D11Device_CreateSamplerState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pSamplerDesc, + HandlePointerDecoder* ppSamplerState){} + + virtual void Process_ID3D11Device_CreateQuery( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pQueryDesc, + HandlePointerDecoder* ppQuery){} + + virtual void Process_ID3D11Device_CreatePredicate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pPredicateDesc, + HandlePointerDecoder* ppPredicate){} + + virtual void Process_ID3D11Device_CreateCounter( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCounterDesc, + HandlePointerDecoder* ppCounter){} + + virtual void Process_ID3D11Device_CreateDeferredContext( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext){} + + virtual void Process_ID3D11Device_OpenSharedResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hResource, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppResource){} + + virtual void Process_ID3D11Device_CheckFormatSupport( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + PointerDecoder* pFormatSupport){} + + virtual void Process_ID3D11Device_CheckMultisampleQualityLevels( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + UINT SampleCount, + PointerDecoder* pNumQualityLevels){} + + virtual void Process_ID3D11Device_CheckCounterInfo( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCounterInfo){} + + virtual void Process_ID3D11Device_CheckCounter( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + PointerDecoder* pType, + PointerDecoder* pActiveCounters, + StringDecoder* szName, + PointerDecoder* pNameLength, + StringDecoder* szUnits, + PointerDecoder* pUnitsLength, + StringDecoder* szDescription, + PointerDecoder* pDescriptionLength){} + + virtual void Process_ID3D11Device_GetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + PointerDecoder* pDataSize, + PointerDecoder* pData){} + + virtual void Process_ID3D11Device_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData){} + + virtual void Process_ID3D11Device_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData){} + + virtual void Process_ID3D11Device_GetFeatureLevel( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D_FEATURE_LEVEL return_value){} + + virtual void Process_ID3D11Device_GetCreationFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value){} + + virtual void Process_ID3D11Device_GetDeviceRemovedReason( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value){} + + virtual void Process_ID3D11Device_GetImmediateContext( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext){} + + virtual void Process_ID3D11Device_SetExceptionMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT RaiseFlags){} + + virtual void Process_ID3D11Device_GetExceptionMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value){} + +/* +** This part is generated from d3d11_1.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_ID3D11BlendState1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11RasterizerState1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11DeviceContext1_CopySubresourceRegion1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox, + UINT CopyFlags){} + + virtual void Process_ID3D11DeviceContext1_DiscardResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource){} + + virtual void Process_ID3D11DeviceContext1_DiscardView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResourceView){} + + virtual void Process_ID3D11DeviceContext1_VSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants){} + + virtual void Process_ID3D11DeviceContext1_HSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants){} + + virtual void Process_ID3D11DeviceContext1_DSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants){} + + virtual void Process_ID3D11DeviceContext1_GSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants){} + + virtual void Process_ID3D11DeviceContext1_PSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants){} + + virtual void Process_ID3D11DeviceContext1_CSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants){} + + virtual void Process_ID3D11DeviceContext1_VSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants){} + + virtual void Process_ID3D11DeviceContext1_HSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants){} + + virtual void Process_ID3D11DeviceContext1_DSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants){} + + virtual void Process_ID3D11DeviceContext1_GSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants){} + + virtual void Process_ID3D11DeviceContext1_PSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants){} + + virtual void Process_ID3D11DeviceContext1_CSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants){} + + virtual void Process_ID3D11DeviceContext1_SwapDeviceContextState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pState, + HandlePointerDecoder* ppPreviousState){} + + virtual void Process_ID3D11DeviceContext1_ClearView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pView, + PointerDecoder Color [4], + StructPointerDecoder* pRect, + UINT NumRects){} + + virtual void Process_ID3D11DeviceContext1_DiscardView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResourceView, + StructPointerDecoder* pRects, + UINT NumRects){} + + virtual void Process_ID3D11VideoContext1_SubmitDecoderBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc){} + + virtual void Process_ID3D11VideoContext1_GetDataForNewHardwareKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT PrivateInputSize, + PointerDecoder* pPrivatInputData, + PointerDecoder* pPrivateOutputData){} + + virtual void Process_ID3D11VideoContext1_CheckCryptoSessionStatus( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + PointerDecoder* pStatus){} + + virtual void Process_ID3D11VideoContext1_DecoderEnableDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pOutputDesc, + UINT ReferenceFrameCount){} + + virtual void Process_ID3D11VideoContext1_DecoderUpdateDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + StructPointerDecoder* pOutputDesc){} + + virtual void Process_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + DXGI_COLOR_SPACE_TYPE ColorSpace){} + + virtual void Process_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL ShaderUsage){} + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pColorSpace){} + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pShaderUsage){} + + virtual void Process_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + DXGI_COLOR_SPACE_TYPE ColorSpace){} + + virtual void Process_ID3D11VideoContext1_VideoProcessorSetStreamMirror( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + BOOL FlipHorizontal, + BOOL FlipVertical){} + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pColorSpace){} + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetStreamMirror( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pFlipHorizontal, + PointerDecoder* pFlipVertical){} + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetBehaviorHints( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT OutputWidth, + UINT OutputHeight, + DXGI_FORMAT OutputFormat, + UINT StreamCount, + StructPointerDecoder* pStreams, + PointerDecoder* pBehaviorHints){} + + virtual void Process_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pKeyExchangeType, + PointerDecoder* pPrivateInputSize, + PointerDecoder* pPrivateOutputSize){} + + virtual void Process_ID3D11VideoDevice1_GetVideoDecoderCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDecoderProfile, + UINT SampleWidth, + UINT SampleHeight, + StructPointerDecoder* pFrameRate, + UINT BitRate, + StructPointerDecoder* pCryptoType, + PointerDecoder* pDecoderCaps){} + + virtual void Process_ID3D11VideoDevice1_CheckVideoDecoderDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pInputConfig, + StructPointerDecoder* pFrameRate, + StructPointerDecoder* pOutputDesc, + PointerDecoder* pSupported, + PointerDecoder* pRealTimeHint){} + + virtual void Process_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pInputConfig, + StructPointerDecoder* pFrameRate, + StructPointerDecoder* pRecommendedOutputDesc){} + + virtual void Process_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT InputFormat, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + DXGI_FORMAT OutputFormat, + DXGI_COLOR_SPACE_TYPE OutputColorSpace, + PointerDecoder* pSupported){} + + virtual void Process_ID3D11Device1_GetImmediateContext1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext){} + + virtual void Process_ID3D11Device1_CreateDeferredContext1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext){} + + virtual void Process_ID3D11Device1_CreateBlendState1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pBlendStateDesc, + HandlePointerDecoder* ppBlendState){} + + virtual void Process_ID3D11Device1_CreateRasterizerState1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState){} + + virtual void Process_ID3D11Device1_CreateDeviceContextState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + Decoded_GUID EmulatedInterface, + PointerDecoder* pChosenFeatureLevel, + HandlePointerDecoder* ppContextState){} + + virtual void Process_ID3D11Device1_OpenSharedResource1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hResource, + Decoded_GUID returnedInterface, + HandlePointerDecoder* ppResource){} + + virtual void Process_ID3D11Device1_OpenSharedResourceByName( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + WStringDecoder* lpName, + DWORD dwDesiredAccess, + Decoded_GUID returnedInterface, + HandlePointerDecoder* ppResource){} + + virtual void Process_ID3DUserDefinedAnnotation_BeginEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + INT return_value, + WStringDecoder* Name){} + + virtual void Process_ID3DUserDefinedAnnotation_EndEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + INT return_value){} + + virtual void Process_ID3DUserDefinedAnnotation_SetMarker( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* Name){} + + virtual void Process_ID3DUserDefinedAnnotation_GetStatus( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value){} + +/* +** This part is generated from d3d11_2.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_ID3D11DeviceContext2_UpdateTileMappings( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pTiledResource, + UINT NumTiledResourceRegions, + StructPointerDecoder* pTiledResourceRegionStartCoordinates, + StructPointerDecoder* pTiledResourceRegionSizes, + format::HandleId pTilePool, + UINT NumRanges, + PointerDecoder* pRangeFlags, + PointerDecoder* pTilePoolStartOffsets, + PointerDecoder* pRangeTileCounts, + UINT Flags){} + + virtual void Process_ID3D11DeviceContext2_CopyTileMappings( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDestTiledResource, + StructPointerDecoder* pDestRegionStartCoordinate, + format::HandleId pSourceTiledResource, + StructPointerDecoder* pSourceRegionStartCoordinate, + StructPointerDecoder* pTileRegionSize, + UINT Flags){} + + virtual void Process_ID3D11DeviceContext2_CopyTiles( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResource, + StructPointerDecoder* pTileRegionStartCoordinate, + StructPointerDecoder* pTileRegionSize, + format::HandleId pBuffer, + UINT64 BufferStartOffsetInBytes, + UINT Flags){} + + virtual void Process_ID3D11DeviceContext2_UpdateTiles( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDestTiledResource, + StructPointerDecoder* pDestTileRegionStartCoordinate, + StructPointerDecoder* pDestTileRegionSize, + uint64_t pSourceTileData, + UINT Flags){} + + virtual void Process_ID3D11DeviceContext2_ResizeTilePool( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pTilePool, + UINT64 NewSizeInBytes){} + + virtual void Process_ID3D11DeviceContext2_TiledResourceBarrier( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResourceOrViewAccessBeforeBarrier, + format::HandleId pTiledResourceOrViewAccessAfterBarrier){} + + virtual void Process_ID3D11DeviceContext2_IsAnnotationEnabled( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value){} + + virtual void Process_ID3D11DeviceContext2_SetMarkerInt( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* pLabel, + INT Data){} + + virtual void Process_ID3D11DeviceContext2_BeginEventInt( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* pLabel, + INT Data){} + + virtual void Process_ID3D11DeviceContext2_EndEvent( + const ApiCallInfo& call_info, + format::HandleId object_id){} + + virtual void Process_ID3D11Device2_GetImmediateContext2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext){} + + virtual void Process_ID3D11Device2_CreateDeferredContext2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext){} + + virtual void Process_ID3D11Device2_GetResourceTiling( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResource, + PointerDecoder* pNumTilesForEntireResource, + StructPointerDecoder* pPackedMipDesc, + StructPointerDecoder* pStandardTileShapeForNonPackedMips, + PointerDecoder* pNumSubresourceTilings, + UINT FirstSubresourceTilingToGet, + StructPointerDecoder* pSubresourceTilingsForNonPackedMips){} + + virtual void Process_ID3D11Device2_CheckMultisampleQualityLevels1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + UINT SampleCount, + UINT Flags, + PointerDecoder* pNumQualityLevels){} + +/* +** This part is generated from d3d11_3.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_ID3D11Texture2D1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11Texture3D1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11RasterizerState2_GetDesc2( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc){} + + virtual void Process_ID3D11ShaderResourceView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1){} + + virtual void Process_ID3D11RenderTargetView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1){} + + virtual void Process_ID3D11UnorderedAccessView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1){} + + virtual void Process_ID3D11Query1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1){} + + virtual void Process_ID3D11DeviceContext3_Flush1( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D11_CONTEXT_TYPE ContextType, + uint64_t hEvent){} + + virtual void Process_ID3D11DeviceContext3_SetHardwareProtectionState( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL HwProtectionEnable){} + + virtual void Process_ID3D11DeviceContext3_GetHardwareProtectionState( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pHwProtectionEnable){} + + virtual void Process_ID3D11Fence_CreateSharedHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pAttributes, + DWORD dwAccess, + WStringDecoder* lpName, + PointerDecoder* pHandle){} + + virtual void Process_ID3D11Fence_GetCompletedValue( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT64 return_value){} + + virtual void Process_ID3D11Fence_SetEventOnCompletion( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT64 Value, + uint64_t hEvent){} + + virtual void Process_ID3D11DeviceContext4_Signal( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pFence, + UINT64 Value){} + + virtual void Process_ID3D11DeviceContext4_Wait( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pFence, + UINT64 Value){} + + virtual void Process_ID3D11Device3_CreateRasterizerState2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState){} + + virtual void Process_ID3D11Device3_CreateShaderResourceView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppSRView1){} + + virtual void Process_ID3D11Device3_CreateUnorderedAccessView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppUAView1){} + + virtual void Process_ID3D11Device3_CreateRenderTargetView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppRTView1){} + + virtual void Process_ID3D11Device3_CreateQuery1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pQueryDesc1, + HandlePointerDecoder* ppQuery1){} + + virtual void Process_ID3D11Device3_GetImmediateContext3( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext){} + + virtual void Process_ID3D11Device3_CreateDeferredContext3( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext){} + + virtual void Process_ID3D11Device3_ReadFromSubresource( + const ApiCallInfo& call_info, + format::HandleId object_id, + uint64_t pDstData, + UINT DstRowPitch, + UINT DstDepthPitch, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox){} + +/* +** This part is generated from d3d11_4.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_ID3D11Device4_RegisterDeviceRemovedEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hEvent, + PointerDecoder* pdwCookie){} + + virtual void Process_ID3D11Device4_UnregisterDeviceRemoved( + const ApiCallInfo& call_info, + format::HandleId object_id, + DWORD dwCookie){} + + virtual void Process_ID3D11Device5_OpenSharedFence( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hFence, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppFence){} + + virtual void Process_ID3D11Device5_CreateFence( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT64 InitialValue, + D3D11_FENCE_FLAG Flags, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppFence){} + + virtual void Process_ID3D11Multithread_Enter( + const ApiCallInfo& call_info, + format::HandleId object_id){} + + virtual void Process_ID3D11Multithread_Leave( + const ApiCallInfo& call_info, + format::HandleId object_id){} + + virtual void Process_ID3D11Multithread_SetMultithreadProtected( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value, + BOOL bMTProtect){} + + virtual void Process_ID3D11Multithread_GetMultithreadProtected( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value){} + + virtual void Process_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + PointerDecoder* pHDRMetaData){} + + virtual void Process_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pType, + UINT Size, + PointerDecoder* pMetaData){} + + virtual void Process_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + PointerDecoder* pHDRMetaData){} + + virtual void Process_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pType, + UINT Size, + PointerDecoder* pMetaData){} + + virtual void Process_ID3D11VideoDevice2_CheckFeatureSupport( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_FEATURE_VIDEO Feature, + PointerDecoder* pFeatureSupportData, + UINT FeatureSupportDataSize){} + + virtual void Process_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS flags, + UINT DataSize, + PointerDecoder* pData){} + + virtual void Process_ID3D11VideoContext3_DecoderBeginFrame1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + format::HandleId pView, + UINT ContentKeySize, + PointerDecoder* pContentKey, + UINT NumComponentHistograms, + PointerDecoder* pHistogramOffsets, + HandlePointerDecoder* ppHistogramBuffers){} + + virtual void Process_ID3D11VideoContext3_SubmitDecoderBuffers2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc){} + +/* +** This part is generated from d3d11on12.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_D3D11On12CreateDevice( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pDevice, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + HandlePointerDecoder* ppCommandQueues, + UINT NumQueues, + UINT NodeMask, + HandlePointerDecoder* ppDevice, + HandlePointerDecoder* ppImmediateContext, + PointerDecoder* pChosenFeatureLevel){} + + virtual void Process_ID3D11On12Device_CreateWrappedResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource12, + StructPointerDecoder* pFlags11, + D3D12_RESOURCE_STATES InState, + D3D12_RESOURCE_STATES OutState, + Decoded_GUID riid, + HandlePointerDecoder* ppResource11){} + + virtual void Process_ID3D11On12Device_ReleaseWrappedResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResources, + UINT NumResources){} + + virtual void Process_ID3D11On12Device_AcquireWrappedResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResources, + UINT NumResources){} + + virtual void Process_ID3D11On12Device1_GetD3D12Device( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID riid, + HandlePointerDecoder* ppvDevice){} + + virtual void Process_ID3D11On12Device2_UnwrapUnderlyingResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource11, + format::HandleId pCommandQueue, + Decoded_GUID riid, + HandlePointerDecoder* ppvResource12){} + + virtual void Process_ID3D11On12Device2_ReturnUnderlyingResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource11, + UINT NumSync, + PointerDecoder* pSignalValues, + HandlePointerDecoder* ppFences){} + /* ** This part is generated from Unknwnbase.h in Windows SDK: 10.0.20348.0 ** diff --git a/framework/generated/generated_dx12_decoder.cpp b/framework/generated/generated_dx12_decoder.cpp index c5ada72f45..dfc63a0b76 100644 --- a/framework/generated/generated_dx12_decoder.cpp +++ b/framework/generated/generated_dx12_decoder.cpp @@ -81,6 +81,15 @@ void Dx12Decoder::DecodeFunctionCall(format::ApiCallId call_id, case format::ApiCallId::ApiCall_D3D12GetInterface: Decode_D3D12GetInterface(call_info, parameter_buffer, buffer_size); break; + case format::ApiCallId::ApiCall_D3D11CreateDevice: + Decode_D3D11CreateDevice(call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_D3D11CreateDeviceAndSwapChain: + Decode_D3D11CreateDeviceAndSwapChain(call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_D3D11On12CreateDevice: + Decode_D3D11On12CreateDevice(call_info, parameter_buffer, buffer_size); + break; default: Dx12DecoderBase::DecodeFunctionCall(call_id, call_info, parameter_buffer, buffer_size); break; @@ -1498,9199 +1507,18034 @@ void Dx12Decoder::DecodeMethodCall(format::ApiCallId call_id, case format::ApiCallId::ApiCall_ID3D12InfoQueue1_UnregisterMessageCallback: Decode_ID3D12InfoQueue1_UnregisterMessageCallback(object_id, call_info, parameter_buffer, buffer_size); break; - case format::ApiCallId::ApiCall_IUnknown_QueryInterface: - Decode_IUnknown_QueryInterface(object_id, call_info, parameter_buffer, buffer_size); + case format::ApiCallId::ApiCall_ID3D11DeviceChild_GetDevice: + Decode_ID3D11DeviceChild_GetDevice(object_id, call_info, parameter_buffer, buffer_size); break; - case format::ApiCallId::ApiCall_IUnknown_AddRef: - Decode_IUnknown_AddRef(object_id, call_info, parameter_buffer, buffer_size); + case format::ApiCallId::ApiCall_ID3D11DeviceChild_GetPrivateData: + Decode_ID3D11DeviceChild_GetPrivateData(object_id, call_info, parameter_buffer, buffer_size); break; - case format::ApiCallId::ApiCall_IUnknown_Release: - Decode_IUnknown_Release(object_id, call_info, parameter_buffer, buffer_size); + case format::ApiCallId::ApiCall_ID3D11DeviceChild_SetPrivateData: + Decode_ID3D11DeviceChild_SetPrivateData(object_id, call_info, parameter_buffer, buffer_size); break; - default: - Dx12DecoderBase::DecodeMethodCall(call_id, object_id, call_info, parameter_buffer, buffer_size); + case format::ApiCallId::ApiCall_ID3D11DeviceChild_SetPrivateDataInterface: + Decode_ID3D11DeviceChild_SetPrivateDataInterface(object_id, call_info, parameter_buffer, buffer_size); break; - } -} - - -size_t Dx12Decoder::Decode_CreateDXGIFactory(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) -{ - size_t bytes_read = 0; - - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppFactory; - HRESULT return_value; - - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppFactory.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); - - for (auto consumer : GetConsumers()) - { - consumer->Process_CreateDXGIFactory(call_info, return_value, riid, &ppFactory); - } - - return bytes_read; -} - -size_t Dx12Decoder::Decode_CreateDXGIFactory1(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) -{ - size_t bytes_read = 0; - - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppFactory; - HRESULT return_value; - - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppFactory.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); - - for (auto consumer : GetConsumers()) - { - consumer->Process_CreateDXGIFactory1(call_info, return_value, riid, &ppFactory); - } - - return bytes_read; -} - -size_t Dx12Decoder::Decode_CreateDXGIFactory2(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) -{ - size_t bytes_read = 0; - - UINT Flags; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppFactory; - HRESULT return_value; - - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppFactory.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); - - for (auto consumer : GetConsumers()) - { - consumer->Process_CreateDXGIFactory2(call_info, return_value, Flags, riid, &ppFactory); - } - - return bytes_read; -} - -size_t Dx12Decoder::Decode_DXGIGetDebugInterface1(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) -{ - size_t bytes_read = 0; - - UINT Flags; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder pDebug; - HRESULT return_value; - - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += pDebug.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); - - for (auto consumer : GetConsumers()) - { - consumer->Process_DXGIGetDebugInterface1(call_info, return_value, Flags, riid, &pDebug); - } - - return bytes_read; -} - -size_t Dx12Decoder::Decode_DXGIDeclareAdapterRemovalSupport(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) -{ - size_t bytes_read = 0; - - HRESULT return_value; - - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); - - for (auto consumer : GetConsumers()) - { - consumer->Process_DXGIDeclareAdapterRemovalSupport(call_info, return_value); - } - - return bytes_read; -} - -size_t Dx12Decoder::Decode_D3D12SerializeRootSignature(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) -{ - size_t bytes_read = 0; - - StructPointerDecoder pRootSignature; - D3D_ROOT_SIGNATURE_VERSION Version; - HandlePointerDecoder ppBlob; - HandlePointerDecoder ppErrorBlob; - HRESULT return_value; - - bytes_read += pRootSignature.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Version); - bytes_read += ppBlob.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ppErrorBlob.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); - - for (auto consumer : GetConsumers()) - { - consumer->Process_D3D12SerializeRootSignature(call_info, return_value, &pRootSignature, Version, &ppBlob, &ppErrorBlob); - } - - return bytes_read; -} - -size_t Dx12Decoder::Decode_D3D12CreateRootSignatureDeserializer(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) -{ - size_t bytes_read = 0; - - PointerDecoder pSrcData; - SIZE_T SrcDataSizeInBytes; - Decoded_GUID pRootSignatureDeserializerInterface; - GUID value_pRootSignatureDeserializerInterface; - pRootSignatureDeserializerInterface.decoded_value = &value_pRootSignatureDeserializerInterface; - HandlePointerDecoder ppRootSignatureDeserializer; - HRESULT return_value; - - bytes_read += pSrcData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcDataSizeInBytes); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRootSignatureDeserializerInterface); - bytes_read += ppRootSignatureDeserializer.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); - - for (auto consumer : GetConsumers()) - { - consumer->Process_D3D12CreateRootSignatureDeserializer(call_info, return_value, &pSrcData, SrcDataSizeInBytes, pRootSignatureDeserializerInterface, &ppRootSignatureDeserializer); - } - - return bytes_read; -} - -size_t Dx12Decoder::Decode_D3D12SerializeVersionedRootSignature(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) -{ - size_t bytes_read = 0; - - StructPointerDecoder pRootSignature; - HandlePointerDecoder ppBlob; - HandlePointerDecoder ppErrorBlob; - HRESULT return_value; - - bytes_read += pRootSignature.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ppBlob.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ppErrorBlob.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); - - for (auto consumer : GetConsumers()) - { - consumer->Process_D3D12SerializeVersionedRootSignature(call_info, return_value, &pRootSignature, &ppBlob, &ppErrorBlob); - } - - return bytes_read; -} - -size_t Dx12Decoder::Decode_D3D12CreateVersionedRootSignatureDeserializer(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) -{ - size_t bytes_read = 0; - - PointerDecoder pSrcData; - SIZE_T SrcDataSizeInBytes; - Decoded_GUID pRootSignatureDeserializerInterface; - GUID value_pRootSignatureDeserializerInterface; - pRootSignatureDeserializerInterface.decoded_value = &value_pRootSignatureDeserializerInterface; - HandlePointerDecoder ppRootSignatureDeserializer; - HRESULT return_value; - - bytes_read += pSrcData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcDataSizeInBytes); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRootSignatureDeserializerInterface); - bytes_read += ppRootSignatureDeserializer.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); - - for (auto consumer : GetConsumers()) - { - consumer->Process_D3D12CreateVersionedRootSignatureDeserializer(call_info, return_value, &pSrcData, SrcDataSizeInBytes, pRootSignatureDeserializerInterface, &ppRootSignatureDeserializer); - } - - return bytes_read; -} - -size_t Dx12Decoder::Decode_D3D12CreateDevice(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) -{ - size_t bytes_read = 0; - - format::HandleId pAdapter; - D3D_FEATURE_LEVEL MinimumFeatureLevel; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppDevice; - HRESULT return_value; - - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pAdapter); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MinimumFeatureLevel); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); - - for (auto consumer : GetConsumers()) - { - consumer->Process_D3D12CreateDevice(call_info, return_value, pAdapter, MinimumFeatureLevel, riid, &ppDevice); - } - - return bytes_read; -} - -size_t Dx12Decoder::Decode_D3D12GetDebugInterface(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) -{ - size_t bytes_read = 0; - - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvDebug; - HRESULT return_value; + case format::ApiCallId::ApiCall_ID3D11DepthStencilState_GetDesc: + Decode_ID3D11DepthStencilState_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11BlendState_GetDesc: + Decode_ID3D11BlendState_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11RasterizerState_GetDesc: + Decode_ID3D11RasterizerState_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Resource_GetType: + Decode_ID3D11Resource_GetType(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Resource_SetEvictionPriority: + Decode_ID3D11Resource_SetEvictionPriority(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Resource_GetEvictionPriority: + Decode_ID3D11Resource_GetEvictionPriority(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Buffer_GetDesc: + Decode_ID3D11Buffer_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Texture1D_GetDesc: + Decode_ID3D11Texture1D_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Texture2D_GetDesc: + Decode_ID3D11Texture2D_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Texture3D_GetDesc: + Decode_ID3D11Texture3D_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11View_GetResource: + Decode_ID3D11View_GetResource(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11ShaderResourceView_GetDesc: + Decode_ID3D11ShaderResourceView_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11RenderTargetView_GetDesc: + Decode_ID3D11RenderTargetView_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DepthStencilView_GetDesc: + Decode_ID3D11DepthStencilView_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11UnorderedAccessView_GetDesc: + Decode_ID3D11UnorderedAccessView_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11SamplerState_GetDesc: + Decode_ID3D11SamplerState_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Asynchronous_GetDataSize: + Decode_ID3D11Asynchronous_GetDataSize(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Query_GetDesc: + Decode_ID3D11Query_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Counter_GetDesc: + Decode_ID3D11Counter_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11ClassInstance_GetClassLinkage: + Decode_ID3D11ClassInstance_GetClassLinkage(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11ClassInstance_GetDesc: + Decode_ID3D11ClassInstance_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11ClassInstance_GetInstanceName: + Decode_ID3D11ClassInstance_GetInstanceName(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11ClassInstance_GetTypeName: + Decode_ID3D11ClassInstance_GetTypeName(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11ClassLinkage_GetClassInstance: + Decode_ID3D11ClassLinkage_GetClassInstance(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11ClassLinkage_CreateClassInstance: + Decode_ID3D11ClassLinkage_CreateClassInstance(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11CommandList_GetContextFlags: + Decode_ID3D11CommandList_GetContextFlags(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSSetConstantBuffers: + Decode_ID3D11DeviceContext_VSSetConstantBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSSetShaderResources: + Decode_ID3D11DeviceContext_PSSetShaderResources(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSSetShader: + Decode_ID3D11DeviceContext_PSSetShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSSetSamplers: + Decode_ID3D11DeviceContext_PSSetSamplers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSSetShader: + Decode_ID3D11DeviceContext_VSSetShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawIndexed: + Decode_ID3D11DeviceContext_DrawIndexed(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_Draw: + Decode_ID3D11DeviceContext_Draw(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_Map: + Decode_ID3D11DeviceContext_Map(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_Unmap: + Decode_ID3D11DeviceContext_Unmap(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSSetConstantBuffers: + Decode_ID3D11DeviceContext_PSSetConstantBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IASetInputLayout: + Decode_ID3D11DeviceContext_IASetInputLayout(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IASetVertexBuffers: + Decode_ID3D11DeviceContext_IASetVertexBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IASetIndexBuffer: + Decode_ID3D11DeviceContext_IASetIndexBuffer(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawIndexedInstanced: + Decode_ID3D11DeviceContext_DrawIndexedInstanced(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawInstanced: + Decode_ID3D11DeviceContext_DrawInstanced(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSSetConstantBuffers: + Decode_ID3D11DeviceContext_GSSetConstantBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSSetShader: + Decode_ID3D11DeviceContext_GSSetShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IASetPrimitiveTopology: + Decode_ID3D11DeviceContext_IASetPrimitiveTopology(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSSetShaderResources: + Decode_ID3D11DeviceContext_VSSetShaderResources(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSSetSamplers: + Decode_ID3D11DeviceContext_VSSetSamplers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_Begin: + Decode_ID3D11DeviceContext_Begin(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_End: + Decode_ID3D11DeviceContext_End(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GetData: + Decode_ID3D11DeviceContext_GetData(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_SetPredication: + Decode_ID3D11DeviceContext_SetPredication(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSSetShaderResources: + Decode_ID3D11DeviceContext_GSSetShaderResources(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSSetSamplers: + Decode_ID3D11DeviceContext_GSSetSamplers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMSetRenderTargets: + Decode_ID3D11DeviceContext_OMSetRenderTargets(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews: + Decode_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMSetBlendState: + Decode_ID3D11DeviceContext_OMSetBlendState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMSetDepthStencilState: + Decode_ID3D11DeviceContext_OMSetDepthStencilState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_SOSetTargets: + Decode_ID3D11DeviceContext_SOSetTargets(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawAuto: + Decode_ID3D11DeviceContext_DrawAuto(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawIndexedInstancedIndirect: + Decode_ID3D11DeviceContext_DrawIndexedInstancedIndirect(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DrawInstancedIndirect: + Decode_ID3D11DeviceContext_DrawInstancedIndirect(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_Dispatch: + Decode_ID3D11DeviceContext_Dispatch(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DispatchIndirect: + Decode_ID3D11DeviceContext_DispatchIndirect(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_RSSetState: + Decode_ID3D11DeviceContext_RSSetState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_RSSetViewports: + Decode_ID3D11DeviceContext_RSSetViewports(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_RSSetScissorRects: + Decode_ID3D11DeviceContext_RSSetScissorRects(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CopySubresourceRegion: + Decode_ID3D11DeviceContext_CopySubresourceRegion(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CopyResource: + Decode_ID3D11DeviceContext_CopyResource(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CopyStructureCount: + Decode_ID3D11DeviceContext_CopyStructureCount(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearRenderTargetView: + Decode_ID3D11DeviceContext_ClearRenderTargetView(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearUnorderedAccessViewUint: + Decode_ID3D11DeviceContext_ClearUnorderedAccessViewUint(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearUnorderedAccessViewFloat: + Decode_ID3D11DeviceContext_ClearUnorderedAccessViewFloat(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearDepthStencilView: + Decode_ID3D11DeviceContext_ClearDepthStencilView(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GenerateMips: + Decode_ID3D11DeviceContext_GenerateMips(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_SetResourceMinLOD: + Decode_ID3D11DeviceContext_SetResourceMinLOD(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GetResourceMinLOD: + Decode_ID3D11DeviceContext_GetResourceMinLOD(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_ResolveSubresource: + Decode_ID3D11DeviceContext_ResolveSubresource(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_ExecuteCommandList: + Decode_ID3D11DeviceContext_ExecuteCommandList(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSSetShaderResources: + Decode_ID3D11DeviceContext_HSSetShaderResources(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSSetShader: + Decode_ID3D11DeviceContext_HSSetShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSSetSamplers: + Decode_ID3D11DeviceContext_HSSetSamplers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSSetConstantBuffers: + Decode_ID3D11DeviceContext_HSSetConstantBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSSetShaderResources: + Decode_ID3D11DeviceContext_DSSetShaderResources(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSSetShader: + Decode_ID3D11DeviceContext_DSSetShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSSetSamplers: + Decode_ID3D11DeviceContext_DSSetSamplers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSSetConstantBuffers: + Decode_ID3D11DeviceContext_DSSetConstantBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetShaderResources: + Decode_ID3D11DeviceContext_CSSetShaderResources(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetUnorderedAccessViews: + Decode_ID3D11DeviceContext_CSSetUnorderedAccessViews(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetShader: + Decode_ID3D11DeviceContext_CSSetShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetSamplers: + Decode_ID3D11DeviceContext_CSSetSamplers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSSetConstantBuffers: + Decode_ID3D11DeviceContext_CSSetConstantBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSGetConstantBuffers: + Decode_ID3D11DeviceContext_VSGetConstantBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSGetShaderResources: + Decode_ID3D11DeviceContext_PSGetShaderResources(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSGetShader: + Decode_ID3D11DeviceContext_PSGetShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSGetSamplers: + Decode_ID3D11DeviceContext_PSGetSamplers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSGetShader: + Decode_ID3D11DeviceContext_VSGetShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_PSGetConstantBuffers: + Decode_ID3D11DeviceContext_PSGetConstantBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IAGetInputLayout: + Decode_ID3D11DeviceContext_IAGetInputLayout(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IAGetVertexBuffers: + Decode_ID3D11DeviceContext_IAGetVertexBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IAGetIndexBuffer: + Decode_ID3D11DeviceContext_IAGetIndexBuffer(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSGetConstantBuffers: + Decode_ID3D11DeviceContext_GSGetConstantBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSGetShader: + Decode_ID3D11DeviceContext_GSGetShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_IAGetPrimitiveTopology: + Decode_ID3D11DeviceContext_IAGetPrimitiveTopology(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSGetShaderResources: + Decode_ID3D11DeviceContext_VSGetShaderResources(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_VSGetSamplers: + Decode_ID3D11DeviceContext_VSGetSamplers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GetPredication: + Decode_ID3D11DeviceContext_GetPredication(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSGetShaderResources: + Decode_ID3D11DeviceContext_GSGetShaderResources(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GSGetSamplers: + Decode_ID3D11DeviceContext_GSGetSamplers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMGetRenderTargets: + Decode_ID3D11DeviceContext_OMGetRenderTargets(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews: + Decode_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMGetBlendState: + Decode_ID3D11DeviceContext_OMGetBlendState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_OMGetDepthStencilState: + Decode_ID3D11DeviceContext_OMGetDepthStencilState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_SOGetTargets: + Decode_ID3D11DeviceContext_SOGetTargets(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_RSGetState: + Decode_ID3D11DeviceContext_RSGetState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_RSGetViewports: + Decode_ID3D11DeviceContext_RSGetViewports(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_RSGetScissorRects: + Decode_ID3D11DeviceContext_RSGetScissorRects(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSGetShaderResources: + Decode_ID3D11DeviceContext_HSGetShaderResources(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSGetShader: + Decode_ID3D11DeviceContext_HSGetShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSGetSamplers: + Decode_ID3D11DeviceContext_HSGetSamplers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_HSGetConstantBuffers: + Decode_ID3D11DeviceContext_HSGetConstantBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSGetShaderResources: + Decode_ID3D11DeviceContext_DSGetShaderResources(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSGetShader: + Decode_ID3D11DeviceContext_DSGetShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSGetSamplers: + Decode_ID3D11DeviceContext_DSGetSamplers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_DSGetConstantBuffers: + Decode_ID3D11DeviceContext_DSGetConstantBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetShaderResources: + Decode_ID3D11DeviceContext_CSGetShaderResources(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetUnorderedAccessViews: + Decode_ID3D11DeviceContext_CSGetUnorderedAccessViews(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetShader: + Decode_ID3D11DeviceContext_CSGetShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetSamplers: + Decode_ID3D11DeviceContext_CSGetSamplers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_CSGetConstantBuffers: + Decode_ID3D11DeviceContext_CSGetConstantBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_ClearState: + Decode_ID3D11DeviceContext_ClearState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_Flush: + Decode_ID3D11DeviceContext_Flush(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GetType: + Decode_ID3D11DeviceContext_GetType(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_GetContextFlags: + Decode_ID3D11DeviceContext_GetContextFlags(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext_FinishCommandList: + Decode_ID3D11DeviceContext_FinishCommandList(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDecoder_GetCreationParameters: + Decode_ID3D11VideoDecoder_GetCreationParameters(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDecoder_GetDriverHandle: + Decode_ID3D11VideoDecoder_GetDriverHandle(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc: + Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat: + Decode_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps: + Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps: + Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate: + Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange: + Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessor_GetContentDesc: + Decode_ID3D11VideoProcessor_GetContentDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessor_GetRateConversionCaps: + Decode_ID3D11VideoProcessor_GetRateConversionCaps(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11AuthenticatedChannel_GetCertificateSize: + Decode_ID3D11AuthenticatedChannel_GetCertificateSize(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11AuthenticatedChannel_GetCertificate: + Decode_ID3D11AuthenticatedChannel_GetCertificate(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11AuthenticatedChannel_GetChannelHandle: + Decode_ID3D11AuthenticatedChannel_GetChannelHandle(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11CryptoSession_GetCryptoType: + Decode_ID3D11CryptoSession_GetCryptoType(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11CryptoSession_GetDecoderProfile: + Decode_ID3D11CryptoSession_GetDecoderProfile(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11CryptoSession_GetCertificateSize: + Decode_ID3D11CryptoSession_GetCertificateSize(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11CryptoSession_GetCertificate: + Decode_ID3D11CryptoSession_GetCertificate(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11CryptoSession_GetCryptoSessionHandle: + Decode_ID3D11CryptoSession_GetCryptoSessionHandle(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDecoderOutputView_GetDesc: + Decode_ID3D11VideoDecoderOutputView_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorInputView_GetDesc: + Decode_ID3D11VideoProcessorInputView_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorOutputView_GetDesc: + Decode_ID3D11VideoProcessorOutputView_GetDesc(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_GetDecoderBuffer: + Decode_ID3D11VideoContext_GetDecoderBuffer(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_ReleaseDecoderBuffer: + Decode_ID3D11VideoContext_ReleaseDecoderBuffer(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_DecoderBeginFrame: + Decode_ID3D11VideoContext_DecoderBeginFrame(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_DecoderEndFrame: + Decode_ID3D11VideoContext_DecoderEndFrame(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_SubmitDecoderBuffers: + Decode_ID3D11VideoContext_SubmitDecoderBuffers(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_DecoderExtension: + Decode_ID3D11VideoContext_DecoderExtension(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputTargetRect: + Decode_ID3D11VideoContext_VideoProcessorSetOutputTargetRect(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor: + Decode_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputColorSpace: + Decode_ID3D11VideoContext_VideoProcessorSetOutputColorSpace(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode: + Decode_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputConstriction: + Decode_ID3D11VideoContext_VideoProcessorSetOutputConstriction(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputStereoMode: + Decode_ID3D11VideoContext_VideoProcessorSetOutputStereoMode(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputExtension: + Decode_ID3D11VideoContext_VideoProcessorSetOutputExtension(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputTargetRect: + Decode_ID3D11VideoContext_VideoProcessorGetOutputTargetRect(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor: + Decode_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputColorSpace: + Decode_ID3D11VideoContext_VideoProcessorGetOutputColorSpace(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode: + Decode_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputConstriction: + Decode_ID3D11VideoContext_VideoProcessorGetOutputConstriction(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputStereoMode: + Decode_ID3D11VideoContext_VideoProcessorGetOutputStereoMode(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetOutputExtension: + Decode_ID3D11VideoContext_VideoProcessorGetOutputExtension(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat: + Decode_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamColorSpace: + Decode_ID3D11VideoContext_VideoProcessorSetStreamColorSpace(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamOutputRate: + Decode_ID3D11VideoContext_VideoProcessorSetStreamOutputRate(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamSourceRect: + Decode_ID3D11VideoContext_VideoProcessorSetStreamSourceRect(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamDestRect: + Decode_ID3D11VideoContext_VideoProcessorSetStreamDestRect(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamAlpha: + Decode_ID3D11VideoContext_VideoProcessorSetStreamAlpha(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamPalette: + Decode_ID3D11VideoContext_VideoProcessorSetStreamPalette(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio: + Decode_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamLumaKey: + Decode_ID3D11VideoContext_VideoProcessorSetStreamLumaKey(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat: + Decode_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode: + Decode_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamFilter: + Decode_ID3D11VideoContext_VideoProcessorSetStreamFilter(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamExtension: + Decode_ID3D11VideoContext_VideoProcessorSetStreamExtension(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat: + Decode_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamColorSpace: + Decode_ID3D11VideoContext_VideoProcessorGetStreamColorSpace(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamOutputRate: + Decode_ID3D11VideoContext_VideoProcessorGetStreamOutputRate(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamSourceRect: + Decode_ID3D11VideoContext_VideoProcessorGetStreamSourceRect(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamDestRect: + Decode_ID3D11VideoContext_VideoProcessorGetStreamDestRect(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamAlpha: + Decode_ID3D11VideoContext_VideoProcessorGetStreamAlpha(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamPalette: + Decode_ID3D11VideoContext_VideoProcessorGetStreamPalette(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio: + Decode_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamLumaKey: + Decode_ID3D11VideoContext_VideoProcessorGetStreamLumaKey(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat: + Decode_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode: + Decode_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamFilter: + Decode_ID3D11VideoContext_VideoProcessorGetStreamFilter(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamExtension: + Decode_ID3D11VideoContext_VideoProcessorGetStreamExtension(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorBlt: + Decode_ID3D11VideoContext_VideoProcessorBlt(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange: + Decode_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_EncryptionBlt: + Decode_ID3D11VideoContext_EncryptionBlt(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_DecryptionBlt: + Decode_ID3D11VideoContext_DecryptionBlt(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_StartSessionKeyRefresh: + Decode_ID3D11VideoContext_StartSessionKeyRefresh(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_FinishSessionKeyRefresh: + Decode_ID3D11VideoContext_FinishSessionKeyRefresh(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_GetEncryptionBltKey: + Decode_ID3D11VideoContext_GetEncryptionBltKey(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange: + Decode_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_QueryAuthenticatedChannel: + Decode_ID3D11VideoContext_QueryAuthenticatedChannel(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_ConfigureAuthenticatedChannel: + Decode_ID3D11VideoContext_ConfigureAuthenticatedChannel(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamRotation: + Decode_ID3D11VideoContext_VideoProcessorSetStreamRotation(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorGetStreamRotation: + Decode_ID3D11VideoContext_VideoProcessorGetStreamRotation(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoDecoder: + Decode_ID3D11VideoDevice_CreateVideoDecoder(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoProcessor: + Decode_ID3D11VideoDevice_CreateVideoProcessor(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateAuthenticatedChannel: + Decode_ID3D11VideoDevice_CreateAuthenticatedChannel(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateCryptoSession: + Decode_ID3D11VideoDevice_CreateCryptoSession(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoDecoderOutputView: + Decode_ID3D11VideoDevice_CreateVideoDecoderOutputView(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoProcessorInputView: + Decode_ID3D11VideoDevice_CreateVideoProcessorInputView(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoProcessorOutputView: + Decode_ID3D11VideoDevice_CreateVideoProcessorOutputView(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CreateVideoProcessorEnumerator: + Decode_ID3D11VideoDevice_CreateVideoProcessorEnumerator(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_GetVideoDecoderProfileCount: + Decode_ID3D11VideoDevice_GetVideoDecoderProfileCount(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_GetVideoDecoderProfile: + Decode_ID3D11VideoDevice_GetVideoDecoderProfile(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CheckVideoDecoderFormat: + Decode_ID3D11VideoDevice_CheckVideoDecoderFormat(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_GetVideoDecoderConfigCount: + Decode_ID3D11VideoDevice_GetVideoDecoderConfigCount(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_GetVideoDecoderConfig: + Decode_ID3D11VideoDevice_GetVideoDecoderConfig(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_GetContentProtectionCaps: + Decode_ID3D11VideoDevice_GetContentProtectionCaps(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_CheckCryptoKeyExchange: + Decode_ID3D11VideoDevice_CheckCryptoKeyExchange(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_SetPrivateData: + Decode_ID3D11VideoDevice_SetPrivateData(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice_SetPrivateDataInterface: + Decode_ID3D11VideoDevice_SetPrivateDataInterface(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateShaderResourceView: + Decode_ID3D11Device_CreateShaderResourceView(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateUnorderedAccessView: + Decode_ID3D11Device_CreateUnorderedAccessView(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateRenderTargetView: + Decode_ID3D11Device_CreateRenderTargetView(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateDepthStencilView: + Decode_ID3D11Device_CreateDepthStencilView(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateInputLayout: + Decode_ID3D11Device_CreateInputLayout(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateVertexShader: + Decode_ID3D11Device_CreateVertexShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateGeometryShader: + Decode_ID3D11Device_CreateGeometryShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateGeometryShaderWithStreamOutput: + Decode_ID3D11Device_CreateGeometryShaderWithStreamOutput(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreatePixelShader: + Decode_ID3D11Device_CreatePixelShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateHullShader: + Decode_ID3D11Device_CreateHullShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateDomainShader: + Decode_ID3D11Device_CreateDomainShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateComputeShader: + Decode_ID3D11Device_CreateComputeShader(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateClassLinkage: + Decode_ID3D11Device_CreateClassLinkage(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateBlendState: + Decode_ID3D11Device_CreateBlendState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateDepthStencilState: + Decode_ID3D11Device_CreateDepthStencilState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateRasterizerState: + Decode_ID3D11Device_CreateRasterizerState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateSamplerState: + Decode_ID3D11Device_CreateSamplerState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateQuery: + Decode_ID3D11Device_CreateQuery(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreatePredicate: + Decode_ID3D11Device_CreatePredicate(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateCounter: + Decode_ID3D11Device_CreateCounter(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CreateDeferredContext: + Decode_ID3D11Device_CreateDeferredContext(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_OpenSharedResource: + Decode_ID3D11Device_OpenSharedResource(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CheckFormatSupport: + Decode_ID3D11Device_CheckFormatSupport(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CheckMultisampleQualityLevels: + Decode_ID3D11Device_CheckMultisampleQualityLevels(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CheckCounterInfo: + Decode_ID3D11Device_CheckCounterInfo(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_CheckCounter: + Decode_ID3D11Device_CheckCounter(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_GetPrivateData: + Decode_ID3D11Device_GetPrivateData(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_SetPrivateData: + Decode_ID3D11Device_SetPrivateData(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_SetPrivateDataInterface: + Decode_ID3D11Device_SetPrivateDataInterface(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_GetFeatureLevel: + Decode_ID3D11Device_GetFeatureLevel(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_GetCreationFlags: + Decode_ID3D11Device_GetCreationFlags(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_GetDeviceRemovedReason: + Decode_ID3D11Device_GetDeviceRemovedReason(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_GetImmediateContext: + Decode_ID3D11Device_GetImmediateContext(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_SetExceptionMode: + Decode_ID3D11Device_SetExceptionMode(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device_GetExceptionMode: + Decode_ID3D11Device_GetExceptionMode(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11BlendState1_GetDesc1: + Decode_ID3D11BlendState1_GetDesc1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11RasterizerState1_GetDesc1: + Decode_ID3D11RasterizerState1_GetDesc1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_CopySubresourceRegion1: + Decode_ID3D11DeviceContext1_CopySubresourceRegion1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_DiscardResource: + Decode_ID3D11DeviceContext1_DiscardResource(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_DiscardView: + Decode_ID3D11DeviceContext1_DiscardView(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_VSSetConstantBuffers1: + Decode_ID3D11DeviceContext1_VSSetConstantBuffers1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_HSSetConstantBuffers1: + Decode_ID3D11DeviceContext1_HSSetConstantBuffers1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_DSSetConstantBuffers1: + Decode_ID3D11DeviceContext1_DSSetConstantBuffers1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_GSSetConstantBuffers1: + Decode_ID3D11DeviceContext1_GSSetConstantBuffers1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_PSSetConstantBuffers1: + Decode_ID3D11DeviceContext1_PSSetConstantBuffers1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_CSSetConstantBuffers1: + Decode_ID3D11DeviceContext1_CSSetConstantBuffers1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_VSGetConstantBuffers1: + Decode_ID3D11DeviceContext1_VSGetConstantBuffers1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_HSGetConstantBuffers1: + Decode_ID3D11DeviceContext1_HSGetConstantBuffers1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_DSGetConstantBuffers1: + Decode_ID3D11DeviceContext1_DSGetConstantBuffers1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_GSGetConstantBuffers1: + Decode_ID3D11DeviceContext1_GSGetConstantBuffers1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_PSGetConstantBuffers1: + Decode_ID3D11DeviceContext1_PSGetConstantBuffers1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_CSGetConstantBuffers1: + Decode_ID3D11DeviceContext1_CSGetConstantBuffers1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_SwapDeviceContextState: + Decode_ID3D11DeviceContext1_SwapDeviceContextState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_ClearView: + Decode_ID3D11DeviceContext1_ClearView(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext1_DiscardView1: + Decode_ID3D11DeviceContext1_DiscardView1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_SubmitDecoderBuffers1: + Decode_ID3D11VideoContext1_SubmitDecoderBuffers1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_GetDataForNewHardwareKey: + Decode_ID3D11VideoContext1_GetDataForNewHardwareKey(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_CheckCryptoSessionStatus: + Decode_ID3D11VideoContext1_CheckCryptoSessionStatus(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_DecoderEnableDownsampling: + Decode_ID3D11VideoContext1_DecoderEnableDownsampling(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_DecoderUpdateDownsampling: + Decode_ID3D11VideoContext1_DecoderUpdateDownsampling(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1: + Decode_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage: + Decode_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1: + Decode_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage: + Decode_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1: + Decode_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorSetStreamMirror: + Decode_ID3D11VideoContext1_VideoProcessorSetStreamMirror(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1: + Decode_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetStreamMirror: + Decode_ID3D11VideoContext1_VideoProcessorGetStreamMirror(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext1_VideoProcessorGetBehaviorHints: + Decode_ID3D11VideoContext1_VideoProcessorGetBehaviorHints(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize: + Decode_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice1_GetVideoDecoderCaps: + Decode_ID3D11VideoDevice1_GetVideoDecoderCaps(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice1_CheckVideoDecoderDownsampling: + Decode_ID3D11VideoDevice1_CheckVideoDecoderDownsampling(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters: + Decode_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion: + Decode_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device1_GetImmediateContext1: + Decode_ID3D11Device1_GetImmediateContext1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device1_CreateDeferredContext1: + Decode_ID3D11Device1_CreateDeferredContext1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device1_CreateBlendState1: + Decode_ID3D11Device1_CreateBlendState1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device1_CreateRasterizerState1: + Decode_ID3D11Device1_CreateRasterizerState1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device1_CreateDeviceContextState: + Decode_ID3D11Device1_CreateDeviceContextState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device1_OpenSharedResource1: + Decode_ID3D11Device1_OpenSharedResource1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device1_OpenSharedResourceByName: + Decode_ID3D11Device1_OpenSharedResourceByName(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3DUserDefinedAnnotation_BeginEvent: + Decode_ID3DUserDefinedAnnotation_BeginEvent(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3DUserDefinedAnnotation_EndEvent: + Decode_ID3DUserDefinedAnnotation_EndEvent(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3DUserDefinedAnnotation_SetMarker: + Decode_ID3DUserDefinedAnnotation_SetMarker(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3DUserDefinedAnnotation_GetStatus: + Decode_ID3DUserDefinedAnnotation_GetStatus(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_UpdateTileMappings: + Decode_ID3D11DeviceContext2_UpdateTileMappings(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_CopyTileMappings: + Decode_ID3D11DeviceContext2_CopyTileMappings(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_CopyTiles: + Decode_ID3D11DeviceContext2_CopyTiles(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_UpdateTiles: + Decode_ID3D11DeviceContext2_UpdateTiles(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_ResizeTilePool: + Decode_ID3D11DeviceContext2_ResizeTilePool(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_TiledResourceBarrier: + Decode_ID3D11DeviceContext2_TiledResourceBarrier(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_IsAnnotationEnabled: + Decode_ID3D11DeviceContext2_IsAnnotationEnabled(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_SetMarkerInt: + Decode_ID3D11DeviceContext2_SetMarkerInt(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_BeginEventInt: + Decode_ID3D11DeviceContext2_BeginEventInt(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext2_EndEvent: + Decode_ID3D11DeviceContext2_EndEvent(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device2_GetImmediateContext2: + Decode_ID3D11Device2_GetImmediateContext2(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device2_CreateDeferredContext2: + Decode_ID3D11Device2_CreateDeferredContext2(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device2_GetResourceTiling: + Decode_ID3D11Device2_GetResourceTiling(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device2_CheckMultisampleQualityLevels1: + Decode_ID3D11Device2_CheckMultisampleQualityLevels1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Texture2D1_GetDesc1: + Decode_ID3D11Texture2D1_GetDesc1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Texture3D1_GetDesc1: + Decode_ID3D11Texture3D1_GetDesc1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11RasterizerState2_GetDesc2: + Decode_ID3D11RasterizerState2_GetDesc2(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11ShaderResourceView1_GetDesc1: + Decode_ID3D11ShaderResourceView1_GetDesc1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11RenderTargetView1_GetDesc1: + Decode_ID3D11RenderTargetView1_GetDesc1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11UnorderedAccessView1_GetDesc1: + Decode_ID3D11UnorderedAccessView1_GetDesc1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Query1_GetDesc1: + Decode_ID3D11Query1_GetDesc1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext3_Flush1: + Decode_ID3D11DeviceContext3_Flush1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext3_SetHardwareProtectionState: + Decode_ID3D11DeviceContext3_SetHardwareProtectionState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext3_GetHardwareProtectionState: + Decode_ID3D11DeviceContext3_GetHardwareProtectionState(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Fence_CreateSharedHandle: + Decode_ID3D11Fence_CreateSharedHandle(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Fence_GetCompletedValue: + Decode_ID3D11Fence_GetCompletedValue(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Fence_SetEventOnCompletion: + Decode_ID3D11Fence_SetEventOnCompletion(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext4_Signal: + Decode_ID3D11DeviceContext4_Signal(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11DeviceContext4_Wait: + Decode_ID3D11DeviceContext4_Wait(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateRasterizerState2: + Decode_ID3D11Device3_CreateRasterizerState2(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateShaderResourceView1: + Decode_ID3D11Device3_CreateShaderResourceView1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateUnorderedAccessView1: + Decode_ID3D11Device3_CreateUnorderedAccessView1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateRenderTargetView1: + Decode_ID3D11Device3_CreateRenderTargetView1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateQuery1: + Decode_ID3D11Device3_CreateQuery1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device3_GetImmediateContext3: + Decode_ID3D11Device3_GetImmediateContext3(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device3_CreateDeferredContext3: + Decode_ID3D11Device3_CreateDeferredContext3(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device3_ReadFromSubresource: + Decode_ID3D11Device3_ReadFromSubresource(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device4_RegisterDeviceRemovedEvent: + Decode_ID3D11Device4_RegisterDeviceRemovedEvent(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device4_UnregisterDeviceRemoved: + Decode_ID3D11Device4_UnregisterDeviceRemoved(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device5_OpenSharedFence: + Decode_ID3D11Device5_OpenSharedFence(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Device5_CreateFence: + Decode_ID3D11Device5_CreateFence(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Multithread_Enter: + Decode_ID3D11Multithread_Enter(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Multithread_Leave: + Decode_ID3D11Multithread_Leave(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Multithread_SetMultithreadProtected: + Decode_ID3D11Multithread_SetMultithreadProtected(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11Multithread_GetMultithreadProtected: + Decode_ID3D11Multithread_GetMultithreadProtected(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData: + Decode_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData: + Decode_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData: + Decode_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData: + Decode_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice2_CheckFeatureSupport: + Decode_ID3D11VideoDevice2_CheckFeatureSupport(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT: + Decode_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext3_DecoderBeginFrame1: + Decode_ID3D11VideoContext3_DecoderBeginFrame1(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11VideoContext3_SubmitDecoderBuffers2: + Decode_ID3D11VideoContext3_SubmitDecoderBuffers2(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11On12Device_CreateWrappedResource: + Decode_ID3D11On12Device_CreateWrappedResource(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11On12Device_ReleaseWrappedResources: + Decode_ID3D11On12Device_ReleaseWrappedResources(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11On12Device_AcquireWrappedResources: + Decode_ID3D11On12Device_AcquireWrappedResources(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11On12Device1_GetD3D12Device: + Decode_ID3D11On12Device1_GetD3D12Device(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11On12Device2_UnwrapUnderlyingResource: + Decode_ID3D11On12Device2_UnwrapUnderlyingResource(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_ID3D11On12Device2_ReturnUnderlyingResource: + Decode_ID3D11On12Device2_ReturnUnderlyingResource(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_IUnknown_QueryInterface: + Decode_IUnknown_QueryInterface(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_IUnknown_AddRef: + Decode_IUnknown_AddRef(object_id, call_info, parameter_buffer, buffer_size); + break; + case format::ApiCallId::ApiCall_IUnknown_Release: + Decode_IUnknown_Release(object_id, call_info, parameter_buffer, buffer_size); + break; + default: + Dx12DecoderBase::DecodeMethodCall(call_id, object_id, call_info, parameter_buffer, buffer_size); + break; + } +} + + +size_t Dx12Decoder::Decode_CreateDXGIFactory(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppFactory; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppFactory.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_CreateDXGIFactory(call_info, return_value, riid, &ppFactory); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_CreateDXGIFactory1(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppFactory; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppFactory.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_CreateDXGIFactory1(call_info, return_value, riid, &ppFactory); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_CreateDXGIFactory2(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Flags; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppFactory; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppFactory.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_CreateDXGIFactory2(call_info, return_value, Flags, riid, &ppFactory); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_DXGIGetDebugInterface1(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Flags; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder pDebug; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += pDebug.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_DXGIGetDebugInterface1(call_info, return_value, Flags, riid, &pDebug); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_DXGIDeclareAdapterRemovalSupport(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_DXGIDeclareAdapterRemovalSupport(call_info, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_D3D12SerializeRootSignature(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pRootSignature; + D3D_ROOT_SIGNATURE_VERSION Version; + HandlePointerDecoder ppBlob; + HandlePointerDecoder ppErrorBlob; + HRESULT return_value; + + bytes_read += pRootSignature.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Version); + bytes_read += ppBlob.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppErrorBlob.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_D3D12SerializeRootSignature(call_info, return_value, &pRootSignature, Version, &ppBlob, &ppErrorBlob); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_D3D12CreateRootSignatureDeserializer(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pSrcData; + SIZE_T SrcDataSizeInBytes; + Decoded_GUID pRootSignatureDeserializerInterface; + GUID value_pRootSignatureDeserializerInterface; + pRootSignatureDeserializerInterface.decoded_value = &value_pRootSignatureDeserializerInterface; + HandlePointerDecoder ppRootSignatureDeserializer; + HRESULT return_value; + + bytes_read += pSrcData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcDataSizeInBytes); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRootSignatureDeserializerInterface); + bytes_read += ppRootSignatureDeserializer.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_D3D12CreateRootSignatureDeserializer(call_info, return_value, &pSrcData, SrcDataSizeInBytes, pRootSignatureDeserializerInterface, &ppRootSignatureDeserializer); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_D3D12SerializeVersionedRootSignature(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pRootSignature; + HandlePointerDecoder ppBlob; + HandlePointerDecoder ppErrorBlob; + HRESULT return_value; + + bytes_read += pRootSignature.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppBlob.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppErrorBlob.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_D3D12SerializeVersionedRootSignature(call_info, return_value, &pRootSignature, &ppBlob, &ppErrorBlob); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_D3D12CreateVersionedRootSignatureDeserializer(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pSrcData; + SIZE_T SrcDataSizeInBytes; + Decoded_GUID pRootSignatureDeserializerInterface; + GUID value_pRootSignatureDeserializerInterface; + pRootSignatureDeserializerInterface.decoded_value = &value_pRootSignatureDeserializerInterface; + HandlePointerDecoder ppRootSignatureDeserializer; + HRESULT return_value; + + bytes_read += pSrcData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcDataSizeInBytes); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRootSignatureDeserializerInterface); + bytes_read += ppRootSignatureDeserializer.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_D3D12CreateVersionedRootSignatureDeserializer(call_info, return_value, &pSrcData, SrcDataSizeInBytes, pRootSignatureDeserializerInterface, &ppRootSignatureDeserializer); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_D3D12CreateDevice(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pAdapter; + D3D_FEATURE_LEVEL MinimumFeatureLevel; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppDevice; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pAdapter); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MinimumFeatureLevel); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_D3D12CreateDevice(call_info, return_value, pAdapter, MinimumFeatureLevel, riid, &ppDevice); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_D3D12GetDebugInterface(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvDebug; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvDebug.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_D3D12GetDebugInterface(call_info, return_value, riid, &ppvDebug); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_D3D12EnableExperimentalFeatures(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumFeatures; + StructPointerDecoder pIIDs; + PointerDecoder pConfigurationStructs; + PointerDecoder pConfigurationStructSizes; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumFeatures); + bytes_read += pIIDs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pConfigurationStructs.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pConfigurationStructSizes.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_D3D12EnableExperimentalFeatures(call_info, return_value, NumFeatures, &pIIDs, &pConfigurationStructs, &pConfigurationStructSizes); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_D3D12GetInterface(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID rclsid; + GUID value_rclsid; + rclsid.decoded_value = &value_rclsid; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvDebug; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &rclsid); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvDebug.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_D3D12GetInterface(call_info, return_value, rclsid, riid, &ppvDebug); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_D3D11CreateDevice(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pAdapter; + D3D_DRIVER_TYPE DriverType; + uint64_t Software; + UINT Flags; + PointerDecoder pFeatureLevels; + UINT FeatureLevels; + UINT SDKVersion; + HandlePointerDecoder ppDevice; + PointerDecoder pFeatureLevel; + HandlePointerDecoder ppImmediateContext; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pAdapter); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DriverType); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Software); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += pFeatureLevels.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FeatureLevels); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SDKVersion); + bytes_read += ppDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFeatureLevel.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppImmediateContext.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_D3D11CreateDevice(call_info, return_value, pAdapter, DriverType, Software, Flags, &pFeatureLevels, FeatureLevels, SDKVersion, &ppDevice, &pFeatureLevel, &ppImmediateContext); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_D3D11CreateDeviceAndSwapChain(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pAdapter; + D3D_DRIVER_TYPE DriverType; + uint64_t Software; + UINT Flags; + PointerDecoder pFeatureLevels; + UINT FeatureLevels; + UINT SDKVersion; + StructPointerDecoder pSwapChainDesc; + HandlePointerDecoder ppSwapChain; + HandlePointerDecoder ppDevice; + PointerDecoder pFeatureLevel; + HandlePointerDecoder ppImmediateContext; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pAdapter); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DriverType); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Software); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += pFeatureLevels.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FeatureLevels); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SDKVersion); + bytes_read += pSwapChainDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppSwapChain.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFeatureLevel.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppImmediateContext.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_D3D11CreateDeviceAndSwapChain(call_info, return_value, pAdapter, DriverType, Software, Flags, &pFeatureLevels, FeatureLevels, SDKVersion, &pSwapChainDesc, &ppSwapChain, &ppDevice, &pFeatureLevel, &ppImmediateContext); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_D3D11On12CreateDevice(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDevice; + UINT Flags; + PointerDecoder pFeatureLevels; + UINT FeatureLevels; + HandlePointerDecoder ppCommandQueues; + UINT NumQueues; + UINT NodeMask; + HandlePointerDecoder ppDevice; + HandlePointerDecoder ppImmediateContext; + PointerDecoder pChosenFeatureLevel; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += pFeatureLevels.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FeatureLevels); + bytes_read += ppCommandQueues.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumQueues); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NodeMask); + bytes_read += ppDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppImmediateContext.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pChosenFeatureLevel.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_D3D11On12CreateDevice(call_info, return_value, pDevice, Flags, &pFeatureLevels, FeatureLevels, &ppCommandQueues, NumQueues, NodeMask, &ppDevice, &ppImmediateContext, &pChosenFeatureLevel); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIObject_SetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID Name; + GUID value_Name; + Name.decoded_value = &value_Name; + UINT DataSize; + PointerDecoder pData; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Name); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIObject_SetPrivateData(call_info, object_id, return_value, Name, DataSize, &pData); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIObject_SetPrivateDataInterface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID Name; + GUID value_Name; + Name.decoded_value = &value_Name; + format::HandleId pUnknown; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Name); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pUnknown); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIObject_SetPrivateDataInterface(call_info, object_id, return_value, Name, pUnknown); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIObject_GetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID Name; + GUID value_Name; + Name.decoded_value = &value_Name; + PointerDecoder pDataSize; + PointerDecoder pData; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Name); + bytes_read += pDataSize.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIObject_GetPrivateData(call_info, object_id, return_value, Name, &pDataSize, &pData); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIObject_GetParent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppParent; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppParent.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIObject_GetParent(call_info, object_id, return_value, riid, &ppParent); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDeviceSubObject_GetDevice(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppDevice; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDeviceSubObject_GetDevice(call_info, object_id, return_value, riid, &ppDevice); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIResource_GetSharedHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pSharedHandle; + HRESULT return_value; + + bytes_read += pSharedHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIResource_GetSharedHandle(call_info, object_id, return_value, &pSharedHandle); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIResource_GetUsage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pUsage; + HRESULT return_value; + + bytes_read += pUsage.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIResource_GetUsage(call_info, object_id, return_value, &pUsage); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIResource_SetEvictionPriority(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT EvictionPriority; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &EvictionPriority); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIResource_SetEvictionPriority(call_info, object_id, return_value, EvictionPriority); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIResource_GetEvictionPriority(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pEvictionPriority; + HRESULT return_value; + + bytes_read += pEvictionPriority.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIResource_GetEvictionPriority(call_info, object_id, return_value, &pEvictionPriority); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIKeyedMutex_AcquireSync(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT64 Key; + DWORD dwMilliseconds; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Key); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwMilliseconds); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIKeyedMutex_AcquireSync(call_info, object_id, return_value, Key, dwMilliseconds); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIKeyedMutex_ReleaseSync(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT64 Key; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Key); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIKeyedMutex_ReleaseSync(call_info, object_id, return_value, Key); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISurface_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISurface_GetDesc(call_info, object_id, return_value, &pDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISurface_Map(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pLockedRect; + UINT MapFlags; + HRESULT return_value; + + bytes_read += pLockedRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MapFlags); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISurface_Map(call_info, object_id, return_value, &pLockedRect, MapFlags); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISurface_Unmap(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISurface_Unmap(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISurface1_GetDC(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + BOOL Discard; + PointerDecoder phdc; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Discard); + bytes_read += phdc.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISurface1_GetDC(call_info, object_id, return_value, Discard, &phdc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISurface1_ReleaseDC(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDirtyRect; + HRESULT return_value; + + bytes_read += pDirtyRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISurface1_ReleaseDC(call_info, object_id, return_value, &pDirtyRect); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIAdapter_EnumOutputs(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Output; + HandlePointerDecoder ppOutput; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Output); + bytes_read += ppOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIAdapter_EnumOutputs(call_info, object_id, return_value, Output, &ppOutput); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIAdapter_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIAdapter_GetDesc(call_info, object_id, return_value, &pDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIAdapter_CheckInterfaceSupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID InterfaceName; + GUID value_InterfaceName; + InterfaceName.decoded_value = &value_InterfaceName; + StructPointerDecoder pUMDVersion; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InterfaceName); + bytes_read += pUMDVersion.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIAdapter_CheckInterfaceSupport(call_info, object_id, return_value, InterfaceName, &pUMDVersion); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput_GetDesc(call_info, object_id, return_value, &pDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput_GetDisplayModeList(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DXGI_FORMAT EnumFormat; + UINT Flags; + PointerDecoder pNumModes; + StructPointerDecoder pDesc; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &EnumFormat); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += pNumModes.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput_GetDisplayModeList(call_info, object_id, return_value, EnumFormat, Flags, &pNumModes, &pDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput_FindClosestMatchingMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pModeToMatch; + StructPointerDecoder pClosestMatch; + format::HandleId pConcernedDevice; + HRESULT return_value; + + bytes_read += pModeToMatch.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pClosestMatch.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pConcernedDevice); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput_FindClosestMatchingMode(call_info, object_id, return_value, &pModeToMatch, &pClosestMatch, pConcernedDevice); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput_WaitForVBlank(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput_WaitForVBlank(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput_TakeOwnership(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDevice; + BOOL Exclusive; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Exclusive); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput_TakeOwnership(call_info, object_id, return_value, pDevice, Exclusive); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput_ReleaseOwnership(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput_ReleaseOwnership(call_info, object_id); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput_GetGammaControlCapabilities(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pGammaCaps; + HRESULT return_value; + + bytes_read += pGammaCaps.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput_GetGammaControlCapabilities(call_info, object_id, return_value, &pGammaCaps); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput_SetGammaControl(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pArray; + HRESULT return_value; + + bytes_read += pArray.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput_SetGammaControl(call_info, object_id, return_value, &pArray); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput_GetGammaControl(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pArray; + HRESULT return_value; + + bytes_read += pArray.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput_GetGammaControl(call_info, object_id, return_value, &pArray); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput_SetDisplaySurface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pScanoutSurface; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pScanoutSurface); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput_SetDisplaySurface(call_info, object_id, return_value, pScanoutSurface); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput_GetDisplaySurfaceData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDestination; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDestination); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput_GetDisplaySurfaceData(call_info, object_id, return_value, pDestination); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput_GetFrameStatistics(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pStats; + HRESULT return_value; + + bytes_read += pStats.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput_GetFrameStatistics(call_info, object_id, return_value, &pStats); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain_Present(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT SyncInterval; + UINT Flags; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SyncInterval); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain_Present(call_info, object_id, return_value, SyncInterval, Flags); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain_GetBuffer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Buffer; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppSurface; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Buffer); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppSurface.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain_GetBuffer(call_info, object_id, return_value, Buffer, riid, &ppSurface); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain_SetFullscreenState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + BOOL Fullscreen; + format::HandleId pTarget; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Fullscreen); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTarget); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain_SetFullscreenState(call_info, object_id, return_value, Fullscreen, pTarget); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain_GetFullscreenState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pFullscreen; + HandlePointerDecoder ppTarget; + HRESULT return_value; + + bytes_read += pFullscreen.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppTarget.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain_GetFullscreenState(call_info, object_id, return_value, &pFullscreen, &ppTarget); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain_GetDesc(call_info, object_id, return_value, &pDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain_ResizeBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT BufferCount; + UINT Width; + UINT Height; + DXGI_FORMAT NewFormat; + UINT SwapChainFlags; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferCount); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Width); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Height); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NewFormat); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SwapChainFlags); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain_ResizeBuffers(call_info, object_id, return_value, BufferCount, Width, Height, NewFormat, SwapChainFlags); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain_ResizeTarget(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pNewTargetParameters; + HRESULT return_value; + + bytes_read += pNewTargetParameters.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain_ResizeTarget(call_info, object_id, return_value, &pNewTargetParameters); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain_GetContainingOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HandlePointerDecoder ppOutput; + HRESULT return_value; + + bytes_read += ppOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain_GetContainingOutput(call_info, object_id, return_value, &ppOutput); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain_GetFrameStatistics(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pStats; + HRESULT return_value; + + bytes_read += pStats.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain_GetFrameStatistics(call_info, object_id, return_value, &pStats); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain_GetLastPresentCount(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pLastPresentCount; + HRESULT return_value; + + bytes_read += pLastPresentCount.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain_GetLastPresentCount(call_info, object_id, return_value, &pLastPresentCount); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory_EnumAdapters(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Adapter; + HandlePointerDecoder ppAdapter; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Adapter); + bytes_read += ppAdapter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory_EnumAdapters(call_info, object_id, return_value, Adapter, &ppAdapter); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory_MakeWindowAssociation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t WindowHandle; + UINT Flags; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &WindowHandle); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory_MakeWindowAssociation(call_info, object_id, return_value, WindowHandle, Flags); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory_GetWindowAssociation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pWindowHandle; + HRESULT return_value; + + bytes_read += pWindowHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory_GetWindowAssociation(call_info, object_id, return_value, &pWindowHandle); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory_CreateSwapChain(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDevice; + StructPointerDecoder pDesc; + HandlePointerDecoder ppSwapChain; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppSwapChain.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory_CreateSwapChain(call_info, object_id, return_value, pDevice, &pDesc, &ppSwapChain); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory_CreateSoftwareAdapter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t Module; + HandlePointerDecoder ppAdapter; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Module); + bytes_read += ppAdapter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory_CreateSoftwareAdapter(call_info, object_id, return_value, Module, &ppAdapter); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDevice_GetAdapter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HandlePointerDecoder pAdapter; + HRESULT return_value; + + bytes_read += pAdapter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDevice_GetAdapter(call_info, object_id, return_value, &pAdapter); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDevice_CreateSurface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + UINT NumSurfaces; + DXGI_USAGE Usage; + StructPointerDecoder pSharedResource; + HandlePointerDecoder ppSurface; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSurfaces); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Usage); + bytes_read += pSharedResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppSurface.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDevice_CreateSurface(call_info, object_id, return_value, &pDesc, NumSurfaces, Usage, &pSharedResource, &ppSurface); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDevice_QueryResourceResidency(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HandlePointerDecoder ppResources; + PointerDecoder pResidencyStatus; + UINT NumResources; + HRESULT return_value; + + bytes_read += ppResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pResidencyStatus.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumResources); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDevice_QueryResourceResidency(call_info, object_id, return_value, &ppResources, &pResidencyStatus, NumResources); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDevice_SetGPUThreadPriority(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + INT Priority; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Priority); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDevice_SetGPUThreadPriority(call_info, object_id, return_value, Priority); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDevice_GetGPUThreadPriority(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pPriority; + HRESULT return_value; + + bytes_read += pPriority.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDevice_GetGPUThreadPriority(call_info, object_id, return_value, &pPriority); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory1_EnumAdapters1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Adapter; + HandlePointerDecoder ppAdapter; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Adapter); + bytes_read += ppAdapter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory1_EnumAdapters1(call_info, object_id, return_value, Adapter, &ppAdapter); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory1_IsCurrent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + BOOL return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory1_IsCurrent(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIAdapter1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIAdapter1_GetDesc1(call_info, object_id, return_value, &pDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDevice1_SetMaximumFrameLatency(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT MaxLatency; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MaxLatency); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDevice1_SetMaximumFrameLatency(call_info, object_id, return_value, MaxLatency); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDevice1_GetMaximumFrameLatency(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pMaxLatency; + HRESULT return_value; + + bytes_read += pMaxLatency.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDevice1_GetMaximumFrameLatency(call_info, object_id, return_value, &pMaxLatency); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDisplayControl_IsStereoEnabled(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + BOOL return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDisplayControl_IsStereoEnabled(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDisplayControl_SetStereoEnabled(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + BOOL enabled; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &enabled); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDisplayControl_SetStereoEnabled(call_info, object_id, enabled); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutputDuplication_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutputDuplication_GetDesc(call_info, object_id, &pDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutputDuplication_AcquireNextFrame(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT TimeoutInMilliseconds; + StructPointerDecoder pFrameInfo; + HandlePointerDecoder ppDesktopResource; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &TimeoutInMilliseconds); + bytes_read += pFrameInfo.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppDesktopResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutputDuplication_AcquireNextFrame(call_info, object_id, return_value, TimeoutInMilliseconds, &pFrameInfo, &ppDesktopResource); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutputDuplication_GetFrameDirtyRects(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT DirtyRectsBufferSize; + StructPointerDecoder pDirtyRectsBuffer; + PointerDecoder pDirtyRectsBufferSizeRequired; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DirtyRectsBufferSize); + bytes_read += pDirtyRectsBuffer.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDirtyRectsBufferSizeRequired.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutputDuplication_GetFrameDirtyRects(call_info, object_id, return_value, DirtyRectsBufferSize, &pDirtyRectsBuffer, &pDirtyRectsBufferSizeRequired); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutputDuplication_GetFrameMoveRects(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT MoveRectsBufferSize; + StructPointerDecoder pMoveRectBuffer; + PointerDecoder pMoveRectsBufferSizeRequired; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MoveRectsBufferSize); + bytes_read += pMoveRectBuffer.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pMoveRectsBufferSizeRequired.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutputDuplication_GetFrameMoveRects(call_info, object_id, return_value, MoveRectsBufferSize, &pMoveRectBuffer, &pMoveRectsBufferSizeRequired); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutputDuplication_GetFramePointerShape(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT PointerShapeBufferSize; + PointerDecoder pPointerShapeBuffer; + PointerDecoder pPointerShapeBufferSizeRequired; + StructPointerDecoder pPointerShapeInfo; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &PointerShapeBufferSize); + bytes_read += pPointerShapeBuffer.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pPointerShapeBufferSizeRequired.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pPointerShapeInfo.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutputDuplication_GetFramePointerShape(call_info, object_id, return_value, PointerShapeBufferSize, &pPointerShapeBuffer, &pPointerShapeBufferSizeRequired, &pPointerShapeInfo); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutputDuplication_MapDesktopSurface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pLockedRect; + HRESULT return_value; + + bytes_read += pLockedRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutputDuplication_MapDesktopSurface(call_info, object_id, return_value, &pLockedRect); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutputDuplication_UnMapDesktopSurface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutputDuplication_UnMapDesktopSurface(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutputDuplication_ReleaseFrame(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutputDuplication_ReleaseFrame(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISurface2_GetResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppParentResource; + PointerDecoder pSubresourceIndex; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppParentResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pSubresourceIndex.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISurface2_GetResource(call_info, object_id, return_value, riid, &ppParentResource, &pSubresourceIndex); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIResource1_CreateSubresourceSurface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT index; + HandlePointerDecoder ppSurface; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &index); + bytes_read += ppSurface.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIResource1_CreateSubresourceSurface(call_info, object_id, return_value, index, &ppSurface); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIResource1_CreateSharedHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pAttributes; + DWORD dwAccess; + WStringDecoder lpName; + PointerDecoder pHandle; + HRESULT return_value; + + bytes_read += pAttributes.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwAccess); + bytes_read += lpName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIResource1_CreateSharedHandle(call_info, object_id, return_value, &pAttributes, dwAccess, &lpName, &pHandle); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDevice2_OfferResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumResources; + HandlePointerDecoder ppResources; + DXGI_OFFER_RESOURCE_PRIORITY Priority; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumResources); + bytes_read += ppResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Priority); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDevice2_OfferResources(call_info, object_id, return_value, NumResources, &ppResources, Priority); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDevice2_ReclaimResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumResources; + HandlePointerDecoder ppResources; + PointerDecoder pDiscarded; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumResources); + bytes_read += ppResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDiscarded.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDevice2_ReclaimResources(call_info, object_id, return_value, NumResources, &ppResources, &pDiscarded); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDevice2_EnqueueSetEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t hEvent; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDevice2_EnqueueSetEvent(call_info, object_id, return_value, hEvent); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain1_GetDesc1(call_info, object_id, return_value, &pDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain1_GetFullscreenDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain1_GetFullscreenDesc(call_info, object_id, return_value, &pDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain1_GetHwnd(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pHwnd; + HRESULT return_value; + + bytes_read += pHwnd.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain1_GetHwnd(call_info, object_id, return_value, &pHwnd); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain1_GetCoreWindow(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID refiid; + GUID value_refiid; + refiid.decoded_value = &value_refiid; + HandlePointerDecoder ppUnk; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &refiid); + bytes_read += ppUnk.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain1_GetCoreWindow(call_info, object_id, return_value, refiid, &ppUnk); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain1_Present1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT SyncInterval; + UINT PresentFlags; + StructPointerDecoder pPresentParameters; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SyncInterval); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &PresentFlags); + bytes_read += pPresentParameters.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain1_Present1(call_info, object_id, return_value, SyncInterval, PresentFlags, &pPresentParameters); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain1_IsTemporaryMonoSupported(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + BOOL return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain1_IsTemporaryMonoSupported(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain1_GetRestrictToOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HandlePointerDecoder ppRestrictToOutput; + HRESULT return_value; + + bytes_read += ppRestrictToOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain1_GetRestrictToOutput(call_info, object_id, return_value, &ppRestrictToOutput); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain1_SetBackgroundColor(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pColor; + HRESULT return_value; + + bytes_read += pColor.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain1_SetBackgroundColor(call_info, object_id, return_value, &pColor); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain1_GetBackgroundColor(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pColor; + HRESULT return_value; + + bytes_read += pColor.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain1_GetBackgroundColor(call_info, object_id, return_value, &pColor); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain1_SetRotation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DXGI_MODE_ROTATION Rotation; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Rotation); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain1_SetRotation(call_info, object_id, return_value, Rotation); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain1_GetRotation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pRotation; + HRESULT return_value; + + bytes_read += pRotation.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain1_GetRotation(call_info, object_id, return_value, &pRotation); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory2_IsWindowedStereoEnabled(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + BOOL return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory2_IsWindowedStereoEnabled(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory2_CreateSwapChainForHwnd(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDevice; + uint64_t hWnd; + StructPointerDecoder pDesc; + StructPointerDecoder pFullscreenDesc; + format::HandleId pRestrictToOutput; + HandlePointerDecoder ppSwapChain; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hWnd); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFullscreenDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRestrictToOutput); + bytes_read += ppSwapChain.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory2_CreateSwapChainForHwnd(call_info, object_id, return_value, pDevice, hWnd, &pDesc, &pFullscreenDesc, pRestrictToOutput, &ppSwapChain); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory2_CreateSwapChainForCoreWindow(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDevice; + format::HandleId pWindow; + StructPointerDecoder pDesc; + format::HandleId pRestrictToOutput; + HandlePointerDecoder ppSwapChain; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pWindow); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRestrictToOutput); + bytes_read += ppSwapChain.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory2_CreateSwapChainForCoreWindow(call_info, object_id, return_value, pDevice, pWindow, &pDesc, pRestrictToOutput, &ppSwapChain); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory2_GetSharedResourceAdapterLuid(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t hResource; + StructPointerDecoder pLuid; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hResource); + bytes_read += pLuid.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory2_GetSharedResourceAdapterLuid(call_info, object_id, return_value, hResource, &pLuid); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory2_RegisterStereoStatusWindow(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t WindowHandle; + UINT wMsg; + PointerDecoder pdwCookie; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &WindowHandle); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &wMsg); + bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory2_RegisterStereoStatusWindow(call_info, object_id, return_value, WindowHandle, wMsg, &pdwCookie); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory2_RegisterStereoStatusEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t hEvent; + PointerDecoder pdwCookie; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); + bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory2_RegisterStereoStatusEvent(call_info, object_id, return_value, hEvent, &pdwCookie); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory2_UnregisterStereoStatus(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DWORD dwCookie; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwCookie); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory2_UnregisterStereoStatus(call_info, object_id, dwCookie); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory2_RegisterOcclusionStatusWindow(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t WindowHandle; + UINT wMsg; + PointerDecoder pdwCookie; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &WindowHandle); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &wMsg); + bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory2_RegisterOcclusionStatusWindow(call_info, object_id, return_value, WindowHandle, wMsg, &pdwCookie); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory2_RegisterOcclusionStatusEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t hEvent; + PointerDecoder pdwCookie; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); + bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory2_RegisterOcclusionStatusEvent(call_info, object_id, return_value, hEvent, &pdwCookie); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory2_UnregisterOcclusionStatus(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DWORD dwCookie; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwCookie); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory2_UnregisterOcclusionStatus(call_info, object_id, dwCookie); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory2_CreateSwapChainForComposition(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDevice; + StructPointerDecoder pDesc; + format::HandleId pRestrictToOutput; + HandlePointerDecoder ppSwapChain; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRestrictToOutput); + bytes_read += ppSwapChain.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory2_CreateSwapChainForComposition(call_info, object_id, return_value, pDevice, &pDesc, pRestrictToOutput, &ppSwapChain); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIAdapter2_GetDesc2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIAdapter2_GetDesc2(call_info, object_id, return_value, &pDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput1_GetDisplayModeList1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DXGI_FORMAT EnumFormat; + UINT Flags; + PointerDecoder pNumModes; + StructPointerDecoder pDesc; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &EnumFormat); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += pNumModes.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput1_GetDisplayModeList1(call_info, object_id, return_value, EnumFormat, Flags, &pNumModes, &pDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput1_FindClosestMatchingMode1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pModeToMatch; + StructPointerDecoder pClosestMatch; + format::HandleId pConcernedDevice; + HRESULT return_value; + + bytes_read += pModeToMatch.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pClosestMatch.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pConcernedDevice); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput1_FindClosestMatchingMode1(call_info, object_id, return_value, &pModeToMatch, &pClosestMatch, pConcernedDevice); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput1_GetDisplaySurfaceData1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDestination; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDestination); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput1_GetDisplaySurfaceData1(call_info, object_id, return_value, pDestination); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput1_DuplicateOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDevice; + HandlePointerDecoder ppOutputDuplication; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); + bytes_read += ppOutputDuplication.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput1_DuplicateOutput(call_info, object_id, return_value, pDevice, &ppOutputDuplication); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDevice3_Trim(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDevice3_Trim(call_info, object_id); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain2_SetSourceSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Width; + UINT Height; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Width); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Height); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain2_SetSourceSize(call_info, object_id, return_value, Width, Height); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain2_GetSourceSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pWidth; + PointerDecoder pHeight; + HRESULT return_value; + + bytes_read += pWidth.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pHeight.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain2_GetSourceSize(call_info, object_id, return_value, &pWidth, &pHeight); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain2_SetMaximumFrameLatency(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT MaxLatency; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MaxLatency); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain2_SetMaximumFrameLatency(call_info, object_id, return_value, MaxLatency); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain2_GetMaximumFrameLatency(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pMaxLatency; + HRESULT return_value; + + bytes_read += pMaxLatency.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain2_GetMaximumFrameLatency(call_info, object_id, return_value, &pMaxLatency); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain2_GetFrameLatencyWaitableObject(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain2_GetFrameLatencyWaitableObject(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain2_SetMatrixTransform(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pMatrix; + HRESULT return_value; + + bytes_read += pMatrix.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain2_SetMatrixTransform(call_info, object_id, return_value, &pMatrix); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain2_GetMatrixTransform(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pMatrix; + HRESULT return_value; + + bytes_read += pMatrix.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain2_GetMatrixTransform(call_info, object_id, return_value, &pMatrix); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput2_SupportsOverlays(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + BOOL return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput2_SupportsOverlays(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory3_GetCreationFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory3_GetCreationFlags(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_PresentBuffer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT BufferToPresent; + UINT SyncInterval; + UINT Flags; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferToPresent); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SyncInterval); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDecodeSwapChain_PresentBuffer(call_info, object_id, return_value, BufferToPresent, SyncInterval, Flags); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_SetSourceRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pRect; + HRESULT return_value; + + bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDecodeSwapChain_SetSourceRect(call_info, object_id, return_value, &pRect); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_SetTargetRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pRect; + HRESULT return_value; + + bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDecodeSwapChain_SetTargetRect(call_info, object_id, return_value, &pRect); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_SetDestSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Width; + UINT Height; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Width); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Height); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDecodeSwapChain_SetDestSize(call_info, object_id, return_value, Width, Height); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_GetSourceRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pRect; + HRESULT return_value; + + bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDecodeSwapChain_GetSourceRect(call_info, object_id, return_value, &pRect); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_GetTargetRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pRect; + HRESULT return_value; + + bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDecodeSwapChain_GetTargetRect(call_info, object_id, return_value, &pRect); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_GetDestSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pWidth; + PointerDecoder pHeight; + HRESULT return_value; + + bytes_read += pWidth.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pHeight.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDecodeSwapChain_GetDestSize(call_info, object_id, return_value, &pWidth, &pHeight); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_SetColorSpace(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS ColorSpace; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ColorSpace); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDecodeSwapChain_SetColorSpace(call_info, object_id, return_value, ColorSpace); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_GetColorSpace(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDecodeSwapChain_GetColorSpace(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactoryMedia_CreateSwapChainForCompositionSurfaceHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDevice; + uint64_t hSurface; + StructPointerDecoder pDesc; + format::HandleId pRestrictToOutput; + HandlePointerDecoder ppSwapChain; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hSurface); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRestrictToOutput); + bytes_read += ppSwapChain.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactoryMedia_CreateSwapChainForCompositionSurfaceHandle(call_info, object_id, return_value, pDevice, hSurface, &pDesc, pRestrictToOutput, &ppSwapChain); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactoryMedia_CreateDecodeSwapChainForCompositionSurfaceHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDevice; + uint64_t hSurface; + StructPointerDecoder pDesc; + format::HandleId pYuvDecodeBuffers; + format::HandleId pRestrictToOutput; + HandlePointerDecoder ppSwapChain; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hSurface); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pYuvDecodeBuffers); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRestrictToOutput); + bytes_read += ppSwapChain.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactoryMedia_CreateDecodeSwapChainForCompositionSurfaceHandle(call_info, object_id, return_value, pDevice, hSurface, &pDesc, pYuvDecodeBuffers, pRestrictToOutput, &ppSwapChain); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChainMedia_GetFrameStatisticsMedia(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pStats; + HRESULT return_value; + + bytes_read += pStats.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChainMedia_GetFrameStatisticsMedia(call_info, object_id, return_value, &pStats); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChainMedia_SetPresentDuration(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Duration; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Duration); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChainMedia_SetPresentDuration(call_info, object_id, return_value, Duration); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChainMedia_CheckPresentDurationSupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT DesiredPresentDuration; + PointerDecoder pClosestSmallerPresentDuration; + PointerDecoder pClosestLargerPresentDuration; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DesiredPresentDuration); + bytes_read += pClosestSmallerPresentDuration.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pClosestLargerPresentDuration.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChainMedia_CheckPresentDurationSupport(call_info, object_id, return_value, DesiredPresentDuration, &pClosestSmallerPresentDuration, &pClosestLargerPresentDuration); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput3_CheckOverlaySupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DXGI_FORMAT EnumFormat; + format::HandleId pConcernedDevice; + PointerDecoder pFlags; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &EnumFormat); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pConcernedDevice); + bytes_read += pFlags.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput3_CheckOverlaySupport(call_info, object_id, return_value, EnumFormat, pConcernedDevice, &pFlags); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain3_GetCurrentBackBufferIndex(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain3_GetCurrentBackBufferIndex(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain3_CheckColorSpaceSupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DXGI_COLOR_SPACE_TYPE ColorSpace; + PointerDecoder pColorSpaceSupport; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ColorSpace); + bytes_read += pColorSpaceSupport.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain3_CheckColorSpaceSupport(call_info, object_id, return_value, ColorSpace, &pColorSpaceSupport); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain3_SetColorSpace1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DXGI_COLOR_SPACE_TYPE ColorSpace; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ColorSpace); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain3_SetColorSpace1(call_info, object_id, return_value, ColorSpace); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain3_ResizeBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT BufferCount; + UINT Width; + UINT Height; + DXGI_FORMAT Format; + UINT SwapChainFlags; + PointerDecoder pCreationNodeMask; + HandlePointerDecoder ppPresentQueue; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferCount); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Width); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Height); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SwapChainFlags); + bytes_read += pCreationNodeMask.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppPresentQueue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain3_ResizeBuffers1(call_info, object_id, return_value, BufferCount, Width, Height, Format, SwapChainFlags, &pCreationNodeMask, &ppPresentQueue); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput4_CheckOverlayColorSpaceSupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DXGI_FORMAT Format; + DXGI_COLOR_SPACE_TYPE ColorSpace; + format::HandleId pConcernedDevice; + PointerDecoder pFlags; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ColorSpace); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pConcernedDevice); + bytes_read += pFlags.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput4_CheckOverlayColorSpaceSupport(call_info, object_id, return_value, Format, ColorSpace, pConcernedDevice, &pFlags); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory4_EnumAdapterByLuid(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_LUID AdapterLuid; + LUID value_AdapterLuid; + AdapterLuid.decoded_value = &value_AdapterLuid; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvAdapter; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &AdapterLuid); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvAdapter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory4_EnumAdapterByLuid(call_info, object_id, return_value, AdapterLuid, riid, &ppvAdapter); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory4_EnumWarpAdapter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvAdapter; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvAdapter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory4_EnumWarpAdapter(call_info, object_id, return_value, riid, &ppvAdapter); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIAdapter3_RegisterHardwareContentProtectionTeardownStatusEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t hEvent; + PointerDecoder pdwCookie; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); + bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIAdapter3_RegisterHardwareContentProtectionTeardownStatusEvent(call_info, object_id, return_value, hEvent, &pdwCookie); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIAdapter3_UnregisterHardwareContentProtectionTeardownStatus(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DWORD dwCookie; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwCookie); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIAdapter3_UnregisterHardwareContentProtectionTeardownStatus(call_info, object_id, dwCookie); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIAdapter3_QueryVideoMemoryInfo(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NodeIndex; + DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup; + StructPointerDecoder pVideoMemoryInfo; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NodeIndex); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MemorySegmentGroup); + bytes_read += pVideoMemoryInfo.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIAdapter3_QueryVideoMemoryInfo(call_info, object_id, return_value, NodeIndex, MemorySegmentGroup, &pVideoMemoryInfo); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIAdapter3_SetVideoMemoryReservation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NodeIndex; + DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup; + UINT64 Reservation; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NodeIndex); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MemorySegmentGroup); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Reservation); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIAdapter3_SetVideoMemoryReservation(call_info, object_id, return_value, NodeIndex, MemorySegmentGroup, Reservation); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIAdapter3_RegisterVideoMemoryBudgetChangeNotificationEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t hEvent; + PointerDecoder pdwCookie; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); + bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIAdapter3_RegisterVideoMemoryBudgetChangeNotificationEvent(call_info, object_id, return_value, hEvent, &pdwCookie); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIAdapter3_UnregisterVideoMemoryBudgetChangeNotification(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DWORD dwCookie; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwCookie); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIAdapter3_UnregisterVideoMemoryBudgetChangeNotification(call_info, object_id, dwCookie); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput5_DuplicateOutput1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDevice; + UINT Flags; + UINT SupportedFormatsCount; + PointerDecoder pSupportedFormats; + HandlePointerDecoder ppOutputDuplication; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SupportedFormatsCount); + bytes_read += pSupportedFormats.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppOutputDuplication.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput5_DuplicateOutput1(call_info, object_id, return_value, pDevice, Flags, SupportedFormatsCount, &pSupportedFormats, &ppOutputDuplication); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGISwapChain4_SetHDRMetaData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DXGI_HDR_METADATA_TYPE Type; + UINT Size; + PointerDecoder pMetaData; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); + bytes_read += pMetaData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGISwapChain4_SetHDRMetaData(call_info, object_id, return_value, Type, Size, &pMetaData); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDevice4_OfferResources1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumResources; + HandlePointerDecoder ppResources; + DXGI_OFFER_RESOURCE_PRIORITY Priority; + UINT Flags; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumResources); + bytes_read += ppResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Priority); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDevice4_OfferResources1(call_info, object_id, return_value, NumResources, &ppResources, Priority, Flags); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIDevice4_ReclaimResources1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumResources; + HandlePointerDecoder ppResources; + PointerDecoder pResults; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumResources); + bytes_read += ppResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pResults.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIDevice4_ReclaimResources1(call_info, object_id, return_value, NumResources, &ppResources, &pResults); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIAdapter4_GetDesc3(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIAdapter4_GetDesc3(call_info, object_id, return_value, &pDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput6_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput6_GetDesc1(call_info, object_id, return_value, &pDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIOutput6_CheckHardwareCompositionSupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pFlags; + HRESULT return_value; + + bytes_read += pFlags.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIOutput6_CheckHardwareCompositionSupport(call_info, object_id, return_value, &pFlags); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory6_EnumAdapterByGpuPreference(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Adapter; + DXGI_GPU_PREFERENCE GpuPreference; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvAdapter; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Adapter); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &GpuPreference); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvAdapter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory6_EnumAdapterByGpuPreference(call_info, object_id, return_value, Adapter, GpuPreference, riid, &ppvAdapter); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory7_RegisterAdaptersChangedEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t hEvent; + PointerDecoder pdwCookie; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); + bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory7_RegisterAdaptersChangedEvent(call_info, object_id, return_value, hEvent, &pdwCookie); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_IDXGIFactory7_UnregisterAdaptersChangedEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + DWORD dwCookie; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwCookie); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_IDXGIFactory7_UnregisterAdaptersChangedEvent(call_info, object_id, return_value, dwCookie); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Object_GetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID guid; + GUID value_guid; + guid.decoded_value = &value_guid; + PointerDecoder pDataSize; + PointerDecoder pData; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); + bytes_read += pDataSize.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Object_GetPrivateData(call_info, object_id, return_value, guid, &pDataSize, &pData); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Object_SetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID guid; + GUID value_guid; + guid.decoded_value = &value_guid; + UINT DataSize; + PointerDecoder pData; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Object_SetPrivateData(call_info, object_id, return_value, guid, DataSize, &pData); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Object_SetPrivateDataInterface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID guid; + GUID value_guid; + guid.decoded_value = &value_guid; + format::HandleId pData; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pData); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Object_SetPrivateDataInterface(call_info, object_id, return_value, guid, pData); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Object_SetName(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + WStringDecoder Name; + HRESULT return_value; + + bytes_read += Name.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Object_SetName(call_info, object_id, return_value, &Name); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceChild_GetDevice(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvDevice; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceChild_GetDevice(call_info, object_id, return_value, riid, &ppvDevice); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12RootSignatureDeserializer_GetRootSignatureDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder return_value; + + bytes_read += return_value.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12RootSignatureDeserializer_GetRootSignatureDesc(call_info, object_id, &return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12VersionedRootSignatureDeserializer_GetRootSignatureDescAtVersion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D_ROOT_SIGNATURE_VERSION convertToVersion; + StructPointerDecoder ppDesc; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &convertToVersion); + bytes_read += ppDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12VersionedRootSignatureDeserializer_GetRootSignatureDescAtVersion(call_info, object_id, return_value, convertToVersion, &ppDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12VersionedRootSignatureDeserializer_GetUnconvertedRootSignatureDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder return_value; + + bytes_read += return_value.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12VersionedRootSignatureDeserializer_GetUnconvertedRootSignatureDesc(call_info, object_id, &return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Heap_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_D3D12_HEAP_DESC return_value; + D3D12_HEAP_DESC value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Heap_GetDesc(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Resource_Map(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Subresource; + StructPointerDecoder pReadRange; + PointerDecoder ppData; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); + bytes_read += pReadRange.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppData.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Resource_Map(call_info, object_id, return_value, Subresource, &pReadRange, &ppData); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Resource_Unmap(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Subresource; + StructPointerDecoder pWrittenRange; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); + bytes_read += pWrittenRange.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Resource_Unmap(call_info, object_id, Subresource, &pWrittenRange); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Resource_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_D3D12_RESOURCE_DESC return_value; + D3D12_RESOURCE_DESC value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Resource_GetDesc(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Resource_GetGPUVirtualAddress(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_GPU_VIRTUAL_ADDRESS return_value; + + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Resource_GetGPUVirtualAddress(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Resource_ReadFromSubresource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t pDstData; + UINT DstRowPitch; + UINT DstDepthPitch; + UINT SrcSubresource; + StructPointerDecoder pSrcBox; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstData); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstRowPitch); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstDepthPitch); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcSubresource); + bytes_read += pSrcBox.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Resource_ReadFromSubresource(call_info, object_id, return_value, pDstData, DstRowPitch, DstDepthPitch, SrcSubresource, &pSrcBox); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Resource_GetHeapProperties(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pHeapProperties; + PointerDecoder pHeapFlags; + HRESULT return_value; + + bytes_read += pHeapProperties.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pHeapFlags.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Resource_GetHeapProperties(call_info, object_id, return_value, &pHeapProperties, &pHeapFlags); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12CommandAllocator_Reset(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12CommandAllocator_Reset(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Fence_GetCompletedValue(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT64 return_value; + + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Fence_GetCompletedValue(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Fence_SetEventOnCompletion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT64 Value; + uint64_t hEvent; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Value); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Fence_SetEventOnCompletion(call_info, object_id, return_value, Value, hEvent); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Fence_Signal(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT64 Value; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Value); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Fence_Signal(call_info, object_id, return_value, Value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Fence1_GetCreationFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_FENCE_FLAGS return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Fence1_GetCreationFlags(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12PipelineState_GetCachedBlob(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HandlePointerDecoder ppBlob; + HRESULT return_value; + + bytes_read += ppBlob.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12PipelineState_GetCachedBlob(call_info, object_id, return_value, &ppBlob); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DescriptorHeap_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_D3D12_DESCRIPTOR_HEAP_DESC return_value; + D3D12_DESCRIPTOR_HEAP_DESC value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DescriptorHeap_GetDesc(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE return_value; + D3D12_CPU_DESCRIPTOR_HANDLE value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_D3D12_GPU_DESCRIPTOR_HANDLE return_value; + D3D12_GPU_DESCRIPTOR_HANDLE value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12CommandList_GetType(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_COMMAND_LIST_TYPE return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12CommandList_GetType(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_Close(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_Close(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_Reset(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pAllocator; + format::HandleId pInitialState; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pAllocator); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pInitialState); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_Reset(call_info, object_id, return_value, pAllocator, pInitialState); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ClearState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pPipelineState; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pPipelineState); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_ClearState(call_info, object_id, pPipelineState); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_DrawInstanced(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT VertexCountPerInstance; + UINT InstanceCount; + UINT StartVertexLocation; + UINT StartInstanceLocation; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &VertexCountPerInstance); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InstanceCount); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartVertexLocation); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartInstanceLocation); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_DrawInstanced(call_info, object_id, VertexCountPerInstance, InstanceCount, StartVertexLocation, StartInstanceLocation); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_DrawIndexedInstanced(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT IndexCountPerInstance; + UINT InstanceCount; + UINT StartIndexLocation; + INT BaseVertexLocation; + UINT StartInstanceLocation; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &IndexCountPerInstance); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InstanceCount); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartIndexLocation); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BaseVertexLocation); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartInstanceLocation); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_DrawIndexedInstanced(call_info, object_id, IndexCountPerInstance, InstanceCount, StartIndexLocation, BaseVertexLocation, StartInstanceLocation); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_Dispatch(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT ThreadGroupCountX; + UINT ThreadGroupCountY; + UINT ThreadGroupCountZ; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountX); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountY); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountZ); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_Dispatch(call_info, object_id, ThreadGroupCountX, ThreadGroupCountY, ThreadGroupCountZ); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_CopyBufferRegion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDstBuffer; + UINT64 DstOffset; + format::HandleId pSrcBuffer; + UINT64 SrcOffset; + UINT64 NumBytes; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstBuffer); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstOffset); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcBuffer); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcOffset); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBytes); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_CopyBufferRegion(call_info, object_id, pDstBuffer, DstOffset, pSrcBuffer, SrcOffset, NumBytes); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_CopyTextureRegion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDst; + UINT DstX; + UINT DstY; + UINT DstZ; + StructPointerDecoder pSrc; + StructPointerDecoder pSrcBox; + + bytes_read += pDst.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstX); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstY); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstZ); + bytes_read += pSrc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pSrcBox.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_CopyTextureRegion(call_info, object_id, &pDst, DstX, DstY, DstZ, &pSrc, &pSrcBox); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_CopyResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDstResource; + format::HandleId pSrcResource; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcResource); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_CopyResource(call_info, object_id, pDstResource, pSrcResource); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_CopyTiles(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pTiledResource; + StructPointerDecoder pTileRegionStartCoordinate; + StructPointerDecoder pTileRegionSize; + format::HandleId pBuffer; + UINT64 BufferStartOffsetInBytes; + D3D12_TILE_COPY_FLAGS Flags; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTiledResource); + bytes_read += pTileRegionStartCoordinate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pTileRegionSize.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pBuffer); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferStartOffsetInBytes); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_CopyTiles(call_info, object_id, pTiledResource, &pTileRegionStartCoordinate, &pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ResolveSubresource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDstResource; + UINT DstSubresource; + format::HandleId pSrcResource; + UINT SrcSubresource; + DXGI_FORMAT Format; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstSubresource); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcSubresource); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_ResolveSubresource(call_info, object_id, pDstResource, DstSubresource, pSrcResource, SrcSubresource, Format); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_IASetPrimitiveTopology(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D_PRIMITIVE_TOPOLOGY PrimitiveTopology; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &PrimitiveTopology); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_IASetPrimitiveTopology(call_info, object_id, PrimitiveTopology); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_RSSetViewports(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumViewports; + StructPointerDecoder pViewports; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViewports); + bytes_read += pViewports.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_RSSetViewports(call_info, object_id, NumViewports, &pViewports); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_RSSetScissorRects(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumRects; + StructPointerDecoder pRects; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRects); + bytes_read += pRects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_RSSetScissorRects(call_info, object_id, NumRects, &pRects); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_OMSetBlendFactor(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder BlendFactor; + + bytes_read += BlendFactor.DecodeFloat((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_OMSetBlendFactor(call_info, object_id, &BlendFactor); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_OMSetStencilRef(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT StencilRef; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StencilRef); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_OMSetStencilRef(call_info, object_id, StencilRef); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetPipelineState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pPipelineState; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pPipelineState); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetPipelineState(call_info, object_id, pPipelineState); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ResourceBarrier(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumBarriers; + StructPointerDecoder pBarriers; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBarriers); + bytes_read += pBarriers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_ResourceBarrier(call_info, object_id, NumBarriers, &pBarriers); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ExecuteBundle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pCommandList; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCommandList); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_ExecuteBundle(call_info, object_id, pCommandList); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetDescriptorHeaps(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumDescriptorHeaps; + HandlePointerDecoder ppDescriptorHeaps; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumDescriptorHeaps); + bytes_read += ppDescriptorHeaps.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetDescriptorHeaps(call_info, object_id, NumDescriptorHeaps, &ppDescriptorHeaps); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetComputeRootSignature(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pRootSignature; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRootSignature); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetComputeRootSignature(call_info, object_id, pRootSignature); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetGraphicsRootSignature(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pRootSignature; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRootSignature); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetGraphicsRootSignature(call_info, object_id, pRootSignature); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetComputeRootDescriptorTable(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT RootParameterIndex; + Decoded_D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor; + D3D12_GPU_DESCRIPTOR_HANDLE value_BaseDescriptor; + BaseDescriptor.decoded_value = &value_BaseDescriptor; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BaseDescriptor); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetComputeRootDescriptorTable(call_info, object_id, RootParameterIndex, BaseDescriptor); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT RootParameterIndex; + Decoded_D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor; + D3D12_GPU_DESCRIPTOR_HANDLE value_BaseDescriptor; + BaseDescriptor.decoded_value = &value_BaseDescriptor; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BaseDescriptor); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(call_info, object_id, RootParameterIndex, BaseDescriptor); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetComputeRoot32BitConstant(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT RootParameterIndex; + UINT SrcData; + UINT DestOffsetIn32BitValues; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcData); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestOffsetIn32BitValues); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetComputeRoot32BitConstant(call_info, object_id, RootParameterIndex, SrcData, DestOffsetIn32BitValues); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstant(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT RootParameterIndex; + UINT SrcData; + UINT DestOffsetIn32BitValues; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcData); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestOffsetIn32BitValues); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstant(call_info, object_id, RootParameterIndex, SrcData, DestOffsetIn32BitValues); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetComputeRoot32BitConstants(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT RootParameterIndex; + UINT Num32BitValuesToSet; + PointerDecoder pSrcData; + UINT DestOffsetIn32BitValues; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Num32BitValuesToSet); + bytes_read += pSrcData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestOffsetIn32BitValues); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetComputeRoot32BitConstants(call_info, object_id, RootParameterIndex, Num32BitValuesToSet, &pSrcData, DestOffsetIn32BitValues); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstants(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT RootParameterIndex; + UINT Num32BitValuesToSet; + PointerDecoder pSrcData; + UINT DestOffsetIn32BitValues; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Num32BitValuesToSet); + bytes_read += pSrcData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestOffsetIn32BitValues); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstants(call_info, object_id, RootParameterIndex, Num32BitValuesToSet, &pSrcData, DestOffsetIn32BitValues); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetComputeRootConstantBufferView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT RootParameterIndex; + D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferLocation); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetComputeRootConstantBufferView(call_info, object_id, RootParameterIndex, BufferLocation); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT RootParameterIndex; + D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferLocation); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(call_info, object_id, RootParameterIndex, BufferLocation); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetComputeRootShaderResourceView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT RootParameterIndex; + D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferLocation); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetComputeRootShaderResourceView(call_info, object_id, RootParameterIndex, BufferLocation); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetGraphicsRootShaderResourceView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT RootParameterIndex; + D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferLocation); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetGraphicsRootShaderResourceView(call_info, object_id, RootParameterIndex, BufferLocation); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetComputeRootUnorderedAccessView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT RootParameterIndex; + D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferLocation); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetComputeRootUnorderedAccessView(call_info, object_id, RootParameterIndex, BufferLocation); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetGraphicsRootUnorderedAccessView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT RootParameterIndex; + D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferLocation); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetGraphicsRootUnorderedAccessView(call_info, object_id, RootParameterIndex, BufferLocation); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_IASetIndexBuffer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pView; + + bytes_read += pView.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_IASetIndexBuffer(call_info, object_id, &pView); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_IASetVertexBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT StartSlot; + UINT NumViews; + StructPointerDecoder pViews; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += pViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_IASetVertexBuffers(call_info, object_id, StartSlot, NumViews, &pViews); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SOSetTargets(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT StartSlot; + UINT NumViews; + StructPointerDecoder pViews; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += pViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SOSetTargets(call_info, object_id, StartSlot, NumViews, &pViews); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_OMSetRenderTargets(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumRenderTargetDescriptors; + StructPointerDecoder pRenderTargetDescriptors; + BOOL RTsSingleHandleToDescriptorRange; + StructPointerDecoder pDepthStencilDescriptor; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRenderTargetDescriptors); + bytes_read += pRenderTargetDescriptors.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RTsSingleHandleToDescriptorRange); + bytes_read += pDepthStencilDescriptor.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_OMSetRenderTargets(call_info, object_id, NumRenderTargetDescriptors, &pRenderTargetDescriptors, RTsSingleHandleToDescriptorRange, &pDepthStencilDescriptor); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ClearDepthStencilView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView; + D3D12_CPU_DESCRIPTOR_HANDLE value_DepthStencilView; + DepthStencilView.decoded_value = &value_DepthStencilView; + D3D12_CLEAR_FLAGS ClearFlags; + FLOAT Depth; + UINT8 Stencil; + UINT NumRects; + StructPointerDecoder pRects; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DepthStencilView); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ClearFlags); + bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Depth); + bytes_read += ValueDecoder::DecodeUInt8Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Stencil); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRects); + bytes_read += pRects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_ClearDepthStencilView(call_info, object_id, DepthStencilView, ClearFlags, Depth, Stencil, NumRects, &pRects); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ClearRenderTargetView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE RenderTargetView; + D3D12_CPU_DESCRIPTOR_HANDLE value_RenderTargetView; + RenderTargetView.decoded_value = &value_RenderTargetView; + PointerDecoder ColorRGBA; + UINT NumRects; + StructPointerDecoder pRects; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RenderTargetView); + bytes_read += ColorRGBA.DecodeFloat((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRects); + bytes_read += pRects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_ClearRenderTargetView(call_info, object_id, RenderTargetView, &ColorRGBA, NumRects, &pRects); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ClearUnorderedAccessViewUint(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap; + D3D12_GPU_DESCRIPTOR_HANDLE value_ViewGPUHandleInCurrentHeap; + ViewGPUHandleInCurrentHeap.decoded_value = &value_ViewGPUHandleInCurrentHeap; + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle; + D3D12_CPU_DESCRIPTOR_HANDLE value_ViewCPUHandle; + ViewCPUHandle.decoded_value = &value_ViewCPUHandle; + format::HandleId pResource; + PointerDecoder Values; + UINT NumRects; + StructPointerDecoder pRects; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ViewGPUHandleInCurrentHeap); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ViewCPUHandle); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += Values.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRects); + bytes_read += pRects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_ClearUnorderedAccessViewUint(call_info, object_id, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, &Values, NumRects, &pRects); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ClearUnorderedAccessViewFloat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap; + D3D12_GPU_DESCRIPTOR_HANDLE value_ViewGPUHandleInCurrentHeap; + ViewGPUHandleInCurrentHeap.decoded_value = &value_ViewGPUHandleInCurrentHeap; + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle; + D3D12_CPU_DESCRIPTOR_HANDLE value_ViewCPUHandle; + ViewCPUHandle.decoded_value = &value_ViewCPUHandle; + format::HandleId pResource; + PointerDecoder Values; + UINT NumRects; + StructPointerDecoder pRects; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ViewGPUHandleInCurrentHeap); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ViewCPUHandle); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += Values.DecodeFloat((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRects); + bytes_read += pRects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_ClearUnorderedAccessViewFloat(call_info, object_id, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, &Values, NumRects, &pRects); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_DiscardResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pResource; + StructPointerDecoder pRegion; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += pRegion.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_DiscardResource(call_info, object_id, pResource, &pRegion); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_BeginQuery(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pQueryHeap; + D3D12_QUERY_TYPE Type; + UINT Index; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pQueryHeap); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Index); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_BeginQuery(call_info, object_id, pQueryHeap, Type, Index); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_EndQuery(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pQueryHeap; + D3D12_QUERY_TYPE Type; + UINT Index; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pQueryHeap); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Index); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_EndQuery(call_info, object_id, pQueryHeap, Type, Index); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ResolveQueryData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pQueryHeap; + D3D12_QUERY_TYPE Type; + UINT StartIndex; + UINT NumQueries; + format::HandleId pDestinationBuffer; + UINT64 AlignedDestinationBufferOffset; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pQueryHeap); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartIndex); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumQueries); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDestinationBuffer); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &AlignedDestinationBufferOffset); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_ResolveQueryData(call_info, object_id, pQueryHeap, Type, StartIndex, NumQueries, pDestinationBuffer, AlignedDestinationBufferOffset); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetPredication(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pBuffer; + UINT64 AlignedBufferOffset; + D3D12_PREDICATION_OP Operation; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pBuffer); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &AlignedBufferOffset); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Operation); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetPredication(call_info, object_id, pBuffer, AlignedBufferOffset, Operation); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetMarker(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Metadata; + PointerDecoder pData; + UINT Size; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Metadata); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_SetMarker(call_info, object_id, Metadata, &pData, Size); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_BeginEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Metadata; + PointerDecoder pData; + UINT Size; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Metadata); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_BeginEvent(call_info, object_id, Metadata, &pData, Size); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_EndEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_EndEvent(call_info, object_id); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ExecuteIndirect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pCommandSignature; + UINT MaxCommandCount; + format::HandleId pArgumentBuffer; + UINT64 ArgumentBufferOffset; + format::HandleId pCountBuffer; + UINT64 CountBufferOffset; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCommandSignature); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MaxCommandCount); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pArgumentBuffer); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ArgumentBufferOffset); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCountBuffer); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CountBufferOffset); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList_ExecuteIndirect(call_info, object_id, pCommandSignature, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList1_AtomicCopyBufferUINT(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDstBuffer; + UINT64 DstOffset; + format::HandleId pSrcBuffer; + UINT64 SrcOffset; + UINT Dependencies; + HandlePointerDecoder ppDependentResources; + StructPointerDecoder pDependentSubresourceRanges; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstBuffer); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstOffset); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcBuffer); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcOffset); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Dependencies); + bytes_read += ppDependentResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDependentSubresourceRanges.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList1_AtomicCopyBufferUINT(call_info, object_id, pDstBuffer, DstOffset, pSrcBuffer, SrcOffset, Dependencies, &ppDependentResources, &pDependentSubresourceRanges); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList1_AtomicCopyBufferUINT64(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDstBuffer; + UINT64 DstOffset; + format::HandleId pSrcBuffer; + UINT64 SrcOffset; + UINT Dependencies; + HandlePointerDecoder ppDependentResources; + StructPointerDecoder pDependentSubresourceRanges; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstBuffer); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstOffset); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcBuffer); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcOffset); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Dependencies); + bytes_read += ppDependentResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDependentSubresourceRanges.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList1_AtomicCopyBufferUINT64(call_info, object_id, pDstBuffer, DstOffset, pSrcBuffer, SrcOffset, Dependencies, &ppDependentResources, &pDependentSubresourceRanges); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList1_OMSetDepthBounds(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + FLOAT Min; + FLOAT Max; + + bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Min); + bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Max); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList1_OMSetDepthBounds(call_info, object_id, Min, Max); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList1_SetSamplePositions(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumSamplesPerPixel; + UINT NumPixels; + StructPointerDecoder pSamplePositions; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSamplesPerPixel); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumPixels); + bytes_read += pSamplePositions.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList1_SetSamplePositions(call_info, object_id, NumSamplesPerPixel, NumPixels, &pSamplePositions); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList1_ResolveSubresourceRegion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDstResource; + UINT DstSubresource; + UINT DstX; + UINT DstY; + format::HandleId pSrcResource; + UINT SrcSubresource; + StructPointerDecoder pSrcRect; + DXGI_FORMAT Format; + D3D12_RESOLVE_MODE ResolveMode; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstSubresource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstX); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstY); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcSubresource); + bytes_read += pSrcRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ResolveMode); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList1_ResolveSubresourceRegion(call_info, object_id, pDstResource, DstSubresource, DstX, DstY, pSrcResource, SrcSubresource, &pSrcRect, Format, ResolveMode); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList1_SetViewInstanceMask(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Mask; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Mask); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList1_SetViewInstanceMask(call_info, object_id, Mask); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList2_WriteBufferImmediate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Count; + StructPointerDecoder pParams; + PointerDecoder pModes; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Count); + bytes_read += pParams.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pModes.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList2_WriteBufferImmediate(call_info, object_id, Count, &pParams, &pModes); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12CommandQueue_UpdateTileMappings(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pResource; + UINT NumResourceRegions; + StructPointerDecoder pResourceRegionStartCoordinates; + StructPointerDecoder pResourceRegionSizes; + format::HandleId pHeap; + UINT NumRanges; + PointerDecoder pRangeFlags; + PointerDecoder pHeapRangeStartOffsets; + PointerDecoder pRangeTileCounts; + D3D12_TILE_MAPPING_FLAGS Flags; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumResourceRegions); + bytes_read += pResourceRegionStartCoordinates.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pResourceRegionSizes.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pHeap); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRanges); + bytes_read += pRangeFlags.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pHeapRangeStartOffsets.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pRangeTileCounts.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12CommandQueue_UpdateTileMappings(call_info, object_id, pResource, NumResourceRegions, &pResourceRegionStartCoordinates, &pResourceRegionSizes, pHeap, NumRanges, &pRangeFlags, &pHeapRangeStartOffsets, &pRangeTileCounts, Flags); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12CommandQueue_CopyTileMappings(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pDstResource; + StructPointerDecoder pDstRegionStartCoordinate; + format::HandleId pSrcResource; + StructPointerDecoder pSrcRegionStartCoordinate; + StructPointerDecoder pRegionSize; + D3D12_TILE_MAPPING_FLAGS Flags; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); + bytes_read += pDstRegionStartCoordinate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcResource); + bytes_read += pSrcRegionStartCoordinate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pRegionSize.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12CommandQueue_CopyTileMappings(call_info, object_id, pDstResource, &pDstRegionStartCoordinate, pSrcResource, &pSrcRegionStartCoordinate, &pRegionSize, Flags); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12CommandQueue_ExecuteCommandLists(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumCommandLists; + HandlePointerDecoder ppCommandLists; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumCommandLists); + bytes_read += ppCommandLists.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12CommandQueue_ExecuteCommandLists(call_info, object_id, NumCommandLists, &ppCommandLists); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12CommandQueue_SetMarker(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Metadata; + PointerDecoder pData; + UINT Size; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Metadata); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12CommandQueue_SetMarker(call_info, object_id, Metadata, &pData, Size); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12CommandQueue_BeginEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT Metadata; + PointerDecoder pData; + UINT Size; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Metadata); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12CommandQueue_BeginEvent(call_info, object_id, Metadata, &pData, Size); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12CommandQueue_EndEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12CommandQueue_EndEvent(call_info, object_id); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12CommandQueue_Signal(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pFence; + UINT64 Value; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pFence); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Value); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12CommandQueue_Signal(call_info, object_id, return_value, pFence, Value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12CommandQueue_Wait(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pFence; + UINT64 Value; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pFence); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Value); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12CommandQueue_Wait(call_info, object_id, return_value, pFence, Value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12CommandQueue_GetTimestampFrequency(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pFrequency; + HRESULT return_value; + + bytes_read += pFrequency.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12CommandQueue_GetTimestampFrequency(call_info, object_id, return_value, &pFrequency); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12CommandQueue_GetClockCalibration(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pGpuTimestamp; + PointerDecoder pCpuTimestamp; + HRESULT return_value; + + bytes_read += pGpuTimestamp.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pCpuTimestamp.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12CommandQueue_GetClockCalibration(call_info, object_id, return_value, &pGpuTimestamp, &pCpuTimestamp); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12CommandQueue_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_D3D12_COMMAND_QUEUE_DESC return_value; + D3D12_COMMAND_QUEUE_DESC value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12CommandQueue_GetDesc(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_GetNodeCount(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_GetNodeCount(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateCommandQueue(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppCommandQueue; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppCommandQueue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateCommandQueue(call_info, object_id, return_value, &pDesc, riid, &ppCommandQueue); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateCommandAllocator(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_COMMAND_LIST_TYPE type; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppCommandAllocator; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &type); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppCommandAllocator.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateCommandAllocator(call_info, object_id, return_value, type, riid, &ppCommandAllocator); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateGraphicsPipelineState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppPipelineState; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppPipelineState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateGraphicsPipelineState(call_info, object_id, return_value, &pDesc, riid, &ppPipelineState); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateComputePipelineState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppPipelineState; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppPipelineState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateComputePipelineState(call_info, object_id, return_value, &pDesc, riid, &ppPipelineState); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateCommandList(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT nodeMask; + D3D12_COMMAND_LIST_TYPE type; + format::HandleId pCommandAllocator; + format::HandleId pInitialState; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppCommandList; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &nodeMask); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &type); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCommandAllocator); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pInitialState); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppCommandList.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateCommandList(call_info, object_id, return_value, nodeMask, type, pCommandAllocator, pInitialState, riid, &ppCommandList); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateDescriptorHeap(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDescriptorHeapDesc; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvHeap; + HRESULT return_value; + + bytes_read += pDescriptorHeapDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvHeap.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateDescriptorHeap(call_info, object_id, return_value, &pDescriptorHeapDesc, riid, &ppvHeap); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_GetDescriptorHandleIncrementSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapType; + UINT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DescriptorHeapType); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_GetDescriptorHandleIncrementSize(call_info, object_id, return_value, DescriptorHeapType); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateRootSignature(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT nodeMask; + PointerDecoder pBlobWithRootSignature; + SIZE_T blobLengthInBytes; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvRootSignature; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &nodeMask); + bytes_read += pBlobWithRootSignature.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &blobLengthInBytes); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvRootSignature.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateRootSignature(call_info, object_id, return_value, nodeMask, &pBlobWithRootSignature, blobLengthInBytes, riid, &ppvRootSignature); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateConstantBufferView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; + D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; + DestDescriptor.decoded_value = &value_DestDescriptor; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateConstantBufferView(call_info, object_id, &pDesc, DestDescriptor); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateShaderResourceView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pResource; + StructPointerDecoder pDesc; + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; + D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; + DestDescriptor.decoded_value = &value_DestDescriptor; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateShaderResourceView(call_info, object_id, pResource, &pDesc, DestDescriptor); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateUnorderedAccessView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pResource; + format::HandleId pCounterResource; + StructPointerDecoder pDesc; + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; + D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; + DestDescriptor.decoded_value = &value_DestDescriptor; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCounterResource); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateUnorderedAccessView(call_info, object_id, pResource, pCounterResource, &pDesc, DestDescriptor); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateRenderTargetView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pResource; + StructPointerDecoder pDesc; + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; + D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; + DestDescriptor.decoded_value = &value_DestDescriptor; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateRenderTargetView(call_info, object_id, pResource, &pDesc, DestDescriptor); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateDepthStencilView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pResource; + StructPointerDecoder pDesc; + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; + D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; + DestDescriptor.decoded_value = &value_DestDescriptor; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateDepthStencilView(call_info, object_id, pResource, &pDesc, DestDescriptor); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateSampler(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; + D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; + DestDescriptor.decoded_value = &value_DestDescriptor; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateSampler(call_info, object_id, &pDesc, DestDescriptor); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CopyDescriptors(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumDestDescriptorRanges; + StructPointerDecoder pDestDescriptorRangeStarts; + PointerDecoder pDestDescriptorRangeSizes; + UINT NumSrcDescriptorRanges; + StructPointerDecoder pSrcDescriptorRangeStarts; + PointerDecoder pSrcDescriptorRangeSizes; + D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumDestDescriptorRanges); + bytes_read += pDestDescriptorRangeStarts.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDestDescriptorRangeSizes.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSrcDescriptorRanges); + bytes_read += pSrcDescriptorRangeStarts.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pSrcDescriptorRangeSizes.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DescriptorHeapsType); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CopyDescriptors(call_info, object_id, NumDestDescriptorRanges, &pDestDescriptorRangeStarts, &pDestDescriptorRangeSizes, NumSrcDescriptorRanges, &pSrcDescriptorRangeStarts, &pSrcDescriptorRangeSizes, DescriptorHeapsType); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CopyDescriptorsSimple(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumDescriptors; + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptorRangeStart; + D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptorRangeStart; + DestDescriptorRangeStart.decoded_value = &value_DestDescriptorRangeStart; + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE SrcDescriptorRangeStart; + D3D12_CPU_DESCRIPTOR_HANDLE value_SrcDescriptorRangeStart; + SrcDescriptorRangeStart.decoded_value = &value_SrcDescriptorRangeStart; + D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumDescriptors); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptorRangeStart); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcDescriptorRangeStart); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DescriptorHeapsType); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CopyDescriptorsSimple(call_info, object_id, NumDescriptors, DestDescriptorRangeStart, SrcDescriptorRangeStart, DescriptorHeapsType); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_GetResourceAllocationInfo(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT visibleMask; + UINT numResourceDescs; + StructPointerDecoder pResourceDescs; + Decoded_D3D12_RESOURCE_ALLOCATION_INFO return_value; + D3D12_RESOURCE_ALLOCATION_INFO value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &visibleMask); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &numResourceDescs); + bytes_read += pResourceDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_GetResourceAllocationInfo(call_info, object_id, return_value, visibleMask, numResourceDescs, &pResourceDescs); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_GetCustomHeapProperties(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT nodeMask; + D3D12_HEAP_TYPE heapType; + Decoded_D3D12_HEAP_PROPERTIES return_value; + D3D12_HEAP_PROPERTIES value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &nodeMask); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &heapType); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_GetCustomHeapProperties(call_info, object_id, return_value, nodeMask, heapType); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateCommittedResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pHeapProperties; + D3D12_HEAP_FLAGS HeapFlags; + StructPointerDecoder pDesc; + D3D12_RESOURCE_STATES InitialResourceState; + StructPointerDecoder pOptimizedClearValue; + Decoded_GUID riidResource; + GUID value_riidResource; + riidResource.decoded_value = &value_riidResource; + HandlePointerDecoder ppvResource; + HRESULT return_value; + + bytes_read += pHeapProperties.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HeapFlags); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialResourceState); + bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riidResource); + bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateCommittedResource(call_info, object_id, return_value, &pHeapProperties, HeapFlags, &pDesc, InitialResourceState, &pOptimizedClearValue, riidResource, &ppvResource); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateHeap(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvHeap; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvHeap.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateHeap(call_info, object_id, return_value, &pDesc, riid, &ppvHeap); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreatePlacedResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pHeap; + UINT64 HeapOffset; + StructPointerDecoder pDesc; + D3D12_RESOURCE_STATES InitialState; + StructPointerDecoder pOptimizedClearValue; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvResource; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pHeap); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HeapOffset); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialState); + bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreatePlacedResource(call_info, object_id, return_value, pHeap, HeapOffset, &pDesc, InitialState, &pOptimizedClearValue, riid, &ppvResource); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateReservedResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + D3D12_RESOURCE_STATES InitialState; + StructPointerDecoder pOptimizedClearValue; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvResource; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialState); + bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateReservedResource(call_info, object_id, return_value, &pDesc, InitialState, &pOptimizedClearValue, riid, &ppvResource); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateSharedHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pObject; + StructPointerDecoder pAttributes; + DWORD Access; + WStringDecoder Name; + PointerDecoder pHandle; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pObject); + bytes_read += pAttributes.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Access); + bytes_read += Name.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateSharedHandle(call_info, object_id, return_value, pObject, &pAttributes, Access, &Name, &pHandle); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_OpenSharedHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t NTHandle; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvObj; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NTHandle); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvObj.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_OpenSharedHandle(call_info, object_id, return_value, NTHandle, riid, &ppvObj); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_OpenSharedHandleByName(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + WStringDecoder Name; + DWORD Access; + PointerDecoder pNTHandle; + HRESULT return_value; + + bytes_read += Name.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Access); + bytes_read += pNTHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_OpenSharedHandleByName(call_info, object_id, return_value, &Name, Access, &pNTHandle); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_MakeResident(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumObjects; + HandlePointerDecoder ppObjects; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumObjects); + bytes_read += ppObjects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_MakeResident(call_info, object_id, return_value, NumObjects, &ppObjects); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_Evict(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumObjects; + HandlePointerDecoder ppObjects; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumObjects); + bytes_read += ppObjects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_Evict(call_info, object_id, return_value, NumObjects, &ppObjects); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateFence(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT64 InitialValue; + D3D12_FENCE_FLAGS Flags; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppFence; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialValue); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppFence.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateFence(call_info, object_id, return_value, InitialValue, Flags, riid, &ppFence); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_GetDeviceRemovedReason(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_GetDeviceRemovedReason(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_GetCopyableFootprints(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pResourceDesc; + UINT FirstSubresource; + UINT NumSubresources; + UINT64 BaseOffset; + StructPointerDecoder pLayouts; + PointerDecoder pNumRows; + PointerDecoder pRowSizeInBytes; + PointerDecoder pTotalBytes; + + bytes_read += pResourceDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FirstSubresource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSubresources); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BaseOffset); + bytes_read += pLayouts.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumRows.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pRowSizeInBytes.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pTotalBytes.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_GetCopyableFootprints(call_info, object_id, &pResourceDesc, FirstSubresource, NumSubresources, BaseOffset, &pLayouts, &pNumRows, &pRowSizeInBytes, &pTotalBytes); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateQueryHeap(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvHeap; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvHeap.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateQueryHeap(call_info, object_id, return_value, &pDesc, riid, &ppvHeap); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_SetStablePowerState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + BOOL Enable; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_SetStablePowerState(call_info, object_id, return_value, Enable); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_CreateCommandSignature(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + format::HandleId pRootSignature; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvCommandSignature; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRootSignature); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvCommandSignature.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_CreateCommandSignature(call_info, object_id, return_value, &pDesc, pRootSignature, riid, &ppvCommandSignature); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_GetResourceTiling(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pTiledResource; + PointerDecoder pNumTilesForEntireResource; + StructPointerDecoder pPackedMipDesc; + StructPointerDecoder pStandardTileShapeForNonPackedMips; + PointerDecoder pNumSubresourceTilings; + UINT FirstSubresourceTilingToGet; + StructPointerDecoder pSubresourceTilingsForNonPackedMips; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTiledResource); + bytes_read += pNumTilesForEntireResource.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pPackedMipDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pStandardTileShapeForNonPackedMips.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumSubresourceTilings.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FirstSubresourceTilingToGet); + bytes_read += pSubresourceTilingsForNonPackedMips.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_GetResourceTiling(call_info, object_id, pTiledResource, &pNumTilesForEntireResource, &pPackedMipDesc, &pStandardTileShapeForNonPackedMips, &pNumSubresourceTilings, FirstSubresourceTilingToGet, &pSubresourceTilingsForNonPackedMips); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device_GetAdapterLuid(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_LUID return_value; + LUID value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device_GetAdapterLuid(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12PipelineLibrary_StorePipeline(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + WStringDecoder pName; + format::HandleId pPipeline; + HRESULT return_value; + + bytes_read += pName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pPipeline); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12PipelineLibrary_StorePipeline(call_info, object_id, return_value, &pName, pPipeline); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12PipelineLibrary_LoadGraphicsPipeline(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + WStringDecoder pName; + StructPointerDecoder pDesc; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppPipelineState; + HRESULT return_value; + + bytes_read += pName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppPipelineState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12PipelineLibrary_LoadGraphicsPipeline(call_info, object_id, return_value, &pName, &pDesc, riid, &ppPipelineState); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12PipelineLibrary_LoadComputePipeline(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + WStringDecoder pName; + StructPointerDecoder pDesc; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppPipelineState; + HRESULT return_value; + + bytes_read += pName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppPipelineState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12PipelineLibrary_LoadComputePipeline(call_info, object_id, return_value, &pName, &pDesc, riid, &ppPipelineState); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12PipelineLibrary_GetSerializedSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + SIZE_T return_value; + + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12PipelineLibrary_GetSerializedSize(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12PipelineLibrary_Serialize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pData; + SIZE_T DataSizeInBytes; + HRESULT return_value; + + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSizeInBytes); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12PipelineLibrary_Serialize(call_info, object_id, return_value, &pData, DataSizeInBytes); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12PipelineLibrary1_LoadPipeline(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + WStringDecoder pName; + StructPointerDecoder pDesc; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppPipelineState; + HRESULT return_value; + + bytes_read += pName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppPipelineState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12PipelineLibrary1_LoadPipeline(call_info, object_id, return_value, &pName, &pDesc, riid, &ppPipelineState); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device1_CreatePipelineLibrary(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pLibraryBlob; + SIZE_T BlobLength; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppPipelineLibrary; + HRESULT return_value; + + bytes_read += pLibraryBlob.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BlobLength); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppPipelineLibrary.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device1_CreatePipelineLibrary(call_info, object_id, return_value, &pLibraryBlob, BlobLength, riid, &ppPipelineLibrary); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device1_SetEventOnMultipleFenceCompletion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HandlePointerDecoder ppFences; + PointerDecoder pFenceValues; + UINT NumFences; + D3D12_MULTIPLE_FENCE_WAIT_FLAGS Flags; + uint64_t hEvent; + HRESULT return_value; + + bytes_read += ppFences.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFenceValues.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumFences); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device1_SetEventOnMultipleFenceCompletion(call_info, object_id, return_value, &ppFences, &pFenceValues, NumFences, Flags, hEvent); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device1_SetResidencyPriority(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumObjects; + HandlePointerDecoder ppObjects; + PointerDecoder pPriorities; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumObjects); + bytes_read += ppObjects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pPriorities.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device1_SetResidencyPriority(call_info, object_id, return_value, NumObjects, &ppObjects, &pPriorities); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device2_CreatePipelineState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppPipelineState; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppPipelineState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device2_CreatePipelineState(call_info, object_id, return_value, &pDesc, riid, &ppPipelineState); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device3_OpenExistingHeapFromAddress(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t pAddress; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvHeap; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pAddress); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvHeap.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device3_OpenExistingHeapFromAddress(call_info, object_id, return_value, pAddress, riid, &ppvHeap); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device3_OpenExistingHeapFromFileMapping(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + uint64_t hFileMapping; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvHeap; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hFileMapping); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvHeap.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device3_OpenExistingHeapFromFileMapping(call_info, object_id, return_value, hFileMapping, riid, &ppvHeap); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device3_EnqueueMakeResident(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_RESIDENCY_FLAGS Flags; + UINT NumObjects; + HandlePointerDecoder ppObjects; + format::HandleId pFenceToSignal; + UINT64 FenceValueToSignal; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumObjects); + bytes_read += ppObjects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pFenceToSignal); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FenceValueToSignal); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device3_EnqueueMakeResident(call_info, object_id, return_value, Flags, NumObjects, &ppObjects, pFenceToSignal, FenceValueToSignal); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12ProtectedSession_GetStatusFence(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppFence; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppFence.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12ProtectedSession_GetStatusFence(call_info, object_id, return_value, riid, &ppFence); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12ProtectedSession_GetSessionStatus(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_PROTECTED_SESSION_STATUS return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12ProtectedSession_GetSessionStatus(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12ProtectedResourceSession_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_D3D12_PROTECTED_RESOURCE_SESSION_DESC return_value; + D3D12_PROTECTED_RESOURCE_SESSION_DESC value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12ProtectedResourceSession_GetDesc(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device4_CreateCommandList1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT nodeMask; + D3D12_COMMAND_LIST_TYPE type; + D3D12_COMMAND_LIST_FLAGS flags; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppCommandList; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &nodeMask); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &type); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &flags); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppCommandList.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device4_CreateCommandList1(call_info, object_id, return_value, nodeMask, type, flags, riid, &ppCommandList); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device4_CreateProtectedResourceSession(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppSession; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppSession.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device4_CreateProtectedResourceSession(call_info, object_id, return_value, &pDesc, riid, &ppSession); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device4_CreateCommittedResource1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pHeapProperties; + D3D12_HEAP_FLAGS HeapFlags; + StructPointerDecoder pDesc; + D3D12_RESOURCE_STATES InitialResourceState; + StructPointerDecoder pOptimizedClearValue; + format::HandleId pProtectedSession; + Decoded_GUID riidResource; + GUID value_riidResource; + riidResource.decoded_value = &value_riidResource; + HandlePointerDecoder ppvResource; + HRESULT return_value; + + bytes_read += pHeapProperties.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HeapFlags); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialResourceState); + bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pProtectedSession); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riidResource); + bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device4_CreateCommittedResource1(call_info, object_id, return_value, &pHeapProperties, HeapFlags, &pDesc, InitialResourceState, &pOptimizedClearValue, pProtectedSession, riidResource, &ppvResource); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device4_CreateHeap1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + format::HandleId pProtectedSession; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvHeap; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pProtectedSession); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvHeap.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device4_CreateHeap1(call_info, object_id, return_value, &pDesc, pProtectedSession, riid, &ppvHeap); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device4_CreateReservedResource1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + D3D12_RESOURCE_STATES InitialState; + StructPointerDecoder pOptimizedClearValue; + format::HandleId pProtectedSession; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvResource; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialState); + bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pProtectedSession); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device4_CreateReservedResource1(call_info, object_id, return_value, &pDesc, InitialState, &pOptimizedClearValue, pProtectedSession, riid, &ppvResource); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device4_GetResourceAllocationInfo1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT visibleMask; + UINT numResourceDescs; + StructPointerDecoder pResourceDescs; + StructPointerDecoder pResourceAllocationInfo1; + Decoded_D3D12_RESOURCE_ALLOCATION_INFO return_value; + D3D12_RESOURCE_ALLOCATION_INFO value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &visibleMask); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &numResourceDescs); + bytes_read += pResourceDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pResourceAllocationInfo1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device4_GetResourceAllocationInfo1(call_info, object_id, return_value, visibleMask, numResourceDescs, &pResourceDescs, &pResourceAllocationInfo1); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12LifetimeOwner_LifetimeStateUpdated(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_LIFETIME_STATE NewState; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NewState); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12LifetimeOwner_LifetimeStateUpdated(call_info, object_id, NewState); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12SwapChainAssistant_GetLUID(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_LUID return_value; + LUID value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12SwapChainAssistant_GetLUID(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12SwapChainAssistant_GetSwapChainObject(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppv; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppv.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12SwapChainAssistant_GetSwapChainObject(call_info, object_id, return_value, riid, &ppv); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12SwapChainAssistant_GetCurrentResourceAndCommandQueue(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID riidResource; + GUID value_riidResource; + riidResource.decoded_value = &value_riidResource; + HandlePointerDecoder ppvResource; + Decoded_GUID riidQueue; + GUID value_riidQueue; + riidQueue.decoded_value = &value_riidQueue; + HandlePointerDecoder ppvQueue; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riidResource); + bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riidQueue); + bytes_read += ppvQueue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12SwapChainAssistant_GetCurrentResourceAndCommandQueue(call_info, object_id, return_value, riidResource, &ppvResource, riidQueue, &ppvQueue); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12SwapChainAssistant_InsertImplicitSync(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12SwapChainAssistant_InsertImplicitSync(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12LifetimeTracker_DestroyOwnedObject(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pObject; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pObject); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12LifetimeTracker_DestroyOwnedObject(call_info, object_id, return_value, pObject); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12StateObjectProperties_GetShaderIdentifier(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + WStringDecoder pExportName; + PointerDecoder return_value; + + bytes_read += pExportName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += return_value.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12StateObjectProperties_GetShaderIdentifier(call_info, object_id, &return_value, &pExportName); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12StateObjectProperties_GetShaderStackSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + WStringDecoder pExportName; + UINT64 return_value; + + bytes_read += pExportName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12StateObjectProperties_GetShaderStackSize(call_info, object_id, return_value, &pExportName); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12StateObjectProperties_GetPipelineStackSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT64 return_value; + + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12StateObjectProperties_GetPipelineStackSize(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12StateObjectProperties_SetPipelineStackSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT64 PipelineStackSizeInBytes; + + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &PipelineStackSizeInBytes); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12StateObjectProperties_SetPipelineStackSize(call_info, object_id, PipelineStackSizeInBytes); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device5_CreateLifetimeTracker(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pOwner; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvTracker; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pOwner); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvTracker.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device5_CreateLifetimeTracker(call_info, object_id, return_value, pOwner, riid, &ppvTracker); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device5_RemoveDevice(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device5_RemoveDevice(call_info, object_id); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device5_EnumerateMetaCommands(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pNumMetaCommands; + StructPointerDecoder pDescs; + HRESULT return_value; + + bytes_read += pNumMetaCommands.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device5_EnumerateMetaCommands(call_info, object_id, return_value, &pNumMetaCommands, &pDescs); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device5_EnumerateMetaCommandParameters(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID CommandId; + GUID value_CommandId; + CommandId.decoded_value = &value_CommandId; + D3D12_META_COMMAND_PARAMETER_STAGE Stage; + PointerDecoder pTotalStructureSizeInBytes; + PointerDecoder pParameterCount; + StructPointerDecoder pParameterDescs; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CommandId); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Stage); + bytes_read += pTotalStructureSizeInBytes.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pParameterCount.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pParameterDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device5_EnumerateMetaCommandParameters(call_info, object_id, return_value, CommandId, Stage, &pTotalStructureSizeInBytes, &pParameterCount, &pParameterDescs); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device5_CreateMetaCommand(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID CommandId; + GUID value_CommandId; + CommandId.decoded_value = &value_CommandId; + UINT NodeMask; + PointerDecoder pCreationParametersData; + SIZE_T CreationParametersDataSizeInBytes; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppMetaCommand; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CommandId); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NodeMask); + bytes_read += pCreationParametersData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CreationParametersDataSizeInBytes); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppMetaCommand.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device5_CreateMetaCommand(call_info, object_id, return_value, CommandId, NodeMask, &pCreationParametersData, CreationParametersDataSizeInBytes, riid, &ppMetaCommand); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device5_CreateStateObject(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppStateObject; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppStateObject.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device5_CreateStateObject(call_info, object_id, return_value, &pDesc, riid, &ppStateObject); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device5_GetRaytracingAccelerationStructurePrebuildInfo(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + StructPointerDecoder pInfo; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pInfo.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device5_GetRaytracingAccelerationStructurePrebuildInfo(call_info, object_id, &pDesc, &pInfo); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device5_CheckDriverMatchingIdentifier(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_SERIALIZED_DATA_TYPE SerializedDataType; + StructPointerDecoder pIdentifierToCheck; + D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SerializedDataType); + bytes_read += pIdentifierToCheck.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device5_CheckDriverMatchingIdentifier(call_info, object_id, return_value, SerializedDataType, &pIdentifierToCheck); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedDataSettings_SetAutoBreadcrumbsEnablement(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_DRED_ENABLEMENT Enablement; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enablement); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceRemovedExtendedDataSettings_SetAutoBreadcrumbsEnablement(call_info, object_id, Enablement); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedDataSettings_SetPageFaultEnablement(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_DRED_ENABLEMENT Enablement; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enablement); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceRemovedExtendedDataSettings_SetPageFaultEnablement(call_info, object_id, Enablement); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedDataSettings_SetWatsonDumpEnablement(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_DRED_ENABLEMENT Enablement; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enablement); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceRemovedExtendedDataSettings_SetWatsonDumpEnablement(call_info, object_id, Enablement); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedDataSettings1_SetBreadcrumbContextEnablement(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_DRED_ENABLEMENT Enablement; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enablement); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceRemovedExtendedDataSettings1_SetBreadcrumbContextEnablement(call_info, object_id, Enablement); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedDataSettings2_UseMarkersOnlyAutoBreadcrumbs(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + BOOL MarkersOnly; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MarkersOnly); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceRemovedExtendedDataSettings2_UseMarkersOnlyAutoBreadcrumbs(call_info, object_id, MarkersOnly); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedData_GetAutoBreadcrumbsOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pOutput; + HRESULT return_value; + + bytes_read += pOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceRemovedExtendedData_GetAutoBreadcrumbsOutput(call_info, object_id, return_value, &pOutput); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedData_GetPageFaultAllocationOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pOutput; + HRESULT return_value; + + bytes_read += pOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceRemovedExtendedData_GetPageFaultAllocationOutput(call_info, object_id, return_value, &pOutput); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedData1_GetAutoBreadcrumbsOutput1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pOutput; + HRESULT return_value; + + bytes_read += pOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceRemovedExtendedData1_GetAutoBreadcrumbsOutput1(call_info, object_id, return_value, &pOutput); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedData1_GetPageFaultAllocationOutput1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pOutput; + HRESULT return_value; + + bytes_read += pOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceRemovedExtendedData1_GetPageFaultAllocationOutput1(call_info, object_id, return_value, &pOutput); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedData2_GetPageFaultAllocationOutput2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pOutput; + HRESULT return_value; + + bytes_read += pOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceRemovedExtendedData2_GetPageFaultAllocationOutput2(call_info, object_id, return_value, &pOutput); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedData2_GetDeviceState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_DRED_DEVICE_STATE return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceRemovedExtendedData2_GetDeviceState(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device6_SetBackgroundProcessingMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_BACKGROUND_PROCESSING_MODE Mode; + D3D12_MEASUREMENTS_ACTION MeasurementsAction; + uint64_t hEventToSignalUponCompletion; + PointerDecoder pbFurtherMeasurementsDesired; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Mode); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MeasurementsAction); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEventToSignalUponCompletion); + bytes_read += pbFurtherMeasurementsDesired.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device6_SetBackgroundProcessingMode(call_info, object_id, return_value, Mode, MeasurementsAction, hEventToSignalUponCompletion, &pbFurtherMeasurementsDesired); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12ProtectedResourceSession1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_D3D12_PROTECTED_RESOURCE_SESSION_DESC1 return_value; + D3D12_PROTECTED_RESOURCE_SESSION_DESC1 value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12ProtectedResourceSession1_GetDesc1(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device7_AddToStateObject(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pAddition; + format::HandleId pStateObjectToGrowFrom; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppNewStateObject; + HRESULT return_value; + + bytes_read += pAddition.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pStateObjectToGrowFrom); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppNewStateObject.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device7_AddToStateObject(call_info, object_id, return_value, &pAddition, pStateObjectToGrowFrom, riid, &ppNewStateObject); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device7_CreateProtectedResourceSession1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppSession; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppSession.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device7_CreateProtectedResourceSession1(call_info, object_id, return_value, &pDesc, riid, &ppSession); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device8_GetResourceAllocationInfo2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT visibleMask; + UINT numResourceDescs; + StructPointerDecoder pResourceDescs; + StructPointerDecoder pResourceAllocationInfo1; + Decoded_D3D12_RESOURCE_ALLOCATION_INFO return_value; + D3D12_RESOURCE_ALLOCATION_INFO value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &visibleMask); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &numResourceDescs); + bytes_read += pResourceDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pResourceAllocationInfo1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device8_GetResourceAllocationInfo2(call_info, object_id, return_value, visibleMask, numResourceDescs, &pResourceDescs, &pResourceAllocationInfo1); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device8_CreateCommittedResource2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pHeapProperties; + D3D12_HEAP_FLAGS HeapFlags; + StructPointerDecoder pDesc; + D3D12_RESOURCE_STATES InitialResourceState; + StructPointerDecoder pOptimizedClearValue; + format::HandleId pProtectedSession; + Decoded_GUID riidResource; + GUID value_riidResource; + riidResource.decoded_value = &value_riidResource; + HandlePointerDecoder ppvResource; + HRESULT return_value; + + bytes_read += pHeapProperties.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HeapFlags); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialResourceState); + bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pProtectedSession); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riidResource); + bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device8_CreateCommittedResource2(call_info, object_id, return_value, &pHeapProperties, HeapFlags, &pDesc, InitialResourceState, &pOptimizedClearValue, pProtectedSession, riidResource, &ppvResource); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device8_CreatePlacedResource1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pHeap; + UINT64 HeapOffset; + StructPointerDecoder pDesc; + D3D12_RESOURCE_STATES InitialState; + StructPointerDecoder pOptimizedClearValue; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvResource; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pHeap); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HeapOffset); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialState); + bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device8_CreatePlacedResource1(call_info, object_id, return_value, pHeap, HeapOffset, &pDesc, InitialState, &pOptimizedClearValue, riid, &ppvResource); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device8_CreateSamplerFeedbackUnorderedAccessView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pTargetedResource; + format::HandleId pFeedbackResource; + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; + D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; + DestDescriptor.decoded_value = &value_DestDescriptor; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTargetedResource); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pFeedbackResource); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device8_CreateSamplerFeedbackUnorderedAccessView(call_info, object_id, pTargetedResource, pFeedbackResource, DestDescriptor); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device8_GetCopyableFootprints1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pResourceDesc; + UINT FirstSubresource; + UINT NumSubresources; + UINT64 BaseOffset; + StructPointerDecoder pLayouts; + PointerDecoder pNumRows; + PointerDecoder pRowSizeInBytes; + PointerDecoder pTotalBytes; + + bytes_read += pResourceDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FirstSubresource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSubresources); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BaseOffset); + bytes_read += pLayouts.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumRows.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pRowSizeInBytes.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pTotalBytes.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device8_GetCopyableFootprints1(call_info, object_id, &pResourceDesc, FirstSubresource, NumSubresources, BaseOffset, &pLayouts, &pNumRows, &pRowSizeInBytes, &pTotalBytes); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Resource1_GetProtectedResourceSession(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppProtectedSession; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppProtectedSession.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Resource1_GetProtectedResourceSession(call_info, object_id, return_value, riid, &ppProtectedSession); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Resource2_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_D3D12_RESOURCE_DESC1 return_value; + D3D12_RESOURCE_DESC1 value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Resource2_GetDesc1(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Heap1_GetProtectedResourceSession(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppProtectedSession; + HRESULT return_value; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppProtectedSession.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Heap1_GetProtectedResourceSession(call_info, object_id, return_value, riid, &ppProtectedSession); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList3_SetProtectedResourceSession(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pProtectedResourceSession; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pProtectedResourceSession); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList3_SetProtectedResourceSession(call_info, object_id, pProtectedResourceSession); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12MetaCommand_GetRequiredParameterResourceSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_META_COMMAND_PARAMETER_STAGE Stage; + UINT ParameterIndex; + UINT64 return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Stage); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ParameterIndex); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12MetaCommand_GetRequiredParameterResourceSize(call_info, object_id, return_value, Stage, ParameterIndex); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_BeginRenderPass(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumRenderTargets; + StructPointerDecoder pRenderTargets; + StructPointerDecoder pDepthStencil; + D3D12_RENDER_PASS_FLAGS Flags; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRenderTargets); + bytes_read += pRenderTargets.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDepthStencil.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList4_BeginRenderPass(call_info, object_id, NumRenderTargets, &pRenderTargets, &pDepthStencil, Flags); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_EndRenderPass(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList4_EndRenderPass(call_info, object_id); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_InitializeMetaCommand(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pMetaCommand; + PointerDecoder pInitializationParametersData; + SIZE_T InitializationParametersDataSizeInBytes; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pMetaCommand); + bytes_read += pInitializationParametersData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitializationParametersDataSizeInBytes); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList4_InitializeMetaCommand(call_info, object_id, pMetaCommand, &pInitializationParametersData, InitializationParametersDataSizeInBytes); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_ExecuteMetaCommand(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pMetaCommand; + PointerDecoder pExecutionParametersData; + SIZE_T ExecutionParametersDataSizeInBytes; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pMetaCommand); + bytes_read += pExecutionParametersData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ExecutionParametersDataSizeInBytes); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList4_ExecuteMetaCommand(call_info, object_id, pMetaCommand, &pExecutionParametersData, ExecutionParametersDataSizeInBytes); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_BuildRaytracingAccelerationStructure(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + UINT NumPostbuildInfoDescs; + StructPointerDecoder pPostbuildInfoDescs; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumPostbuildInfoDescs); + bytes_read += pPostbuildInfoDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList4_BuildRaytracingAccelerationStructure(call_info, object_id, &pDesc, NumPostbuildInfoDescs, &pPostbuildInfoDescs); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_EmitRaytracingAccelerationStructurePostbuildInfo(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + UINT NumSourceAccelerationStructures; + PointerDecoder pSourceAccelerationStructureData; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSourceAccelerationStructures); + bytes_read += pSourceAccelerationStructureData.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList4_EmitRaytracingAccelerationStructurePostbuildInfo(call_info, object_id, &pDesc, NumSourceAccelerationStructures, &pSourceAccelerationStructureData); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_CopyRaytracingAccelerationStructure(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_GPU_VIRTUAL_ADDRESS DestAccelerationStructureData; + D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData; + D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE Mode; + + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestAccelerationStructureData); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SourceAccelerationStructureData); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Mode); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList4_CopyRaytracingAccelerationStructure(call_info, object_id, DestAccelerationStructureData, SourceAccelerationStructureData, Mode); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_SetPipelineState1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pStateObject; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pStateObject); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList4_SetPipelineState1(call_info, object_id, pStateObject); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_DispatchRays(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12GraphicsCommandList4_DispatchRays(call_info, object_id, &pDesc); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12ShaderCacheSession_FindValue(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pKey; + UINT KeySize; + PointerDecoder pValue; + PointerDecoder pValueSize; + HRESULT return_value; + + bytes_read += pKey.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &KeySize); + bytes_read += pValue.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pValueSize.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12ShaderCacheSession_FindValue(call_info, object_id, return_value, &pKey, KeySize, &pValue, &pValueSize); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12ShaderCacheSession_StoreValue(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pKey; + UINT KeySize; + PointerDecoder pValue; + UINT ValueSize; + HRESULT return_value; + + bytes_read += pKey.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &KeySize); + bytes_read += pValue.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ValueSize); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12ShaderCacheSession_StoreValue(call_info, object_id, return_value, &pKey, KeySize, &pValue, ValueSize); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12ShaderCacheSession_SetDeleteOnDestroy(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12ShaderCacheSession_SetDeleteOnDestroy(call_info, object_id); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12ShaderCacheSession_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_D3D12_SHADER_CACHE_SESSION_DESC return_value; + D3D12_SHADER_CACHE_SESSION_DESC value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12ShaderCacheSession_GetDesc(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device9_CreateShaderCacheSession(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvSession; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvSession.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device9_CreateShaderCacheSession(call_info, object_id, return_value, &pDesc, riid, &ppvSession); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device9_ShaderCacheControl(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + D3D12_SHADER_CACHE_KIND_FLAGS Kinds; + D3D12_SHADER_CACHE_CONTROL_FLAGS Control; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Kinds); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Control); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device9_ShaderCacheControl(call_info, object_id, return_value, Kinds, Control); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device9_CreateCommandQueue1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + Decoded_GUID CreatorID; + GUID value_CreatorID; + CreatorID.decoded_value = &value_CreatorID; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppCommandQueue; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CreatorID); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppCommandQueue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device9_CreateCommandQueue1(call_info, object_id, return_value, &pDesc, CreatorID, riid, &ppCommandQueue); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device10_CreateCommittedResource3(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pHeapProperties; + D3D12_HEAP_FLAGS HeapFlags; + StructPointerDecoder pDesc; + D3D12_BARRIER_LAYOUT InitialLayout; + StructPointerDecoder pOptimizedClearValue; + format::HandleId pProtectedSession; + UINT32 NumCastableFormats; + PointerDecoder pCastableFormats; + Decoded_GUID riidResource; + GUID value_riidResource; + riidResource.decoded_value = &value_riidResource; + HandlePointerDecoder ppvResource; + HRESULT return_value; + + bytes_read += pHeapProperties.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HeapFlags); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialLayout); + bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pProtectedSession); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumCastableFormats); + bytes_read += pCastableFormats.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riidResource); + bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device10_CreateCommittedResource3(call_info, object_id, return_value, &pHeapProperties, HeapFlags, &pDesc, InitialLayout, &pOptimizedClearValue, pProtectedSession, NumCastableFormats, &pCastableFormats, riidResource, &ppvResource); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device10_CreatePlacedResource2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pHeap; + UINT64 HeapOffset; + StructPointerDecoder pDesc; + D3D12_BARRIER_LAYOUT InitialLayout; + StructPointerDecoder pOptimizedClearValue; + UINT32 NumCastableFormats; + PointerDecoder pCastableFormats; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvResource; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pHeap); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HeapOffset); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialLayout); + bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumCastableFormats); + bytes_read += pCastableFormats.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device10_CreatePlacedResource2(call_info, object_id, return_value, pHeap, HeapOffset, &pDesc, InitialLayout, &pOptimizedClearValue, NumCastableFormats, &pCastableFormats, riid, &ppvResource); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device10_CreateReservedResource2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + D3D12_BARRIER_LAYOUT InitialLayout; + StructPointerDecoder pOptimizedClearValue; + format::HandleId pProtectedSession; + UINT32 NumCastableFormats; + PointerDecoder pCastableFormats; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvResource; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialLayout); + bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pProtectedSession); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumCastableFormats); + bytes_read += pCastableFormats.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device10_CreateReservedResource2(call_info, object_id, return_value, &pDesc, InitialLayout, &pOptimizedClearValue, pProtectedSession, NumCastableFormats, &pCastableFormats, riid, &ppvResource); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device11_CreateSampler2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; + D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; + DestDescriptor.decoded_value = &value_DestDescriptor; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device11_CreateSampler2(call_info, object_id, &pDesc, DestDescriptor); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Device12_GetResourceAllocationInfo3(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT visibleMask; + UINT numResourceDescs; + StructPointerDecoder pResourceDescs; + PointerDecoder pNumCastableFormats; + PointerDecoder ppCastableFormats; + StructPointerDecoder pResourceAllocationInfo1; + Decoded_D3D12_RESOURCE_ALLOCATION_INFO return_value; + D3D12_RESOURCE_ALLOCATION_INFO value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &visibleMask); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &numResourceDescs); + bytes_read += pResourceDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumCastableFormats.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppCastableFormats.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pResourceAllocationInfo1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Device12_GetResourceAllocationInfo3(call_info, object_id, return_value, visibleMask, numResourceDescs, &pResourceDescs, &pNumCastableFormats, &ppCastableFormats, &pResourceAllocationInfo1); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12VirtualizationGuestDevice_ShareWithHost(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pObject; + PointerDecoder pHandle; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pObject); + bytes_read += pHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12VirtualizationGuestDevice_ShareWithHost(call_info, object_id, return_value, pObject, &pHandle); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12VirtualizationGuestDevice_CreateFenceFd(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + format::HandleId pFence; + UINT64 FenceValue; + PointerDecoder pFenceFd; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pFence); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FenceValue); + bytes_read += pFenceFd.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12VirtualizationGuestDevice_CreateFenceFd(call_info, object_id, return_value, pFence, FenceValue, &pFenceFd); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Tools_EnableShaderInstrumentation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + BOOL bEnable; + + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &bEnable); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12Tools_EnableShaderInstrumentation(call_info, object_id, bEnable); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12Tools_ShaderInstrumentationEnabled(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + BOOL return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvDebug.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_D3D12GetDebugInterface(call_info, return_value, riid, &ppvDebug); + consumer->Process_ID3D12Tools_ShaderInstrumentationEnabled(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_D3D12EnableExperimentalFeatures(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12SDKConfiguration_SetSDKVersion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumFeatures; - StructPointerDecoder pIIDs; - PointerDecoder pConfigurationStructs; - PointerDecoder pConfigurationStructSizes; + UINT SDKVersion; + StringDecoder SDKPath; HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumFeatures); - bytes_read += pIIDs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pConfigurationStructs.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pConfigurationStructSizes.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SDKVersion); + bytes_read += SDKPath.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_D3D12EnableExperimentalFeatures(call_info, return_value, NumFeatures, &pIIDs, &pConfigurationStructs, &pConfigurationStructSizes); + consumer->Process_ID3D12SDKConfiguration_SetSDKVersion(call_info, object_id, return_value, SDKVersion, &SDKPath); } return bytes_read; } -size_t Dx12Decoder::Decode_D3D12GetInterface(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12SDKConfiguration1_CreateDeviceFactory(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID rclsid; - GUID value_rclsid; - rclsid.decoded_value = &value_rclsid; + UINT SDKVersion; + StringDecoder SDKPath; Decoded_GUID riid; GUID value_riid; riid.decoded_value = &value_riid; - HandlePointerDecoder ppvDebug; + HandlePointerDecoder ppvFactory; HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &rclsid); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SDKVersion); + bytes_read += SDKPath.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvDebug.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppvFactory.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_D3D12GetInterface(call_info, return_value, rclsid, riid, &ppvDebug); + consumer->Process_ID3D12SDKConfiguration1_CreateDeviceFactory(call_info, object_id, return_value, SDKVersion, &SDKPath, riid, &ppvFactory); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIObject_SetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12SDKConfiguration1_FreeUnusedSDKs(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12SDKConfiguration1_FreeUnusedSDKs(call_info, object_id); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceFactory_InitializeFromGlobalState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID Name; - GUID value_Name; - Name.decoded_value = &value_Name; - UINT DataSize; - PointerDecoder pData; HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Name); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIObject_SetPrivateData(call_info, object_id, return_value, Name, DataSize, &pData); + consumer->Process_ID3D12DeviceFactory_InitializeFromGlobalState(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIObject_SetPrivateDataInterface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DeviceFactory_ApplyToGlobalState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID Name; - GUID value_Name; - Name.decoded_value = &value_Name; - format::HandleId pUnknown; HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Name); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pUnknown); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIObject_SetPrivateDataInterface(call_info, object_id, return_value, Name, pUnknown); + consumer->Process_ID3D12DeviceFactory_ApplyToGlobalState(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIObject_GetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DeviceFactory_SetFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID Name; - GUID value_Name; - Name.decoded_value = &value_Name; - PointerDecoder pDataSize; - PointerDecoder pData; + D3D12_DEVICE_FACTORY_FLAGS flags; HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Name); - bytes_read += pDataSize.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &flags); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIObject_GetPrivateData(call_info, object_id, return_value, Name, &pDataSize, &pData); + consumer->Process_ID3D12DeviceFactory_SetFlags(call_info, object_id, return_value, flags); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIObject_GetParent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DeviceFactory_GetFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppParent; + D3D12_DEVICE_FACTORY_FLAGS return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceFactory_GetFlags(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceFactory_GetConfigurationInterface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + Decoded_GUID clsid; + GUID value_clsid; + clsid.decoded_value = &value_clsid; + Decoded_GUID iid; + GUID value_iid; + iid.decoded_value = &value_iid; + HandlePointerDecoder ppv; HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppParent.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &clsid); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &iid); + bytes_read += ppv.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIObject_GetParent(call_info, object_id, return_value, riid, &ppParent); + consumer->Process_ID3D12DeviceFactory_GetConfigurationInterface(call_info, object_id, return_value, clsid, iid, &ppv); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDeviceSubObject_GetDevice(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DeviceFactory_EnableExperimentalFeatures(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT NumFeatures; + StructPointerDecoder pIIDs; + PointerDecoder pConfigurationStructs; + PointerDecoder pConfigurationStructSizes; + HRESULT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumFeatures); + bytes_read += pIIDs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pConfigurationStructs.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pConfigurationStructSizes.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceFactory_EnableExperimentalFeatures(call_info, object_id, return_value, NumFeatures, &pIIDs, &pConfigurationStructs, &pConfigurationStructSizes); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceFactory_CreateDevice(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + format::HandleId adapter; + D3D_FEATURE_LEVEL FeatureLevel; Decoded_GUID riid; GUID value_riid; riid.decoded_value = &value_riid; - HandlePointerDecoder ppDevice; + HandlePointerDecoder ppvDevice; HRESULT return_value; + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &adapter); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FeatureLevel); bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppvDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDeviceSubObject_GetDevice(call_info, object_id, return_value, riid, &ppDevice); + consumer->Process_ID3D12DeviceFactory_CreateDevice(call_info, object_id, return_value, adapter, FeatureLevel, riid, &ppvDevice); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIResource_GetSharedHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DeviceConfiguration_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pSharedHandle; + Decoded_D3D12_DEVICE_CONFIGURATION_DESC return_value; + D3D12_DEVICE_CONFIGURATION_DESC value_returned; + return_value.decoded_value = &value_returned; + + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceConfiguration_GetDesc(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceConfiguration_GetEnabledExperimentalFeatures(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pGuids; + UINT NumGuids; + HRESULT return_value; + + bytes_read += pGuids.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumGuids); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceConfiguration_GetEnabledExperimentalFeatures(call_info, object_id, return_value, &pGuids, NumGuids); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceConfiguration_SerializeVersionedRootSignature(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + StructPointerDecoder pDesc; + HandlePointerDecoder ppResult; + HandlePointerDecoder ppError; + HRESULT return_value; + + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppResult.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppError.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D12DeviceConfiguration_SerializeVersionedRootSignature(call_info, object_id, return_value, &pDesc, &ppResult, &ppError); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D12DeviceConfiguration_CreateVersionedRootSignatureDeserializer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + PointerDecoder pBlob; + SIZE_T Size; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvDeserializer; HRESULT return_value; - bytes_read += pSharedHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pBlob.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvDeserializer.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIResource_GetSharedHandle(call_info, object_id, return_value, &pSharedHandle); + consumer->Process_ID3D12DeviceConfiguration_CreateVersionedRootSignatureDeserializer(call_info, object_id, return_value, &pBlob, Size, riid, &ppvDeserializer); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIResource_GetUsage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList5_RSSetShadingRate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pUsage; - HRESULT return_value; + D3D12_SHADING_RATE baseShadingRate; + PointerDecoder combiners; - bytes_read += pUsage.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &baseShadingRate); + bytes_read += combiners.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIResource_GetUsage(call_info, object_id, return_value, &pUsage); + consumer->Process_ID3D12GraphicsCommandList5_RSSetShadingRate(call_info, object_id, baseShadingRate, &combiners); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIResource_SetEvictionPriority(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList5_RSSetShadingRateImage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT EvictionPriority; - HRESULT return_value; + format::HandleId shadingRateImage; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &EvictionPriority); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &shadingRateImage); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIResource_SetEvictionPriority(call_info, object_id, return_value, EvictionPriority); + consumer->Process_ID3D12GraphicsCommandList5_RSSetShadingRateImage(call_info, object_id, shadingRateImage); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIResource_GetEvictionPriority(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList6_DispatchMesh(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pEvictionPriority; - HRESULT return_value; + UINT ThreadGroupCountX; + UINT ThreadGroupCountY; + UINT ThreadGroupCountZ; - bytes_read += pEvictionPriority.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountX); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountY); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountZ); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIResource_GetEvictionPriority(call_info, object_id, return_value, &pEvictionPriority); + consumer->Process_ID3D12GraphicsCommandList6_DispatchMesh(call_info, object_id, ThreadGroupCountX, ThreadGroupCountY, ThreadGroupCountZ); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIKeyedMutex_AcquireSync(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList7_Barrier(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 Key; - DWORD dwMilliseconds; - HRESULT return_value; + UINT32 NumBarrierGroups; + StructPointerDecoder pBarrierGroups; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Key); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwMilliseconds); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBarrierGroups); + bytes_read += pBarrierGroups.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIKeyedMutex_AcquireSync(call_info, object_id, return_value, Key, dwMilliseconds); + consumer->Process_ID3D12GraphicsCommandList7_Barrier(call_info, object_id, NumBarrierGroups, &pBarrierGroups); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIKeyedMutex_ReleaseSync(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList8_OMSetFrontAndBackStencilRef(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 Key; - HRESULT return_value; + UINT FrontStencilRef; + UINT BackStencilRef; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Key); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FrontStencilRef); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BackStencilRef); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIKeyedMutex_ReleaseSync(call_info, object_id, return_value, Key); + consumer->Process_ID3D12GraphicsCommandList8_OMSetFrontAndBackStencilRef(call_info, object_id, FrontStencilRef, BackStencilRef); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISurface_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList9_RSSetDepthBias(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - HRESULT return_value; + FLOAT DepthBias; + FLOAT DepthBiasClamp; + FLOAT SlopeScaledDepthBias; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DepthBias); + bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DepthBiasClamp); + bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SlopeScaledDepthBias); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISurface_GetDesc(call_info, object_id, return_value, &pDesc); + consumer->Process_ID3D12GraphicsCommandList9_RSSetDepthBias(call_info, object_id, DepthBias, DepthBiasClamp, SlopeScaledDepthBias); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISurface_Map(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList9_IASetIndexBufferStripCutValue(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pLockedRect; - UINT MapFlags; - HRESULT return_value; + D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue; - bytes_read += pLockedRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MapFlags); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &IBStripCutValue); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISurface_Map(call_info, object_id, return_value, &pLockedRect, MapFlags); + consumer->Process_ID3D12GraphicsCommandList9_IASetIndexBufferStripCutValue(call_info, object_id, IBStripCutValue); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISurface_Unmap(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DSRDeviceFactory_CreateDSRDevice(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + format::HandleId pD3D12Device; + UINT NodeMask; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvDSRDevice; HRESULT return_value; + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pD3D12Device); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NodeMask); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvDSRDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISurface_Unmap(call_info, object_id, return_value); + consumer->Process_ID3D12DSRDeviceFactory_CreateDSRDevice(call_info, object_id, return_value, pD3D12Device, NodeMask, riid, &ppvDSRDevice); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISurface1_GetDC(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D10Blob_GetBufferPointer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL Discard; - PointerDecoder phdc; - HRESULT return_value; + uint64_t return_value; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Discard); - bytes_read += phdc.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISurface1_GetDC(call_info, object_id, return_value, Discard, &phdc); + consumer->Process_ID3D10Blob_GetBufferPointer(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISurface1_ReleaseDC(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D10Blob_GetBufferSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDirtyRect; - HRESULT return_value; + SIZE_T return_value; - bytes_read += pDirtyRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISurface1_ReleaseDC(call_info, object_id, return_value, &pDirtyRect); + consumer->Process_ID3D10Blob_GetBufferSize(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIAdapter_EnumOutputs(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3DDestructionNotifier_RegisterDestructionCallback(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Output; - HandlePointerDecoder ppOutput; + uint64_t callbackFn; + uint64_t pData; + PointerDecoder pCallbackID; HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Output); - bytes_read += ppOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &callbackFn); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pData); + bytes_read += pCallbackID.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIAdapter_EnumOutputs(call_info, object_id, return_value, Output, &ppOutput); + consumer->Process_ID3DDestructionNotifier_RegisterDestructionCallback(call_info, object_id, return_value, callbackFn, pData, &pCallbackID); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIAdapter_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3DDestructionNotifier_UnregisterDestructionCallback(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; + UINT callbackID; HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &callbackID); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIAdapter_GetDesc(call_info, object_id, return_value, &pDesc); + consumer->Process_ID3DDestructionNotifier_UnregisterDestructionCallback(call_info, object_id, return_value, callbackID); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIAdapter_CheckInterfaceSupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12Debug_EnableDebugLayer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID InterfaceName; - GUID value_InterfaceName; - InterfaceName.decoded_value = &value_InterfaceName; - StructPointerDecoder pUMDVersion; - HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InterfaceName); - bytes_read += pUMDVersion.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIAdapter_CheckInterfaceSupport(call_info, object_id, return_value, InterfaceName, &pUMDVersion); + consumer->Process_ID3D12Debug_EnableDebugLayer(call_info, object_id); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12Debug1_EnableDebugLayer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput_GetDesc(call_info, object_id, return_value, &pDesc); + consumer->Process_ID3D12Debug1_EnableDebugLayer(call_info, object_id); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput_GetDisplayModeList(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12Debug1_SetEnableGPUBasedValidation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DXGI_FORMAT EnumFormat; - UINT Flags; - PointerDecoder pNumModes; - StructPointerDecoder pDesc; - HRESULT return_value; + BOOL Enable; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &EnumFormat); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); - bytes_read += pNumModes.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput_GetDisplayModeList(call_info, object_id, return_value, EnumFormat, Flags, &pNumModes, &pDesc); + consumer->Process_ID3D12Debug1_SetEnableGPUBasedValidation(call_info, object_id, Enable); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput_FindClosestMatchingMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12Debug1_SetEnableSynchronizedCommandQueueValidation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pModeToMatch; - StructPointerDecoder pClosestMatch; - format::HandleId pConcernedDevice; - HRESULT return_value; + BOOL Enable; - bytes_read += pModeToMatch.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pClosestMatch.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pConcernedDevice); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput_FindClosestMatchingMode(call_info, object_id, return_value, &pModeToMatch, &pClosestMatch, pConcernedDevice); + consumer->Process_ID3D12Debug1_SetEnableSynchronizedCommandQueueValidation(call_info, object_id, Enable); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput_WaitForVBlank(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12Debug2_SetGPUBasedValidationFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HRESULT return_value; + D3D12_GPU_BASED_VALIDATION_FLAGS Flags; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput_WaitForVBlank(call_info, object_id, return_value); + consumer->Process_ID3D12Debug2_SetGPUBasedValidationFlags(call_info, object_id, Flags); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput_TakeOwnership(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12Debug3_SetEnableGPUBasedValidation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDevice; - BOOL Exclusive; - HRESULT return_value; + BOOL Enable; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Exclusive); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput_TakeOwnership(call_info, object_id, return_value, pDevice, Exclusive); + consumer->Process_ID3D12Debug3_SetEnableGPUBasedValidation(call_info, object_id, Enable); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput_ReleaseOwnership(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12Debug3_SetEnableSynchronizedCommandQueueValidation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + BOOL Enable; + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput_ReleaseOwnership(call_info, object_id); + consumer->Process_ID3D12Debug3_SetEnableSynchronizedCommandQueueValidation(call_info, object_id, Enable); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput_GetGammaControlCapabilities(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12Debug3_SetGPUBasedValidationFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pGammaCaps; - HRESULT return_value; + D3D12_GPU_BASED_VALIDATION_FLAGS Flags; - bytes_read += pGammaCaps.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput_GetGammaControlCapabilities(call_info, object_id, return_value, &pGammaCaps); + consumer->Process_ID3D12Debug3_SetGPUBasedValidationFlags(call_info, object_id, Flags); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput_SetGammaControl(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12Debug4_DisableDebugLayer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pArray; - HRESULT return_value; - bytes_read += pArray.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput_SetGammaControl(call_info, object_id, return_value, &pArray); + consumer->Process_ID3D12Debug4_DisableDebugLayer(call_info, object_id); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput_GetGammaControl(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12Debug5_SetEnableAutoName(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pArray; - HRESULT return_value; + BOOL Enable; - bytes_read += pArray.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput_GetGammaControl(call_info, object_id, return_value, &pArray); + consumer->Process_ID3D12Debug5_SetEnableAutoName(call_info, object_id, Enable); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput_SetDisplaySurface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12Debug6_SetForceLegacyBarrierValidation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pScanoutSurface; - HRESULT return_value; + BOOL Enable; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pScanoutSurface); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput_SetDisplaySurface(call_info, object_id, return_value, pScanoutSurface); + consumer->Process_ID3D12Debug6_SetForceLegacyBarrierValidation(call_info, object_id, Enable); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput_GetDisplaySurfaceData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugDevice1_SetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDestination; + D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type; + PointerDecoder pData; + UINT DataSize; HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDestination); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput_GetDisplaySurfaceData(call_info, object_id, return_value, pDestination); + consumer->Process_ID3D12DebugDevice1_SetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput_GetFrameStatistics(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugDevice1_GetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pStats; + D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type; + PointerDecoder pData; + UINT DataSize; HRESULT return_value; - bytes_read += pStats.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput_GetFrameStatistics(call_info, object_id, return_value, &pStats); + consumer->Process_ID3D12DebugDevice1_GetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain_Present(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugDevice1_ReportLiveDeviceObjects(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT SyncInterval; - UINT Flags; + D3D12_RLDO_FLAGS Flags; HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SyncInterval); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain_Present(call_info, object_id, return_value, SyncInterval, Flags); + consumer->Process_ID3D12DebugDevice1_ReportLiveDeviceObjects(call_info, object_id, return_value, Flags); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain_GetBuffer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugDevice_SetFeatureMask(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Buffer; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppSurface; + D3D12_DEBUG_FEATURE Mask; HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Buffer); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppSurface.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Mask); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain_GetBuffer(call_info, object_id, return_value, Buffer, riid, &ppSurface); + consumer->Process_ID3D12DebugDevice_SetFeatureMask(call_info, object_id, return_value, Mask); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain_SetFullscreenState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugDevice_GetFeatureMask(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL Fullscreen; - format::HandleId pTarget; - HRESULT return_value; + D3D12_DEBUG_FEATURE return_value; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Fullscreen); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTarget); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain_SetFullscreenState(call_info, object_id, return_value, Fullscreen, pTarget); + consumer->Process_ID3D12DebugDevice_GetFeatureMask(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain_GetFullscreenState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugDevice_ReportLiveDeviceObjects(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pFullscreen; - HandlePointerDecoder ppTarget; + D3D12_RLDO_FLAGS Flags; HRESULT return_value; - bytes_read += pFullscreen.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ppTarget.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain_GetFullscreenState(call_info, object_id, return_value, &pFullscreen, &ppTarget); + consumer->Process_ID3D12DebugDevice_ReportLiveDeviceObjects(call_info, object_id, return_value, Flags); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugDevice2_SetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; + D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type; + PointerDecoder pData; + UINT DataSize; HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain_GetDesc(call_info, object_id, return_value, &pDesc); + consumer->Process_ID3D12DebugDevice2_SetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain_ResizeBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugDevice2_GetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT BufferCount; - UINT Width; - UINT Height; - DXGI_FORMAT NewFormat; - UINT SwapChainFlags; + D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type; + PointerDecoder pData; + UINT DataSize; HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferCount); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Width); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Height); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NewFormat); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SwapChainFlags); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain_ResizeBuffers(call_info, object_id, return_value, BufferCount, Width, Height, NewFormat, SwapChainFlags); + consumer->Process_ID3D12DebugDevice2_GetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain_ResizeTarget(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugCommandQueue_AssertResourceState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pNewTargetParameters; - HRESULT return_value; + format::HandleId pResource; + UINT Subresource; + UINT State; + BOOL return_value; - bytes_read += pNewTargetParameters.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &State); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain_ResizeTarget(call_info, object_id, return_value, &pNewTargetParameters); + consumer->Process_ID3D12DebugCommandQueue_AssertResourceState(call_info, object_id, return_value, pResource, Subresource, State); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain_GetContainingOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugCommandQueue1_AssertResourceAccess(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HandlePointerDecoder ppOutput; - HRESULT return_value; + format::HandleId pResource; + UINT Subresource; + D3D12_BARRIER_ACCESS Access; - bytes_read += ppOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Access); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain_GetContainingOutput(call_info, object_id, return_value, &ppOutput); + consumer->Process_ID3D12DebugCommandQueue1_AssertResourceAccess(call_info, object_id, pResource, Subresource, Access); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain_GetFrameStatistics(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugCommandQueue1_AssertTextureLayout(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pStats; - HRESULT return_value; + format::HandleId pResource; + UINT Subresource; + D3D12_BARRIER_LAYOUT Layout; - bytes_read += pStats.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Layout); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain_GetFrameStatistics(call_info, object_id, return_value, &pStats); + consumer->Process_ID3D12DebugCommandQueue1_AssertTextureLayout(call_info, object_id, pResource, Subresource, Layout); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain_GetLastPresentCount(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugCommandList1_AssertResourceState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pLastPresentCount; - HRESULT return_value; + format::HandleId pResource; + UINT Subresource; + UINT State; + BOOL return_value; - bytes_read += pLastPresentCount.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &State); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain_GetLastPresentCount(call_info, object_id, return_value, &pLastPresentCount); + consumer->Process_ID3D12DebugCommandList1_AssertResourceState(call_info, object_id, return_value, pResource, Subresource, State); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory_EnumAdapters(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugCommandList1_SetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Adapter; - HandlePointerDecoder ppAdapter; + D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type; + PointerDecoder pData; + UINT DataSize; HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Adapter); - bytes_read += ppAdapter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory_EnumAdapters(call_info, object_id, return_value, Adapter, &ppAdapter); + consumer->Process_ID3D12DebugCommandList1_SetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory_MakeWindowAssociation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugCommandList1_GetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t WindowHandle; - UINT Flags; + D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type; + PointerDecoder pData; + UINT DataSize; HRESULT return_value; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &WindowHandle); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory_MakeWindowAssociation(call_info, object_id, return_value, WindowHandle, Flags); + consumer->Process_ID3D12DebugCommandList1_GetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory_GetWindowAssociation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugCommandList_AssertResourceState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pWindowHandle; - HRESULT return_value; + format::HandleId pResource; + UINT Subresource; + UINT State; + BOOL return_value; - bytes_read += pWindowHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &State); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory_GetWindowAssociation(call_info, object_id, return_value, &pWindowHandle); + consumer->Process_ID3D12DebugCommandList_AssertResourceState(call_info, object_id, return_value, pResource, Subresource, State); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory_CreateSwapChain(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugCommandList_SetFeatureMask(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDevice; - StructPointerDecoder pDesc; - HandlePointerDecoder ppSwapChain; + D3D12_DEBUG_FEATURE Mask; HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ppSwapChain.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Mask); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory_CreateSwapChain(call_info, object_id, return_value, pDevice, &pDesc, &ppSwapChain); + consumer->Process_ID3D12DebugCommandList_SetFeatureMask(call_info, object_id, return_value, Mask); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory_CreateSoftwareAdapter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugCommandList_GetFeatureMask(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t Module; - HandlePointerDecoder ppAdapter; - HRESULT return_value; + D3D12_DEBUG_FEATURE return_value; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Module); - bytes_read += ppAdapter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory_CreateSoftwareAdapter(call_info, object_id, return_value, Module, &ppAdapter); + consumer->Process_ID3D12DebugCommandList_GetFeatureMask(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDevice_GetAdapter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugCommandList2_SetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HandlePointerDecoder pAdapter; + D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type; + PointerDecoder pData; + UINT DataSize; HRESULT return_value; - bytes_read += pAdapter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDevice_GetAdapter(call_info, object_id, return_value, &pAdapter); + consumer->Process_ID3D12DebugCommandList2_SetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDevice_CreateSurface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugCommandList2_GetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - UINT NumSurfaces; - DXGI_USAGE Usage; - StructPointerDecoder pSharedResource; - HandlePointerDecoder ppSurface; + D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type; + PointerDecoder pData; + UINT DataSize; HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSurfaces); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Usage); - bytes_read += pSharedResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ppSurface.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDevice_CreateSurface(call_info, object_id, return_value, &pDesc, NumSurfaces, Usage, &pSharedResource, &ppSurface); + consumer->Process_ID3D12DebugCommandList2_GetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDevice_QueryResourceResidency(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugCommandList3_AssertResourceAccess(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HandlePointerDecoder ppResources; - PointerDecoder pResidencyStatus; - UINT NumResources; - HRESULT return_value; + format::HandleId pResource; + UINT Subresource; + D3D12_BARRIER_ACCESS Access; - bytes_read += ppResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pResidencyStatus.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumResources); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Access); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDevice_QueryResourceResidency(call_info, object_id, return_value, &ppResources, &pResidencyStatus, NumResources); + consumer->Process_ID3D12DebugCommandList3_AssertResourceAccess(call_info, object_id, pResource, Subresource, Access); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDevice_SetGPUThreadPriority(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12DebugCommandList3_AssertTextureLayout(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - INT Priority; - HRESULT return_value; + format::HandleId pResource; + UINT Subresource; + D3D12_BARRIER_LAYOUT Layout; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Priority); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Layout); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDevice_SetGPUThreadPriority(call_info, object_id, return_value, Priority); + consumer->Process_ID3D12DebugCommandList3_AssertTextureLayout(call_info, object_id, pResource, Subresource, Layout); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDevice_GetGPUThreadPriority(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12SharingContract_Present(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pPriority; - HRESULT return_value; + format::HandleId pResource; + UINT Subresource; + uint64_t window; - bytes_read += pPriority.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &window); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDevice_GetGPUThreadPriority(call_info, object_id, return_value, &pPriority); + consumer->Process_ID3D12SharingContract_Present(call_info, object_id, pResource, Subresource, window); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory1_EnumAdapters1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12SharingContract_SharedFenceSignal(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Adapter; - HandlePointerDecoder ppAdapter; - HRESULT return_value; + format::HandleId pFence; + UINT64 FenceValue; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Adapter); - bytes_read += ppAdapter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pFence); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FenceValue); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory1_EnumAdapters1(call_info, object_id, return_value, Adapter, &ppAdapter); + consumer->Process_ID3D12SharingContract_SharedFenceSignal(call_info, object_id, pFence, FenceValue); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory1_IsCurrent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12SharingContract_BeginCapturableWork(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL return_value; + Decoded_GUID guid; + GUID value_guid; + guid.decoded_value = &value_guid; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory1_IsCurrent(call_info, object_id, return_value); + consumer->Process_ID3D12SharingContract_BeginCapturableWork(call_info, object_id, guid); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIAdapter1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12SharingContract_EndCapturableWork(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - HRESULT return_value; + Decoded_GUID guid; + GUID value_guid; + guid.decoded_value = &value_guid; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIAdapter1_GetDesc1(call_info, object_id, return_value, &pDesc); + consumer->Process_ID3D12SharingContract_EndCapturableWork(call_info, object_id, guid); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDevice1_SetMaximumFrameLatency(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12ManualWriteTrackingResource_TrackWrite(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT MaxLatency; - HRESULT return_value; + UINT Subresource; + StructPointerDecoder pWrittenRange; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MaxLatency); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); + bytes_read += pWrittenRange.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDevice1_SetMaximumFrameLatency(call_info, object_id, return_value, MaxLatency); + consumer->Process_ID3D12ManualWriteTrackingResource_TrackWrite(call_info, object_id, Subresource, &pWrittenRange); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDevice1_GetMaximumFrameLatency(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_SetMessageCountLimit(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pMaxLatency; + UINT64 MessageCountLimit; HRESULT return_value; - bytes_read += pMaxLatency.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MessageCountLimit); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDevice1_GetMaximumFrameLatency(call_info, object_id, return_value, &pMaxLatency); + consumer->Process_ID3D12InfoQueue_SetMessageCountLimit(call_info, object_id, return_value, MessageCountLimit); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDisplayControl_IsStereoEnabled(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_ClearStoredMessages(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL return_value; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDisplayControl_IsStereoEnabled(call_info, object_id, return_value); + consumer->Process_ID3D12InfoQueue_ClearStoredMessages(call_info, object_id); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDisplayControl_SetStereoEnabled(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetMessage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL enabled; + UINT64 MessageIndex; + StructPointerDecoder pMessage; + PointerDecoder pMessageByteLength; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &enabled); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MessageIndex); + bytes_read += pMessage.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pMessageByteLength.DecodeSizeT((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDisplayControl_SetStereoEnabled(call_info, object_id, enabled); + consumer->Process_ID3D12InfoQueue_GetMessage(call_info, object_id, return_value, MessageIndex, &pMessage, &pMessageByteLength); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutputDuplication_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetNumMessagesAllowedByStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; + UINT64 return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutputDuplication_GetDesc(call_info, object_id, &pDesc); + consumer->Process_ID3D12InfoQueue_GetNumMessagesAllowedByStorageFilter(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutputDuplication_AcquireNextFrame(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetNumMessagesDeniedByStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT TimeoutInMilliseconds; - StructPointerDecoder pFrameInfo; - HandlePointerDecoder ppDesktopResource; - HRESULT return_value; + UINT64 return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &TimeoutInMilliseconds); - bytes_read += pFrameInfo.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ppDesktopResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutputDuplication_AcquireNextFrame(call_info, object_id, return_value, TimeoutInMilliseconds, &pFrameInfo, &ppDesktopResource); + consumer->Process_ID3D12InfoQueue_GetNumMessagesDeniedByStorageFilter(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutputDuplication_GetFrameDirtyRects(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetNumStoredMessages(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT DirtyRectsBufferSize; - StructPointerDecoder pDirtyRectsBuffer; - PointerDecoder pDirtyRectsBufferSizeRequired; - HRESULT return_value; + UINT64 return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DirtyRectsBufferSize); - bytes_read += pDirtyRectsBuffer.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pDirtyRectsBufferSizeRequired.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutputDuplication_GetFrameDirtyRects(call_info, object_id, return_value, DirtyRectsBufferSize, &pDirtyRectsBuffer, &pDirtyRectsBufferSizeRequired); + consumer->Process_ID3D12InfoQueue_GetNumStoredMessages(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutputDuplication_GetFrameMoveRects(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetNumStoredMessagesAllowedByRetrievalFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT MoveRectsBufferSize; - StructPointerDecoder pMoveRectBuffer; - PointerDecoder pMoveRectsBufferSizeRequired; - HRESULT return_value; + UINT64 return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MoveRectsBufferSize); - bytes_read += pMoveRectBuffer.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pMoveRectsBufferSizeRequired.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutputDuplication_GetFrameMoveRects(call_info, object_id, return_value, MoveRectsBufferSize, &pMoveRectBuffer, &pMoveRectsBufferSizeRequired); + consumer->Process_ID3D12InfoQueue_GetNumStoredMessagesAllowedByRetrievalFilter(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutputDuplication_GetFramePointerShape(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetNumMessagesDiscardedByMessageCountLimit(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT PointerShapeBufferSize; - PointerDecoder pPointerShapeBuffer; - PointerDecoder pPointerShapeBufferSizeRequired; - StructPointerDecoder pPointerShapeInfo; - HRESULT return_value; + UINT64 return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &PointerShapeBufferSize); - bytes_read += pPointerShapeBuffer.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pPointerShapeBufferSizeRequired.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pPointerShapeInfo.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutputDuplication_GetFramePointerShape(call_info, object_id, return_value, PointerShapeBufferSize, &pPointerShapeBuffer, &pPointerShapeBufferSizeRequired, &pPointerShapeInfo); + consumer->Process_ID3D12InfoQueue_GetNumMessagesDiscardedByMessageCountLimit(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutputDuplication_MapDesktopSurface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetMessageCountLimit(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pLockedRect; - HRESULT return_value; + UINT64 return_value; - bytes_read += pLockedRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutputDuplication_MapDesktopSurface(call_info, object_id, return_value, &pLockedRect); + consumer->Process_ID3D12InfoQueue_GetMessageCountLimit(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutputDuplication_UnMapDesktopSurface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_AddStorageFilterEntries(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + StructPointerDecoder pFilter; HRESULT return_value; + bytes_read += pFilter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutputDuplication_UnMapDesktopSurface(call_info, object_id, return_value); + consumer->Process_ID3D12InfoQueue_AddStorageFilterEntries(call_info, object_id, return_value, &pFilter); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutputDuplication_ReleaseFrame(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + StructPointerDecoder pFilter; + PointerDecoder pFilterByteLength; HRESULT return_value; + bytes_read += pFilter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFilterByteLength.DecodeSizeT((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutputDuplication_ReleaseFrame(call_info, object_id, return_value); + consumer->Process_ID3D12InfoQueue_GetStorageFilter(call_info, object_id, return_value, &pFilter, &pFilterByteLength); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISurface2_GetResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_ClearStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppParentResource; - PointerDecoder pSubresourceIndex; - HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppParentResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pSubresourceIndex.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISurface2_GetResource(call_info, object_id, return_value, riid, &ppParentResource, &pSubresourceIndex); + consumer->Process_ID3D12InfoQueue_ClearStorageFilter(call_info, object_id); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIResource1_CreateSubresourceSurface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_PushEmptyStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT index; - HandlePointerDecoder ppSurface; HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &index); - bytes_read += ppSurface.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIResource1_CreateSubresourceSurface(call_info, object_id, return_value, index, &ppSurface); + consumer->Process_ID3D12InfoQueue_PushEmptyStorageFilter(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIResource1_CreateSharedHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) -{ - size_t bytes_read = 0; - - StructPointerDecoder pAttributes; - DWORD dwAccess; - WStringDecoder lpName; - PointerDecoder pHandle; +size_t Dx12Decoder::Decode_ID3D12InfoQueue_PushCopyOfStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + HRESULT return_value; - bytes_read += pAttributes.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwAccess); - bytes_read += lpName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIResource1_CreateSharedHandle(call_info, object_id, return_value, &pAttributes, dwAccess, &lpName, &pHandle); + consumer->Process_ID3D12InfoQueue_PushCopyOfStorageFilter(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDevice2_OfferResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_PushStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumResources; - HandlePointerDecoder ppResources; - DXGI_OFFER_RESOURCE_PRIORITY Priority; + StructPointerDecoder pFilter; HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumResources); - bytes_read += ppResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Priority); + bytes_read += pFilter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDevice2_OfferResources(call_info, object_id, return_value, NumResources, &ppResources, Priority); + consumer->Process_ID3D12InfoQueue_PushStorageFilter(call_info, object_id, return_value, &pFilter); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDevice2_ReclaimResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_PopStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumResources; - HandlePointerDecoder ppResources; - PointerDecoder pDiscarded; - HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumResources); - bytes_read += ppResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pDiscarded.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDevice2_ReclaimResources(call_info, object_id, return_value, NumResources, &ppResources, &pDiscarded); + consumer->Process_ID3D12InfoQueue_PopStorageFilter(call_info, object_id); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDevice2_EnqueueSetEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetStorageFilterStackSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t hEvent; - HRESULT return_value; + UINT return_value; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDevice2_EnqueueSetEvent(call_info, object_id, return_value, hEvent); + consumer->Process_ID3D12InfoQueue_GetStorageFilterStackSize(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_AddRetrievalFilterEntries(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; + StructPointerDecoder pFilter; HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFilter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain1_GetDesc1(call_info, object_id, return_value, &pDesc); + consumer->Process_ID3D12InfoQueue_AddRetrievalFilterEntries(call_info, object_id, return_value, &pFilter); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain1_GetFullscreenDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetRetrievalFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; + StructPointerDecoder pFilter; + PointerDecoder pFilterByteLength; HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFilter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFilterByteLength.DecodeSizeT((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain1_GetFullscreenDesc(call_info, object_id, return_value, &pDesc); + consumer->Process_ID3D12InfoQueue_GetRetrievalFilter(call_info, object_id, return_value, &pFilter, &pFilterByteLength); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain1_GetHwnd(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_ClearRetrievalFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pHwnd; - HRESULT return_value; - bytes_read += pHwnd.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain1_GetHwnd(call_info, object_id, return_value, &pHwnd); + consumer->Process_ID3D12InfoQueue_ClearRetrievalFilter(call_info, object_id); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain1_GetCoreWindow(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_PushEmptyRetrievalFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID refiid; - GUID value_refiid; - refiid.decoded_value = &value_refiid; - HandlePointerDecoder ppUnk; HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &refiid); - bytes_read += ppUnk.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain1_GetCoreWindow(call_info, object_id, return_value, refiid, &ppUnk); + consumer->Process_ID3D12InfoQueue_PushEmptyRetrievalFilter(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain1_Present1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_PushCopyOfRetrievalFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT SyncInterval; - UINT PresentFlags; - StructPointerDecoder pPresentParameters; HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SyncInterval); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &PresentFlags); - bytes_read += pPresentParameters.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain1_Present1(call_info, object_id, return_value, SyncInterval, PresentFlags, &pPresentParameters); + consumer->Process_ID3D12InfoQueue_PushCopyOfRetrievalFilter(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain1_IsTemporaryMonoSupported(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_PushRetrievalFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL return_value; + StructPointerDecoder pFilter; + HRESULT return_value; + bytes_read += pFilter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain1_IsTemporaryMonoSupported(call_info, object_id, return_value); + consumer->Process_ID3D12InfoQueue_PushRetrievalFilter(call_info, object_id, return_value, &pFilter); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain1_GetRestrictToOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_PopRetrievalFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HandlePointerDecoder ppRestrictToOutput; - HRESULT return_value; - bytes_read += ppRestrictToOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain1_GetRestrictToOutput(call_info, object_id, return_value, &ppRestrictToOutput); + consumer->Process_ID3D12InfoQueue_PopRetrievalFilter(call_info, object_id); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain1_SetBackgroundColor(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetRetrievalFilterStackSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pColor; - HRESULT return_value; + UINT return_value; - bytes_read += pColor.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain1_SetBackgroundColor(call_info, object_id, return_value, &pColor); + consumer->Process_ID3D12InfoQueue_GetRetrievalFilterStackSize(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain1_GetBackgroundColor(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_AddMessage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pColor; + D3D12_MESSAGE_CATEGORY Category; + D3D12_MESSAGE_SEVERITY Severity; + D3D12_MESSAGE_ID ID; + StringDecoder pDescription; HRESULT return_value; - bytes_read += pColor.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Category); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Severity); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ID); + bytes_read += pDescription.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain1_GetBackgroundColor(call_info, object_id, return_value, &pColor); + consumer->Process_ID3D12InfoQueue_AddMessage(call_info, object_id, return_value, Category, Severity, ID, &pDescription); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain1_SetRotation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_AddApplicationMessage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DXGI_MODE_ROTATION Rotation; + D3D12_MESSAGE_SEVERITY Severity; + StringDecoder pDescription; HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Rotation); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Severity); + bytes_read += pDescription.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain1_SetRotation(call_info, object_id, return_value, Rotation); + consumer->Process_ID3D12InfoQueue_AddApplicationMessage(call_info, object_id, return_value, Severity, &pDescription); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain1_GetRotation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_SetBreakOnCategory(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pRotation; + D3D12_MESSAGE_CATEGORY Category; + BOOL bEnable; HRESULT return_value; - bytes_read += pRotation.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Category); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &bEnable); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain1_GetRotation(call_info, object_id, return_value, &pRotation); + consumer->Process_ID3D12InfoQueue_SetBreakOnCategory(call_info, object_id, return_value, Category, bEnable); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory2_IsWindowedStereoEnabled(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_SetBreakOnSeverity(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL return_value; + D3D12_MESSAGE_SEVERITY Severity; + BOOL bEnable; + HRESULT return_value; + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Severity); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &bEnable); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory2_IsWindowedStereoEnabled(call_info, object_id, return_value); + consumer->Process_ID3D12InfoQueue_SetBreakOnSeverity(call_info, object_id, return_value, Severity, bEnable); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory2_CreateSwapChainForHwnd(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_SetBreakOnID(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDevice; - uint64_t hWnd; - StructPointerDecoder pDesc; - StructPointerDecoder pFullscreenDesc; - format::HandleId pRestrictToOutput; - HandlePointerDecoder ppSwapChain; + D3D12_MESSAGE_ID ID; + BOOL bEnable; HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hWnd); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pFullscreenDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRestrictToOutput); - bytes_read += ppSwapChain.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ID); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &bEnable); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory2_CreateSwapChainForHwnd(call_info, object_id, return_value, pDevice, hWnd, &pDesc, &pFullscreenDesc, pRestrictToOutput, &ppSwapChain); + consumer->Process_ID3D12InfoQueue_SetBreakOnID(call_info, object_id, return_value, ID, bEnable); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory2_CreateSwapChainForCoreWindow(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetBreakOnCategory(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDevice; - format::HandleId pWindow; - StructPointerDecoder pDesc; - format::HandleId pRestrictToOutput; - HandlePointerDecoder ppSwapChain; - HRESULT return_value; + D3D12_MESSAGE_CATEGORY Category; + BOOL return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pWindow); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRestrictToOutput); - bytes_read += ppSwapChain.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Category); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory2_CreateSwapChainForCoreWindow(call_info, object_id, return_value, pDevice, pWindow, &pDesc, pRestrictToOutput, &ppSwapChain); + consumer->Process_ID3D12InfoQueue_GetBreakOnCategory(call_info, object_id, return_value, Category); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory2_GetSharedResourceAdapterLuid(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetBreakOnSeverity(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t hResource; - StructPointerDecoder pLuid; - HRESULT return_value; + D3D12_MESSAGE_SEVERITY Severity; + BOOL return_value; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hResource); - bytes_read += pLuid.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Severity); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory2_GetSharedResourceAdapterLuid(call_info, object_id, return_value, hResource, &pLuid); + consumer->Process_ID3D12InfoQueue_GetBreakOnSeverity(call_info, object_id, return_value, Severity); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory2_RegisterStereoStatusWindow(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetBreakOnID(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t WindowHandle; - UINT wMsg; - PointerDecoder pdwCookie; - HRESULT return_value; + D3D12_MESSAGE_ID ID; + BOOL return_value; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &WindowHandle); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &wMsg); - bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ID); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory2_RegisterStereoStatusWindow(call_info, object_id, return_value, WindowHandle, wMsg, &pdwCookie); + consumer->Process_ID3D12InfoQueue_GetBreakOnID(call_info, object_id, return_value, ID); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory2_RegisterStereoStatusEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_SetMuteDebugOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t hEvent; - PointerDecoder pdwCookie; - HRESULT return_value; + BOOL bMute; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); - bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &bMute); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory2_RegisterStereoStatusEvent(call_info, object_id, return_value, hEvent, &pdwCookie); + consumer->Process_ID3D12InfoQueue_SetMuteDebugOutput(call_info, object_id, bMute); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory2_UnregisterStereoStatus(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetMuteDebugOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DWORD dwCookie; + BOOL return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwCookie); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory2_UnregisterStereoStatus(call_info, object_id, dwCookie); + consumer->Process_ID3D12InfoQueue_GetMuteDebugOutput(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory2_RegisterOcclusionStatusWindow(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue1_RegisterMessageCallback(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t WindowHandle; - UINT wMsg; - PointerDecoder pdwCookie; + uint64_t CallbackFunc; + D3D12_MESSAGE_CALLBACK_FLAGS CallbackFilterFlags; + uint64_t pContext; + PointerDecoder pCallbackCookie; HRESULT return_value; - - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &WindowHandle); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &wMsg); - bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CallbackFunc); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CallbackFilterFlags); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pContext); + bytes_read += pCallbackCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory2_RegisterOcclusionStatusWindow(call_info, object_id, return_value, WindowHandle, wMsg, &pdwCookie); + consumer->Process_ID3D12InfoQueue1_RegisterMessageCallback(call_info, object_id, return_value, CallbackFunc, CallbackFilterFlags, pContext, &pCallbackCookie); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory2_RegisterOcclusionStatusEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D12InfoQueue1_UnregisterMessageCallback(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t hEvent; - PointerDecoder pdwCookie; + DWORD CallbackCookie; HRESULT return_value; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); - bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CallbackCookie); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory2_RegisterOcclusionStatusEvent(call_info, object_id, return_value, hEvent, &pdwCookie); + consumer->Process_ID3D12InfoQueue1_UnregisterMessageCallback(call_info, object_id, return_value, CallbackCookie); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory2_UnregisterOcclusionStatus(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceChild_GetDevice(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DWORD dwCookie; + HandlePointerDecoder ppDevice; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwCookie); + bytes_read += ppDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory2_UnregisterOcclusionStatus(call_info, object_id, dwCookie); + consumer->Process_ID3D11DeviceChild_GetDevice(call_info, object_id, &ppDevice); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory2_CreateSwapChainForComposition(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceChild_GetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDevice; - StructPointerDecoder pDesc; - format::HandleId pRestrictToOutput; - HandlePointerDecoder ppSwapChain; + Decoded_GUID guid; + GUID value_guid; + guid.decoded_value = &value_guid; + PointerDecoder pDataSize; + PointerDecoder pData; HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRestrictToOutput); - bytes_read += ppSwapChain.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); + bytes_read += pDataSize.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory2_CreateSwapChainForComposition(call_info, object_id, return_value, pDevice, &pDesc, pRestrictToOutput, &ppSwapChain); + consumer->Process_ID3D11DeviceChild_GetPrivateData(call_info, object_id, return_value, guid, &pDataSize, &pData); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIAdapter2_GetDesc2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceChild_SetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; + Decoded_GUID guid; + GUID value_guid; + guid.decoded_value = &value_guid; + UINT DataSize; + PointerDecoder pData; HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIAdapter2_GetDesc2(call_info, object_id, return_value, &pDesc); + consumer->Process_ID3D11DeviceChild_SetPrivateData(call_info, object_id, return_value, guid, DataSize, &pData); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput1_GetDisplayModeList1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceChild_SetPrivateDataInterface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DXGI_FORMAT EnumFormat; - UINT Flags; - PointerDecoder pNumModes; - StructPointerDecoder pDesc; + Decoded_GUID guid; + GUID value_guid; + guid.decoded_value = &value_guid; + format::HandleId pData; HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &EnumFormat); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); - bytes_read += pNumModes.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pData); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput1_GetDisplayModeList1(call_info, object_id, return_value, EnumFormat, Flags, &pNumModes, &pDesc); + consumer->Process_ID3D11DeviceChild_SetPrivateDataInterface(call_info, object_id, return_value, guid, pData); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput1_FindClosestMatchingMode1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DepthStencilState_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pModeToMatch; - StructPointerDecoder pClosestMatch; - format::HandleId pConcernedDevice; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += pModeToMatch.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pClosestMatch.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pConcernedDevice); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput1_FindClosestMatchingMode1(call_info, object_id, return_value, &pModeToMatch, &pClosestMatch, pConcernedDevice); + consumer->Process_ID3D11DepthStencilState_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput1_GetDisplaySurfaceData1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11BlendState_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDestination; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDestination); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput1_GetDisplaySurfaceData1(call_info, object_id, return_value, pDestination); + consumer->Process_ID3D11BlendState_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput1_DuplicateOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11RasterizerState_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDevice; - HandlePointerDecoder ppOutputDuplication; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); - bytes_read += ppOutputDuplication.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput1_DuplicateOutput(call_info, object_id, return_value, pDevice, &ppOutputDuplication); + consumer->Process_ID3D11RasterizerState_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDevice3_Trim(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Resource_GetType(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + PointerDecoder pResourceDimension; + bytes_read += pResourceDimension.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDevice3_Trim(call_info, object_id); + consumer->Process_ID3D11Resource_GetType(call_info, object_id, &pResourceDimension); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain2_SetSourceSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Resource_SetEvictionPriority(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Width; - UINT Height; - HRESULT return_value; + UINT EvictionPriority; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Width); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Height); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &EvictionPriority); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain2_SetSourceSize(call_info, object_id, return_value, Width, Height); + consumer->Process_ID3D11Resource_SetEvictionPriority(call_info, object_id, EvictionPriority); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain2_GetSourceSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Resource_GetEvictionPriority(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pWidth; - PointerDecoder pHeight; - HRESULT return_value; + UINT return_value; - bytes_read += pWidth.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pHeight.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain2_GetSourceSize(call_info, object_id, return_value, &pWidth, &pHeight); + consumer->Process_ID3D11Resource_GetEvictionPriority(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain2_SetMaximumFrameLatency(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Buffer_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT MaxLatency; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MaxLatency); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain2_SetMaximumFrameLatency(call_info, object_id, return_value, MaxLatency); + consumer->Process_ID3D11Buffer_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain2_GetMaximumFrameLatency(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Texture1D_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pMaxLatency; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += pMaxLatency.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain2_GetMaximumFrameLatency(call_info, object_id, return_value, &pMaxLatency); + consumer->Process_ID3D11Texture1D_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain2_GetFrameLatencyWaitableObject(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Texture2D_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t return_value; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain2_GetFrameLatencyWaitableObject(call_info, object_id, return_value); + consumer->Process_ID3D11Texture2D_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain2_SetMatrixTransform(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Texture3D_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pMatrix; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += pMatrix.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain2_SetMatrixTransform(call_info, object_id, return_value, &pMatrix); + consumer->Process_ID3D11Texture3D_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain2_GetMatrixTransform(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11View_GetResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pMatrix; - HRESULT return_value; + HandlePointerDecoder ppResource; - bytes_read += pMatrix.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ppResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain2_GetMatrixTransform(call_info, object_id, return_value, &pMatrix); + consumer->Process_ID3D11View_GetResource(call_info, object_id, &ppResource); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput2_SupportsOverlays(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11ShaderResourceView_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL return_value; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput2_SupportsOverlays(call_info, object_id, return_value); + consumer->Process_ID3D11ShaderResourceView_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory3_GetCreationFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11RenderTargetView_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT return_value; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory3_GetCreationFlags(call_info, object_id, return_value); + consumer->Process_ID3D11RenderTargetView_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_PresentBuffer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DepthStencilView_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT BufferToPresent; - UINT SyncInterval; - UINT Flags; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferToPresent); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SyncInterval); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDecodeSwapChain_PresentBuffer(call_info, object_id, return_value, BufferToPresent, SyncInterval, Flags); + consumer->Process_ID3D11DepthStencilView_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_SetSourceRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11UnorderedAccessView_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pRect; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDecodeSwapChain_SetSourceRect(call_info, object_id, return_value, &pRect); + consumer->Process_ID3D11UnorderedAccessView_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_SetTargetRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11SamplerState_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pRect; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDecodeSwapChain_SetTargetRect(call_info, object_id, return_value, &pRect); + consumer->Process_ID3D11SamplerState_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_SetDestSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Asynchronous_GetDataSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Width; - UINT Height; - HRESULT return_value; + UINT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Width); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Height); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDecodeSwapChain_SetDestSize(call_info, object_id, return_value, Width, Height); + consumer->Process_ID3D11Asynchronous_GetDataSize(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_GetSourceRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Query_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pRect; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDecodeSwapChain_GetSourceRect(call_info, object_id, return_value, &pRect); + consumer->Process_ID3D11Query_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_GetTargetRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Counter_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pRect; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDecodeSwapChain_GetTargetRect(call_info, object_id, return_value, &pRect); + consumer->Process_ID3D11Counter_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_GetDestSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11ClassInstance_GetClassLinkage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pWidth; - PointerDecoder pHeight; - HRESULT return_value; + HandlePointerDecoder ppLinkage; - bytes_read += pWidth.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pHeight.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ppLinkage.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDecodeSwapChain_GetDestSize(call_info, object_id, return_value, &pWidth, &pHeight); + consumer->Process_ID3D11ClassInstance_GetClassLinkage(call_info, object_id, &ppLinkage); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_SetColorSpace(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11ClassInstance_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS ColorSpace; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ColorSpace); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDecodeSwapChain_SetColorSpace(call_info, object_id, return_value, ColorSpace); + consumer->Process_ID3D11ClassInstance_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDecodeSwapChain_GetColorSpace(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11ClassInstance_GetInstanceName(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS return_value; + StringDecoder pInstanceName; + PointerDecoder pBufferLength; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pInstanceName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pBufferLength.DecodeSizeT((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDecodeSwapChain_GetColorSpace(call_info, object_id, return_value); + consumer->Process_ID3D11ClassInstance_GetInstanceName(call_info, object_id, &pInstanceName, &pBufferLength); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactoryMedia_CreateSwapChainForCompositionSurfaceHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11ClassInstance_GetTypeName(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDevice; - uint64_t hSurface; - StructPointerDecoder pDesc; - format::HandleId pRestrictToOutput; - HandlePointerDecoder ppSwapChain; - HRESULT return_value; + StringDecoder pTypeName; + PointerDecoder pBufferLength; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hSurface); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRestrictToOutput); - bytes_read += ppSwapChain.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pTypeName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pBufferLength.DecodeSizeT((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactoryMedia_CreateSwapChainForCompositionSurfaceHandle(call_info, object_id, return_value, pDevice, hSurface, &pDesc, pRestrictToOutput, &ppSwapChain); + consumer->Process_ID3D11ClassInstance_GetTypeName(call_info, object_id, &pTypeName, &pBufferLength); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactoryMedia_CreateDecodeSwapChainForCompositionSurfaceHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11ClassLinkage_GetClassInstance(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDevice; - uint64_t hSurface; - StructPointerDecoder pDesc; - format::HandleId pYuvDecodeBuffers; - format::HandleId pRestrictToOutput; - HandlePointerDecoder ppSwapChain; - HRESULT return_value; - - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hSurface); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pYuvDecodeBuffers); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRestrictToOutput); - bytes_read += ppSwapChain.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + StringDecoder pClassInstanceName; + UINT InstanceIndex; + HandlePointerDecoder ppInstance; + HRESULT return_value; + + bytes_read += pClassInstanceName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InstanceIndex); + bytes_read += ppInstance.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactoryMedia_CreateDecodeSwapChainForCompositionSurfaceHandle(call_info, object_id, return_value, pDevice, hSurface, &pDesc, pYuvDecodeBuffers, pRestrictToOutput, &ppSwapChain); + consumer->Process_ID3D11ClassLinkage_GetClassInstance(call_info, object_id, return_value, &pClassInstanceName, InstanceIndex, &ppInstance); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChainMedia_GetFrameStatisticsMedia(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11ClassLinkage_CreateClassInstance(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pStats; + StringDecoder pClassTypeName; + UINT ConstantBufferOffset; + UINT ConstantVectorOffset; + UINT TextureOffset; + UINT SamplerOffset; + HandlePointerDecoder ppInstance; HRESULT return_value; - bytes_read += pStats.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pClassTypeName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ConstantBufferOffset); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ConstantVectorOffset); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &TextureOffset); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SamplerOffset); + bytes_read += ppInstance.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChainMedia_GetFrameStatisticsMedia(call_info, object_id, return_value, &pStats); + consumer->Process_ID3D11ClassLinkage_CreateClassInstance(call_info, object_id, return_value, &pClassTypeName, ConstantBufferOffset, ConstantVectorOffset, TextureOffset, SamplerOffset, &ppInstance); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChainMedia_SetPresentDuration(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11CommandList_GetContextFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Duration; - HRESULT return_value; + UINT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Duration); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChainMedia_SetPresentDuration(call_info, object_id, return_value, Duration); + consumer->Process_ID3D11CommandList_GetContextFlags(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChainMedia_CheckPresentDurationSupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_VSSetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT DesiredPresentDuration; - PointerDecoder pClosestSmallerPresentDuration; - PointerDecoder pClosestLargerPresentDuration; - HRESULT return_value; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DesiredPresentDuration); - bytes_read += pClosestSmallerPresentDuration.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pClosestLargerPresentDuration.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChainMedia_CheckPresentDurationSupport(call_info, object_id, return_value, DesiredPresentDuration, &pClosestSmallerPresentDuration, &pClosestLargerPresentDuration); + consumer->Process_ID3D11DeviceContext_VSSetConstantBuffers(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput3_CheckOverlaySupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_PSSetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DXGI_FORMAT EnumFormat; - format::HandleId pConcernedDevice; - PointerDecoder pFlags; - HRESULT return_value; + UINT StartSlot; + UINT NumViews; + HandlePointerDecoder ppShaderResourceViews; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &EnumFormat); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pConcernedDevice); - bytes_read += pFlags.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += ppShaderResourceViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput3_CheckOverlaySupport(call_info, object_id, return_value, EnumFormat, pConcernedDevice, &pFlags); + consumer->Process_ID3D11DeviceContext_PSSetShaderResources(call_info, object_id, StartSlot, NumViews, &ppShaderResourceViews); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain3_GetCurrentBackBufferIndex(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_PSSetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT return_value; + format::HandleId pPixelShader; + HandlePointerDecoder ppClassInstances; + UINT NumClassInstances; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pPixelShader); + bytes_read += ppClassInstances.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumClassInstances); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain3_GetCurrentBackBufferIndex(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext_PSSetShader(call_info, object_id, pPixelShader, &ppClassInstances, NumClassInstances); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain3_CheckColorSpaceSupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_PSSetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DXGI_COLOR_SPACE_TYPE ColorSpace; - PointerDecoder pColorSpaceSupport; - HRESULT return_value; + UINT StartSlot; + UINT NumSamplers; + HandlePointerDecoder ppSamplers; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ColorSpace); - bytes_read += pColorSpaceSupport.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSamplers); + bytes_read += ppSamplers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain3_CheckColorSpaceSupport(call_info, object_id, return_value, ColorSpace, &pColorSpaceSupport); + consumer->Process_ID3D11DeviceContext_PSSetSamplers(call_info, object_id, StartSlot, NumSamplers, &ppSamplers); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain3_SetColorSpace1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_VSSetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DXGI_COLOR_SPACE_TYPE ColorSpace; - HRESULT return_value; + format::HandleId pVertexShader; + HandlePointerDecoder ppClassInstances; + UINT NumClassInstances; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ColorSpace); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVertexShader); + bytes_read += ppClassInstances.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumClassInstances); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain3_SetColorSpace1(call_info, object_id, return_value, ColorSpace); + consumer->Process_ID3D11DeviceContext_VSSetShader(call_info, object_id, pVertexShader, &ppClassInstances, NumClassInstances); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain3_ResizeBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DrawIndexed(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT BufferCount; - UINT Width; - UINT Height; - DXGI_FORMAT Format; - UINT SwapChainFlags; - PointerDecoder pCreationNodeMask; - HandlePointerDecoder ppPresentQueue; - HRESULT return_value; + UINT IndexCount; + UINT StartIndexLocation; + INT BaseVertexLocation; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferCount); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Width); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Height); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SwapChainFlags); - bytes_read += pCreationNodeMask.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ppPresentQueue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &IndexCount); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartIndexLocation); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BaseVertexLocation); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain3_ResizeBuffers1(call_info, object_id, return_value, BufferCount, Width, Height, Format, SwapChainFlags, &pCreationNodeMask, &ppPresentQueue); + consumer->Process_ID3D11DeviceContext_DrawIndexed(call_info, object_id, IndexCount, StartIndexLocation, BaseVertexLocation); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput4_CheckOverlayColorSpaceSupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_Draw(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DXGI_FORMAT Format; - DXGI_COLOR_SPACE_TYPE ColorSpace; - format::HandleId pConcernedDevice; - PointerDecoder pFlags; - HRESULT return_value; + UINT VertexCount; + UINT StartVertexLocation; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ColorSpace); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pConcernedDevice); - bytes_read += pFlags.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &VertexCount); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartVertexLocation); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput4_CheckOverlayColorSpaceSupport(call_info, object_id, return_value, Format, ColorSpace, pConcernedDevice, &pFlags); + consumer->Process_ID3D11DeviceContext_Draw(call_info, object_id, VertexCount, StartVertexLocation); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory4_EnumAdapterByLuid(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_Map(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_LUID AdapterLuid; - LUID value_AdapterLuid; - AdapterLuid.decoded_value = &value_AdapterLuid; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvAdapter; + format::HandleId pResource; + UINT Subresource; + D3D11_MAP MapType; + UINT MapFlags; + StructPointerDecoder pMappedResource; HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &AdapterLuid); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvAdapter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MapType); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MapFlags); + bytes_read += pMappedResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory4_EnumAdapterByLuid(call_info, object_id, return_value, AdapterLuid, riid, &ppvAdapter); + consumer->Process_ID3D11DeviceContext_Map(call_info, object_id, return_value, pResource, Subresource, MapType, MapFlags, &pMappedResource); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory4_EnumWarpAdapter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_Unmap(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvAdapter; - HRESULT return_value; + format::HandleId pResource; + UINT Subresource; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvAdapter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory4_EnumWarpAdapter(call_info, object_id, return_value, riid, &ppvAdapter); + consumer->Process_ID3D11DeviceContext_Unmap(call_info, object_id, pResource, Subresource); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIAdapter3_RegisterHardwareContentProtectionTeardownStatusEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_PSSetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t hEvent; - PointerDecoder pdwCookie; - HRESULT return_value; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); - bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIAdapter3_RegisterHardwareContentProtectionTeardownStatusEvent(call_info, object_id, return_value, hEvent, &pdwCookie); + consumer->Process_ID3D11DeviceContext_PSSetConstantBuffers(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIAdapter3_UnregisterHardwareContentProtectionTeardownStatus(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_IASetInputLayout(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DWORD dwCookie; + format::HandleId pInputLayout; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwCookie); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pInputLayout); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIAdapter3_UnregisterHardwareContentProtectionTeardownStatus(call_info, object_id, dwCookie); + consumer->Process_ID3D11DeviceContext_IASetInputLayout(call_info, object_id, pInputLayout); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIAdapter3_QueryVideoMemoryInfo(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_IASetVertexBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NodeIndex; - DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup; - StructPointerDecoder pVideoMemoryInfo; - HRESULT return_value; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppVertexBuffers; + PointerDecoder pStrides; + PointerDecoder pOffsets; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NodeIndex); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MemorySegmentGroup); - bytes_read += pVideoMemoryInfo.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppVertexBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pStrides.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pOffsets.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIAdapter3_QueryVideoMemoryInfo(call_info, object_id, return_value, NodeIndex, MemorySegmentGroup, &pVideoMemoryInfo); + consumer->Process_ID3D11DeviceContext_IASetVertexBuffers(call_info, object_id, StartSlot, NumBuffers, &ppVertexBuffers, &pStrides, &pOffsets); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIAdapter3_SetVideoMemoryReservation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_IASetIndexBuffer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NodeIndex; - DXGI_MEMORY_SEGMENT_GROUP MemorySegmentGroup; - UINT64 Reservation; - HRESULT return_value; + format::HandleId pIndexBuffer; + DXGI_FORMAT Format; + UINT Offset; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NodeIndex); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MemorySegmentGroup); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Reservation); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pIndexBuffer); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Offset); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIAdapter3_SetVideoMemoryReservation(call_info, object_id, return_value, NodeIndex, MemorySegmentGroup, Reservation); + consumer->Process_ID3D11DeviceContext_IASetIndexBuffer(call_info, object_id, pIndexBuffer, Format, Offset); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIAdapter3_RegisterVideoMemoryBudgetChangeNotificationEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DrawIndexedInstanced(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t hEvent; - PointerDecoder pdwCookie; - HRESULT return_value; + UINT IndexCountPerInstance; + UINT InstanceCount; + UINT StartIndexLocation; + INT BaseVertexLocation; + UINT StartInstanceLocation; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); - bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &IndexCountPerInstance); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InstanceCount); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartIndexLocation); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BaseVertexLocation); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartInstanceLocation); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIAdapter3_RegisterVideoMemoryBudgetChangeNotificationEvent(call_info, object_id, return_value, hEvent, &pdwCookie); + consumer->Process_ID3D11DeviceContext_DrawIndexedInstanced(call_info, object_id, IndexCountPerInstance, InstanceCount, StartIndexLocation, BaseVertexLocation, StartInstanceLocation); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIAdapter3_UnregisterVideoMemoryBudgetChangeNotification(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DrawInstanced(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DWORD dwCookie; + UINT VertexCountPerInstance; + UINT InstanceCount; + UINT StartVertexLocation; + UINT StartInstanceLocation; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwCookie); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &VertexCountPerInstance); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InstanceCount); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartVertexLocation); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartInstanceLocation); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIAdapter3_UnregisterVideoMemoryBudgetChangeNotification(call_info, object_id, dwCookie); + consumer->Process_ID3D11DeviceContext_DrawInstanced(call_info, object_id, VertexCountPerInstance, InstanceCount, StartVertexLocation, StartInstanceLocation); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput5_DuplicateOutput1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_GSSetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDevice; - UINT Flags; - UINT SupportedFormatsCount; - PointerDecoder pSupportedFormats; - HandlePointerDecoder ppOutputDuplication; - HRESULT return_value; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDevice); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SupportedFormatsCount); - bytes_read += pSupportedFormats.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ppOutputDuplication.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput5_DuplicateOutput1(call_info, object_id, return_value, pDevice, Flags, SupportedFormatsCount, &pSupportedFormats, &ppOutputDuplication); + consumer->Process_ID3D11DeviceContext_GSSetConstantBuffers(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGISwapChain4_SetHDRMetaData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_GSSetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DXGI_HDR_METADATA_TYPE Type; - UINT Size; - PointerDecoder pMetaData; - HRESULT return_value; + format::HandleId pShader; + HandlePointerDecoder ppClassInstances; + UINT NumClassInstances; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); - bytes_read += pMetaData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pShader); + bytes_read += ppClassInstances.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumClassInstances); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGISwapChain4_SetHDRMetaData(call_info, object_id, return_value, Type, Size, &pMetaData); + consumer->Process_ID3D11DeviceContext_GSSetShader(call_info, object_id, pShader, &ppClassInstances, NumClassInstances); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDevice4_OfferResources1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_IASetPrimitiveTopology(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumResources; - HandlePointerDecoder ppResources; - DXGI_OFFER_RESOURCE_PRIORITY Priority; - UINT Flags; - HRESULT return_value; + D3D_PRIMITIVE_TOPOLOGY Topology; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumResources); - bytes_read += ppResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Priority); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Topology); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDevice4_OfferResources1(call_info, object_id, return_value, NumResources, &ppResources, Priority, Flags); + consumer->Process_ID3D11DeviceContext_IASetPrimitiveTopology(call_info, object_id, Topology); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIDevice4_ReclaimResources1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_VSSetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumResources; - HandlePointerDecoder ppResources; - PointerDecoder pResults; - HRESULT return_value; + UINT StartSlot; + UINT NumViews; + HandlePointerDecoder ppShaderResourceViews; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumResources); - bytes_read += ppResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pResults.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += ppShaderResourceViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIDevice4_ReclaimResources1(call_info, object_id, return_value, NumResources, &ppResources, &pResults); + consumer->Process_ID3D11DeviceContext_VSSetShaderResources(call_info, object_id, StartSlot, NumViews, &ppShaderResourceViews); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIAdapter4_GetDesc3(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_VSSetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - HRESULT return_value; + UINT StartSlot; + UINT NumSamplers; + HandlePointerDecoder ppSamplers; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSamplers); + bytes_read += ppSamplers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIAdapter4_GetDesc3(call_info, object_id, return_value, &pDesc); + consumer->Process_ID3D11DeviceContext_VSSetSamplers(call_info, object_id, StartSlot, NumSamplers, &ppSamplers); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput6_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_Begin(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - HRESULT return_value; + format::HandleId pAsync; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pAsync); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput6_GetDesc1(call_info, object_id, return_value, &pDesc); + consumer->Process_ID3D11DeviceContext_Begin(call_info, object_id, pAsync); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIOutput6_CheckHardwareCompositionSupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_End(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pFlags; - HRESULT return_value; + format::HandleId pAsync; - bytes_read += pFlags.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pAsync); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIOutput6_CheckHardwareCompositionSupport(call_info, object_id, return_value, &pFlags); + consumer->Process_ID3D11DeviceContext_End(call_info, object_id, pAsync); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory6_EnumAdapterByGpuPreference(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_GetData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Adapter; - DXGI_GPU_PREFERENCE GpuPreference; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvAdapter; + format::HandleId pAsync; + PointerDecoder pData; + UINT DataSize; + UINT GetDataFlags; HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Adapter); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &GpuPreference); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvAdapter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pAsync); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &GetDataFlags); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory6_EnumAdapterByGpuPreference(call_info, object_id, return_value, Adapter, GpuPreference, riid, &ppvAdapter); + consumer->Process_ID3D11DeviceContext_GetData(call_info, object_id, return_value, pAsync, &pData, DataSize, GetDataFlags); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory7_RegisterAdaptersChangedEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_SetPredication(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t hEvent; - PointerDecoder pdwCookie; - HRESULT return_value; + format::HandleId pPredicate; + BOOL PredicateValue; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); - bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pPredicate); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &PredicateValue); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory7_RegisterAdaptersChangedEvent(call_info, object_id, return_value, hEvent, &pdwCookie); + consumer->Process_ID3D11DeviceContext_SetPredication(call_info, object_id, pPredicate, PredicateValue); } return bytes_read; } -size_t Dx12Decoder::Decode_IDXGIFactory7_UnregisterAdaptersChangedEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_GSSetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DWORD dwCookie; - HRESULT return_value; + UINT StartSlot; + UINT NumViews; + HandlePointerDecoder ppShaderResourceViews; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwCookie); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += ppShaderResourceViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_IDXGIFactory7_UnregisterAdaptersChangedEvent(call_info, object_id, return_value, dwCookie); + consumer->Process_ID3D11DeviceContext_GSSetShaderResources(call_info, object_id, StartSlot, NumViews, &ppShaderResourceViews); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Object_GetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_GSSetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID guid; - GUID value_guid; - guid.decoded_value = &value_guid; - PointerDecoder pDataSize; - PointerDecoder pData; - HRESULT return_value; + UINT StartSlot; + UINT NumSamplers; + HandlePointerDecoder ppSamplers; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); - bytes_read += pDataSize.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSamplers); + bytes_read += ppSamplers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Object_GetPrivateData(call_info, object_id, return_value, guid, &pDataSize, &pData); + consumer->Process_ID3D11DeviceContext_GSSetSamplers(call_info, object_id, StartSlot, NumSamplers, &ppSamplers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Object_SetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_OMSetRenderTargets(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID guid; - GUID value_guid; - guid.decoded_value = &value_guid; - UINT DataSize; - PointerDecoder pData; - HRESULT return_value; + UINT NumViews; + HandlePointerDecoder ppRenderTargetViews; + format::HandleId pDepthStencilView; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += ppRenderTargetViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDepthStencilView); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Object_SetPrivateData(call_info, object_id, return_value, guid, DataSize, &pData); + consumer->Process_ID3D11DeviceContext_OMSetRenderTargets(call_info, object_id, NumViews, &ppRenderTargetViews, pDepthStencilView); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Object_SetPrivateDataInterface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID guid; - GUID value_guid; - guid.decoded_value = &value_guid; - format::HandleId pData; - HRESULT return_value; + UINT NumRTVs; + HandlePointerDecoder ppRenderTargetViews; + format::HandleId pDepthStencilView; + UINT UAVStartSlot; + UINT NumUAVs; + HandlePointerDecoder ppUnorderedAccessViews; + PointerDecoder pUAVInitialCounts; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pData); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRTVs); + bytes_read += ppRenderTargetViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDepthStencilView); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &UAVStartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumUAVs); + bytes_read += ppUnorderedAccessViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pUAVInitialCounts.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Object_SetPrivateDataInterface(call_info, object_id, return_value, guid, pData); + consumer->Process_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(call_info, object_id, NumRTVs, &ppRenderTargetViews, pDepthStencilView, UAVStartSlot, NumUAVs, &ppUnorderedAccessViews, &pUAVInitialCounts); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Object_SetName(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_OMSetBlendState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - WStringDecoder Name; - HRESULT return_value; + format::HandleId pBlendState; + PointerDecoder BlendFactor; + UINT SampleMask; - bytes_read += Name.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pBlendState); + bytes_read += BlendFactor.DecodeFloat((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SampleMask); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Object_SetName(call_info, object_id, return_value, &Name); + consumer->Process_ID3D11DeviceContext_OMSetBlendState(call_info, object_id, pBlendState, &BlendFactor, SampleMask); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceChild_GetDevice(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_OMSetDepthStencilState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvDevice; - HRESULT return_value; + format::HandleId pDepthStencilState; + UINT StencilRef; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDepthStencilState); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StencilRef); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceChild_GetDevice(call_info, object_id, return_value, riid, &ppvDevice); + consumer->Process_ID3D11DeviceContext_OMSetDepthStencilState(call_info, object_id, pDepthStencilState, StencilRef); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12RootSignatureDeserializer_GetRootSignatureDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_SOSetTargets(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder return_value; + UINT NumBuffers; + HandlePointerDecoder ppSOTargets; + PointerDecoder pOffsets; - bytes_read += return_value.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppSOTargets.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pOffsets.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12RootSignatureDeserializer_GetRootSignatureDesc(call_info, object_id, &return_value); + consumer->Process_ID3D11DeviceContext_SOSetTargets(call_info, object_id, NumBuffers, &ppSOTargets, &pOffsets); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12VersionedRootSignatureDeserializer_GetRootSignatureDescAtVersion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DrawAuto(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D_ROOT_SIGNATURE_VERSION convertToVersion; - StructPointerDecoder ppDesc; - HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &convertToVersion); - bytes_read += ppDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12VersionedRootSignatureDeserializer_GetRootSignatureDescAtVersion(call_info, object_id, return_value, convertToVersion, &ppDesc); + consumer->Process_ID3D11DeviceContext_DrawAuto(call_info, object_id); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12VersionedRootSignatureDeserializer_GetUnconvertedRootSignatureDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DrawIndexedInstancedIndirect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder return_value; + format::HandleId pBufferForArgs; + UINT AlignedByteOffsetForArgs; - bytes_read += return_value.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pBufferForArgs); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &AlignedByteOffsetForArgs); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12VersionedRootSignatureDeserializer_GetUnconvertedRootSignatureDesc(call_info, object_id, &return_value); + consumer->Process_ID3D11DeviceContext_DrawIndexedInstancedIndirect(call_info, object_id, pBufferForArgs, AlignedByteOffsetForArgs); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Heap_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DrawInstancedIndirect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_HEAP_DESC return_value; - D3D12_HEAP_DESC value_returned; - return_value.decoded_value = &value_returned; + format::HandleId pBufferForArgs; + UINT AlignedByteOffsetForArgs; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pBufferForArgs); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &AlignedByteOffsetForArgs); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Heap_GetDesc(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext_DrawInstancedIndirect(call_info, object_id, pBufferForArgs, AlignedByteOffsetForArgs); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Resource_Map(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_Dispatch(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Subresource; - StructPointerDecoder pReadRange; - PointerDecoder ppData; - HRESULT return_value; + UINT ThreadGroupCountX; + UINT ThreadGroupCountY; + UINT ThreadGroupCountZ; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); - bytes_read += pReadRange.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ppData.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountX); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountY); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountZ); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Resource_Map(call_info, object_id, return_value, Subresource, &pReadRange, &ppData); + consumer->Process_ID3D11DeviceContext_Dispatch(call_info, object_id, ThreadGroupCountX, ThreadGroupCountY, ThreadGroupCountZ); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Resource_Unmap(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DispatchIndirect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Subresource; - StructPointerDecoder pWrittenRange; + format::HandleId pBufferForArgs; + UINT AlignedByteOffsetForArgs; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); - bytes_read += pWrittenRange.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pBufferForArgs); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &AlignedByteOffsetForArgs); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Resource_Unmap(call_info, object_id, Subresource, &pWrittenRange); + consumer->Process_ID3D11DeviceContext_DispatchIndirect(call_info, object_id, pBufferForArgs, AlignedByteOffsetForArgs); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Resource_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_RSSetState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_RESOURCE_DESC return_value; - D3D12_RESOURCE_DESC value_returned; - return_value.decoded_value = &value_returned; + format::HandleId pRasterizerState; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRasterizerState); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Resource_GetDesc(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext_RSSetState(call_info, object_id, pRasterizerState); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Resource_GetGPUVirtualAddress(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_RSSetViewports(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_GPU_VIRTUAL_ADDRESS return_value; + UINT NumViewports; + StructPointerDecoder pViewports; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViewports); + bytes_read += pViewports.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Resource_GetGPUVirtualAddress(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext_RSSetViewports(call_info, object_id, NumViewports, &pViewports); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Resource_ReadFromSubresource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_RSSetScissorRects(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t pDstData; - UINT DstRowPitch; - UINT DstDepthPitch; - UINT SrcSubresource; - StructPointerDecoder pSrcBox; - HRESULT return_value; + UINT NumRects; + StructPointerDecoder pRects; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstData); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstRowPitch); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstDepthPitch); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcSubresource); - bytes_read += pSrcBox.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRects); + bytes_read += pRects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Resource_ReadFromSubresource(call_info, object_id, return_value, pDstData, DstRowPitch, DstDepthPitch, SrcSubresource, &pSrcBox); + consumer->Process_ID3D11DeviceContext_RSSetScissorRects(call_info, object_id, NumRects, &pRects); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Resource_GetHeapProperties(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_CopySubresourceRegion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pHeapProperties; - PointerDecoder pHeapFlags; - HRESULT return_value; + format::HandleId pDstResource; + UINT DstSubresource; + UINT DstX; + UINT DstY; + UINT DstZ; + format::HandleId pSrcResource; + UINT SrcSubresource; + StructPointerDecoder pSrcBox; - bytes_read += pHeapProperties.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pHeapFlags.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstSubresource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstX); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstY); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstZ); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcSubresource); + bytes_read += pSrcBox.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Resource_GetHeapProperties(call_info, object_id, return_value, &pHeapProperties, &pHeapFlags); + consumer->Process_ID3D11DeviceContext_CopySubresourceRegion(call_info, object_id, pDstResource, DstSubresource, DstX, DstY, DstZ, pSrcResource, SrcSubresource, &pSrcBox); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12CommandAllocator_Reset(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_CopyResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HRESULT return_value; + format::HandleId pDstResource; + format::HandleId pSrcResource; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcResource); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12CommandAllocator_Reset(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext_CopyResource(call_info, object_id, pDstResource, pSrcResource); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Fence_GetCompletedValue(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_CopyStructureCount(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 return_value; + format::HandleId pDstBuffer; + UINT DstAlignedByteOffset; + format::HandleId pSrcView; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstBuffer); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstAlignedByteOffset); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcView); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Fence_GetCompletedValue(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext_CopyStructureCount(call_info, object_id, pDstBuffer, DstAlignedByteOffset, pSrcView); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Fence_SetEventOnCompletion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_ClearRenderTargetView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 Value; - uint64_t hEvent; - HRESULT return_value; + format::HandleId pRenderTargetView; + PointerDecoder ColorRGBA; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Value); - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRenderTargetView); + bytes_read += ColorRGBA.DecodeFloat((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Fence_SetEventOnCompletion(call_info, object_id, return_value, Value, hEvent); + consumer->Process_ID3D11DeviceContext_ClearRenderTargetView(call_info, object_id, pRenderTargetView, &ColorRGBA); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Fence_Signal(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_ClearUnorderedAccessViewUint(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 Value; - HRESULT return_value; + format::HandleId pUnorderedAccessView; + PointerDecoder Values; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Value); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pUnorderedAccessView); + bytes_read += Values.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Fence_Signal(call_info, object_id, return_value, Value); + consumer->Process_ID3D11DeviceContext_ClearUnorderedAccessViewUint(call_info, object_id, pUnorderedAccessView, &Values); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Fence1_GetCreationFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_ClearUnorderedAccessViewFloat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_FENCE_FLAGS return_value; + format::HandleId pUnorderedAccessView; + PointerDecoder Values; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pUnorderedAccessView); + bytes_read += Values.DecodeFloat((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Fence1_GetCreationFlags(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext_ClearUnorderedAccessViewFloat(call_info, object_id, pUnorderedAccessView, &Values); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12PipelineState_GetCachedBlob(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_ClearDepthStencilView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HandlePointerDecoder ppBlob; - HRESULT return_value; + format::HandleId pDepthStencilView; + UINT ClearFlags; + FLOAT Depth; + UINT8 Stencil; - bytes_read += ppBlob.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDepthStencilView); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ClearFlags); + bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Depth); + bytes_read += ValueDecoder::DecodeUInt8Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Stencil); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12PipelineState_GetCachedBlob(call_info, object_id, return_value, &ppBlob); + consumer->Process_ID3D11DeviceContext_ClearDepthStencilView(call_info, object_id, pDepthStencilView, ClearFlags, Depth, Stencil); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DescriptorHeap_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_GenerateMips(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_DESCRIPTOR_HEAP_DESC return_value; - D3D12_DESCRIPTOR_HEAP_DESC value_returned; - return_value.decoded_value = &value_returned; - - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + format::HandleId pShaderResourceView; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pShaderResourceView); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DescriptorHeap_GetDesc(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext_GenerateMips(call_info, object_id, pShaderResourceView); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_SetResourceMinLOD(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE return_value; - D3D12_CPU_DESCRIPTOR_HANDLE value_returned; - return_value.decoded_value = &value_returned; + format::HandleId pResource; + FLOAT MinLOD; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MinLOD); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext_SetResourceMinLOD(call_info, object_id, pResource, MinLOD); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_GetResourceMinLOD(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_GPU_DESCRIPTOR_HANDLE return_value; - D3D12_GPU_DESCRIPTOR_HANDLE value_returned; - return_value.decoded_value = &value_returned; + format::HandleId pResource; + FLOAT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext_GetResourceMinLOD(call_info, object_id, return_value, pResource); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12CommandList_GetType(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_ResolveSubresource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_COMMAND_LIST_TYPE return_value; + format::HandleId pDstResource; + UINT DstSubresource; + format::HandleId pSrcResource; + UINT SrcSubresource; + DXGI_FORMAT Format; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstSubresource); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcSubresource); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12CommandList_GetType(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext_ResolveSubresource(call_info, object_id, pDstResource, DstSubresource, pSrcResource, SrcSubresource, Format); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_Close(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_ExecuteCommandList(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HRESULT return_value; + format::HandleId pCommandList; + BOOL RestoreContextState; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCommandList); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RestoreContextState); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_Close(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext_ExecuteCommandList(call_info, object_id, pCommandList, RestoreContextState); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_Reset(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_HSSetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pAllocator; - format::HandleId pInitialState; - HRESULT return_value; + UINT StartSlot; + UINT NumViews; + HandlePointerDecoder ppShaderResourceViews; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pAllocator); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pInitialState); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += ppShaderResourceViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_Reset(call_info, object_id, return_value, pAllocator, pInitialState); + consumer->Process_ID3D11DeviceContext_HSSetShaderResources(call_info, object_id, StartSlot, NumViews, &ppShaderResourceViews); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ClearState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_HSSetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pPipelineState; + format::HandleId pHullShader; + HandlePointerDecoder ppClassInstances; + UINT NumClassInstances; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pPipelineState); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pHullShader); + bytes_read += ppClassInstances.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumClassInstances); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_ClearState(call_info, object_id, pPipelineState); + consumer->Process_ID3D11DeviceContext_HSSetShader(call_info, object_id, pHullShader, &ppClassInstances, NumClassInstances); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_DrawInstanced(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_HSSetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT VertexCountPerInstance; - UINT InstanceCount; - UINT StartVertexLocation; - UINT StartInstanceLocation; + UINT StartSlot; + UINT NumSamplers; + HandlePointerDecoder ppSamplers; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &VertexCountPerInstance); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InstanceCount); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartVertexLocation); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartInstanceLocation); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSamplers); + bytes_read += ppSamplers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_DrawInstanced(call_info, object_id, VertexCountPerInstance, InstanceCount, StartVertexLocation, StartInstanceLocation); + consumer->Process_ID3D11DeviceContext_HSSetSamplers(call_info, object_id, StartSlot, NumSamplers, &ppSamplers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_DrawIndexedInstanced(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_HSSetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT IndexCountPerInstance; - UINT InstanceCount; - UINT StartIndexLocation; - INT BaseVertexLocation; - UINT StartInstanceLocation; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &IndexCountPerInstance); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InstanceCount); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartIndexLocation); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BaseVertexLocation); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartInstanceLocation); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_DrawIndexedInstanced(call_info, object_id, IndexCountPerInstance, InstanceCount, StartIndexLocation, BaseVertexLocation, StartInstanceLocation); + consumer->Process_ID3D11DeviceContext_HSSetConstantBuffers(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_Dispatch(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DSSetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT ThreadGroupCountX; - UINT ThreadGroupCountY; - UINT ThreadGroupCountZ; + UINT StartSlot; + UINT NumViews; + HandlePointerDecoder ppShaderResourceViews; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountX); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountY); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountZ); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += ppShaderResourceViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_Dispatch(call_info, object_id, ThreadGroupCountX, ThreadGroupCountY, ThreadGroupCountZ); + consumer->Process_ID3D11DeviceContext_DSSetShaderResources(call_info, object_id, StartSlot, NumViews, &ppShaderResourceViews); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_CopyBufferRegion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DSSetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDstBuffer; - UINT64 DstOffset; - format::HandleId pSrcBuffer; - UINT64 SrcOffset; - UINT64 NumBytes; + format::HandleId pDomainShader; + HandlePointerDecoder ppClassInstances; + UINT NumClassInstances; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstBuffer); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstOffset); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcBuffer); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcOffset); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBytes); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDomainShader); + bytes_read += ppClassInstances.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumClassInstances); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_CopyBufferRegion(call_info, object_id, pDstBuffer, DstOffset, pSrcBuffer, SrcOffset, NumBytes); + consumer->Process_ID3D11DeviceContext_DSSetShader(call_info, object_id, pDomainShader, &ppClassInstances, NumClassInstances); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_CopyTextureRegion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DSSetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDst; - UINT DstX; - UINT DstY; - UINT DstZ; - StructPointerDecoder pSrc; - StructPointerDecoder pSrcBox; + UINT StartSlot; + UINT NumSamplers; + HandlePointerDecoder ppSamplers; - bytes_read += pDst.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstX); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstY); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstZ); - bytes_read += pSrc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pSrcBox.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSamplers); + bytes_read += ppSamplers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_CopyTextureRegion(call_info, object_id, &pDst, DstX, DstY, DstZ, &pSrc, &pSrcBox); + consumer->Process_ID3D11DeviceContext_DSSetSamplers(call_info, object_id, StartSlot, NumSamplers, &ppSamplers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_CopyResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DSSetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDstResource; - format::HandleId pSrcResource; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_CopyResource(call_info, object_id, pDstResource, pSrcResource); + consumer->Process_ID3D11DeviceContext_DSSetConstantBuffers(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_CopyTiles(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_CSSetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pTiledResource; - StructPointerDecoder pTileRegionStartCoordinate; - StructPointerDecoder pTileRegionSize; - format::HandleId pBuffer; - UINT64 BufferStartOffsetInBytes; - D3D12_TILE_COPY_FLAGS Flags; + UINT StartSlot; + UINT NumViews; + HandlePointerDecoder ppShaderResourceViews; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTiledResource); - bytes_read += pTileRegionStartCoordinate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pTileRegionSize.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pBuffer); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferStartOffsetInBytes); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += ppShaderResourceViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_CopyTiles(call_info, object_id, pTiledResource, &pTileRegionStartCoordinate, &pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); + consumer->Process_ID3D11DeviceContext_CSSetShaderResources(call_info, object_id, StartSlot, NumViews, &ppShaderResourceViews); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ResolveSubresource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_CSSetUnorderedAccessViews(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDstResource; - UINT DstSubresource; - format::HandleId pSrcResource; - UINT SrcSubresource; - DXGI_FORMAT Format; + UINT StartSlot; + UINT NumUAVs; + HandlePointerDecoder ppUnorderedAccessViews; + PointerDecoder pUAVInitialCounts; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstSubresource); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcResource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcSubresource); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumUAVs); + bytes_read += ppUnorderedAccessViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pUAVInitialCounts.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_ResolveSubresource(call_info, object_id, pDstResource, DstSubresource, pSrcResource, SrcSubresource, Format); + consumer->Process_ID3D11DeviceContext_CSSetUnorderedAccessViews(call_info, object_id, StartSlot, NumUAVs, &ppUnorderedAccessViews, &pUAVInitialCounts); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_IASetPrimitiveTopology(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_CSSetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D_PRIMITIVE_TOPOLOGY PrimitiveTopology; + format::HandleId pComputeShader; + HandlePointerDecoder ppClassInstances; + UINT NumClassInstances; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &PrimitiveTopology); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pComputeShader); + bytes_read += ppClassInstances.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumClassInstances); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_IASetPrimitiveTopology(call_info, object_id, PrimitiveTopology); + consumer->Process_ID3D11DeviceContext_CSSetShader(call_info, object_id, pComputeShader, &ppClassInstances, NumClassInstances); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_RSSetViewports(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_CSSetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumViewports; - StructPointerDecoder pViewports; + UINT StartSlot; + UINT NumSamplers; + HandlePointerDecoder ppSamplers; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViewports); - bytes_read += pViewports.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSamplers); + bytes_read += ppSamplers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_RSSetViewports(call_info, object_id, NumViewports, &pViewports); + consumer->Process_ID3D11DeviceContext_CSSetSamplers(call_info, object_id, StartSlot, NumSamplers, &ppSamplers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_RSSetScissorRects(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_CSSetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumRects; - StructPointerDecoder pRects; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRects); - bytes_read += pRects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_RSSetScissorRects(call_info, object_id, NumRects, &pRects); + consumer->Process_ID3D11DeviceContext_CSSetConstantBuffers(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_OMSetBlendFactor(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_VSGetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder BlendFactor; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; - bytes_read += BlendFactor.DecodeFloat((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_OMSetBlendFactor(call_info, object_id, &BlendFactor); + consumer->Process_ID3D11DeviceContext_VSGetConstantBuffers(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_OMSetStencilRef(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_PSGetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT StencilRef; + UINT StartSlot; + UINT NumViews; + HandlePointerDecoder ppShaderResourceViews; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StencilRef); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += ppShaderResourceViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_OMSetStencilRef(call_info, object_id, StencilRef); + consumer->Process_ID3D11DeviceContext_PSGetShaderResources(call_info, object_id, StartSlot, NumViews, &ppShaderResourceViews); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetPipelineState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_PSGetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pPipelineState; + HandlePointerDecoder ppPixelShader; + HandlePointerDecoder ppClassInstances; + PointerDecoder pNumClassInstances; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pPipelineState); + bytes_read += ppPixelShader.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppClassInstances.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumClassInstances.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetPipelineState(call_info, object_id, pPipelineState); + consumer->Process_ID3D11DeviceContext_PSGetShader(call_info, object_id, &ppPixelShader, &ppClassInstances, &pNumClassInstances); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ResourceBarrier(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_PSGetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumBarriers; - StructPointerDecoder pBarriers; + UINT StartSlot; + UINT NumSamplers; + HandlePointerDecoder ppSamplers; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBarriers); - bytes_read += pBarriers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSamplers); + bytes_read += ppSamplers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_ResourceBarrier(call_info, object_id, NumBarriers, &pBarriers); + consumer->Process_ID3D11DeviceContext_PSGetSamplers(call_info, object_id, StartSlot, NumSamplers, &ppSamplers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ExecuteBundle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_VSGetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pCommandList; + HandlePointerDecoder ppVertexShader; + HandlePointerDecoder ppClassInstances; + PointerDecoder pNumClassInstances; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCommandList); + bytes_read += ppVertexShader.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppClassInstances.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumClassInstances.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_ExecuteBundle(call_info, object_id, pCommandList); + consumer->Process_ID3D11DeviceContext_VSGetShader(call_info, object_id, &ppVertexShader, &ppClassInstances, &pNumClassInstances); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetDescriptorHeaps(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_PSGetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumDescriptorHeaps; - HandlePointerDecoder ppDescriptorHeaps; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumDescriptorHeaps); - bytes_read += ppDescriptorHeaps.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetDescriptorHeaps(call_info, object_id, NumDescriptorHeaps, &ppDescriptorHeaps); + consumer->Process_ID3D11DeviceContext_PSGetConstantBuffers(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetComputeRootSignature(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_IAGetInputLayout(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pRootSignature; + HandlePointerDecoder ppInputLayout; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRootSignature); + bytes_read += ppInputLayout.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetComputeRootSignature(call_info, object_id, pRootSignature); + consumer->Process_ID3D11DeviceContext_IAGetInputLayout(call_info, object_id, &ppInputLayout); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetGraphicsRootSignature(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_IAGetVertexBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pRootSignature; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppVertexBuffers; + PointerDecoder pStrides; + PointerDecoder pOffsets; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRootSignature); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppVertexBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pStrides.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pOffsets.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetGraphicsRootSignature(call_info, object_id, pRootSignature); + consumer->Process_ID3D11DeviceContext_IAGetVertexBuffers(call_info, object_id, StartSlot, NumBuffers, &ppVertexBuffers, &pStrides, &pOffsets); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetComputeRootDescriptorTable(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_IAGetIndexBuffer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT RootParameterIndex; - Decoded_D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor; - D3D12_GPU_DESCRIPTOR_HANDLE value_BaseDescriptor; - BaseDescriptor.decoded_value = &value_BaseDescriptor; + HandlePointerDecoder pIndexBuffer; + PointerDecoder Format; + PointerDecoder Offset; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BaseDescriptor); + bytes_read += pIndexBuffer.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += Format.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += Offset.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetComputeRootDescriptorTable(call_info, object_id, RootParameterIndex, BaseDescriptor); + consumer->Process_ID3D11DeviceContext_IAGetIndexBuffer(call_info, object_id, &pIndexBuffer, &Format, &Offset); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_GSGetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT RootParameterIndex; - Decoded_D3D12_GPU_DESCRIPTOR_HANDLE BaseDescriptor; - D3D12_GPU_DESCRIPTOR_HANDLE value_BaseDescriptor; - BaseDescriptor.decoded_value = &value_BaseDescriptor; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BaseDescriptor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetGraphicsRootDescriptorTable(call_info, object_id, RootParameterIndex, BaseDescriptor); + consumer->Process_ID3D11DeviceContext_GSGetConstantBuffers(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetComputeRoot32BitConstant(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_GSGetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT RootParameterIndex; - UINT SrcData; - UINT DestOffsetIn32BitValues; - - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcData); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestOffsetIn32BitValues); - + HandlePointerDecoder ppGeometryShader; + HandlePointerDecoder ppClassInstances; + PointerDecoder pNumClassInstances; + + bytes_read += ppGeometryShader.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppClassInstances.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumClassInstances.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetComputeRoot32BitConstant(call_info, object_id, RootParameterIndex, SrcData, DestOffsetIn32BitValues); + consumer->Process_ID3D11DeviceContext_GSGetShader(call_info, object_id, &ppGeometryShader, &ppClassInstances, &pNumClassInstances); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstant(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_IAGetPrimitiveTopology(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT RootParameterIndex; - UINT SrcData; - UINT DestOffsetIn32BitValues; + PointerDecoder pTopology; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcData); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestOffsetIn32BitValues); + bytes_read += pTopology.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstant(call_info, object_id, RootParameterIndex, SrcData, DestOffsetIn32BitValues); + consumer->Process_ID3D11DeviceContext_IAGetPrimitiveTopology(call_info, object_id, &pTopology); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetComputeRoot32BitConstants(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_VSGetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT RootParameterIndex; - UINT Num32BitValuesToSet; - PointerDecoder pSrcData; - UINT DestOffsetIn32BitValues; + UINT StartSlot; + UINT NumViews; + HandlePointerDecoder ppShaderResourceViews; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Num32BitValuesToSet); - bytes_read += pSrcData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestOffsetIn32BitValues); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += ppShaderResourceViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetComputeRoot32BitConstants(call_info, object_id, RootParameterIndex, Num32BitValuesToSet, &pSrcData, DestOffsetIn32BitValues); + consumer->Process_ID3D11DeviceContext_VSGetShaderResources(call_info, object_id, StartSlot, NumViews, &ppShaderResourceViews); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstants(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_VSGetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT RootParameterIndex; - UINT Num32BitValuesToSet; - PointerDecoder pSrcData; - UINT DestOffsetIn32BitValues; + UINT StartSlot; + UINT NumSamplers; + HandlePointerDecoder ppSamplers; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Num32BitValuesToSet); - bytes_read += pSrcData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestOffsetIn32BitValues); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSamplers); + bytes_read += ppSamplers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetGraphicsRoot32BitConstants(call_info, object_id, RootParameterIndex, Num32BitValuesToSet, &pSrcData, DestOffsetIn32BitValues); + consumer->Process_ID3D11DeviceContext_VSGetSamplers(call_info, object_id, StartSlot, NumSamplers, &ppSamplers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetComputeRootConstantBufferView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_GetPredication(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT RootParameterIndex; - D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + HandlePointerDecoder ppPredicate; + PointerDecoder pPredicateValue; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferLocation); + bytes_read += ppPredicate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pPredicateValue.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetComputeRootConstantBufferView(call_info, object_id, RootParameterIndex, BufferLocation); + consumer->Process_ID3D11DeviceContext_GetPredication(call_info, object_id, &ppPredicate, &pPredicateValue); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_GSGetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT RootParameterIndex; - D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + UINT StartSlot; + UINT NumViews; + HandlePointerDecoder ppShaderResourceViews; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferLocation); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += ppShaderResourceViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetGraphicsRootConstantBufferView(call_info, object_id, RootParameterIndex, BufferLocation); + consumer->Process_ID3D11DeviceContext_GSGetShaderResources(call_info, object_id, StartSlot, NumViews, &ppShaderResourceViews); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetComputeRootShaderResourceView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_GSGetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT RootParameterIndex; - D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + UINT StartSlot; + UINT NumSamplers; + HandlePointerDecoder ppSamplers; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferLocation); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSamplers); + bytes_read += ppSamplers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetComputeRootShaderResourceView(call_info, object_id, RootParameterIndex, BufferLocation); + consumer->Process_ID3D11DeviceContext_GSGetSamplers(call_info, object_id, StartSlot, NumSamplers, &ppSamplers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetGraphicsRootShaderResourceView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_OMGetRenderTargets(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT RootParameterIndex; - D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + UINT NumViews; + HandlePointerDecoder ppRenderTargetViews; + HandlePointerDecoder ppDepthStencilView; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferLocation); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += ppRenderTargetViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppDepthStencilView.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetGraphicsRootShaderResourceView(call_info, object_id, RootParameterIndex, BufferLocation); + consumer->Process_ID3D11DeviceContext_OMGetRenderTargets(call_info, object_id, NumViews, &ppRenderTargetViews, &ppDepthStencilView); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetComputeRootUnorderedAccessView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT RootParameterIndex; - D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + UINT NumRTVs; + HandlePointerDecoder ppRenderTargetViews; + HandlePointerDecoder ppDepthStencilView; + UINT UAVStartSlot; + UINT NumUAVs; + HandlePointerDecoder ppUnorderedAccessViews; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferLocation); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRTVs); + bytes_read += ppRenderTargetViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppDepthStencilView.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &UAVStartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumUAVs); + bytes_read += ppUnorderedAccessViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetComputeRootUnorderedAccessView(call_info, object_id, RootParameterIndex, BufferLocation); + consumer->Process_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews(call_info, object_id, NumRTVs, &ppRenderTargetViews, &ppDepthStencilView, UAVStartSlot, NumUAVs, &ppUnorderedAccessViews); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetGraphicsRootUnorderedAccessView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_OMGetBlendState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT RootParameterIndex; - D3D12_GPU_VIRTUAL_ADDRESS BufferLocation; + HandlePointerDecoder ppBlendState; + PointerDecoder BlendFactor; + PointerDecoder pSampleMask; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RootParameterIndex); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferLocation); + bytes_read += ppBlendState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += BlendFactor.DecodeFloat((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pSampleMask.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetGraphicsRootUnorderedAccessView(call_info, object_id, RootParameterIndex, BufferLocation); + consumer->Process_ID3D11DeviceContext_OMGetBlendState(call_info, object_id, &ppBlendState, &BlendFactor, &pSampleMask); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_IASetIndexBuffer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_OMGetDepthStencilState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pView; + HandlePointerDecoder ppDepthStencilState; + PointerDecoder pStencilRef; - bytes_read += pView.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppDepthStencilState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pStencilRef.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_IASetIndexBuffer(call_info, object_id, &pView); + consumer->Process_ID3D11DeviceContext_OMGetDepthStencilState(call_info, object_id, &ppDepthStencilState, &pStencilRef); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_IASetVertexBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_SOGetTargets(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT StartSlot; - UINT NumViews; - StructPointerDecoder pViews; + UINT NumBuffers; + HandlePointerDecoder ppSOTargets; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); - bytes_read += pViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppSOTargets.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_IASetVertexBuffers(call_info, object_id, StartSlot, NumViews, &pViews); + consumer->Process_ID3D11DeviceContext_SOGetTargets(call_info, object_id, NumBuffers, &ppSOTargets); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SOSetTargets(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_RSGetState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT StartSlot; - UINT NumViews; - StructPointerDecoder pViews; + HandlePointerDecoder ppRasterizerState; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); - bytes_read += pViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppRasterizerState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SOSetTargets(call_info, object_id, StartSlot, NumViews, &pViews); + consumer->Process_ID3D11DeviceContext_RSGetState(call_info, object_id, &ppRasterizerState); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_OMSetRenderTargets(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_RSGetViewports(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumRenderTargetDescriptors; - StructPointerDecoder pRenderTargetDescriptors; - BOOL RTsSingleHandleToDescriptorRange; - StructPointerDecoder pDepthStencilDescriptor; + PointerDecoder pNumViewports; + StructPointerDecoder pViewports; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRenderTargetDescriptors); - bytes_read += pRenderTargetDescriptors.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RTsSingleHandleToDescriptorRange); - bytes_read += pDepthStencilDescriptor.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumViewports.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pViewports.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_OMSetRenderTargets(call_info, object_id, NumRenderTargetDescriptors, &pRenderTargetDescriptors, RTsSingleHandleToDescriptorRange, &pDepthStencilDescriptor); + consumer->Process_ID3D11DeviceContext_RSGetViewports(call_info, object_id, &pNumViewports, &pViewports); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ClearDepthStencilView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_RSGetScissorRects(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DepthStencilView; - D3D12_CPU_DESCRIPTOR_HANDLE value_DepthStencilView; - DepthStencilView.decoded_value = &value_DepthStencilView; - D3D12_CLEAR_FLAGS ClearFlags; - FLOAT Depth; - UINT8 Stencil; - UINT NumRects; + PointerDecoder pNumRects; StructPointerDecoder pRects; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DepthStencilView); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ClearFlags); - bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Depth); - bytes_read += ValueDecoder::DecodeUInt8Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Stencil); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRects); + bytes_read += pNumRects.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += pRects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_ClearDepthStencilView(call_info, object_id, DepthStencilView, ClearFlags, Depth, Stencil, NumRects, &pRects); + consumer->Process_ID3D11DeviceContext_RSGetScissorRects(call_info, object_id, &pNumRects, &pRects); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ClearRenderTargetView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_HSGetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE RenderTargetView; - D3D12_CPU_DESCRIPTOR_HANDLE value_RenderTargetView; - RenderTargetView.decoded_value = &value_RenderTargetView; - PointerDecoder ColorRGBA; - UINT NumRects; - StructPointerDecoder pRects; + UINT StartSlot; + UINT NumViews; + HandlePointerDecoder ppShaderResourceViews; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RenderTargetView); - bytes_read += ColorRGBA.DecodeFloat((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRects); - bytes_read += pRects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += ppShaderResourceViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_ClearRenderTargetView(call_info, object_id, RenderTargetView, &ColorRGBA, NumRects, &pRects); + consumer->Process_ID3D11DeviceContext_HSGetShaderResources(call_info, object_id, StartSlot, NumViews, &ppShaderResourceViews); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ClearUnorderedAccessViewUint(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_HSGetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap; - D3D12_GPU_DESCRIPTOR_HANDLE value_ViewGPUHandleInCurrentHeap; - ViewGPUHandleInCurrentHeap.decoded_value = &value_ViewGPUHandleInCurrentHeap; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle; - D3D12_CPU_DESCRIPTOR_HANDLE value_ViewCPUHandle; - ViewCPUHandle.decoded_value = &value_ViewCPUHandle; - format::HandleId pResource; - PointerDecoder Values; - UINT NumRects; - StructPointerDecoder pRects; + HandlePointerDecoder ppHullShader; + HandlePointerDecoder ppClassInstances; + PointerDecoder pNumClassInstances; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ViewGPUHandleInCurrentHeap); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ViewCPUHandle); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += Values.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRects); - bytes_read += pRects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppHullShader.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppClassInstances.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumClassInstances.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_ClearUnorderedAccessViewUint(call_info, object_id, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, &Values, NumRects, &pRects); + consumer->Process_ID3D11DeviceContext_HSGetShader(call_info, object_id, &ppHullShader, &ppClassInstances, &pNumClassInstances); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ClearUnorderedAccessViewFloat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_HSGetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_GPU_DESCRIPTOR_HANDLE ViewGPUHandleInCurrentHeap; - D3D12_GPU_DESCRIPTOR_HANDLE value_ViewGPUHandleInCurrentHeap; - ViewGPUHandleInCurrentHeap.decoded_value = &value_ViewGPUHandleInCurrentHeap; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE ViewCPUHandle; - D3D12_CPU_DESCRIPTOR_HANDLE value_ViewCPUHandle; - ViewCPUHandle.decoded_value = &value_ViewCPUHandle; - format::HandleId pResource; - PointerDecoder Values; - UINT NumRects; - StructPointerDecoder pRects; + UINT StartSlot; + UINT NumSamplers; + HandlePointerDecoder ppSamplers; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ViewGPUHandleInCurrentHeap); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ViewCPUHandle); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += Values.DecodeFloat((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRects); - bytes_read += pRects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSamplers); + bytes_read += ppSamplers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_ClearUnorderedAccessViewFloat(call_info, object_id, ViewGPUHandleInCurrentHeap, ViewCPUHandle, pResource, &Values, NumRects, &pRects); + consumer->Process_ID3D11DeviceContext_HSGetSamplers(call_info, object_id, StartSlot, NumSamplers, &ppSamplers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_DiscardResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_HSGetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pResource; - StructPointerDecoder pRegion; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += pRegion.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_DiscardResource(call_info, object_id, pResource, &pRegion); + consumer->Process_ID3D11DeviceContext_HSGetConstantBuffers(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_BeginQuery(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DSGetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pQueryHeap; - D3D12_QUERY_TYPE Type; - UINT Index; + UINT StartSlot; + UINT NumViews; + HandlePointerDecoder ppShaderResourceViews; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pQueryHeap); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Index); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += ppShaderResourceViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_BeginQuery(call_info, object_id, pQueryHeap, Type, Index); + consumer->Process_ID3D11DeviceContext_DSGetShaderResources(call_info, object_id, StartSlot, NumViews, &ppShaderResourceViews); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_EndQuery(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DSGetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pQueryHeap; - D3D12_QUERY_TYPE Type; - UINT Index; + HandlePointerDecoder ppDomainShader; + HandlePointerDecoder ppClassInstances; + PointerDecoder pNumClassInstances; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pQueryHeap); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Index); + bytes_read += ppDomainShader.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppClassInstances.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumClassInstances.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_EndQuery(call_info, object_id, pQueryHeap, Type, Index); + consumer->Process_ID3D11DeviceContext_DSGetShader(call_info, object_id, &ppDomainShader, &ppClassInstances, &pNumClassInstances); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ResolveQueryData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DSGetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pQueryHeap; - D3D12_QUERY_TYPE Type; - UINT StartIndex; - UINT NumQueries; - format::HandleId pDestinationBuffer; - UINT64 AlignedDestinationBufferOffset; + UINT StartSlot; + UINT NumSamplers; + HandlePointerDecoder ppSamplers; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pQueryHeap); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartIndex); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumQueries); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDestinationBuffer); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &AlignedDestinationBufferOffset); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSamplers); + bytes_read += ppSamplers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_ResolveQueryData(call_info, object_id, pQueryHeap, Type, StartIndex, NumQueries, pDestinationBuffer, AlignedDestinationBufferOffset); + consumer->Process_ID3D11DeviceContext_DSGetSamplers(call_info, object_id, StartSlot, NumSamplers, &ppSamplers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetPredication(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_DSGetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pBuffer; - UINT64 AlignedBufferOffset; - D3D12_PREDICATION_OP Operation; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pBuffer); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &AlignedBufferOffset); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Operation); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetPredication(call_info, object_id, pBuffer, AlignedBufferOffset, Operation); + consumer->Process_ID3D11DeviceContext_DSGetConstantBuffers(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_SetMarker(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_CSGetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Metadata; - PointerDecoder pData; - UINT Size; + UINT StartSlot; + UINT NumViews; + HandlePointerDecoder ppShaderResourceViews; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Metadata); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumViews); + bytes_read += ppShaderResourceViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_SetMarker(call_info, object_id, Metadata, &pData, Size); + consumer->Process_ID3D11DeviceContext_CSGetShaderResources(call_info, object_id, StartSlot, NumViews, &ppShaderResourceViews); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_BeginEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_CSGetUnorderedAccessViews(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Metadata; - PointerDecoder pData; - UINT Size; - - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Metadata); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); + UINT StartSlot; + UINT NumUAVs; + HandlePointerDecoder ppUnorderedAccessViews; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumUAVs); + bytes_read += ppUnorderedAccessViews.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_BeginEvent(call_info, object_id, Metadata, &pData, Size); + consumer->Process_ID3D11DeviceContext_CSGetUnorderedAccessViews(call_info, object_id, StartSlot, NumUAVs, &ppUnorderedAccessViews); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_EndEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_CSGetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + HandlePointerDecoder ppComputeShader; + HandlePointerDecoder ppClassInstances; + PointerDecoder pNumClassInstances; + bytes_read += ppComputeShader.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppClassInstances.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumClassInstances.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_EndEvent(call_info, object_id); + consumer->Process_ID3D11DeviceContext_CSGetShader(call_info, object_id, &ppComputeShader, &ppClassInstances, &pNumClassInstances); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList_ExecuteIndirect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_CSGetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pCommandSignature; - UINT MaxCommandCount; - format::HandleId pArgumentBuffer; - UINT64 ArgumentBufferOffset; - format::HandleId pCountBuffer; - UINT64 CountBufferOffset; + UINT StartSlot; + UINT NumSamplers; + HandlePointerDecoder ppSamplers; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCommandSignature); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MaxCommandCount); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pArgumentBuffer); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ArgumentBufferOffset); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCountBuffer); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CountBufferOffset); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSamplers); + bytes_read += ppSamplers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList_ExecuteIndirect(call_info, object_id, pCommandSignature, MaxCommandCount, pArgumentBuffer, ArgumentBufferOffset, pCountBuffer, CountBufferOffset); + consumer->Process_ID3D11DeviceContext_CSGetSamplers(call_info, object_id, StartSlot, NumSamplers, &ppSamplers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList1_AtomicCopyBufferUINT(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_CSGetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDstBuffer; - UINT64 DstOffset; - format::HandleId pSrcBuffer; - UINT64 SrcOffset; - UINT Dependencies; - HandlePointerDecoder ppDependentResources; - StructPointerDecoder pDependentSubresourceRanges; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstBuffer); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstOffset); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcBuffer); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcOffset); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Dependencies); - bytes_read += ppDependentResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pDependentSubresourceRanges.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList1_AtomicCopyBufferUINT(call_info, object_id, pDstBuffer, DstOffset, pSrcBuffer, SrcOffset, Dependencies, &ppDependentResources, &pDependentSubresourceRanges); + consumer->Process_ID3D11DeviceContext_CSGetConstantBuffers(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList1_AtomicCopyBufferUINT64(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_ClearState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDstBuffer; - UINT64 DstOffset; - format::HandleId pSrcBuffer; - UINT64 SrcOffset; - UINT Dependencies; - HandlePointerDecoder ppDependentResources; - StructPointerDecoder pDependentSubresourceRanges; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstBuffer); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstOffset); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcBuffer); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcOffset); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Dependencies); - bytes_read += ppDependentResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pDependentSubresourceRanges.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList1_AtomicCopyBufferUINT64(call_info, object_id, pDstBuffer, DstOffset, pSrcBuffer, SrcOffset, Dependencies, &ppDependentResources, &pDependentSubresourceRanges); + consumer->Process_ID3D11DeviceContext_ClearState(call_info, object_id); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList1_OMSetDepthBounds(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_Flush(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - FLOAT Min; - FLOAT Max; - bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Min); - bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Max); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList1_OMSetDepthBounds(call_info, object_id, Min, Max); + consumer->Process_ID3D11DeviceContext_Flush(call_info, object_id); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList1_SetSamplePositions(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_GetType(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumSamplesPerPixel; - UINT NumPixels; - StructPointerDecoder pSamplePositions; + D3D11_DEVICE_CONTEXT_TYPE return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSamplesPerPixel); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumPixels); - bytes_read += pSamplePositions.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList1_SetSamplePositions(call_info, object_id, NumSamplesPerPixel, NumPixels, &pSamplePositions); + consumer->Process_ID3D11DeviceContext_GetType(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList1_ResolveSubresourceRegion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_GetContextFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDstResource; - UINT DstSubresource; - UINT DstX; - UINT DstY; - format::HandleId pSrcResource; - UINT SrcSubresource; - StructPointerDecoder pSrcRect; - DXGI_FORMAT Format; - D3D12_RESOLVE_MODE ResolveMode; + UINT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstSubresource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstX); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstY); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcResource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcSubresource); - bytes_read += pSrcRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ResolveMode); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList1_ResolveSubresourceRegion(call_info, object_id, pDstResource, DstSubresource, DstX, DstY, pSrcResource, SrcSubresource, &pSrcRect, Format, ResolveMode); + consumer->Process_ID3D11DeviceContext_GetContextFlags(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList1_SetViewInstanceMask(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext_FinishCommandList(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Mask; + BOOL RestoreDeferredContextState; + HandlePointerDecoder ppCommandList; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Mask); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RestoreDeferredContextState); + bytes_read += ppCommandList.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList1_SetViewInstanceMask(call_info, object_id, Mask); + consumer->Process_ID3D11DeviceContext_FinishCommandList(call_info, object_id, return_value, RestoreDeferredContextState, &ppCommandList); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList2_WriteBufferImmediate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDecoder_GetCreationParameters(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Count; - StructPointerDecoder pParams; - PointerDecoder pModes; + StructPointerDecoder pVideoDesc; + StructPointerDecoder pConfig; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Count); - bytes_read += pParams.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pModes.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pVideoDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pConfig.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList2_WriteBufferImmediate(call_info, object_id, Count, &pParams, &pModes); + consumer->Process_ID3D11VideoDecoder_GetCreationParameters(call_info, object_id, return_value, &pVideoDesc, &pConfig); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12CommandQueue_UpdateTileMappings(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDecoder_GetDriverHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pResource; - UINT NumResourceRegions; - StructPointerDecoder pResourceRegionStartCoordinates; - StructPointerDecoder pResourceRegionSizes; - format::HandleId pHeap; - UINT NumRanges; - PointerDecoder pRangeFlags; - PointerDecoder pHeapRangeStartOffsets; - PointerDecoder pRangeTileCounts; - D3D12_TILE_MAPPING_FLAGS Flags; + PointerDecoder pDriverHandle; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumResourceRegions); - bytes_read += pResourceRegionStartCoordinates.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pResourceRegionSizes.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pHeap); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRanges); - bytes_read += pRangeFlags.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pHeapRangeStartOffsets.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pRangeTileCounts.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += pDriverHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12CommandQueue_UpdateTileMappings(call_info, object_id, pResource, NumResourceRegions, &pResourceRegionStartCoordinates, &pResourceRegionSizes, pHeap, NumRanges, &pRangeFlags, &pHeapRangeStartOffsets, &pRangeTileCounts, Flags); + consumer->Process_ID3D11VideoDecoder_GetDriverHandle(call_info, object_id, return_value, &pDriverHandle); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12CommandQueue_CopyTileMappings(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pDstResource; - StructPointerDecoder pDstRegionStartCoordinate; - format::HandleId pSrcResource; - StructPointerDecoder pSrcRegionStartCoordinate; - StructPointerDecoder pRegionSize; - D3D12_TILE_MAPPING_FLAGS Flags; + StructPointerDecoder pContentDesc; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); - bytes_read += pDstRegionStartCoordinate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcResource); - bytes_read += pSrcRegionStartCoordinate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pRegionSize.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += pContentDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12CommandQueue_CopyTileMappings(call_info, object_id, pDstResource, &pDstRegionStartCoordinate, pSrcResource, &pSrcRegionStartCoordinate, &pRegionSize, Flags); + consumer->Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc(call_info, object_id, return_value, &pContentDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12CommandQueue_ExecuteCommandLists(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumCommandLists; - HandlePointerDecoder ppCommandLists; + DXGI_FORMAT Format; + PointerDecoder pFlags; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumCommandLists); - bytes_read += ppCommandLists.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); + bytes_read += pFlags.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12CommandQueue_ExecuteCommandLists(call_info, object_id, NumCommandLists, &ppCommandLists); + consumer->Process_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(call_info, object_id, return_value, Format, &pFlags); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12CommandQueue_SetMarker(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Metadata; - PointerDecoder pData; - UINT Size; + StructPointerDecoder pCaps; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Metadata); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); + bytes_read += pCaps.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12CommandQueue_SetMarker(call_info, object_id, Metadata, &pData, Size); + consumer->Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps(call_info, object_id, return_value, &pCaps); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12CommandQueue_BeginEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Metadata; - PointerDecoder pData; - UINT Size; + UINT TypeIndex; + StructPointerDecoder pCaps; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Metadata); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &TypeIndex); + bytes_read += pCaps.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12CommandQueue_BeginEvent(call_info, object_id, Metadata, &pData, Size); + consumer->Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps(call_info, object_id, return_value, TypeIndex, &pCaps); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12CommandQueue_EndEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + UINT TypeIndex; + UINT CustomRateIndex; + StructPointerDecoder pRate; + HRESULT return_value; + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &TypeIndex); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CustomRateIndex); + bytes_read += pRate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12CommandQueue_EndEvent(call_info, object_id); + consumer->Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate(call_info, object_id, return_value, TypeIndex, CustomRateIndex, &pRate); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12CommandQueue_Signal(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pFence; - UINT64 Value; + D3D11_VIDEO_PROCESSOR_FILTER Filter; + StructPointerDecoder pRange; HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pFence); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Value); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Filter); + bytes_read += pRange.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12CommandQueue_Signal(call_info, object_id, return_value, pFence, Value); + consumer->Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange(call_info, object_id, return_value, Filter, &pRange); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12CommandQueue_Wait(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoProcessor_GetContentDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pFence; - UINT64 Value; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pFence); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Value); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12CommandQueue_Wait(call_info, object_id, return_value, pFence, Value); + consumer->Process_ID3D11VideoProcessor_GetContentDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12CommandQueue_GetTimestampFrequency(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoProcessor_GetRateConversionCaps(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pFrequency; - HRESULT return_value; + StructPointerDecoder pCaps; - bytes_read += pFrequency.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pCaps.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12CommandQueue_GetTimestampFrequency(call_info, object_id, return_value, &pFrequency); + consumer->Process_ID3D11VideoProcessor_GetRateConversionCaps(call_info, object_id, &pCaps); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12CommandQueue_GetClockCalibration(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11AuthenticatedChannel_GetCertificateSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pGpuTimestamp; - PointerDecoder pCpuTimestamp; + PointerDecoder pCertificateSize; HRESULT return_value; - bytes_read += pGpuTimestamp.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pCpuTimestamp.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pCertificateSize.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12CommandQueue_GetClockCalibration(call_info, object_id, return_value, &pGpuTimestamp, &pCpuTimestamp); + consumer->Process_ID3D11AuthenticatedChannel_GetCertificateSize(call_info, object_id, return_value, &pCertificateSize); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12CommandQueue_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11AuthenticatedChannel_GetCertificate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_COMMAND_QUEUE_DESC return_value; - D3D12_COMMAND_QUEUE_DESC value_returned; - return_value.decoded_value = &value_returned; + UINT CertificateSize; + PointerDecoder pCertificate; + HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CertificateSize); + bytes_read += pCertificate.DecodeUInt8((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12CommandQueue_GetDesc(call_info, object_id, return_value); + consumer->Process_ID3D11AuthenticatedChannel_GetCertificate(call_info, object_id, return_value, CertificateSize, &pCertificate); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_GetNodeCount(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11AuthenticatedChannel_GetChannelHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT return_value; + PointerDecoder pChannelHandle; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pChannelHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_GetNodeCount(call_info, object_id, return_value); + consumer->Process_ID3D11AuthenticatedChannel_GetChannelHandle(call_info, object_id, &pChannelHandle); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateCommandQueue(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11CryptoSession_GetCryptoType(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppCommandQueue; - HRESULT return_value; + StructPointerDecoder pCryptoType; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppCommandQueue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pCryptoType.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateCommandQueue(call_info, object_id, return_value, &pDesc, riid, &ppCommandQueue); + consumer->Process_ID3D11CryptoSession_GetCryptoType(call_info, object_id, &pCryptoType); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateCommandAllocator(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11CryptoSession_GetDecoderProfile(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_COMMAND_LIST_TYPE type; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppCommandAllocator; - HRESULT return_value; + StructPointerDecoder pDecoderProfile; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &type); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppCommandAllocator.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDecoderProfile.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateCommandAllocator(call_info, object_id, return_value, type, riid, &ppCommandAllocator); + consumer->Process_ID3D11CryptoSession_GetDecoderProfile(call_info, object_id, &pDecoderProfile); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateGraphicsPipelineState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11CryptoSession_GetCertificateSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - - StructPointerDecoder pDesc; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppPipelineState; + + PointerDecoder pCertificateSize; HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppPipelineState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pCertificateSize.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateGraphicsPipelineState(call_info, object_id, return_value, &pDesc, riid, &ppPipelineState); + consumer->Process_ID3D11CryptoSession_GetCertificateSize(call_info, object_id, return_value, &pCertificateSize); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateComputePipelineState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11CryptoSession_GetCertificate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppPipelineState; + UINT CertificateSize; + PointerDecoder pCertificate; HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppPipelineState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CertificateSize); + bytes_read += pCertificate.DecodeUInt8((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateComputePipelineState(call_info, object_id, return_value, &pDesc, riid, &ppPipelineState); + consumer->Process_ID3D11CryptoSession_GetCertificate(call_info, object_id, return_value, CertificateSize, &pCertificate); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateCommandList(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11CryptoSession_GetCryptoSessionHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT nodeMask; - D3D12_COMMAND_LIST_TYPE type; - format::HandleId pCommandAllocator; - format::HandleId pInitialState; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppCommandList; - HRESULT return_value; + PointerDecoder pCryptoSessionHandle; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &nodeMask); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &type); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCommandAllocator); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pInitialState); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppCommandList.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pCryptoSessionHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateCommandList(call_info, object_id, return_value, nodeMask, type, pCommandAllocator, pInitialState, riid, &ppCommandList); + consumer->Process_ID3D11CryptoSession_GetCryptoSessionHandle(call_info, object_id, &pCryptoSessionHandle); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateDescriptorHeap(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDecoderOutputView_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDescriptorHeapDesc; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvHeap; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += pDescriptorHeapDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvHeap.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateDescriptorHeap(call_info, object_id, return_value, &pDescriptorHeapDesc, riid, &ppvHeap); + consumer->Process_ID3D11VideoDecoderOutputView_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_GetDescriptorHandleIncrementSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoProcessorInputView_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapType; - UINT return_value; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DescriptorHeapType); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_GetDescriptorHandleIncrementSize(call_info, object_id, return_value, DescriptorHeapType); + consumer->Process_ID3D11VideoProcessorInputView_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateRootSignature(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoProcessorOutputView_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT nodeMask; - PointerDecoder pBlobWithRootSignature; - SIZE_T blobLengthInBytes; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvRootSignature; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &nodeMask); - bytes_read += pBlobWithRootSignature.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &blobLengthInBytes); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvRootSignature.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateRootSignature(call_info, object_id, return_value, nodeMask, &pBlobWithRootSignature, blobLengthInBytes, riid, &ppvRootSignature); + consumer->Process_ID3D11VideoProcessorOutputView_GetDesc(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateConstantBufferView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_GetDecoderBuffer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; - D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; - DestDescriptor.decoded_value = &value_DestDescriptor; + format::HandleId pDecoder; + D3D11_VIDEO_DECODER_BUFFER_TYPE Type; + PointerDecoder pBufferSize; + PointerDecoder ppBuffer; + HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDecoder); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += pBufferSize.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppBuffer.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateConstantBufferView(call_info, object_id, &pDesc, DestDescriptor); + consumer->Process_ID3D11VideoContext_GetDecoderBuffer(call_info, object_id, return_value, pDecoder, Type, &pBufferSize, &ppBuffer); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateShaderResourceView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_ReleaseDecoderBuffer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pResource; - StructPointerDecoder pDesc; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; - D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; - DestDescriptor.decoded_value = &value_DestDescriptor; + format::HandleId pDecoder; + D3D11_VIDEO_DECODER_BUFFER_TYPE Type; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDecoder); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateShaderResourceView(call_info, object_id, pResource, &pDesc, DestDescriptor); + consumer->Process_ID3D11VideoContext_ReleaseDecoderBuffer(call_info, object_id, return_value, pDecoder, Type); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateUnorderedAccessView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_DecoderBeginFrame(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pResource; - format::HandleId pCounterResource; - StructPointerDecoder pDesc; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; - D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; - DestDescriptor.decoded_value = &value_DestDescriptor; + format::HandleId pDecoder; + format::HandleId pView; + UINT ContentKeySize; + PointerDecoder pContentKey; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCounterResource); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDecoder); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pView); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ContentKeySize); + bytes_read += pContentKey.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateUnorderedAccessView(call_info, object_id, pResource, pCounterResource, &pDesc, DestDescriptor); + consumer->Process_ID3D11VideoContext_DecoderBeginFrame(call_info, object_id, return_value, pDecoder, pView, ContentKeySize, &pContentKey); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateRenderTargetView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_DecoderEndFrame(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pResource; - StructPointerDecoder pDesc; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; - D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; - DestDescriptor.decoded_value = &value_DestDescriptor; + format::HandleId pDecoder; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDecoder); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateRenderTargetView(call_info, object_id, pResource, &pDesc, DestDescriptor); + consumer->Process_ID3D11VideoContext_DecoderEndFrame(call_info, object_id, return_value, pDecoder); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateDepthStencilView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_SubmitDecoderBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pResource; - StructPointerDecoder pDesc; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; - D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; - DestDescriptor.decoded_value = &value_DestDescriptor; + format::HandleId pDecoder; + UINT NumBuffers; + StructPointerDecoder pBufferDesc; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDecoder); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += pBufferDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateDepthStencilView(call_info, object_id, pResource, &pDesc, DestDescriptor); + consumer->Process_ID3D11VideoContext_SubmitDecoderBuffers(call_info, object_id, return_value, pDecoder, NumBuffers, &pBufferDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateSampler(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_DecoderExtension(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; - D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; - DestDescriptor.decoded_value = &value_DestDescriptor; + format::HandleId pDecoder; + StructPointerDecoder pExtensionData; + HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDecoder); + bytes_read += pExtensionData.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateSampler(call_info, object_id, &pDesc, DestDescriptor); + consumer->Process_ID3D11VideoContext_DecoderExtension(call_info, object_id, return_value, pDecoder, &pExtensionData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CopyDescriptors(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetOutputTargetRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumDestDescriptorRanges; - StructPointerDecoder pDestDescriptorRangeStarts; - PointerDecoder pDestDescriptorRangeSizes; - UINT NumSrcDescriptorRanges; - StructPointerDecoder pSrcDescriptorRangeStarts; - PointerDecoder pSrcDescriptorRangeSizes; - D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType; + format::HandleId pVideoProcessor; + BOOL Enable; + StructPointerDecoder pRect; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumDestDescriptorRanges); - bytes_read += pDestDescriptorRangeStarts.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pDestDescriptorRangeSizes.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSrcDescriptorRanges); - bytes_read += pSrcDescriptorRangeStarts.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pSrcDescriptorRangeSizes.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DescriptorHeapsType); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CopyDescriptors(call_info, object_id, NumDestDescriptorRanges, &pDestDescriptorRangeStarts, &pDestDescriptorRangeSizes, NumSrcDescriptorRanges, &pSrcDescriptorRangeStarts, &pSrcDescriptorRangeSizes, DescriptorHeapsType); + consumer->Process_ID3D11VideoContext_VideoProcessorSetOutputTargetRect(call_info, object_id, pVideoProcessor, Enable, &pRect); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CopyDescriptorsSimple(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumDescriptors; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptorRangeStart; - D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptorRangeStart; - DestDescriptorRangeStart.decoded_value = &value_DestDescriptorRangeStart; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE SrcDescriptorRangeStart; - D3D12_CPU_DESCRIPTOR_HANDLE value_SrcDescriptorRangeStart; - SrcDescriptorRangeStart.decoded_value = &value_SrcDescriptorRangeStart; - D3D12_DESCRIPTOR_HEAP_TYPE DescriptorHeapsType; + format::HandleId pVideoProcessor; + BOOL YCbCr; + StructPointerDecoder pColor; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumDescriptors); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptorRangeStart); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcDescriptorRangeStart); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DescriptorHeapsType); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &YCbCr); + bytes_read += pColor.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CopyDescriptorsSimple(call_info, object_id, NumDescriptors, DestDescriptorRangeStart, SrcDescriptorRangeStart, DescriptorHeapsType); + consumer->Process_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor(call_info, object_id, pVideoProcessor, YCbCr, &pColor); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_GetResourceAllocationInfo(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetOutputColorSpace(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT visibleMask; - UINT numResourceDescs; - StructPointerDecoder pResourceDescs; - Decoded_D3D12_RESOURCE_ALLOCATION_INFO return_value; - D3D12_RESOURCE_ALLOCATION_INFO value_returned; - return_value.decoded_value = &value_returned; + format::HandleId pVideoProcessor; + StructPointerDecoder pColorSpace; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &visibleMask); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &numResourceDescs); - bytes_read += pResourceDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += pColorSpace.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_GetResourceAllocationInfo(call_info, object_id, return_value, visibleMask, numResourceDescs, &pResourceDescs); + consumer->Process_ID3D11VideoContext_VideoProcessorSetOutputColorSpace(call_info, object_id, pVideoProcessor, &pColorSpace); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_GetCustomHeapProperties(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT nodeMask; - D3D12_HEAP_TYPE heapType; - Decoded_D3D12_HEAP_PROPERTIES return_value; - D3D12_HEAP_PROPERTIES value_returned; - return_value.decoded_value = &value_returned; + format::HandleId pVideoProcessor; + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE AlphaFillMode; + UINT StreamIndex; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &nodeMask); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &heapType); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &AlphaFillMode); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_GetCustomHeapProperties(call_info, object_id, return_value, nodeMask, heapType); + consumer->Process_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode(call_info, object_id, pVideoProcessor, AlphaFillMode, StreamIndex); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateCommittedResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetOutputConstriction(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pHeapProperties; - D3D12_HEAP_FLAGS HeapFlags; - StructPointerDecoder pDesc; - D3D12_RESOURCE_STATES InitialResourceState; - StructPointerDecoder pOptimizedClearValue; - Decoded_GUID riidResource; - GUID value_riidResource; - riidResource.decoded_value = &value_riidResource; - HandlePointerDecoder ppvResource; - HRESULT return_value; + format::HandleId pVideoProcessor; + BOOL Enable; + Decoded_tagSIZE Size; + tagSIZE value_Size; + Size.decoded_value = &value_Size; - bytes_read += pHeapProperties.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HeapFlags); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialResourceState); - bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riidResource); - bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateCommittedResource(call_info, object_id, return_value, &pHeapProperties, HeapFlags, &pDesc, InitialResourceState, &pOptimizedClearValue, riidResource, &ppvResource); + consumer->Process_ID3D11VideoContext_VideoProcessorSetOutputConstriction(call_info, object_id, pVideoProcessor, Enable, Size); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateHeap(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetOutputStereoMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvHeap; - HRESULT return_value; + format::HandleId pVideoProcessor; + BOOL Enable; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvHeap.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateHeap(call_info, object_id, return_value, &pDesc, riid, &ppvHeap); + consumer->Process_ID3D11VideoContext_VideoProcessorSetOutputStereoMode(call_info, object_id, pVideoProcessor, Enable); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreatePlacedResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetOutputExtension(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pHeap; - UINT64 HeapOffset; - StructPointerDecoder pDesc; - D3D12_RESOURCE_STATES InitialState; - StructPointerDecoder pOptimizedClearValue; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvResource; + format::HandleId pVideoProcessor; + StructPointerDecoder pExtensionGuid; + UINT DataSize; + uint64_t pData; HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pHeap); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HeapOffset); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialState); - bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += pExtensionGuid.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pData); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreatePlacedResource(call_info, object_id, return_value, pHeap, HeapOffset, &pDesc, InitialState, &pOptimizedClearValue, riid, &ppvResource); + consumer->Process_ID3D11VideoContext_VideoProcessorSetOutputExtension(call_info, object_id, return_value, pVideoProcessor, &pExtensionGuid, DataSize, pData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateReservedResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetOutputTargetRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - D3D12_RESOURCE_STATES InitialState; - StructPointerDecoder pOptimizedClearValue; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvResource; - HRESULT return_value; + format::HandleId pVideoProcessor; + PointerDecoder Enabled; + StructPointerDecoder pRect; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialState); - bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += Enabled.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateReservedResource(call_info, object_id, return_value, &pDesc, InitialState, &pOptimizedClearValue, riid, &ppvResource); + consumer->Process_ID3D11VideoContext_VideoProcessorGetOutputTargetRect(call_info, object_id, pVideoProcessor, &Enabled, &pRect); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateSharedHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pObject; - StructPointerDecoder pAttributes; - DWORD Access; - WStringDecoder Name; - PointerDecoder pHandle; - HRESULT return_value; + format::HandleId pVideoProcessor; + PointerDecoder pYCbCr; + StructPointerDecoder pColor; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pObject); - bytes_read += pAttributes.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Access); - bytes_read += Name.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += pYCbCr.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pColor.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateSharedHandle(call_info, object_id, return_value, pObject, &pAttributes, Access, &Name, &pHandle); + consumer->Process_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor(call_info, object_id, pVideoProcessor, &pYCbCr, &pColor); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_OpenSharedHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetOutputColorSpace(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t NTHandle; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvObj; - HRESULT return_value; + format::HandleId pVideoProcessor; + StructPointerDecoder pColorSpace; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NTHandle); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvObj.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += pColorSpace.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_OpenSharedHandle(call_info, object_id, return_value, NTHandle, riid, &ppvObj); + consumer->Process_ID3D11VideoContext_VideoProcessorGetOutputColorSpace(call_info, object_id, pVideoProcessor, &pColorSpace); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_OpenSharedHandleByName(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - WStringDecoder Name; - DWORD Access; - PointerDecoder pNTHandle; - HRESULT return_value; + format::HandleId pVideoProcessor; + PointerDecoder pAlphaFillMode; + PointerDecoder pStreamIndex; - bytes_read += Name.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Access); - bytes_read += pNTHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += pAlphaFillMode.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pStreamIndex.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_OpenSharedHandleByName(call_info, object_id, return_value, &Name, Access, &pNTHandle); + consumer->Process_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode(call_info, object_id, pVideoProcessor, &pAlphaFillMode, &pStreamIndex); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_MakeResident(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetOutputConstriction(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumObjects; - HandlePointerDecoder ppObjects; - HRESULT return_value; + format::HandleId pVideoProcessor; + PointerDecoder pEnabled; + StructPointerDecoder pSize; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumObjects); - bytes_read += ppObjects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += pEnabled.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pSize.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_MakeResident(call_info, object_id, return_value, NumObjects, &ppObjects); + consumer->Process_ID3D11VideoContext_VideoProcessorGetOutputConstriction(call_info, object_id, pVideoProcessor, &pEnabled, &pSize); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_Evict(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetOutputStereoMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumObjects; - HandlePointerDecoder ppObjects; - HRESULT return_value; + format::HandleId pVideoProcessor; + PointerDecoder pEnabled; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumObjects); - bytes_read += ppObjects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += pEnabled.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_Evict(call_info, object_id, return_value, NumObjects, &ppObjects); + consumer->Process_ID3D11VideoContext_VideoProcessorGetOutputStereoMode(call_info, object_id, pVideoProcessor, &pEnabled); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateFence(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetOutputExtension(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 InitialValue; - D3D12_FENCE_FLAGS Flags; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppFence; + format::HandleId pVideoProcessor; + StructPointerDecoder pExtensionGuid; + UINT DataSize; + PointerDecoder pData; HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialValue); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppFence.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += pExtensionGuid.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateFence(call_info, object_id, return_value, InitialValue, Flags, riid, &ppFence); + consumer->Process_ID3D11VideoContext_VideoProcessorGetOutputExtension(call_info, object_id, return_value, pVideoProcessor, &pExtensionGuid, DataSize, &pData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_GetDeviceRemovedReason(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + D3D11_VIDEO_FRAME_FORMAT FrameFormat; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FrameFormat); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_GetDeviceRemovedReason(call_info, object_id, return_value); + consumer->Process_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat(call_info, object_id, pVideoProcessor, StreamIndex, FrameFormat); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_GetCopyableFootprints(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetStreamColorSpace(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pResourceDesc; - UINT FirstSubresource; - UINT NumSubresources; - UINT64 BaseOffset; - StructPointerDecoder pLayouts; - PointerDecoder pNumRows; - PointerDecoder pRowSizeInBytes; - PointerDecoder pTotalBytes; + format::HandleId pVideoProcessor; + UINT StreamIndex; + StructPointerDecoder pColorSpace; - bytes_read += pResourceDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FirstSubresource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSubresources); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BaseOffset); - bytes_read += pLayouts.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pNumRows.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pRowSizeInBytes.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pTotalBytes.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pColorSpace.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_GetCopyableFootprints(call_info, object_id, &pResourceDesc, FirstSubresource, NumSubresources, BaseOffset, &pLayouts, &pNumRows, &pRowSizeInBytes, &pTotalBytes); + consumer->Process_ID3D11VideoContext_VideoProcessorSetStreamColorSpace(call_info, object_id, pVideoProcessor, StreamIndex, &pColorSpace); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateQueryHeap(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetStreamOutputRate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvHeap; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate; + BOOL RepeatFrame; + StructPointerDecoder pCustomRate; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvHeap.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &OutputRate); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RepeatFrame); + bytes_read += pCustomRate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateQueryHeap(call_info, object_id, return_value, &pDesc, riid, &ppvHeap); + consumer->Process_ID3D11VideoContext_VideoProcessorSetStreamOutputRate(call_info, object_id, pVideoProcessor, StreamIndex, OutputRate, RepeatFrame, &pCustomRate); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_SetStablePowerState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetStreamSourceRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + format::HandleId pVideoProcessor; + UINT StreamIndex; BOOL Enable; - HRESULT return_value; + StructPointerDecoder pRect; + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_SetStablePowerState(call_info, object_id, return_value, Enable); + consumer->Process_ID3D11VideoContext_VideoProcessorSetStreamSourceRect(call_info, object_id, pVideoProcessor, StreamIndex, Enable, &pRect); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_CreateCommandSignature(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetStreamDestRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - format::HandleId pRootSignature; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvCommandSignature; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + BOOL Enable; + StructPointerDecoder pRect; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pRootSignature); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvCommandSignature.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_CreateCommandSignature(call_info, object_id, return_value, &pDesc, pRootSignature, riid, &ppvCommandSignature); + consumer->Process_ID3D11VideoContext_VideoProcessorSetStreamDestRect(call_info, object_id, pVideoProcessor, StreamIndex, Enable, &pRect); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_GetResourceTiling(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetStreamAlpha(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pTiledResource; - PointerDecoder pNumTilesForEntireResource; - StructPointerDecoder pPackedMipDesc; - StructPointerDecoder pStandardTileShapeForNonPackedMips; - PointerDecoder pNumSubresourceTilings; - UINT FirstSubresourceTilingToGet; - StructPointerDecoder pSubresourceTilingsForNonPackedMips; + format::HandleId pVideoProcessor; + UINT StreamIndex; + BOOL Enable; + FLOAT Alpha; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTiledResource); - bytes_read += pNumTilesForEntireResource.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pPackedMipDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pStandardTileShapeForNonPackedMips.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pNumSubresourceTilings.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FirstSubresourceTilingToGet); - bytes_read += pSubresourceTilingsForNonPackedMips.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Alpha); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_GetResourceTiling(call_info, object_id, pTiledResource, &pNumTilesForEntireResource, &pPackedMipDesc, &pStandardTileShapeForNonPackedMips, &pNumSubresourceTilings, FirstSubresourceTilingToGet, &pSubresourceTilingsForNonPackedMips); + consumer->Process_ID3D11VideoContext_VideoProcessorSetStreamAlpha(call_info, object_id, pVideoProcessor, StreamIndex, Enable, Alpha); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device_GetAdapterLuid(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetStreamPalette(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_LUID return_value; - LUID value_returned; - return_value.decoded_value = &value_returned; + format::HandleId pVideoProcessor; + UINT StreamIndex; + UINT Count; + PointerDecoder pEntries; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Count); + bytes_read += pEntries.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device_GetAdapterLuid(call_info, object_id, return_value); + consumer->Process_ID3D11VideoContext_VideoProcessorSetStreamPalette(call_info, object_id, pVideoProcessor, StreamIndex, Count, &pEntries); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12PipelineLibrary_StorePipeline(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - WStringDecoder pName; - format::HandleId pPipeline; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + BOOL Enable; + StructPointerDecoder pSourceAspectRatio; + StructPointerDecoder pDestinationAspectRatio; - bytes_read += pName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pPipeline); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += pSourceAspectRatio.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDestinationAspectRatio.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12PipelineLibrary_StorePipeline(call_info, object_id, return_value, &pName, pPipeline); + consumer->Process_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio(call_info, object_id, pVideoProcessor, StreamIndex, Enable, &pSourceAspectRatio, &pDestinationAspectRatio); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12PipelineLibrary_LoadGraphicsPipeline(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetStreamLumaKey(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - WStringDecoder pName; - StructPointerDecoder pDesc; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppPipelineState; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + BOOL Enable; + FLOAT Lower; + FLOAT Upper; - bytes_read += pName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppPipelineState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Lower); + bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Upper); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12PipelineLibrary_LoadGraphicsPipeline(call_info, object_id, return_value, &pName, &pDesc, riid, &ppPipelineState); + consumer->Process_ID3D11VideoContext_VideoProcessorSetStreamLumaKey(call_info, object_id, pVideoProcessor, StreamIndex, Enable, Lower, Upper); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12PipelineLibrary_LoadComputePipeline(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - WStringDecoder pName; - StructPointerDecoder pDesc; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppPipelineState; - HRESULT return_value; - - bytes_read += pName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppPipelineState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + format::HandleId pVideoProcessor; + UINT StreamIndex; + BOOL Enable; + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT Format; + BOOL LeftViewFrame0; + BOOL BaseViewFrame0; + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode; + int MonoOffset; + + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &LeftViewFrame0); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BaseViewFrame0); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FlipMode); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MonoOffset); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12PipelineLibrary_LoadComputePipeline(call_info, object_id, return_value, &pName, &pDesc, riid, &ppPipelineState); + consumer->Process_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat(call_info, object_id, pVideoProcessor, StreamIndex, Enable, Format, LeftViewFrame0, BaseViewFrame0, FlipMode, MonoOffset); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12PipelineLibrary_GetSerializedSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - SIZE_T return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + BOOL Enable; - bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12PipelineLibrary_GetSerializedSize(call_info, object_id, return_value); + consumer->Process_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode(call_info, object_id, pVideoProcessor, StreamIndex, Enable); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12PipelineLibrary_Serialize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetStreamFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pData; - SIZE_T DataSizeInBytes; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + D3D11_VIDEO_PROCESSOR_FILTER Filter; + BOOL Enable; + int Level; - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSizeInBytes); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Filter); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Level); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12PipelineLibrary_Serialize(call_info, object_id, return_value, &pData, DataSizeInBytes); + consumer->Process_ID3D11VideoContext_VideoProcessorSetStreamFilter(call_info, object_id, pVideoProcessor, StreamIndex, Filter, Enable, Level); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12PipelineLibrary1_LoadPipeline(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetStreamExtension(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - WStringDecoder pName; - StructPointerDecoder pDesc; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppPipelineState; + format::HandleId pVideoProcessor; + UINT StreamIndex; + StructPointerDecoder pExtensionGuid; + UINT DataSize; + uint64_t pData; HRESULT return_value; - bytes_read += pName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppPipelineState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pExtensionGuid.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pData); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12PipelineLibrary1_LoadPipeline(call_info, object_id, return_value, &pName, &pDesc, riid, &ppPipelineState); + consumer->Process_ID3D11VideoContext_VideoProcessorSetStreamExtension(call_info, object_id, return_value, pVideoProcessor, StreamIndex, &pExtensionGuid, DataSize, pData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device1_CreatePipelineLibrary(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pLibraryBlob; - SIZE_T BlobLength; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppPipelineLibrary; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + PointerDecoder pFrameFormat; - bytes_read += pLibraryBlob.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BlobLength); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppPipelineLibrary.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pFrameFormat.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device1_CreatePipelineLibrary(call_info, object_id, return_value, &pLibraryBlob, BlobLength, riid, &ppPipelineLibrary); + consumer->Process_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat(call_info, object_id, pVideoProcessor, StreamIndex, &pFrameFormat); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device1_SetEventOnMultipleFenceCompletion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetStreamColorSpace(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HandlePointerDecoder ppFences; - PointerDecoder pFenceValues; - UINT NumFences; - D3D12_MULTIPLE_FENCE_WAIT_FLAGS Flags; - uint64_t hEvent; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + StructPointerDecoder pColorSpace; - bytes_read += ppFences.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pFenceValues.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumFences); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pColorSpace.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device1_SetEventOnMultipleFenceCompletion(call_info, object_id, return_value, &ppFences, &pFenceValues, NumFences, Flags, hEvent); + consumer->Process_ID3D11VideoContext_VideoProcessorGetStreamColorSpace(call_info, object_id, pVideoProcessor, StreamIndex, &pColorSpace); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device1_SetResidencyPriority(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetStreamOutputRate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumObjects; - HandlePointerDecoder ppObjects; - PointerDecoder pPriorities; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + PointerDecoder pOutputRate; + PointerDecoder pRepeatFrame; + StructPointerDecoder pCustomRate; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumObjects); - bytes_read += ppObjects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pPriorities.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pOutputRate.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pRepeatFrame.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pCustomRate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device1_SetResidencyPriority(call_info, object_id, return_value, NumObjects, &ppObjects, &pPriorities); + consumer->Process_ID3D11VideoContext_VideoProcessorGetStreamOutputRate(call_info, object_id, pVideoProcessor, StreamIndex, &pOutputRate, &pRepeatFrame, &pCustomRate); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device2_CreatePipelineState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetStreamSourceRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppPipelineState; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + PointerDecoder pEnabled; + StructPointerDecoder pRect; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppPipelineState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pEnabled.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device2_CreatePipelineState(call_info, object_id, return_value, &pDesc, riid, &ppPipelineState); + consumer->Process_ID3D11VideoContext_VideoProcessorGetStreamSourceRect(call_info, object_id, pVideoProcessor, StreamIndex, &pEnabled, &pRect); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device3_OpenExistingHeapFromAddress(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetStreamDestRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t pAddress; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvHeap; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + PointerDecoder pEnabled; + StructPointerDecoder pRect; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pAddress); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvHeap.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pEnabled.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device3_OpenExistingHeapFromAddress(call_info, object_id, return_value, pAddress, riid, &ppvHeap); + consumer->Process_ID3D11VideoContext_VideoProcessorGetStreamDestRect(call_info, object_id, pVideoProcessor, StreamIndex, &pEnabled, &pRect); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device3_OpenExistingHeapFromFileMapping(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetStreamAlpha(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t hFileMapping; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvHeap; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + PointerDecoder pEnabled; + PointerDecoder pAlpha; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hFileMapping); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvHeap.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pEnabled.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pAlpha.DecodeFloat((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device3_OpenExistingHeapFromFileMapping(call_info, object_id, return_value, hFileMapping, riid, &ppvHeap); + consumer->Process_ID3D11VideoContext_VideoProcessorGetStreamAlpha(call_info, object_id, pVideoProcessor, StreamIndex, &pEnabled, &pAlpha); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device3_EnqueueMakeResident(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetStreamPalette(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_RESIDENCY_FLAGS Flags; - UINT NumObjects; - HandlePointerDecoder ppObjects; - format::HandleId pFenceToSignal; - UINT64 FenceValueToSignal; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + UINT Count; + PointerDecoder pEntries; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumObjects); - bytes_read += ppObjects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pFenceToSignal); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FenceValueToSignal); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Count); + bytes_read += pEntries.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device3_EnqueueMakeResident(call_info, object_id, return_value, Flags, NumObjects, &ppObjects, pFenceToSignal, FenceValueToSignal); + consumer->Process_ID3D11VideoContext_VideoProcessorGetStreamPalette(call_info, object_id, pVideoProcessor, StreamIndex, Count, &pEntries); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12ProtectedSession_GetStatusFence(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppFence; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + PointerDecoder pEnabled; + StructPointerDecoder pSourceAspectRatio; + StructPointerDecoder pDestinationAspectRatio; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppFence.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pEnabled.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pSourceAspectRatio.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDestinationAspectRatio.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12ProtectedSession_GetStatusFence(call_info, object_id, return_value, riid, &ppFence); + consumer->Process_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio(call_info, object_id, pVideoProcessor, StreamIndex, &pEnabled, &pSourceAspectRatio, &pDestinationAspectRatio); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12ProtectedSession_GetSessionStatus(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetStreamLumaKey(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_PROTECTED_SESSION_STATUS return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + PointerDecoder pEnabled; + PointerDecoder pLower; + PointerDecoder pUpper; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pEnabled.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pLower.DecodeFloat((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pUpper.DecodeFloat((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12ProtectedSession_GetSessionStatus(call_info, object_id, return_value); + consumer->Process_ID3D11VideoContext_VideoProcessorGetStreamLumaKey(call_info, object_id, pVideoProcessor, StreamIndex, &pEnabled, &pLower, &pUpper); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12ProtectedResourceSession_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_PROTECTED_RESOURCE_SESSION_DESC return_value; - D3D12_PROTECTED_RESOURCE_SESSION_DESC value_returned; - return_value.decoded_value = &value_returned; + format::HandleId pVideoProcessor; + UINT StreamIndex; + PointerDecoder pEnable; + PointerDecoder pFormat; + PointerDecoder pLeftViewFrame0; + PointerDecoder pBaseViewFrame0; + PointerDecoder pFlipMode; + PointerDecoder MonoOffset; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pEnable.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFormat.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pLeftViewFrame0.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pBaseViewFrame0.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFlipMode.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += MonoOffset.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12ProtectedResourceSession_GetDesc(call_info, object_id, return_value); + consumer->Process_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat(call_info, object_id, pVideoProcessor, StreamIndex, &pEnable, &pFormat, &pLeftViewFrame0, &pBaseViewFrame0, &pFlipMode, &MonoOffset); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device4_CreateCommandList1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT nodeMask; - D3D12_COMMAND_LIST_TYPE type; - D3D12_COMMAND_LIST_FLAGS flags; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppCommandList; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + PointerDecoder pEnabled; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &nodeMask); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &type); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &flags); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppCommandList.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pEnabled.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device4_CreateCommandList1(call_info, object_id, return_value, nodeMask, type, flags, riid, &ppCommandList); + consumer->Process_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode(call_info, object_id, pVideoProcessor, StreamIndex, &pEnabled); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device4_CreateProtectedResourceSession(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetStreamFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppSession; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + D3D11_VIDEO_PROCESSOR_FILTER Filter; + PointerDecoder pEnabled; + PointerDecoder pLevel; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppSession.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Filter); + bytes_read += pEnabled.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pLevel.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device4_CreateProtectedResourceSession(call_info, object_id, return_value, &pDesc, riid, &ppSession); + consumer->Process_ID3D11VideoContext_VideoProcessorGetStreamFilter(call_info, object_id, pVideoProcessor, StreamIndex, Filter, &pEnabled, &pLevel); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device4_CreateCommittedResource1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetStreamExtension(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pHeapProperties; - D3D12_HEAP_FLAGS HeapFlags; - StructPointerDecoder pDesc; - D3D12_RESOURCE_STATES InitialResourceState; - StructPointerDecoder pOptimizedClearValue; - format::HandleId pProtectedSession; - Decoded_GUID riidResource; - GUID value_riidResource; - riidResource.decoded_value = &value_riidResource; - HandlePointerDecoder ppvResource; + format::HandleId pVideoProcessor; + UINT StreamIndex; + StructPointerDecoder pExtensionGuid; + UINT DataSize; + PointerDecoder pData; HRESULT return_value; - bytes_read += pHeapProperties.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HeapFlags); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialResourceState); - bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pProtectedSession); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riidResource); - bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pExtensionGuid.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device4_CreateCommittedResource1(call_info, object_id, return_value, &pHeapProperties, HeapFlags, &pDesc, InitialResourceState, &pOptimizedClearValue, pProtectedSession, riidResource, &ppvResource); + consumer->Process_ID3D11VideoContext_VideoProcessorGetStreamExtension(call_info, object_id, return_value, pVideoProcessor, StreamIndex, &pExtensionGuid, DataSize, &pData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device4_CreateHeap1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorBlt(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - format::HandleId pProtectedSession; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvHeap; + format::HandleId pVideoProcessor; + format::HandleId pView; + UINT OutputFrame; + UINT StreamCount; + StructPointerDecoder pStreams; HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pProtectedSession); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvHeap.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pView); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &OutputFrame); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamCount); + bytes_read += pStreams.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device4_CreateHeap1(call_info, object_id, return_value, &pDesc, pProtectedSession, riid, &ppvHeap); + consumer->Process_ID3D11VideoContext_VideoProcessorBlt(call_info, object_id, return_value, pVideoProcessor, pView, OutputFrame, StreamCount, &pStreams); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device4_CreateReservedResource1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - D3D12_RESOURCE_STATES InitialState; - StructPointerDecoder pOptimizedClearValue; - format::HandleId pProtectedSession; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvResource; + format::HandleId pCryptoSession; + UINT DataSize; + PointerDecoder pData; HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialState); - bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pProtectedSession); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCryptoSession); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device4_CreateReservedResource1(call_info, object_id, return_value, &pDesc, InitialState, &pOptimizedClearValue, pProtectedSession, riid, &ppvResource); + consumer->Process_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange(call_info, object_id, return_value, pCryptoSession, DataSize, &pData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device4_GetResourceAllocationInfo1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_EncryptionBlt(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT visibleMask; - UINT numResourceDescs; - StructPointerDecoder pResourceDescs; - StructPointerDecoder pResourceAllocationInfo1; - Decoded_D3D12_RESOURCE_ALLOCATION_INFO return_value; - D3D12_RESOURCE_ALLOCATION_INFO value_returned; - return_value.decoded_value = &value_returned; + format::HandleId pCryptoSession; + format::HandleId pSrcSurface; + format::HandleId pDstSurface; + UINT IVSize; + PointerDecoder pIV; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &visibleMask); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &numResourceDescs); - bytes_read += pResourceDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pResourceAllocationInfo1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCryptoSession); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcSurface); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstSurface); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &IVSize); + bytes_read += pIV.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device4_GetResourceAllocationInfo1(call_info, object_id, return_value, visibleMask, numResourceDescs, &pResourceDescs, &pResourceAllocationInfo1); + consumer->Process_ID3D11VideoContext_EncryptionBlt(call_info, object_id, pCryptoSession, pSrcSurface, pDstSurface, IVSize, &pIV); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12LifetimeOwner_LifetimeStateUpdated(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_DecryptionBlt(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_LIFETIME_STATE NewState; + format::HandleId pCryptoSession; + format::HandleId pSrcSurface; + format::HandleId pDstSurface; + StructPointerDecoder pEncryptedBlockInfo; + UINT ContentKeySize; + PointerDecoder pContentKey; + UINT IVSize; + PointerDecoder pIV; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NewState); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCryptoSession); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcSurface); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstSurface); + bytes_read += pEncryptedBlockInfo.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ContentKeySize); + bytes_read += pContentKey.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &IVSize); + bytes_read += pIV.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12LifetimeOwner_LifetimeStateUpdated(call_info, object_id, NewState); + consumer->Process_ID3D11VideoContext_DecryptionBlt(call_info, object_id, pCryptoSession, pSrcSurface, pDstSurface, &pEncryptedBlockInfo, ContentKeySize, &pContentKey, IVSize, &pIV); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12SwapChainAssistant_GetLUID(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_StartSessionKeyRefresh(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_LUID return_value; - LUID value_returned; - return_value.decoded_value = &value_returned; + format::HandleId pCryptoSession; + UINT RandomNumberSize; + PointerDecoder pRandomNumber; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCryptoSession); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RandomNumberSize); + bytes_read += pRandomNumber.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12SwapChainAssistant_GetLUID(call_info, object_id, return_value); + consumer->Process_ID3D11VideoContext_StartSessionKeyRefresh(call_info, object_id, pCryptoSession, RandomNumberSize, &pRandomNumber); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12SwapChainAssistant_GetSwapChainObject(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_FinishSessionKeyRefresh(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppv; - HRESULT return_value; + format::HandleId pCryptoSession; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppv.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCryptoSession); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12SwapChainAssistant_GetSwapChainObject(call_info, object_id, return_value, riid, &ppv); + consumer->Process_ID3D11VideoContext_FinishSessionKeyRefresh(call_info, object_id, pCryptoSession); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12SwapChainAssistant_GetCurrentResourceAndCommandQueue(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_GetEncryptionBltKey(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID riidResource; - GUID value_riidResource; - riidResource.decoded_value = &value_riidResource; - HandlePointerDecoder ppvResource; - Decoded_GUID riidQueue; - GUID value_riidQueue; - riidQueue.decoded_value = &value_riidQueue; - HandlePointerDecoder ppvQueue; + format::HandleId pCryptoSession; + UINT KeySize; + PointerDecoder pReadbackKey; HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riidResource); - bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riidQueue); - bytes_read += ppvQueue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCryptoSession); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &KeySize); + bytes_read += pReadbackKey.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12SwapChainAssistant_GetCurrentResourceAndCommandQueue(call_info, object_id, return_value, riidResource, &ppvResource, riidQueue, &ppvQueue); + consumer->Process_ID3D11VideoContext_GetEncryptionBltKey(call_info, object_id, return_value, pCryptoSession, KeySize, &pReadbackKey); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12SwapChainAssistant_InsertImplicitSync(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + format::HandleId pChannel; + UINT DataSize; + PointerDecoder pData; HRESULT return_value; + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pChannel); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12SwapChainAssistant_InsertImplicitSync(call_info, object_id, return_value); + consumer->Process_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange(call_info, object_id, return_value, pChannel, DataSize, &pData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12LifetimeTracker_DestroyOwnedObject(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_QueryAuthenticatedChannel(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pObject; + format::HandleId pChannel; + UINT InputSize; + PointerDecoder pInput; + UINT OutputSize; + PointerDecoder pOutput; HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pObject); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pChannel); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InputSize); + bytes_read += pInput.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &OutputSize); + bytes_read += pOutput.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12LifetimeTracker_DestroyOwnedObject(call_info, object_id, return_value, pObject); + consumer->Process_ID3D11VideoContext_QueryAuthenticatedChannel(call_info, object_id, return_value, pChannel, InputSize, &pInput, OutputSize, &pOutput); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12StateObjectProperties_GetShaderIdentifier(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_ConfigureAuthenticatedChannel(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - WStringDecoder pExportName; - PointerDecoder return_value; + format::HandleId pChannel; + UINT InputSize; + PointerDecoder pInput; + StructPointerDecoder pOutput; + HRESULT return_value; - bytes_read += pExportName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += return_value.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pChannel); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InputSize); + bytes_read += pInput.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12StateObjectProperties_GetShaderIdentifier(call_info, object_id, &return_value, &pExportName); + consumer->Process_ID3D11VideoContext_ConfigureAuthenticatedChannel(call_info, object_id, return_value, pChannel, InputSize, &pInput, &pOutput); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12StateObjectProperties_GetShaderStackSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorSetStreamRotation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - WStringDecoder pExportName; - UINT64 return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + BOOL Enable; + D3D11_VIDEO_PROCESSOR_ROTATION Rotation; - bytes_read += pExportName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Rotation); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12StateObjectProperties_GetShaderStackSize(call_info, object_id, return_value, &pExportName); + consumer->Process_ID3D11VideoContext_VideoProcessorSetStreamRotation(call_info, object_id, pVideoProcessor, StreamIndex, Enable, Rotation); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12StateObjectProperties_GetPipelineStackSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext_VideoProcessorGetStreamRotation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + PointerDecoder pEnable; + PointerDecoder pRotation; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pEnable.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pRotation.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12StateObjectProperties_GetPipelineStackSize(call_info, object_id, return_value); + consumer->Process_ID3D11VideoContext_VideoProcessorGetStreamRotation(call_info, object_id, pVideoProcessor, StreamIndex, &pEnable, &pRotation); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12StateObjectProperties_SetPipelineStackSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_CreateVideoDecoder(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 PipelineStackSizeInBytes; + StructPointerDecoder pVideoDesc; + StructPointerDecoder pConfig; + HandlePointerDecoder ppDecoder; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &PipelineStackSizeInBytes); + bytes_read += pVideoDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pConfig.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppDecoder.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12StateObjectProperties_SetPipelineStackSize(call_info, object_id, PipelineStackSizeInBytes); + consumer->Process_ID3D11VideoDevice_CreateVideoDecoder(call_info, object_id, return_value, &pVideoDesc, &pConfig, &ppDecoder); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device5_CreateLifetimeTracker(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_CreateVideoProcessor(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pOwner; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvTracker; + format::HandleId pEnum; + UINT RateConversionIndex; + HandlePointerDecoder ppVideoProcessor; HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pOwner); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvTracker.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pEnum); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RateConversionIndex); + bytes_read += ppVideoProcessor.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device5_CreateLifetimeTracker(call_info, object_id, return_value, pOwner, riid, &ppvTracker); + consumer->Process_ID3D11VideoDevice_CreateVideoProcessor(call_info, object_id, return_value, pEnum, RateConversionIndex, &ppVideoProcessor); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device5_RemoveDevice(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_CreateAuthenticatedChannel(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType; + HandlePointerDecoder ppAuthenticatedChannel; + HRESULT return_value; + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ChannelType); + bytes_read += ppAuthenticatedChannel.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device5_RemoveDevice(call_info, object_id); + consumer->Process_ID3D11VideoDevice_CreateAuthenticatedChannel(call_info, object_id, return_value, ChannelType, &ppAuthenticatedChannel); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device5_EnumerateMetaCommands(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_CreateCryptoSession(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pNumMetaCommands; - StructPointerDecoder pDescs; + StructPointerDecoder pCryptoType; + StructPointerDecoder pDecoderProfile; + StructPointerDecoder pKeyExchangeType; + HandlePointerDecoder ppCryptoSession; HRESULT return_value; - bytes_read += pNumMetaCommands.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pCryptoType.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDecoderProfile.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pKeyExchangeType.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppCryptoSession.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device5_EnumerateMetaCommands(call_info, object_id, return_value, &pNumMetaCommands, &pDescs); + consumer->Process_ID3D11VideoDevice_CreateCryptoSession(call_info, object_id, return_value, &pCryptoType, &pDecoderProfile, &pKeyExchangeType, &ppCryptoSession); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device5_EnumerateMetaCommandParameters(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_CreateVideoDecoderOutputView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID CommandId; - GUID value_CommandId; - CommandId.decoded_value = &value_CommandId; - D3D12_META_COMMAND_PARAMETER_STAGE Stage; - PointerDecoder pTotalStructureSizeInBytes; - PointerDecoder pParameterCount; - StructPointerDecoder pParameterDescs; + format::HandleId pResource; + StructPointerDecoder pDesc; + HandlePointerDecoder ppVDOVView; HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CommandId); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Stage); - bytes_read += pTotalStructureSizeInBytes.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pParameterCount.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pParameterDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppVDOVView.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device5_EnumerateMetaCommandParameters(call_info, object_id, return_value, CommandId, Stage, &pTotalStructureSizeInBytes, &pParameterCount, &pParameterDescs); + consumer->Process_ID3D11VideoDevice_CreateVideoDecoderOutputView(call_info, object_id, return_value, pResource, &pDesc, &ppVDOVView); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device5_CreateMetaCommand(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_CreateVideoProcessorInputView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID CommandId; - GUID value_CommandId; - CommandId.decoded_value = &value_CommandId; - UINT NodeMask; - PointerDecoder pCreationParametersData; - SIZE_T CreationParametersDataSizeInBytes; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppMetaCommand; + format::HandleId pResource; + format::HandleId pEnum; + StructPointerDecoder pDesc; + HandlePointerDecoder ppVPIView; HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CommandId); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NodeMask); - bytes_read += pCreationParametersData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CreationParametersDataSizeInBytes); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppMetaCommand.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pEnum); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppVPIView.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device5_CreateMetaCommand(call_info, object_id, return_value, CommandId, NodeMask, &pCreationParametersData, CreationParametersDataSizeInBytes, riid, &ppMetaCommand); + consumer->Process_ID3D11VideoDevice_CreateVideoProcessorInputView(call_info, object_id, return_value, pResource, pEnum, &pDesc, &ppVPIView); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device5_CreateStateObject(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_CreateVideoProcessorOutputView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppStateObject; + format::HandleId pResource; + format::HandleId pEnum; + StructPointerDecoder pDesc; + HandlePointerDecoder ppVPOView; HRESULT return_value; + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pEnum); bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppStateObject.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppVPOView.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device5_CreateStateObject(call_info, object_id, return_value, &pDesc, riid, &ppStateObject); + consumer->Process_ID3D11VideoDevice_CreateVideoProcessorOutputView(call_info, object_id, return_value, pResource, pEnum, &pDesc, &ppVPOView); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device5_GetRaytracingAccelerationStructurePrebuildInfo(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_CreateVideoProcessorEnumerator(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - StructPointerDecoder pInfo; + StructPointerDecoder pDesc; + HandlePointerDecoder ppEnum; + HRESULT return_value; bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pInfo.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppEnum.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device5_GetRaytracingAccelerationStructurePrebuildInfo(call_info, object_id, &pDesc, &pInfo); + consumer->Process_ID3D11VideoDevice_CreateVideoProcessorEnumerator(call_info, object_id, return_value, &pDesc, &ppEnum); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device5_CheckDriverMatchingIdentifier(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_GetVideoDecoderProfileCount(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_SERIALIZED_DATA_TYPE SerializedDataType; - StructPointerDecoder pIdentifierToCheck; - D3D12_DRIVER_MATCHING_IDENTIFIER_STATUS return_value; + UINT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SerializedDataType); - bytes_read += pIdentifierToCheck.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device5_CheckDriverMatchingIdentifier(call_info, object_id, return_value, SerializedDataType, &pIdentifierToCheck); + consumer->Process_ID3D11VideoDevice_GetVideoDecoderProfileCount(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedDataSettings_SetAutoBreadcrumbsEnablement(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_GetVideoDecoderProfile(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DRED_ENABLEMENT Enablement; + UINT Index; + StructPointerDecoder pDecoderProfile; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enablement); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Index); + bytes_read += pDecoderProfile.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceRemovedExtendedDataSettings_SetAutoBreadcrumbsEnablement(call_info, object_id, Enablement); + consumer->Process_ID3D11VideoDevice_GetVideoDecoderProfile(call_info, object_id, return_value, Index, &pDecoderProfile); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedDataSettings_SetPageFaultEnablement(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_CheckVideoDecoderFormat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DRED_ENABLEMENT Enablement; + StructPointerDecoder pDecoderProfile; + DXGI_FORMAT Format; + PointerDecoder pSupported; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enablement); + bytes_read += pDecoderProfile.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); + bytes_read += pSupported.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceRemovedExtendedDataSettings_SetPageFaultEnablement(call_info, object_id, Enablement); + consumer->Process_ID3D11VideoDevice_CheckVideoDecoderFormat(call_info, object_id, return_value, &pDecoderProfile, Format, &pSupported); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedDataSettings_SetWatsonDumpEnablement(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_GetVideoDecoderConfigCount(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DRED_ENABLEMENT Enablement; + StructPointerDecoder pDesc; + PointerDecoder pCount; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enablement); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pCount.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceRemovedExtendedDataSettings_SetWatsonDumpEnablement(call_info, object_id, Enablement); + consumer->Process_ID3D11VideoDevice_GetVideoDecoderConfigCount(call_info, object_id, return_value, &pDesc, &pCount); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedDataSettings1_SetBreadcrumbContextEnablement(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_GetVideoDecoderConfig(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DRED_ENABLEMENT Enablement; + StructPointerDecoder pDesc; + UINT Index; + StructPointerDecoder pConfig; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enablement); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Index); + bytes_read += pConfig.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceRemovedExtendedDataSettings1_SetBreadcrumbContextEnablement(call_info, object_id, Enablement); + consumer->Process_ID3D11VideoDevice_GetVideoDecoderConfig(call_info, object_id, return_value, &pDesc, Index, &pConfig); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedDataSettings2_UseMarkersOnlyAutoBreadcrumbs(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_GetContentProtectionCaps(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL MarkersOnly; + StructPointerDecoder pCryptoType; + StructPointerDecoder pDecoderProfile; + StructPointerDecoder pCaps; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MarkersOnly); + bytes_read += pCryptoType.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDecoderProfile.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pCaps.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceRemovedExtendedDataSettings2_UseMarkersOnlyAutoBreadcrumbs(call_info, object_id, MarkersOnly); + consumer->Process_ID3D11VideoDevice_GetContentProtectionCaps(call_info, object_id, return_value, &pCryptoType, &pDecoderProfile, &pCaps); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedData_GetAutoBreadcrumbsOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_CheckCryptoKeyExchange(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pOutput; + StructPointerDecoder pCryptoType; + StructPointerDecoder pDecoderProfile; + UINT Index; + StructPointerDecoder pKeyExchangeType; HRESULT return_value; - bytes_read += pOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pCryptoType.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDecoderProfile.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Index); + bytes_read += pKeyExchangeType.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceRemovedExtendedData_GetAutoBreadcrumbsOutput(call_info, object_id, return_value, &pOutput); + consumer->Process_ID3D11VideoDevice_CheckCryptoKeyExchange(call_info, object_id, return_value, &pCryptoType, &pDecoderProfile, Index, &pKeyExchangeType); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedData_GetPageFaultAllocationOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_SetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pOutput; + Decoded_GUID guid; + GUID value_guid; + guid.decoded_value = &value_guid; + UINT DataSize; + PointerDecoder pData; HRESULT return_value; - bytes_read += pOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceRemovedExtendedData_GetPageFaultAllocationOutput(call_info, object_id, return_value, &pOutput); + consumer->Process_ID3D11VideoDevice_SetPrivateData(call_info, object_id, return_value, guid, DataSize, &pData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedData1_GetAutoBreadcrumbsOutput1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice_SetPrivateDataInterface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pOutput; + Decoded_GUID guid; + GUID value_guid; + guid.decoded_value = &value_guid; + format::HandleId pData; HRESULT return_value; - bytes_read += pOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pData); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceRemovedExtendedData1_GetAutoBreadcrumbsOutput1(call_info, object_id, return_value, &pOutput); + consumer->Process_ID3D11VideoDevice_SetPrivateDataInterface(call_info, object_id, return_value, guid, pData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedData1_GetPageFaultAllocationOutput1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateShaderResourceView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pOutput; + format::HandleId pResource; + StructPointerDecoder pDesc; + HandlePointerDecoder ppSRView; HRESULT return_value; - bytes_read += pOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppSRView.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceRemovedExtendedData1_GetPageFaultAllocationOutput1(call_info, object_id, return_value, &pOutput); + consumer->Process_ID3D11Device_CreateShaderResourceView(call_info, object_id, return_value, pResource, &pDesc, &ppSRView); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedData2_GetPageFaultAllocationOutput2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateUnorderedAccessView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pOutput; + format::HandleId pResource; + StructPointerDecoder pDesc; + HandlePointerDecoder ppUAView; HRESULT return_value; - bytes_read += pOutput.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppUAView.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceRemovedExtendedData2_GetPageFaultAllocationOutput2(call_info, object_id, return_value, &pOutput); + consumer->Process_ID3D11Device_CreateUnorderedAccessView(call_info, object_id, return_value, pResource, &pDesc, &ppUAView); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceRemovedExtendedData2_GetDeviceState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateRenderTargetView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DRED_DEVICE_STATE return_value; + format::HandleId pResource; + StructPointerDecoder pDesc; + HandlePointerDecoder ppRTView; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppRTView.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceRemovedExtendedData2_GetDeviceState(call_info, object_id, return_value); + consumer->Process_ID3D11Device_CreateRenderTargetView(call_info, object_id, return_value, pResource, &pDesc, &ppRTView); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device6_SetBackgroundProcessingMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateDepthStencilView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_BACKGROUND_PROCESSING_MODE Mode; - D3D12_MEASUREMENTS_ACTION MeasurementsAction; - uint64_t hEventToSignalUponCompletion; - PointerDecoder pbFurtherMeasurementsDesired; + format::HandleId pResource; + StructPointerDecoder pDesc; + HandlePointerDecoder ppDepthStencilView; HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Mode); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MeasurementsAction); - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEventToSignalUponCompletion); - bytes_read += pbFurtherMeasurementsDesired.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppDepthStencilView.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device6_SetBackgroundProcessingMode(call_info, object_id, return_value, Mode, MeasurementsAction, hEventToSignalUponCompletion, &pbFurtherMeasurementsDesired); + consumer->Process_ID3D11Device_CreateDepthStencilView(call_info, object_id, return_value, pResource, &pDesc, &ppDepthStencilView); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12ProtectedResourceSession1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateInputLayout(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_PROTECTED_RESOURCE_SESSION_DESC1 return_value; - D3D12_PROTECTED_RESOURCE_SESSION_DESC1 value_returned; - return_value.decoded_value = &value_returned; + StructPointerDecoder pInputElementDescs; + UINT NumElements; + PointerDecoder pShaderBytecodeWithInputSignature; + SIZE_T BytecodeLength; + HandlePointerDecoder ppInputLayout; + HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pInputElementDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumElements); + bytes_read += pShaderBytecodeWithInputSignature.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BytecodeLength); + bytes_read += ppInputLayout.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12ProtectedResourceSession1_GetDesc1(call_info, object_id, return_value); + consumer->Process_ID3D11Device_CreateInputLayout(call_info, object_id, return_value, &pInputElementDescs, NumElements, &pShaderBytecodeWithInputSignature, BytecodeLength, &ppInputLayout); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device7_AddToStateObject(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateVertexShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pAddition; - format::HandleId pStateObjectToGrowFrom; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppNewStateObject; + PointerDecoder pShaderBytecode; + SIZE_T BytecodeLength; + format::HandleId pClassLinkage; + HandlePointerDecoder ppVertexShader; HRESULT return_value; - bytes_read += pAddition.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pStateObjectToGrowFrom); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppNewStateObject.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pShaderBytecode.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BytecodeLength); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pClassLinkage); + bytes_read += ppVertexShader.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device7_AddToStateObject(call_info, object_id, return_value, &pAddition, pStateObjectToGrowFrom, riid, &ppNewStateObject); + consumer->Process_ID3D11Device_CreateVertexShader(call_info, object_id, return_value, &pShaderBytecode, BytecodeLength, pClassLinkage, &ppVertexShader); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device7_CreateProtectedResourceSession1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateGeometryShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppSession; + PointerDecoder pShaderBytecode; + SIZE_T BytecodeLength; + format::HandleId pClassLinkage; + HandlePointerDecoder ppGeometryShader; HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppSession.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pShaderBytecode.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BytecodeLength); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pClassLinkage); + bytes_read += ppGeometryShader.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device7_CreateProtectedResourceSession1(call_info, object_id, return_value, &pDesc, riid, &ppSession); + consumer->Process_ID3D11Device_CreateGeometryShader(call_info, object_id, return_value, &pShaderBytecode, BytecodeLength, pClassLinkage, &ppGeometryShader); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device8_GetResourceAllocationInfo2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateGeometryShaderWithStreamOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT visibleMask; - UINT numResourceDescs; - StructPointerDecoder pResourceDescs; - StructPointerDecoder pResourceAllocationInfo1; - Decoded_D3D12_RESOURCE_ALLOCATION_INFO return_value; - D3D12_RESOURCE_ALLOCATION_INFO value_returned; - return_value.decoded_value = &value_returned; - - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &visibleMask); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &numResourceDescs); - bytes_read += pResourceDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pResourceAllocationInfo1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + PointerDecoder pShaderBytecode; + SIZE_T BytecodeLength; + StructPointerDecoder pSODeclaration; + UINT NumEntries; + PointerDecoder pBufferStrides; + UINT NumStrides; + UINT RasterizedStream; + format::HandleId pClassLinkage; + HandlePointerDecoder ppGeometryShader; + HRESULT return_value; + + bytes_read += pShaderBytecode.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BytecodeLength); + bytes_read += pSODeclaration.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumEntries); + bytes_read += pBufferStrides.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumStrides); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RasterizedStream); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pClassLinkage); + bytes_read += ppGeometryShader.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device8_GetResourceAllocationInfo2(call_info, object_id, return_value, visibleMask, numResourceDescs, &pResourceDescs, &pResourceAllocationInfo1); + consumer->Process_ID3D11Device_CreateGeometryShaderWithStreamOutput(call_info, object_id, return_value, &pShaderBytecode, BytecodeLength, &pSODeclaration, NumEntries, &pBufferStrides, NumStrides, RasterizedStream, pClassLinkage, &ppGeometryShader); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device8_CreateCommittedResource2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreatePixelShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pHeapProperties; - D3D12_HEAP_FLAGS HeapFlags; - StructPointerDecoder pDesc; - D3D12_RESOURCE_STATES InitialResourceState; - StructPointerDecoder pOptimizedClearValue; - format::HandleId pProtectedSession; - Decoded_GUID riidResource; - GUID value_riidResource; - riidResource.decoded_value = &value_riidResource; - HandlePointerDecoder ppvResource; + PointerDecoder pShaderBytecode; + SIZE_T BytecodeLength; + format::HandleId pClassLinkage; + HandlePointerDecoder ppPixelShader; HRESULT return_value; - bytes_read += pHeapProperties.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HeapFlags); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialResourceState); - bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pProtectedSession); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riidResource); - bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pShaderBytecode.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BytecodeLength); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pClassLinkage); + bytes_read += ppPixelShader.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device8_CreateCommittedResource2(call_info, object_id, return_value, &pHeapProperties, HeapFlags, &pDesc, InitialResourceState, &pOptimizedClearValue, pProtectedSession, riidResource, &ppvResource); + consumer->Process_ID3D11Device_CreatePixelShader(call_info, object_id, return_value, &pShaderBytecode, BytecodeLength, pClassLinkage, &ppPixelShader); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device8_CreatePlacedResource1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateHullShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pHeap; - UINT64 HeapOffset; - StructPointerDecoder pDesc; - D3D12_RESOURCE_STATES InitialState; - StructPointerDecoder pOptimizedClearValue; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvResource; + PointerDecoder pShaderBytecode; + SIZE_T BytecodeLength; + format::HandleId pClassLinkage; + HandlePointerDecoder ppHullShader; HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pHeap); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HeapOffset); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialState); - bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pShaderBytecode.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BytecodeLength); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pClassLinkage); + bytes_read += ppHullShader.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device8_CreatePlacedResource1(call_info, object_id, return_value, pHeap, HeapOffset, &pDesc, InitialState, &pOptimizedClearValue, riid, &ppvResource); + consumer->Process_ID3D11Device_CreateHullShader(call_info, object_id, return_value, &pShaderBytecode, BytecodeLength, pClassLinkage, &ppHullShader); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device8_CreateSamplerFeedbackUnorderedAccessView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateDomainShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pTargetedResource; - format::HandleId pFeedbackResource; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; - D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; - DestDescriptor.decoded_value = &value_DestDescriptor; + PointerDecoder pShaderBytecode; + SIZE_T BytecodeLength; + format::HandleId pClassLinkage; + HandlePointerDecoder ppDomainShader; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTargetedResource); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pFeedbackResource); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + bytes_read += pShaderBytecode.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BytecodeLength); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pClassLinkage); + bytes_read += ppDomainShader.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device8_CreateSamplerFeedbackUnorderedAccessView(call_info, object_id, pTargetedResource, pFeedbackResource, DestDescriptor); + consumer->Process_ID3D11Device_CreateDomainShader(call_info, object_id, return_value, &pShaderBytecode, BytecodeLength, pClassLinkage, &ppDomainShader); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device8_GetCopyableFootprints1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateComputeShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pResourceDesc; - UINT FirstSubresource; - UINT NumSubresources; - UINT64 BaseOffset; - StructPointerDecoder pLayouts; - PointerDecoder pNumRows; - PointerDecoder pRowSizeInBytes; - PointerDecoder pTotalBytes; + PointerDecoder pShaderBytecode; + SIZE_T BytecodeLength; + format::HandleId pClassLinkage; + HandlePointerDecoder ppComputeShader; + HRESULT return_value; - bytes_read += pResourceDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FirstSubresource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSubresources); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BaseOffset); - bytes_read += pLayouts.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pNumRows.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pRowSizeInBytes.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pTotalBytes.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pShaderBytecode.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BytecodeLength); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pClassLinkage); + bytes_read += ppComputeShader.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device8_GetCopyableFootprints1(call_info, object_id, &pResourceDesc, FirstSubresource, NumSubresources, BaseOffset, &pLayouts, &pNumRows, &pRowSizeInBytes, &pTotalBytes); + consumer->Process_ID3D11Device_CreateComputeShader(call_info, object_id, return_value, &pShaderBytecode, BytecodeLength, pClassLinkage, &ppComputeShader); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Resource1_GetProtectedResourceSession(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateClassLinkage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppProtectedSession; + HandlePointerDecoder ppLinkage; HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppProtectedSession.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppLinkage.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Resource1_GetProtectedResourceSession(call_info, object_id, return_value, riid, &ppProtectedSession); + consumer->Process_ID3D11Device_CreateClassLinkage(call_info, object_id, return_value, &ppLinkage); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Resource2_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateBlendState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_RESOURCE_DESC1 return_value; - D3D12_RESOURCE_DESC1 value_returned; - return_value.decoded_value = &value_returned; + StructPointerDecoder pBlendStateDesc; + HandlePointerDecoder ppBlendState; + HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pBlendStateDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppBlendState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Resource2_GetDesc1(call_info, object_id, return_value); + consumer->Process_ID3D11Device_CreateBlendState(call_info, object_id, return_value, &pBlendStateDesc, &ppBlendState); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Heap1_GetProtectedResourceSession(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateDepthStencilState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppProtectedSession; + StructPointerDecoder pDepthStencilDesc; + HandlePointerDecoder ppDepthStencilState; HRESULT return_value; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppProtectedSession.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDepthStencilDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppDepthStencilState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Heap1_GetProtectedResourceSession(call_info, object_id, return_value, riid, &ppProtectedSession); + consumer->Process_ID3D11Device_CreateDepthStencilState(call_info, object_id, return_value, &pDepthStencilDesc, &ppDepthStencilState); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList3_SetProtectedResourceSession(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateRasterizerState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pProtectedResourceSession; + StructPointerDecoder pRasterizerDesc; + HandlePointerDecoder ppRasterizerState; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pProtectedResourceSession); + bytes_read += pRasterizerDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppRasterizerState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList3_SetProtectedResourceSession(call_info, object_id, pProtectedResourceSession); + consumer->Process_ID3D11Device_CreateRasterizerState(call_info, object_id, return_value, &pRasterizerDesc, &ppRasterizerState); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12MetaCommand_GetRequiredParameterResourceSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateSamplerState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_META_COMMAND_PARAMETER_STAGE Stage; - UINT ParameterIndex; - UINT64 return_value; + StructPointerDecoder pSamplerDesc; + HandlePointerDecoder ppSamplerState; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Stage); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ParameterIndex); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pSamplerDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppSamplerState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12MetaCommand_GetRequiredParameterResourceSize(call_info, object_id, return_value, Stage, ParameterIndex); + consumer->Process_ID3D11Device_CreateSamplerState(call_info, object_id, return_value, &pSamplerDesc, &ppSamplerState); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_BeginRenderPass(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateQuery(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumRenderTargets; - StructPointerDecoder pRenderTargets; - StructPointerDecoder pDepthStencil; - D3D12_RENDER_PASS_FLAGS Flags; + StructPointerDecoder pQueryDesc; + HandlePointerDecoder ppQuery; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRenderTargets); - bytes_read += pRenderTargets.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pDepthStencil.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += pQueryDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppQuery.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList4_BeginRenderPass(call_info, object_id, NumRenderTargets, &pRenderTargets, &pDepthStencil, Flags); + consumer->Process_ID3D11Device_CreateQuery(call_info, object_id, return_value, &pQueryDesc, &ppQuery); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_EndRenderPass(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreatePredicate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + StructPointerDecoder pPredicateDesc; + HandlePointerDecoder ppPredicate; + HRESULT return_value; + bytes_read += pPredicateDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppPredicate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList4_EndRenderPass(call_info, object_id); + consumer->Process_ID3D11Device_CreatePredicate(call_info, object_id, return_value, &pPredicateDesc, &ppPredicate); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_InitializeMetaCommand(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateCounter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pMetaCommand; - PointerDecoder pInitializationParametersData; - SIZE_T InitializationParametersDataSizeInBytes; + StructPointerDecoder pCounterDesc; + HandlePointerDecoder ppCounter; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pMetaCommand); - bytes_read += pInitializationParametersData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitializationParametersDataSizeInBytes); + bytes_read += pCounterDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppCounter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList4_InitializeMetaCommand(call_info, object_id, pMetaCommand, &pInitializationParametersData, InitializationParametersDataSizeInBytes); + consumer->Process_ID3D11Device_CreateCounter(call_info, object_id, return_value, &pCounterDesc, &ppCounter); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_ExecuteMetaCommand(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CreateDeferredContext(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pMetaCommand; - PointerDecoder pExecutionParametersData; - SIZE_T ExecutionParametersDataSizeInBytes; + UINT ContextFlags; + HandlePointerDecoder ppDeferredContext; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pMetaCommand); - bytes_read += pExecutionParametersData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ExecutionParametersDataSizeInBytes); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ContextFlags); + bytes_read += ppDeferredContext.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList4_ExecuteMetaCommand(call_info, object_id, pMetaCommand, &pExecutionParametersData, ExecutionParametersDataSizeInBytes); + consumer->Process_ID3D11Device_CreateDeferredContext(call_info, object_id, return_value, ContextFlags, &ppDeferredContext); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_BuildRaytracingAccelerationStructure(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_OpenSharedResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - UINT NumPostbuildInfoDescs; - StructPointerDecoder pPostbuildInfoDescs; + uint64_t hResource; + Decoded_GUID ReturnedInterface; + GUID value_ReturnedInterface; + ReturnedInterface.decoded_value = &value_ReturnedInterface; + HandlePointerDecoder ppResource; + HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumPostbuildInfoDescs); - bytes_read += pPostbuildInfoDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hResource); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ReturnedInterface); + bytes_read += ppResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList4_BuildRaytracingAccelerationStructure(call_info, object_id, &pDesc, NumPostbuildInfoDescs, &pPostbuildInfoDescs); + consumer->Process_ID3D11Device_OpenSharedResource(call_info, object_id, return_value, hResource, ReturnedInterface, &ppResource); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_EmitRaytracingAccelerationStructurePostbuildInfo(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CheckFormatSupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - UINT NumSourceAccelerationStructures; - PointerDecoder pSourceAccelerationStructureData; + DXGI_FORMAT Format; + PointerDecoder pFormatSupport; + HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSourceAccelerationStructures); - bytes_read += pSourceAccelerationStructureData.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); + bytes_read += pFormatSupport.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList4_EmitRaytracingAccelerationStructurePostbuildInfo(call_info, object_id, &pDesc, NumSourceAccelerationStructures, &pSourceAccelerationStructureData); + consumer->Process_ID3D11Device_CheckFormatSupport(call_info, object_id, return_value, Format, &pFormatSupport); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_CopyRaytracingAccelerationStructure(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CheckMultisampleQualityLevels(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_GPU_VIRTUAL_ADDRESS DestAccelerationStructureData; - D3D12_GPU_VIRTUAL_ADDRESS SourceAccelerationStructureData; - D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE Mode; + DXGI_FORMAT Format; + UINT SampleCount; + PointerDecoder pNumQualityLevels; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestAccelerationStructureData); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SourceAccelerationStructureData); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Mode); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SampleCount); + bytes_read += pNumQualityLevels.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList4_CopyRaytracingAccelerationStructure(call_info, object_id, DestAccelerationStructureData, SourceAccelerationStructureData, Mode); + consumer->Process_ID3D11Device_CheckMultisampleQualityLevels(call_info, object_id, return_value, Format, SampleCount, &pNumQualityLevels); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_SetPipelineState1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CheckCounterInfo(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pStateObject; + StructPointerDecoder pCounterInfo; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pStateObject); + bytes_read += pCounterInfo.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList4_SetPipelineState1(call_info, object_id, pStateObject); + consumer->Process_ID3D11Device_CheckCounterInfo(call_info, object_id, &pCounterInfo); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList4_DispatchRays(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_CheckCounter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; + StructPointerDecoder pDesc; + PointerDecoder pType; + PointerDecoder pActiveCounters; + StringDecoder szName; + PointerDecoder pNameLength; + StringDecoder szUnits; + PointerDecoder pUnitsLength; + StringDecoder szDescription; + PointerDecoder pDescriptionLength; + HRESULT return_value; bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pType.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pActiveCounters.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += szName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNameLength.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += szUnits.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pUnitsLength.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += szDescription.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDescriptionLength.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList4_DispatchRays(call_info, object_id, &pDesc); + consumer->Process_ID3D11Device_CheckCounter(call_info, object_id, return_value, &pDesc, &pType, &pActiveCounters, &szName, &pNameLength, &szUnits, &pUnitsLength, &szDescription, &pDescriptionLength); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12ShaderCacheSession_FindValue(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_GetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pKey; - UINT KeySize; - PointerDecoder pValue; - PointerDecoder pValueSize; + Decoded_GUID guid; + GUID value_guid; + guid.decoded_value = &value_guid; + PointerDecoder pDataSize; + PointerDecoder pData; HRESULT return_value; - bytes_read += pKey.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &KeySize); - bytes_read += pValue.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pValueSize.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); + bytes_read += pDataSize.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12ShaderCacheSession_FindValue(call_info, object_id, return_value, &pKey, KeySize, &pValue, &pValueSize); + consumer->Process_ID3D11Device_GetPrivateData(call_info, object_id, return_value, guid, &pDataSize, &pData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12ShaderCacheSession_StoreValue(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_SetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pKey; - UINT KeySize; - PointerDecoder pValue; - UINT ValueSize; + Decoded_GUID guid; + GUID value_guid; + guid.decoded_value = &value_guid; + UINT DataSize; + PointerDecoder pData; HRESULT return_value; - bytes_read += pKey.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &KeySize); - bytes_read += pValue.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ValueSize); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12ShaderCacheSession_StoreValue(call_info, object_id, return_value, &pKey, KeySize, &pValue, ValueSize); + consumer->Process_ID3D11Device_SetPrivateData(call_info, object_id, return_value, guid, DataSize, &pData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12ShaderCacheSession_SetDeleteOnDestroy(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_SetPrivateDataInterface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + Decoded_GUID guid; + GUID value_guid; + guid.decoded_value = &value_guid; + format::HandleId pData; + HRESULT return_value; + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pData); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12ShaderCacheSession_SetDeleteOnDestroy(call_info, object_id); + consumer->Process_ID3D11Device_SetPrivateDataInterface(call_info, object_id, return_value, guid, pData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12ShaderCacheSession_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_GetFeatureLevel(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_SHADER_CACHE_SESSION_DESC return_value; - D3D12_SHADER_CACHE_SESSION_DESC value_returned; - return_value.decoded_value = &value_returned; + D3D_FEATURE_LEVEL return_value; + + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D11Device_GetFeatureLevel(call_info, object_id, return_value); + } + + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D11Device_GetCreationFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + UINT return_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12ShaderCacheSession_GetDesc(call_info, object_id, return_value); + consumer->Process_ID3D11Device_GetCreationFlags(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device9_CreateShaderCacheSession(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_GetDeviceRemovedReason(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvSession; HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvSession.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device9_CreateShaderCacheSession(call_info, object_id, return_value, &pDesc, riid, &ppvSession); + consumer->Process_ID3D11Device_GetDeviceRemovedReason(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device9_ShaderCacheControl(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_GetImmediateContext(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_SHADER_CACHE_KIND_FLAGS Kinds; - D3D12_SHADER_CACHE_CONTROL_FLAGS Control; - HRESULT return_value; + HandlePointerDecoder ppImmediateContext; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Kinds); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Control); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ppImmediateContext.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device9_ShaderCacheControl(call_info, object_id, return_value, Kinds, Control); + consumer->Process_ID3D11Device_GetImmediateContext(call_info, object_id, &ppImmediateContext); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device9_CreateCommandQueue1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_SetExceptionMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - Decoded_GUID CreatorID; - GUID value_CreatorID; - CreatorID.decoded_value = &value_CreatorID; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppCommandQueue; + UINT RaiseFlags; HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CreatorID); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppCommandQueue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &RaiseFlags); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device9_CreateCommandQueue1(call_info, object_id, return_value, &pDesc, CreatorID, riid, &ppCommandQueue); + consumer->Process_ID3D11Device_SetExceptionMode(call_info, object_id, return_value, RaiseFlags); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device10_CreateCommittedResource3(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device_GetExceptionMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pHeapProperties; - D3D12_HEAP_FLAGS HeapFlags; - StructPointerDecoder pDesc; - D3D12_BARRIER_LAYOUT InitialLayout; - StructPointerDecoder pOptimizedClearValue; - format::HandleId pProtectedSession; - UINT32 NumCastableFormats; - PointerDecoder pCastableFormats; - Decoded_GUID riidResource; - GUID value_riidResource; - riidResource.decoded_value = &value_riidResource; - HandlePointerDecoder ppvResource; - HRESULT return_value; + UINT return_value; - bytes_read += pHeapProperties.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HeapFlags); - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialLayout); - bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pProtectedSession); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumCastableFormats); - bytes_read += pCastableFormats.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riidResource); - bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device10_CreateCommittedResource3(call_info, object_id, return_value, &pHeapProperties, HeapFlags, &pDesc, InitialLayout, &pOptimizedClearValue, pProtectedSession, NumCastableFormats, &pCastableFormats, riidResource, &ppvResource); + consumer->Process_ID3D11Device_GetExceptionMode(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device10_CreatePlacedResource2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11BlendState1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pHeap; - UINT64 HeapOffset; - StructPointerDecoder pDesc; - D3D12_BARRIER_LAYOUT InitialLayout; - StructPointerDecoder pOptimizedClearValue; - UINT32 NumCastableFormats; - PointerDecoder pCastableFormats; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvResource; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pHeap); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HeapOffset); bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialLayout); - bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumCastableFormats); - bytes_read += pCastableFormats.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device10_CreatePlacedResource2(call_info, object_id, return_value, pHeap, HeapOffset, &pDesc, InitialLayout, &pOptimizedClearValue, NumCastableFormats, &pCastableFormats, riid, &ppvResource); + consumer->Process_ID3D11BlendState1_GetDesc1(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device10_CreateReservedResource2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11RasterizerState1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - D3D12_BARRIER_LAYOUT InitialLayout; - StructPointerDecoder pOptimizedClearValue; - format::HandleId pProtectedSession; - UINT32 NumCastableFormats; - PointerDecoder pCastableFormats; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvResource; - HRESULT return_value; + StructPointerDecoder pDesc; bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialLayout); - bytes_read += pOptimizedClearValue.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pProtectedSession); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumCastableFormats); - bytes_read += pCastableFormats.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device10_CreateReservedResource2(call_info, object_id, return_value, &pDesc, InitialLayout, &pOptimizedClearValue, pProtectedSession, NumCastableFormats, &pCastableFormats, riid, &ppvResource); + consumer->Process_ID3D11RasterizerState1_GetDesc1(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device11_CreateSampler2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_CopySubresourceRegion1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - Decoded_D3D12_CPU_DESCRIPTOR_HANDLE DestDescriptor; - D3D12_CPU_DESCRIPTOR_HANDLE value_DestDescriptor; - DestDescriptor.decoded_value = &value_DestDescriptor; + format::HandleId pDstResource; + UINT DstSubresource; + UINT DstX; + UINT DstY; + UINT DstZ; + format::HandleId pSrcResource; + UINT SrcSubresource; + StructPointerDecoder pSrcBox; + UINT CopyFlags; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DestDescriptor); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstSubresource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstX); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstY); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstZ); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcSubresource); + bytes_read += pSrcBox.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CopyFlags); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device11_CreateSampler2(call_info, object_id, &pDesc, DestDescriptor); + consumer->Process_ID3D11DeviceContext1_CopySubresourceRegion1(call_info, object_id, pDstResource, DstSubresource, DstX, DstY, DstZ, pSrcResource, SrcSubresource, &pSrcBox, CopyFlags); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Device12_GetResourceAllocationInfo3(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_DiscardResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT visibleMask; - UINT numResourceDescs; - StructPointerDecoder pResourceDescs; - PointerDecoder pNumCastableFormats; - PointerDecoder ppCastableFormats; - StructPointerDecoder pResourceAllocationInfo1; - Decoded_D3D12_RESOURCE_ALLOCATION_INFO return_value; - D3D12_RESOURCE_ALLOCATION_INFO value_returned; - return_value.decoded_value = &value_returned; + format::HandleId pResource; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &visibleMask); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &numResourceDescs); - bytes_read += pResourceDescs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pNumCastableFormats.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ppCastableFormats.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pResourceAllocationInfo1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Device12_GetResourceAllocationInfo3(call_info, object_id, return_value, visibleMask, numResourceDescs, &pResourceDescs, &pNumCastableFormats, &ppCastableFormats, &pResourceAllocationInfo1); + consumer->Process_ID3D11DeviceContext1_DiscardResource(call_info, object_id, pResource); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12VirtualizationGuestDevice_ShareWithHost(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_DiscardView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pObject; - PointerDecoder pHandle; - HRESULT return_value; + format::HandleId pResourceView; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pObject); - bytes_read += pHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResourceView); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12VirtualizationGuestDevice_ShareWithHost(call_info, object_id, return_value, pObject, &pHandle); + consumer->Process_ID3D11DeviceContext1_DiscardView(call_info, object_id, pResourceView); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12VirtualizationGuestDevice_CreateFenceFd(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_VSSetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pFence; - UINT64 FenceValue; - PointerDecoder pFenceFd; - HRESULT return_value; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; + PointerDecoder pFirstConstant; + PointerDecoder pNumConstants; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pFence); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FenceValue); - bytes_read += pFenceFd.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFirstConstant.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumConstants.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12VirtualizationGuestDevice_CreateFenceFd(call_info, object_id, return_value, pFence, FenceValue, &pFenceFd); + consumer->Process_ID3D11DeviceContext1_VSSetConstantBuffers1(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers, &pFirstConstant, &pNumConstants); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Tools_EnableShaderInstrumentation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_HSSetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL bEnable; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; + PointerDecoder pFirstConstant; + PointerDecoder pNumConstants; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &bEnable); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFirstConstant.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumConstants.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Tools_EnableShaderInstrumentation(call_info, object_id, bEnable); + consumer->Process_ID3D11DeviceContext1_HSSetConstantBuffers1(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers, &pFirstConstant, &pNumConstants); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Tools_ShaderInstrumentationEnabled(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_DSSetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL return_value; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; + PointerDecoder pFirstConstant; + PointerDecoder pNumConstants; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFirstConstant.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumConstants.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Tools_ShaderInstrumentationEnabled(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext1_DSSetConstantBuffers1(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers, &pFirstConstant, &pNumConstants); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12SDKConfiguration_SetSDKVersion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_GSSetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT SDKVersion; - StringDecoder SDKPath; - HRESULT return_value; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; + PointerDecoder pFirstConstant; + PointerDecoder pNumConstants; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SDKVersion); - bytes_read += SDKPath.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFirstConstant.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumConstants.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12SDKConfiguration_SetSDKVersion(call_info, object_id, return_value, SDKVersion, &SDKPath); + consumer->Process_ID3D11DeviceContext1_GSSetConstantBuffers1(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers, &pFirstConstant, &pNumConstants); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12SDKConfiguration1_CreateDeviceFactory(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_PSSetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT SDKVersion; - StringDecoder SDKPath; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvFactory; - HRESULT return_value; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; + PointerDecoder pFirstConstant; + PointerDecoder pNumConstants; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SDKVersion); - bytes_read += SDKPath.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvFactory.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFirstConstant.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumConstants.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12SDKConfiguration1_CreateDeviceFactory(call_info, object_id, return_value, SDKVersion, &SDKPath, riid, &ppvFactory); + consumer->Process_ID3D11DeviceContext1_PSSetConstantBuffers1(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers, &pFirstConstant, &pNumConstants); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12SDKConfiguration1_FreeUnusedSDKs(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_CSSetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; + PointerDecoder pFirstConstant; + PointerDecoder pNumConstants; + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFirstConstant.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumConstants.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12SDKConfiguration1_FreeUnusedSDKs(call_info, object_id); + consumer->Process_ID3D11DeviceContext1_CSSetConstantBuffers1(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers, &pFirstConstant, &pNumConstants); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceFactory_InitializeFromGlobalState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_VSGetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HRESULT return_value; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; + PointerDecoder pFirstConstant; + PointerDecoder pNumConstants; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFirstConstant.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumConstants.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceFactory_InitializeFromGlobalState(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext1_VSGetConstantBuffers1(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers, &pFirstConstant, &pNumConstants); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceFactory_ApplyToGlobalState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_HSGetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HRESULT return_value; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; + PointerDecoder pFirstConstant; + PointerDecoder pNumConstants; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFirstConstant.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumConstants.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceFactory_ApplyToGlobalState(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext1_HSGetConstantBuffers1(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers, &pFirstConstant, &pNumConstants); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceFactory_SetFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_DSGetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DEVICE_FACTORY_FLAGS flags; - HRESULT return_value; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; + PointerDecoder pFirstConstant; + PointerDecoder pNumConstants; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &flags); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFirstConstant.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumConstants.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceFactory_SetFlags(call_info, object_id, return_value, flags); + consumer->Process_ID3D11DeviceContext1_DSGetConstantBuffers1(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers, &pFirstConstant, &pNumConstants); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceFactory_GetFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_GSGetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DEVICE_FACTORY_FLAGS return_value; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; + PointerDecoder pFirstConstant; + PointerDecoder pNumConstants; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFirstConstant.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumConstants.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceFactory_GetFlags(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext1_GSGetConstantBuffers1(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers, &pFirstConstant, &pNumConstants); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceFactory_GetConfigurationInterface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_PSGetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID clsid; - GUID value_clsid; - clsid.decoded_value = &value_clsid; - Decoded_GUID iid; - GUID value_iid; - iid.decoded_value = &value_iid; - HandlePointerDecoder ppv; - HRESULT return_value; + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; + PointerDecoder pFirstConstant; + PointerDecoder pNumConstants; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFirstConstant.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumConstants.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + + for (auto consumer : GetConsumers()) + { + consumer->Process_ID3D11DeviceContext1_PSGetConstantBuffers1(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers, &pFirstConstant, &pNumConstants); + } - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &clsid); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &iid); - bytes_read += ppv.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + return bytes_read; +} + +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_CSGetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +{ + size_t bytes_read = 0; + + UINT StartSlot; + UINT NumBuffers; + HandlePointerDecoder ppConstantBuffers; + PointerDecoder pFirstConstant; + PointerDecoder pNumConstants; + + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StartSlot); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += ppConstantBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFirstConstant.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumConstants.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceFactory_GetConfigurationInterface(call_info, object_id, return_value, clsid, iid, &ppv); + consumer->Process_ID3D11DeviceContext1_CSGetConstantBuffers1(call_info, object_id, StartSlot, NumBuffers, &ppConstantBuffers, &pFirstConstant, &pNumConstants); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceFactory_EnableExperimentalFeatures(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_SwapDeviceContextState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT NumFeatures; - StructPointerDecoder pIIDs; - PointerDecoder pConfigurationStructs; - PointerDecoder pConfigurationStructSizes; - HRESULT return_value; + format::HandleId pState; + HandlePointerDecoder ppPreviousState; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumFeatures); - bytes_read += pIIDs.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pConfigurationStructs.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pConfigurationStructSizes.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pState); + bytes_read += ppPreviousState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceFactory_EnableExperimentalFeatures(call_info, object_id, return_value, NumFeatures, &pIIDs, &pConfigurationStructs, &pConfigurationStructSizes); + consumer->Process_ID3D11DeviceContext1_SwapDeviceContextState(call_info, object_id, pState, &ppPreviousState); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceFactory_CreateDevice(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_ClearView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId adapter; - D3D_FEATURE_LEVEL FeatureLevel; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvDevice; - HRESULT return_value; + format::HandleId pView; + PointerDecoder Color; + StructPointerDecoder pRect; + UINT NumRects; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &adapter); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FeatureLevel); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pView); + bytes_read += Color.DecodeFloat((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pRect.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRects); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceFactory_CreateDevice(call_info, object_id, return_value, adapter, FeatureLevel, riid, &ppvDevice); + consumer->Process_ID3D11DeviceContext1_ClearView(call_info, object_id, pView, &Color, &pRect, NumRects); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceConfiguration_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext1_DiscardView1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_D3D12_DEVICE_CONFIGURATION_DESC return_value; - D3D12_DEVICE_CONFIGURATION_DESC value_returned; - return_value.decoded_value = &value_returned; + format::HandleId pResourceView; + StructPointerDecoder pRects; + UINT NumRects; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResourceView); + bytes_read += pRects.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRects); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceConfiguration_GetDesc(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext1_DiscardView1(call_info, object_id, pResourceView, &pRects, NumRects); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceConfiguration_GetEnabledExperimentalFeatures(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext1_SubmitDecoderBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pGuids; - UINT NumGuids; + format::HandleId pDecoder; + UINT NumBuffers; + StructPointerDecoder pBufferDesc; HRESULT return_value; - bytes_read += pGuids.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumGuids); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDecoder); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += pBufferDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceConfiguration_GetEnabledExperimentalFeatures(call_info, object_id, return_value, &pGuids, NumGuids); + consumer->Process_ID3D11VideoContext1_SubmitDecoderBuffers1(call_info, object_id, return_value, pDecoder, NumBuffers, &pBufferDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceConfiguration_SerializeVersionedRootSignature(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext1_GetDataForNewHardwareKey(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pDesc; - HandlePointerDecoder ppResult; - HandlePointerDecoder ppError; + format::HandleId pCryptoSession; + UINT PrivateInputSize; + PointerDecoder pPrivatInputData; + PointerDecoder pPrivateOutputData; HRESULT return_value; - bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ppResult.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ppError.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCryptoSession); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &PrivateInputSize); + bytes_read += pPrivatInputData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pPrivateOutputData.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceConfiguration_SerializeVersionedRootSignature(call_info, object_id, return_value, &pDesc, &ppResult, &ppError); + consumer->Process_ID3D11VideoContext1_GetDataForNewHardwareKey(call_info, object_id, return_value, pCryptoSession, PrivateInputSize, &pPrivatInputData, &pPrivateOutputData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DeviceConfiguration_CreateVersionedRootSignatureDeserializer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext1_CheckCryptoSessionStatus(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - PointerDecoder pBlob; - SIZE_T Size; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvDeserializer; + format::HandleId pCryptoSession; + PointerDecoder pStatus; HRESULT return_value; - bytes_read += pBlob.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvDeserializer.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCryptoSession); + bytes_read += pStatus.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DeviceConfiguration_CreateVersionedRootSignatureDeserializer(call_info, object_id, return_value, &pBlob, Size, riid, &ppvDeserializer); + consumer->Process_ID3D11VideoContext1_CheckCryptoSessionStatus(call_info, object_id, return_value, pCryptoSession, &pStatus); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList5_RSSetShadingRate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext1_DecoderEnableDownsampling(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_SHADING_RATE baseShadingRate; - PointerDecoder combiners; + format::HandleId pDecoder; + DXGI_COLOR_SPACE_TYPE InputColorSpace; + StructPointerDecoder pOutputDesc; + UINT ReferenceFrameCount; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &baseShadingRate); - bytes_read += combiners.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDecoder); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InputColorSpace); + bytes_read += pOutputDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ReferenceFrameCount); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList5_RSSetShadingRate(call_info, object_id, baseShadingRate, &combiners); + consumer->Process_ID3D11VideoContext1_DecoderEnableDownsampling(call_info, object_id, return_value, pDecoder, InputColorSpace, &pOutputDesc, ReferenceFrameCount); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList5_RSSetShadingRateImage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext1_DecoderUpdateDownsampling(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId shadingRateImage; + format::HandleId pDecoder; + StructPointerDecoder pOutputDesc; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &shadingRateImage); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDecoder); + bytes_read += pOutputDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList5_RSSetShadingRateImage(call_info, object_id, shadingRateImage); + consumer->Process_ID3D11VideoContext1_DecoderUpdateDownsampling(call_info, object_id, return_value, pDecoder, &pOutputDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList6_DispatchMesh(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT ThreadGroupCountX; - UINT ThreadGroupCountY; - UINT ThreadGroupCountZ; + format::HandleId pVideoProcessor; + DXGI_COLOR_SPACE_TYPE ColorSpace; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountX); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountY); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ThreadGroupCountZ); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ColorSpace); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList6_DispatchMesh(call_info, object_id, ThreadGroupCountX, ThreadGroupCountY, ThreadGroupCountZ); + consumer->Process_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1(call_info, object_id, pVideoProcessor, ColorSpace); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList7_Barrier(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT32 NumBarrierGroups; - StructPointerDecoder pBarrierGroups; + format::HandleId pVideoProcessor; + BOOL ShaderUsage; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBarrierGroups); - bytes_read += pBarrierGroups.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ShaderUsage); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList7_Barrier(call_info, object_id, NumBarrierGroups, &pBarrierGroups); + consumer->Process_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage(call_info, object_id, pVideoProcessor, ShaderUsage); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList8_OMSetFrontAndBackStencilRef(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT FrontStencilRef; - UINT BackStencilRef; + format::HandleId pVideoProcessor; + PointerDecoder pColorSpace; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FrontStencilRef); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BackStencilRef); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += pColorSpace.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList8_OMSetFrontAndBackStencilRef(call_info, object_id, FrontStencilRef, BackStencilRef); + consumer->Process_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1(call_info, object_id, pVideoProcessor, &pColorSpace); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList9_RSSetDepthBias(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - FLOAT DepthBias; - FLOAT DepthBiasClamp; - FLOAT SlopeScaledDepthBias; + format::HandleId pVideoProcessor; + PointerDecoder pShaderUsage; - bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DepthBias); - bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DepthBiasClamp); - bytes_read += ValueDecoder::DecodeFloatValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SlopeScaledDepthBias); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += pShaderUsage.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList9_RSSetDepthBias(call_info, object_id, DepthBias, DepthBiasClamp, SlopeScaledDepthBias); + consumer->Process_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage(call_info, object_id, pVideoProcessor, &pShaderUsage); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12GraphicsCommandList9_IASetIndexBufferStripCutValue(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_INDEX_BUFFER_STRIP_CUT_VALUE IBStripCutValue; + format::HandleId pVideoProcessor; + UINT StreamIndex; + DXGI_COLOR_SPACE_TYPE ColorSpace; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &IBStripCutValue); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ColorSpace); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12GraphicsCommandList9_IASetIndexBufferStripCutValue(call_info, object_id, IBStripCutValue); + consumer->Process_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1(call_info, object_id, pVideoProcessor, StreamIndex, ColorSpace); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DSRDeviceFactory_CreateDSRDevice(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext1_VideoProcessorSetStreamMirror(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pD3D12Device; - UINT NodeMask; - Decoded_GUID riid; - GUID value_riid; - riid.decoded_value = &value_riid; - HandlePointerDecoder ppvDSRDevice; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + BOOL Enable; + BOOL FlipHorizontal; + BOOL FlipVertical; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pD3D12Device); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NodeMask); - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); - bytes_read += ppvDSRDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FlipHorizontal); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FlipVertical); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DSRDeviceFactory_CreateDSRDevice(call_info, object_id, return_value, pD3D12Device, NodeMask, riid, &ppvDSRDevice); + consumer->Process_ID3D11VideoContext1_VideoProcessorSetStreamMirror(call_info, object_id, pVideoProcessor, StreamIndex, Enable, FlipHorizontal, FlipVertical); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D10Blob_GetBufferPointer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + PointerDecoder pColorSpace; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pColorSpace.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D10Blob_GetBufferPointer(call_info, object_id, return_value); + consumer->Process_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1(call_info, object_id, pVideoProcessor, StreamIndex, &pColorSpace); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D10Blob_GetBufferSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext1_VideoProcessorGetStreamMirror(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - SIZE_T return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + PointerDecoder pEnable; + PointerDecoder pFlipHorizontal; + PointerDecoder pFlipVertical; - bytes_read += ValueDecoder::DecodeSizeTValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pEnable.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFlipHorizontal.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFlipVertical.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D10Blob_GetBufferSize(call_info, object_id, return_value); + consumer->Process_ID3D11VideoContext1_VideoProcessorGetStreamMirror(call_info, object_id, pVideoProcessor, StreamIndex, &pEnable, &pFlipHorizontal, &pFlipVertical); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3DDestructionNotifier_RegisterDestructionCallback(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext1_VideoProcessorGetBehaviorHints(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t callbackFn; - uint64_t pData; - PointerDecoder pCallbackID; + format::HandleId pVideoProcessor; + UINT OutputWidth; + UINT OutputHeight; + DXGI_FORMAT OutputFormat; + UINT StreamCount; + StructPointerDecoder pStreams; + PointerDecoder pBehaviorHints; HRESULT return_value; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &callbackFn); - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pData); - bytes_read += pCallbackID.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &OutputWidth); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &OutputHeight); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &OutputFormat); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamCount); + bytes_read += pStreams.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pBehaviorHints.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3DDestructionNotifier_RegisterDestructionCallback(call_info, object_id, return_value, callbackFn, pData, &pCallbackID); + consumer->Process_ID3D11VideoContext1_VideoProcessorGetBehaviorHints(call_info, object_id, return_value, pVideoProcessor, OutputWidth, OutputHeight, OutputFormat, StreamCount, &pStreams, &pBehaviorHints); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3DDestructionNotifier_UnregisterDestructionCallback(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT callbackID; + StructPointerDecoder pCryptoType; + StructPointerDecoder pDecoderProfile; + StructPointerDecoder pKeyExchangeType; + PointerDecoder pPrivateInputSize; + PointerDecoder pPrivateOutputSize; HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &callbackID); + bytes_read += pCryptoType.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDecoderProfile.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pKeyExchangeType.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pPrivateInputSize.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pPrivateOutputSize.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3DDestructionNotifier_UnregisterDestructionCallback(call_info, object_id, return_value, callbackID); + consumer->Process_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize(call_info, object_id, return_value, &pCryptoType, &pDecoderProfile, &pKeyExchangeType, &pPrivateInputSize, &pPrivateOutputSize); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Debug_EnableDebugLayer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice1_GetVideoDecoderCaps(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + StructPointerDecoder pDecoderProfile; + UINT SampleWidth; + UINT SampleHeight; + StructPointerDecoder pFrameRate; + UINT BitRate; + StructPointerDecoder pCryptoType; + PointerDecoder pDecoderCaps; + HRESULT return_value; + bytes_read += pDecoderProfile.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SampleWidth); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SampleHeight); + bytes_read += pFrameRate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BitRate); + bytes_read += pCryptoType.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDecoderCaps.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Debug_EnableDebugLayer(call_info, object_id); + consumer->Process_ID3D11VideoDevice1_GetVideoDecoderCaps(call_info, object_id, return_value, &pDecoderProfile, SampleWidth, SampleHeight, &pFrameRate, BitRate, &pCryptoType, &pDecoderCaps); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Debug1_EnableDebugLayer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice1_CheckVideoDecoderDownsampling(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + StructPointerDecoder pInputDesc; + DXGI_COLOR_SPACE_TYPE InputColorSpace; + StructPointerDecoder pInputConfig; + StructPointerDecoder pFrameRate; + StructPointerDecoder pOutputDesc; + PointerDecoder pSupported; + PointerDecoder pRealTimeHint; + HRESULT return_value; + bytes_read += pInputDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InputColorSpace); + bytes_read += pInputConfig.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFrameRate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pOutputDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pSupported.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pRealTimeHint.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Debug1_EnableDebugLayer(call_info, object_id); + consumer->Process_ID3D11VideoDevice1_CheckVideoDecoderDownsampling(call_info, object_id, return_value, &pInputDesc, InputColorSpace, &pInputConfig, &pFrameRate, &pOutputDesc, &pSupported, &pRealTimeHint); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Debug1_SetEnableGPUBasedValidation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL Enable; + StructPointerDecoder pInputDesc; + DXGI_COLOR_SPACE_TYPE InputColorSpace; + StructPointerDecoder pInputConfig; + StructPointerDecoder pFrameRate; + StructPointerDecoder pRecommendedOutputDesc; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += pInputDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InputColorSpace); + bytes_read += pInputConfig.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pFrameRate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pRecommendedOutputDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Debug1_SetEnableGPUBasedValidation(call_info, object_id, Enable); + consumer->Process_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters(call_info, object_id, return_value, &pInputDesc, InputColorSpace, &pInputConfig, &pFrameRate, &pRecommendedOutputDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Debug1_SetEnableSynchronizedCommandQueueValidation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL Enable; + DXGI_FORMAT InputFormat; + DXGI_COLOR_SPACE_TYPE InputColorSpace; + DXGI_FORMAT OutputFormat; + DXGI_COLOR_SPACE_TYPE OutputColorSpace; + PointerDecoder pSupported; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InputFormat); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InputColorSpace); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &OutputFormat); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &OutputColorSpace); + bytes_read += pSupported.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Debug1_SetEnableSynchronizedCommandQueueValidation(call_info, object_id, Enable); + consumer->Process_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion(call_info, object_id, return_value, InputFormat, InputColorSpace, OutputFormat, OutputColorSpace, &pSupported); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Debug2_SetGPUBasedValidationFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device1_GetImmediateContext1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_GPU_BASED_VALIDATION_FLAGS Flags; + HandlePointerDecoder ppImmediateContext; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += ppImmediateContext.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Debug2_SetGPUBasedValidationFlags(call_info, object_id, Flags); + consumer->Process_ID3D11Device1_GetImmediateContext1(call_info, object_id, &ppImmediateContext); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Debug3_SetEnableGPUBasedValidation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device1_CreateDeferredContext1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL Enable; + UINT ContextFlags; + HandlePointerDecoder ppDeferredContext; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ContextFlags); + bytes_read += ppDeferredContext.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Debug3_SetEnableGPUBasedValidation(call_info, object_id, Enable); + consumer->Process_ID3D11Device1_CreateDeferredContext1(call_info, object_id, return_value, ContextFlags, &ppDeferredContext); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Debug3_SetEnableSynchronizedCommandQueueValidation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device1_CreateBlendState1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL Enable; + StructPointerDecoder pBlendStateDesc; + HandlePointerDecoder ppBlendState; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += pBlendStateDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppBlendState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Debug3_SetEnableSynchronizedCommandQueueValidation(call_info, object_id, Enable); + consumer->Process_ID3D11Device1_CreateBlendState1(call_info, object_id, return_value, &pBlendStateDesc, &ppBlendState); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Debug3_SetGPUBasedValidationFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device1_CreateRasterizerState1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_GPU_BASED_VALIDATION_FLAGS Flags; + StructPointerDecoder pRasterizerDesc; + HandlePointerDecoder ppRasterizerState; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += pRasterizerDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppRasterizerState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Debug3_SetGPUBasedValidationFlags(call_info, object_id, Flags); + consumer->Process_ID3D11Device1_CreateRasterizerState1(call_info, object_id, return_value, &pRasterizerDesc, &ppRasterizerState); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Debug4_DisableDebugLayer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device1_CreateDeviceContextState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + UINT Flags; + PointerDecoder pFeatureLevels; + UINT FeatureLevels; + UINT SDKVersion; + Decoded_GUID EmulatedInterface; + GUID value_EmulatedInterface; + EmulatedInterface.decoded_value = &value_EmulatedInterface; + PointerDecoder pChosenFeatureLevel; + HandlePointerDecoder ppContextState; + HRESULT return_value; + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += pFeatureLevels.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FeatureLevels); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SDKVersion); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &EmulatedInterface); + bytes_read += pChosenFeatureLevel.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppContextState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Debug4_DisableDebugLayer(call_info, object_id); + consumer->Process_ID3D11Device1_CreateDeviceContextState(call_info, object_id, return_value, Flags, &pFeatureLevels, FeatureLevels, SDKVersion, EmulatedInterface, &pChosenFeatureLevel, &ppContextState); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Debug5_SetEnableAutoName(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device1_OpenSharedResource1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL Enable; + uint64_t hResource; + Decoded_GUID returnedInterface; + GUID value_returnedInterface; + returnedInterface.decoded_value = &value_returnedInterface; + HandlePointerDecoder ppResource; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hResource); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &returnedInterface); + bytes_read += ppResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Debug5_SetEnableAutoName(call_info, object_id, Enable); + consumer->Process_ID3D11Device1_OpenSharedResource1(call_info, object_id, return_value, hResource, returnedInterface, &ppResource); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12Debug6_SetForceLegacyBarrierValidation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device1_OpenSharedResourceByName(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL Enable; + WStringDecoder lpName; + DWORD dwDesiredAccess; + Decoded_GUID returnedInterface; + GUID value_returnedInterface; + returnedInterface.decoded_value = &value_returnedInterface; + HandlePointerDecoder ppResource; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Enable); + bytes_read += lpName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwDesiredAccess); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &returnedInterface); + bytes_read += ppResource.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12Debug6_SetForceLegacyBarrierValidation(call_info, object_id, Enable); + consumer->Process_ID3D11Device1_OpenSharedResourceByName(call_info, object_id, return_value, &lpName, dwDesiredAccess, returnedInterface, &ppResource); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugDevice1_SetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3DUserDefinedAnnotation_BeginEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type; - PointerDecoder pData; - UINT DataSize; - HRESULT return_value; + WStringDecoder Name; + INT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += Name.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugDevice1_SetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); + consumer->Process_ID3DUserDefinedAnnotation_BeginEvent(call_info, object_id, return_value, &Name); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugDevice1_GetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3DUserDefinedAnnotation_EndEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type; - PointerDecoder pData; - UINT DataSize; - HRESULT return_value; + INT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugDevice1_GetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); + consumer->Process_ID3DUserDefinedAnnotation_EndEvent(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugDevice1_ReportLiveDeviceObjects(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3DUserDefinedAnnotation_SetMarker(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_RLDO_FLAGS Flags; - HRESULT return_value; - - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + WStringDecoder Name; + + bytes_read += Name.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugDevice1_ReportLiveDeviceObjects(call_info, object_id, return_value, Flags); + consumer->Process_ID3DUserDefinedAnnotation_SetMarker(call_info, object_id, &Name); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugDevice_SetFeatureMask(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3DUserDefinedAnnotation_GetStatus(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DEBUG_FEATURE Mask; - HRESULT return_value; + BOOL return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Mask); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugDevice_SetFeatureMask(call_info, object_id, return_value, Mask); + consumer->Process_ID3DUserDefinedAnnotation_GetStatus(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugDevice_GetFeatureMask(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext2_UpdateTileMappings(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DEBUG_FEATURE return_value; + format::HandleId pTiledResource; + UINT NumTiledResourceRegions; + StructPointerDecoder pTiledResourceRegionStartCoordinates; + StructPointerDecoder pTiledResourceRegionSizes; + format::HandleId pTilePool; + UINT NumRanges; + PointerDecoder pRangeFlags; + PointerDecoder pTilePoolStartOffsets; + PointerDecoder pRangeTileCounts; + UINT Flags; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTiledResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumTiledResourceRegions); + bytes_read += pTiledResourceRegionStartCoordinates.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pTiledResourceRegionSizes.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTilePool); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumRanges); + bytes_read += pRangeFlags.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pTilePoolStartOffsets.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pRangeTileCounts.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugDevice_GetFeatureMask(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext2_UpdateTileMappings(call_info, object_id, return_value, pTiledResource, NumTiledResourceRegions, &pTiledResourceRegionStartCoordinates, &pTiledResourceRegionSizes, pTilePool, NumRanges, &pRangeFlags, &pTilePoolStartOffsets, &pRangeTileCounts, Flags); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugDevice_ReportLiveDeviceObjects(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext2_CopyTileMappings(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_RLDO_FLAGS Flags; + format::HandleId pDestTiledResource; + StructPointerDecoder pDestRegionStartCoordinate; + format::HandleId pSourceTiledResource; + StructPointerDecoder pSourceRegionStartCoordinate; + StructPointerDecoder pTileRegionSize; + UINT Flags; HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDestTiledResource); + bytes_read += pDestRegionStartCoordinate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSourceTiledResource); + bytes_read += pSourceRegionStartCoordinate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pTileRegionSize.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugDevice_ReportLiveDeviceObjects(call_info, object_id, return_value, Flags); + consumer->Process_ID3D11DeviceContext2_CopyTileMappings(call_info, object_id, return_value, pDestTiledResource, &pDestRegionStartCoordinate, pSourceTiledResource, &pSourceRegionStartCoordinate, &pTileRegionSize, Flags); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugDevice2_SetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext2_CopyTiles(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type; - PointerDecoder pData; - UINT DataSize; - HRESULT return_value; + format::HandleId pTiledResource; + StructPointerDecoder pTileRegionStartCoordinate; + StructPointerDecoder pTileRegionSize; + format::HandleId pBuffer; + UINT64 BufferStartOffsetInBytes; + UINT Flags; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTiledResource); + bytes_read += pTileRegionStartCoordinate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pTileRegionSize.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pBuffer); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &BufferStartOffsetInBytes); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugDevice2_SetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); + consumer->Process_ID3D11DeviceContext2_CopyTiles(call_info, object_id, pTiledResource, &pTileRegionStartCoordinate, &pTileRegionSize, pBuffer, BufferStartOffsetInBytes, Flags); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugDevice2_GetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext2_UpdateTiles(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DEBUG_DEVICE_PARAMETER_TYPE Type; - PointerDecoder pData; - UINT DataSize; - HRESULT return_value; + format::HandleId pDestTiledResource; + StructPointerDecoder pDestTileRegionStartCoordinate; + StructPointerDecoder pDestTileRegionSize; + uint64_t pSourceTileData; + UINT Flags; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDestTiledResource); + bytes_read += pDestTileRegionStartCoordinate.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pDestTileRegionSize.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSourceTileData); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugDevice2_GetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); + consumer->Process_ID3D11DeviceContext2_UpdateTiles(call_info, object_id, pDestTiledResource, &pDestTileRegionStartCoordinate, &pDestTileRegionSize, pSourceTileData, Flags); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugCommandQueue_AssertResourceState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext2_ResizeTilePool(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pResource; - UINT Subresource; - UINT State; - BOOL return_value; + format::HandleId pTilePool; + UINT64 NewSizeInBytes; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &State); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTilePool); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NewSizeInBytes); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugCommandQueue_AssertResourceState(call_info, object_id, return_value, pResource, Subresource, State); + consumer->Process_ID3D11DeviceContext2_ResizeTilePool(call_info, object_id, return_value, pTilePool, NewSizeInBytes); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugCommandQueue1_AssertResourceAccess(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext2_TiledResourceBarrier(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pResource; - UINT Subresource; - D3D12_BARRIER_ACCESS Access; + format::HandleId pTiledResourceOrViewAccessBeforeBarrier; + format::HandleId pTiledResourceOrViewAccessAfterBarrier; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Access); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTiledResourceOrViewAccessBeforeBarrier); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTiledResourceOrViewAccessAfterBarrier); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugCommandQueue1_AssertResourceAccess(call_info, object_id, pResource, Subresource, Access); + consumer->Process_ID3D11DeviceContext2_TiledResourceBarrier(call_info, object_id, pTiledResourceOrViewAccessBeforeBarrier, pTiledResourceOrViewAccessAfterBarrier); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugCommandQueue1_AssertTextureLayout(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext2_IsAnnotationEnabled(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pResource; - UINT Subresource; - D3D12_BARRIER_LAYOUT Layout; + BOOL return_value; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Layout); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugCommandQueue1_AssertTextureLayout(call_info, object_id, pResource, Subresource, Layout); + consumer->Process_ID3D11DeviceContext2_IsAnnotationEnabled(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugCommandList1_AssertResourceState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext2_SetMarkerInt(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pResource; - UINT Subresource; - UINT State; - BOOL return_value; + WStringDecoder pLabel; + INT Data; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &State); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pLabel.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Data); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugCommandList1_AssertResourceState(call_info, object_id, return_value, pResource, Subresource, State); + consumer->Process_ID3D11DeviceContext2_SetMarkerInt(call_info, object_id, &pLabel, Data); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugCommandList1_SetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext2_BeginEventInt(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type; - PointerDecoder pData; - UINT DataSize; - HRESULT return_value; + WStringDecoder pLabel; + INT Data; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pLabel.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Data); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugCommandList1_SetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); + consumer->Process_ID3D11DeviceContext2_BeginEventInt(call_info, object_id, &pLabel, Data); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugCommandList1_GetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext2_EndEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type; - PointerDecoder pData; - UINT DataSize; - HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugCommandList1_GetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); + consumer->Process_ID3D11DeviceContext2_EndEvent(call_info, object_id); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugCommandList_AssertResourceState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device2_GetImmediateContext2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pResource; - UINT Subresource; - UINT State; - BOOL return_value; + HandlePointerDecoder ppImmediateContext; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &State); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ppImmediateContext.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugCommandList_AssertResourceState(call_info, object_id, return_value, pResource, Subresource, State); + consumer->Process_ID3D11Device2_GetImmediateContext2(call_info, object_id, &ppImmediateContext); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugCommandList_SetFeatureMask(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device2_CreateDeferredContext2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DEBUG_FEATURE Mask; + UINT ContextFlags; + HandlePointerDecoder ppDeferredContext; HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Mask); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ContextFlags); + bytes_read += ppDeferredContext.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugCommandList_SetFeatureMask(call_info, object_id, return_value, Mask); + consumer->Process_ID3D11Device2_CreateDeferredContext2(call_info, object_id, return_value, ContextFlags, &ppDeferredContext); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugCommandList_GetFeatureMask(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device2_GetResourceTiling(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DEBUG_FEATURE return_value; + format::HandleId pTiledResource; + PointerDecoder pNumTilesForEntireResource; + StructPointerDecoder pPackedMipDesc; + StructPointerDecoder pStandardTileShapeForNonPackedMips; + PointerDecoder pNumSubresourceTilings; + UINT FirstSubresourceTilingToGet; + StructPointerDecoder pSubresourceTilingsForNonPackedMips; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pTiledResource); + bytes_read += pNumTilesForEntireResource.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pPackedMipDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pStandardTileShapeForNonPackedMips.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pNumSubresourceTilings.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FirstSubresourceTilingToGet); + bytes_read += pSubresourceTilingsForNonPackedMips.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugCommandList_GetFeatureMask(call_info, object_id, return_value); + consumer->Process_ID3D11Device2_GetResourceTiling(call_info, object_id, pTiledResource, &pNumTilesForEntireResource, &pPackedMipDesc, &pStandardTileShapeForNonPackedMips, &pNumSubresourceTilings, FirstSubresourceTilingToGet, &pSubresourceTilingsForNonPackedMips); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugCommandList2_SetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device2_CheckMultisampleQualityLevels1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type; - PointerDecoder pData; - UINT DataSize; + DXGI_FORMAT Format; + UINT SampleCount; + UINT Flags; + PointerDecoder pNumQualityLevels; HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Format); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SampleCount); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += pNumQualityLevels.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugCommandList2_SetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); + consumer->Process_ID3D11Device2_CheckMultisampleQualityLevels1(call_info, object_id, return_value, Format, SampleCount, Flags, &pNumQualityLevels); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugCommandList2_GetDebugParameter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Texture2D1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE Type; - PointerDecoder pData; - UINT DataSize; - HRESULT return_value; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); - bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugCommandList2_GetDebugParameter(call_info, object_id, return_value, Type, &pData, DataSize); + consumer->Process_ID3D11Texture2D1_GetDesc1(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugCommandList3_AssertResourceAccess(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Texture3D1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pResource; - UINT Subresource; - D3D12_BARRIER_ACCESS Access; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Access); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugCommandList3_AssertResourceAccess(call_info, object_id, pResource, Subresource, Access); + consumer->Process_ID3D11Texture3D1_GetDesc1(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12DebugCommandList3_AssertTextureLayout(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11RasterizerState2_GetDesc2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pResource; - UINT Subresource; - D3D12_BARRIER_LAYOUT Layout; + StructPointerDecoder pDesc; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Layout); + bytes_read += pDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12DebugCommandList3_AssertTextureLayout(call_info, object_id, pResource, Subresource, Layout); + consumer->Process_ID3D11RasterizerState2_GetDesc2(call_info, object_id, &pDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12SharingContract_Present(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11ShaderResourceView1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pResource; - UINT Subresource; - uint64_t window; + StructPointerDecoder pDesc1; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &window); + bytes_read += pDesc1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12SharingContract_Present(call_info, object_id, pResource, Subresource, window); + consumer->Process_ID3D11ShaderResourceView1_GetDesc1(call_info, object_id, &pDesc1); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12SharingContract_SharedFenceSignal(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11RenderTargetView1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - format::HandleId pFence; - UINT64 FenceValue; + StructPointerDecoder pDesc1; - bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pFence); - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FenceValue); + bytes_read += pDesc1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12SharingContract_SharedFenceSignal(call_info, object_id, pFence, FenceValue); + consumer->Process_ID3D11RenderTargetView1_GetDesc1(call_info, object_id, &pDesc1); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12SharingContract_BeginCapturableWork(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11UnorderedAccessView1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID guid; - GUID value_guid; - guid.decoded_value = &value_guid; + StructPointerDecoder pDesc1; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); + bytes_read += pDesc1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12SharingContract_BeginCapturableWork(call_info, object_id, guid); + consumer->Process_ID3D11UnorderedAccessView1_GetDesc1(call_info, object_id, &pDesc1); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12SharingContract_EndCapturableWork(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Query1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - Decoded_GUID guid; - GUID value_guid; - guid.decoded_value = &value_guid; + StructPointerDecoder pDesc1; - bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &guid); + bytes_read += pDesc1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12SharingContract_EndCapturableWork(call_info, object_id, guid); + consumer->Process_ID3D11Query1_GetDesc1(call_info, object_id, &pDesc1); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12ManualWriteTrackingResource_TrackWrite(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext3_Flush1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT Subresource; - StructPointerDecoder pWrittenRange; + D3D11_CONTEXT_TYPE ContextType; + uint64_t hEvent; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Subresource); - bytes_read += pWrittenRange.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ContextType); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12ManualWriteTrackingResource_TrackWrite(call_info, object_id, Subresource, &pWrittenRange); + consumer->Process_ID3D11DeviceContext3_Flush1(call_info, object_id, ContextType, hEvent); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_SetMessageCountLimit(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext3_SetHardwareProtectionState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 MessageCountLimit; - HRESULT return_value; + BOOL HwProtectionEnable; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MessageCountLimit); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &HwProtectionEnable); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_SetMessageCountLimit(call_info, object_id, return_value, MessageCountLimit); + consumer->Process_ID3D11DeviceContext3_SetHardwareProtectionState(call_info, object_id, HwProtectionEnable); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_ClearStoredMessages(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext3_GetHardwareProtectionState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + PointerDecoder pHwProtectionEnable; + bytes_read += pHwProtectionEnable.DecodeInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_ClearStoredMessages(call_info, object_id); + consumer->Process_ID3D11DeviceContext3_GetHardwareProtectionState(call_info, object_id, &pHwProtectionEnable); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetMessage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Fence_CreateSharedHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 MessageIndex; - StructPointerDecoder pMessage; - PointerDecoder pMessageByteLength; + StructPointerDecoder pAttributes; + DWORD dwAccess; + WStringDecoder lpName; + PointerDecoder pHandle; HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &MessageIndex); - bytes_read += pMessage.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pMessageByteLength.DecodeSizeT((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pAttributes.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwAccess); + bytes_read += lpName.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += pHandle.DecodeVoidPtr((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetMessage(call_info, object_id, return_value, MessageIndex, &pMessage, &pMessageByteLength); + consumer->Process_ID3D11Fence_CreateSharedHandle(call_info, object_id, return_value, &pAttributes, dwAccess, &lpName, &pHandle); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetNumMessagesAllowedByStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Fence_GetCompletedValue(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; @@ -10700,263 +19544,327 @@ size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetNumMessagesAllowedByStorageFilter( for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetNumMessagesAllowedByStorageFilter(call_info, object_id, return_value); + consumer->Process_ID3D11Fence_GetCompletedValue(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetNumMessagesDeniedByStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Fence_SetEventOnCompletion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 return_value; + UINT64 Value; + uint64_t hEvent; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Value); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetNumMessagesDeniedByStorageFilter(call_info, object_id, return_value); + consumer->Process_ID3D11Fence_SetEventOnCompletion(call_info, object_id, return_value, Value, hEvent); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetNumStoredMessages(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext4_Signal(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 return_value; + format::HandleId pFence; + UINT64 Value; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pFence); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Value); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetNumStoredMessages(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext4_Signal(call_info, object_id, return_value, pFence, Value); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetNumStoredMessagesAllowedByRetrievalFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11DeviceContext4_Wait(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 return_value; + format::HandleId pFence; + UINT64 Value; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pFence); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Value); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetNumStoredMessagesAllowedByRetrievalFilter(call_info, object_id, return_value); + consumer->Process_ID3D11DeviceContext4_Wait(call_info, object_id, return_value, pFence, Value); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetNumMessagesDiscardedByMessageCountLimit(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device3_CreateRasterizerState2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 return_value; + StructPointerDecoder pRasterizerDesc; + HandlePointerDecoder ppRasterizerState; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += pRasterizerDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppRasterizerState.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetNumMessagesDiscardedByMessageCountLimit(call_info, object_id, return_value); + consumer->Process_ID3D11Device3_CreateRasterizerState2(call_info, object_id, return_value, &pRasterizerDesc, &ppRasterizerState); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetMessageCountLimit(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device3_CreateShaderResourceView1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT64 return_value; + format::HandleId pResource; + StructPointerDecoder pDesc1; + HandlePointerDecoder ppSRView1; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += pDesc1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppSRView1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetMessageCountLimit(call_info, object_id, return_value); + consumer->Process_ID3D11Device3_CreateShaderResourceView1(call_info, object_id, return_value, pResource, &pDesc1, &ppSRView1); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_AddStorageFilterEntries(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device3_CreateUnorderedAccessView1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pFilter; + format::HandleId pResource; + StructPointerDecoder pDesc1; + HandlePointerDecoder ppUAView1; HRESULT return_value; - bytes_read += pFilter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += pDesc1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppUAView1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_AddStorageFilterEntries(call_info, object_id, return_value, &pFilter); + consumer->Process_ID3D11Device3_CreateUnorderedAccessView1(call_info, object_id, return_value, pResource, &pDesc1, &ppUAView1); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device3_CreateRenderTargetView1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pFilter; - PointerDecoder pFilterByteLength; + format::HandleId pResource; + StructPointerDecoder pDesc1; + HandlePointerDecoder ppRTView1; HRESULT return_value; - bytes_read += pFilter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pFilterByteLength.DecodeSizeT((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource); + bytes_read += pDesc1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppRTView1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetStorageFilter(call_info, object_id, return_value, &pFilter, &pFilterByteLength); + consumer->Process_ID3D11Device3_CreateRenderTargetView1(call_info, object_id, return_value, pResource, &pDesc1, &ppRTView1); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_ClearStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device3_CreateQuery1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + StructPointerDecoder pQueryDesc1; + HandlePointerDecoder ppQuery1; + HRESULT return_value; + bytes_read += pQueryDesc1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppQuery1.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_ClearStorageFilter(call_info, object_id); + consumer->Process_ID3D11Device3_CreateQuery1(call_info, object_id, return_value, &pQueryDesc1, &ppQuery1); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_PushEmptyStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device3_GetImmediateContext3(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HRESULT return_value; + HandlePointerDecoder ppImmediateContext; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ppImmediateContext.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_PushEmptyStorageFilter(call_info, object_id, return_value); + consumer->Process_ID3D11Device3_GetImmediateContext3(call_info, object_id, &ppImmediateContext); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_PushCopyOfStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device3_CreateDeferredContext3(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + UINT ContextFlags; + HandlePointerDecoder ppDeferredContext; HRESULT return_value; + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ContextFlags); + bytes_read += ppDeferredContext.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_PushCopyOfStorageFilter(call_info, object_id, return_value); + consumer->Process_ID3D11Device3_CreateDeferredContext3(call_info, object_id, return_value, ContextFlags, &ppDeferredContext); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_PushStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device3_ReadFromSubresource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pFilter; - HRESULT return_value; + uint64_t pDstData; + UINT DstRowPitch; + UINT DstDepthPitch; + format::HandleId pSrcResource; + UINT SrcSubresource; + StructPointerDecoder pSrcBox; - bytes_read += pFilter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDstData); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstRowPitch); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DstDepthPitch); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pSrcResource); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &SrcSubresource); + bytes_read += pSrcBox.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_PushStorageFilter(call_info, object_id, return_value, &pFilter); + consumer->Process_ID3D11Device3_ReadFromSubresource(call_info, object_id, pDstData, DstRowPitch, DstDepthPitch, pSrcResource, SrcSubresource, &pSrcBox); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_PopStorageFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device4_RegisterDeviceRemovedEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + uint64_t hEvent; + PointerDecoder pdwCookie; + HRESULT return_value; + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hEvent); + bytes_read += pdwCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_PopStorageFilter(call_info, object_id); + consumer->Process_ID3D11Device4_RegisterDeviceRemovedEvent(call_info, object_id, return_value, hEvent, &pdwCookie); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetStorageFilterStackSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device4_UnregisterDeviceRemoved(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT return_value; + DWORD dwCookie; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &dwCookie); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetStorageFilterStackSize(call_info, object_id, return_value); + consumer->Process_ID3D11Device4_UnregisterDeviceRemoved(call_info, object_id, dwCookie); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_AddRetrievalFilterEntries(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device5_OpenSharedFence(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pFilter; + uint64_t hFence; + Decoded_GUID ReturnedInterface; + GUID value_ReturnedInterface; + ReturnedInterface.decoded_value = &value_ReturnedInterface; + HandlePointerDecoder ppFence; HRESULT return_value; - bytes_read += pFilter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &hFence); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ReturnedInterface); + bytes_read += ppFence.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_AddRetrievalFilterEntries(call_info, object_id, return_value, &pFilter); + consumer->Process_ID3D11Device5_OpenSharedFence(call_info, object_id, return_value, hFence, ReturnedInterface, &ppFence); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetRetrievalFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Device5_CreateFence(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pFilter; - PointerDecoder pFilterByteLength; + UINT64 InitialValue; + D3D11_FENCE_FLAG Flags; + Decoded_GUID ReturnedInterface; + GUID value_ReturnedInterface; + ReturnedInterface.decoded_value = &value_ReturnedInterface; + HandlePointerDecoder ppFence; HRESULT return_value; - bytes_read += pFilter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += pFilterByteLength.DecodeSizeT((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt64Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InitialValue); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Flags); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ReturnedInterface); + bytes_read += ppFence.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetRetrievalFilter(call_info, object_id, return_value, &pFilter, &pFilterByteLength); + consumer->Process_ID3D11Device5_CreateFence(call_info, object_id, return_value, InitialValue, Flags, ReturnedInterface, &ppFence); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_ClearRetrievalFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Multithread_Enter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; @@ -10964,319 +19872,383 @@ size_t Dx12Decoder::Decode_ID3D12InfoQueue_ClearRetrievalFilter(format::HandleId for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_ClearRetrievalFilter(call_info, object_id); + consumer->Process_ID3D11Multithread_Enter(call_info, object_id); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_PushEmptyRetrievalFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Multithread_Leave(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HRESULT return_value; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_PushEmptyRetrievalFilter(call_info, object_id, return_value); + consumer->Process_ID3D11Multithread_Leave(call_info, object_id); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_PushCopyOfRetrievalFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Multithread_SetMultithreadProtected(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - HRESULT return_value; + BOOL bMTProtect; + BOOL return_value; + bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &bMTProtect); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_PushCopyOfRetrievalFilter(call_info, object_id, return_value); + consumer->Process_ID3D11Multithread_SetMultithreadProtected(call_info, object_id, return_value, bMTProtect); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_PushRetrievalFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11Multithread_GetMultithreadProtected(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - StructPointerDecoder pFilter; - HRESULT return_value; + BOOL return_value; - bytes_read += pFilter.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_PushRetrievalFilter(call_info, object_id, return_value, &pFilter); + consumer->Process_ID3D11Multithread_GetMultithreadProtected(call_info, object_id, return_value); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_PopRetrievalFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; + format::HandleId pVideoProcessor; + DXGI_HDR_METADATA_TYPE Type; + UINT Size; + PointerDecoder pHDRMetaData; + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); + bytes_read += pHDRMetaData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_PopRetrievalFilter(call_info, object_id); + consumer->Process_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData(call_info, object_id, pVideoProcessor, Type, Size, &pHDRMetaData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetRetrievalFilterStackSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - UINT return_value; + format::HandleId pVideoProcessor; + PointerDecoder pType; + UINT Size; + PointerDecoder pMetaData; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += pType.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); + bytes_read += pMetaData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetRetrievalFilterStackSize(call_info, object_id, return_value); + consumer->Process_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData(call_info, object_id, pVideoProcessor, &pType, Size, &pMetaData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_AddMessage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_MESSAGE_CATEGORY Category; - D3D12_MESSAGE_SEVERITY Severity; - D3D12_MESSAGE_ID ID; - StringDecoder pDescription; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + DXGI_HDR_METADATA_TYPE Type; + UINT Size; + PointerDecoder pHDRMetaData; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Category); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Severity); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ID); - bytes_read += pDescription.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Type); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); + bytes_read += pHDRMetaData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_AddMessage(call_info, object_id, return_value, Category, Severity, ID, &pDescription); + consumer->Process_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData(call_info, object_id, pVideoProcessor, StreamIndex, Type, Size, &pHDRMetaData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_AddApplicationMessage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_MESSAGE_SEVERITY Severity; - StringDecoder pDescription; - HRESULT return_value; + format::HandleId pVideoProcessor; + UINT StreamIndex; + PointerDecoder pType; + UINT Size; + PointerDecoder pMetaData; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Severity); - bytes_read += pDescription.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pVideoProcessor); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &StreamIndex); + bytes_read += pType.DecodeEnum((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Size); + bytes_read += pMetaData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_AddApplicationMessage(call_info, object_id, return_value, Severity, &pDescription); + consumer->Process_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData(call_info, object_id, pVideoProcessor, StreamIndex, &pType, Size, &pMetaData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_SetBreakOnCategory(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice2_CheckFeatureSupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_MESSAGE_CATEGORY Category; - BOOL bEnable; + D3D11_FEATURE_VIDEO Feature; + PointerDecoder pFeatureSupportData; + UINT FeatureSupportDataSize; HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Category); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &bEnable); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Feature); + bytes_read += pFeatureSupportData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &FeatureSupportDataSize); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_SetBreakOnCategory(call_info, object_id, return_value, Category, bEnable); + consumer->Process_ID3D11VideoDevice2_CheckFeatureSupport(call_info, object_id, return_value, Feature, &pFeatureSupportData, FeatureSupportDataSize); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_SetBreakOnSeverity(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_MESSAGE_SEVERITY Severity; - BOOL bEnable; + format::HandleId pCryptoSession; + D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS flags; + UINT DataSize; + PointerDecoder pData; HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Severity); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &bEnable); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCryptoSession); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &flags); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &DataSize); + bytes_read += pData.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_SetBreakOnSeverity(call_info, object_id, return_value, Severity, bEnable); + consumer->Process_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT(call_info, object_id, return_value, pCryptoSession, flags, DataSize, &pData); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_SetBreakOnID(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext3_DecoderBeginFrame1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_MESSAGE_ID ID; - BOOL bEnable; + format::HandleId pDecoder; + format::HandleId pView; + UINT ContentKeySize; + PointerDecoder pContentKey; + UINT NumComponentHistograms; + PointerDecoder pHistogramOffsets; + HandlePointerDecoder ppHistogramBuffers; HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ID); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &bEnable); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDecoder); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pView); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ContentKeySize); + bytes_read += pContentKey.DecodeVoid((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumComponentHistograms); + bytes_read += pHistogramOffsets.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppHistogramBuffers.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_SetBreakOnID(call_info, object_id, return_value, ID, bEnable); + consumer->Process_ID3D11VideoContext3_DecoderBeginFrame1(call_info, object_id, return_value, pDecoder, pView, ContentKeySize, &pContentKey, NumComponentHistograms, &pHistogramOffsets, &ppHistogramBuffers); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetBreakOnCategory(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11VideoContext3_SubmitDecoderBuffers2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_MESSAGE_CATEGORY Category; - BOOL return_value; + format::HandleId pDecoder; + UINT NumBuffers; + StructPointerDecoder pBufferDesc; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Category); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pDecoder); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumBuffers); + bytes_read += pBufferDesc.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetBreakOnCategory(call_info, object_id, return_value, Category); + consumer->Process_ID3D11VideoContext3_SubmitDecoderBuffers2(call_info, object_id, return_value, pDecoder, NumBuffers, &pBufferDesc); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetBreakOnSeverity(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11On12Device_CreateWrappedResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_MESSAGE_SEVERITY Severity; - BOOL return_value; + format::HandleId pResource12; + StructPointerDecoder pFlags11; + D3D12_RESOURCE_STATES InState; + D3D12_RESOURCE_STATES OutState; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppResource11; + HRESULT return_value; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &Severity); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource12); + bytes_read += pFlags11.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &InState); + bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &OutState); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppResource11.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetBreakOnSeverity(call_info, object_id, return_value, Severity); + consumer->Process_ID3D11On12Device_CreateWrappedResource(call_info, object_id, return_value, pResource12, &pFlags11, InState, OutState, riid, &ppResource11); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetBreakOnID(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11On12Device_ReleaseWrappedResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - D3D12_MESSAGE_ID ID; - BOOL return_value; + HandlePointerDecoder ppResources; + UINT NumResources; - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &ID); - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); + bytes_read += ppResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumResources); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetBreakOnID(call_info, object_id, return_value, ID); + consumer->Process_ID3D11On12Device_ReleaseWrappedResources(call_info, object_id, &ppResources, NumResources); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_SetMuteDebugOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11On12Device_AcquireWrappedResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL bMute; + HandlePointerDecoder ppResources; + UINT NumResources; - bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &bMute); + bytes_read += ppResources.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumResources); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_SetMuteDebugOutput(call_info, object_id, bMute); + consumer->Process_ID3D11On12Device_AcquireWrappedResources(call_info, object_id, &ppResources, NumResources); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue_GetMuteDebugOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11On12Device1_GetD3D12Device(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - BOOL return_value; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvDevice; + HRESULT return_value; + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvDevice.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue_GetMuteDebugOutput(call_info, object_id, return_value); + consumer->Process_ID3D11On12Device1_GetD3D12Device(call_info, object_id, return_value, riid, &ppvDevice); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue1_RegisterMessageCallback(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11On12Device2_UnwrapUnderlyingResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - uint64_t CallbackFunc; - D3D12_MESSAGE_CALLBACK_FLAGS CallbackFilterFlags; - uint64_t pContext; - PointerDecoder pCallbackCookie; + format::HandleId pResource11; + format::HandleId pCommandQueue; + Decoded_GUID riid; + GUID value_riid; + riid.decoded_value = &value_riid; + HandlePointerDecoder ppvResource12; HRESULT return_value; - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CallbackFunc); - bytes_read += ValueDecoder::DecodeEnumValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CallbackFilterFlags); - bytes_read += ValueDecoder::DecodeAddress((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pContext); - bytes_read += pCallbackCookie.DecodeUInt32((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource11); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pCommandQueue); + bytes_read += DecodeStruct((parameter_buffer + bytes_read), (buffer_size - bytes_read), &riid); + bytes_read += ppvResource12.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue1_RegisterMessageCallback(call_info, object_id, return_value, CallbackFunc, CallbackFilterFlags, pContext, &pCallbackCookie); + consumer->Process_ID3D11On12Device2_UnwrapUnderlyingResource(call_info, object_id, return_value, pResource11, pCommandQueue, riid, &ppvResource12); } return bytes_read; } -size_t Dx12Decoder::Decode_ID3D12InfoQueue1_UnregisterMessageCallback(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) +size_t Dx12Decoder::Decode_ID3D11On12Device2_ReturnUnderlyingResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size) { size_t bytes_read = 0; - DWORD CallbackCookie; + format::HandleId pResource11; + UINT NumSync; + PointerDecoder pSignalValues; + HandlePointerDecoder ppFences; HRESULT return_value; - bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &CallbackCookie); + bytes_read += ValueDecoder::DecodeHandleIdValue((parameter_buffer + bytes_read), (buffer_size - bytes_read), &pResource11); + bytes_read += ValueDecoder::DecodeUInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &NumSync); + bytes_read += pSignalValues.DecodeUInt64((parameter_buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ppFences.Decode((parameter_buffer + bytes_read), (buffer_size - bytes_read)); bytes_read += ValueDecoder::DecodeInt32Value((parameter_buffer + bytes_read), (buffer_size - bytes_read), &return_value); for (auto consumer : GetConsumers()) { - consumer->Process_ID3D12InfoQueue1_UnregisterMessageCallback(call_info, object_id, return_value, CallbackCookie); + consumer->Process_ID3D11On12Device2_ReturnUnderlyingResource(call_info, object_id, return_value, pResource11, NumSync, &pSignalValues, &ppFences); } return bytes_read; diff --git a/framework/generated/generated_dx12_decoder.h b/framework/generated/generated_dx12_decoder.h index 56070d5d66..6de064acc1 100644 --- a/framework/generated/generated_dx12_decoder.h +++ b/framework/generated/generated_dx12_decoder.h @@ -578,6 +578,416 @@ class Dx12Decoder : public Dx12DecoderBase size_t Decode_ID3D12InfoQueue1_RegisterMessageCallback(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); size_t Decode_ID3D12InfoQueue1_UnregisterMessageCallback(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); +/* +** This part is generated from d3d11.h in Windows SDK: 10.0.20348.0 +** +*/ + size_t Decode_D3D11CreateDevice(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_D3D11CreateDeviceAndSwapChain(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceChild_GetDevice(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceChild_GetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceChild_SetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceChild_SetPrivateDataInterface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DepthStencilState_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11BlendState_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11RasterizerState_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Resource_GetType(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Resource_SetEvictionPriority(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Resource_GetEvictionPriority(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Buffer_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Texture1D_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Texture2D_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Texture3D_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11View_GetResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11ShaderResourceView_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11RenderTargetView_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DepthStencilView_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11UnorderedAccessView_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11SamplerState_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Asynchronous_GetDataSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Query_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Counter_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11ClassInstance_GetClassLinkage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11ClassInstance_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11ClassInstance_GetInstanceName(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11ClassInstance_GetTypeName(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11ClassLinkage_GetClassInstance(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11ClassLinkage_CreateClassInstance(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11CommandList_GetContextFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_VSSetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_PSSetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_PSSetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_PSSetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_VSSetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DrawIndexed(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_Draw(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_Map(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_Unmap(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_PSSetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_IASetInputLayout(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_IASetVertexBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_IASetIndexBuffer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DrawIndexedInstanced(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DrawInstanced(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_GSSetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_GSSetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_IASetPrimitiveTopology(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_VSSetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_VSSetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_Begin(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_End(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_GetData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_SetPredication(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_GSSetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_GSSetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_OMSetRenderTargets(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_OMSetBlendState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_OMSetDepthStencilState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_SOSetTargets(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DrawAuto(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DrawIndexedInstancedIndirect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DrawInstancedIndirect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_Dispatch(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DispatchIndirect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_RSSetState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_RSSetViewports(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_RSSetScissorRects(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_CopySubresourceRegion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_CopyResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_CopyStructureCount(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_ClearRenderTargetView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_ClearUnorderedAccessViewUint(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_ClearUnorderedAccessViewFloat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_ClearDepthStencilView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_GenerateMips(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_SetResourceMinLOD(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_GetResourceMinLOD(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_ResolveSubresource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_ExecuteCommandList(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_HSSetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_HSSetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_HSSetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_HSSetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DSSetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DSSetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DSSetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DSSetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_CSSetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_CSSetUnorderedAccessViews(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_CSSetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_CSSetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_CSSetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_VSGetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_PSGetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_PSGetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_PSGetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_VSGetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_PSGetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_IAGetInputLayout(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_IAGetVertexBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_IAGetIndexBuffer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_GSGetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_GSGetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_IAGetPrimitiveTopology(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_VSGetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_VSGetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_GetPredication(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_GSGetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_GSGetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_OMGetRenderTargets(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_OMGetBlendState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_OMGetDepthStencilState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_SOGetTargets(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_RSGetState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_RSGetViewports(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_RSGetScissorRects(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_HSGetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_HSGetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_HSGetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_HSGetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DSGetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DSGetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DSGetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_DSGetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_CSGetShaderResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_CSGetUnorderedAccessViews(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_CSGetShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_CSGetSamplers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_CSGetConstantBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_ClearState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_Flush(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_GetType(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_GetContextFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext_FinishCommandList(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDecoder_GetCreationParameters(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDecoder_GetDriverHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoProcessor_GetContentDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoProcessor_GetRateConversionCaps(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11AuthenticatedChannel_GetCertificateSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11AuthenticatedChannel_GetCertificate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11AuthenticatedChannel_GetChannelHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11CryptoSession_GetCryptoType(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11CryptoSession_GetDecoderProfile(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11CryptoSession_GetCertificateSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11CryptoSession_GetCertificate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11CryptoSession_GetCryptoSessionHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDecoderOutputView_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoProcessorInputView_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoProcessorOutputView_GetDesc(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_GetDecoderBuffer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_ReleaseDecoderBuffer(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_DecoderBeginFrame(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_DecoderEndFrame(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_SubmitDecoderBuffers(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_DecoderExtension(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetOutputTargetRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetOutputColorSpace(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetOutputConstriction(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetOutputStereoMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetOutputExtension(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetOutputTargetRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetOutputColorSpace(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetOutputConstriction(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetOutputStereoMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetOutputExtension(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetStreamColorSpace(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetStreamOutputRate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetStreamSourceRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetStreamDestRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetStreamAlpha(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetStreamPalette(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetStreamLumaKey(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetStreamFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetStreamExtension(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetStreamColorSpace(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetStreamOutputRate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetStreamSourceRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetStreamDestRect(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetStreamAlpha(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetStreamPalette(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetStreamLumaKey(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetStreamFilter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetStreamExtension(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorBlt(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_EncryptionBlt(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_DecryptionBlt(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_StartSessionKeyRefresh(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_FinishSessionKeyRefresh(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_GetEncryptionBltKey(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_QueryAuthenticatedChannel(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_ConfigureAuthenticatedChannel(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorSetStreamRotation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext_VideoProcessorGetStreamRotation(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_CreateVideoDecoder(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_CreateVideoProcessor(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_CreateAuthenticatedChannel(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_CreateCryptoSession(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_CreateVideoDecoderOutputView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_CreateVideoProcessorInputView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_CreateVideoProcessorOutputView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_CreateVideoProcessorEnumerator(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_GetVideoDecoderProfileCount(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_GetVideoDecoderProfile(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_CheckVideoDecoderFormat(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_GetVideoDecoderConfigCount(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_GetVideoDecoderConfig(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_GetContentProtectionCaps(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_CheckCryptoKeyExchange(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_SetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice_SetPrivateDataInterface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateShaderResourceView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateUnorderedAccessView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateRenderTargetView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateDepthStencilView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateInputLayout(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateVertexShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateGeometryShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateGeometryShaderWithStreamOutput(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreatePixelShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateHullShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateDomainShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateComputeShader(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateClassLinkage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateBlendState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateDepthStencilState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateRasterizerState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateSamplerState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateQuery(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreatePredicate(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateCounter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CreateDeferredContext(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_OpenSharedResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CheckFormatSupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CheckMultisampleQualityLevels(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CheckCounterInfo(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_CheckCounter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_GetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_SetPrivateData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_SetPrivateDataInterface(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_GetFeatureLevel(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_GetCreationFlags(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_GetDeviceRemovedReason(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_GetImmediateContext(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_SetExceptionMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device_GetExceptionMode(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + +/* +** This part is generated from d3d11_1.h in Windows SDK: 10.0.20348.0 +** +*/ + size_t Decode_ID3D11BlendState1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11RasterizerState1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_CopySubresourceRegion1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_DiscardResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_DiscardView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_VSSetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_HSSetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_DSSetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_GSSetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_PSSetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_CSSetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_VSGetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_HSGetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_DSGetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_GSGetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_PSGetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_CSGetConstantBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_SwapDeviceContextState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_ClearView(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext1_DiscardView1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext1_SubmitDecoderBuffers1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext1_GetDataForNewHardwareKey(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext1_CheckCryptoSessionStatus(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext1_DecoderEnableDownsampling(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext1_DecoderUpdateDownsampling(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext1_VideoProcessorSetStreamMirror(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext1_VideoProcessorGetStreamMirror(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext1_VideoProcessorGetBehaviorHints(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice1_GetVideoDecoderCaps(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice1_CheckVideoDecoderDownsampling(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device1_GetImmediateContext1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device1_CreateDeferredContext1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device1_CreateBlendState1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device1_CreateRasterizerState1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device1_CreateDeviceContextState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device1_OpenSharedResource1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device1_OpenSharedResourceByName(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3DUserDefinedAnnotation_BeginEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3DUserDefinedAnnotation_EndEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3DUserDefinedAnnotation_SetMarker(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3DUserDefinedAnnotation_GetStatus(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + +/* +** This part is generated from d3d11_2.h in Windows SDK: 10.0.20348.0 +** +*/ + size_t Decode_ID3D11DeviceContext2_UpdateTileMappings(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext2_CopyTileMappings(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext2_CopyTiles(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext2_UpdateTiles(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext2_ResizeTilePool(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext2_TiledResourceBarrier(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext2_IsAnnotationEnabled(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext2_SetMarkerInt(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext2_BeginEventInt(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext2_EndEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device2_GetImmediateContext2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device2_CreateDeferredContext2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device2_GetResourceTiling(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device2_CheckMultisampleQualityLevels1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + +/* +** This part is generated from d3d11_3.h in Windows SDK: 10.0.20348.0 +** +*/ + size_t Decode_ID3D11Texture2D1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Texture3D1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11RasterizerState2_GetDesc2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11ShaderResourceView1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11RenderTargetView1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11UnorderedAccessView1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Query1_GetDesc1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext3_Flush1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext3_SetHardwareProtectionState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext3_GetHardwareProtectionState(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Fence_CreateSharedHandle(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Fence_GetCompletedValue(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Fence_SetEventOnCompletion(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext4_Signal(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11DeviceContext4_Wait(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device3_CreateRasterizerState2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device3_CreateShaderResourceView1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device3_CreateUnorderedAccessView1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device3_CreateRenderTargetView1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device3_CreateQuery1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device3_GetImmediateContext3(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device3_CreateDeferredContext3(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device3_ReadFromSubresource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + +/* +** This part is generated from d3d11_4.h in Windows SDK: 10.0.20348.0 +** +*/ + size_t Decode_ID3D11Device4_RegisterDeviceRemovedEvent(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device4_UnregisterDeviceRemoved(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device5_OpenSharedFence(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Device5_CreateFence(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Multithread_Enter(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Multithread_Leave(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Multithread_SetMultithreadProtected(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11Multithread_GetMultithreadProtected(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice2_CheckFeatureSupport(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext3_DecoderBeginFrame1(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11VideoContext3_SubmitDecoderBuffers2(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + +/* +** This part is generated from d3d11on12.h in Windows SDK: 10.0.20348.0 +** +*/ + size_t Decode_D3D11On12CreateDevice(const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11On12Device_CreateWrappedResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11On12Device_ReleaseWrappedResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11On12Device_AcquireWrappedResources(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11On12Device1_GetD3D12Device(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11On12Device2_UnwrapUnderlyingResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + size_t Decode_ID3D11On12Device2_ReturnUnderlyingResource(format::HandleId object_id, const ApiCallInfo& call_info, const uint8_t* parameter_buffer, size_t buffer_size); + /* ** This part is generated from Unknwnbase.h in Windows SDK: 10.0.20348.0 ** diff --git a/framework/generated/generated_dx12_enum_to_json.h b/framework/generated/generated_dx12_enum_to_json.h index da6b6fe135..84cd3bb6d8 100644 --- a/framework/generated/generated_dx12_enum_to_json.h +++ b/framework/generated/generated_dx12_enum_to_json.h @@ -1958,6 +1958,807 @@ inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D12_MESSAGE_CALLB FieldToJson(jdata, *pEnum, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_INPUT_CLASSIFICATION value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_INPUT_CLASSIFICATION* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FILL_MODE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FILL_MODE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CULL_MODE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CULL_MODE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_RESOURCE_DIMENSION value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_RESOURCE_DIMENSION* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_DSV_DIMENSION value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_DSV_DIMENSION* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_RTV_DIMENSION value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_RTV_DIMENSION* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_UAV_DIMENSION value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_UAV_DIMENSION* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_USAGE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_USAGE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_BIND_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_BIND_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CPU_ACCESS_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CPU_ACCESS_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_RESOURCE_MISC_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_RESOURCE_MISC_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_MAP value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_MAP* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_MAP_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_MAP_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_RAISE_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_RAISE_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CLEAR_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CLEAR_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_COMPARISON_FUNC value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_COMPARISON_FUNC* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_DEPTH_WRITE_MASK value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_DEPTH_WRITE_MASK* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_STENCIL_OP value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_STENCIL_OP* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_BLEND value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_BLEND* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_BLEND_OP value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_BLEND_OP* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_COLOR_WRITE_ENABLE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_COLOR_WRITE_ENABLE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_TEXTURECUBE_FACE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_TEXTURECUBE_FACE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_BUFFEREX_SRV_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_BUFFEREX_SRV_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_DSV_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_DSV_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_BUFFER_UAV_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_BUFFER_UAV_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FILTER value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FILTER* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FILTER_TYPE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FILTER_TYPE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FILTER_REDUCTION_TYPE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FILTER_REDUCTION_TYPE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_TEXTURE_ADDRESS_MODE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_TEXTURE_ADDRESS_MODE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FORMAT_SUPPORT value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FORMAT_SUPPORT* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FORMAT_SUPPORT2 value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FORMAT_SUPPORT2* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_ASYNC_GETDATA_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_ASYNC_GETDATA_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_QUERY value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_QUERY* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_QUERY_MISC_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_QUERY_MISC_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_COUNTER value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_COUNTER* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_COUNTER_TYPE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_COUNTER_TYPE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_DEVICE_CONTEXT_TYPE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_DEVICE_CONTEXT_TYPE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FEATURE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FEATURE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_SHADER_MIN_PRECISION_SUPPORT value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_SHADER_MIN_PRECISION_SUPPORT* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_TILED_RESOURCES_TIER value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_TILED_RESOURCES_TIER* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CONSERVATIVE_RASTERIZATION_TIER value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CONSERVATIVE_RASTERIZATION_TIER* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_SHADER_CACHE_SUPPORT_FLAGS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_SHADER_CACHE_SUPPORT_FLAGS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_SHARED_RESOURCE_TIER value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_SHARED_RESOURCE_TIER* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_DECODER_BUFFER_TYPE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_DECODER_BUFFER_TYPE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_DEVICE_CAPS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_DEVICE_CAPS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_FEATURE_CAPS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_FEATURE_CAPS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_FILTER_CAPS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_FILTER_CAPS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_FORMAT_CAPS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_FORMAT_CAPS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_STEREO_CAPS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_STEREO_CAPS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CONTENT_PROTECTION_CAPS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CONTENT_PROTECTION_CAPS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_FILTER value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_FILTER* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_FRAME_FORMAT value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_FRAME_FORMAT* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_USAGE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_USAGE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_OUTPUT_RATE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_OUTPUT_RATE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_STEREO_FORMAT value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_STEREO_FORMAT* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_ROTATION value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_ROTATION* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_AUTHENTICATED_CHANNEL_TYPE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_AUTHENTICATED_CHANNEL_TYPE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_BUS_TYPE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_BUS_TYPE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VDOV_DIMENSION value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VDOV_DIMENSION* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VPIV_DIMENSION value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VPIV_DIMENSION* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VPOV_DIMENSION value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VPOV_DIMENSION* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CREATE_DEVICE_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CREATE_DEVICE_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_COPY_FLAGS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_COPY_FLAGS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_LOGIC_OP value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_LOGIC_OP* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_DECODER_CAPS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_DECODER_CAPS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINTS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINTS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CRYPTO_SESSION_STATUS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CRYPTO_SESSION_STATUS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_TILE_MAPPING_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_TILE_MAPPING_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_TILE_RANGE_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_TILE_RANGE_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_TILE_COPY_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_TILE_COPY_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CONTEXT_TYPE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CONTEXT_TYPE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_TEXTURE_LAYOUT value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_TEXTURE_LAYOUT* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CONSERVATIVE_RASTERIZATION_MODE value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CONSERVATIVE_RASTERIZATION_MODE* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FENCE_FLAG value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FENCE_FLAG* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FEATURE_VIDEO value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_FEATURE_VIDEO* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAGS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAGS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS value, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, ToString(value), options); +} +inline void FieldToJson(nlohmann::ordered_json& jdata, const D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS* pEnum, const JsonOptions& options = JsonOptions()) +{ + FieldToJson(jdata, *pEnum, options); +} + inline void FieldToJson_DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS(nlohmann::ordered_json& jdata, const uint32_t flags, const JsonOptions& options = JsonOptions()) { @@ -2791,6 +3592,110 @@ inline void FieldToJson_D3D12_MESSAGE_CALLBACK_FLAGS(nlohmann::ordered_json& jda } FieldToJson(jdata, representation, options); } +inline void FieldToJson_D3D11_FORMAT_SUPPORT(nlohmann::ordered_json& jdata, const uint32_t flags, const JsonOptions& options = JsonOptions()) +{ + std::string representation; + if (!options.expand_flags) + { + representation = to_hex_fixed_width(flags); + } + else + { + representation = ToString_D3D11_FORMAT_SUPPORT(flags); + } + FieldToJson(jdata, representation, options); +} +inline void FieldToJson_D3D11_FORMAT_SUPPORT2(nlohmann::ordered_json& jdata, const uint32_t flags, const JsonOptions& options = JsonOptions()) +{ + std::string representation; + if (!options.expand_flags) + { + representation = to_hex_fixed_width(flags); + } + else + { + representation = ToString_D3D11_FORMAT_SUPPORT2(flags); + } + FieldToJson(jdata, representation, options); +} +inline void FieldToJson_D3D11_SHADER_MIN_PRECISION_SUPPORT(nlohmann::ordered_json& jdata, const uint32_t flags, const JsonOptions& options = JsonOptions()) +{ + std::string representation; + if (!options.expand_flags) + { + representation = to_hex_fixed_width(flags); + } + else + { + representation = ToString_D3D11_SHADER_MIN_PRECISION_SUPPORT(flags); + } + FieldToJson(jdata, representation, options); +} +inline void FieldToJson_D3D11_SHADER_CACHE_SUPPORT_FLAGS(nlohmann::ordered_json& jdata, const uint32_t flags, const JsonOptions& options = JsonOptions()) +{ + std::string representation; + if (!options.expand_flags) + { + representation = to_hex_fixed_width(flags); + } + else + { + representation = ToString_D3D11_SHADER_CACHE_SUPPORT_FLAGS(flags); + } + FieldToJson(jdata, representation, options); +} +inline void FieldToJson_D3D11_COPY_FLAGS(nlohmann::ordered_json& jdata, const uint32_t flags, const JsonOptions& options = JsonOptions()) +{ + std::string representation; + if (!options.expand_flags) + { + representation = to_hex_fixed_width(flags); + } + else + { + representation = ToString_D3D11_COPY_FLAGS(flags); + } + FieldToJson(jdata, representation, options); +} +inline void FieldToJson_D3D11_CRYPTO_SESSION_STATUS(nlohmann::ordered_json& jdata, const uint32_t flags, const JsonOptions& options = JsonOptions()) +{ + std::string representation; + if (!options.expand_flags) + { + representation = to_hex_fixed_width(flags); + } + else + { + representation = ToString_D3D11_CRYPTO_SESSION_STATUS(flags); + } + FieldToJson(jdata, representation, options); +} +inline void FieldToJson_D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAGS(nlohmann::ordered_json& jdata, const uint32_t flags, const JsonOptions& options = JsonOptions()) +{ + std::string representation; + if (!options.expand_flags) + { + representation = to_hex_fixed_width(flags); + } + else + { + representation = ToString_D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAGS(flags); + } + FieldToJson(jdata, representation, options); +} +inline void FieldToJson_D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS(nlohmann::ordered_json& jdata, const uint32_t flags, const JsonOptions& options = JsonOptions()) +{ + std::string representation; + if (!options.expand_flags) + { + representation = to_hex_fixed_width(flags); + } + else + { + representation = ToString_D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS(flags); + } + FieldToJson(jdata, representation, options); +} // IID struct-as-enum special case: inline void FieldToJson(nlohmann::ordered_json& jdata, const IID& value, const JsonOptions& options = JsonOptions()) diff --git a/framework/generated/generated_dx12_enum_to_string.cpp b/framework/generated/generated_dx12_enum_to_string.cpp index 6ec92717a3..21251a8980 100644 --- a/framework/generated/generated_dx12_enum_to_string.cpp +++ b/framework/generated/generated_dx12_enum_to_string.cpp @@ -4551,6 +4551,1267 @@ std::string ToString_D3D12_MESSAGE_CALLBACK_FLAGS(const uint32_t flags) return BitmaskToString(flags); } +std::string ToString(const D3D11_INPUT_CLASSIFICATION value) +{ + const char* ret = "Unhandled D3D11_INPUT_CLASSIFICATION"; + switch (value) { + case D3D11_INPUT_PER_VERTEX_DATA: ret = "D3D11_INPUT_PER_VERTEX_DATA"; break; + case D3D11_INPUT_PER_INSTANCE_DATA: ret = "D3D11_INPUT_PER_INSTANCE_DATA"; break; + } + return ret; +} + +std::string ToString(const D3D11_FILL_MODE value) +{ + const char* ret = "Unhandled D3D11_FILL_MODE"; + switch (value) { + case D3D11_FILL_WIREFRAME: ret = "D3D11_FILL_WIREFRAME"; break; + case D3D11_FILL_SOLID: ret = "D3D11_FILL_SOLID"; break; + } + return ret; +} + +std::string ToString(const D3D11_CULL_MODE value) +{ + const char* ret = "Unhandled D3D11_CULL_MODE"; + switch (value) { + case D3D11_CULL_NONE: ret = "D3D11_CULL_NONE"; break; + case D3D11_CULL_FRONT: ret = "D3D11_CULL_FRONT"; break; + case D3D11_CULL_BACK: ret = "D3D11_CULL_BACK"; break; + } + return ret; +} + +std::string ToString(const D3D11_RESOURCE_DIMENSION value) +{ + const char* ret = "Unhandled D3D11_RESOURCE_DIMENSION"; + switch (value) { + case D3D11_RESOURCE_DIMENSION_UNKNOWN: ret = "D3D11_RESOURCE_DIMENSION_UNKNOWN"; break; + case D3D11_RESOURCE_DIMENSION_BUFFER: ret = "D3D11_RESOURCE_DIMENSION_BUFFER"; break; + case D3D11_RESOURCE_DIMENSION_TEXTURE1D: ret = "D3D11_RESOURCE_DIMENSION_TEXTURE1D"; break; + case D3D11_RESOURCE_DIMENSION_TEXTURE2D: ret = "D3D11_RESOURCE_DIMENSION_TEXTURE2D"; break; + case D3D11_RESOURCE_DIMENSION_TEXTURE3D: ret = "D3D11_RESOURCE_DIMENSION_TEXTURE3D"; break; + } + return ret; +} + +std::string ToString(const D3D11_DSV_DIMENSION value) +{ + const char* ret = "Unhandled D3D11_DSV_DIMENSION"; + switch (value) { + case D3D11_DSV_DIMENSION_UNKNOWN: ret = "D3D11_DSV_DIMENSION_UNKNOWN"; break; + case D3D11_DSV_DIMENSION_TEXTURE1D: ret = "D3D11_DSV_DIMENSION_TEXTURE1D"; break; + case D3D11_DSV_DIMENSION_TEXTURE1DARRAY: ret = "D3D11_DSV_DIMENSION_TEXTURE1DARRAY"; break; + case D3D11_DSV_DIMENSION_TEXTURE2D: ret = "D3D11_DSV_DIMENSION_TEXTURE2D"; break; + case D3D11_DSV_DIMENSION_TEXTURE2DARRAY: ret = "D3D11_DSV_DIMENSION_TEXTURE2DARRAY"; break; + case D3D11_DSV_DIMENSION_TEXTURE2DMS: ret = "D3D11_DSV_DIMENSION_TEXTURE2DMS"; break; + case D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY: ret = "D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY"; break; + } + return ret; +} + +std::string ToString(const D3D11_RTV_DIMENSION value) +{ + const char* ret = "Unhandled D3D11_RTV_DIMENSION"; + switch (value) { + case D3D11_RTV_DIMENSION_UNKNOWN: ret = "D3D11_RTV_DIMENSION_UNKNOWN"; break; + case D3D11_RTV_DIMENSION_BUFFER: ret = "D3D11_RTV_DIMENSION_BUFFER"; break; + case D3D11_RTV_DIMENSION_TEXTURE1D: ret = "D3D11_RTV_DIMENSION_TEXTURE1D"; break; + case D3D11_RTV_DIMENSION_TEXTURE1DARRAY: ret = "D3D11_RTV_DIMENSION_TEXTURE1DARRAY"; break; + case D3D11_RTV_DIMENSION_TEXTURE2D: ret = "D3D11_RTV_DIMENSION_TEXTURE2D"; break; + case D3D11_RTV_DIMENSION_TEXTURE2DARRAY: ret = "D3D11_RTV_DIMENSION_TEXTURE2DARRAY"; break; + case D3D11_RTV_DIMENSION_TEXTURE2DMS: ret = "D3D11_RTV_DIMENSION_TEXTURE2DMS"; break; + case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY: ret = "D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY"; break; + case D3D11_RTV_DIMENSION_TEXTURE3D: ret = "D3D11_RTV_DIMENSION_TEXTURE3D"; break; + } + return ret; +} + +std::string ToString(const D3D11_UAV_DIMENSION value) +{ + const char* ret = "Unhandled D3D11_UAV_DIMENSION"; + switch (value) { + case D3D11_UAV_DIMENSION_UNKNOWN: ret = "D3D11_UAV_DIMENSION_UNKNOWN"; break; + case D3D11_UAV_DIMENSION_BUFFER: ret = "D3D11_UAV_DIMENSION_BUFFER"; break; + case D3D11_UAV_DIMENSION_TEXTURE1D: ret = "D3D11_UAV_DIMENSION_TEXTURE1D"; break; + case D3D11_UAV_DIMENSION_TEXTURE1DARRAY: ret = "D3D11_UAV_DIMENSION_TEXTURE1DARRAY"; break; + case D3D11_UAV_DIMENSION_TEXTURE2D: ret = "D3D11_UAV_DIMENSION_TEXTURE2D"; break; + case D3D11_UAV_DIMENSION_TEXTURE2DARRAY: ret = "D3D11_UAV_DIMENSION_TEXTURE2DARRAY"; break; + case D3D11_UAV_DIMENSION_TEXTURE3D: ret = "D3D11_UAV_DIMENSION_TEXTURE3D"; break; + } + return ret; +} + +std::string ToString(const D3D11_USAGE value) +{ + const char* ret = "Unhandled D3D11_USAGE"; + switch (value) { + case D3D11_USAGE_DEFAULT: ret = "D3D11_USAGE_DEFAULT"; break; + case D3D11_USAGE_IMMUTABLE: ret = "D3D11_USAGE_IMMUTABLE"; break; + case D3D11_USAGE_DYNAMIC: ret = "D3D11_USAGE_DYNAMIC"; break; + case D3D11_USAGE_STAGING: ret = "D3D11_USAGE_STAGING"; break; + } + return ret; +} + +std::string ToString(const D3D11_BIND_FLAG value) +{ + const char* ret = "Unhandled D3D11_BIND_FLAG"; + switch (value) { + case D3D11_BIND_VERTEX_BUFFER: ret = "D3D11_BIND_VERTEX_BUFFER"; break; + case D3D11_BIND_INDEX_BUFFER: ret = "D3D11_BIND_INDEX_BUFFER"; break; + case D3D11_BIND_CONSTANT_BUFFER: ret = "D3D11_BIND_CONSTANT_BUFFER"; break; + case D3D11_BIND_SHADER_RESOURCE: ret = "D3D11_BIND_SHADER_RESOURCE"; break; + case D3D11_BIND_STREAM_OUTPUT: ret = "D3D11_BIND_STREAM_OUTPUT"; break; + case D3D11_BIND_RENDER_TARGET: ret = "D3D11_BIND_RENDER_TARGET"; break; + case D3D11_BIND_DEPTH_STENCIL: ret = "D3D11_BIND_DEPTH_STENCIL"; break; + case D3D11_BIND_UNORDERED_ACCESS: ret = "D3D11_BIND_UNORDERED_ACCESS"; break; + case D3D11_BIND_DECODER: ret = "D3D11_BIND_DECODER"; break; + case D3D11_BIND_VIDEO_ENCODER: ret = "D3D11_BIND_VIDEO_ENCODER"; break; + } + return ret; +} + +std::string ToString(const D3D11_CPU_ACCESS_FLAG value) +{ + const char* ret = "Unhandled D3D11_CPU_ACCESS_FLAG"; + switch (value) { + case D3D11_CPU_ACCESS_WRITE: ret = "D3D11_CPU_ACCESS_WRITE"; break; + case D3D11_CPU_ACCESS_READ: ret = "D3D11_CPU_ACCESS_READ"; break; + } + return ret; +} + +std::string ToString(const D3D11_RESOURCE_MISC_FLAG value) +{ + const char* ret = "Unhandled D3D11_RESOURCE_MISC_FLAG"; + switch (value) { + case D3D11_RESOURCE_MISC_GENERATE_MIPS: ret = "D3D11_RESOURCE_MISC_GENERATE_MIPS"; break; + case D3D11_RESOURCE_MISC_SHARED: ret = "D3D11_RESOURCE_MISC_SHARED"; break; + case D3D11_RESOURCE_MISC_TEXTURECUBE: ret = "D3D11_RESOURCE_MISC_TEXTURECUBE"; break; + case D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS: ret = "D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS"; break; + case D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS: ret = "D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS"; break; + case D3D11_RESOURCE_MISC_BUFFER_STRUCTURED: ret = "D3D11_RESOURCE_MISC_BUFFER_STRUCTURED"; break; + case D3D11_RESOURCE_MISC_RESOURCE_CLAMP: ret = "D3D11_RESOURCE_MISC_RESOURCE_CLAMP"; break; + case D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX: ret = "D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX"; break; + case D3D11_RESOURCE_MISC_GDI_COMPATIBLE: ret = "D3D11_RESOURCE_MISC_GDI_COMPATIBLE"; break; + case D3D11_RESOURCE_MISC_SHARED_NTHANDLE: ret = "D3D11_RESOURCE_MISC_SHARED_NTHANDLE"; break; + case D3D11_RESOURCE_MISC_RESTRICTED_CONTENT: ret = "D3D11_RESOURCE_MISC_RESTRICTED_CONTENT"; break; + case D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE: ret = "D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE"; break; + case D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE_DRIVER: ret = "D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE_DRIVER"; break; + case D3D11_RESOURCE_MISC_GUARDED: ret = "D3D11_RESOURCE_MISC_GUARDED"; break; + case D3D11_RESOURCE_MISC_TILE_POOL: ret = "D3D11_RESOURCE_MISC_TILE_POOL"; break; + case D3D11_RESOURCE_MISC_TILED: ret = "D3D11_RESOURCE_MISC_TILED"; break; + case D3D11_RESOURCE_MISC_HW_PROTECTED: ret = "D3D11_RESOURCE_MISC_HW_PROTECTED"; break; + } + return ret; +} + +std::string ToString(const D3D11_MAP value) +{ + const char* ret = "Unhandled D3D11_MAP"; + switch (value) { + case D3D11_MAP_READ: ret = "D3D11_MAP_READ"; break; + case D3D11_MAP_WRITE: ret = "D3D11_MAP_WRITE"; break; + case D3D11_MAP_READ_WRITE: ret = "D3D11_MAP_READ_WRITE"; break; + case D3D11_MAP_WRITE_DISCARD: ret = "D3D11_MAP_WRITE_DISCARD"; break; + case D3D11_MAP_WRITE_NO_OVERWRITE: ret = "D3D11_MAP_WRITE_NO_OVERWRITE"; break; + } + return ret; +} + +std::string ToString(const D3D11_MAP_FLAG value) +{ + const char* ret = "Unhandled D3D11_MAP_FLAG"; + switch (value) { + case D3D11_MAP_FLAG_DO_NOT_WAIT: ret = "D3D11_MAP_FLAG_DO_NOT_WAIT"; break; + } + return ret; +} + +std::string ToString(const D3D11_RAISE_FLAG value) +{ + const char* ret = "Unhandled D3D11_RAISE_FLAG"; + switch (value) { + case D3D11_RAISE_FLAG_DRIVER_INTERNAL_ERROR: ret = "D3D11_RAISE_FLAG_DRIVER_INTERNAL_ERROR"; break; + } + return ret; +} + +std::string ToString(const D3D11_CLEAR_FLAG value) +{ + const char* ret = "Unhandled D3D11_CLEAR_FLAG"; + switch (value) { + case D3D11_CLEAR_DEPTH: ret = "D3D11_CLEAR_DEPTH"; break; + case D3D11_CLEAR_STENCIL: ret = "D3D11_CLEAR_STENCIL"; break; + } + return ret; +} + +std::string ToString(const D3D11_COMPARISON_FUNC value) +{ + const char* ret = "Unhandled D3D11_COMPARISON_FUNC"; + switch (value) { + case D3D11_COMPARISON_NEVER: ret = "D3D11_COMPARISON_NEVER"; break; + case D3D11_COMPARISON_LESS: ret = "D3D11_COMPARISON_LESS"; break; + case D3D11_COMPARISON_EQUAL: ret = "D3D11_COMPARISON_EQUAL"; break; + case D3D11_COMPARISON_LESS_EQUAL: ret = "D3D11_COMPARISON_LESS_EQUAL"; break; + case D3D11_COMPARISON_GREATER: ret = "D3D11_COMPARISON_GREATER"; break; + case D3D11_COMPARISON_NOT_EQUAL: ret = "D3D11_COMPARISON_NOT_EQUAL"; break; + case D3D11_COMPARISON_GREATER_EQUAL: ret = "D3D11_COMPARISON_GREATER_EQUAL"; break; + case D3D11_COMPARISON_ALWAYS: ret = "D3D11_COMPARISON_ALWAYS"; break; + } + return ret; +} + +std::string ToString(const D3D11_DEPTH_WRITE_MASK value) +{ + const char* ret = "Unhandled D3D11_DEPTH_WRITE_MASK"; + switch (value) { + case D3D11_DEPTH_WRITE_MASK_ZERO: ret = "D3D11_DEPTH_WRITE_MASK_ZERO"; break; + case D3D11_DEPTH_WRITE_MASK_ALL: ret = "D3D11_DEPTH_WRITE_MASK_ALL"; break; + } + return ret; +} + +std::string ToString(const D3D11_STENCIL_OP value) +{ + const char* ret = "Unhandled D3D11_STENCIL_OP"; + switch (value) { + case D3D11_STENCIL_OP_KEEP: ret = "D3D11_STENCIL_OP_KEEP"; break; + case D3D11_STENCIL_OP_ZERO: ret = "D3D11_STENCIL_OP_ZERO"; break; + case D3D11_STENCIL_OP_REPLACE: ret = "D3D11_STENCIL_OP_REPLACE"; break; + case D3D11_STENCIL_OP_INCR_SAT: ret = "D3D11_STENCIL_OP_INCR_SAT"; break; + case D3D11_STENCIL_OP_DECR_SAT: ret = "D3D11_STENCIL_OP_DECR_SAT"; break; + case D3D11_STENCIL_OP_INVERT: ret = "D3D11_STENCIL_OP_INVERT"; break; + case D3D11_STENCIL_OP_INCR: ret = "D3D11_STENCIL_OP_INCR"; break; + case D3D11_STENCIL_OP_DECR: ret = "D3D11_STENCIL_OP_DECR"; break; + } + return ret; +} + +std::string ToString(const D3D11_BLEND value) +{ + const char* ret = "Unhandled D3D11_BLEND"; + switch (value) { + case D3D11_BLEND_ZERO: ret = "D3D11_BLEND_ZERO"; break; + case D3D11_BLEND_ONE: ret = "D3D11_BLEND_ONE"; break; + case D3D11_BLEND_SRC_COLOR: ret = "D3D11_BLEND_SRC_COLOR"; break; + case D3D11_BLEND_INV_SRC_COLOR: ret = "D3D11_BLEND_INV_SRC_COLOR"; break; + case D3D11_BLEND_SRC_ALPHA: ret = "D3D11_BLEND_SRC_ALPHA"; break; + case D3D11_BLEND_INV_SRC_ALPHA: ret = "D3D11_BLEND_INV_SRC_ALPHA"; break; + case D3D11_BLEND_DEST_ALPHA: ret = "D3D11_BLEND_DEST_ALPHA"; break; + case D3D11_BLEND_INV_DEST_ALPHA: ret = "D3D11_BLEND_INV_DEST_ALPHA"; break; + case D3D11_BLEND_DEST_COLOR: ret = "D3D11_BLEND_DEST_COLOR"; break; + case D3D11_BLEND_INV_DEST_COLOR: ret = "D3D11_BLEND_INV_DEST_COLOR"; break; + case D3D11_BLEND_SRC_ALPHA_SAT: ret = "D3D11_BLEND_SRC_ALPHA_SAT"; break; + case D3D11_BLEND_BLEND_FACTOR: ret = "D3D11_BLEND_BLEND_FACTOR"; break; + case D3D11_BLEND_INV_BLEND_FACTOR: ret = "D3D11_BLEND_INV_BLEND_FACTOR"; break; + case D3D11_BLEND_SRC1_COLOR: ret = "D3D11_BLEND_SRC1_COLOR"; break; + case D3D11_BLEND_INV_SRC1_COLOR: ret = "D3D11_BLEND_INV_SRC1_COLOR"; break; + case D3D11_BLEND_SRC1_ALPHA: ret = "D3D11_BLEND_SRC1_ALPHA"; break; + case D3D11_BLEND_INV_SRC1_ALPHA: ret = "D3D11_BLEND_INV_SRC1_ALPHA"; break; + } + return ret; +} + +std::string ToString(const D3D11_BLEND_OP value) +{ + const char* ret = "Unhandled D3D11_BLEND_OP"; + switch (value) { + case D3D11_BLEND_OP_ADD: ret = "D3D11_BLEND_OP_ADD"; break; + case D3D11_BLEND_OP_SUBTRACT: ret = "D3D11_BLEND_OP_SUBTRACT"; break; + case D3D11_BLEND_OP_REV_SUBTRACT: ret = "D3D11_BLEND_OP_REV_SUBTRACT"; break; + case D3D11_BLEND_OP_MIN: ret = "D3D11_BLEND_OP_MIN"; break; + case D3D11_BLEND_OP_MAX: ret = "D3D11_BLEND_OP_MAX"; break; + } + return ret; +} + +std::string ToString(const D3D11_COLOR_WRITE_ENABLE value) +{ + const char* ret = "Unhandled D3D11_COLOR_WRITE_ENABLE"; + switch (value) { + case D3D11_COLOR_WRITE_ENABLE_RED: ret = "D3D11_COLOR_WRITE_ENABLE_RED"; break; + case D3D11_COLOR_WRITE_ENABLE_GREEN: ret = "D3D11_COLOR_WRITE_ENABLE_GREEN"; break; + case D3D11_COLOR_WRITE_ENABLE_BLUE: ret = "D3D11_COLOR_WRITE_ENABLE_BLUE"; break; + case D3D11_COLOR_WRITE_ENABLE_ALPHA: ret = "D3D11_COLOR_WRITE_ENABLE_ALPHA"; break; + case D3D11_COLOR_WRITE_ENABLE_ALL: ret = "D3D11_COLOR_WRITE_ENABLE_ALL"; break; + } + return ret; +} + +std::string ToString(const D3D11_TEXTURECUBE_FACE value) +{ + const char* ret = "Unhandled D3D11_TEXTURECUBE_FACE"; + switch (value) { + case D3D11_TEXTURECUBE_FACE_POSITIVE_X: ret = "D3D11_TEXTURECUBE_FACE_POSITIVE_X"; break; + case D3D11_TEXTURECUBE_FACE_NEGATIVE_X: ret = "D3D11_TEXTURECUBE_FACE_NEGATIVE_X"; break; + case D3D11_TEXTURECUBE_FACE_POSITIVE_Y: ret = "D3D11_TEXTURECUBE_FACE_POSITIVE_Y"; break; + case D3D11_TEXTURECUBE_FACE_NEGATIVE_Y: ret = "D3D11_TEXTURECUBE_FACE_NEGATIVE_Y"; break; + case D3D11_TEXTURECUBE_FACE_POSITIVE_Z: ret = "D3D11_TEXTURECUBE_FACE_POSITIVE_Z"; break; + case D3D11_TEXTURECUBE_FACE_NEGATIVE_Z: ret = "D3D11_TEXTURECUBE_FACE_NEGATIVE_Z"; break; + } + return ret; +} + +std::string ToString(const D3D11_BUFFEREX_SRV_FLAG value) +{ + const char* ret = "Unhandled D3D11_BUFFEREX_SRV_FLAG"; + switch (value) { + case D3D11_BUFFEREX_SRV_FLAG_RAW: ret = "D3D11_BUFFEREX_SRV_FLAG_RAW"; break; + } + return ret; +} + +std::string ToString(const D3D11_DSV_FLAG value) +{ + const char* ret = "Unhandled D3D11_DSV_FLAG"; + switch (value) { + case D3D11_DSV_READ_ONLY_DEPTH: ret = "D3D11_DSV_READ_ONLY_DEPTH"; break; + case D3D11_DSV_READ_ONLY_STENCIL: ret = "D3D11_DSV_READ_ONLY_STENCIL"; break; + } + return ret; +} + +std::string ToString(const D3D11_BUFFER_UAV_FLAG value) +{ + const char* ret = "Unhandled D3D11_BUFFER_UAV_FLAG"; + switch (value) { + case D3D11_BUFFER_UAV_FLAG_RAW: ret = "D3D11_BUFFER_UAV_FLAG_RAW"; break; + case D3D11_BUFFER_UAV_FLAG_APPEND: ret = "D3D11_BUFFER_UAV_FLAG_APPEND"; break; + case D3D11_BUFFER_UAV_FLAG_COUNTER: ret = "D3D11_BUFFER_UAV_FLAG_COUNTER"; break; + } + return ret; +} + +std::string ToString(const D3D11_FILTER value) +{ + const char* ret = "Unhandled D3D11_FILTER"; + switch (value) { + case D3D11_FILTER_MIN_MAG_MIP_POINT: ret = "D3D11_FILTER_MIN_MAG_MIP_POINT"; break; + case D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR: ret = "D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR"; break; + case D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT: ret = "D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT"; break; + case D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR: ret = "D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR"; break; + case D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT: ret = "D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT"; break; + case D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR: ret = "D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR"; break; + case D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT: ret = "D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT"; break; + case D3D11_FILTER_MIN_MAG_MIP_LINEAR: ret = "D3D11_FILTER_MIN_MAG_MIP_LINEAR"; break; + case D3D11_FILTER_ANISOTROPIC: ret = "D3D11_FILTER_ANISOTROPIC"; break; + case D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT: ret = "D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT"; break; + case D3D11_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR: ret = "D3D11_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR"; break; + case D3D11_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT: ret = "D3D11_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT"; break; + case D3D11_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR: ret = "D3D11_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR"; break; + case D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT: ret = "D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT"; break; + case D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR: ret = "D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR"; break; + case D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT: ret = "D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT"; break; + case D3D11_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR: ret = "D3D11_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR"; break; + case D3D11_FILTER_COMPARISON_ANISOTROPIC: ret = "D3D11_FILTER_COMPARISON_ANISOTROPIC"; break; + case D3D11_FILTER_MINIMUM_MIN_MAG_MIP_POINT: ret = "D3D11_FILTER_MINIMUM_MIN_MAG_MIP_POINT"; break; + case D3D11_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR: ret = "D3D11_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR"; break; + case D3D11_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT: ret = "D3D11_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT"; break; + case D3D11_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR: ret = "D3D11_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR"; break; + case D3D11_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT: ret = "D3D11_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT"; break; + case D3D11_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR: ret = "D3D11_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR"; break; + case D3D11_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT: ret = "D3D11_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT"; break; + case D3D11_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR: ret = "D3D11_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR"; break; + case D3D11_FILTER_MINIMUM_ANISOTROPIC: ret = "D3D11_FILTER_MINIMUM_ANISOTROPIC"; break; + case D3D11_FILTER_MAXIMUM_MIN_MAG_MIP_POINT: ret = "D3D11_FILTER_MAXIMUM_MIN_MAG_MIP_POINT"; break; + case D3D11_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR: ret = "D3D11_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR"; break; + case D3D11_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT: ret = "D3D11_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT"; break; + case D3D11_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR: ret = "D3D11_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR"; break; + case D3D11_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT: ret = "D3D11_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT"; break; + case D3D11_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR: ret = "D3D11_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR"; break; + case D3D11_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT: ret = "D3D11_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT"; break; + case D3D11_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR: ret = "D3D11_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR"; break; + case D3D11_FILTER_MAXIMUM_ANISOTROPIC: ret = "D3D11_FILTER_MAXIMUM_ANISOTROPIC"; break; + } + return ret; +} + +std::string ToString(const D3D11_FILTER_TYPE value) +{ + const char* ret = "Unhandled D3D11_FILTER_TYPE"; + switch (value) { + case D3D11_FILTER_TYPE_POINT: ret = "D3D11_FILTER_TYPE_POINT"; break; + case D3D11_FILTER_TYPE_LINEAR: ret = "D3D11_FILTER_TYPE_LINEAR"; break; + } + return ret; +} + +std::string ToString(const D3D11_FILTER_REDUCTION_TYPE value) +{ + const char* ret = "Unhandled D3D11_FILTER_REDUCTION_TYPE"; + switch (value) { + case D3D11_FILTER_REDUCTION_TYPE_STANDARD: ret = "D3D11_FILTER_REDUCTION_TYPE_STANDARD"; break; + case D3D11_FILTER_REDUCTION_TYPE_COMPARISON: ret = "D3D11_FILTER_REDUCTION_TYPE_COMPARISON"; break; + case D3D11_FILTER_REDUCTION_TYPE_MINIMUM: ret = "D3D11_FILTER_REDUCTION_TYPE_MINIMUM"; break; + case D3D11_FILTER_REDUCTION_TYPE_MAXIMUM: ret = "D3D11_FILTER_REDUCTION_TYPE_MAXIMUM"; break; + } + return ret; +} + +std::string ToString(const D3D11_TEXTURE_ADDRESS_MODE value) +{ + const char* ret = "Unhandled D3D11_TEXTURE_ADDRESS_MODE"; + switch (value) { + case D3D11_TEXTURE_ADDRESS_WRAP: ret = "D3D11_TEXTURE_ADDRESS_WRAP"; break; + case D3D11_TEXTURE_ADDRESS_MIRROR: ret = "D3D11_TEXTURE_ADDRESS_MIRROR"; break; + case D3D11_TEXTURE_ADDRESS_CLAMP: ret = "D3D11_TEXTURE_ADDRESS_CLAMP"; break; + case D3D11_TEXTURE_ADDRESS_BORDER: ret = "D3D11_TEXTURE_ADDRESS_BORDER"; break; + case D3D11_TEXTURE_ADDRESS_MIRROR_ONCE: ret = "D3D11_TEXTURE_ADDRESS_MIRROR_ONCE"; break; + } + return ret; +} + +std::string ToString(const D3D11_FORMAT_SUPPORT value) +{ + const char* ret = "Unhandled D3D11_FORMAT_SUPPORT"; + switch (value) { + case D3D11_FORMAT_SUPPORT_BUFFER: ret = "D3D11_FORMAT_SUPPORT_BUFFER"; break; + case D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER: ret = "D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER"; break; + case D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER: ret = "D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER"; break; + case D3D11_FORMAT_SUPPORT_SO_BUFFER: ret = "D3D11_FORMAT_SUPPORT_SO_BUFFER"; break; + case D3D11_FORMAT_SUPPORT_TEXTURE1D: ret = "D3D11_FORMAT_SUPPORT_TEXTURE1D"; break; + case D3D11_FORMAT_SUPPORT_TEXTURE2D: ret = "D3D11_FORMAT_SUPPORT_TEXTURE2D"; break; + case D3D11_FORMAT_SUPPORT_TEXTURE3D: ret = "D3D11_FORMAT_SUPPORT_TEXTURE3D"; break; + case D3D11_FORMAT_SUPPORT_TEXTURECUBE: ret = "D3D11_FORMAT_SUPPORT_TEXTURECUBE"; break; + case D3D11_FORMAT_SUPPORT_SHADER_LOAD: ret = "D3D11_FORMAT_SUPPORT_SHADER_LOAD"; break; + case D3D11_FORMAT_SUPPORT_SHADER_SAMPLE: ret = "D3D11_FORMAT_SUPPORT_SHADER_SAMPLE"; break; + case D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON: ret = "D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON"; break; + case D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT: ret = "D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT"; break; + case D3D11_FORMAT_SUPPORT_MIP: ret = "D3D11_FORMAT_SUPPORT_MIP"; break; + case D3D11_FORMAT_SUPPORT_MIP_AUTOGEN: ret = "D3D11_FORMAT_SUPPORT_MIP_AUTOGEN"; break; + case D3D11_FORMAT_SUPPORT_RENDER_TARGET: ret = "D3D11_FORMAT_SUPPORT_RENDER_TARGET"; break; + case D3D11_FORMAT_SUPPORT_BLENDABLE: ret = "D3D11_FORMAT_SUPPORT_BLENDABLE"; break; + case D3D11_FORMAT_SUPPORT_DEPTH_STENCIL: ret = "D3D11_FORMAT_SUPPORT_DEPTH_STENCIL"; break; + case D3D11_FORMAT_SUPPORT_CPU_LOCKABLE: ret = "D3D11_FORMAT_SUPPORT_CPU_LOCKABLE"; break; + case D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE: ret = "D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE"; break; + case D3D11_FORMAT_SUPPORT_DISPLAY: ret = "D3D11_FORMAT_SUPPORT_DISPLAY"; break; + case D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT: ret = "D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT"; break; + case D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET: ret = "D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET"; break; + case D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD: ret = "D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD"; break; + case D3D11_FORMAT_SUPPORT_SHADER_GATHER: ret = "D3D11_FORMAT_SUPPORT_SHADER_GATHER"; break; + case D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST: ret = "D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST"; break; + case D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW: ret = "D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW"; break; + case D3D11_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON: ret = "D3D11_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON"; break; + case D3D11_FORMAT_SUPPORT_DECODER_OUTPUT: ret = "D3D11_FORMAT_SUPPORT_DECODER_OUTPUT"; break; + case D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_OUTPUT: ret = "D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_OUTPUT"; break; + case D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_INPUT: ret = "D3D11_FORMAT_SUPPORT_VIDEO_PROCESSOR_INPUT"; break; + case D3D11_FORMAT_SUPPORT_VIDEO_ENCODER: ret = "D3D11_FORMAT_SUPPORT_VIDEO_ENCODER"; break; + } + return ret; +} + +std::string ToString_D3D11_FORMAT_SUPPORT(const uint32_t flags) +{ + return BitmaskToString(flags); +} + +std::string ToString(const D3D11_FORMAT_SUPPORT2 value) +{ + const char* ret = "Unhandled D3D11_FORMAT_SUPPORT2"; + switch (value) { + case D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_ADD: ret = "D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_ADD"; break; + case D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS: ret = "D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS"; break; + case D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE: ret = "D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE"; break; + case D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE: ret = "D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE"; break; + case D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX: ret = "D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX"; break; + case D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX: ret = "D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX"; break; + case D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD: ret = "D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD"; break; + case D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE: ret = "D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE"; break; + case D3D11_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP: ret = "D3D11_FORMAT_SUPPORT2_OUTPUT_MERGER_LOGIC_OP"; break; + case D3D11_FORMAT_SUPPORT2_TILED: ret = "D3D11_FORMAT_SUPPORT2_TILED"; break; + case D3D11_FORMAT_SUPPORT2_SHAREABLE: ret = "D3D11_FORMAT_SUPPORT2_SHAREABLE"; break; + case D3D11_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY: ret = "D3D11_FORMAT_SUPPORT2_MULTIPLANE_OVERLAY"; break; + } + return ret; +} + +std::string ToString_D3D11_FORMAT_SUPPORT2(const uint32_t flags) +{ + return BitmaskToString(flags); +} + +std::string ToString(const D3D11_ASYNC_GETDATA_FLAG value) +{ + const char* ret = "Unhandled D3D11_ASYNC_GETDATA_FLAG"; + switch (value) { + case D3D11_ASYNC_GETDATA_DONOTFLUSH: ret = "D3D11_ASYNC_GETDATA_DONOTFLUSH"; break; + } + return ret; +} + +std::string ToString(const D3D11_QUERY value) +{ + const char* ret = "Unhandled D3D11_QUERY"; + switch (value) { + case D3D11_QUERY_EVENT: ret = "D3D11_QUERY_EVENT"; break; + case D3D11_QUERY_OCCLUSION: ret = "D3D11_QUERY_OCCLUSION"; break; + case D3D11_QUERY_TIMESTAMP: ret = "D3D11_QUERY_TIMESTAMP"; break; + case D3D11_QUERY_TIMESTAMP_DISJOINT: ret = "D3D11_QUERY_TIMESTAMP_DISJOINT"; break; + case D3D11_QUERY_PIPELINE_STATISTICS: ret = "D3D11_QUERY_PIPELINE_STATISTICS"; break; + case D3D11_QUERY_OCCLUSION_PREDICATE: ret = "D3D11_QUERY_OCCLUSION_PREDICATE"; break; + case D3D11_QUERY_SO_STATISTICS: ret = "D3D11_QUERY_SO_STATISTICS"; break; + case D3D11_QUERY_SO_OVERFLOW_PREDICATE: ret = "D3D11_QUERY_SO_OVERFLOW_PREDICATE"; break; + case D3D11_QUERY_SO_STATISTICS_STREAM0: ret = "D3D11_QUERY_SO_STATISTICS_STREAM0"; break; + case D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0: ret = "D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0"; break; + case D3D11_QUERY_SO_STATISTICS_STREAM1: ret = "D3D11_QUERY_SO_STATISTICS_STREAM1"; break; + case D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1: ret = "D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1"; break; + case D3D11_QUERY_SO_STATISTICS_STREAM2: ret = "D3D11_QUERY_SO_STATISTICS_STREAM2"; break; + case D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2: ret = "D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2"; break; + case D3D11_QUERY_SO_STATISTICS_STREAM3: ret = "D3D11_QUERY_SO_STATISTICS_STREAM3"; break; + case D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM3: ret = "D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM3"; break; + } + return ret; +} + +std::string ToString(const D3D11_QUERY_MISC_FLAG value) +{ + const char* ret = "Unhandled D3D11_QUERY_MISC_FLAG"; + switch (value) { + case D3D11_QUERY_MISC_PREDICATEHINT: ret = "D3D11_QUERY_MISC_PREDICATEHINT"; break; + } + return ret; +} + +std::string ToString(const D3D11_COUNTER value) +{ + const char* ret = "Unhandled D3D11_COUNTER"; + switch (value) { + case D3D11_COUNTER_DEVICE_DEPENDENT_0: ret = "D3D11_COUNTER_DEVICE_DEPENDENT_0"; break; + } + return ret; +} + +std::string ToString(const D3D11_COUNTER_TYPE value) +{ + const char* ret = "Unhandled D3D11_COUNTER_TYPE"; + switch (value) { + case D3D11_COUNTER_TYPE_FLOAT32: ret = "D3D11_COUNTER_TYPE_FLOAT32"; break; + case D3D11_COUNTER_TYPE_UINT16: ret = "D3D11_COUNTER_TYPE_UINT16"; break; + case D3D11_COUNTER_TYPE_UINT32: ret = "D3D11_COUNTER_TYPE_UINT32"; break; + case D3D11_COUNTER_TYPE_UINT64: ret = "D3D11_COUNTER_TYPE_UINT64"; break; + } + return ret; +} + +std::string ToString(const D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS value) +{ + const char* ret = "Unhandled D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS"; + switch (value) { + case D3D11_STANDARD_MULTISAMPLE_PATTERN: ret = "D3D11_STANDARD_MULTISAMPLE_PATTERN"; break; + case D3D11_CENTER_MULTISAMPLE_PATTERN: ret = "D3D11_CENTER_MULTISAMPLE_PATTERN"; break; + } + return ret; +} + +std::string ToString(const D3D11_DEVICE_CONTEXT_TYPE value) +{ + const char* ret = "Unhandled D3D11_DEVICE_CONTEXT_TYPE"; + switch (value) { + case D3D11_DEVICE_CONTEXT_IMMEDIATE: ret = "D3D11_DEVICE_CONTEXT_IMMEDIATE"; break; + case D3D11_DEVICE_CONTEXT_DEFERRED: ret = "D3D11_DEVICE_CONTEXT_DEFERRED"; break; + } + return ret; +} + +std::string ToString(const D3D11_FEATURE value) +{ + const char* ret = "Unhandled D3D11_FEATURE"; + switch (value) { + case D3D11_FEATURE_THREADING: ret = "D3D11_FEATURE_THREADING"; break; + case D3D11_FEATURE_DOUBLES: ret = "D3D11_FEATURE_DOUBLES"; break; + case D3D11_FEATURE_FORMAT_SUPPORT: ret = "D3D11_FEATURE_FORMAT_SUPPORT"; break; + case D3D11_FEATURE_FORMAT_SUPPORT2: ret = "D3D11_FEATURE_FORMAT_SUPPORT2"; break; + case D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS: ret = "D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS"; break; + case D3D11_FEATURE_D3D11_OPTIONS: ret = "D3D11_FEATURE_D3D11_OPTIONS"; break; + case D3D11_FEATURE_ARCHITECTURE_INFO: ret = "D3D11_FEATURE_ARCHITECTURE_INFO"; break; + case D3D11_FEATURE_D3D9_OPTIONS: ret = "D3D11_FEATURE_D3D9_OPTIONS"; break; + case D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT: ret = "D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT"; break; + case D3D11_FEATURE_D3D9_SHADOW_SUPPORT: ret = "D3D11_FEATURE_D3D9_SHADOW_SUPPORT"; break; + case D3D11_FEATURE_D3D11_OPTIONS1: ret = "D3D11_FEATURE_D3D11_OPTIONS1"; break; + case D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT: ret = "D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT"; break; + case D3D11_FEATURE_MARKER_SUPPORT: ret = "D3D11_FEATURE_MARKER_SUPPORT"; break; + case D3D11_FEATURE_D3D9_OPTIONS1: ret = "D3D11_FEATURE_D3D9_OPTIONS1"; break; + case D3D11_FEATURE_D3D11_OPTIONS2: ret = "D3D11_FEATURE_D3D11_OPTIONS2"; break; + case D3D11_FEATURE_D3D11_OPTIONS3: ret = "D3D11_FEATURE_D3D11_OPTIONS3"; break; + case D3D11_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT: ret = "D3D11_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT"; break; + case D3D11_FEATURE_D3D11_OPTIONS4: ret = "D3D11_FEATURE_D3D11_OPTIONS4"; break; + case D3D11_FEATURE_SHADER_CACHE: ret = "D3D11_FEATURE_SHADER_CACHE"; break; + case D3D11_FEATURE_D3D11_OPTIONS5: ret = "D3D11_FEATURE_D3D11_OPTIONS5"; break; + } + return ret; +} + +std::string ToString(const D3D11_SHADER_MIN_PRECISION_SUPPORT value) +{ + const char* ret = "Unhandled D3D11_SHADER_MIN_PRECISION_SUPPORT"; + switch (value) { + case D3D11_SHADER_MIN_PRECISION_10_BIT: ret = "D3D11_SHADER_MIN_PRECISION_10_BIT"; break; + case D3D11_SHADER_MIN_PRECISION_16_BIT: ret = "D3D11_SHADER_MIN_PRECISION_16_BIT"; break; + } + return ret; +} + +std::string ToString_D3D11_SHADER_MIN_PRECISION_SUPPORT(const uint32_t flags) +{ + return BitmaskToString(flags); +} + +std::string ToString(const D3D11_TILED_RESOURCES_TIER value) +{ + const char* ret = "Unhandled D3D11_TILED_RESOURCES_TIER"; + switch (value) { + case D3D11_TILED_RESOURCES_NOT_SUPPORTED: ret = "D3D11_TILED_RESOURCES_NOT_SUPPORTED"; break; + case D3D11_TILED_RESOURCES_TIER_1: ret = "D3D11_TILED_RESOURCES_TIER_1"; break; + case D3D11_TILED_RESOURCES_TIER_2: ret = "D3D11_TILED_RESOURCES_TIER_2"; break; + case D3D11_TILED_RESOURCES_TIER_3: ret = "D3D11_TILED_RESOURCES_TIER_3"; break; + } + return ret; +} + +std::string ToString(const D3D11_CONSERVATIVE_RASTERIZATION_TIER value) +{ + const char* ret = "Unhandled D3D11_CONSERVATIVE_RASTERIZATION_TIER"; + switch (value) { + case D3D11_CONSERVATIVE_RASTERIZATION_NOT_SUPPORTED: ret = "D3D11_CONSERVATIVE_RASTERIZATION_NOT_SUPPORTED"; break; + case D3D11_CONSERVATIVE_RASTERIZATION_TIER_1: ret = "D3D11_CONSERVATIVE_RASTERIZATION_TIER_1"; break; + case D3D11_CONSERVATIVE_RASTERIZATION_TIER_2: ret = "D3D11_CONSERVATIVE_RASTERIZATION_TIER_2"; break; + case D3D11_CONSERVATIVE_RASTERIZATION_TIER_3: ret = "D3D11_CONSERVATIVE_RASTERIZATION_TIER_3"; break; + } + return ret; +} + +std::string ToString(const D3D11_SHADER_CACHE_SUPPORT_FLAGS value) +{ + const char* ret = "Unhandled D3D11_SHADER_CACHE_SUPPORT_FLAGS"; + switch (value) { + case D3D11_SHADER_CACHE_SUPPORT_NONE: ret = "D3D11_SHADER_CACHE_SUPPORT_NONE"; break; + case D3D11_SHADER_CACHE_SUPPORT_AUTOMATIC_INPROC_CACHE: ret = "D3D11_SHADER_CACHE_SUPPORT_AUTOMATIC_INPROC_CACHE"; break; + case D3D11_SHADER_CACHE_SUPPORT_AUTOMATIC_DISK_CACHE: ret = "D3D11_SHADER_CACHE_SUPPORT_AUTOMATIC_DISK_CACHE"; break; + } + return ret; +} + +std::string ToString_D3D11_SHADER_CACHE_SUPPORT_FLAGS(const uint32_t flags) +{ + return BitmaskToString(flags); +} + +std::string ToString(const D3D11_SHARED_RESOURCE_TIER value) +{ + const char* ret = "Unhandled D3D11_SHARED_RESOURCE_TIER"; + switch (value) { + case D3D11_SHARED_RESOURCE_TIER_0: ret = "D3D11_SHARED_RESOURCE_TIER_0"; break; + case D3D11_SHARED_RESOURCE_TIER_1: ret = "D3D11_SHARED_RESOURCE_TIER_1"; break; + case D3D11_SHARED_RESOURCE_TIER_2: ret = "D3D11_SHARED_RESOURCE_TIER_2"; break; + case D3D11_SHARED_RESOURCE_TIER_3: ret = "D3D11_SHARED_RESOURCE_TIER_3"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_DECODER_BUFFER_TYPE value) +{ + const char* ret = "Unhandled D3D11_VIDEO_DECODER_BUFFER_TYPE"; + switch (value) { + case D3D11_VIDEO_DECODER_BUFFER_PICTURE_PARAMETERS: ret = "D3D11_VIDEO_DECODER_BUFFER_PICTURE_PARAMETERS"; break; + case D3D11_VIDEO_DECODER_BUFFER_MACROBLOCK_CONTROL: ret = "D3D11_VIDEO_DECODER_BUFFER_MACROBLOCK_CONTROL"; break; + case D3D11_VIDEO_DECODER_BUFFER_RESIDUAL_DIFFERENCE: ret = "D3D11_VIDEO_DECODER_BUFFER_RESIDUAL_DIFFERENCE"; break; + case D3D11_VIDEO_DECODER_BUFFER_DEBLOCKING_CONTROL: ret = "D3D11_VIDEO_DECODER_BUFFER_DEBLOCKING_CONTROL"; break; + case D3D11_VIDEO_DECODER_BUFFER_INVERSE_QUANTIZATION_MATRIX: ret = "D3D11_VIDEO_DECODER_BUFFER_INVERSE_QUANTIZATION_MATRIX"; break; + case D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL: ret = "D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL"; break; + case D3D11_VIDEO_DECODER_BUFFER_BITSTREAM: ret = "D3D11_VIDEO_DECODER_BUFFER_BITSTREAM"; break; + case D3D11_VIDEO_DECODER_BUFFER_MOTION_VECTOR: ret = "D3D11_VIDEO_DECODER_BUFFER_MOTION_VECTOR"; break; + case D3D11_VIDEO_DECODER_BUFFER_FILM_GRAIN: ret = "D3D11_VIDEO_DECODER_BUFFER_FILM_GRAIN"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_INPUT: ret = "D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_INPUT"; break; + case D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT: ret = "D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_DEVICE_CAPS value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_DEVICE_CAPS"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_LINEAR_SPACE: ret = "D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_LINEAR_SPACE"; break; + case D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_xvYCC: ret = "D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_xvYCC"; break; + case D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_RGB_RANGE_CONVERSION: ret = "D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_RGB_RANGE_CONVERSION"; break; + case D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_YCbCr_MATRIX_CONVERSION: ret = "D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_YCbCr_MATRIX_CONVERSION"; break; + case D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_NOMINAL_RANGE: ret = "D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_NOMINAL_RANGE"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_FEATURE_CAPS value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_FEATURE_CAPS"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_FILL: ret = "D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_FILL"; break; + case D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_CONSTRICTION: ret = "D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_CONSTRICTION"; break; + case D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_LUMA_KEY: ret = "D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_LUMA_KEY"; break; + case D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_PALETTE: ret = "D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_PALETTE"; break; + case D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_LEGACY: ret = "D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_LEGACY"; break; + case D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_STEREO: ret = "D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_STEREO"; break; + case D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ROTATION: ret = "D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ROTATION"; break; + case D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_STREAM: ret = "D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_STREAM"; break; + case D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_PIXEL_ASPECT_RATIO: ret = "D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_PIXEL_ASPECT_RATIO"; break; + case D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_MIRROR: ret = "D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_MIRROR"; break; + case D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_SHADER_USAGE: ret = "D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_SHADER_USAGE"; break; + case D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_METADATA_HDR10: ret = "D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_METADATA_HDR10"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_FILTER_CAPS value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_FILTER_CAPS"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_FILTER_CAPS_BRIGHTNESS: ret = "D3D11_VIDEO_PROCESSOR_FILTER_CAPS_BRIGHTNESS"; break; + case D3D11_VIDEO_PROCESSOR_FILTER_CAPS_CONTRAST: ret = "D3D11_VIDEO_PROCESSOR_FILTER_CAPS_CONTRAST"; break; + case D3D11_VIDEO_PROCESSOR_FILTER_CAPS_HUE: ret = "D3D11_VIDEO_PROCESSOR_FILTER_CAPS_HUE"; break; + case D3D11_VIDEO_PROCESSOR_FILTER_CAPS_SATURATION: ret = "D3D11_VIDEO_PROCESSOR_FILTER_CAPS_SATURATION"; break; + case D3D11_VIDEO_PROCESSOR_FILTER_CAPS_NOISE_REDUCTION: ret = "D3D11_VIDEO_PROCESSOR_FILTER_CAPS_NOISE_REDUCTION"; break; + case D3D11_VIDEO_PROCESSOR_FILTER_CAPS_EDGE_ENHANCEMENT: ret = "D3D11_VIDEO_PROCESSOR_FILTER_CAPS_EDGE_ENHANCEMENT"; break; + case D3D11_VIDEO_PROCESSOR_FILTER_CAPS_ANAMORPHIC_SCALING: ret = "D3D11_VIDEO_PROCESSOR_FILTER_CAPS_ANAMORPHIC_SCALING"; break; + case D3D11_VIDEO_PROCESSOR_FILTER_CAPS_STEREO_ADJUSTMENT: ret = "D3D11_VIDEO_PROCESSOR_FILTER_CAPS_STEREO_ADJUSTMENT"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_FORMAT_CAPS value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_FORMAT_CAPS"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_INTERLACED: ret = "D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_INTERLACED"; break; + case D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_PROCAMP: ret = "D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_PROCAMP"; break; + case D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_LUMA_KEY: ret = "D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_LUMA_KEY"; break; + case D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_PALETTE_INTERLACED: ret = "D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_PALETTE_INTERLACED"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_DENOISE: ret = "D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_DENOISE"; break; + case D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_DERINGING: ret = "D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_DERINGING"; break; + case D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_EDGE_ENHANCEMENT: ret = "D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_EDGE_ENHANCEMENT"; break; + case D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_COLOR_CORRECTION: ret = "D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_COLOR_CORRECTION"; break; + case D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_FLESH_TONE_MAPPING: ret = "D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_FLESH_TONE_MAPPING"; break; + case D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_IMAGE_STABILIZATION: ret = "D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_IMAGE_STABILIZATION"; break; + case D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_SUPER_RESOLUTION: ret = "D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_SUPER_RESOLUTION"; break; + case D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_ANAMORPHIC_SCALING: ret = "D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS_ANAMORPHIC_SCALING"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_STEREO_CAPS value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_STEREO_CAPS"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_STEREO_CAPS_MONO_OFFSET: ret = "D3D11_VIDEO_PROCESSOR_STEREO_CAPS_MONO_OFFSET"; break; + case D3D11_VIDEO_PROCESSOR_STEREO_CAPS_ROW_INTERLEAVED: ret = "D3D11_VIDEO_PROCESSOR_STEREO_CAPS_ROW_INTERLEAVED"; break; + case D3D11_VIDEO_PROCESSOR_STEREO_CAPS_COLUMN_INTERLEAVED: ret = "D3D11_VIDEO_PROCESSOR_STEREO_CAPS_COLUMN_INTERLEAVED"; break; + case D3D11_VIDEO_PROCESSOR_STEREO_CAPS_CHECKERBOARD: ret = "D3D11_VIDEO_PROCESSOR_STEREO_CAPS_CHECKERBOARD"; break; + case D3D11_VIDEO_PROCESSOR_STEREO_CAPS_FLIP_MODE: ret = "D3D11_VIDEO_PROCESSOR_STEREO_CAPS_FLIP_MODE"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BLEND: ret = "D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BLEND"; break; + case D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB: ret = "D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB"; break; + case D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_ADAPTIVE: ret = "D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_ADAPTIVE"; break; + case D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_MOTION_COMPENSATION: ret = "D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_MOTION_COMPENSATION"; break; + case D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_INVERSE_TELECINE: ret = "D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_INVERSE_TELECINE"; break; + case D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_FRAME_RATE_CONVERSION: ret = "D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_FRAME_RATE_CONVERSION"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_32: ret = "D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_32"; break; + case D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_22: ret = "D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_22"; break; + case D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_2224: ret = "D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_2224"; break; + case D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_2332: ret = "D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_2332"; break; + case D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_32322: ret = "D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_32322"; break; + case D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_55: ret = "D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_55"; break; + case D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_64: ret = "D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_64"; break; + case D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_87: ret = "D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_87"; break; + case D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_222222222223: ret = "D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_222222222223"; break; + case D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_OTHER: ret = "D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS_OTHER"; break; + } + return ret; +} + +std::string ToString(const D3D11_CONTENT_PROTECTION_CAPS value) +{ + const char* ret = "Unhandled D3D11_CONTENT_PROTECTION_CAPS"; + switch (value) { + case D3D11_CONTENT_PROTECTION_CAPS_SOFTWARE: ret = "D3D11_CONTENT_PROTECTION_CAPS_SOFTWARE"; break; + case D3D11_CONTENT_PROTECTION_CAPS_HARDWARE: ret = "D3D11_CONTENT_PROTECTION_CAPS_HARDWARE"; break; + case D3D11_CONTENT_PROTECTION_CAPS_PROTECTION_ALWAYS_ON: ret = "D3D11_CONTENT_PROTECTION_CAPS_PROTECTION_ALWAYS_ON"; break; + case D3D11_CONTENT_PROTECTION_CAPS_PARTIAL_DECRYPTION: ret = "D3D11_CONTENT_PROTECTION_CAPS_PARTIAL_DECRYPTION"; break; + case D3D11_CONTENT_PROTECTION_CAPS_CONTENT_KEY: ret = "D3D11_CONTENT_PROTECTION_CAPS_CONTENT_KEY"; break; + case D3D11_CONTENT_PROTECTION_CAPS_FRESHEN_SESSION_KEY: ret = "D3D11_CONTENT_PROTECTION_CAPS_FRESHEN_SESSION_KEY"; break; + case D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK: ret = "D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK"; break; + case D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK_KEY: ret = "D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK_KEY"; break; + case D3D11_CONTENT_PROTECTION_CAPS_SEQUENTIAL_CTR_IV: ret = "D3D11_CONTENT_PROTECTION_CAPS_SEQUENTIAL_CTR_IV"; break; + case D3D11_CONTENT_PROTECTION_CAPS_ENCRYPT_SLICEDATA_ONLY: ret = "D3D11_CONTENT_PROTECTION_CAPS_ENCRYPT_SLICEDATA_ONLY"; break; + case D3D11_CONTENT_PROTECTION_CAPS_DECRYPTION_BLT: ret = "D3D11_CONTENT_PROTECTION_CAPS_DECRYPTION_BLT"; break; + case D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_PROTECT_UNCOMPRESSED: ret = "D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_PROTECT_UNCOMPRESSED"; break; + case D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_PROTECTED_MEMORY_PAGEABLE: ret = "D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_PROTECTED_MEMORY_PAGEABLE"; break; + case D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_TEARDOWN: ret = "D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_TEARDOWN"; break; + case D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_DRM_COMMUNICATION: ret = "D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_DRM_COMMUNICATION"; break; + case D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_DRM_COMMUNICATION_MULTI_THREADED: ret = "D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_DRM_COMMUNICATION_MULTI_THREADED"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_FILTER value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_FILTER"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_FILTER_BRIGHTNESS: ret = "D3D11_VIDEO_PROCESSOR_FILTER_BRIGHTNESS"; break; + case D3D11_VIDEO_PROCESSOR_FILTER_CONTRAST: ret = "D3D11_VIDEO_PROCESSOR_FILTER_CONTRAST"; break; + case D3D11_VIDEO_PROCESSOR_FILTER_HUE: ret = "D3D11_VIDEO_PROCESSOR_FILTER_HUE"; break; + case D3D11_VIDEO_PROCESSOR_FILTER_SATURATION: ret = "D3D11_VIDEO_PROCESSOR_FILTER_SATURATION"; break; + case D3D11_VIDEO_PROCESSOR_FILTER_NOISE_REDUCTION: ret = "D3D11_VIDEO_PROCESSOR_FILTER_NOISE_REDUCTION"; break; + case D3D11_VIDEO_PROCESSOR_FILTER_EDGE_ENHANCEMENT: ret = "D3D11_VIDEO_PROCESSOR_FILTER_EDGE_ENHANCEMENT"; break; + case D3D11_VIDEO_PROCESSOR_FILTER_ANAMORPHIC_SCALING: ret = "D3D11_VIDEO_PROCESSOR_FILTER_ANAMORPHIC_SCALING"; break; + case D3D11_VIDEO_PROCESSOR_FILTER_STEREO_ADJUSTMENT: ret = "D3D11_VIDEO_PROCESSOR_FILTER_STEREO_ADJUSTMENT"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_FRAME_FORMAT value) +{ + const char* ret = "Unhandled D3D11_VIDEO_FRAME_FORMAT"; + switch (value) { + case D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE: ret = "D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE"; break; + case D3D11_VIDEO_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST: ret = "D3D11_VIDEO_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST"; break; + case D3D11_VIDEO_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST: ret = "D3D11_VIDEO_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_USAGE value) +{ + const char* ret = "Unhandled D3D11_VIDEO_USAGE"; + switch (value) { + case D3D11_VIDEO_USAGE_PLAYBACK_NORMAL: ret = "D3D11_VIDEO_USAGE_PLAYBACK_NORMAL"; break; + case D3D11_VIDEO_USAGE_OPTIMAL_SPEED: ret = "D3D11_VIDEO_USAGE_OPTIMAL_SPEED"; break; + case D3D11_VIDEO_USAGE_OPTIMAL_QUALITY: ret = "D3D11_VIDEO_USAGE_OPTIMAL_QUALITY"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_UNDEFINED: ret = "D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_UNDEFINED"; break; + case D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_16_235: ret = "D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_16_235"; break; + case D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_0_255: ret = "D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_0_255"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_OPAQUE: ret = "D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_OPAQUE"; break; + case D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_BACKGROUND: ret = "D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_BACKGROUND"; break; + case D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_DESTINATION: ret = "D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_DESTINATION"; break; + case D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_SOURCE_STREAM: ret = "D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_SOURCE_STREAM"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_OUTPUT_RATE value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_OUTPUT_RATE"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_NORMAL: ret = "D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_NORMAL"; break; + case D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_HALF: ret = "D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_HALF"; break; + case D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_CUSTOM: ret = "D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_CUSTOM"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_STEREO_FORMAT value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_STEREO_FORMAT"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO: ret = "D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO"; break; + case D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_HORIZONTAL: ret = "D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_HORIZONTAL"; break; + case D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_VERTICAL: ret = "D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_VERTICAL"; break; + case D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_SEPARATE: ret = "D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_SEPARATE"; break; + case D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET: ret = "D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET"; break; + case D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_ROW_INTERLEAVED: ret = "D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_ROW_INTERLEAVED"; break; + case D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_COLUMN_INTERLEAVED: ret = "D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_COLUMN_INTERLEAVED"; break; + case D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_CHECKERBOARD: ret = "D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_CHECKERBOARD"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_STEREO_FLIP_NONE: ret = "D3D11_VIDEO_PROCESSOR_STEREO_FLIP_NONE"; break; + case D3D11_VIDEO_PROCESSOR_STEREO_FLIP_FRAME0: ret = "D3D11_VIDEO_PROCESSOR_STEREO_FLIP_FRAME0"; break; + case D3D11_VIDEO_PROCESSOR_STEREO_FLIP_FRAME1: ret = "D3D11_VIDEO_PROCESSOR_STEREO_FLIP_FRAME1"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_ROTATION value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_ROTATION"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_ROTATION_IDENTITY: ret = "D3D11_VIDEO_PROCESSOR_ROTATION_IDENTITY"; break; + case D3D11_VIDEO_PROCESSOR_ROTATION_90: ret = "D3D11_VIDEO_PROCESSOR_ROTATION_90"; break; + case D3D11_VIDEO_PROCESSOR_ROTATION_180: ret = "D3D11_VIDEO_PROCESSOR_ROTATION_180"; break; + case D3D11_VIDEO_PROCESSOR_ROTATION_270: ret = "D3D11_VIDEO_PROCESSOR_ROTATION_270"; break; + } + return ret; +} + +std::string ToString(const D3D11_AUTHENTICATED_CHANNEL_TYPE value) +{ + const char* ret = "Unhandled D3D11_AUTHENTICATED_CHANNEL_TYPE"; + switch (value) { + case D3D11_AUTHENTICATED_CHANNEL_D3D11: ret = "D3D11_AUTHENTICATED_CHANNEL_D3D11"; break; + case D3D11_AUTHENTICATED_CHANNEL_DRIVER_SOFTWARE: ret = "D3D11_AUTHENTICATED_CHANNEL_DRIVER_SOFTWARE"; break; + case D3D11_AUTHENTICATED_CHANNEL_DRIVER_HARDWARE: ret = "D3D11_AUTHENTICATED_CHANNEL_DRIVER_HARDWARE"; break; + } + return ret; +} + +std::string ToString(const D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE value) +{ + const char* ret = "Unhandled D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE"; + switch (value) { + case D3D11_PROCESSIDTYPE_UNKNOWN: ret = "D3D11_PROCESSIDTYPE_UNKNOWN"; break; + case D3D11_PROCESSIDTYPE_DWM: ret = "D3D11_PROCESSIDTYPE_DWM"; break; + case D3D11_PROCESSIDTYPE_HANDLE: ret = "D3D11_PROCESSIDTYPE_HANDLE"; break; + } + return ret; +} + +std::string ToString(const D3D11_BUS_TYPE value) +{ + const char* ret = "Unhandled D3D11_BUS_TYPE"; + switch (value) { + case D3D11_BUS_TYPE_OTHER: ret = "D3D11_BUS_TYPE_OTHER"; break; + case D3D11_BUS_TYPE_PCI: ret = "D3D11_BUS_TYPE_PCI"; break; + case D3D11_BUS_TYPE_PCIX: ret = "D3D11_BUS_TYPE_PCIX"; break; + case D3D11_BUS_TYPE_PCIEXPRESS: ret = "D3D11_BUS_TYPE_PCIEXPRESS"; break; + case D3D11_BUS_TYPE_AGP: ret = "D3D11_BUS_TYPE_AGP"; break; + case D3D11_BUS_IMPL_MODIFIER_INSIDE_OF_CHIPSET: ret = "D3D11_BUS_IMPL_MODIFIER_INSIDE_OF_CHIPSET"; break; + case D3D11_BUS_IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_CHIP: ret = "D3D11_BUS_IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_CHIP"; break; + case D3D11_BUS_IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_SOCKET: ret = "D3D11_BUS_IMPL_MODIFIER_TRACKS_ON_MOTHER_BOARD_TO_SOCKET"; break; + case D3D11_BUS_IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR: ret = "D3D11_BUS_IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR"; break; + case D3D11_BUS_IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR_INSIDE_OF_NUAE: ret = "D3D11_BUS_IMPL_MODIFIER_DAUGHTER_BOARD_CONNECTOR_INSIDE_OF_NUAE"; break; + case D3D11_BUS_IMPL_MODIFIER_NON_STANDARD: ret = "D3D11_BUS_IMPL_MODIFIER_NON_STANDARD"; break; + } + return ret; +} + +std::string ToString(const D3D11_VDOV_DIMENSION value) +{ + const char* ret = "Unhandled D3D11_VDOV_DIMENSION"; + switch (value) { + case D3D11_VDOV_DIMENSION_UNKNOWN: ret = "D3D11_VDOV_DIMENSION_UNKNOWN"; break; + case D3D11_VDOV_DIMENSION_TEXTURE2D: ret = "D3D11_VDOV_DIMENSION_TEXTURE2D"; break; + } + return ret; +} + +std::string ToString(const D3D11_VPIV_DIMENSION value) +{ + const char* ret = "Unhandled D3D11_VPIV_DIMENSION"; + switch (value) { + case D3D11_VPIV_DIMENSION_UNKNOWN: ret = "D3D11_VPIV_DIMENSION_UNKNOWN"; break; + case D3D11_VPIV_DIMENSION_TEXTURE2D: ret = "D3D11_VPIV_DIMENSION_TEXTURE2D"; break; + } + return ret; +} + +std::string ToString(const D3D11_VPOV_DIMENSION value) +{ + const char* ret = "Unhandled D3D11_VPOV_DIMENSION"; + switch (value) { + case D3D11_VPOV_DIMENSION_UNKNOWN: ret = "D3D11_VPOV_DIMENSION_UNKNOWN"; break; + case D3D11_VPOV_DIMENSION_TEXTURE2D: ret = "D3D11_VPOV_DIMENSION_TEXTURE2D"; break; + case D3D11_VPOV_DIMENSION_TEXTURE2DARRAY: ret = "D3D11_VPOV_DIMENSION_TEXTURE2DARRAY"; break; + } + return ret; +} + +std::string ToString(const D3D11_CREATE_DEVICE_FLAG value) +{ + const char* ret = "Unhandled D3D11_CREATE_DEVICE_FLAG"; + switch (value) { + case D3D11_CREATE_DEVICE_SINGLETHREADED: ret = "D3D11_CREATE_DEVICE_SINGLETHREADED"; break; + case D3D11_CREATE_DEVICE_DEBUG: ret = "D3D11_CREATE_DEVICE_DEBUG"; break; + case D3D11_CREATE_DEVICE_SWITCH_TO_REF: ret = "D3D11_CREATE_DEVICE_SWITCH_TO_REF"; break; + case D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS: ret = "D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS"; break; + case D3D11_CREATE_DEVICE_BGRA_SUPPORT: ret = "D3D11_CREATE_DEVICE_BGRA_SUPPORT"; break; + case D3D11_CREATE_DEVICE_DEBUGGABLE: ret = "D3D11_CREATE_DEVICE_DEBUGGABLE"; break; + case D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY: ret = "D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY"; break; + case D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT: ret = "D3D11_CREATE_DEVICE_DISABLE_GPU_TIMEOUT"; break; + case D3D11_CREATE_DEVICE_VIDEO_SUPPORT: ret = "D3D11_CREATE_DEVICE_VIDEO_SUPPORT"; break; + } + return ret; +} + +std::string ToString(const D3D11_COPY_FLAGS value) +{ + const char* ret = "Unhandled D3D11_COPY_FLAGS"; + switch (value) { + case D3D11_COPY_NO_OVERWRITE: ret = "D3D11_COPY_NO_OVERWRITE"; break; + case D3D11_COPY_DISCARD: ret = "D3D11_COPY_DISCARD"; break; + } + return ret; +} + +std::string ToString_D3D11_COPY_FLAGS(const uint32_t flags) +{ + return BitmaskToString(flags); +} + +std::string ToString(const D3D11_LOGIC_OP value) +{ + const char* ret = "Unhandled D3D11_LOGIC_OP"; + switch (value) { + case D3D11_LOGIC_OP_CLEAR: ret = "D3D11_LOGIC_OP_CLEAR"; break; + case D3D11_LOGIC_OP_SET: ret = "D3D11_LOGIC_OP_SET"; break; + case D3D11_LOGIC_OP_COPY: ret = "D3D11_LOGIC_OP_COPY"; break; + case D3D11_LOGIC_OP_COPY_INVERTED: ret = "D3D11_LOGIC_OP_COPY_INVERTED"; break; + case D3D11_LOGIC_OP_NOOP: ret = "D3D11_LOGIC_OP_NOOP"; break; + case D3D11_LOGIC_OP_INVERT: ret = "D3D11_LOGIC_OP_INVERT"; break; + case D3D11_LOGIC_OP_AND: ret = "D3D11_LOGIC_OP_AND"; break; + case D3D11_LOGIC_OP_NAND: ret = "D3D11_LOGIC_OP_NAND"; break; + case D3D11_LOGIC_OP_OR: ret = "D3D11_LOGIC_OP_OR"; break; + case D3D11_LOGIC_OP_NOR: ret = "D3D11_LOGIC_OP_NOR"; break; + case D3D11_LOGIC_OP_XOR: ret = "D3D11_LOGIC_OP_XOR"; break; + case D3D11_LOGIC_OP_EQUIV: ret = "D3D11_LOGIC_OP_EQUIV"; break; + case D3D11_LOGIC_OP_AND_REVERSE: ret = "D3D11_LOGIC_OP_AND_REVERSE"; break; + case D3D11_LOGIC_OP_AND_INVERTED: ret = "D3D11_LOGIC_OP_AND_INVERTED"; break; + case D3D11_LOGIC_OP_OR_REVERSE: ret = "D3D11_LOGIC_OP_OR_REVERSE"; break; + case D3D11_LOGIC_OP_OR_INVERTED: ret = "D3D11_LOGIC_OP_OR_INVERTED"; break; + } + return ret; +} + +std::string ToString(const D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG value) +{ + const char* ret = "Unhandled D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG"; + switch (value) { + case D3D11_1_CREATE_DEVICE_CONTEXT_STATE_SINGLETHREADED: ret = "D3D11_1_CREATE_DEVICE_CONTEXT_STATE_SINGLETHREADED"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_DECODER_CAPS value) +{ + const char* ret = "Unhandled D3D11_VIDEO_DECODER_CAPS"; + switch (value) { + case D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE: ret = "D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE"; break; + case D3D11_VIDEO_DECODER_CAPS_NON_REAL_TIME: ret = "D3D11_VIDEO_DECODER_CAPS_NON_REAL_TIME"; break; + case D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE_DYNAMIC: ret = "D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE_DYNAMIC"; break; + case D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE_REQUIRED: ret = "D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE_REQUIRED"; break; + case D3D11_VIDEO_DECODER_CAPS_UNSUPPORTED: ret = "D3D11_VIDEO_DECODER_CAPS_UNSUPPORTED"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINTS value) +{ + const char* ret = "Unhandled D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINTS"; + switch (value) { + case D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_ROTATION: ret = "D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_ROTATION"; break; + case D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_RESIZE: ret = "D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_RESIZE"; break; + case D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_COLOR_SPACE_CONVERSION: ret = "D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_MULTIPLANE_OVERLAY_COLOR_SPACE_CONVERSION"; break; + case D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_TRIPLE_BUFFER_OUTPUT: ret = "D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINT_TRIPLE_BUFFER_OUTPUT"; break; + } + return ret; +} + +std::string ToString(const D3D11_CRYPTO_SESSION_STATUS value) +{ + const char* ret = "Unhandled D3D11_CRYPTO_SESSION_STATUS"; + switch (value) { + case D3D11_CRYPTO_SESSION_STATUS_OK: ret = "D3D11_CRYPTO_SESSION_STATUS_OK"; break; + case D3D11_CRYPTO_SESSION_STATUS_KEY_LOST: ret = "D3D11_CRYPTO_SESSION_STATUS_KEY_LOST"; break; + case D3D11_CRYPTO_SESSION_STATUS_KEY_AND_CONTENT_LOST: ret = "D3D11_CRYPTO_SESSION_STATUS_KEY_AND_CONTENT_LOST"; break; + } + return ret; +} + +std::string ToString_D3D11_CRYPTO_SESSION_STATUS(const uint32_t flags) +{ + return BitmaskToString(flags); +} + +std::string ToString(const D3D11_TILE_MAPPING_FLAG value) +{ + const char* ret = "Unhandled D3D11_TILE_MAPPING_FLAG"; + switch (value) { + case D3D11_TILE_MAPPING_NO_OVERWRITE: ret = "D3D11_TILE_MAPPING_NO_OVERWRITE"; break; + } + return ret; +} + +std::string ToString(const D3D11_TILE_RANGE_FLAG value) +{ + const char* ret = "Unhandled D3D11_TILE_RANGE_FLAG"; + switch (value) { + case D3D11_TILE_RANGE_NULL: ret = "D3D11_TILE_RANGE_NULL"; break; + case D3D11_TILE_RANGE_SKIP: ret = "D3D11_TILE_RANGE_SKIP"; break; + case D3D11_TILE_RANGE_REUSE_SINGLE_TILE: ret = "D3D11_TILE_RANGE_REUSE_SINGLE_TILE"; break; + } + return ret; +} + +std::string ToString(const D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG value) +{ + const char* ret = "Unhandled D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG"; + switch (value) { + case D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_TILED_RESOURCE: ret = "D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_TILED_RESOURCE"; break; + } + return ret; +} + +std::string ToString(const D3D11_TILE_COPY_FLAG value) +{ + const char* ret = "Unhandled D3D11_TILE_COPY_FLAG"; + switch (value) { + case D3D11_TILE_COPY_NO_OVERWRITE: ret = "D3D11_TILE_COPY_NO_OVERWRITE"; break; + case D3D11_TILE_COPY_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE: ret = "D3D11_TILE_COPY_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE"; break; + case D3D11_TILE_COPY_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER: ret = "D3D11_TILE_COPY_SWIZZLED_TILED_RESOURCE_TO_LINEAR_BUFFER"; break; + } + return ret; +} + +std::string ToString(const D3D11_CONTEXT_TYPE value) +{ + const char* ret = "Unhandled D3D11_CONTEXT_TYPE"; + switch (value) { + case D3D11_CONTEXT_TYPE_ALL: ret = "D3D11_CONTEXT_TYPE_ALL"; break; + case D3D11_CONTEXT_TYPE_3D: ret = "D3D11_CONTEXT_TYPE_3D"; break; + case D3D11_CONTEXT_TYPE_COMPUTE: ret = "D3D11_CONTEXT_TYPE_COMPUTE"; break; + case D3D11_CONTEXT_TYPE_COPY: ret = "D3D11_CONTEXT_TYPE_COPY"; break; + case D3D11_CONTEXT_TYPE_VIDEO: ret = "D3D11_CONTEXT_TYPE_VIDEO"; break; + } + return ret; +} + +std::string ToString(const D3D11_TEXTURE_LAYOUT value) +{ + const char* ret = "Unhandled D3D11_TEXTURE_LAYOUT"; + switch (value) { + case D3D11_TEXTURE_LAYOUT_UNDEFINED: ret = "D3D11_TEXTURE_LAYOUT_UNDEFINED"; break; + case D3D11_TEXTURE_LAYOUT_ROW_MAJOR: ret = "D3D11_TEXTURE_LAYOUT_ROW_MAJOR"; break; + case D3D11_TEXTURE_LAYOUT_64K_STANDARD_SWIZZLE: ret = "D3D11_TEXTURE_LAYOUT_64K_STANDARD_SWIZZLE"; break; + } + return ret; +} + +std::string ToString(const D3D11_CONSERVATIVE_RASTERIZATION_MODE value) +{ + const char* ret = "Unhandled D3D11_CONSERVATIVE_RASTERIZATION_MODE"; + switch (value) { + case D3D11_CONSERVATIVE_RASTERIZATION_MODE_OFF: ret = "D3D11_CONSERVATIVE_RASTERIZATION_MODE_OFF"; break; + case D3D11_CONSERVATIVE_RASTERIZATION_MODE_ON: ret = "D3D11_CONSERVATIVE_RASTERIZATION_MODE_ON"; break; + } + return ret; +} + +std::string ToString(const D3D11_FENCE_FLAG value) +{ + const char* ret = "Unhandled D3D11_FENCE_FLAG"; + switch (value) { + case D3D11_FENCE_FLAG_NONE: ret = "D3D11_FENCE_FLAG_NONE"; break; + case D3D11_FENCE_FLAG_SHARED: ret = "D3D11_FENCE_FLAG_SHARED"; break; + case D3D11_FENCE_FLAG_SHARED_CROSS_ADAPTER: ret = "D3D11_FENCE_FLAG_SHARED_CROSS_ADAPTER"; break; + case D3D11_FENCE_FLAG_NON_MONITORED: ret = "D3D11_FENCE_FLAG_NON_MONITORED"; break; + } + return ret; +} + +std::string ToString(const D3D11_FEATURE_VIDEO value) +{ + const char* ret = "Unhandled D3D11_FEATURE_VIDEO"; + switch (value) { + case D3D11_FEATURE_VIDEO_DECODER_HISTOGRAM: ret = "D3D11_FEATURE_VIDEO_DECODER_HISTOGRAM"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT value) +{ + const char* ret = "Unhandled D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT"; + switch (value) { + case D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_Y: ret = "D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_Y"; break; + case D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_U: ret = "D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_U"; break; + case D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_V: ret = "D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_V"; break; + case D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_A: ret = "D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_A"; break; + } + return ret; +} + +std::string ToString(const D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAGS value) +{ + const char* ret = "Unhandled D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAGS"; + switch (value) { + case D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAG_NONE: ret = "D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAG_NONE"; break; + case D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAG_Y: ret = "D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAG_Y"; break; + case D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAG_U: ret = "D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAG_U"; break; + case D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAG_V: ret = "D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAG_V"; break; + case D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAG_A: ret = "D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAG_A"; break; + } + return ret; +} + +std::string ToString_D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAGS(const uint32_t flags) +{ + return BitmaskToString(flags); +} + +std::string ToString(const D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS value) +{ + const char* ret = "Unhandled D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS"; + switch (value) { + case D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAG_NONE: ret = "D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAG_NONE"; break; + } + return ret; +} + +std::string ToString_D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS(const uint32_t flags) +{ + return BitmaskToString(flags); +} + std::string ToString(const IID& iid) { if (iid == IID_IDXGIObject) return "IID_IDXGIObject"; @@ -4700,6 +5961,140 @@ std::string ToString(const IID& iid) if (iid == IID_ID3D12ManualWriteTrackingResource) return "IID_ID3D12ManualWriteTrackingResource"; if (iid == IID_ID3D12InfoQueue) return "IID_ID3D12InfoQueue"; if (iid == IID_ID3D12InfoQueue1) return "IID_ID3D12InfoQueue1"; + if (iid == D3D11_DECODER_PROFILE_MPEG2_MOCOMP) return "D3D11_DECODER_PROFILE_MPEG2_MOCOMP"; + if (iid == D3D11_DECODER_PROFILE_MPEG2_IDCT) return "D3D11_DECODER_PROFILE_MPEG2_IDCT"; + if (iid == D3D11_DECODER_PROFILE_MPEG2_VLD) return "D3D11_DECODER_PROFILE_MPEG2_VLD"; + if (iid == D3D11_DECODER_PROFILE_MPEG1_VLD) return "D3D11_DECODER_PROFILE_MPEG1_VLD"; + if (iid == D3D11_DECODER_PROFILE_MPEG2and1_VLD) return "D3D11_DECODER_PROFILE_MPEG2and1_VLD"; + if (iid == D3D11_DECODER_PROFILE_H264_MOCOMP_NOFGT) return "D3D11_DECODER_PROFILE_H264_MOCOMP_NOFGT"; + if (iid == D3D11_DECODER_PROFILE_H264_MOCOMP_FGT) return "D3D11_DECODER_PROFILE_H264_MOCOMP_FGT"; + if (iid == D3D11_DECODER_PROFILE_H264_IDCT_NOFGT) return "D3D11_DECODER_PROFILE_H264_IDCT_NOFGT"; + if (iid == D3D11_DECODER_PROFILE_H264_IDCT_FGT) return "D3D11_DECODER_PROFILE_H264_IDCT_FGT"; + if (iid == D3D11_DECODER_PROFILE_H264_VLD_NOFGT) return "D3D11_DECODER_PROFILE_H264_VLD_NOFGT"; + if (iid == D3D11_DECODER_PROFILE_H264_VLD_FGT) return "D3D11_DECODER_PROFILE_H264_VLD_FGT"; + if (iid == D3D11_DECODER_PROFILE_H264_VLD_WITHFMOASO_NOFGT) return "D3D11_DECODER_PROFILE_H264_VLD_WITHFMOASO_NOFGT"; + if (iid == D3D11_DECODER_PROFILE_H264_VLD_STEREO_PROGRESSIVE_NOFGT) return "D3D11_DECODER_PROFILE_H264_VLD_STEREO_PROGRESSIVE_NOFGT"; + if (iid == D3D11_DECODER_PROFILE_H264_VLD_STEREO_NOFGT) return "D3D11_DECODER_PROFILE_H264_VLD_STEREO_NOFGT"; + if (iid == D3D11_DECODER_PROFILE_H264_VLD_MULTIVIEW_NOFGT) return "D3D11_DECODER_PROFILE_H264_VLD_MULTIVIEW_NOFGT"; + if (iid == D3D11_DECODER_PROFILE_WMV8_POSTPROC) return "D3D11_DECODER_PROFILE_WMV8_POSTPROC"; + if (iid == D3D11_DECODER_PROFILE_WMV8_MOCOMP) return "D3D11_DECODER_PROFILE_WMV8_MOCOMP"; + if (iid == D3D11_DECODER_PROFILE_WMV9_POSTPROC) return "D3D11_DECODER_PROFILE_WMV9_POSTPROC"; + if (iid == D3D11_DECODER_PROFILE_WMV9_MOCOMP) return "D3D11_DECODER_PROFILE_WMV9_MOCOMP"; + if (iid == D3D11_DECODER_PROFILE_WMV9_IDCT) return "D3D11_DECODER_PROFILE_WMV9_IDCT"; + if (iid == D3D11_DECODER_PROFILE_VC1_POSTPROC) return "D3D11_DECODER_PROFILE_VC1_POSTPROC"; + if (iid == D3D11_DECODER_PROFILE_VC1_MOCOMP) return "D3D11_DECODER_PROFILE_VC1_MOCOMP"; + if (iid == D3D11_DECODER_PROFILE_VC1_IDCT) return "D3D11_DECODER_PROFILE_VC1_IDCT"; + if (iid == D3D11_DECODER_PROFILE_VC1_VLD) return "D3D11_DECODER_PROFILE_VC1_VLD"; + if (iid == D3D11_DECODER_PROFILE_VC1_D2010) return "D3D11_DECODER_PROFILE_VC1_D2010"; + if (iid == D3D11_DECODER_PROFILE_MPEG4PT2_VLD_SIMPLE) return "D3D11_DECODER_PROFILE_MPEG4PT2_VLD_SIMPLE"; + if (iid == D3D11_DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_NOGMC) return "D3D11_DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_NOGMC"; + if (iid == D3D11_DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_GMC) return "D3D11_DECODER_PROFILE_MPEG4PT2_VLD_ADVSIMPLE_GMC"; + if (iid == D3D11_DECODER_PROFILE_HEVC_VLD_MAIN) return "D3D11_DECODER_PROFILE_HEVC_VLD_MAIN"; + if (iid == D3D11_DECODER_PROFILE_HEVC_VLD_MAIN10) return "D3D11_DECODER_PROFILE_HEVC_VLD_MAIN10"; + if (iid == D3D11_DECODER_PROFILE_VP9_VLD_PROFILE0) return "D3D11_DECODER_PROFILE_VP9_VLD_PROFILE0"; + if (iid == D3D11_DECODER_PROFILE_VP9_VLD_10BIT_PROFILE2) return "D3D11_DECODER_PROFILE_VP9_VLD_10BIT_PROFILE2"; + if (iid == D3D11_DECODER_PROFILE_VP8_VLD) return "D3D11_DECODER_PROFILE_VP8_VLD"; + if (iid == D3D11_DECODER_PROFILE_AV1_VLD_PROFILE0) return "D3D11_DECODER_PROFILE_AV1_VLD_PROFILE0"; + if (iid == D3D11_DECODER_PROFILE_AV1_VLD_PROFILE1) return "D3D11_DECODER_PROFILE_AV1_VLD_PROFILE1"; + if (iid == D3D11_DECODER_PROFILE_AV1_VLD_PROFILE2) return "D3D11_DECODER_PROFILE_AV1_VLD_PROFILE2"; + if (iid == D3D11_DECODER_PROFILE_AV1_VLD_12BIT_PROFILE2) return "D3D11_DECODER_PROFILE_AV1_VLD_12BIT_PROFILE2"; + if (iid == D3D11_DECODER_PROFILE_AV1_VLD_12BIT_PROFILE2_420) return "D3D11_DECODER_PROFILE_AV1_VLD_12BIT_PROFILE2_420"; + if (iid == D3D11_CRYPTO_TYPE_AES128_CTR) return "D3D11_CRYPTO_TYPE_AES128_CTR"; + if (iid == D3D11_DECODER_ENCRYPTION_HW_CENC) return "D3D11_DECODER_ENCRYPTION_HW_CENC"; + if (iid == D3D11_DECODER_BITSTREAM_ENCRYPTION_TYPE_CENC) return "D3D11_DECODER_BITSTREAM_ENCRYPTION_TYPE_CENC"; + if (iid == D3D11_DECODER_BITSTREAM_ENCRYPTION_TYPE_CBCS) return "D3D11_DECODER_BITSTREAM_ENCRYPTION_TYPE_CBCS"; + if (iid == D3D11_KEY_EXCHANGE_HW_PROTECTION) return "D3D11_KEY_EXCHANGE_HW_PROTECTION"; + if (iid == D3D11_AUTHENTICATED_QUERY_PROTECTION) return "D3D11_AUTHENTICATED_QUERY_PROTECTION"; + if (iid == D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE) return "D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE"; + if (iid == D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE) return "D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE"; + if (iid == D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION) return "D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION"; + if (iid == D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT) return "D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT"; + if (iid == D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS) return "D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS"; + if (iid == D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT) return "D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT"; + if (iid == D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT) return "D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT"; + if (iid == D3D11_AUTHENTICATED_QUERY_OUTPUT_ID) return "D3D11_AUTHENTICATED_QUERY_OUTPUT_ID"; + if (iid == D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ATTRIBUTES) return "D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ATTRIBUTES"; + if (iid == D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID_COUNT) return "D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID_COUNT"; + if (iid == D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID) return "D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID"; + if (iid == D3D11_AUTHENTICATED_QUERY_CURRENT_ENCRYPTION_WHEN_ACCESSIBLE) return "D3D11_AUTHENTICATED_QUERY_CURRENT_ENCRYPTION_WHEN_ACCESSIBLE"; + if (iid == D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE) return "D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE"; + if (iid == D3D11_AUTHENTICATED_CONFIGURE_PROTECTION) return "D3D11_AUTHENTICATED_CONFIGURE_PROTECTION"; + if (iid == D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION) return "D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION"; + if (iid == D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE) return "D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE"; + if (iid == D3D11_AUTHENTICATED_CONFIGURE_ENCRYPTION_WHEN_ACCESSIBLE) return "D3D11_AUTHENTICATED_CONFIGURE_ENCRYPTION_WHEN_ACCESSIBLE"; + if (iid == D3D11_KEY_EXCHANGE_RSAES_OAEP) return "D3D11_KEY_EXCHANGE_RSAES_OAEP"; + if (iid == IID_ID3D11DeviceChild) return "IID_ID3D11DeviceChild"; + if (iid == IID_ID3D11DepthStencilState) return "IID_ID3D11DepthStencilState"; + if (iid == IID_ID3D11BlendState) return "IID_ID3D11BlendState"; + if (iid == IID_ID3D11RasterizerState) return "IID_ID3D11RasterizerState"; + if (iid == IID_ID3D11Resource) return "IID_ID3D11Resource"; + if (iid == IID_ID3D11Buffer) return "IID_ID3D11Buffer"; + if (iid == IID_ID3D11Texture1D) return "IID_ID3D11Texture1D"; + if (iid == IID_ID3D11Texture2D) return "IID_ID3D11Texture2D"; + if (iid == IID_ID3D11Texture3D) return "IID_ID3D11Texture3D"; + if (iid == IID_ID3D11View) return "IID_ID3D11View"; + if (iid == IID_ID3D11ShaderResourceView) return "IID_ID3D11ShaderResourceView"; + if (iid == IID_ID3D11RenderTargetView) return "IID_ID3D11RenderTargetView"; + if (iid == IID_ID3D11DepthStencilView) return "IID_ID3D11DepthStencilView"; + if (iid == IID_ID3D11UnorderedAccessView) return "IID_ID3D11UnorderedAccessView"; + if (iid == IID_ID3D11VertexShader) return "IID_ID3D11VertexShader"; + if (iid == IID_ID3D11HullShader) return "IID_ID3D11HullShader"; + if (iid == IID_ID3D11DomainShader) return "IID_ID3D11DomainShader"; + if (iid == IID_ID3D11GeometryShader) return "IID_ID3D11GeometryShader"; + if (iid == IID_ID3D11PixelShader) return "IID_ID3D11PixelShader"; + if (iid == IID_ID3D11ComputeShader) return "IID_ID3D11ComputeShader"; + if (iid == IID_ID3D11InputLayout) return "IID_ID3D11InputLayout"; + if (iid == IID_ID3D11SamplerState) return "IID_ID3D11SamplerState"; + if (iid == IID_ID3D11Asynchronous) return "IID_ID3D11Asynchronous"; + if (iid == IID_ID3D11Query) return "IID_ID3D11Query"; + if (iid == IID_ID3D11Predicate) return "IID_ID3D11Predicate"; + if (iid == IID_ID3D11Counter) return "IID_ID3D11Counter"; + if (iid == IID_ID3D11ClassInstance) return "IID_ID3D11ClassInstance"; + if (iid == IID_ID3D11ClassLinkage) return "IID_ID3D11ClassLinkage"; + if (iid == IID_ID3D11CommandList) return "IID_ID3D11CommandList"; + if (iid == IID_ID3D11DeviceContext) return "IID_ID3D11DeviceContext"; + if (iid == IID_ID3D11VideoDecoder) return "IID_ID3D11VideoDecoder"; + if (iid == IID_ID3D11VideoProcessorEnumerator) return "IID_ID3D11VideoProcessorEnumerator"; + if (iid == IID_ID3D11VideoProcessor) return "IID_ID3D11VideoProcessor"; + if (iid == IID_ID3D11AuthenticatedChannel) return "IID_ID3D11AuthenticatedChannel"; + if (iid == IID_ID3D11CryptoSession) return "IID_ID3D11CryptoSession"; + if (iid == IID_ID3D11VideoDecoderOutputView) return "IID_ID3D11VideoDecoderOutputView"; + if (iid == IID_ID3D11VideoProcessorInputView) return "IID_ID3D11VideoProcessorInputView"; + if (iid == IID_ID3D11VideoProcessorOutputView) return "IID_ID3D11VideoProcessorOutputView"; + if (iid == IID_ID3D11VideoContext) return "IID_ID3D11VideoContext"; + if (iid == IID_ID3D11VideoDevice) return "IID_ID3D11VideoDevice"; + if (iid == IID_ID3D11Device) return "IID_ID3D11Device"; + if (iid == IID_ID3D11BlendState1) return "IID_ID3D11BlendState1"; + if (iid == IID_ID3D11RasterizerState1) return "IID_ID3D11RasterizerState1"; + if (iid == IID_ID3DDeviceContextState) return "IID_ID3DDeviceContextState"; + if (iid == IID_ID3D11DeviceContext1) return "IID_ID3D11DeviceContext1"; + if (iid == IID_ID3D11VideoContext1) return "IID_ID3D11VideoContext1"; + if (iid == IID_ID3D11VideoDevice1) return "IID_ID3D11VideoDevice1"; + if (iid == IID_ID3D11VideoProcessorEnumerator1) return "IID_ID3D11VideoProcessorEnumerator1"; + if (iid == IID_ID3D11Device1) return "IID_ID3D11Device1"; + if (iid == IID_ID3DUserDefinedAnnotation) return "IID_ID3DUserDefinedAnnotation"; + if (iid == IID_ID3D11DeviceContext2) return "IID_ID3D11DeviceContext2"; + if (iid == IID_ID3D11Device2) return "IID_ID3D11Device2"; + if (iid == IID_ID3D11Texture2D1) return "IID_ID3D11Texture2D1"; + if (iid == IID_ID3D11Texture3D1) return "IID_ID3D11Texture3D1"; + if (iid == IID_ID3D11RasterizerState2) return "IID_ID3D11RasterizerState2"; + if (iid == IID_ID3D11ShaderResourceView1) return "IID_ID3D11ShaderResourceView1"; + if (iid == IID_ID3D11RenderTargetView1) return "IID_ID3D11RenderTargetView1"; + if (iid == IID_ID3D11UnorderedAccessView1) return "IID_ID3D11UnorderedAccessView1"; + if (iid == IID_ID3D11Query1) return "IID_ID3D11Query1"; + if (iid == IID_ID3D11DeviceContext3) return "IID_ID3D11DeviceContext3"; + if (iid == IID_ID3D11Fence) return "IID_ID3D11Fence"; + if (iid == IID_ID3D11DeviceContext4) return "IID_ID3D11DeviceContext4"; + if (iid == IID_ID3D11Device3) return "IID_ID3D11Device3"; + if (iid == IID_ID3D11Device4) return "IID_ID3D11Device4"; + if (iid == IID_ID3D11Device5) return "IID_ID3D11Device5"; + if (iid == IID_ID3D11Multithread) return "IID_ID3D11Multithread"; + if (iid == IID_ID3D11VideoContext2) return "IID_ID3D11VideoContext2"; + if (iid == IID_ID3D11VideoDevice2) return "IID_ID3D11VideoDevice2"; + if (iid == IID_ID3D11VideoContext3) return "IID_ID3D11VideoContext3"; + if (iid == IID_ID3D11On12Device) return "IID_ID3D11On12Device"; + if (iid == IID_ID3D11On12Device1) return "IID_ID3D11On12Device1"; + if (iid == IID_ID3D11On12Device2) return "IID_ID3D11On12Device2"; if (iid == IID_IUnknown) return "IID_IUnknown"; return "Invalid IID"; } diff --git a/framework/generated/generated_dx12_enum_to_string.h b/framework/generated/generated_dx12_enum_to_string.h index 883477b76c..5294f17162 100644 --- a/framework/generated/generated_dx12_enum_to_string.h +++ b/framework/generated/generated_dx12_enum_to_string.h @@ -40,6 +40,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -329,6 +335,103 @@ std::string ToString(D3D12_MESSAGE_SEVERITY value); std::string ToString(D3D12_MESSAGE_ID value); std::string ToString(D3D12_MESSAGE_CALLBACK_FLAGS value); std::string ToString_D3D12_MESSAGE_CALLBACK_FLAGS(uint32_t flags); +std::string ToString(D3D11_INPUT_CLASSIFICATION value); +std::string ToString(D3D11_FILL_MODE value); +std::string ToString(D3D11_CULL_MODE value); +std::string ToString(D3D11_RESOURCE_DIMENSION value); +std::string ToString(D3D11_DSV_DIMENSION value); +std::string ToString(D3D11_RTV_DIMENSION value); +std::string ToString(D3D11_UAV_DIMENSION value); +std::string ToString(D3D11_USAGE value); +std::string ToString(D3D11_BIND_FLAG value); +std::string ToString(D3D11_CPU_ACCESS_FLAG value); +std::string ToString(D3D11_RESOURCE_MISC_FLAG value); +std::string ToString(D3D11_MAP value); +std::string ToString(D3D11_MAP_FLAG value); +std::string ToString(D3D11_RAISE_FLAG value); +std::string ToString(D3D11_CLEAR_FLAG value); +std::string ToString(D3D11_COMPARISON_FUNC value); +std::string ToString(D3D11_DEPTH_WRITE_MASK value); +std::string ToString(D3D11_STENCIL_OP value); +std::string ToString(D3D11_BLEND value); +std::string ToString(D3D11_BLEND_OP value); +std::string ToString(D3D11_COLOR_WRITE_ENABLE value); +std::string ToString(D3D11_TEXTURECUBE_FACE value); +std::string ToString(D3D11_BUFFEREX_SRV_FLAG value); +std::string ToString(D3D11_DSV_FLAG value); +std::string ToString(D3D11_BUFFER_UAV_FLAG value); +std::string ToString(D3D11_FILTER value); +std::string ToString(D3D11_FILTER_TYPE value); +std::string ToString(D3D11_FILTER_REDUCTION_TYPE value); +std::string ToString(D3D11_TEXTURE_ADDRESS_MODE value); +std::string ToString(D3D11_FORMAT_SUPPORT value); +std::string ToString_D3D11_FORMAT_SUPPORT(uint32_t flags); +std::string ToString(D3D11_FORMAT_SUPPORT2 value); +std::string ToString_D3D11_FORMAT_SUPPORT2(uint32_t flags); +std::string ToString(D3D11_ASYNC_GETDATA_FLAG value); +std::string ToString(D3D11_QUERY value); +std::string ToString(D3D11_QUERY_MISC_FLAG value); +std::string ToString(D3D11_COUNTER value); +std::string ToString(D3D11_COUNTER_TYPE value); +std::string ToString(D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS value); +std::string ToString(D3D11_DEVICE_CONTEXT_TYPE value); +std::string ToString(D3D11_FEATURE value); +std::string ToString(D3D11_SHADER_MIN_PRECISION_SUPPORT value); +std::string ToString_D3D11_SHADER_MIN_PRECISION_SUPPORT(uint32_t flags); +std::string ToString(D3D11_TILED_RESOURCES_TIER value); +std::string ToString(D3D11_CONSERVATIVE_RASTERIZATION_TIER value); +std::string ToString(D3D11_SHADER_CACHE_SUPPORT_FLAGS value); +std::string ToString_D3D11_SHADER_CACHE_SUPPORT_FLAGS(uint32_t flags); +std::string ToString(D3D11_SHARED_RESOURCE_TIER value); +std::string ToString(D3D11_VIDEO_DECODER_BUFFER_TYPE value); +std::string ToString(D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT value); +std::string ToString(D3D11_VIDEO_PROCESSOR_DEVICE_CAPS value); +std::string ToString(D3D11_VIDEO_PROCESSOR_FEATURE_CAPS value); +std::string ToString(D3D11_VIDEO_PROCESSOR_FILTER_CAPS value); +std::string ToString(D3D11_VIDEO_PROCESSOR_FORMAT_CAPS value); +std::string ToString(D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS value); +std::string ToString(D3D11_VIDEO_PROCESSOR_STEREO_CAPS value); +std::string ToString(D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS value); +std::string ToString(D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS value); +std::string ToString(D3D11_CONTENT_PROTECTION_CAPS value); +std::string ToString(D3D11_VIDEO_PROCESSOR_FILTER value); +std::string ToString(D3D11_VIDEO_FRAME_FORMAT value); +std::string ToString(D3D11_VIDEO_USAGE value); +std::string ToString(D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE value); +std::string ToString(D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE value); +std::string ToString(D3D11_VIDEO_PROCESSOR_OUTPUT_RATE value); +std::string ToString(D3D11_VIDEO_PROCESSOR_STEREO_FORMAT value); +std::string ToString(D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE value); +std::string ToString(D3D11_VIDEO_PROCESSOR_ROTATION value); +std::string ToString(D3D11_AUTHENTICATED_CHANNEL_TYPE value); +std::string ToString(D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE value); +std::string ToString(D3D11_BUS_TYPE value); +std::string ToString(D3D11_VDOV_DIMENSION value); +std::string ToString(D3D11_VPIV_DIMENSION value); +std::string ToString(D3D11_VPOV_DIMENSION value); +std::string ToString(D3D11_CREATE_DEVICE_FLAG value); +std::string ToString(D3D11_COPY_FLAGS value); +std::string ToString_D3D11_COPY_FLAGS(uint32_t flags); +std::string ToString(D3D11_LOGIC_OP value); +std::string ToString(D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG value); +std::string ToString(D3D11_VIDEO_DECODER_CAPS value); +std::string ToString(D3D11_VIDEO_PROCESSOR_BEHAVIOR_HINTS value); +std::string ToString(D3D11_CRYPTO_SESSION_STATUS value); +std::string ToString_D3D11_CRYPTO_SESSION_STATUS(uint32_t flags); +std::string ToString(D3D11_TILE_MAPPING_FLAG value); +std::string ToString(D3D11_TILE_RANGE_FLAG value); +std::string ToString(D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAG value); +std::string ToString(D3D11_TILE_COPY_FLAG value); +std::string ToString(D3D11_CONTEXT_TYPE value); +std::string ToString(D3D11_TEXTURE_LAYOUT value); +std::string ToString(D3D11_CONSERVATIVE_RASTERIZATION_MODE value); +std::string ToString(D3D11_FENCE_FLAG value); +std::string ToString(D3D11_FEATURE_VIDEO value); +std::string ToString(D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT value); +std::string ToString(D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAGS value); +std::string ToString_D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAGS(uint32_t flags); +std::string ToString(D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS value); +std::string ToString_D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS(uint32_t flags); std::string ToString(const IID& riid); inline std::string ToString(const GUID& obj, ToStringFlags toStringFlags, uint32_t tabCount, uint32_t tabSize){ return ToString(obj); } diff --git a/framework/generated/generated_dx12_json_consumer.cpp b/framework/generated/generated_dx12_json_consumer.cpp index 001c2c0abf..ff7762e903 100644 --- a/framework/generated/generated_dx12_json_consumer.cpp +++ b/framework/generated/generated_dx12_json_consumer.cpp @@ -9369,6 +9369,7895 @@ void Dx12JsonConsumer::Process_ID3D12InfoQueue1_UnregisterMessageCallback( writer_->WriteBlockEnd(); } +/* +** This part is generated from d3d11.h in Windows SDK: 10.0.20348.0 +** +*/ +void Dx12JsonConsumer::Process_D3D11CreateDevice( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pAdapter, + D3D_DRIVER_TYPE DriverType, + uint64_t Software, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + HandlePointerDecoder* ppDevice, + PointerDecoder* pFeatureLevel, + HandlePointerDecoder* ppImmediateContext) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& function = writer_->WriteApiCallStart(call_info, "D3D11CreateDevice"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(function[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = function[format::kNameArgs]; + { + FieldToJson(args["pAdapter"], pAdapter, options); + FieldToJson(args["DriverType"], DriverType, options); + FieldToJson(args["Software"], Software, options); + FieldToJson(args["Flags"], Flags, options); + FieldToJson(args["pFeatureLevels"], pFeatureLevels, options); + FieldToJson(args["FeatureLevels"], FeatureLevels, options); + FieldToJson(args["SDKVersion"], SDKVersion, options); + FieldToJson(args["ppDevice"], ppDevice, options); + FieldToJson(args["pFeatureLevel"], pFeatureLevel, options); + FieldToJson(args["ppImmediateContext"], ppImmediateContext, options); + } + writer_->WriteBlockEnd(); + +} + +void Dx12JsonConsumer::Process_D3D11CreateDeviceAndSwapChain( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pAdapter, + D3D_DRIVER_TYPE DriverType, + uint64_t Software, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + StructPointerDecoder* pSwapChainDesc, + HandlePointerDecoder* ppSwapChain, + HandlePointerDecoder* ppDevice, + PointerDecoder* pFeatureLevel, + HandlePointerDecoder* ppImmediateContext) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& function = writer_->WriteApiCallStart(call_info, "D3D11CreateDeviceAndSwapChain"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(function[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = function[format::kNameArgs]; + { + FieldToJson(args["pAdapter"], pAdapter, options); + FieldToJson(args["DriverType"], DriverType, options); + FieldToJson(args["Software"], Software, options); + FieldToJson(args["Flags"], Flags, options); + FieldToJson(args["pFeatureLevels"], pFeatureLevels, options); + FieldToJson(args["FeatureLevels"], FeatureLevels, options); + FieldToJson(args["SDKVersion"], SDKVersion, options); + FieldToJson(args["pSwapChainDesc"], pSwapChainDesc, options); + FieldToJson(args["ppSwapChain"], ppSwapChain, options); + FieldToJson(args["ppDevice"], ppDevice, options); + FieldToJson(args["pFeatureLevel"], pFeatureLevel, options); + FieldToJson(args["ppImmediateContext"], ppImmediateContext, options); + } + writer_->WriteBlockEnd(); + +} + +void Dx12JsonConsumer::Process_ID3D11DeviceChild_GetDevice( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDevice) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceChild", object_id, "GetDevice"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppDevice"], ppDevice, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceChild_GetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + PointerDecoder* pDataSize, + PointerDecoder* pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceChild", object_id, "GetPrivateData"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["guid"], guid, options); + FieldToJson(args["pDataSize"], pDataSize, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceChild_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceChild", object_id, "SetPrivateData"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["guid"], guid, options); + FieldToJson(args["DataSize"], DataSize, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceChild_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceChild", object_id, "SetPrivateDataInterface"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["guid"], guid, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DepthStencilState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DepthStencilState", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11BlendState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11BlendState", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11RasterizerState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11RasterizerState", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Resource_GetType( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pResourceDimension) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Resource", object_id, "GetType"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResourceDimension"], pResourceDimension, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Resource_SetEvictionPriority( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT EvictionPriority) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Resource", object_id, "SetEvictionPriority"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["EvictionPriority"], EvictionPriority, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Resource_GetEvictionPriority( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Resource", object_id, "GetEvictionPriority"); + const JsonOptions& options = writer_->GetOptions(); + FieldToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Buffer_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Buffer", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Texture1D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Texture1D", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Texture2D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Texture2D", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Texture3D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Texture3D", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11View_GetResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResource) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11View", object_id, "GetResource"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppResource"], ppResource, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11ShaderResourceView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11ShaderResourceView", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11RenderTargetView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11RenderTargetView", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DepthStencilView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DepthStencilView", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11UnorderedAccessView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11UnorderedAccessView", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11SamplerState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11SamplerState", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Asynchronous_GetDataSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Asynchronous", object_id, "GetDataSize"); + const JsonOptions& options = writer_->GetOptions(); + FieldToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Query_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Query", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Counter_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Counter", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11ClassInstance_GetClassLinkage( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppLinkage) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11ClassInstance", object_id, "GetClassLinkage"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppLinkage"], ppLinkage, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11ClassInstance_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11ClassInstance", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11ClassInstance_GetInstanceName( + const ApiCallInfo& call_info, + format::HandleId object_id, + StringDecoder* pInstanceName, + PointerDecoder* pBufferLength) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11ClassInstance", object_id, "GetInstanceName"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pInstanceName"], pInstanceName, options); + FieldToJson(args["pBufferLength"], pBufferLength, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11ClassInstance_GetTypeName( + const ApiCallInfo& call_info, + format::HandleId object_id, + StringDecoder* pTypeName, + PointerDecoder* pBufferLength) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11ClassInstance", object_id, "GetTypeName"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pTypeName"], pTypeName, options); + FieldToJson(args["pBufferLength"], pBufferLength, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11ClassLinkage_GetClassInstance( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StringDecoder* pClassInstanceName, + UINT InstanceIndex, + HandlePointerDecoder* ppInstance) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11ClassLinkage", object_id, "GetClassInstance"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pClassInstanceName"], pClassInstanceName, options); + FieldToJson(args["InstanceIndex"], InstanceIndex, options); + FieldToJson(args["ppInstance"], ppInstance, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11ClassLinkage_CreateClassInstance( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StringDecoder* pClassTypeName, + UINT ConstantBufferOffset, + UINT ConstantVectorOffset, + UINT TextureOffset, + UINT SamplerOffset, + HandlePointerDecoder* ppInstance) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11ClassLinkage", object_id, "CreateClassInstance"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pClassTypeName"], pClassTypeName, options); + FieldToJson(args["ConstantBufferOffset"], ConstantBufferOffset, options); + FieldToJson(args["ConstantVectorOffset"], ConstantVectorOffset, options); + FieldToJson(args["TextureOffset"], TextureOffset, options); + FieldToJson(args["SamplerOffset"], SamplerOffset, options); + FieldToJson(args["ppInstance"], ppInstance, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11CommandList_GetContextFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11CommandList", object_id, "GetContextFlags"); + const JsonOptions& options = writer_->GetOptions(); + FieldToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_VSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "VSSetConstantBuffers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_PSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "PSSetShaderResources"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumViews"], NumViews, options); + FieldToJson(args["ppShaderResourceViews"], ppShaderResourceViews, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_PSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pPixelShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "PSSetShader"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pPixelShader"], pPixelShader, options); + FieldToJson(args["ppClassInstances"], ppClassInstances, options); + FieldToJson(args["NumClassInstances"], NumClassInstances, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_PSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "PSSetSamplers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumSamplers"], NumSamplers, options); + FieldToJson(args["ppSamplers"], ppSamplers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_VSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVertexShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "VSSetShader"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVertexShader"], pVertexShader, options); + FieldToJson(args["ppClassInstances"], ppClassInstances, options); + FieldToJson(args["NumClassInstances"], NumClassInstances, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DrawIndexed( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT IndexCount, + UINT StartIndexLocation, + INT BaseVertexLocation) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DrawIndexed"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["IndexCount"], IndexCount, options); + FieldToJson(args["StartIndexLocation"], StartIndexLocation, options); + FieldToJson(args["BaseVertexLocation"], BaseVertexLocation, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_Draw( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT VertexCount, + UINT StartVertexLocation) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "Draw"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["VertexCount"], VertexCount, options); + FieldToJson(args["StartVertexLocation"], StartVertexLocation, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_Map( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + UINT Subresource, + D3D11_MAP MapType, + UINT MapFlags, + StructPointerDecoder* pMappedResource) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "Map"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + FieldToJson(args["Subresource"], Subresource, options); + FieldToJson(args["MapType"], MapType, options); + FieldToJson(args["MapFlags"], MapFlags, options); + FieldToJson(args["pMappedResource"], pMappedResource, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_Unmap( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource, + UINT Subresource) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "Unmap"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + FieldToJson(args["Subresource"], Subresource, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_PSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "PSSetConstantBuffers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_IASetInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pInputLayout) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "IASetInputLayout"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pInputLayout"], pInputLayout, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_IASetVertexBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppVertexBuffers, + PointerDecoder* pStrides, + PointerDecoder* pOffsets) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "IASetVertexBuffers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppVertexBuffers"], ppVertexBuffers, options); + FieldToJson(args["pStrides"], pStrides, options); + FieldToJson(args["pOffsets"], pOffsets, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_IASetIndexBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pIndexBuffer, + DXGI_FORMAT Format, + UINT Offset) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "IASetIndexBuffer"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pIndexBuffer"], pIndexBuffer, options); + FieldToJson(args["Format"], Format, options); + FieldToJson(args["Offset"], Offset, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DrawIndexedInstanced( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT IndexCountPerInstance, + UINT InstanceCount, + UINT StartIndexLocation, + INT BaseVertexLocation, + UINT StartInstanceLocation) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DrawIndexedInstanced"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["IndexCountPerInstance"], IndexCountPerInstance, options); + FieldToJson(args["InstanceCount"], InstanceCount, options); + FieldToJson(args["StartIndexLocation"], StartIndexLocation, options); + FieldToJson(args["BaseVertexLocation"], BaseVertexLocation, options); + FieldToJson(args["StartInstanceLocation"], StartInstanceLocation, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DrawInstanced( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT VertexCountPerInstance, + UINT InstanceCount, + UINT StartVertexLocation, + UINT StartInstanceLocation) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DrawInstanced"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["VertexCountPerInstance"], VertexCountPerInstance, options); + FieldToJson(args["InstanceCount"], InstanceCount, options); + FieldToJson(args["StartVertexLocation"], StartVertexLocation, options); + FieldToJson(args["StartInstanceLocation"], StartInstanceLocation, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_GSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "GSSetConstantBuffers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_GSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "GSSetShader"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pShader"], pShader, options); + FieldToJson(args["ppClassInstances"], ppClassInstances, options); + FieldToJson(args["NumClassInstances"], NumClassInstances, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_IASetPrimitiveTopology( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D_PRIMITIVE_TOPOLOGY Topology) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "IASetPrimitiveTopology"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["Topology"], Topology, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_VSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "VSSetShaderResources"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumViews"], NumViews, options); + FieldToJson(args["ppShaderResourceViews"], ppShaderResourceViews, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_VSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "VSSetSamplers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumSamplers"], NumSamplers, options); + FieldToJson(args["ppSamplers"], ppSamplers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_Begin( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pAsync) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "Begin"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pAsync"], pAsync, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_End( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pAsync) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "End"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pAsync"], pAsync, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_GetData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pAsync, + PointerDecoder* pData, + UINT DataSize, + UINT GetDataFlags) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "GetData"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pAsync"], pAsync, options); + FieldToJson(args["pData"], pData, options); + FieldToJson(args["DataSize"], DataSize, options); + FieldToJson(args["GetDataFlags"], GetDataFlags, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_SetPredication( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pPredicate, + BOOL PredicateValue) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "SetPredication"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pPredicate"], pPredicate, options); + Bool32ToJson(args["PredicateValue"], PredicateValue, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_GSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "GSSetShaderResources"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumViews"], NumViews, options); + FieldToJson(args["ppShaderResourceViews"], ppShaderResourceViews, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_GSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "GSSetSamplers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumSamplers"], NumSamplers, options); + FieldToJson(args["ppSamplers"], ppSamplers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_OMSetRenderTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViews, + HandlePointerDecoder* ppRenderTargetViews, + format::HandleId pDepthStencilView) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "OMSetRenderTargets"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["NumViews"], NumViews, options); + FieldToJson(args["ppRenderTargetViews"], ppRenderTargetViews, options); + FieldToJson(args["pDepthStencilView"], pDepthStencilView, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRTVs, + HandlePointerDecoder* ppRenderTargetViews, + format::HandleId pDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews, + PointerDecoder* pUAVInitialCounts) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "OMSetRenderTargetsAndUnorderedAccessViews"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["NumRTVs"], NumRTVs, options); + FieldToJson(args["ppRenderTargetViews"], ppRenderTargetViews, options); + FieldToJson(args["pDepthStencilView"], pDepthStencilView, options); + FieldToJson(args["UAVStartSlot"], UAVStartSlot, options); + FieldToJson(args["NumUAVs"], NumUAVs, options); + FieldToJson(args["ppUnorderedAccessViews"], ppUnorderedAccessViews, options); + FieldToJson(args["pUAVInitialCounts"], pUAVInitialCounts, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_OMSetBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBlendState, + PointerDecoder BlendFactor [4], + UINT SampleMask) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "OMSetBlendState"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pBlendState"], pBlendState, options); + FieldToJson(args["BlendFactor"], BlendFactor, options); + FieldToJsonAsFixedWidthBinary(args["SampleMask"], SampleMask, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_OMSetDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDepthStencilState, + UINT StencilRef) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "OMSetDepthStencilState"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDepthStencilState"], pDepthStencilState, options); + FieldToJson(args["StencilRef"], StencilRef, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_SOSetTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumBuffers, + HandlePointerDecoder* ppSOTargets, + PointerDecoder* pOffsets) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "SOSetTargets"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppSOTargets"], ppSOTargets, options); + FieldToJson(args["pOffsets"], pOffsets, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DrawAuto( + const ApiCallInfo& call_info, + format::HandleId object_id) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DrawAuto"); + const JsonOptions& options = writer_->GetOptions(); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DrawIndexedInstancedIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DrawIndexedInstancedIndirect"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pBufferForArgs"], pBufferForArgs, options); + FieldToJson(args["AlignedByteOffsetForArgs"], AlignedByteOffsetForArgs, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DrawInstancedIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DrawInstancedIndirect"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pBufferForArgs"], pBufferForArgs, options); + FieldToJson(args["AlignedByteOffsetForArgs"], AlignedByteOffsetForArgs, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_Dispatch( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT ThreadGroupCountX, + UINT ThreadGroupCountY, + UINT ThreadGroupCountZ) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "Dispatch"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ThreadGroupCountX"], ThreadGroupCountX, options); + FieldToJson(args["ThreadGroupCountY"], ThreadGroupCountY, options); + FieldToJson(args["ThreadGroupCountZ"], ThreadGroupCountZ, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DispatchIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DispatchIndirect"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pBufferForArgs"], pBufferForArgs, options); + FieldToJson(args["AlignedByteOffsetForArgs"], AlignedByteOffsetForArgs, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_RSSetState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pRasterizerState) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "RSSetState"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pRasterizerState"], pRasterizerState, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_RSSetViewports( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViewports, + StructPointerDecoder* pViewports) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "RSSetViewports"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["NumViewports"], NumViewports, options); + FieldToJson(args["pViewports"], pViewports, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_RSSetScissorRects( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRects, + StructPointerDecoder* pRects) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "RSSetScissorRects"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["NumRects"], NumRects, options); + FieldToJson(args["pRects"], pRects, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_CopySubresourceRegion( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "CopySubresourceRegion"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDstResource"], pDstResource, options); + FieldToJson(args["DstSubresource"], DstSubresource, options); + FieldToJson(args["DstX"], DstX, options); + FieldToJson(args["DstY"], DstY, options); + FieldToJson(args["DstZ"], DstZ, options); + FieldToJson(args["pSrcResource"], pSrcResource, options); + FieldToJson(args["SrcSubresource"], SrcSubresource, options); + FieldToJson(args["pSrcBox"], pSrcBox, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_CopyResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + format::HandleId pSrcResource) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "CopyResource"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDstResource"], pDstResource, options); + FieldToJson(args["pSrcResource"], pSrcResource, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_CopyStructureCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstBuffer, + UINT DstAlignedByteOffset, + format::HandleId pSrcView) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "CopyStructureCount"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDstBuffer"], pDstBuffer, options); + FieldToJson(args["DstAlignedByteOffset"], DstAlignedByteOffset, options); + FieldToJson(args["pSrcView"], pSrcView, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_ClearRenderTargetView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pRenderTargetView, + PointerDecoder ColorRGBA [4]) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "ClearRenderTargetView"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pRenderTargetView"], pRenderTargetView, options); + FieldToJson(args["ColorRGBA"], ColorRGBA, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_ClearUnorderedAccessViewUint( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pUnorderedAccessView, + PointerDecoder Values [4]) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "ClearUnorderedAccessViewUint"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pUnorderedAccessView"], pUnorderedAccessView, options); + FieldToJson(args["Values"], Values, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_ClearUnorderedAccessViewFloat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pUnorderedAccessView, + PointerDecoder Values [4]) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "ClearUnorderedAccessViewFloat"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pUnorderedAccessView"], pUnorderedAccessView, options); + FieldToJson(args["Values"], Values, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_ClearDepthStencilView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDepthStencilView, + UINT ClearFlags, + FLOAT Depth, + UINT8 Stencil) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "ClearDepthStencilView"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDepthStencilView"], pDepthStencilView, options); + FieldToJson(args["ClearFlags"], ClearFlags, options); + FieldToJson(args["Depth"], Depth, options); + FieldToJson(args["Stencil"], Stencil, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_GenerateMips( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pShaderResourceView) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "GenerateMips"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pShaderResourceView"], pShaderResourceView, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_SetResourceMinLOD( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource, + FLOAT MinLOD) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "SetResourceMinLOD"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + FieldToJson(args["MinLOD"], MinLOD, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_GetResourceMinLOD( + const ApiCallInfo& call_info, + format::HandleId object_id, + FLOAT return_value, + format::HandleId pResource) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "GetResourceMinLOD"); + const JsonOptions& options = writer_->GetOptions(); + FieldToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_ResolveSubresource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + format::HandleId pSrcResource, + UINT SrcSubresource, + DXGI_FORMAT Format) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "ResolveSubresource"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDstResource"], pDstResource, options); + FieldToJson(args["DstSubresource"], DstSubresource, options); + FieldToJson(args["pSrcResource"], pSrcResource, options); + FieldToJson(args["SrcSubresource"], SrcSubresource, options); + FieldToJson(args["Format"], Format, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_ExecuteCommandList( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCommandList, + BOOL RestoreContextState) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "ExecuteCommandList"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCommandList"], pCommandList, options); + Bool32ToJson(args["RestoreContextState"], RestoreContextState, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_HSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "HSSetShaderResources"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumViews"], NumViews, options); + FieldToJson(args["ppShaderResourceViews"], ppShaderResourceViews, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_HSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pHullShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "HSSetShader"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pHullShader"], pHullShader, options); + FieldToJson(args["ppClassInstances"], ppClassInstances, options); + FieldToJson(args["NumClassInstances"], NumClassInstances, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_HSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "HSSetSamplers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumSamplers"], NumSamplers, options); + FieldToJson(args["ppSamplers"], ppSamplers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_HSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "HSSetConstantBuffers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DSSetShaderResources"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumViews"], NumViews, options); + FieldToJson(args["ppShaderResourceViews"], ppShaderResourceViews, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDomainShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DSSetShader"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDomainShader"], pDomainShader, options); + FieldToJson(args["ppClassInstances"], ppClassInstances, options); + FieldToJson(args["NumClassInstances"], NumClassInstances, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DSSetSamplers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumSamplers"], NumSamplers, options); + FieldToJson(args["ppSamplers"], ppSamplers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DSSetConstantBuffers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_CSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "CSSetShaderResources"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumViews"], NumViews, options); + FieldToJson(args["ppShaderResourceViews"], ppShaderResourceViews, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_CSSetUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews, + PointerDecoder* pUAVInitialCounts) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "CSSetUnorderedAccessViews"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumUAVs"], NumUAVs, options); + FieldToJson(args["ppUnorderedAccessViews"], ppUnorderedAccessViews, options); + FieldToJson(args["pUAVInitialCounts"], pUAVInitialCounts, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_CSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pComputeShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "CSSetShader"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pComputeShader"], pComputeShader, options); + FieldToJson(args["ppClassInstances"], ppClassInstances, options); + FieldToJson(args["NumClassInstances"], NumClassInstances, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_CSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "CSSetSamplers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumSamplers"], NumSamplers, options); + FieldToJson(args["ppSamplers"], ppSamplers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_CSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "CSSetConstantBuffers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_VSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "VSGetConstantBuffers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_PSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "PSGetShaderResources"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumViews"], NumViews, options); + FieldToJson(args["ppShaderResourceViews"], ppShaderResourceViews, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_PSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppPixelShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "PSGetShader"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppPixelShader"], ppPixelShader, options); + FieldToJson(args["ppClassInstances"], ppClassInstances, options); + FieldToJson(args["pNumClassInstances"], pNumClassInstances, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_PSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "PSGetSamplers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumSamplers"], NumSamplers, options); + FieldToJson(args["ppSamplers"], ppSamplers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_VSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppVertexShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "VSGetShader"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppVertexShader"], ppVertexShader, options); + FieldToJson(args["ppClassInstances"], ppClassInstances, options); + FieldToJson(args["pNumClassInstances"], pNumClassInstances, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_PSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "PSGetConstantBuffers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_IAGetInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppInputLayout) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "IAGetInputLayout"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppInputLayout"], ppInputLayout, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_IAGetVertexBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppVertexBuffers, + PointerDecoder* pStrides, + PointerDecoder* pOffsets) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "IAGetVertexBuffers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppVertexBuffers"], ppVertexBuffers, options); + FieldToJson(args["pStrides"], pStrides, options); + FieldToJson(args["pOffsets"], pOffsets, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_IAGetIndexBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* pIndexBuffer, + PointerDecoder* Format, + PointerDecoder* Offset) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "IAGetIndexBuffer"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pIndexBuffer"], pIndexBuffer, options); + FieldToJson(args["Format"], Format, options); + FieldToJson(args["Offset"], Offset, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_GSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "GSGetConstantBuffers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_GSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppGeometryShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "GSGetShader"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppGeometryShader"], ppGeometryShader, options); + FieldToJson(args["ppClassInstances"], ppClassInstances, options); + FieldToJson(args["pNumClassInstances"], pNumClassInstances, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_IAGetPrimitiveTopology( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pTopology) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "IAGetPrimitiveTopology"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pTopology"], pTopology, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_VSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "VSGetShaderResources"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumViews"], NumViews, options); + FieldToJson(args["ppShaderResourceViews"], ppShaderResourceViews, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_VSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "VSGetSamplers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumSamplers"], NumSamplers, options); + FieldToJson(args["ppSamplers"], ppSamplers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_GetPredication( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppPredicate, + PointerDecoder* pPredicateValue) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "GetPredication"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppPredicate"], ppPredicate, options); + Bool32ToJson(args["pPredicateValue"], pPredicateValue, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_GSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "GSGetShaderResources"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumViews"], NumViews, options); + FieldToJson(args["ppShaderResourceViews"], ppShaderResourceViews, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_GSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "GSGetSamplers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumSamplers"], NumSamplers, options); + FieldToJson(args["ppSamplers"], ppSamplers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_OMGetRenderTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViews, + HandlePointerDecoder* ppRenderTargetViews, + HandlePointerDecoder* ppDepthStencilView) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "OMGetRenderTargets"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["NumViews"], NumViews, options); + FieldToJson(args["ppRenderTargetViews"], ppRenderTargetViews, options); + FieldToJson(args["ppDepthStencilView"], ppDepthStencilView, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRTVs, + HandlePointerDecoder* ppRenderTargetViews, + HandlePointerDecoder* ppDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "OMGetRenderTargetsAndUnorderedAccessViews"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["NumRTVs"], NumRTVs, options); + FieldToJson(args["ppRenderTargetViews"], ppRenderTargetViews, options); + FieldToJson(args["ppDepthStencilView"], ppDepthStencilView, options); + FieldToJson(args["UAVStartSlot"], UAVStartSlot, options); + FieldToJson(args["NumUAVs"], NumUAVs, options); + FieldToJson(args["ppUnorderedAccessViews"], ppUnorderedAccessViews, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_OMGetBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppBlendState, + PointerDecoder BlendFactor [4], + PointerDecoder* pSampleMask) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "OMGetBlendState"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppBlendState"], ppBlendState, options); + FieldToJson(args["BlendFactor"], BlendFactor, options); + FieldToJsonAsFixedWidthBinary(args["pSampleMask"], pSampleMask, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_OMGetDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDepthStencilState, + PointerDecoder* pStencilRef) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "OMGetDepthStencilState"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppDepthStencilState"], ppDepthStencilState, options); + FieldToJson(args["pStencilRef"], pStencilRef, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_SOGetTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumBuffers, + HandlePointerDecoder* ppSOTargets) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "SOGetTargets"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppSOTargets"], ppSOTargets, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_RSGetState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppRasterizerState) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "RSGetState"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppRasterizerState"], ppRasterizerState, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_RSGetViewports( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pNumViewports, + StructPointerDecoder* pViewports) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "RSGetViewports"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pNumViewports"], pNumViewports, options); + FieldToJson(args["pViewports"], pViewports, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_RSGetScissorRects( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pNumRects, + StructPointerDecoder* pRects) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "RSGetScissorRects"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pNumRects"], pNumRects, options); + FieldToJson(args["pRects"], pRects, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_HSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "HSGetShaderResources"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumViews"], NumViews, options); + FieldToJson(args["ppShaderResourceViews"], ppShaderResourceViews, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_HSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppHullShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "HSGetShader"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppHullShader"], ppHullShader, options); + FieldToJson(args["ppClassInstances"], ppClassInstances, options); + FieldToJson(args["pNumClassInstances"], pNumClassInstances, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_HSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "HSGetSamplers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumSamplers"], NumSamplers, options); + FieldToJson(args["ppSamplers"], ppSamplers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_HSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "HSGetConstantBuffers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DSGetShaderResources"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumViews"], NumViews, options); + FieldToJson(args["ppShaderResourceViews"], ppShaderResourceViews, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDomainShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DSGetShader"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppDomainShader"], ppDomainShader, options); + FieldToJson(args["ppClassInstances"], ppClassInstances, options); + FieldToJson(args["pNumClassInstances"], pNumClassInstances, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DSGetSamplers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumSamplers"], NumSamplers, options); + FieldToJson(args["ppSamplers"], ppSamplers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_DSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "DSGetConstantBuffers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_CSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "CSGetShaderResources"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumViews"], NumViews, options); + FieldToJson(args["ppShaderResourceViews"], ppShaderResourceViews, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_CSGetUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "CSGetUnorderedAccessViews"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumUAVs"], NumUAVs, options); + FieldToJson(args["ppUnorderedAccessViews"], ppUnorderedAccessViews, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_CSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppComputeShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "CSGetShader"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppComputeShader"], ppComputeShader, options); + FieldToJson(args["ppClassInstances"], ppClassInstances, options); + FieldToJson(args["pNumClassInstances"], pNumClassInstances, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_CSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "CSGetSamplers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumSamplers"], NumSamplers, options); + FieldToJson(args["ppSamplers"], ppSamplers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_CSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "CSGetConstantBuffers"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_ClearState( + const ApiCallInfo& call_info, + format::HandleId object_id) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "ClearState"); + const JsonOptions& options = writer_->GetOptions(); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_Flush( + const ApiCallInfo& call_info, + format::HandleId object_id) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "Flush"); + const JsonOptions& options = writer_->GetOptions(); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_GetType( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D11_DEVICE_CONTEXT_TYPE return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "GetType"); + const JsonOptions& options = writer_->GetOptions(); + FieldToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_GetContextFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "GetContextFlags"); + const JsonOptions& options = writer_->GetOptions(); + FieldToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext_FinishCommandList( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + BOOL RestoreDeferredContextState, + HandlePointerDecoder* ppCommandList) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext", object_id, "FinishCommandList"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + Bool32ToJson(args["RestoreDeferredContextState"], RestoreDeferredContextState, options); + FieldToJson(args["ppCommandList"], ppCommandList, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDecoder_GetCreationParameters( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pVideoDesc, + StructPointerDecoder* pConfig) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDecoder", object_id, "GetCreationParameters"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoDesc"], pVideoDesc, options); + FieldToJson(args["pConfig"], pConfig, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDecoder_GetDriverHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pDriverHandle) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDecoder", object_id, "GetDriverHandle"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDriverHandle"], pDriverHandle, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pContentDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoProcessorEnumerator", object_id, "GetVideoProcessorContentDesc"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pContentDesc"], pContentDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + PointerDecoder* pFlags) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoProcessorEnumerator", object_id, "CheckVideoProcessorFormat"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["Format"], Format, options); + FieldToJson(args["pFlags"], pFlags, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCaps) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoProcessorEnumerator", object_id, "GetVideoProcessorCaps"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCaps"], pCaps, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT TypeIndex, + StructPointerDecoder* pCaps) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoProcessorEnumerator", object_id, "GetVideoProcessorRateConversionCaps"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["TypeIndex"], TypeIndex, options); + FieldToJson(args["pCaps"], pCaps, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT TypeIndex, + UINT CustomRateIndex, + StructPointerDecoder* pRate) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoProcessorEnumerator", object_id, "GetVideoProcessorCustomRate"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["TypeIndex"], TypeIndex, options); + FieldToJson(args["CustomRateIndex"], CustomRateIndex, options); + FieldToJson(args["pRate"], pRate, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + StructPointerDecoder* pRange) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoProcessorEnumerator", object_id, "GetVideoProcessorFilterRange"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["Filter"], Filter, options); + FieldToJson(args["pRange"], pRange, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoProcessor_GetContentDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoProcessor", object_id, "GetContentDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoProcessor_GetRateConversionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCaps) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoProcessor", object_id, "GetRateConversionCaps"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCaps"], pCaps, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11AuthenticatedChannel_GetCertificateSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pCertificateSize) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11AuthenticatedChannel", object_id, "GetCertificateSize"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCertificateSize"], pCertificateSize, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11AuthenticatedChannel_GetCertificate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT CertificateSize, + PointerDecoder* pCertificate) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11AuthenticatedChannel", object_id, "GetCertificate"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["CertificateSize"], CertificateSize, options); + FieldToJson(args["pCertificate"], pCertificate, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11AuthenticatedChannel_GetChannelHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pChannelHandle) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11AuthenticatedChannel", object_id, "GetChannelHandle"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pChannelHandle"], pChannelHandle, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11CryptoSession_GetCryptoType( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCryptoType) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11CryptoSession", object_id, "GetCryptoType"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoType"], pCryptoType, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11CryptoSession_GetDecoderProfile( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDecoderProfile) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11CryptoSession", object_id, "GetDecoderProfile"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDecoderProfile"], pDecoderProfile, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11CryptoSession_GetCertificateSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pCertificateSize) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11CryptoSession", object_id, "GetCertificateSize"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCertificateSize"], pCertificateSize, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11CryptoSession_GetCertificate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT CertificateSize, + PointerDecoder* pCertificate) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11CryptoSession", object_id, "GetCertificate"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["CertificateSize"], CertificateSize, options); + FieldToJson(args["pCertificate"], pCertificate, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11CryptoSession_GetCryptoSessionHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pCryptoSessionHandle) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11CryptoSession", object_id, "GetCryptoSessionHandle"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoSessionHandle"], pCryptoSessionHandle, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDecoderOutputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDecoderOutputView", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoProcessorInputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoProcessorInputView", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoProcessorOutputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoProcessorOutputView", object_id, "GetDesc"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_GetDecoderBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type, + PointerDecoder* pBufferSize, + PointerDecoder* ppBuffer) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "GetDecoderBuffer"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDecoder"], pDecoder, options); + FieldToJson(args["Type"], Type, options); + FieldToJson(args["pBufferSize"], pBufferSize, options); + FieldToJson(args["ppBuffer"], ppBuffer, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_ReleaseDecoderBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "ReleaseDecoderBuffer"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDecoder"], pDecoder, options); + FieldToJson(args["Type"], Type, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_DecoderBeginFrame( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + format::HandleId pView, + UINT ContentKeySize, + PointerDecoder* pContentKey) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "DecoderBeginFrame"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDecoder"], pDecoder, options); + FieldToJson(args["pView"], pView, options); + FieldToJson(args["ContentKeySize"], ContentKeySize, options); + FieldToJson(args["pContentKey"], pContentKey, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_DecoderEndFrame( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "DecoderEndFrame"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDecoder"], pDecoder, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_SubmitDecoderBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "SubmitDecoderBuffers"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDecoder"], pDecoder, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["pBufferDesc"], pBufferDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_DecoderExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + StructPointerDecoder* pExtensionData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "DecoderExtension"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDecoder"], pDecoder, options); + FieldToJson(args["pExtensionData"], pExtensionData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetOutputTargetRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable, + StructPointerDecoder* pRect) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetOutputTargetRect"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + Bool32ToJson(args["Enable"], Enable, options); + FieldToJson(args["pRect"], pRect, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL YCbCr, + StructPointerDecoder* pColor) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetOutputBackgroundColor"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + Bool32ToJson(args["YCbCr"], YCbCr, options); + FieldToJson(args["pColor"], pColor, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetOutputColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + StructPointerDecoder* pColorSpace) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetOutputColorSpace"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["pColorSpace"], pColorSpace, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE AlphaFillMode, + UINT StreamIndex) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetOutputAlphaFillMode"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["AlphaFillMode"], AlphaFillMode, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetOutputConstriction( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable, + Decoded_tagSIZE Size) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetOutputConstriction"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + Bool32ToJson(args["Enable"], Enable, options); + FieldToJson(args["Size"], Size, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetOutputStereoMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetOutputStereoMode"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + Bool32ToJson(args["Enable"], Enable, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetOutputExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + uint64_t pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetOutputExtension"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["pExtensionGuid"], pExtensionGuid, options); + FieldToJson(args["DataSize"], DataSize, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetOutputTargetRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* Enabled, + StructPointerDecoder* pRect) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetOutputTargetRect"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + Bool32ToJson(args["Enabled"], Enabled, options); + FieldToJson(args["pRect"], pRect, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pYCbCr, + StructPointerDecoder* pColor) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetOutputBackgroundColor"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + Bool32ToJson(args["pYCbCr"], pYCbCr, options); + FieldToJson(args["pColor"], pColor, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetOutputColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + StructPointerDecoder* pColorSpace) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetOutputColorSpace"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["pColorSpace"], pColorSpace, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pAlphaFillMode, + PointerDecoder* pStreamIndex) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetOutputAlphaFillMode"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["pAlphaFillMode"], pAlphaFillMode, options); + FieldToJson(args["pStreamIndex"], pStreamIndex, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetOutputConstriction( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pEnabled, + StructPointerDecoder* pSize) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetOutputConstriction"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + Bool32ToJson(args["pEnabled"], pEnabled, options); + FieldToJson(args["pSize"], pSize, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetOutputStereoMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pEnabled) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetOutputStereoMode"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + Bool32ToJson(args["pEnabled"], pEnabled, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetOutputExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + PointerDecoder* pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetOutputExtension"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["pExtensionGuid"], pExtensionGuid, options); + FieldToJson(args["DataSize"], DataSize, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_FRAME_FORMAT FrameFormat) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetStreamFrameFormat"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["FrameFormat"], FrameFormat, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pColorSpace) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetStreamColorSpace"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["pColorSpace"], pColorSpace, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamOutputRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate, + BOOL RepeatFrame, + StructPointerDecoder* pCustomRate) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetStreamOutputRate"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["OutputRate"], OutputRate, options); + Bool32ToJson(args["RepeatFrame"], RepeatFrame, options); + FieldToJson(args["pCustomRate"], pCustomRate, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamSourceRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pRect) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetStreamSourceRect"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["Enable"], Enable, options); + FieldToJson(args["pRect"], pRect, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamDestRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pRect) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetStreamDestRect"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["Enable"], Enable, options); + FieldToJson(args["pRect"], pRect, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamAlpha( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Alpha) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetStreamAlpha"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["Enable"], Enable, options); + FieldToJson(args["Alpha"], Alpha, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamPalette( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + UINT Count, + PointerDecoder* pEntries) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetStreamPalette"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["Count"], Count, options); + FieldToJson(args["pEntries"], pEntries, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pSourceAspectRatio, + StructPointerDecoder* pDestinationAspectRatio) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetStreamPixelAspectRatio"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["Enable"], Enable, options); + FieldToJson(args["pSourceAspectRatio"], pSourceAspectRatio, options); + FieldToJson(args["pDestinationAspectRatio"], pDestinationAspectRatio, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamLumaKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Lower, + FLOAT Upper) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetStreamLumaKey"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["Enable"], Enable, options); + FieldToJson(args["Lower"], Lower, options); + FieldToJson(args["Upper"], Upper, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT Format, + BOOL LeftViewFrame0, + BOOL BaseViewFrame0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode, + int MonoOffset) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetStreamStereoFormat"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["Enable"], Enable, options); + FieldToJson(args["Format"], Format, options); + Bool32ToJson(args["LeftViewFrame0"], LeftViewFrame0, options); + Bool32ToJson(args["BaseViewFrame0"], BaseViewFrame0, options); + FieldToJson(args["FlipMode"], FlipMode, options); + FieldToJson(args["MonoOffset"], MonoOffset, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetStreamAutoProcessingMode"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["Enable"], Enable, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamFilter( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + BOOL Enable, + int Level) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetStreamFilter"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["Filter"], Filter, options); + Bool32ToJson(args["Enable"], Enable, options); + FieldToJson(args["Level"], Level, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + uint64_t pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetStreamExtension"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["pExtensionGuid"], pExtensionGuid, options); + FieldToJson(args["DataSize"], DataSize, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pFrameFormat) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetStreamFrameFormat"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["pFrameFormat"], pFrameFormat, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pColorSpace) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetStreamColorSpace"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["pColorSpace"], pColorSpace, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamOutputRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pOutputRate, + PointerDecoder* pRepeatFrame, + StructPointerDecoder* pCustomRate) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetStreamOutputRate"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["pOutputRate"], pOutputRate, options); + Bool32ToJson(args["pRepeatFrame"], pRepeatFrame, options); + FieldToJson(args["pCustomRate"], pCustomRate, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamSourceRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pRect) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetStreamSourceRect"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["pEnabled"], pEnabled, options); + FieldToJson(args["pRect"], pRect, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamDestRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pRect) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetStreamDestRect"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["pEnabled"], pEnabled, options); + FieldToJson(args["pRect"], pRect, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamAlpha( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + PointerDecoder* pAlpha) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetStreamAlpha"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["pEnabled"], pEnabled, options); + FieldToJson(args["pAlpha"], pAlpha, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamPalette( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + UINT Count, + PointerDecoder* pEntries) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetStreamPalette"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["Count"], Count, options); + FieldToJson(args["pEntries"], pEntries, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pSourceAspectRatio, + StructPointerDecoder* pDestinationAspectRatio) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetStreamPixelAspectRatio"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["pEnabled"], pEnabled, options); + FieldToJson(args["pSourceAspectRatio"], pSourceAspectRatio, options); + FieldToJson(args["pDestinationAspectRatio"], pDestinationAspectRatio, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamLumaKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + PointerDecoder* pLower, + PointerDecoder* pUpper) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetStreamLumaKey"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["pEnabled"], pEnabled, options); + FieldToJson(args["pLower"], pLower, options); + FieldToJson(args["pUpper"], pUpper, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pFormat, + PointerDecoder* pLeftViewFrame0, + PointerDecoder* pBaseViewFrame0, + PointerDecoder* pFlipMode, + PointerDecoder* MonoOffset) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetStreamStereoFormat"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["pEnable"], pEnable, options); + FieldToJson(args["pFormat"], pFormat, options); + Bool32ToJson(args["pLeftViewFrame0"], pLeftViewFrame0, options); + Bool32ToJson(args["pBaseViewFrame0"], pBaseViewFrame0, options); + FieldToJson(args["pFlipMode"], pFlipMode, options); + FieldToJson(args["MonoOffset"], MonoOffset, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetStreamAutoProcessingMode"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["pEnabled"], pEnabled, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamFilter( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + PointerDecoder* pEnabled, + PointerDecoder* pLevel) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetStreamFilter"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["Filter"], Filter, options); + Bool32ToJson(args["pEnabled"], pEnabled, options); + FieldToJson(args["pLevel"], pLevel, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + PointerDecoder* pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetStreamExtension"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["pExtensionGuid"], pExtensionGuid, options); + FieldToJson(args["DataSize"], DataSize, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + format::HandleId pView, + UINT OutputFrame, + UINT StreamCount, + StructPointerDecoder* pStreams) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorBlt"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["pView"], pView, options); + FieldToJson(args["OutputFrame"], OutputFrame, options); + FieldToJson(args["StreamCount"], StreamCount, options); + FieldToJson(args["pStreams"], pStreams, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT DataSize, + PointerDecoder* pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "NegotiateCryptoSessionKeyExchange"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoSession"], pCryptoSession, options); + FieldToJson(args["DataSize"], DataSize, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_EncryptionBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + format::HandleId pSrcSurface, + format::HandleId pDstSurface, + UINT IVSize, + PointerDecoder* pIV) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "EncryptionBlt"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoSession"], pCryptoSession, options); + FieldToJson(args["pSrcSurface"], pSrcSurface, options); + FieldToJson(args["pDstSurface"], pDstSurface, options); + FieldToJson(args["IVSize"], IVSize, options); + FieldToJson(args["pIV"], pIV, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_DecryptionBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + format::HandleId pSrcSurface, + format::HandleId pDstSurface, + StructPointerDecoder* pEncryptedBlockInfo, + UINT ContentKeySize, + PointerDecoder* pContentKey, + UINT IVSize, + PointerDecoder* pIV) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "DecryptionBlt"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoSession"], pCryptoSession, options); + FieldToJson(args["pSrcSurface"], pSrcSurface, options); + FieldToJson(args["pDstSurface"], pDstSurface, options); + FieldToJson(args["pEncryptedBlockInfo"], pEncryptedBlockInfo, options); + FieldToJson(args["ContentKeySize"], ContentKeySize, options); + FieldToJson(args["pContentKey"], pContentKey, options); + FieldToJson(args["IVSize"], IVSize, options); + FieldToJson(args["pIV"], pIV, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_StartSessionKeyRefresh( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + UINT RandomNumberSize, + PointerDecoder* pRandomNumber) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "StartSessionKeyRefresh"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoSession"], pCryptoSession, options); + FieldToJson(args["RandomNumberSize"], RandomNumberSize, options); + FieldToJson(args["pRandomNumber"], pRandomNumber, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_FinishSessionKeyRefresh( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "FinishSessionKeyRefresh"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoSession"], pCryptoSession, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_GetEncryptionBltKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT KeySize, + PointerDecoder* pReadbackKey) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "GetEncryptionBltKey"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoSession"], pCryptoSession, options); + FieldToJson(args["KeySize"], KeySize, options); + FieldToJson(args["pReadbackKey"], pReadbackKey, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT DataSize, + PointerDecoder* pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "NegotiateAuthenticatedChannelKeyExchange"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pChannel"], pChannel, options); + FieldToJson(args["DataSize"], DataSize, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_QueryAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT InputSize, + PointerDecoder* pInput, + UINT OutputSize, + PointerDecoder* pOutput) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "QueryAuthenticatedChannel"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pChannel"], pChannel, options); + FieldToJson(args["InputSize"], InputSize, options); + FieldToJson(args["pInput"], pInput, options); + FieldToJson(args["OutputSize"], OutputSize, options); + FieldToJson(args["pOutput"], pOutput, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_ConfigureAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT InputSize, + PointerDecoder* pInput, + StructPointerDecoder* pOutput) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "ConfigureAuthenticatedChannel"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pChannel"], pChannel, options); + FieldToJson(args["InputSize"], InputSize, options); + FieldToJson(args["pInput"], pInput, options); + FieldToJson(args["pOutput"], pOutput, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamRotation( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_ROTATION Rotation) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorSetStreamRotation"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["Enable"], Enable, options); + FieldToJson(args["Rotation"], Rotation, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamRotation( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pRotation) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext", object_id, "VideoProcessorGetStreamRotation"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["pEnable"], pEnable, options); + FieldToJson(args["pRotation"], pRotation, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_CreateVideoDecoder( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pVideoDesc, + StructPointerDecoder* pConfig, + HandlePointerDecoder* ppDecoder) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "CreateVideoDecoder"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoDesc"], pVideoDesc, options); + FieldToJson(args["pConfig"], pConfig, options); + FieldToJson(args["ppDecoder"], ppDecoder, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_CreateVideoProcessor( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pEnum, + UINT RateConversionIndex, + HandlePointerDecoder* ppVideoProcessor) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "CreateVideoProcessor"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pEnum"], pEnum, options); + FieldToJson(args["RateConversionIndex"], RateConversionIndex, options); + FieldToJson(args["ppVideoProcessor"], ppVideoProcessor, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_CreateAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType, + HandlePointerDecoder* ppAuthenticatedChannel) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "CreateAuthenticatedChannel"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ChannelType"], ChannelType, options); + FieldToJson(args["ppAuthenticatedChannel"], ppAuthenticatedChannel, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_CreateCryptoSession( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pKeyExchangeType, + HandlePointerDecoder* ppCryptoSession) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "CreateCryptoSession"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoType"], pCryptoType, options); + FieldToJson(args["pDecoderProfile"], pDecoderProfile, options); + FieldToJson(args["pKeyExchangeType"], pKeyExchangeType, options); + FieldToJson(args["ppCryptoSession"], ppCryptoSession, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_CreateVideoDecoderOutputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVDOVView) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "CreateVideoDecoderOutputView"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["ppVDOVView"], ppVDOVView, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_CreateVideoProcessorInputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + format::HandleId pEnum, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVPIView) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "CreateVideoProcessorInputView"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + FieldToJson(args["pEnum"], pEnum, options); + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["ppVPIView"], ppVPIView, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_CreateVideoProcessorOutputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + format::HandleId pEnum, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVPOView) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "CreateVideoProcessorOutputView"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + FieldToJson(args["pEnum"], pEnum, options); + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["ppVPOView"], ppVPOView, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_CreateVideoProcessorEnumerator( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppEnum) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "CreateVideoProcessorEnumerator"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["ppEnum"], ppEnum, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_GetVideoDecoderProfileCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "GetVideoDecoderProfileCount"); + const JsonOptions& options = writer_->GetOptions(); + FieldToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_GetVideoDecoderProfile( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT Index, + StructPointerDecoder* pDecoderProfile) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "GetVideoDecoderProfile"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["Index"], Index, options); + FieldToJson(args["pDecoderProfile"], pDecoderProfile, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_CheckVideoDecoderFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDecoderProfile, + DXGI_FORMAT Format, + PointerDecoder* pSupported) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "CheckVideoDecoderFormat"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDecoderProfile"], pDecoderProfile, options); + FieldToJson(args["Format"], Format, options); + Bool32ToJson(args["pSupported"], pSupported, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_GetVideoDecoderConfigCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + PointerDecoder* pCount) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "GetVideoDecoderConfigCount"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["pCount"], pCount, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_GetVideoDecoderConfig( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + UINT Index, + StructPointerDecoder* pConfig) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "GetVideoDecoderConfig"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["Index"], Index, options); + FieldToJson(args["pConfig"], pConfig, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_GetContentProtectionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pCaps) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "GetContentProtectionCaps"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoType"], pCryptoType, options); + FieldToJson(args["pDecoderProfile"], pDecoderProfile, options); + FieldToJson(args["pCaps"], pCaps, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_CheckCryptoKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + UINT Index, + StructPointerDecoder* pKeyExchangeType) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "CheckCryptoKeyExchange"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoType"], pCryptoType, options); + FieldToJson(args["pDecoderProfile"], pDecoderProfile, options); + FieldToJson(args["Index"], Index, options); + FieldToJson(args["pKeyExchangeType"], pKeyExchangeType, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "SetPrivateData"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["guid"], guid, options); + FieldToJson(args["DataSize"], DataSize, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice", object_id, "SetPrivateDataInterface"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["guid"], guid, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppBuffer) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateBuffer"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["pInitialData"], pInitialData, options); + FieldToJson(args["ppBuffer"], ppBuffer, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateTexture1D( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture1D) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateTexture1D"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["pInitialData"], pInitialData, options); + FieldToJson(args["ppTexture1D"], ppTexture1D, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateTexture2D( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture2D) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateTexture2D"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["pInitialData"], pInitialData, options); + FieldToJson(args["ppTexture2D"], ppTexture2D, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateTexture3D( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture3D) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateTexture3D"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["pInitialData"], pInitialData, options); + FieldToJson(args["ppTexture3D"], ppTexture3D, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateShaderResourceView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppSRView) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateShaderResourceView"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["ppSRView"], ppSRView, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateUnorderedAccessView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppUAView) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateUnorderedAccessView"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["ppUAView"], ppUAView, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateRenderTargetView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppRTView) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateRenderTargetView"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["ppRTView"], ppRTView, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateDepthStencilView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppDepthStencilView) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateDepthStencilView"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["ppDepthStencilView"], ppDepthStencilView, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputElementDescs, + UINT NumElements, + PointerDecoder* pShaderBytecodeWithInputSignature, + SIZE_T BytecodeLength, + HandlePointerDecoder* ppInputLayout) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateInputLayout"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pInputElementDescs"], pInputElementDescs, options); + FieldToJson(args["NumElements"], NumElements, options); + FieldToJson(args["pShaderBytecodeWithInputSignature"], pShaderBytecodeWithInputSignature, options); + FieldToJson(args["BytecodeLength"], BytecodeLength, options); + FieldToJson(args["ppInputLayout"], ppInputLayout, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateVertexShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppVertexShader) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateVertexShader"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pShaderBytecode"], pShaderBytecode, options); + FieldToJson(args["BytecodeLength"], BytecodeLength, options); + FieldToJson(args["pClassLinkage"], pClassLinkage, options); + FieldToJson(args["ppVertexShader"], ppVertexShader, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateGeometryShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppGeometryShader) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateGeometryShader"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pShaderBytecode"], pShaderBytecode, options); + FieldToJson(args["BytecodeLength"], BytecodeLength, options); + FieldToJson(args["pClassLinkage"], pClassLinkage, options); + FieldToJson(args["ppGeometryShader"], ppGeometryShader, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateGeometryShaderWithStreamOutput( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + StructPointerDecoder* pSODeclaration, + UINT NumEntries, + PointerDecoder* pBufferStrides, + UINT NumStrides, + UINT RasterizedStream, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppGeometryShader) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateGeometryShaderWithStreamOutput"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pShaderBytecode"], pShaderBytecode, options); + FieldToJson(args["BytecodeLength"], BytecodeLength, options); + FieldToJson(args["pSODeclaration"], pSODeclaration, options); + FieldToJson(args["NumEntries"], NumEntries, options); + FieldToJson(args["pBufferStrides"], pBufferStrides, options); + FieldToJson(args["NumStrides"], NumStrides, options); + FieldToJson(args["RasterizedStream"], RasterizedStream, options); + FieldToJson(args["pClassLinkage"], pClassLinkage, options); + FieldToJson(args["ppGeometryShader"], ppGeometryShader, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreatePixelShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppPixelShader) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreatePixelShader"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pShaderBytecode"], pShaderBytecode, options); + FieldToJson(args["BytecodeLength"], BytecodeLength, options); + FieldToJson(args["pClassLinkage"], pClassLinkage, options); + FieldToJson(args["ppPixelShader"], ppPixelShader, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateHullShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppHullShader) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateHullShader"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pShaderBytecode"], pShaderBytecode, options); + FieldToJson(args["BytecodeLength"], BytecodeLength, options); + FieldToJson(args["pClassLinkage"], pClassLinkage, options); + FieldToJson(args["ppHullShader"], ppHullShader, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateDomainShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppDomainShader) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateDomainShader"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pShaderBytecode"], pShaderBytecode, options); + FieldToJson(args["BytecodeLength"], BytecodeLength, options); + FieldToJson(args["pClassLinkage"], pClassLinkage, options); + FieldToJson(args["ppDomainShader"], ppDomainShader, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateComputeShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppComputeShader) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateComputeShader"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pShaderBytecode"], pShaderBytecode, options); + FieldToJson(args["BytecodeLength"], BytecodeLength, options); + FieldToJson(args["pClassLinkage"], pClassLinkage, options); + FieldToJson(args["ppComputeShader"], ppComputeShader, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateClassLinkage( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + HandlePointerDecoder* ppLinkage) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateClassLinkage"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppLinkage"], ppLinkage, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pBlendStateDesc, + HandlePointerDecoder* ppBlendState) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateBlendState"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pBlendStateDesc"], pBlendStateDesc, options); + FieldToJson(args["ppBlendState"], ppBlendState, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDepthStencilDesc, + HandlePointerDecoder* ppDepthStencilState) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateDepthStencilState"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDepthStencilDesc"], pDepthStencilDesc, options); + FieldToJson(args["ppDepthStencilState"], ppDepthStencilState, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateRasterizerState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateRasterizerState"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pRasterizerDesc"], pRasterizerDesc, options); + FieldToJson(args["ppRasterizerState"], ppRasterizerState, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateSamplerState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pSamplerDesc, + HandlePointerDecoder* ppSamplerState) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateSamplerState"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pSamplerDesc"], pSamplerDesc, options); + FieldToJson(args["ppSamplerState"], ppSamplerState, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateQuery( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pQueryDesc, + HandlePointerDecoder* ppQuery) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateQuery"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pQueryDesc"], pQueryDesc, options); + FieldToJson(args["ppQuery"], ppQuery, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreatePredicate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pPredicateDesc, + HandlePointerDecoder* ppPredicate) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreatePredicate"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pPredicateDesc"], pPredicateDesc, options); + FieldToJson(args["ppPredicate"], ppPredicate, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateCounter( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCounterDesc, + HandlePointerDecoder* ppCounter) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateCounter"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCounterDesc"], pCounterDesc, options); + FieldToJson(args["ppCounter"], ppCounter, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CreateDeferredContext( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CreateDeferredContext"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ContextFlags"], ContextFlags, options); + FieldToJson(args["ppDeferredContext"], ppDeferredContext, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_OpenSharedResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hResource, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppResource) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "OpenSharedResource"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["hResource"], hResource, options); + FieldToJson(args["ReturnedInterface"], ReturnedInterface, options); + FieldToJson(args["ppResource"], ppResource, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CheckFormatSupport( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + PointerDecoder* pFormatSupport) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CheckFormatSupport"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["Format"], Format, options); + FieldToJson(args["pFormatSupport"], pFormatSupport, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CheckMultisampleQualityLevels( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + UINT SampleCount, + PointerDecoder* pNumQualityLevels) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CheckMultisampleQualityLevels"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["Format"], Format, options); + FieldToJson(args["SampleCount"], SampleCount, options); + FieldToJson(args["pNumQualityLevels"], pNumQualityLevels, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CheckCounterInfo( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCounterInfo) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CheckCounterInfo"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCounterInfo"], pCounterInfo, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_CheckCounter( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + PointerDecoder* pType, + PointerDecoder* pActiveCounters, + StringDecoder* szName, + PointerDecoder* pNameLength, + StringDecoder* szUnits, + PointerDecoder* pUnitsLength, + StringDecoder* szDescription, + PointerDecoder* pDescriptionLength) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "CheckCounter"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + FieldToJson(args["pType"], pType, options); + FieldToJson(args["pActiveCounters"], pActiveCounters, options); + FieldToJson(args["szName"], szName, options); + FieldToJson(args["pNameLength"], pNameLength, options); + FieldToJson(args["szUnits"], szUnits, options); + FieldToJson(args["pUnitsLength"], pUnitsLength, options); + FieldToJson(args["szDescription"], szDescription, options); + FieldToJson(args["pDescriptionLength"], pDescriptionLength, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_GetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + PointerDecoder* pDataSize, + PointerDecoder* pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "GetPrivateData"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["guid"], guid, options); + FieldToJson(args["pDataSize"], pDataSize, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "SetPrivateData"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["guid"], guid, options); + FieldToJson(args["DataSize"], DataSize, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "SetPrivateDataInterface"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["guid"], guid, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_GetFeatureLevel( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D_FEATURE_LEVEL return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "GetFeatureLevel"); + const JsonOptions& options = writer_->GetOptions(); + FieldToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_GetCreationFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "GetCreationFlags"); + const JsonOptions& options = writer_->GetOptions(); + FieldToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_GetDeviceRemovedReason( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "GetDeviceRemovedReason"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_GetImmediateContext( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "GetImmediateContext"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppImmediateContext"], ppImmediateContext, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_SetExceptionMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT RaiseFlags) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "SetExceptionMode"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["RaiseFlags"], RaiseFlags, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device_GetExceptionMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device", object_id, "GetExceptionMode"); + const JsonOptions& options = writer_->GetOptions(); + FieldToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +/* +** This part is generated from d3d11_1.h in Windows SDK: 10.0.20348.0 +** +*/ +void Dx12JsonConsumer::Process_ID3D11BlendState1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11BlendState1", object_id, "GetDesc1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11RasterizerState1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11RasterizerState1", object_id, "GetDesc1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_CopySubresourceRegion1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox, + UINT CopyFlags) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "CopySubresourceRegion1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDstResource"], pDstResource, options); + FieldToJson(args["DstSubresource"], DstSubresource, options); + FieldToJson(args["DstX"], DstX, options); + FieldToJson(args["DstY"], DstY, options); + FieldToJson(args["DstZ"], DstZ, options); + FieldToJson(args["pSrcResource"], pSrcResource, options); + FieldToJson(args["SrcSubresource"], SrcSubresource, options); + FieldToJson(args["pSrcBox"], pSrcBox, options); + FieldToJson(args["CopyFlags"], CopyFlags, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_DiscardResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "DiscardResource"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_DiscardView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResourceView) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "DiscardView"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResourceView"], pResourceView, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_VSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "VSSetConstantBuffers1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + FieldToJson(args["pFirstConstant"], pFirstConstant, options); + FieldToJson(args["pNumConstants"], pNumConstants, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_HSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "HSSetConstantBuffers1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + FieldToJson(args["pFirstConstant"], pFirstConstant, options); + FieldToJson(args["pNumConstants"], pNumConstants, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_DSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "DSSetConstantBuffers1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + FieldToJson(args["pFirstConstant"], pFirstConstant, options); + FieldToJson(args["pNumConstants"], pNumConstants, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_GSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "GSSetConstantBuffers1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + FieldToJson(args["pFirstConstant"], pFirstConstant, options); + FieldToJson(args["pNumConstants"], pNumConstants, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_PSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "PSSetConstantBuffers1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + FieldToJson(args["pFirstConstant"], pFirstConstant, options); + FieldToJson(args["pNumConstants"], pNumConstants, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_CSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "CSSetConstantBuffers1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + FieldToJson(args["pFirstConstant"], pFirstConstant, options); + FieldToJson(args["pNumConstants"], pNumConstants, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_VSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "VSGetConstantBuffers1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + FieldToJson(args["pFirstConstant"], pFirstConstant, options); + FieldToJson(args["pNumConstants"], pNumConstants, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_HSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "HSGetConstantBuffers1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + FieldToJson(args["pFirstConstant"], pFirstConstant, options); + FieldToJson(args["pNumConstants"], pNumConstants, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_DSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "DSGetConstantBuffers1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + FieldToJson(args["pFirstConstant"], pFirstConstant, options); + FieldToJson(args["pNumConstants"], pNumConstants, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_GSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "GSGetConstantBuffers1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + FieldToJson(args["pFirstConstant"], pFirstConstant, options); + FieldToJson(args["pNumConstants"], pNumConstants, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_PSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "PSGetConstantBuffers1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + FieldToJson(args["pFirstConstant"], pFirstConstant, options); + FieldToJson(args["pNumConstants"], pNumConstants, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_CSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "CSGetConstantBuffers1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["StartSlot"], StartSlot, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["ppConstantBuffers"], ppConstantBuffers, options); + FieldToJson(args["pFirstConstant"], pFirstConstant, options); + FieldToJson(args["pNumConstants"], pNumConstants, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_SwapDeviceContextState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pState, + HandlePointerDecoder* ppPreviousState) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "SwapDeviceContextState"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pState"], pState, options); + FieldToJson(args["ppPreviousState"], ppPreviousState, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_ClearView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pView, + PointerDecoder Color [4], + StructPointerDecoder* pRect, + UINT NumRects) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "ClearView"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pView"], pView, options); + FieldToJson(args["Color"], Color, options); + FieldToJson(args["pRect"], pRect, options); + FieldToJson(args["NumRects"], NumRects, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext1_DiscardView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResourceView, + StructPointerDecoder* pRects, + UINT NumRects) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext1", object_id, "DiscardView1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResourceView"], pResourceView, options); + FieldToJson(args["pRects"], pRects, options); + FieldToJson(args["NumRects"], NumRects, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext1_SubmitDecoderBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext1", object_id, "SubmitDecoderBuffers1"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDecoder"], pDecoder, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["pBufferDesc"], pBufferDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext1_GetDataForNewHardwareKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT PrivateInputSize, + PointerDecoder* pPrivatInputData, + PointerDecoder* pPrivateOutputData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext1", object_id, "GetDataForNewHardwareKey"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoSession"], pCryptoSession, options); + FieldToJson(args["PrivateInputSize"], PrivateInputSize, options); + FieldToJson(args["pPrivatInputData"], pPrivatInputData, options); + FieldToJson(args["pPrivateOutputData"], pPrivateOutputData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext1_CheckCryptoSessionStatus( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + PointerDecoder* pStatus) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext1", object_id, "CheckCryptoSessionStatus"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoSession"], pCryptoSession, options); + FieldToJson_D3D11_CRYPTO_SESSION_STATUS(args["pStatus"], *pStatus->GetPointer(), options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext1_DecoderEnableDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pOutputDesc, + UINT ReferenceFrameCount) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext1", object_id, "DecoderEnableDownsampling"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDecoder"], pDecoder, options); + FieldToJson(args["InputColorSpace"], InputColorSpace, options); + FieldToJson(args["pOutputDesc"], pOutputDesc, options); + FieldToJson(args["ReferenceFrameCount"], ReferenceFrameCount, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext1_DecoderUpdateDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + StructPointerDecoder* pOutputDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext1", object_id, "DecoderUpdateDownsampling"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDecoder"], pDecoder, options); + FieldToJson(args["pOutputDesc"], pOutputDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + DXGI_COLOR_SPACE_TYPE ColorSpace) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext1", object_id, "VideoProcessorSetOutputColorSpace1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["ColorSpace"], ColorSpace, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL ShaderUsage) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext1", object_id, "VideoProcessorSetOutputShaderUsage"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + Bool32ToJson(args["ShaderUsage"], ShaderUsage, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pColorSpace) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext1", object_id, "VideoProcessorGetOutputColorSpace1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["pColorSpace"], pColorSpace, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pShaderUsage) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext1", object_id, "VideoProcessorGetOutputShaderUsage"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + Bool32ToJson(args["pShaderUsage"], pShaderUsage, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + DXGI_COLOR_SPACE_TYPE ColorSpace) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext1", object_id, "VideoProcessorSetStreamColorSpace1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["ColorSpace"], ColorSpace, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext1_VideoProcessorSetStreamMirror( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + BOOL FlipHorizontal, + BOOL FlipVertical) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext1", object_id, "VideoProcessorSetStreamMirror"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["Enable"], Enable, options); + Bool32ToJson(args["FlipHorizontal"], FlipHorizontal, options); + Bool32ToJson(args["FlipVertical"], FlipVertical, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pColorSpace) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext1", object_id, "VideoProcessorGetStreamColorSpace1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["pColorSpace"], pColorSpace, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext1_VideoProcessorGetStreamMirror( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pFlipHorizontal, + PointerDecoder* pFlipVertical) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext1", object_id, "VideoProcessorGetStreamMirror"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + Bool32ToJson(args["pEnable"], pEnable, options); + Bool32ToJson(args["pFlipHorizontal"], pFlipHorizontal, options); + Bool32ToJson(args["pFlipVertical"], pFlipVertical, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext1_VideoProcessorGetBehaviorHints( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT OutputWidth, + UINT OutputHeight, + DXGI_FORMAT OutputFormat, + UINT StreamCount, + StructPointerDecoder* pStreams, + PointerDecoder* pBehaviorHints) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext1", object_id, "VideoProcessorGetBehaviorHints"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["OutputWidth"], OutputWidth, options); + FieldToJson(args["OutputHeight"], OutputHeight, options); + FieldToJson(args["OutputFormat"], OutputFormat, options); + FieldToJson(args["StreamCount"], StreamCount, options); + FieldToJson(args["pStreams"], pStreams, options); + FieldToJson(args["pBehaviorHints"], pBehaviorHints, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pKeyExchangeType, + PointerDecoder* pPrivateInputSize, + PointerDecoder* pPrivateOutputSize) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice1", object_id, "GetCryptoSessionPrivateDataSize"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoType"], pCryptoType, options); + FieldToJson(args["pDecoderProfile"], pDecoderProfile, options); + FieldToJson(args["pKeyExchangeType"], pKeyExchangeType, options); + FieldToJson(args["pPrivateInputSize"], pPrivateInputSize, options); + FieldToJson(args["pPrivateOutputSize"], pPrivateOutputSize, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice1_GetVideoDecoderCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDecoderProfile, + UINT SampleWidth, + UINT SampleHeight, + StructPointerDecoder* pFrameRate, + UINT BitRate, + StructPointerDecoder* pCryptoType, + PointerDecoder* pDecoderCaps) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice1", object_id, "GetVideoDecoderCaps"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDecoderProfile"], pDecoderProfile, options); + FieldToJson(args["SampleWidth"], SampleWidth, options); + FieldToJson(args["SampleHeight"], SampleHeight, options); + FieldToJson(args["pFrameRate"], pFrameRate, options); + FieldToJson(args["BitRate"], BitRate, options); + FieldToJson(args["pCryptoType"], pCryptoType, options); + FieldToJson(args["pDecoderCaps"], pDecoderCaps, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice1_CheckVideoDecoderDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pInputConfig, + StructPointerDecoder* pFrameRate, + StructPointerDecoder* pOutputDesc, + PointerDecoder* pSupported, + PointerDecoder* pRealTimeHint) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice1", object_id, "CheckVideoDecoderDownsampling"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pInputDesc"], pInputDesc, options); + FieldToJson(args["InputColorSpace"], InputColorSpace, options); + FieldToJson(args["pInputConfig"], pInputConfig, options); + FieldToJson(args["pFrameRate"], pFrameRate, options); + FieldToJson(args["pOutputDesc"], pOutputDesc, options); + Bool32ToJson(args["pSupported"], pSupported, options); + Bool32ToJson(args["pRealTimeHint"], pRealTimeHint, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pInputConfig, + StructPointerDecoder* pFrameRate, + StructPointerDecoder* pRecommendedOutputDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice1", object_id, "RecommendVideoDecoderDownsampleParameters"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pInputDesc"], pInputDesc, options); + FieldToJson(args["InputColorSpace"], InputColorSpace, options); + FieldToJson(args["pInputConfig"], pInputConfig, options); + FieldToJson(args["pFrameRate"], pFrameRate, options); + FieldToJson(args["pRecommendedOutputDesc"], pRecommendedOutputDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT InputFormat, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + DXGI_FORMAT OutputFormat, + DXGI_COLOR_SPACE_TYPE OutputColorSpace, + PointerDecoder* pSupported) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoProcessorEnumerator1", object_id, "CheckVideoProcessorFormatConversion"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["InputFormat"], InputFormat, options); + FieldToJson(args["InputColorSpace"], InputColorSpace, options); + FieldToJson(args["OutputFormat"], OutputFormat, options); + FieldToJson(args["OutputColorSpace"], OutputColorSpace, options); + Bool32ToJson(args["pSupported"], pSupported, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device1_GetImmediateContext1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device1", object_id, "GetImmediateContext1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppImmediateContext"], ppImmediateContext, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device1_CreateDeferredContext1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device1", object_id, "CreateDeferredContext1"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ContextFlags"], ContextFlags, options); + FieldToJson(args["ppDeferredContext"], ppDeferredContext, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device1_CreateBlendState1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pBlendStateDesc, + HandlePointerDecoder* ppBlendState) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device1", object_id, "CreateBlendState1"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pBlendStateDesc"], pBlendStateDesc, options); + FieldToJson(args["ppBlendState"], ppBlendState, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device1_CreateRasterizerState1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device1", object_id, "CreateRasterizerState1"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pRasterizerDesc"], pRasterizerDesc, options); + FieldToJson(args["ppRasterizerState"], ppRasterizerState, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device1_CreateDeviceContextState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + Decoded_GUID EmulatedInterface, + PointerDecoder* pChosenFeatureLevel, + HandlePointerDecoder* ppContextState) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device1", object_id, "CreateDeviceContextState"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["Flags"], Flags, options); + FieldToJson(args["pFeatureLevels"], pFeatureLevels, options); + FieldToJson(args["FeatureLevels"], FeatureLevels, options); + FieldToJson(args["SDKVersion"], SDKVersion, options); + FieldToJson(args["EmulatedInterface"], EmulatedInterface, options); + FieldToJson(args["pChosenFeatureLevel"], pChosenFeatureLevel, options); + FieldToJson(args["ppContextState"], ppContextState, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device1_OpenSharedResource1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hResource, + Decoded_GUID returnedInterface, + HandlePointerDecoder* ppResource) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device1", object_id, "OpenSharedResource1"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["hResource"], hResource, options); + FieldToJson(args["returnedInterface"], returnedInterface, options); + FieldToJson(args["ppResource"], ppResource, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device1_OpenSharedResourceByName( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + WStringDecoder* lpName, + DWORD dwDesiredAccess, + Decoded_GUID returnedInterface, + HandlePointerDecoder* ppResource) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device1", object_id, "OpenSharedResourceByName"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["lpName"], lpName, options); + FieldToJson(args["dwDesiredAccess"], dwDesiredAccess, options); + FieldToJson(args["returnedInterface"], returnedInterface, options); + FieldToJson(args["ppResource"], ppResource, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3DUserDefinedAnnotation_BeginEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + INT return_value, + WStringDecoder* Name) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3DUserDefinedAnnotation", object_id, "BeginEvent"); + const JsonOptions& options = writer_->GetOptions(); + FieldToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["Name"], Name, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3DUserDefinedAnnotation_EndEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + INT return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3DUserDefinedAnnotation", object_id, "EndEvent"); + const JsonOptions& options = writer_->GetOptions(); + FieldToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3DUserDefinedAnnotation_SetMarker( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* Name) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3DUserDefinedAnnotation", object_id, "SetMarker"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["Name"], Name, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3DUserDefinedAnnotation_GetStatus( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3DUserDefinedAnnotation", object_id, "GetStatus"); + const JsonOptions& options = writer_->GetOptions(); + Bool32ToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +/* +** This part is generated from d3d11_2.h in Windows SDK: 10.0.20348.0 +** +*/ +void Dx12JsonConsumer::Process_ID3D11DeviceContext2_UpdateTileMappings( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pTiledResource, + UINT NumTiledResourceRegions, + StructPointerDecoder* pTiledResourceRegionStartCoordinates, + StructPointerDecoder* pTiledResourceRegionSizes, + format::HandleId pTilePool, + UINT NumRanges, + PointerDecoder* pRangeFlags, + PointerDecoder* pTilePoolStartOffsets, + PointerDecoder* pRangeTileCounts, + UINT Flags) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext2", object_id, "UpdateTileMappings"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pTiledResource"], pTiledResource, options); + FieldToJson(args["NumTiledResourceRegions"], NumTiledResourceRegions, options); + FieldToJson(args["pTiledResourceRegionStartCoordinates"], pTiledResourceRegionStartCoordinates, options); + FieldToJson(args["pTiledResourceRegionSizes"], pTiledResourceRegionSizes, options); + FieldToJson(args["pTilePool"], pTilePool, options); + FieldToJson(args["NumRanges"], NumRanges, options); + FieldToJson(args["pRangeFlags"], pRangeFlags, options); + FieldToJson(args["pTilePoolStartOffsets"], pTilePoolStartOffsets, options); + FieldToJson(args["pRangeTileCounts"], pRangeTileCounts, options); + FieldToJson(args["Flags"], Flags, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext2_CopyTileMappings( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDestTiledResource, + StructPointerDecoder* pDestRegionStartCoordinate, + format::HandleId pSourceTiledResource, + StructPointerDecoder* pSourceRegionStartCoordinate, + StructPointerDecoder* pTileRegionSize, + UINT Flags) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext2", object_id, "CopyTileMappings"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDestTiledResource"], pDestTiledResource, options); + FieldToJson(args["pDestRegionStartCoordinate"], pDestRegionStartCoordinate, options); + FieldToJson(args["pSourceTiledResource"], pSourceTiledResource, options); + FieldToJson(args["pSourceRegionStartCoordinate"], pSourceRegionStartCoordinate, options); + FieldToJson(args["pTileRegionSize"], pTileRegionSize, options); + FieldToJson(args["Flags"], Flags, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext2_CopyTiles( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResource, + StructPointerDecoder* pTileRegionStartCoordinate, + StructPointerDecoder* pTileRegionSize, + format::HandleId pBuffer, + UINT64 BufferStartOffsetInBytes, + UINT Flags) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext2", object_id, "CopyTiles"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pTiledResource"], pTiledResource, options); + FieldToJson(args["pTileRegionStartCoordinate"], pTileRegionStartCoordinate, options); + FieldToJson(args["pTileRegionSize"], pTileRegionSize, options); + FieldToJson(args["pBuffer"], pBuffer, options); + FieldToJson(args["BufferStartOffsetInBytes"], BufferStartOffsetInBytes, options); + FieldToJson(args["Flags"], Flags, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext2_UpdateTiles( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDestTiledResource, + StructPointerDecoder* pDestTileRegionStartCoordinate, + StructPointerDecoder* pDestTileRegionSize, + uint64_t pSourceTileData, + UINT Flags) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext2", object_id, "UpdateTiles"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDestTiledResource"], pDestTiledResource, options); + FieldToJson(args["pDestTileRegionStartCoordinate"], pDestTileRegionStartCoordinate, options); + FieldToJson(args["pDestTileRegionSize"], pDestTileRegionSize, options); + FieldToJson(args["pSourceTileData"], pSourceTileData, options); + FieldToJson(args["Flags"], Flags, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext2_ResizeTilePool( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pTilePool, + UINT64 NewSizeInBytes) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext2", object_id, "ResizeTilePool"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pTilePool"], pTilePool, options); + FieldToJson(args["NewSizeInBytes"], NewSizeInBytes, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext2_TiledResourceBarrier( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResourceOrViewAccessBeforeBarrier, + format::HandleId pTiledResourceOrViewAccessAfterBarrier) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext2", object_id, "TiledResourceBarrier"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pTiledResourceOrViewAccessBeforeBarrier"], pTiledResourceOrViewAccessBeforeBarrier, options); + FieldToJson(args["pTiledResourceOrViewAccessAfterBarrier"], pTiledResourceOrViewAccessAfterBarrier, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext2_IsAnnotationEnabled( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext2", object_id, "IsAnnotationEnabled"); + const JsonOptions& options = writer_->GetOptions(); + Bool32ToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext2_SetMarkerInt( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* pLabel, + INT Data) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext2", object_id, "SetMarkerInt"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pLabel"], pLabel, options); + FieldToJson(args["Data"], Data, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext2_BeginEventInt( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* pLabel, + INT Data) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext2", object_id, "BeginEventInt"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pLabel"], pLabel, options); + FieldToJson(args["Data"], Data, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext2_EndEvent( + const ApiCallInfo& call_info, + format::HandleId object_id) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext2", object_id, "EndEvent"); + const JsonOptions& options = writer_->GetOptions(); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device2_GetImmediateContext2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device2", object_id, "GetImmediateContext2"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppImmediateContext"], ppImmediateContext, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device2_CreateDeferredContext2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device2", object_id, "CreateDeferredContext2"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ContextFlags"], ContextFlags, options); + FieldToJson(args["ppDeferredContext"], ppDeferredContext, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device2_GetResourceTiling( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResource, + PointerDecoder* pNumTilesForEntireResource, + StructPointerDecoder* pPackedMipDesc, + StructPointerDecoder* pStandardTileShapeForNonPackedMips, + PointerDecoder* pNumSubresourceTilings, + UINT FirstSubresourceTilingToGet, + StructPointerDecoder* pSubresourceTilingsForNonPackedMips) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device2", object_id, "GetResourceTiling"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pTiledResource"], pTiledResource, options); + FieldToJson(args["pNumTilesForEntireResource"], pNumTilesForEntireResource, options); + FieldToJson(args["pPackedMipDesc"], pPackedMipDesc, options); + FieldToJson(args["pStandardTileShapeForNonPackedMips"], pStandardTileShapeForNonPackedMips, options); + FieldToJson(args["pNumSubresourceTilings"], pNumSubresourceTilings, options); + FieldToJson(args["FirstSubresourceTilingToGet"], FirstSubresourceTilingToGet, options); + FieldToJson(args["pSubresourceTilingsForNonPackedMips"], pSubresourceTilingsForNonPackedMips, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device2_CheckMultisampleQualityLevels1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + UINT SampleCount, + UINT Flags, + PointerDecoder* pNumQualityLevels) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device2", object_id, "CheckMultisampleQualityLevels1"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["Format"], Format, options); + FieldToJson(args["SampleCount"], SampleCount, options); + FieldToJson(args["Flags"], Flags, options); + FieldToJson(args["pNumQualityLevels"], pNumQualityLevels, options); + } + writer_->WriteBlockEnd(); +} + +/* +** This part is generated from d3d11_3.h in Windows SDK: 10.0.20348.0 +** +*/ +void Dx12JsonConsumer::Process_ID3D11Texture2D1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Texture2D1", object_id, "GetDesc1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Texture3D1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Texture3D1", object_id, "GetDesc1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11RasterizerState2_GetDesc2( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11RasterizerState2", object_id, "GetDesc2"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc"], pDesc, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11ShaderResourceView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11ShaderResourceView1", object_id, "GetDesc1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc1"], pDesc1, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11RenderTargetView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11RenderTargetView1", object_id, "GetDesc1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc1"], pDesc1, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11UnorderedAccessView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11UnorderedAccessView1", object_id, "GetDesc1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc1"], pDesc1, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Query1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Query1", object_id, "GetDesc1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc1"], pDesc1, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext3_Flush1( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D11_CONTEXT_TYPE ContextType, + uint64_t hEvent) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext3", object_id, "Flush1"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ContextType"], ContextType, options); + FieldToJson(args["hEvent"], hEvent, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext3_SetHardwareProtectionState( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL HwProtectionEnable) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext3", object_id, "SetHardwareProtectionState"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + Bool32ToJson(args["HwProtectionEnable"], HwProtectionEnable, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext3_GetHardwareProtectionState( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pHwProtectionEnable) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext3", object_id, "GetHardwareProtectionState"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + Bool32ToJson(args["pHwProtectionEnable"], pHwProtectionEnable, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Fence_CreateSharedHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pAttributes, + DWORD dwAccess, + WStringDecoder* lpName, + PointerDecoder* pHandle) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Fence", object_id, "CreateSharedHandle"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pAttributes"], pAttributes, options); + FieldToJson(args["dwAccess"], dwAccess, options); + FieldToJson(args["lpName"], lpName, options); + FieldToJson(args["pHandle"], pHandle, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Fence_GetCompletedValue( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT64 return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Fence", object_id, "GetCompletedValue"); + const JsonOptions& options = writer_->GetOptions(); + FieldToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Fence_SetEventOnCompletion( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT64 Value, + uint64_t hEvent) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Fence", object_id, "SetEventOnCompletion"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["Value"], Value, options); + FieldToJson(args["hEvent"], hEvent, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext4_Signal( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pFence, + UINT64 Value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext4", object_id, "Signal"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pFence"], pFence, options); + FieldToJson(args["Value"], Value, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11DeviceContext4_Wait( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pFence, + UINT64 Value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11DeviceContext4", object_id, "Wait"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pFence"], pFence, options); + FieldToJson(args["Value"], Value, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device3_CreateTexture2D1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc1, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture2D) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device3", object_id, "CreateTexture2D1"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc1"], pDesc1, options); + FieldToJson(args["pInitialData"], pInitialData, options); + FieldToJson(args["ppTexture2D"], ppTexture2D, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device3_CreateTexture3D1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc1, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture3D) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device3", object_id, "CreateTexture3D1"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDesc1"], pDesc1, options); + FieldToJson(args["pInitialData"], pInitialData, options); + FieldToJson(args["ppTexture3D"], ppTexture3D, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device3_CreateRasterizerState2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device3", object_id, "CreateRasterizerState2"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pRasterizerDesc"], pRasterizerDesc, options); + FieldToJson(args["ppRasterizerState"], ppRasterizerState, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device3_CreateShaderResourceView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppSRView1) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device3", object_id, "CreateShaderResourceView1"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + FieldToJson(args["pDesc1"], pDesc1, options); + FieldToJson(args["ppSRView1"], ppSRView1, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device3_CreateUnorderedAccessView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppUAView1) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device3", object_id, "CreateUnorderedAccessView1"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + FieldToJson(args["pDesc1"], pDesc1, options); + FieldToJson(args["ppUAView1"], ppUAView1, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device3_CreateRenderTargetView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppRTView1) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device3", object_id, "CreateRenderTargetView1"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource"], pResource, options); + FieldToJson(args["pDesc1"], pDesc1, options); + FieldToJson(args["ppRTView1"], ppRTView1, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device3_CreateQuery1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pQueryDesc1, + HandlePointerDecoder* ppQuery1) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device3", object_id, "CreateQuery1"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pQueryDesc1"], pQueryDesc1, options); + FieldToJson(args["ppQuery1"], ppQuery1, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device3_GetImmediateContext3( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device3", object_id, "GetImmediateContext3"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppImmediateContext"], ppImmediateContext, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device3_CreateDeferredContext3( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device3", object_id, "CreateDeferredContext3"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ContextFlags"], ContextFlags, options); + FieldToJson(args["ppDeferredContext"], ppDeferredContext, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device3_ReadFromSubresource( + const ApiCallInfo& call_info, + format::HandleId object_id, + uint64_t pDstData, + UINT DstRowPitch, + UINT DstDepthPitch, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device3", object_id, "ReadFromSubresource"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDstData"], pDstData, options); + FieldToJson(args["DstRowPitch"], DstRowPitch, options); + FieldToJson(args["DstDepthPitch"], DstDepthPitch, options); + FieldToJson(args["pSrcResource"], pSrcResource, options); + FieldToJson(args["SrcSubresource"], SrcSubresource, options); + FieldToJson(args["pSrcBox"], pSrcBox, options); + } + writer_->WriteBlockEnd(); +} + +/* +** This part is generated from d3d11_4.h in Windows SDK: 10.0.20348.0 +** +*/ +void Dx12JsonConsumer::Process_ID3D11Device4_RegisterDeviceRemovedEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hEvent, + PointerDecoder* pdwCookie) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device4", object_id, "RegisterDeviceRemovedEvent"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["hEvent"], hEvent, options); + FieldToJson(args["pdwCookie"], pdwCookie, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device4_UnregisterDeviceRemoved( + const ApiCallInfo& call_info, + format::HandleId object_id, + DWORD dwCookie) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device4", object_id, "UnregisterDeviceRemoved"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["dwCookie"], dwCookie, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device5_OpenSharedFence( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hFence, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppFence) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device5", object_id, "OpenSharedFence"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["hFence"], hFence, options); + FieldToJson(args["ReturnedInterface"], ReturnedInterface, options); + FieldToJson(args["ppFence"], ppFence, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Device5_CreateFence( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT64 InitialValue, + D3D11_FENCE_FLAG Flags, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppFence) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Device5", object_id, "CreateFence"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["InitialValue"], InitialValue, options); + FieldToJson(args["Flags"], Flags, options); + FieldToJson(args["ReturnedInterface"], ReturnedInterface, options); + FieldToJson(args["ppFence"], ppFence, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Multithread_Enter( + const ApiCallInfo& call_info, + format::HandleId object_id) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Multithread", object_id, "Enter"); + const JsonOptions& options = writer_->GetOptions(); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Multithread_Leave( + const ApiCallInfo& call_info, + format::HandleId object_id) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Multithread", object_id, "Leave"); + const JsonOptions& options = writer_->GetOptions(); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Multithread_SetMultithreadProtected( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value, + BOOL bMTProtect) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Multithread", object_id, "SetMultithreadProtected"); + const JsonOptions& options = writer_->GetOptions(); + Bool32ToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + Bool32ToJson(args["bMTProtect"], bMTProtect, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11Multithread_GetMultithreadProtected( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11Multithread", object_id, "GetMultithreadProtected"); + const JsonOptions& options = writer_->GetOptions(); + Bool32ToJson(method[format::kNameReturn], return_value, options); + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + PointerDecoder* pHDRMetaData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext2", object_id, "VideoProcessorSetOutputHDRMetaData"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["Type"], Type, options); + FieldToJson(args["Size"], Size, options); + FieldToJson(args["pHDRMetaData"], pHDRMetaData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pType, + UINT Size, + PointerDecoder* pMetaData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext2", object_id, "VideoProcessorGetOutputHDRMetaData"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["pType"], pType, options); + FieldToJson(args["Size"], Size, options); + FieldToJson(args["pMetaData"], pMetaData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + PointerDecoder* pHDRMetaData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext2", object_id, "VideoProcessorSetStreamHDRMetaData"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["Type"], Type, options); + FieldToJson(args["Size"], Size, options); + FieldToJson(args["pHDRMetaData"], pHDRMetaData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pType, + UINT Size, + PointerDecoder* pMetaData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext2", object_id, "VideoProcessorGetStreamHDRMetaData"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pVideoProcessor"], pVideoProcessor, options); + FieldToJson(args["StreamIndex"], StreamIndex, options); + FieldToJson(args["pType"], pType, options); + FieldToJson(args["Size"], Size, options); + FieldToJson(args["pMetaData"], pMetaData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice2_CheckFeatureSupport( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_FEATURE_VIDEO Feature, + PointerDecoder* pFeatureSupportData, + UINT FeatureSupportDataSize) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice2", object_id, "CheckFeatureSupport"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["Feature"], Feature, options); + FieldToJson(args["pFeatureSupportData"], pFeatureSupportData, options); + FieldToJson(args["FeatureSupportDataSize"], FeatureSupportDataSize, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS flags, + UINT DataSize, + PointerDecoder* pData) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoDevice2", object_id, "NegotiateCryptoSessionKeyExchangeMT"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pCryptoSession"], pCryptoSession, options); + FieldToJson_D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS(args["flags"], flags, options); + FieldToJson(args["DataSize"], DataSize, options); + FieldToJson(args["pData"], pData, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext3_DecoderBeginFrame1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + format::HandleId pView, + UINT ContentKeySize, + PointerDecoder* pContentKey, + UINT NumComponentHistograms, + PointerDecoder* pHistogramOffsets, + HandlePointerDecoder* ppHistogramBuffers) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext3", object_id, "DecoderBeginFrame1"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDecoder"], pDecoder, options); + FieldToJson(args["pView"], pView, options); + FieldToJson(args["ContentKeySize"], ContentKeySize, options); + FieldToJson(args["pContentKey"], pContentKey, options); + FieldToJson(args["NumComponentHistograms"], NumComponentHistograms, options); + FieldToJson(args["pHistogramOffsets"], pHistogramOffsets, options); + FieldToJson(args["ppHistogramBuffers"], ppHistogramBuffers, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11VideoContext3_SubmitDecoderBuffers2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11VideoContext3", object_id, "SubmitDecoderBuffers2"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pDecoder"], pDecoder, options); + FieldToJson(args["NumBuffers"], NumBuffers, options); + FieldToJson(args["pBufferDesc"], pBufferDesc, options); + } + writer_->WriteBlockEnd(); +} + +/* +** This part is generated from d3d11on12.h in Windows SDK: 10.0.20348.0 +** +*/ +void Dx12JsonConsumer::Process_D3D11On12CreateDevice( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pDevice, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + HandlePointerDecoder* ppCommandQueues, + UINT NumQueues, + UINT NodeMask, + HandlePointerDecoder* ppDevice, + HandlePointerDecoder* ppImmediateContext, + PointerDecoder* pChosenFeatureLevel) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& function = writer_->WriteApiCallStart(call_info, "D3D11On12CreateDevice"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(function[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = function[format::kNameArgs]; + { + FieldToJson(args["pDevice"], pDevice, options); + FieldToJson(args["Flags"], Flags, options); + FieldToJson(args["pFeatureLevels"], pFeatureLevels, options); + FieldToJson(args["FeatureLevels"], FeatureLevels, options); + FieldToJson(args["ppCommandQueues"], ppCommandQueues, options); + FieldToJson(args["NumQueues"], NumQueues, options); + FieldToJsonAsFixedWidthBinary(args["NodeMask"], NodeMask, options); + FieldToJson(args["ppDevice"], ppDevice, options); + FieldToJson(args["ppImmediateContext"], ppImmediateContext, options); + FieldToJson(args["pChosenFeatureLevel"], pChosenFeatureLevel, options); + } + writer_->WriteBlockEnd(); + +} + +void Dx12JsonConsumer::Process_ID3D11On12Device_CreateWrappedResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource12, + StructPointerDecoder* pFlags11, + D3D12_RESOURCE_STATES InState, + D3D12_RESOURCE_STATES OutState, + Decoded_GUID riid, + HandlePointerDecoder* ppResource11) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11On12Device", object_id, "CreateWrappedResource"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource12"], pResource12, options); + FieldToJson(args["pFlags11"], pFlags11, options); + FieldToJson_D3D12_RESOURCE_STATES(args["InState"], InState, options); + FieldToJson_D3D12_RESOURCE_STATES(args["OutState"], OutState, options); + FieldToJson(args["riid"], riid, options); + FieldToJson(args["ppResource11"], ppResource11, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11On12Device_ReleaseWrappedResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResources, + UINT NumResources) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11On12Device", object_id, "ReleaseWrappedResources"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppResources"], ppResources, options); + FieldToJson(args["NumResources"], NumResources, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11On12Device_AcquireWrappedResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResources, + UINT NumResources) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11On12Device", object_id, "AcquireWrappedResources"); + const JsonOptions& options = writer_->GetOptions(); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["ppResources"], ppResources, options); + FieldToJson(args["NumResources"], NumResources, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11On12Device1_GetD3D12Device( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID riid, + HandlePointerDecoder* ppvDevice) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11On12Device1", object_id, "GetD3D12Device"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["riid"], riid, options); + FieldToJson(args["ppvDevice"], ppvDevice, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11On12Device2_UnwrapUnderlyingResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource11, + format::HandleId pCommandQueue, + Decoded_GUID riid, + HandlePointerDecoder* ppvResource12) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11On12Device2", object_id, "UnwrapUnderlyingResource"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource11"], pResource11, options); + FieldToJson(args["pCommandQueue"], pCommandQueue, options); + FieldToJson(args["riid"], riid, options); + FieldToJson(args["ppvResource12"], ppvResource12, options); + } + writer_->WriteBlockEnd(); +} + +void Dx12JsonConsumer::Process_ID3D11On12Device2_ReturnUnderlyingResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource11, + UINT NumSync, + PointerDecoder* pSignalValues, + HandlePointerDecoder* ppFences) +{ + using namespace gfxrecon::util; + + nlohmann::ordered_json& method = writer_->WriteApiCallStart(call_info, "ID3D11On12Device2", object_id, "ReturnUnderlyingResource"); + const JsonOptions& options = writer_->GetOptions(); + HresultToJson(method[format::kNameReturn], return_value, options); + nlohmann::ordered_json& args = method[format::kNameArgs]; + { + FieldToJson(args["pResource11"], pResource11, options); + FieldToJson(args["NumSync"], NumSync, options); + FieldToJson(args["pSignalValues"], pSignalValues, options); + FieldToJson(args["ppFences"], ppFences, options); + } + writer_->WriteBlockEnd(); +} + /* ** This part is generated from Unknwnbase.h in Windows SDK: 10.0.20348.0 ** diff --git a/framework/generated/generated_dx12_json_consumer.h b/framework/generated/generated_dx12_json_consumer.h index 6c552ce28f..236cc0c093 100644 --- a/framework/generated/generated_dx12_json_consumer.h +++ b/framework/generated/generated_dx12_json_consumer.h @@ -3388,6 +3388,2833 @@ class Dx12JsonConsumer : public Dx12JsonConsumerBase HRESULT return_value, DWORD CallbackCookie) override; +/* +** This part is generated from d3d11.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_D3D11CreateDevice( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pAdapter, + D3D_DRIVER_TYPE DriverType, + uint64_t Software, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + HandlePointerDecoder* ppDevice, + PointerDecoder* pFeatureLevel, + HandlePointerDecoder* ppImmediateContext) override; + + virtual void Process_D3D11CreateDeviceAndSwapChain( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pAdapter, + D3D_DRIVER_TYPE DriverType, + uint64_t Software, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + StructPointerDecoder* pSwapChainDesc, + HandlePointerDecoder* ppSwapChain, + HandlePointerDecoder* ppDevice, + PointerDecoder* pFeatureLevel, + HandlePointerDecoder* ppImmediateContext) override; + + virtual void Process_ID3D11DeviceChild_GetDevice( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDevice) override; + + virtual void Process_ID3D11DeviceChild_GetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + PointerDecoder* pDataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11DeviceChild_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11DeviceChild_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData) override; + + virtual void Process_ID3D11DepthStencilState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11BlendState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11RasterizerState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11Resource_GetType( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pResourceDimension) override; + + virtual void Process_ID3D11Resource_SetEvictionPriority( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT EvictionPriority) override; + + virtual void Process_ID3D11Resource_GetEvictionPriority( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) override; + + virtual void Process_ID3D11Buffer_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11Texture1D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11Texture2D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11Texture3D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11View_GetResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResource) override; + + virtual void Process_ID3D11ShaderResourceView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11RenderTargetView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11DepthStencilView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11UnorderedAccessView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11SamplerState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11Asynchronous_GetDataSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) override; + + virtual void Process_ID3D11Query_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11Counter_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11ClassInstance_GetClassLinkage( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppLinkage) override; + + virtual void Process_ID3D11ClassInstance_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11ClassInstance_GetInstanceName( + const ApiCallInfo& call_info, + format::HandleId object_id, + StringDecoder* pInstanceName, + PointerDecoder* pBufferLength) override; + + virtual void Process_ID3D11ClassInstance_GetTypeName( + const ApiCallInfo& call_info, + format::HandleId object_id, + StringDecoder* pTypeName, + PointerDecoder* pBufferLength) override; + + virtual void Process_ID3D11ClassLinkage_GetClassInstance( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StringDecoder* pClassInstanceName, + UINT InstanceIndex, + HandlePointerDecoder* ppInstance) override; + + virtual void Process_ID3D11ClassLinkage_CreateClassInstance( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StringDecoder* pClassTypeName, + UINT ConstantBufferOffset, + UINT ConstantVectorOffset, + UINT TextureOffset, + UINT SamplerOffset, + HandlePointerDecoder* ppInstance) override; + + virtual void Process_ID3D11CommandList_GetContextFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) override; + + virtual void Process_ID3D11DeviceContext_VSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_PSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_PSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pPixelShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_PSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_VSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVertexShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_DrawIndexed( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT IndexCount, + UINT StartIndexLocation, + INT BaseVertexLocation) override; + + virtual void Process_ID3D11DeviceContext_Draw( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT VertexCount, + UINT StartVertexLocation) override; + + virtual void Process_ID3D11DeviceContext_Map( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + UINT Subresource, + D3D11_MAP MapType, + UINT MapFlags, + StructPointerDecoder* pMappedResource) override; + + virtual void Process_ID3D11DeviceContext_Unmap( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource, + UINT Subresource) override; + + virtual void Process_ID3D11DeviceContext_PSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_IASetInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pInputLayout) override; + + virtual void Process_ID3D11DeviceContext_IASetVertexBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppVertexBuffers, + PointerDecoder* pStrides, + PointerDecoder* pOffsets) override; + + virtual void Process_ID3D11DeviceContext_IASetIndexBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pIndexBuffer, + DXGI_FORMAT Format, + UINT Offset) override; + + virtual void Process_ID3D11DeviceContext_DrawIndexedInstanced( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT IndexCountPerInstance, + UINT InstanceCount, + UINT StartIndexLocation, + INT BaseVertexLocation, + UINT StartInstanceLocation) override; + + virtual void Process_ID3D11DeviceContext_DrawInstanced( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT VertexCountPerInstance, + UINT InstanceCount, + UINT StartVertexLocation, + UINT StartInstanceLocation) override; + + virtual void Process_ID3D11DeviceContext_GSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_GSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_IASetPrimitiveTopology( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D_PRIMITIVE_TOPOLOGY Topology) override; + + virtual void Process_ID3D11DeviceContext_VSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_VSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_Begin( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pAsync) override; + + virtual void Process_ID3D11DeviceContext_End( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pAsync) override; + + virtual void Process_ID3D11DeviceContext_GetData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pAsync, + PointerDecoder* pData, + UINT DataSize, + UINT GetDataFlags) override; + + virtual void Process_ID3D11DeviceContext_SetPredication( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pPredicate, + BOOL PredicateValue) override; + + virtual void Process_ID3D11DeviceContext_GSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_GSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_OMSetRenderTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViews, + HandlePointerDecoder* ppRenderTargetViews, + format::HandleId pDepthStencilView) override; + + virtual void Process_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRTVs, + HandlePointerDecoder* ppRenderTargetViews, + format::HandleId pDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews, + PointerDecoder* pUAVInitialCounts) override; + + virtual void Process_ID3D11DeviceContext_OMSetBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBlendState, + PointerDecoder BlendFactor [4], + UINT SampleMask) override; + + virtual void Process_ID3D11DeviceContext_OMSetDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDepthStencilState, + UINT StencilRef) override; + + virtual void Process_ID3D11DeviceContext_SOSetTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumBuffers, + HandlePointerDecoder* ppSOTargets, + PointerDecoder* pOffsets) override; + + virtual void Process_ID3D11DeviceContext_DrawAuto( + const ApiCallInfo& call_info, + format::HandleId object_id) override; + + virtual void Process_ID3D11DeviceContext_DrawIndexedInstancedIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs) override; + + virtual void Process_ID3D11DeviceContext_DrawInstancedIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs) override; + + virtual void Process_ID3D11DeviceContext_Dispatch( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT ThreadGroupCountX, + UINT ThreadGroupCountY, + UINT ThreadGroupCountZ) override; + + virtual void Process_ID3D11DeviceContext_DispatchIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs) override; + + virtual void Process_ID3D11DeviceContext_RSSetState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pRasterizerState) override; + + virtual void Process_ID3D11DeviceContext_RSSetViewports( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViewports, + StructPointerDecoder* pViewports) override; + + virtual void Process_ID3D11DeviceContext_RSSetScissorRects( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRects, + StructPointerDecoder* pRects) override; + + virtual void Process_ID3D11DeviceContext_CopySubresourceRegion( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox) override; + + virtual void Process_ID3D11DeviceContext_CopyResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + format::HandleId pSrcResource) override; + + virtual void Process_ID3D11DeviceContext_CopyStructureCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstBuffer, + UINT DstAlignedByteOffset, + format::HandleId pSrcView) override; + + virtual void Process_ID3D11DeviceContext_ClearRenderTargetView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pRenderTargetView, + PointerDecoder ColorRGBA [4]) override; + + virtual void Process_ID3D11DeviceContext_ClearUnorderedAccessViewUint( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pUnorderedAccessView, + PointerDecoder Values [4]) override; + + virtual void Process_ID3D11DeviceContext_ClearUnorderedAccessViewFloat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pUnorderedAccessView, + PointerDecoder Values [4]) override; + + virtual void Process_ID3D11DeviceContext_ClearDepthStencilView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDepthStencilView, + UINT ClearFlags, + FLOAT Depth, + UINT8 Stencil) override; + + virtual void Process_ID3D11DeviceContext_GenerateMips( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pShaderResourceView) override; + + virtual void Process_ID3D11DeviceContext_SetResourceMinLOD( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource, + FLOAT MinLOD) override; + + virtual void Process_ID3D11DeviceContext_GetResourceMinLOD( + const ApiCallInfo& call_info, + format::HandleId object_id, + FLOAT return_value, + format::HandleId pResource) override; + + virtual void Process_ID3D11DeviceContext_ResolveSubresource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + format::HandleId pSrcResource, + UINT SrcSubresource, + DXGI_FORMAT Format) override; + + virtual void Process_ID3D11DeviceContext_ExecuteCommandList( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCommandList, + BOOL RestoreContextState) override; + + virtual void Process_ID3D11DeviceContext_HSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_HSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pHullShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_HSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_HSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_DSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_DSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDomainShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_DSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_DSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_CSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_CSSetUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews, + PointerDecoder* pUAVInitialCounts) override; + + virtual void Process_ID3D11DeviceContext_CSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pComputeShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_CSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_CSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_VSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_PSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_PSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppPixelShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_PSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_VSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppVertexShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_PSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_IAGetInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppInputLayout) override; + + virtual void Process_ID3D11DeviceContext_IAGetVertexBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppVertexBuffers, + PointerDecoder* pStrides, + PointerDecoder* pOffsets) override; + + virtual void Process_ID3D11DeviceContext_IAGetIndexBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* pIndexBuffer, + PointerDecoder* Format, + PointerDecoder* Offset) override; + + virtual void Process_ID3D11DeviceContext_GSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_GSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppGeometryShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_IAGetPrimitiveTopology( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pTopology) override; + + virtual void Process_ID3D11DeviceContext_VSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_VSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_GetPredication( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppPredicate, + PointerDecoder* pPredicateValue) override; + + virtual void Process_ID3D11DeviceContext_GSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_GSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_OMGetRenderTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViews, + HandlePointerDecoder* ppRenderTargetViews, + HandlePointerDecoder* ppDepthStencilView) override; + + virtual void Process_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRTVs, + HandlePointerDecoder* ppRenderTargetViews, + HandlePointerDecoder* ppDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews) override; + + virtual void Process_ID3D11DeviceContext_OMGetBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppBlendState, + PointerDecoder BlendFactor [4], + PointerDecoder* pSampleMask) override; + + virtual void Process_ID3D11DeviceContext_OMGetDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDepthStencilState, + PointerDecoder* pStencilRef) override; + + virtual void Process_ID3D11DeviceContext_SOGetTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumBuffers, + HandlePointerDecoder* ppSOTargets) override; + + virtual void Process_ID3D11DeviceContext_RSGetState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppRasterizerState) override; + + virtual void Process_ID3D11DeviceContext_RSGetViewports( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pNumViewports, + StructPointerDecoder* pViewports) override; + + virtual void Process_ID3D11DeviceContext_RSGetScissorRects( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pNumRects, + StructPointerDecoder* pRects) override; + + virtual void Process_ID3D11DeviceContext_HSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_HSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppHullShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_HSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_HSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_DSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_DSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDomainShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_DSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_DSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_CSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_CSGetUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews) override; + + virtual void Process_ID3D11DeviceContext_CSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppComputeShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_CSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_CSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_ClearState( + const ApiCallInfo& call_info, + format::HandleId object_id) override; + + virtual void Process_ID3D11DeviceContext_Flush( + const ApiCallInfo& call_info, + format::HandleId object_id) override; + + virtual void Process_ID3D11DeviceContext_GetType( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D11_DEVICE_CONTEXT_TYPE return_value) override; + + virtual void Process_ID3D11DeviceContext_GetContextFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) override; + + virtual void Process_ID3D11DeviceContext_FinishCommandList( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + BOOL RestoreDeferredContextState, + HandlePointerDecoder* ppCommandList) override; + + virtual void Process_ID3D11VideoDecoder_GetCreationParameters( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pVideoDesc, + StructPointerDecoder* pConfig) override; + + virtual void Process_ID3D11VideoDecoder_GetDriverHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pDriverHandle) override; + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pContentDesc) override; + + virtual void Process_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + PointerDecoder* pFlags) override; + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCaps) override; + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT TypeIndex, + StructPointerDecoder* pCaps) override; + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT TypeIndex, + UINT CustomRateIndex, + StructPointerDecoder* pRate) override; + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + StructPointerDecoder* pRange) override; + + virtual void Process_ID3D11VideoProcessor_GetContentDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11VideoProcessor_GetRateConversionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCaps) override; + + virtual void Process_ID3D11AuthenticatedChannel_GetCertificateSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pCertificateSize) override; + + virtual void Process_ID3D11AuthenticatedChannel_GetCertificate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT CertificateSize, + PointerDecoder* pCertificate) override; + + virtual void Process_ID3D11AuthenticatedChannel_GetChannelHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pChannelHandle) override; + + virtual void Process_ID3D11CryptoSession_GetCryptoType( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCryptoType) override; + + virtual void Process_ID3D11CryptoSession_GetDecoderProfile( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDecoderProfile) override; + + virtual void Process_ID3D11CryptoSession_GetCertificateSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pCertificateSize) override; + + virtual void Process_ID3D11CryptoSession_GetCertificate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT CertificateSize, + PointerDecoder* pCertificate) override; + + virtual void Process_ID3D11CryptoSession_GetCryptoSessionHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pCryptoSessionHandle) override; + + virtual void Process_ID3D11VideoDecoderOutputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11VideoProcessorInputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11VideoProcessorOutputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11VideoContext_GetDecoderBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type, + PointerDecoder* pBufferSize, + PointerDecoder* ppBuffer) override; + + virtual void Process_ID3D11VideoContext_ReleaseDecoderBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type) override; + + virtual void Process_ID3D11VideoContext_DecoderBeginFrame( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + format::HandleId pView, + UINT ContentKeySize, + PointerDecoder* pContentKey) override; + + virtual void Process_ID3D11VideoContext_DecoderEndFrame( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder) override; + + virtual void Process_ID3D11VideoContext_SubmitDecoderBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc) override; + + virtual void Process_ID3D11VideoContext_DecoderExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + StructPointerDecoder* pExtensionData) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputTargetRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable, + StructPointerDecoder* pRect) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL YCbCr, + StructPointerDecoder* pColor) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + StructPointerDecoder* pColorSpace) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE AlphaFillMode, + UINT StreamIndex) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputConstriction( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable, + Decoded_tagSIZE Size) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputStereoMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + uint64_t pData) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputTargetRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* Enabled, + StructPointerDecoder* pRect) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pYCbCr, + StructPointerDecoder* pColor) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + StructPointerDecoder* pColorSpace) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pAlphaFillMode, + PointerDecoder* pStreamIndex) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputConstriction( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pEnabled, + StructPointerDecoder* pSize) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputStereoMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pEnabled) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_FRAME_FORMAT FrameFormat) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pColorSpace) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamOutputRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate, + BOOL RepeatFrame, + StructPointerDecoder* pCustomRate) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamSourceRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pRect) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamDestRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pRect) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamAlpha( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Alpha) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamPalette( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + UINT Count, + PointerDecoder* pEntries) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pSourceAspectRatio, + StructPointerDecoder* pDestinationAspectRatio) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamLumaKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Lower, + FLOAT Upper) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT Format, + BOOL LeftViewFrame0, + BOOL BaseViewFrame0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode, + int MonoOffset) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamFilter( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + BOOL Enable, + int Level) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + uint64_t pData) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pFrameFormat) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pColorSpace) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamOutputRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pOutputRate, + PointerDecoder* pRepeatFrame, + StructPointerDecoder* pCustomRate) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamSourceRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pRect) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamDestRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pRect) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamAlpha( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + PointerDecoder* pAlpha) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamPalette( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + UINT Count, + PointerDecoder* pEntries) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pSourceAspectRatio, + StructPointerDecoder* pDestinationAspectRatio) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamLumaKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + PointerDecoder* pLower, + PointerDecoder* pUpper) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pFormat, + PointerDecoder* pLeftViewFrame0, + PointerDecoder* pBaseViewFrame0, + PointerDecoder* pFlipMode, + PointerDecoder* MonoOffset) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamFilter( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + PointerDecoder* pEnabled, + PointerDecoder* pLevel) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + format::HandleId pView, + UINT OutputFrame, + UINT StreamCount, + StructPointerDecoder* pStreams) override; + + virtual void Process_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11VideoContext_EncryptionBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + format::HandleId pSrcSurface, + format::HandleId pDstSurface, + UINT IVSize, + PointerDecoder* pIV) override; + + virtual void Process_ID3D11VideoContext_DecryptionBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + format::HandleId pSrcSurface, + format::HandleId pDstSurface, + StructPointerDecoder* pEncryptedBlockInfo, + UINT ContentKeySize, + PointerDecoder* pContentKey, + UINT IVSize, + PointerDecoder* pIV) override; + + virtual void Process_ID3D11VideoContext_StartSessionKeyRefresh( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + UINT RandomNumberSize, + PointerDecoder* pRandomNumber) override; + + virtual void Process_ID3D11VideoContext_FinishSessionKeyRefresh( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession) override; + + virtual void Process_ID3D11VideoContext_GetEncryptionBltKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT KeySize, + PointerDecoder* pReadbackKey) override; + + virtual void Process_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11VideoContext_QueryAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT InputSize, + PointerDecoder* pInput, + UINT OutputSize, + PointerDecoder* pOutput) override; + + virtual void Process_ID3D11VideoContext_ConfigureAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT InputSize, + PointerDecoder* pInput, + StructPointerDecoder* pOutput) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamRotation( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_ROTATION Rotation) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamRotation( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pRotation) override; + + virtual void Process_ID3D11VideoDevice_CreateVideoDecoder( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pVideoDesc, + StructPointerDecoder* pConfig, + HandlePointerDecoder* ppDecoder) override; + + virtual void Process_ID3D11VideoDevice_CreateVideoProcessor( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pEnum, + UINT RateConversionIndex, + HandlePointerDecoder* ppVideoProcessor) override; + + virtual void Process_ID3D11VideoDevice_CreateAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType, + HandlePointerDecoder* ppAuthenticatedChannel) override; + + virtual void Process_ID3D11VideoDevice_CreateCryptoSession( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pKeyExchangeType, + HandlePointerDecoder* ppCryptoSession) override; + + virtual void Process_ID3D11VideoDevice_CreateVideoDecoderOutputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVDOVView) override; + + virtual void Process_ID3D11VideoDevice_CreateVideoProcessorInputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + format::HandleId pEnum, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVPIView) override; + + virtual void Process_ID3D11VideoDevice_CreateVideoProcessorOutputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + format::HandleId pEnum, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVPOView) override; + + virtual void Process_ID3D11VideoDevice_CreateVideoProcessorEnumerator( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppEnum) override; + + virtual void Process_ID3D11VideoDevice_GetVideoDecoderProfileCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) override; + + virtual void Process_ID3D11VideoDevice_GetVideoDecoderProfile( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT Index, + StructPointerDecoder* pDecoderProfile) override; + + virtual void Process_ID3D11VideoDevice_CheckVideoDecoderFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDecoderProfile, + DXGI_FORMAT Format, + PointerDecoder* pSupported) override; + + virtual void Process_ID3D11VideoDevice_GetVideoDecoderConfigCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + PointerDecoder* pCount) override; + + virtual void Process_ID3D11VideoDevice_GetVideoDecoderConfig( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + UINT Index, + StructPointerDecoder* pConfig) override; + + virtual void Process_ID3D11VideoDevice_GetContentProtectionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pCaps) override; + + virtual void Process_ID3D11VideoDevice_CheckCryptoKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + UINT Index, + StructPointerDecoder* pKeyExchangeType) override; + + virtual void Process_ID3D11VideoDevice_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11VideoDevice_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData) override; + + virtual void Process_ID3D11Device_CreateBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppBuffer) override; + + virtual void Process_ID3D11Device_CreateTexture1D( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture1D) override; + + virtual void Process_ID3D11Device_CreateTexture2D( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture2D) override; + + virtual void Process_ID3D11Device_CreateTexture3D( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture3D) override; + + virtual void Process_ID3D11Device_CreateShaderResourceView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppSRView) override; + + virtual void Process_ID3D11Device_CreateUnorderedAccessView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppUAView) override; + + virtual void Process_ID3D11Device_CreateRenderTargetView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppRTView) override; + + virtual void Process_ID3D11Device_CreateDepthStencilView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppDepthStencilView) override; + + virtual void Process_ID3D11Device_CreateInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputElementDescs, + UINT NumElements, + PointerDecoder* pShaderBytecodeWithInputSignature, + SIZE_T BytecodeLength, + HandlePointerDecoder* ppInputLayout) override; + + virtual void Process_ID3D11Device_CreateVertexShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppVertexShader) override; + + virtual void Process_ID3D11Device_CreateGeometryShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppGeometryShader) override; + + virtual void Process_ID3D11Device_CreateGeometryShaderWithStreamOutput( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + StructPointerDecoder* pSODeclaration, + UINT NumEntries, + PointerDecoder* pBufferStrides, + UINT NumStrides, + UINT RasterizedStream, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppGeometryShader) override; + + virtual void Process_ID3D11Device_CreatePixelShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppPixelShader) override; + + virtual void Process_ID3D11Device_CreateHullShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppHullShader) override; + + virtual void Process_ID3D11Device_CreateDomainShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppDomainShader) override; + + virtual void Process_ID3D11Device_CreateComputeShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppComputeShader) override; + + virtual void Process_ID3D11Device_CreateClassLinkage( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + HandlePointerDecoder* ppLinkage) override; + + virtual void Process_ID3D11Device_CreateBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pBlendStateDesc, + HandlePointerDecoder* ppBlendState) override; + + virtual void Process_ID3D11Device_CreateDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDepthStencilDesc, + HandlePointerDecoder* ppDepthStencilState) override; + + virtual void Process_ID3D11Device_CreateRasterizerState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState) override; + + virtual void Process_ID3D11Device_CreateSamplerState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pSamplerDesc, + HandlePointerDecoder* ppSamplerState) override; + + virtual void Process_ID3D11Device_CreateQuery( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pQueryDesc, + HandlePointerDecoder* ppQuery) override; + + virtual void Process_ID3D11Device_CreatePredicate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pPredicateDesc, + HandlePointerDecoder* ppPredicate) override; + + virtual void Process_ID3D11Device_CreateCounter( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCounterDesc, + HandlePointerDecoder* ppCounter) override; + + virtual void Process_ID3D11Device_CreateDeferredContext( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) override; + + virtual void Process_ID3D11Device_OpenSharedResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hResource, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppResource) override; + + virtual void Process_ID3D11Device_CheckFormatSupport( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + PointerDecoder* pFormatSupport) override; + + virtual void Process_ID3D11Device_CheckMultisampleQualityLevels( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + UINT SampleCount, + PointerDecoder* pNumQualityLevels) override; + + virtual void Process_ID3D11Device_CheckCounterInfo( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCounterInfo) override; + + virtual void Process_ID3D11Device_CheckCounter( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + PointerDecoder* pType, + PointerDecoder* pActiveCounters, + StringDecoder* szName, + PointerDecoder* pNameLength, + StringDecoder* szUnits, + PointerDecoder* pUnitsLength, + StringDecoder* szDescription, + PointerDecoder* pDescriptionLength) override; + + virtual void Process_ID3D11Device_GetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + PointerDecoder* pDataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11Device_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11Device_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData) override; + + virtual void Process_ID3D11Device_GetFeatureLevel( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D_FEATURE_LEVEL return_value) override; + + virtual void Process_ID3D11Device_GetCreationFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) override; + + virtual void Process_ID3D11Device_GetDeviceRemovedReason( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value) override; + + virtual void Process_ID3D11Device_GetImmediateContext( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) override; + + virtual void Process_ID3D11Device_SetExceptionMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT RaiseFlags) override; + + virtual void Process_ID3D11Device_GetExceptionMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) override; + +/* +** This part is generated from d3d11_1.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_ID3D11BlendState1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11RasterizerState1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11DeviceContext1_CopySubresourceRegion1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox, + UINT CopyFlags) override; + + virtual void Process_ID3D11DeviceContext1_DiscardResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource) override; + + virtual void Process_ID3D11DeviceContext1_DiscardView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResourceView) override; + + virtual void Process_ID3D11DeviceContext1_VSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_HSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_DSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_GSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_PSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_CSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_VSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_HSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_DSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_GSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_PSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_CSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_SwapDeviceContextState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pState, + HandlePointerDecoder* ppPreviousState) override; + + virtual void Process_ID3D11DeviceContext1_ClearView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pView, + PointerDecoder Color [4], + StructPointerDecoder* pRect, + UINT NumRects) override; + + virtual void Process_ID3D11DeviceContext1_DiscardView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResourceView, + StructPointerDecoder* pRects, + UINT NumRects) override; + + virtual void Process_ID3D11VideoContext1_SubmitDecoderBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc) override; + + virtual void Process_ID3D11VideoContext1_GetDataForNewHardwareKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT PrivateInputSize, + PointerDecoder* pPrivatInputData, + PointerDecoder* pPrivateOutputData) override; + + virtual void Process_ID3D11VideoContext1_CheckCryptoSessionStatus( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + PointerDecoder* pStatus) override; + + virtual void Process_ID3D11VideoContext1_DecoderEnableDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pOutputDesc, + UINT ReferenceFrameCount) override; + + virtual void Process_ID3D11VideoContext1_DecoderUpdateDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + StructPointerDecoder* pOutputDesc) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + DXGI_COLOR_SPACE_TYPE ColorSpace) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL ShaderUsage) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pColorSpace) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pShaderUsage) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + DXGI_COLOR_SPACE_TYPE ColorSpace) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorSetStreamMirror( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + BOOL FlipHorizontal, + BOOL FlipVertical) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pColorSpace) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetStreamMirror( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pFlipHorizontal, + PointerDecoder* pFlipVertical) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetBehaviorHints( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT OutputWidth, + UINT OutputHeight, + DXGI_FORMAT OutputFormat, + UINT StreamCount, + StructPointerDecoder* pStreams, + PointerDecoder* pBehaviorHints) override; + + virtual void Process_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pKeyExchangeType, + PointerDecoder* pPrivateInputSize, + PointerDecoder* pPrivateOutputSize) override; + + virtual void Process_ID3D11VideoDevice1_GetVideoDecoderCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDecoderProfile, + UINT SampleWidth, + UINT SampleHeight, + StructPointerDecoder* pFrameRate, + UINT BitRate, + StructPointerDecoder* pCryptoType, + PointerDecoder* pDecoderCaps) override; + + virtual void Process_ID3D11VideoDevice1_CheckVideoDecoderDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pInputConfig, + StructPointerDecoder* pFrameRate, + StructPointerDecoder* pOutputDesc, + PointerDecoder* pSupported, + PointerDecoder* pRealTimeHint) override; + + virtual void Process_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pInputConfig, + StructPointerDecoder* pFrameRate, + StructPointerDecoder* pRecommendedOutputDesc) override; + + virtual void Process_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT InputFormat, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + DXGI_FORMAT OutputFormat, + DXGI_COLOR_SPACE_TYPE OutputColorSpace, + PointerDecoder* pSupported) override; + + virtual void Process_ID3D11Device1_GetImmediateContext1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) override; + + virtual void Process_ID3D11Device1_CreateDeferredContext1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) override; + + virtual void Process_ID3D11Device1_CreateBlendState1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pBlendStateDesc, + HandlePointerDecoder* ppBlendState) override; + + virtual void Process_ID3D11Device1_CreateRasterizerState1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState) override; + + virtual void Process_ID3D11Device1_CreateDeviceContextState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + Decoded_GUID EmulatedInterface, + PointerDecoder* pChosenFeatureLevel, + HandlePointerDecoder* ppContextState) override; + + virtual void Process_ID3D11Device1_OpenSharedResource1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hResource, + Decoded_GUID returnedInterface, + HandlePointerDecoder* ppResource) override; + + virtual void Process_ID3D11Device1_OpenSharedResourceByName( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + WStringDecoder* lpName, + DWORD dwDesiredAccess, + Decoded_GUID returnedInterface, + HandlePointerDecoder* ppResource) override; + + virtual void Process_ID3DUserDefinedAnnotation_BeginEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + INT return_value, + WStringDecoder* Name) override; + + virtual void Process_ID3DUserDefinedAnnotation_EndEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + INT return_value) override; + + virtual void Process_ID3DUserDefinedAnnotation_SetMarker( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* Name) override; + + virtual void Process_ID3DUserDefinedAnnotation_GetStatus( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value) override; + +/* +** This part is generated from d3d11_2.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_ID3D11DeviceContext2_UpdateTileMappings( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pTiledResource, + UINT NumTiledResourceRegions, + StructPointerDecoder* pTiledResourceRegionStartCoordinates, + StructPointerDecoder* pTiledResourceRegionSizes, + format::HandleId pTilePool, + UINT NumRanges, + PointerDecoder* pRangeFlags, + PointerDecoder* pTilePoolStartOffsets, + PointerDecoder* pRangeTileCounts, + UINT Flags) override; + + virtual void Process_ID3D11DeviceContext2_CopyTileMappings( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDestTiledResource, + StructPointerDecoder* pDestRegionStartCoordinate, + format::HandleId pSourceTiledResource, + StructPointerDecoder* pSourceRegionStartCoordinate, + StructPointerDecoder* pTileRegionSize, + UINT Flags) override; + + virtual void Process_ID3D11DeviceContext2_CopyTiles( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResource, + StructPointerDecoder* pTileRegionStartCoordinate, + StructPointerDecoder* pTileRegionSize, + format::HandleId pBuffer, + UINT64 BufferStartOffsetInBytes, + UINT Flags) override; + + virtual void Process_ID3D11DeviceContext2_UpdateTiles( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDestTiledResource, + StructPointerDecoder* pDestTileRegionStartCoordinate, + StructPointerDecoder* pDestTileRegionSize, + uint64_t pSourceTileData, + UINT Flags) override; + + virtual void Process_ID3D11DeviceContext2_ResizeTilePool( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pTilePool, + UINT64 NewSizeInBytes) override; + + virtual void Process_ID3D11DeviceContext2_TiledResourceBarrier( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResourceOrViewAccessBeforeBarrier, + format::HandleId pTiledResourceOrViewAccessAfterBarrier) override; + + virtual void Process_ID3D11DeviceContext2_IsAnnotationEnabled( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value) override; + + virtual void Process_ID3D11DeviceContext2_SetMarkerInt( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* pLabel, + INT Data) override; + + virtual void Process_ID3D11DeviceContext2_BeginEventInt( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* pLabel, + INT Data) override; + + virtual void Process_ID3D11DeviceContext2_EndEvent( + const ApiCallInfo& call_info, + format::HandleId object_id) override; + + virtual void Process_ID3D11Device2_GetImmediateContext2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) override; + + virtual void Process_ID3D11Device2_CreateDeferredContext2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) override; + + virtual void Process_ID3D11Device2_GetResourceTiling( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResource, + PointerDecoder* pNumTilesForEntireResource, + StructPointerDecoder* pPackedMipDesc, + StructPointerDecoder* pStandardTileShapeForNonPackedMips, + PointerDecoder* pNumSubresourceTilings, + UINT FirstSubresourceTilingToGet, + StructPointerDecoder* pSubresourceTilingsForNonPackedMips) override; + + virtual void Process_ID3D11Device2_CheckMultisampleQualityLevels1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + UINT SampleCount, + UINT Flags, + PointerDecoder* pNumQualityLevels) override; + +/* +** This part is generated from d3d11_3.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_ID3D11Texture2D1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11Texture3D1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11RasterizerState2_GetDesc2( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11ShaderResourceView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) override; + + virtual void Process_ID3D11RenderTargetView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) override; + + virtual void Process_ID3D11UnorderedAccessView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) override; + + virtual void Process_ID3D11Query1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) override; + + virtual void Process_ID3D11DeviceContext3_Flush1( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D11_CONTEXT_TYPE ContextType, + uint64_t hEvent) override; + + virtual void Process_ID3D11DeviceContext3_SetHardwareProtectionState( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL HwProtectionEnable) override; + + virtual void Process_ID3D11DeviceContext3_GetHardwareProtectionState( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pHwProtectionEnable) override; + + virtual void Process_ID3D11Fence_CreateSharedHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pAttributes, + DWORD dwAccess, + WStringDecoder* lpName, + PointerDecoder* pHandle) override; + + virtual void Process_ID3D11Fence_GetCompletedValue( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT64 return_value) override; + + virtual void Process_ID3D11Fence_SetEventOnCompletion( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT64 Value, + uint64_t hEvent) override; + + virtual void Process_ID3D11DeviceContext4_Signal( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pFence, + UINT64 Value) override; + + virtual void Process_ID3D11DeviceContext4_Wait( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pFence, + UINT64 Value) override; + + virtual void Process_ID3D11Device3_CreateTexture2D1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc1, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture2D) override; + + virtual void Process_ID3D11Device3_CreateTexture3D1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc1, + StructPointerDecoder* pInitialData, + HandlePointerDecoder* ppTexture3D) override; + + virtual void Process_ID3D11Device3_CreateRasterizerState2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState) override; + + virtual void Process_ID3D11Device3_CreateShaderResourceView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppSRView1) override; + + virtual void Process_ID3D11Device3_CreateUnorderedAccessView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppUAView1) override; + + virtual void Process_ID3D11Device3_CreateRenderTargetView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppRTView1) override; + + virtual void Process_ID3D11Device3_CreateQuery1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pQueryDesc1, + HandlePointerDecoder* ppQuery1) override; + + virtual void Process_ID3D11Device3_GetImmediateContext3( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) override; + + virtual void Process_ID3D11Device3_CreateDeferredContext3( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) override; + + virtual void Process_ID3D11Device3_ReadFromSubresource( + const ApiCallInfo& call_info, + format::HandleId object_id, + uint64_t pDstData, + UINT DstRowPitch, + UINT DstDepthPitch, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox) override; + +/* +** This part is generated from d3d11_4.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_ID3D11Device4_RegisterDeviceRemovedEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hEvent, + PointerDecoder* pdwCookie) override; + + virtual void Process_ID3D11Device4_UnregisterDeviceRemoved( + const ApiCallInfo& call_info, + format::HandleId object_id, + DWORD dwCookie) override; + + virtual void Process_ID3D11Device5_OpenSharedFence( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hFence, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppFence) override; + + virtual void Process_ID3D11Device5_CreateFence( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT64 InitialValue, + D3D11_FENCE_FLAG Flags, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppFence) override; + + virtual void Process_ID3D11Multithread_Enter( + const ApiCallInfo& call_info, + format::HandleId object_id) override; + + virtual void Process_ID3D11Multithread_Leave( + const ApiCallInfo& call_info, + format::HandleId object_id) override; + + virtual void Process_ID3D11Multithread_SetMultithreadProtected( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value, + BOOL bMTProtect) override; + + virtual void Process_ID3D11Multithread_GetMultithreadProtected( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value) override; + + virtual void Process_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + PointerDecoder* pHDRMetaData) override; + + virtual void Process_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pType, + UINT Size, + PointerDecoder* pMetaData) override; + + virtual void Process_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + PointerDecoder* pHDRMetaData) override; + + virtual void Process_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pType, + UINT Size, + PointerDecoder* pMetaData) override; + + virtual void Process_ID3D11VideoDevice2_CheckFeatureSupport( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_FEATURE_VIDEO Feature, + PointerDecoder* pFeatureSupportData, + UINT FeatureSupportDataSize) override; + + virtual void Process_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS flags, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11VideoContext3_DecoderBeginFrame1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + format::HandleId pView, + UINT ContentKeySize, + PointerDecoder* pContentKey, + UINT NumComponentHistograms, + PointerDecoder* pHistogramOffsets, + HandlePointerDecoder* ppHistogramBuffers) override; + + virtual void Process_ID3D11VideoContext3_SubmitDecoderBuffers2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc) override; + +/* +** This part is generated from d3d11on12.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_D3D11On12CreateDevice( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pDevice, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + HandlePointerDecoder* ppCommandQueues, + UINT NumQueues, + UINT NodeMask, + HandlePointerDecoder* ppDevice, + HandlePointerDecoder* ppImmediateContext, + PointerDecoder* pChosenFeatureLevel) override; + + virtual void Process_ID3D11On12Device_CreateWrappedResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource12, + StructPointerDecoder* pFlags11, + D3D12_RESOURCE_STATES InState, + D3D12_RESOURCE_STATES OutState, + Decoded_GUID riid, + HandlePointerDecoder* ppResource11) override; + + virtual void Process_ID3D11On12Device_ReleaseWrappedResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResources, + UINT NumResources) override; + + virtual void Process_ID3D11On12Device_AcquireWrappedResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResources, + UINT NumResources) override; + + virtual void Process_ID3D11On12Device1_GetD3D12Device( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID riid, + HandlePointerDecoder* ppvDevice) override; + + virtual void Process_ID3D11On12Device2_UnwrapUnderlyingResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource11, + format::HandleId pCommandQueue, + Decoded_GUID riid, + HandlePointerDecoder* ppvResource12) override; + + virtual void Process_ID3D11On12Device2_ReturnUnderlyingResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource11, + UINT NumSync, + PointerDecoder* pSignalValues, + HandlePointerDecoder* ppFences) override; + /* ** This part is generated from Unknwnbase.h in Windows SDK: 10.0.20348.0 ** diff --git a/framework/generated/generated_dx12_replay_consumer.cpp b/framework/generated/generated_dx12_replay_consumer.cpp index faddbc6367..c028e29e36 100644 --- a/framework/generated/generated_dx12_replay_consumer.cpp +++ b/framework/generated/generated_dx12_replay_consumer.cpp @@ -103,9 +103,12 @@ void Dx12ReplayConsumer::Process_CreateDXGIFactory2( Flags, riid, ppFactory); - if(!ppFactory->IsNull()) ppFactory->SetHandleLength(1); DxObjectInfo object_info_ppFactory{}; - ppFactory->SetConsumerData(0, &object_info_ppFactory); + if(!ppFactory->IsNull()) + { + ppFactory->SetHandleLength(1); + ppFactory->SetConsumerData(0, &object_info_ppFactory); + } auto replay_result = OverrideCreateDXGIFactory2(return_value, Flags, riid, @@ -333,9 +336,12 @@ void Dx12ReplayConsumer::Process_D3D12CreateDevice( riid, ppDevice); auto in_pAdapter = GetObjectInfo(pAdapter); - if(!ppDevice->IsNull()) ppDevice->SetHandleLength(1); DxObjectInfo object_info_ppDevice{}; - ppDevice->SetConsumerData(0, &object_info_ppDevice); + if(!ppDevice->IsNull()) + { + ppDevice->SetHandleLength(1); + ppDevice->SetConsumerData(0, &object_info_ppDevice); + } auto replay_result = OverrideD3D12CreateDevice(return_value, in_pAdapter, MinimumFeatureLevel, @@ -443,6 +449,243 @@ void Dx12ReplayConsumer::Process_D3D12GetInterface( riid, ppvDebug); } + +void Dx12ReplayConsumer::Process_D3D11CreateDevice( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pAdapter, + D3D_DRIVER_TYPE DriverType, + uint64_t Software, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + HandlePointerDecoder* ppDevice, + PointerDecoder* pFeatureLevel, + HandlePointerDecoder* ppImmediateContext) +{ + CustomReplayPreCall::Dispatch( + this, + call_info, + pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + ppDevice, + pFeatureLevel, + ppImmediateContext); + auto in_pAdapter = GetObjectInfo(pAdapter); + DxObjectInfo object_info_ppDevice{}; + if(!ppDevice->IsNull()) + { + ppDevice->SetHandleLength(1); + ppDevice->SetConsumerData(0, &object_info_ppDevice); + } + if(!pFeatureLevel->IsNull()) + { + pFeatureLevel->AllocateOutputData(1); + } + DxObjectInfo object_info_ppImmediateContext{}; + if(!ppImmediateContext->IsNull()) + { + ppImmediateContext->SetHandleLength(1); + ppImmediateContext->SetConsumerData(0, &object_info_ppImmediateContext); + } + auto replay_result = OverrideD3D11CreateDevice(return_value, + in_pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + ppDevice, + pFeatureLevel, + ppImmediateContext); + if (SUCCEEDED(replay_result)) + { + AddObject(ppDevice->GetPointer(), ppDevice->GetHandlePointer(), std::move(object_info_ppDevice), format::ApiCall_D3D11CreateDevice); + AddObject(ppImmediateContext->GetPointer(), ppImmediateContext->GetHandlePointer(), std::move(object_info_ppImmediateContext), format::ApiCall_D3D11CreateDevice); + } + CheckReplayResult("D3D11CreateDevice", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + ppDevice, + pFeatureLevel, + ppImmediateContext); +} + +void Dx12ReplayConsumer::Process_D3D11CreateDeviceAndSwapChain( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pAdapter, + D3D_DRIVER_TYPE DriverType, + uint64_t Software, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + StructPointerDecoder* pSwapChainDesc, + HandlePointerDecoder* ppSwapChain, + HandlePointerDecoder* ppDevice, + PointerDecoder* pFeatureLevel, + HandlePointerDecoder* ppImmediateContext) +{ + CustomReplayPreCall::Dispatch( + this, + call_info, + pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + pSwapChainDesc, + ppSwapChain, + ppDevice, + pFeatureLevel, + ppImmediateContext); + auto in_pAdapter = GetObjectInfo(pAdapter); + DxObjectInfo object_info_ppSwapChain{}; + if(!ppSwapChain->IsNull()) + { + ppSwapChain->SetHandleLength(1); + ppSwapChain->SetConsumerData(0, &object_info_ppSwapChain); + } + DxObjectInfo object_info_ppDevice{}; + if(!ppDevice->IsNull()) + { + ppDevice->SetHandleLength(1); + ppDevice->SetConsumerData(0, &object_info_ppDevice); + } + if(!pFeatureLevel->IsNull()) + { + pFeatureLevel->AllocateOutputData(1); + } + DxObjectInfo object_info_ppImmediateContext{}; + if(!ppImmediateContext->IsNull()) + { + ppImmediateContext->SetHandleLength(1); + ppImmediateContext->SetConsumerData(0, &object_info_ppImmediateContext); + } + auto replay_result = OverrideD3D11CreateDeviceAndSwapChain(return_value, + in_pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + pSwapChainDesc, + ppSwapChain, + ppDevice, + pFeatureLevel, + ppImmediateContext); + if (SUCCEEDED(replay_result)) + { + AddObject(ppSwapChain->GetPointer(), ppSwapChain->GetHandlePointer(), std::move(object_info_ppSwapChain), format::ApiCall_D3D11CreateDeviceAndSwapChain); + AddObject(ppDevice->GetPointer(), ppDevice->GetHandlePointer(), std::move(object_info_ppDevice), format::ApiCall_D3D11CreateDeviceAndSwapChain); + AddObject(ppImmediateContext->GetPointer(), ppImmediateContext->GetHandlePointer(), std::move(object_info_ppImmediateContext), format::ApiCall_D3D11CreateDeviceAndSwapChain); + } + CheckReplayResult("D3D11CreateDeviceAndSwapChain", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + pSwapChainDesc, + ppSwapChain, + ppDevice, + pFeatureLevel, + ppImmediateContext); +} + +void Dx12ReplayConsumer::Process_D3D11On12CreateDevice( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pDevice, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + HandlePointerDecoder* ppCommandQueues, + UINT NumQueues, + UINT NodeMask, + HandlePointerDecoder* ppDevice, + HandlePointerDecoder* ppImmediateContext, + PointerDecoder* pChosenFeatureLevel) +{ + CustomReplayPreCall::Dispatch( + this, + call_info, + pDevice, + Flags, + pFeatureLevels, + FeatureLevels, + ppCommandQueues, + NumQueues, + NodeMask, + ppDevice, + ppImmediateContext, + pChosenFeatureLevel); + auto in_pDevice = MapObject(pDevice); + auto in_ppCommandQueues = MapObjects(ppCommandQueues, NumQueues); + if(!ppDevice->IsNull()) ppDevice->SetHandleLength(1); + auto out_p_ppDevice = ppDevice->GetPointer(); + auto out_hp_ppDevice = ppDevice->GetHandlePointer(); + if(!ppImmediateContext->IsNull()) ppImmediateContext->SetHandleLength(1); + auto out_p_ppImmediateContext = ppImmediateContext->GetPointer(); + auto out_hp_ppImmediateContext = ppImmediateContext->GetHandlePointer(); + if(!pChosenFeatureLevel->IsNull()) + { + pChosenFeatureLevel->AllocateOutputData(1); + } + auto replay_result = D3D11On12CreateDevice(in_pDevice, + Flags, + pFeatureLevels->GetPointer(), + FeatureLevels, + in_ppCommandQueues, + NumQueues, + NodeMask, + out_hp_ppDevice, + out_hp_ppImmediateContext, + pChosenFeatureLevel->GetOutputPointer()); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppDevice, out_hp_ppDevice, format::ApiCall_D3D11On12CreateDevice); + AddObject(out_p_ppImmediateContext, out_hp_ppImmediateContext, format::ApiCall_D3D11On12CreateDevice); + } + CheckReplayResult("D3D11On12CreateDevice", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + pDevice, + Flags, + pFeatureLevels, + FeatureLevels, + ppCommandQueues, + NumQueues, + NodeMask, + ppDevice, + ppImmediateContext, + pChosenFeatureLevel); +} void Dx12ReplayConsumer::Process_IDXGIObject_SetPrivateData( const ApiCallInfo& call_info, format::HandleId object_id, @@ -522,9 +765,18 @@ void Dx12ReplayConsumer::Process_IDXGIObject_GetPrivateData( Name, pDataSize, pData); + if(!pDataSize->IsNull()) + { + pDataSize->AllocateOutputData(1, GetOutputArrayCount("IDXGIObject::GetPrivateData", return_value, object_id, VariableLengthArrayIndices::kDxgiObjectArrayGetPrivateData, pDataSize, pData)); + } + if(!pData->IsNull() && !pDataSize->IsNull()) + { + pData->AllocateOutputData(*pDataSize->GetOutputPointer()); + } auto replay_result = reinterpret_cast(replay_object->object)->GetPrivateData(*Name.decoded_value, - pDataSize->GetPointer(), - pData->GetPointer()); + pDataSize->GetOutputPointer(), + pData->GetOutputPointer()); + if (pData->IsNull() && !pDataSize->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kDxgiObjectArrayGetPrivateData, *pDataSize->GetOutputPointer()); } CheckReplayResult("IDXGIObject_GetPrivateData", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -699,7 +951,11 @@ void Dx12ReplayConsumer::Process_IDXGIResource_GetEvictionPriority( call_info, replay_object, pEvictionPriority); - auto replay_result = reinterpret_cast(replay_object->object)->GetEvictionPriority(pEvictionPriority->GetPointer()); + if(!pEvictionPriority->IsNull()) + { + pEvictionPriority->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetEvictionPriority(pEvictionPriority->GetOutputPointer()); CheckReplayResult("IDXGIResource_GetEvictionPriority", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -775,7 +1031,11 @@ void Dx12ReplayConsumer::Process_IDXGISurface_GetDesc( call_info, replay_object, pDesc); - auto replay_result = reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetPointer()); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); CheckReplayResult("IDXGISurface_GetDesc", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -801,7 +1061,11 @@ void Dx12ReplayConsumer::Process_IDXGISurface_Map( replay_object, pLockedRect, MapFlags); - auto replay_result = reinterpret_cast(replay_object->object)->Map(pLockedRect->GetPointer(), + if(!pLockedRect->IsNull()) + { + pLockedRect->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->Map(pLockedRect->GetOutputPointer(), MapFlags); CheckReplayResult("IDXGISurface_Map", return_value, replay_result); CustomReplayPostCall::Dispatch( @@ -942,7 +1206,11 @@ void Dx12ReplayConsumer::Process_IDXGIAdapter_GetDesc( call_info, replay_object, pDesc); - auto replay_result = reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetPointer()); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); CheckReplayResult("IDXGIAdapter_GetDesc", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -968,8 +1236,12 @@ void Dx12ReplayConsumer::Process_IDXGIAdapter_CheckInterfaceSupport( replay_object, InterfaceName, pUMDVersion); + if(!pUMDVersion->IsNull()) + { + pUMDVersion->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->CheckInterfaceSupport(*InterfaceName.decoded_value, - pUMDVersion->GetPointer()); + pUMDVersion->GetOutputPointer()); CheckReplayResult("IDXGIAdapter_CheckInterfaceSupport", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -994,7 +1266,11 @@ void Dx12ReplayConsumer::Process_IDXGIOutput_GetDesc( call_info, replay_object, pDesc); - auto replay_result = reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetPointer()); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); CheckReplayResult("IDXGIOutput_GetDesc", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -1024,10 +1300,19 @@ void Dx12ReplayConsumer::Process_IDXGIOutput_GetDisplayModeList( Flags, pNumModes, pDesc); + if(!pNumModes->IsNull()) + { + pNumModes->AllocateOutputData(1, GetOutputArrayCount("IDXGIOutput::GetDisplayModeList", return_value, object_id, VariableLengthArrayIndices::kDxgiOutputArrayGetDisplayModeList, pNumModes, pDesc)); + } + if(!pDesc->IsNull() && !pNumModes->IsNull()) + { + pDesc->AllocateOutputData(*pNumModes->GetOutputPointer()); + } auto replay_result = reinterpret_cast(replay_object->object)->GetDisplayModeList(EnumFormat, Flags, - pNumModes->GetPointer(), - pDesc->GetPointer()); + pNumModes->GetOutputPointer(), + pDesc->GetOutputPointer()); + if (pDesc->IsNull() && !pNumModes->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kDxgiOutputArrayGetDisplayModeList, *pNumModes->GetOutputPointer()); } CheckReplayResult("IDXGIOutput_GetDisplayModeList", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -1058,9 +1343,13 @@ void Dx12ReplayConsumer::Process_IDXGIOutput_FindClosestMatchingMode( pModeToMatch, pClosestMatch, pConcernedDevice); + if(!pClosestMatch->IsNull()) + { + pClosestMatch->AllocateOutputData(1); + } auto in_pConcernedDevice = MapObject(pConcernedDevice); auto replay_result = reinterpret_cast(replay_object->object)->FindClosestMatchingMode(pModeToMatch->GetPointer(), - pClosestMatch->GetPointer(), + pClosestMatch->GetOutputPointer(), in_pConcernedDevice); CheckReplayResult("IDXGIOutput_FindClosestMatchingMode", return_value, replay_result); CustomReplayPostCall::Dispatch( @@ -1156,7 +1445,11 @@ void Dx12ReplayConsumer::Process_IDXGIOutput_GetGammaControlCapabilities( call_info, replay_object, pGammaCaps); - auto replay_result = reinterpret_cast(replay_object->object)->GetGammaControlCapabilities(pGammaCaps->GetPointer()); + if(!pGammaCaps->IsNull()) + { + pGammaCaps->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetGammaControlCapabilities(pGammaCaps->GetOutputPointer()); CheckReplayResult("IDXGIOutput_GetGammaControlCapabilities", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -1204,7 +1497,11 @@ void Dx12ReplayConsumer::Process_IDXGIOutput_GetGammaControl( call_info, replay_object, pArray); - auto replay_result = reinterpret_cast(replay_object->object)->GetGammaControl(pArray->GetPointer()); + if(!pArray->IsNull()) + { + pArray->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetGammaControl(pArray->GetOutputPointer()); CheckReplayResult("IDXGIOutput_GetGammaControl", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -1278,7 +1575,11 @@ void Dx12ReplayConsumer::Process_IDXGIOutput_GetFrameStatistics( call_info, replay_object, pStats); - auto replay_result = reinterpret_cast(replay_object->object)->GetFrameStatistics(pStats->GetPointer()); + if(!pStats->IsNull()) + { + pStats->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetFrameStatistics(pStats->GetOutputPointer()); CheckReplayResult("IDXGIOutput_GetFrameStatistics", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -1336,9 +1637,12 @@ void Dx12ReplayConsumer::Process_IDXGISwapChain_GetBuffer( Buffer, riid, ppSurface); - if(!ppSurface->IsNull()) ppSurface->SetHandleLength(1); DxObjectInfo object_info_ppSurface{}; - ppSurface->SetConsumerData(0, &object_info_ppSurface); + if(!ppSurface->IsNull()) + { + ppSurface->SetHandleLength(1); + ppSurface->SetConsumerData(0, &object_info_ppSurface); + } auto replay_result = OverrideGetBuffer(replay_object, return_value, Buffer, @@ -1406,10 +1710,14 @@ void Dx12ReplayConsumer::Process_IDXGISwapChain_GetFullscreenState( replay_object, pFullscreen, ppTarget); + if(!pFullscreen->IsNull()) + { + pFullscreen->AllocateOutputData(1); + } if(!ppTarget->IsNull()) ppTarget->SetHandleLength(1); auto out_p_ppTarget = ppTarget->GetPointer(); auto out_hp_ppTarget = ppTarget->GetHandlePointer(); - auto replay_result = reinterpret_cast(replay_object->object)->GetFullscreenState(pFullscreen->GetPointer(), + auto replay_result = reinterpret_cast(replay_object->object)->GetFullscreenState(pFullscreen->GetOutputPointer(), out_hp_ppTarget); if (SUCCEEDED(replay_result)) { @@ -1439,7 +1747,11 @@ void Dx12ReplayConsumer::Process_IDXGISwapChain_GetDesc( call_info, replay_object, pDesc); - auto replay_result = reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetPointer()); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); CheckReplayResult("IDXGISwapChain_GetDesc", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -1560,7 +1872,11 @@ void Dx12ReplayConsumer::Process_IDXGISwapChain_GetFrameStatistics( call_info, replay_object, pStats); - auto replay_result = reinterpret_cast(replay_object->object)->GetFrameStatistics(pStats->GetPointer()); + if(!pStats->IsNull()) + { + pStats->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetFrameStatistics(pStats->GetOutputPointer()); CheckReplayResult("IDXGISwapChain_GetFrameStatistics", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -1584,7 +1900,11 @@ void Dx12ReplayConsumer::Process_IDXGISwapChain_GetLastPresentCount( call_info, replay_object, pLastPresentCount); - auto replay_result = reinterpret_cast(replay_object->object)->GetLastPresentCount(pLastPresentCount->GetPointer()); + if(!pLastPresentCount->IsNull()) + { + pLastPresentCount->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetLastPresentCount(pLastPresentCount->GetOutputPointer()); CheckReplayResult("IDXGISwapChain_GetLastPresentCount", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -1708,9 +2028,12 @@ void Dx12ReplayConsumer::Process_IDXGIFactory_CreateSwapChain( pDesc, ppSwapChain); auto in_pDevice = GetObjectInfo(pDevice); - if(!ppSwapChain->IsNull()) ppSwapChain->SetHandleLength(1); DxObjectInfo object_info_ppSwapChain{}; - ppSwapChain->SetConsumerData(0, &object_info_ppSwapChain); + if(!ppSwapChain->IsNull()) + { + ppSwapChain->SetHandleLength(1); + ppSwapChain->SetConsumerData(0, &object_info_ppSwapChain); + } auto replay_result = OverrideCreateSwapChain(replay_object, return_value, in_pDevice, @@ -1820,7 +2143,7 @@ void Dx12ReplayConsumer::Process_IDXGIDevice_CreateSurface( Usage, pSharedResource, ppSurface); - if(!ppSurface->IsNull()) ppSurface->SetHandleLength(1); + if(!ppSurface->IsNull()) ppSurface->SetHandleLength(NumSurfaces); auto out_p_ppSurface = ppSurface->GetPointer(); auto out_hp_ppSurface = ppSurface->GetHandlePointer(); auto replay_result = reinterpret_cast(replay_object->object)->CreateSurface(pDesc->GetPointer(), @@ -1830,7 +2153,7 @@ void Dx12ReplayConsumer::Process_IDXGIDevice_CreateSurface( out_hp_ppSurface); if (SUCCEEDED(replay_result)) { - AddObject(out_p_ppSurface, out_hp_ppSurface, format::ApiCall_IDXGIDevice_CreateSurface); + AddObjects(out_p_ppSurface, ppSurface->GetLength(), out_hp_ppSurface, NumSurfaces, format::ApiCall_IDXGIDevice_CreateSurface); } CheckReplayResult("IDXGIDevice_CreateSurface", return_value, replay_result); CustomReplayPostCall::Dispatch( @@ -1864,8 +2187,12 @@ void Dx12ReplayConsumer::Process_IDXGIDevice_QueryResourceResidency( pResidencyStatus, NumResources); auto in_ppResources = MapObjects(ppResources, NumResources); + if(!pResidencyStatus->IsNull()) + { + pResidencyStatus->AllocateOutputData(NumResources); + } auto replay_result = reinterpret_cast(replay_object->object)->QueryResourceResidency(in_ppResources, - pResidencyStatus->GetPointer(), + pResidencyStatus->GetOutputPointer(), NumResources); CheckReplayResult("IDXGIDevice_QueryResourceResidency", return_value, replay_result); CustomReplayPostCall::Dispatch( @@ -1916,7 +2243,11 @@ void Dx12ReplayConsumer::Process_IDXGIDevice_GetGPUThreadPriority( call_info, replay_object, pPriority); - auto replay_result = reinterpret_cast(replay_object->object)->GetGPUThreadPriority(pPriority->GetPointer()); + if(!pPriority->IsNull()) + { + pPriority->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetGPUThreadPriority(pPriority->GetOutputPointer()); CheckReplayResult("IDXGIDevice_GetGPUThreadPriority", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -1995,7 +2326,11 @@ void Dx12ReplayConsumer::Process_IDXGIAdapter1_GetDesc1( call_info, replay_object, pDesc); - auto replay_result = reinterpret_cast(replay_object->object)->GetDesc1(pDesc->GetPointer()); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetDesc1(pDesc->GetOutputPointer()); CheckReplayResult("IDXGIAdapter1_GetDesc1", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -2043,7 +2378,11 @@ void Dx12ReplayConsumer::Process_IDXGIDevice1_GetMaximumFrameLatency( call_info, replay_object, pMaxLatency); - auto replay_result = reinterpret_cast(replay_object->object)->GetMaximumFrameLatency(pMaxLatency->GetPointer()); + if(!pMaxLatency->IsNull()) + { + pMaxLatency->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetMaximumFrameLatency(pMaxLatency->GetOutputPointer()); CheckReplayResult("IDXGIDevice1_GetMaximumFrameLatency", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -2108,7 +2447,11 @@ void Dx12ReplayConsumer::Process_IDXGIOutputDuplication_GetDesc( call_info, replay_object, pDesc); - reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetPointer()); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); CustomReplayPostCall::Dispatch( this, call_info, @@ -2135,11 +2478,15 @@ void Dx12ReplayConsumer::Process_IDXGIOutputDuplication_AcquireNextFrame( TimeoutInMilliseconds, pFrameInfo, ppDesktopResource); + if(!pFrameInfo->IsNull()) + { + pFrameInfo->AllocateOutputData(1); + } if(!ppDesktopResource->IsNull()) ppDesktopResource->SetHandleLength(1); auto out_p_ppDesktopResource = ppDesktopResource->GetPointer(); auto out_hp_ppDesktopResource = ppDesktopResource->GetHandlePointer(); auto replay_result = reinterpret_cast(replay_object->object)->AcquireNextFrame(TimeoutInMilliseconds, - pFrameInfo->GetPointer(), + pFrameInfo->GetOutputPointer(), out_hp_ppDesktopResource); if (SUCCEEDED(replay_result)) { @@ -2174,9 +2521,17 @@ void Dx12ReplayConsumer::Process_IDXGIOutputDuplication_GetFrameDirtyRects( DirtyRectsBufferSize, pDirtyRectsBuffer, pDirtyRectsBufferSizeRequired); + if(!pDirtyRectsBuffer->IsNull()) + { + pDirtyRectsBuffer->AllocateOutputData(DirtyRectsBufferSize/sizeof tagRECT); + } + if(!pDirtyRectsBufferSizeRequired->IsNull()) + { + pDirtyRectsBufferSizeRequired->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->GetFrameDirtyRects(DirtyRectsBufferSize, - pDirtyRectsBuffer->GetPointer(), - pDirtyRectsBufferSizeRequired->GetPointer()); + pDirtyRectsBuffer->GetOutputPointer(), + pDirtyRectsBufferSizeRequired->GetOutputPointer()); CheckReplayResult("IDXGIOutputDuplication_GetFrameDirtyRects", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -2206,9 +2561,17 @@ void Dx12ReplayConsumer::Process_IDXGIOutputDuplication_GetFrameMoveRects( MoveRectsBufferSize, pMoveRectBuffer, pMoveRectsBufferSizeRequired); + if(!pMoveRectBuffer->IsNull()) + { + pMoveRectBuffer->AllocateOutputData(MoveRectsBufferSize/sizeof DXGI_OUTDUPL_MOVE_RECT); + } + if(!pMoveRectsBufferSizeRequired->IsNull()) + { + pMoveRectsBufferSizeRequired->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->GetFrameMoveRects(MoveRectsBufferSize, - pMoveRectBuffer->GetPointer(), - pMoveRectsBufferSizeRequired->GetPointer()); + pMoveRectBuffer->GetOutputPointer(), + pMoveRectsBufferSizeRequired->GetOutputPointer()); CheckReplayResult("IDXGIOutputDuplication_GetFrameMoveRects", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -2240,10 +2603,22 @@ void Dx12ReplayConsumer::Process_IDXGIOutputDuplication_GetFramePointerShape( pPointerShapeBuffer, pPointerShapeBufferSizeRequired, pPointerShapeInfo); + if(!pPointerShapeBuffer->IsNull()) + { + pPointerShapeBuffer->AllocateOutputData(PointerShapeBufferSize); + } + if(!pPointerShapeBufferSizeRequired->IsNull()) + { + pPointerShapeBufferSizeRequired->AllocateOutputData(1); + } + if(!pPointerShapeInfo->IsNull()) + { + pPointerShapeInfo->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->GetFramePointerShape(PointerShapeBufferSize, - pPointerShapeBuffer->GetPointer(), - pPointerShapeBufferSizeRequired->GetPointer(), - pPointerShapeInfo->GetPointer()); + pPointerShapeBuffer->GetOutputPointer(), + pPointerShapeBufferSizeRequired->GetOutputPointer(), + pPointerShapeInfo->GetOutputPointer()); CheckReplayResult("IDXGIOutputDuplication_GetFramePointerShape", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -2270,7 +2645,11 @@ void Dx12ReplayConsumer::Process_IDXGIOutputDuplication_MapDesktopSurface( call_info, replay_object, pLockedRect); - auto replay_result = reinterpret_cast(replay_object->object)->MapDesktopSurface(pLockedRect->GetPointer()); + if(!pLockedRect->IsNull()) + { + pLockedRect->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->MapDesktopSurface(pLockedRect->GetOutputPointer()); CheckReplayResult("IDXGIOutputDuplication_MapDesktopSurface", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -2343,9 +2722,13 @@ void Dx12ReplayConsumer::Process_IDXGISurface2_GetResource( if(!ppParentResource->IsNull()) ppParentResource->SetHandleLength(1); auto out_p_ppParentResource = ppParentResource->GetPointer(); auto out_hp_ppParentResource = ppParentResource->GetHandlePointer(); + if(!pSubresourceIndex->IsNull()) + { + pSubresourceIndex->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->GetResource(*riid.decoded_value, out_hp_ppParentResource, - pSubresourceIndex->GetPointer()); + pSubresourceIndex->GetOutputPointer()); if (SUCCEEDED(replay_result)) { AddObject(out_p_ppParentResource, out_hp_ppParentResource, format::ApiCall_IDXGISurface2_GetResource); @@ -2491,9 +2874,13 @@ void Dx12ReplayConsumer::Process_IDXGIDevice2_ReclaimResources( ppResources, pDiscarded); auto in_ppResources = MapObjects(ppResources, NumResources); + if(!pDiscarded->IsNull()) + { + pDiscarded->AllocateOutputData(NumResources); + } auto replay_result = reinterpret_cast(replay_object->object)->ReclaimResources(NumResources, in_ppResources, - pDiscarded->GetPointer()); + pDiscarded->GetOutputPointer()); CheckReplayResult("IDXGIDevice2_ReclaimResources", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -2544,7 +2931,11 @@ void Dx12ReplayConsumer::Process_IDXGISwapChain1_GetDesc1( call_info, replay_object, pDesc); - auto replay_result = reinterpret_cast(replay_object->object)->GetDesc1(pDesc->GetPointer()); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetDesc1(pDesc->GetOutputPointer()); CheckReplayResult("IDXGISwapChain1_GetDesc1", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -2568,7 +2959,11 @@ void Dx12ReplayConsumer::Process_IDXGISwapChain1_GetFullscreenDesc( call_info, replay_object, pDesc); - auto replay_result = reinterpret_cast(replay_object->object)->GetFullscreenDesc(pDesc->GetPointer()); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetFullscreenDesc(pDesc->GetOutputPointer()); CheckReplayResult("IDXGISwapChain1_GetFullscreenDesc", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -2767,7 +3162,11 @@ void Dx12ReplayConsumer::Process_IDXGISwapChain1_GetBackgroundColor( call_info, replay_object, pColor); - auto replay_result = reinterpret_cast(replay_object->object)->GetBackgroundColor(pColor->GetPointer()); + if(!pColor->IsNull()) + { + pColor->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetBackgroundColor(pColor->GetOutputPointer()); CheckReplayResult("IDXGISwapChain1_GetBackgroundColor", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -2815,7 +3214,11 @@ void Dx12ReplayConsumer::Process_IDXGISwapChain1_GetRotation( call_info, replay_object, pRotation); - auto replay_result = reinterpret_cast(replay_object->object)->GetRotation(pRotation->GetPointer()); + if(!pRotation->IsNull()) + { + pRotation->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetRotation(pRotation->GetOutputPointer()); CheckReplayResult("IDXGISwapChain1_GetRotation", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -2871,9 +3274,12 @@ void Dx12ReplayConsumer::Process_IDXGIFactory2_CreateSwapChainForHwnd( ppSwapChain); auto in_pDevice = GetObjectInfo(pDevice); auto in_pRestrictToOutput = GetObjectInfo(pRestrictToOutput); - if(!ppSwapChain->IsNull()) ppSwapChain->SetHandleLength(1); DxObjectInfo object_info_ppSwapChain{}; - ppSwapChain->SetConsumerData(0, &object_info_ppSwapChain); + if(!ppSwapChain->IsNull()) + { + ppSwapChain->SetHandleLength(1); + ppSwapChain->SetConsumerData(0, &object_info_ppSwapChain); + } auto replay_result = OverrideCreateSwapChainForHwnd(replay_object, return_value, in_pDevice, @@ -2925,9 +3331,12 @@ void Dx12ReplayConsumer::Process_IDXGIFactory2_CreateSwapChainForCoreWindow( auto in_pDevice = GetObjectInfo(pDevice); auto in_pWindow = GetObjectInfo(pWindow); auto in_pRestrictToOutput = GetObjectInfo(pRestrictToOutput); - if(!ppSwapChain->IsNull()) ppSwapChain->SetHandleLength(1); DxObjectInfo object_info_ppSwapChain{}; - ppSwapChain->SetConsumerData(0, &object_info_ppSwapChain); + if(!ppSwapChain->IsNull()) + { + ppSwapChain->SetHandleLength(1); + ppSwapChain->SetConsumerData(0, &object_info_ppSwapChain); + } auto replay_result = OverrideCreateSwapChainForCoreWindow(replay_object, return_value, in_pDevice, @@ -2969,8 +3378,12 @@ void Dx12ReplayConsumer::Process_IDXGIFactory2_GetSharedResourceAdapterLuid( hResource, pLuid); auto in_hResource = static_cast(PreProcessExternalObject(hResource, format::ApiCallId::ApiCall_IDXGIFactory2_GetSharedResourceAdapterLuid, "IDXGIFactory2_GetSharedResourceAdapterLuid")); + if(!pLuid->IsNull()) + { + pLuid->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->GetSharedResourceAdapterLuid(in_hResource, - pLuid->GetPointer()); + pLuid->GetOutputPointer()); CheckReplayResult("IDXGIFactory2_GetSharedResourceAdapterLuid", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -3000,9 +3413,13 @@ void Dx12ReplayConsumer::Process_IDXGIFactory2_RegisterStereoStatusWindow( wMsg, pdwCookie); auto in_WindowHandle = static_cast(PreProcessExternalObject(WindowHandle, format::ApiCallId::ApiCall_IDXGIFactory2_RegisterStereoStatusWindow, "IDXGIFactory2_RegisterStereoStatusWindow")); + if(!pdwCookie->IsNull()) + { + pdwCookie->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->RegisterStereoStatusWindow(in_WindowHandle, wMsg, - pdwCookie->GetPointer()); + pdwCookie->GetOutputPointer()); CheckReplayResult("IDXGIFactory2_RegisterStereoStatusWindow", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -3031,8 +3448,12 @@ void Dx12ReplayConsumer::Process_IDXGIFactory2_RegisterStereoStatusEvent( hEvent, pdwCookie); auto in_hEvent = static_cast(PreProcessExternalObject(hEvent, format::ApiCallId::ApiCall_IDXGIFactory2_RegisterStereoStatusEvent, "IDXGIFactory2_RegisterStereoStatusEvent")); + if(!pdwCookie->IsNull()) + { + pdwCookie->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->RegisterStereoStatusEvent(in_hEvent, - pdwCookie->GetPointer()); + pdwCookie->GetOutputPointer()); CheckReplayResult("IDXGIFactory2_RegisterStereoStatusEvent", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -3084,9 +3505,13 @@ void Dx12ReplayConsumer::Process_IDXGIFactory2_RegisterOcclusionStatusWindow( wMsg, pdwCookie); auto in_WindowHandle = static_cast(PreProcessExternalObject(WindowHandle, format::ApiCallId::ApiCall_IDXGIFactory2_RegisterOcclusionStatusWindow, "IDXGIFactory2_RegisterOcclusionStatusWindow")); + if(!pdwCookie->IsNull()) + { + pdwCookie->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->RegisterOcclusionStatusWindow(in_WindowHandle, wMsg, - pdwCookie->GetPointer()); + pdwCookie->GetOutputPointer()); CheckReplayResult("IDXGIFactory2_RegisterOcclusionStatusWindow", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -3115,8 +3540,12 @@ void Dx12ReplayConsumer::Process_IDXGIFactory2_RegisterOcclusionStatusEvent( hEvent, pdwCookie); auto in_hEvent = static_cast(PreProcessExternalObject(hEvent, format::ApiCallId::ApiCall_IDXGIFactory2_RegisterOcclusionStatusEvent, "IDXGIFactory2_RegisterOcclusionStatusEvent")); + if(!pdwCookie->IsNull()) + { + pdwCookie->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->RegisterOcclusionStatusEvent(in_hEvent, - pdwCookie->GetPointer()); + pdwCookie->GetOutputPointer()); CheckReplayResult("IDXGIFactory2_RegisterOcclusionStatusEvent", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -3171,9 +3600,12 @@ void Dx12ReplayConsumer::Process_IDXGIFactory2_CreateSwapChainForComposition( ppSwapChain); auto in_pDevice = GetObjectInfo(pDevice); auto in_pRestrictToOutput = GetObjectInfo(pRestrictToOutput); - if(!ppSwapChain->IsNull()) ppSwapChain->SetHandleLength(1); DxObjectInfo object_info_ppSwapChain{}; - ppSwapChain->SetConsumerData(0, &object_info_ppSwapChain); + if(!ppSwapChain->IsNull()) + { + ppSwapChain->SetHandleLength(1); + ppSwapChain->SetConsumerData(0, &object_info_ppSwapChain); + } auto replay_result = OverrideCreateSwapChainForComposition(replay_object, return_value, in_pDevice, @@ -3210,7 +3642,11 @@ void Dx12ReplayConsumer::Process_IDXGIAdapter2_GetDesc2( call_info, replay_object, pDesc); - auto replay_result = reinterpret_cast(replay_object->object)->GetDesc2(pDesc->GetPointer()); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetDesc2(pDesc->GetOutputPointer()); CheckReplayResult("IDXGIAdapter2_GetDesc2", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -3240,10 +3676,19 @@ void Dx12ReplayConsumer::Process_IDXGIOutput1_GetDisplayModeList1( Flags, pNumModes, pDesc); + if(!pNumModes->IsNull()) + { + pNumModes->AllocateOutputData(1, GetOutputArrayCount("IDXGIOutput1::GetDisplayModeList1", return_value, object_id, VariableLengthArrayIndices::kDxgiOutput1ArrayGetDisplayModeList1, pNumModes, pDesc)); + } + if(!pDesc->IsNull() && !pNumModes->IsNull()) + { + pDesc->AllocateOutputData(*pNumModes->GetOutputPointer()); + } auto replay_result = reinterpret_cast(replay_object->object)->GetDisplayModeList1(EnumFormat, Flags, - pNumModes->GetPointer(), - pDesc->GetPointer()); + pNumModes->GetOutputPointer(), + pDesc->GetOutputPointer()); + if (pDesc->IsNull() && !pNumModes->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kDxgiOutput1ArrayGetDisplayModeList1, *pNumModes->GetOutputPointer()); } CheckReplayResult("IDXGIOutput1_GetDisplayModeList1", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -3274,9 +3719,13 @@ void Dx12ReplayConsumer::Process_IDXGIOutput1_FindClosestMatchingMode1( pModeToMatch, pClosestMatch, pConcernedDevice); + if(!pClosestMatch->IsNull()) + { + pClosestMatch->AllocateOutputData(1); + } auto in_pConcernedDevice = MapObject(pConcernedDevice); auto replay_result = reinterpret_cast(replay_object->object)->FindClosestMatchingMode1(pModeToMatch->GetPointer(), - pClosestMatch->GetPointer(), + pClosestMatch->GetOutputPointer(), in_pConcernedDevice); CheckReplayResult("IDXGIOutput1_FindClosestMatchingMode1", return_value, replay_result); CustomReplayPostCall::Dispatch( @@ -3413,8 +3862,16 @@ void Dx12ReplayConsumer::Process_IDXGISwapChain2_GetSourceSize( replay_object, pWidth, pHeight); - auto replay_result = reinterpret_cast(replay_object->object)->GetSourceSize(pWidth->GetPointer(), - pHeight->GetPointer()); + if(!pWidth->IsNull()) + { + pWidth->AllocateOutputData(1); + } + if(!pHeight->IsNull()) + { + pHeight->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetSourceSize(pWidth->GetOutputPointer(), + pHeight->GetOutputPointer()); CheckReplayResult("IDXGISwapChain2_GetSourceSize", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -3463,7 +3920,11 @@ void Dx12ReplayConsumer::Process_IDXGISwapChain2_GetMaximumFrameLatency( call_info, replay_object, pMaxLatency); - auto replay_result = reinterpret_cast(replay_object->object)->GetMaximumFrameLatency(pMaxLatency->GetPointer()); + if(!pMaxLatency->IsNull()) + { + pMaxLatency->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetMaximumFrameLatency(pMaxLatency->GetOutputPointer()); CheckReplayResult("IDXGISwapChain2_GetMaximumFrameLatency", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -3531,7 +3992,11 @@ void Dx12ReplayConsumer::Process_IDXGISwapChain2_GetMatrixTransform( call_info, replay_object, pMatrix); - auto replay_result = reinterpret_cast(replay_object->object)->GetMatrixTransform(pMatrix->GetPointer()); + if(!pMatrix->IsNull()) + { + pMatrix->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetMatrixTransform(pMatrix->GetOutputPointer()); CheckReplayResult("IDXGISwapChain2_GetMatrixTransform", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -3703,7 +4168,11 @@ void Dx12ReplayConsumer::Process_IDXGIDecodeSwapChain_GetSourceRect( call_info, replay_object, pRect); - auto replay_result = reinterpret_cast(replay_object->object)->GetSourceRect(pRect->GetPointer()); + if(!pRect->IsNull()) + { + pRect->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetSourceRect(pRect->GetOutputPointer()); CheckReplayResult("IDXGIDecodeSwapChain_GetSourceRect", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -3727,7 +4196,11 @@ void Dx12ReplayConsumer::Process_IDXGIDecodeSwapChain_GetTargetRect( call_info, replay_object, pRect); - auto replay_result = reinterpret_cast(replay_object->object)->GetTargetRect(pRect->GetPointer()); + if(!pRect->IsNull()) + { + pRect->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetTargetRect(pRect->GetOutputPointer()); CheckReplayResult("IDXGIDecodeSwapChain_GetTargetRect", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -3753,8 +4226,16 @@ void Dx12ReplayConsumer::Process_IDXGIDecodeSwapChain_GetDestSize( replay_object, pWidth, pHeight); - auto replay_result = reinterpret_cast(replay_object->object)->GetDestSize(pWidth->GetPointer(), - pHeight->GetPointer()); + if(!pWidth->IsNull()) + { + pWidth->AllocateOutputData(1); + } + if(!pHeight->IsNull()) + { + pHeight->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetDestSize(pWidth->GetOutputPointer(), + pHeight->GetOutputPointer()); CheckReplayResult("IDXGIDecodeSwapChain_GetDestSize", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -3928,7 +4409,11 @@ void Dx12ReplayConsumer::Process_IDXGISwapChainMedia_GetFrameStatisticsMedia( call_info, replay_object, pStats); - auto replay_result = reinterpret_cast(replay_object->object)->GetFrameStatisticsMedia(pStats->GetPointer()); + if(!pStats->IsNull()) + { + pStats->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetFrameStatisticsMedia(pStats->GetOutputPointer()); CheckReplayResult("IDXGISwapChainMedia_GetFrameStatisticsMedia", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -3980,9 +4465,17 @@ void Dx12ReplayConsumer::Process_IDXGISwapChainMedia_CheckPresentDurationSupport DesiredPresentDuration, pClosestSmallerPresentDuration, pClosestLargerPresentDuration); + if(!pClosestSmallerPresentDuration->IsNull()) + { + pClosestSmallerPresentDuration->AllocateOutputData(1); + } + if(!pClosestLargerPresentDuration->IsNull()) + { + pClosestLargerPresentDuration->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->CheckPresentDurationSupport(DesiredPresentDuration, - pClosestSmallerPresentDuration->GetPointer(), - pClosestLargerPresentDuration->GetPointer()); + pClosestSmallerPresentDuration->GetOutputPointer(), + pClosestLargerPresentDuration->GetOutputPointer()); CheckReplayResult("IDXGISwapChainMedia_CheckPresentDurationSupport", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -4013,9 +4506,13 @@ void Dx12ReplayConsumer::Process_IDXGIOutput3_CheckOverlaySupport( pConcernedDevice, pFlags); auto in_pConcernedDevice = MapObject(pConcernedDevice); + if(!pFlags->IsNull()) + { + pFlags->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->CheckOverlaySupport(EnumFormat, in_pConcernedDevice, - pFlags->GetPointer()); + pFlags->GetOutputPointer()); CheckReplayResult("IDXGIOutput3_CheckOverlaySupport", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -4063,8 +4560,12 @@ void Dx12ReplayConsumer::Process_IDXGISwapChain3_CheckColorSpaceSupport( replay_object, ColorSpace, pColorSpaceSupport); + if(!pColorSpaceSupport->IsNull()) + { + pColorSpaceSupport->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->CheckColorSpaceSupport(ColorSpace, - pColorSpaceSupport->GetPointer()); + pColorSpaceSupport->GetOutputPointer()); CheckReplayResult("IDXGISwapChain3_CheckColorSpaceSupport", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -4171,10 +4672,14 @@ void Dx12ReplayConsumer::Process_IDXGIOutput4_CheckOverlayColorSpaceSupport( pConcernedDevice, pFlags); auto in_pConcernedDevice = MapObject(pConcernedDevice); + if(!pFlags->IsNull()) + { + pFlags->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->CheckOverlayColorSpaceSupport(Format, ColorSpace, in_pConcernedDevice, - pFlags->GetPointer()); + pFlags->GetOutputPointer()); CheckReplayResult("IDXGIOutput4_CheckOverlayColorSpaceSupport", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -4278,8 +4783,12 @@ void Dx12ReplayConsumer::Process_IDXGIAdapter3_RegisterHardwareContentProtection hEvent, pdwCookie); auto in_hEvent = static_cast(PreProcessExternalObject(hEvent, format::ApiCallId::ApiCall_IDXGIAdapter3_RegisterHardwareContentProtectionTeardownStatusEvent, "IDXGIAdapter3_RegisterHardwareContentProtectionTeardownStatusEvent")); + if(!pdwCookie->IsNull()) + { + pdwCookie->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->RegisterHardwareContentProtectionTeardownStatusEvent(in_hEvent, - pdwCookie->GetPointer()); + pdwCookie->GetOutputPointer()); CheckReplayResult("IDXGIAdapter3_RegisterHardwareContentProtectionTeardownStatusEvent", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -4330,9 +4839,13 @@ void Dx12ReplayConsumer::Process_IDXGIAdapter3_QueryVideoMemoryInfo( NodeIndex, MemorySegmentGroup, pVideoMemoryInfo); + if(!pVideoMemoryInfo->IsNull()) + { + pVideoMemoryInfo->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->QueryVideoMemoryInfo(NodeIndex, MemorySegmentGroup, - pVideoMemoryInfo->GetPointer()); + pVideoMemoryInfo->GetOutputPointer()); CheckReplayResult("IDXGIAdapter3_QueryVideoMemoryInfo", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -4393,8 +4906,12 @@ void Dx12ReplayConsumer::Process_IDXGIAdapter3_RegisterVideoMemoryBudgetChangeNo hEvent, pdwCookie); auto in_hEvent = static_cast(PreProcessExternalObject(hEvent, format::ApiCallId::ApiCall_IDXGIAdapter3_RegisterVideoMemoryBudgetChangeNotificationEvent, "IDXGIAdapter3_RegisterVideoMemoryBudgetChangeNotificationEvent")); + if(!pdwCookie->IsNull()) + { + pdwCookie->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->RegisterVideoMemoryBudgetChangeNotificationEvent(in_hEvent, - pdwCookie->GetPointer()); + pdwCookie->GetOutputPointer()); CheckReplayResult("IDXGIAdapter3_RegisterVideoMemoryBudgetChangeNotificationEvent", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -4563,9 +5080,13 @@ void Dx12ReplayConsumer::Process_IDXGIDevice4_ReclaimResources1( ppResources, pResults); auto in_ppResources = MapObjects(ppResources, NumResources); + if(!pResults->IsNull()) + { + pResults->AllocateOutputData(NumResources); + } auto replay_result = reinterpret_cast(replay_object->object)->ReclaimResources1(NumResources, in_ppResources, - pResults->GetPointer()); + pResults->GetOutputPointer()); CheckReplayResult("IDXGIDevice4_ReclaimResources1", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -4591,7 +5112,11 @@ void Dx12ReplayConsumer::Process_IDXGIAdapter4_GetDesc3( call_info, replay_object, pDesc); - auto replay_result = reinterpret_cast(replay_object->object)->GetDesc3(pDesc->GetPointer()); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetDesc3(pDesc->GetOutputPointer()); CheckReplayResult("IDXGIAdapter4_GetDesc3", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -4615,7 +5140,11 @@ void Dx12ReplayConsumer::Process_IDXGIOutput6_GetDesc1( call_info, replay_object, pDesc); - auto replay_result = reinterpret_cast(replay_object->object)->GetDesc1(pDesc->GetPointer()); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetDesc1(pDesc->GetOutputPointer()); CheckReplayResult("IDXGIOutput6_GetDesc1", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -4639,7 +5168,11 @@ void Dx12ReplayConsumer::Process_IDXGIOutput6_CheckHardwareCompositionSupport( call_info, replay_object, pFlags); - auto replay_result = reinterpret_cast(replay_object->object)->CheckHardwareCompositionSupport(pFlags->GetPointer()); + if(!pFlags->IsNull()) + { + pFlags->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->CheckHardwareCompositionSupport(pFlags->GetOutputPointer()); CheckReplayResult("IDXGIOutput6_CheckHardwareCompositionSupport", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -4709,8 +5242,12 @@ void Dx12ReplayConsumer::Process_IDXGIFactory7_RegisterAdaptersChangedEvent( hEvent, pdwCookie); auto in_hEvent = static_cast(PreProcessExternalObject(hEvent, format::ApiCallId::ApiCall_IDXGIFactory7_RegisterAdaptersChangedEvent, "IDXGIFactory7_RegisterAdaptersChangedEvent")); + if(!pdwCookie->IsNull()) + { + pdwCookie->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->RegisterAdaptersChangedEvent(in_hEvent, - pdwCookie->GetPointer()); + pdwCookie->GetOutputPointer()); CheckReplayResult("IDXGIFactory7_RegisterAdaptersChangedEvent", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -4763,9 +5300,18 @@ void Dx12ReplayConsumer::Process_ID3D12Object_GetPrivateData( guid, pDataSize, pData); + if(!pDataSize->IsNull()) + { + pDataSize->AllocateOutputData(1, GetOutputArrayCount("ID3D12Object::GetPrivateData", return_value, object_id, VariableLengthArrayIndices::kD3D12ObjectArrayGetPrivateData, pDataSize, pData)); + } + if(!pData->IsNull() && !pDataSize->IsNull()) + { + pData->AllocateOutputData(*pDataSize->GetOutputPointer()); + } auto replay_result = reinterpret_cast(replay_object->object)->GetPrivateData(*guid.decoded_value, - pDataSize->GetPointer(), - pData->GetPointer()); + pDataSize->GetOutputPointer(), + pData->GetOutputPointer()); + if (pData->IsNull() && !pDataSize->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D12ObjectArrayGetPrivateData, *pDataSize->GetOutputPointer()); } CheckReplayResult("ID3D12Object_GetPrivateData", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -4935,7 +5481,11 @@ void Dx12ReplayConsumer::Process_ID3D12VersionedRootSignatureDeserializer_GetRoo replay_object, convertToVersion, ppDesc); - auto in_ppDesc = ppDesc->GetPointer(); + if(!ppDesc->IsNull()) + { + ppDesc->AllocateOutputData(1); + } + auto in_ppDesc = ppDesc->GetOutputPointer(); auto replay_result = reinterpret_cast(replay_object->object)->GetRootSignatureDescAtVersion(convertToVersion, const_cast(&in_ppDesc)); CheckReplayResult("ID3D12VersionedRootSignatureDeserializer_GetRootSignatureDescAtVersion", return_value, replay_result); @@ -5152,8 +5702,16 @@ void Dx12ReplayConsumer::Process_ID3D12Resource_GetHeapProperties( replay_object, pHeapProperties, pHeapFlags); - auto replay_result = reinterpret_cast(replay_object->object)->GetHeapProperties(pHeapProperties->GetPointer(), - pHeapFlags->GetPointer()); + if(!pHeapProperties->IsNull()) + { + pHeapProperties->AllocateOutputData(1); + } + if(!pHeapFlags->IsNull()) + { + pHeapFlags->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetHeapProperties(pHeapProperties->GetOutputPointer(), + pHeapFlags->GetOutputPointer()); CheckReplayResult("ID3D12Resource_GetHeapProperties", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -8079,7 +8637,11 @@ void Dx12ReplayConsumer::Process_ID3D12CommandQueue_GetTimestampFrequency( call_info, replay_object, pFrequency); - auto replay_result = reinterpret_cast(replay_object->object)->GetTimestampFrequency(pFrequency->GetPointer()); + if(!pFrequency->IsNull()) + { + pFrequency->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetTimestampFrequency(pFrequency->GetOutputPointer()); CheckReplayResult("ID3D12CommandQueue_GetTimestampFrequency", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -8105,8 +8667,16 @@ void Dx12ReplayConsumer::Process_ID3D12CommandQueue_GetClockCalibration( replay_object, pGpuTimestamp, pCpuTimestamp); - auto replay_result = reinterpret_cast(replay_object->object)->GetClockCalibration(pGpuTimestamp->GetPointer(), - pCpuTimestamp->GetPointer()); + if(!pGpuTimestamp->IsNull()) + { + pGpuTimestamp->AllocateOutputData(1); + } + if(!pCpuTimestamp->IsNull()) + { + pCpuTimestamp->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetClockCalibration(pGpuTimestamp->GetOutputPointer(), + pCpuTimestamp->GetOutputPointer()); CheckReplayResult("ID3D12CommandQueue_GetClockCalibration", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -8175,9 +8745,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device_CreateCommandQueue( pDesc, riid, ppCommandQueue); - if(!ppCommandQueue->IsNull()) ppCommandQueue->SetHandleLength(1); DxObjectInfo object_info_ppCommandQueue{}; - ppCommandQueue->SetConsumerData(0, &object_info_ppCommandQueue); + if(!ppCommandQueue->IsNull()) + { + ppCommandQueue->SetHandleLength(1); + ppCommandQueue->SetConsumerData(0, &object_info_ppCommandQueue); + } auto replay_result = OverrideCreateCommandQueue(replay_object, return_value, pDesc, @@ -8256,10 +8829,13 @@ void Dx12ReplayConsumer::Process_ID3D12Device_CreateGraphicsPipelineState( riid, ppPipelineState); MapStructObjects(pDesc->GetMetaStructPointer(), GetObjectInfoTable(), GetGpuVaTable()); - if(!ppPipelineState->IsNull()) ppPipelineState->SetHandleLength(1); DxObjectInfo object_info_ppPipelineState{}; - ppPipelineState->SetConsumerData(0, &object_info_ppPipelineState); - auto replay_result = OverrideCreateGraphicsPipelineState(replay_object, + if(!ppPipelineState->IsNull()) + { + ppPipelineState->SetHandleLength(1); + ppPipelineState->SetConsumerData(0, &object_info_ppPipelineState); + } + auto replay_result = OverrideCreateGraphicsPipelineState(replay_object, return_value, pDesc, riid, @@ -8298,9 +8874,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device_CreateComputePipelineState( riid, ppPipelineState); MapStructObjects(pDesc->GetMetaStructPointer(), GetObjectInfoTable(), GetGpuVaTable()); - if(!ppPipelineState->IsNull()) ppPipelineState->SetHandleLength(1); DxObjectInfo object_info_ppPipelineState{}; - ppPipelineState->SetConsumerData(0, &object_info_ppPipelineState); + if(!ppPipelineState->IsNull()) + { + ppPipelineState->SetHandleLength(1); + ppPipelineState->SetConsumerData(0, &object_info_ppPipelineState); + } auto replay_result = OverrideCreateComputePipelineState(replay_object, return_value, pDesc, @@ -8347,9 +8926,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device_CreateCommandList( ppCommandList); auto in_pCommandAllocator = GetObjectInfo(pCommandAllocator); auto in_pInitialState = GetObjectInfo(pInitialState); - if(!ppCommandList->IsNull()) ppCommandList->SetHandleLength(1); DxObjectInfo object_info_ppCommandList{}; - ppCommandList->SetConsumerData(0, &object_info_ppCommandList); + if(!ppCommandList->IsNull()) + { + ppCommandList->SetHandleLength(1); + ppCommandList->SetConsumerData(0, &object_info_ppCommandList); + } auto replay_result = OverrideCreateCommandList(replay_object, return_value, nodeMask, @@ -8394,9 +8976,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device_CreateDescriptorHeap( pDescriptorHeapDesc, riid, ppvHeap); - if(!ppvHeap->IsNull()) ppvHeap->SetHandleLength(1); DxObjectInfo object_info_ppvHeap{}; - ppvHeap->SetConsumerData(0, &object_info_ppvHeap); + if(!ppvHeap->IsNull()) + { + ppvHeap->SetHandleLength(1); + ppvHeap->SetConsumerData(0, &object_info_ppvHeap); + } auto replay_result = OverrideCreateDescriptorHeap(replay_object, return_value, pDescriptorHeapDesc, @@ -8464,9 +9049,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device_CreateRootSignature( blobLengthInBytes, riid, ppvRootSignature); - if(!ppvRootSignature->IsNull()) ppvRootSignature->SetHandleLength(1); DxObjectInfo object_info_ppvRootSignature{}; - ppvRootSignature->SetConsumerData(0, &object_info_ppvRootSignature); + if(!ppvRootSignature->IsNull()) + { + ppvRootSignature->SetHandleLength(1); + ppvRootSignature->SetConsumerData(0, &object_info_ppvRootSignature); + } auto replay_result = OverrideCreateRootSignature(replay_object, return_value, nodeMask, @@ -8848,9 +9436,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device_CreateCommittedResource( pOptimizedClearValue, riidResource, ppvResource); - if(!ppvResource->IsNull()) ppvResource->SetHandleLength(1); DxObjectInfo object_info_ppvResource{}; - ppvResource->SetConsumerData(0, &object_info_ppvResource); + if(!ppvResource->IsNull()) + { + ppvResource->SetHandleLength(1); + ppvResource->SetConsumerData(0, &object_info_ppvResource); + } auto replay_result = OverrideCreateCommittedResource(replay_object, return_value, pHeapProperties, @@ -8898,9 +9489,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device_CreateHeap( pDesc, riid, ppvHeap); - if(!ppvHeap->IsNull()) ppvHeap->SetHandleLength(1); DxObjectInfo object_info_ppvHeap{}; - ppvHeap->SetConsumerData(0, &object_info_ppvHeap); + if(!ppvHeap->IsNull()) + { + ppvHeap->SetHandleLength(1); + ppvHeap->SetConsumerData(0, &object_info_ppvHeap); + } auto replay_result = OverrideCreateHeap(replay_object, return_value, pDesc, @@ -8948,9 +9542,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device_CreatePlacedResource( riid, ppvResource); auto in_pHeap = GetObjectInfo(pHeap); - if(!ppvResource->IsNull()) ppvResource->SetHandleLength(1); DxObjectInfo object_info_ppvResource{}; - ppvResource->SetConsumerData(0, &object_info_ppvResource); + if(!ppvResource->IsNull()) + { + ppvResource->SetHandleLength(1); + ppvResource->SetConsumerData(0, &object_info_ppvResource); + } auto replay_result = OverrideCreatePlacedResource(replay_object, return_value, in_pHeap, @@ -9002,9 +9599,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device_CreateReservedResource( pOptimizedClearValue, riid, ppvResource); - if(!ppvResource->IsNull()) ppvResource->SetHandleLength(1); DxObjectInfo object_info_ppvResource{}; - ppvResource->SetConsumerData(0, &object_info_ppvResource); + if(!ppvResource->IsNull()) + { + ppvResource->SetHandleLength(1); + ppvResource->SetConsumerData(0, &object_info_ppvResource); + } auto replay_result = OverrideCreateReservedResource(replay_object, return_value, pDesc, @@ -9235,9 +9835,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device_CreateFence( Flags, riid, ppFence); - if(!ppFence->IsNull()) ppFence->SetHandleLength(1); DxObjectInfo object_info_ppFence{}; - ppFence->SetConsumerData(0, &object_info_ppFence); + if(!ppFence->IsNull()) + { + ppFence->SetHandleLength(1); + ppFence->SetConsumerData(0, &object_info_ppFence); + } auto replay_result = OverrideCreateFence(replay_object, return_value, InitialValue, @@ -9308,14 +9911,30 @@ void Dx12ReplayConsumer::Process_ID3D12Device_GetCopyableFootprints( pNumRows, pRowSizeInBytes, pTotalBytes); + if(!pLayouts->IsNull()) + { + pLayouts->AllocateOutputData(NumSubresources); + } + if(!pNumRows->IsNull()) + { + pNumRows->AllocateOutputData(NumSubresources); + } + if(!pRowSizeInBytes->IsNull()) + { + pRowSizeInBytes->AllocateOutputData(NumSubresources); + } + if(!pTotalBytes->IsNull()) + { + pTotalBytes->AllocateOutputData(1); + } reinterpret_cast(replay_object->object)->GetCopyableFootprints(pResourceDesc->GetPointer(), FirstSubresource, NumSubresources, BaseOffset, - pLayouts->GetPointer(), - pNumRows->GetPointer(), - pRowSizeInBytes->GetPointer(), - pTotalBytes->GetPointer()); + pLayouts->GetOutputPointer(), + pNumRows->GetOutputPointer(), + pRowSizeInBytes->GetOutputPointer(), + pTotalBytes->GetOutputPointer()); CustomReplayPostCall::Dispatch( this, call_info, @@ -9415,9 +10034,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device_CreateCommandSignature( riid, ppvCommandSignature); auto in_pRootSignature = GetObjectInfo(pRootSignature); - if(!ppvCommandSignature->IsNull()) ppvCommandSignature->SetHandleLength(1); DxObjectInfo object_info_ppvCommandSignature{}; - ppvCommandSignature->SetConsumerData(0, &object_info_ppvCommandSignature); + if(!ppvCommandSignature->IsNull()) + { + ppvCommandSignature->SetHandleLength(1); + ppvCommandSignature->SetConsumerData(0, &object_info_ppvCommandSignature); + } auto replay_result = OverrideCreateCommandSignature(replay_object, return_value, pDesc, @@ -9466,13 +10088,33 @@ void Dx12ReplayConsumer::Process_ID3D12Device_GetResourceTiling( FirstSubresourceTilingToGet, pSubresourceTilingsForNonPackedMips); auto in_pTiledResource = MapObject(pTiledResource); + if(!pNumTilesForEntireResource->IsNull()) + { + pNumTilesForEntireResource->AllocateOutputData(1); + } + if(!pPackedMipDesc->IsNull()) + { + pPackedMipDesc->AllocateOutputData(1); + } + if(!pStandardTileShapeForNonPackedMips->IsNull()) + { + pStandardTileShapeForNonPackedMips->AllocateOutputData(1); + } + if(!pNumSubresourceTilings->IsNull()) + { + pNumSubresourceTilings->AllocateOutputData(1); + } + if(!pSubresourceTilingsForNonPackedMips->IsNull()) + { + pSubresourceTilingsForNonPackedMips->AllocateOutputData(!pNumSubresourceTilings->IsNull() ? *pNumSubresourceTilings->GetPointer() : 0); + } reinterpret_cast(replay_object->object)->GetResourceTiling(in_pTiledResource, - pNumTilesForEntireResource->GetPointer(), - pPackedMipDesc->GetPointer(), - pStandardTileShapeForNonPackedMips->GetPointer(), - pNumSubresourceTilings->GetPointer(), + pNumTilesForEntireResource->GetOutputPointer(), + pPackedMipDesc->GetOutputPointer(), + pStandardTileShapeForNonPackedMips->GetOutputPointer(), + pNumSubresourceTilings->GetOutputPointer(), FirstSubresourceTilingToGet, - pSubresourceTilingsForNonPackedMips->GetPointer()); + pSubresourceTilingsForNonPackedMips->GetOutputPointer()); CustomReplayPostCall::Dispatch( this, call_info, @@ -9557,9 +10199,12 @@ void Dx12ReplayConsumer::Process_ID3D12PipelineLibrary_LoadGraphicsPipeline( riid, ppPipelineState); MapStructObjects(pDesc->GetMetaStructPointer(), GetObjectInfoTable(), GetGpuVaTable()); - if(!ppPipelineState->IsNull()) ppPipelineState->SetHandleLength(1); DxObjectInfo object_info_ppPipelineState{}; - ppPipelineState->SetConsumerData(0, &object_info_ppPipelineState); + if(!ppPipelineState->IsNull()) + { + ppPipelineState->SetHandleLength(1); + ppPipelineState->SetConsumerData(0, &object_info_ppPipelineState); + } auto replay_result = OverrideLoadGraphicsPipeline(replay_object, return_value, pName, @@ -9603,9 +10248,12 @@ void Dx12ReplayConsumer::Process_ID3D12PipelineLibrary_LoadComputePipeline( riid, ppPipelineState); MapStructObjects(pDesc->GetMetaStructPointer(), GetObjectInfoTable(), GetGpuVaTable()); - if(!ppPipelineState->IsNull()) ppPipelineState->SetHandleLength(1); DxObjectInfo object_info_ppPipelineState{}; - ppPipelineState->SetConsumerData(0, &object_info_ppPipelineState); + if(!ppPipelineState->IsNull()) + { + ppPipelineState->SetHandleLength(1); + ppPipelineState->SetConsumerData(0, &object_info_ppPipelineState); + } auto replay_result = OverrideLoadComputePipeline(replay_object, return_value, pName, @@ -9664,7 +10312,11 @@ void Dx12ReplayConsumer::Process_ID3D12PipelineLibrary_Serialize( replay_object, pData, DataSizeInBytes); - auto replay_result = reinterpret_cast(replay_object->object)->Serialize(pData->GetPointer(), + if(!pData->IsNull()) + { + pData->AllocateOutputData(DataSizeInBytes); + } + auto replay_result = reinterpret_cast(replay_object->object)->Serialize(pData->GetOutputPointer(), DataSizeInBytes); CheckReplayResult("ID3D12PipelineLibrary_Serialize", return_value, replay_result); CustomReplayPostCall::Dispatch( @@ -9697,9 +10349,12 @@ void Dx12ReplayConsumer::Process_ID3D12PipelineLibrary1_LoadPipeline( riid, ppPipelineState); MapStructObjects(pDesc->GetMetaStructPointer(), GetObjectInfoTable(), GetGpuVaTable()); - if(!ppPipelineState->IsNull()) ppPipelineState->SetHandleLength(1); DxObjectInfo object_info_ppPipelineState{}; - ppPipelineState->SetConsumerData(0, &object_info_ppPipelineState); + if(!ppPipelineState->IsNull()) + { + ppPipelineState->SetHandleLength(1); + ppPipelineState->SetConsumerData(0, &object_info_ppPipelineState); + } auto replay_result = OverrideLoadPipeline(replay_object, return_value, pName, @@ -9742,9 +10397,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device1_CreatePipelineLibrary( BlobLength, riid, ppPipelineLibrary); - if(!ppPipelineLibrary->IsNull()) ppPipelineLibrary->SetHandleLength(1); DxObjectInfo object_info_ppPipelineLibrary{}; - ppPipelineLibrary->SetConsumerData(0, &object_info_ppPipelineLibrary); + if(!ppPipelineLibrary->IsNull()) + { + ppPipelineLibrary->SetHandleLength(1); + ppPipelineLibrary->SetConsumerData(0, &object_info_ppPipelineLibrary); + } auto replay_result = OverrideCreatePipelineLibrary(replay_object, return_value, pLibraryBlob, @@ -9900,9 +10558,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device3_OpenExistingHeapFromAddress( pAddress, riid, ppvHeap); - if(!ppvHeap->IsNull()) ppvHeap->SetHandleLength(1); DxObjectInfo object_info_ppvHeap{}; - ppvHeap->SetConsumerData(0, &object_info_ppvHeap); + if(!ppvHeap->IsNull()) + { + ppvHeap->SetHandleLength(1); + ppvHeap->SetConsumerData(0, &object_info_ppvHeap); + } auto replay_result = OverrideOpenExistingHeapFromAddress(replay_object, return_value, pAddress, @@ -10104,9 +10765,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device4_CreateCommandList1( flags, riid, ppCommandList); - if(!ppCommandList->IsNull()) ppCommandList->SetHandleLength(1); DxObjectInfo object_info_ppCommandList{}; - ppCommandList->SetConsumerData(0, &object_info_ppCommandList); + if(!ppCommandList->IsNull()) + { + ppCommandList->SetHandleLength(1); + ppCommandList->SetConsumerData(0, &object_info_ppCommandList); + } auto replay_result = OverrideCreateCommandList1(replay_object, return_value, nodeMask, @@ -10199,9 +10863,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device4_CreateCommittedResource1( riidResource, ppvResource); auto in_pProtectedSession = GetObjectInfo(pProtectedSession); - if(!ppvResource->IsNull()) ppvResource->SetHandleLength(1); DxObjectInfo object_info_ppvResource{}; - ppvResource->SetConsumerData(0, &object_info_ppvResource); + if(!ppvResource->IsNull()) + { + ppvResource->SetHandleLength(1); + ppvResource->SetConsumerData(0, &object_info_ppvResource); + } auto replay_result = OverrideCreateCommittedResource1(replay_object, return_value, pHeapProperties, @@ -10254,9 +10921,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device4_CreateHeap1( riid, ppvHeap); auto in_pProtectedSession = GetObjectInfo(pProtectedSession); - if(!ppvHeap->IsNull()) ppvHeap->SetHandleLength(1); DxObjectInfo object_info_ppvHeap{}; - ppvHeap->SetConsumerData(0, &object_info_ppvHeap); + if(!ppvHeap->IsNull()) + { + ppvHeap->SetHandleLength(1); + ppvHeap->SetConsumerData(0, &object_info_ppvHeap); + } auto replay_result = OverrideCreateHeap1(replay_object, return_value, pDesc, @@ -10304,9 +10974,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device4_CreateReservedResource1( riid, ppvResource); auto in_pProtectedSession = GetObjectInfo(pProtectedSession); - if(!ppvResource->IsNull()) ppvResource->SetHandleLength(1); DxObjectInfo object_info_ppvResource{}; - ppvResource->SetConsumerData(0, &object_info_ppvResource); + if(!ppvResource->IsNull()) + { + ppvResource->SetHandleLength(1); + ppvResource->SetConsumerData(0, &object_info_ppvResource); + } auto replay_result = OverrideCreateReservedResource1(replay_object, return_value, pDesc, @@ -10354,10 +11027,14 @@ void Dx12ReplayConsumer::Process_ID3D12Device4_GetResourceAllocationInfo1( numResourceDescs, pResourceDescs, pResourceAllocationInfo1); + if(!pResourceAllocationInfo1->IsNull()) + { + pResourceAllocationInfo1->AllocateOutputData(numResourceDescs); + } auto replay_result = reinterpret_cast(replay_object->object)->GetResourceAllocationInfo1(visibleMask, numResourceDescs, pResourceDescs->GetPointer(), - pResourceAllocationInfo1->GetPointer()); + pResourceAllocationInfo1->GetOutputPointer()); CustomReplayPostCall::Dispatch( this, call_info, @@ -10704,8 +11381,17 @@ void Dx12ReplayConsumer::Process_ID3D12Device5_EnumerateMetaCommands( replay_object, pNumMetaCommands, pDescs); - auto replay_result = reinterpret_cast(replay_object->object)->EnumerateMetaCommands(pNumMetaCommands->GetPointer(), - pDescs->GetPointer()); + if(!pNumMetaCommands->IsNull()) + { + pNumMetaCommands->AllocateOutputData(1, GetOutputArrayCount("ID3D12Device5::EnumerateMetaCommands", return_value, object_id, VariableLengthArrayIndices::kD3D12Device5ArrayEnumerateMetaCommands, pNumMetaCommands, pDescs)); + } + if(!pDescs->IsNull() && !pNumMetaCommands->IsNull()) + { + pDescs->AllocateOutputData(*pNumMetaCommands->GetOutputPointer()); + } + auto replay_result = reinterpret_cast(replay_object->object)->EnumerateMetaCommands(pNumMetaCommands->GetOutputPointer(), + pDescs->GetOutputPointer()); + if (pDescs->IsNull() && !pNumMetaCommands->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D12Device5ArrayEnumerateMetaCommands, *pNumMetaCommands->GetOutputPointer()); } CheckReplayResult("ID3D12Device5_EnumerateMetaCommands", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -10738,11 +11424,24 @@ void Dx12ReplayConsumer::Process_ID3D12Device5_EnumerateMetaCommandParameters( pTotalStructureSizeInBytes, pParameterCount, pParameterDescs); + if(!pTotalStructureSizeInBytes->IsNull()) + { + pTotalStructureSizeInBytes->AllocateOutputData(1); + } + if(!pParameterCount->IsNull()) + { + pParameterCount->AllocateOutputData(1, GetOutputArrayCount("ID3D12Device5::EnumerateMetaCommandParameters", return_value, object_id, VariableLengthArrayIndices::kD3D12Device5ArrayEnumerateMetaCommandParameters, pParameterCount, pParameterDescs)); + } + if(!pParameterDescs->IsNull() && !pParameterCount->IsNull()) + { + pParameterDescs->AllocateOutputData(*pParameterCount->GetOutputPointer()); + } auto replay_result = reinterpret_cast(replay_object->object)->EnumerateMetaCommandParameters(*CommandId.decoded_value, Stage, - pTotalStructureSizeInBytes->GetPointer(), - pParameterCount->GetPointer(), - pParameterDescs->GetPointer()); + pTotalStructureSizeInBytes->GetOutputPointer(), + pParameterCount->GetOutputPointer(), + pParameterDescs->GetOutputPointer()); + if (pParameterDescs->IsNull() && !pParameterCount->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D12Device5ArrayEnumerateMetaCommandParameters, *pParameterCount->GetOutputPointer()); } CheckReplayResult("ID3D12Device5_EnumerateMetaCommandParameters", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -10826,9 +11525,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device5_CreateStateObject( riid, ppStateObject); MapStructObjects(pDesc->GetMetaStructPointer(), GetObjectInfoTable(), GetGpuVaTable()); - if(!ppStateObject->IsNull()) ppStateObject->SetHandleLength(1); DxObjectInfo object_info_ppStateObject{}; - ppStateObject->SetConsumerData(0, &object_info_ppStateObject); + if(!ppStateObject->IsNull()) + { + ppStateObject->SetHandleLength(1); + ppStateObject->SetConsumerData(0, &object_info_ppStateObject); + } auto replay_result = OverrideCreateStateObject(replay_object, return_value, pDesc, @@ -10865,6 +11567,10 @@ void Dx12ReplayConsumer::Process_ID3D12Device5_GetRaytracingAccelerationStructur pDesc, pInfo); MapStructObjects(pDesc->GetMetaStructPointer(), GetObjectInfoTable(), GetGpuVaTable()); + if(!pInfo->IsNull()) + { + pInfo->AllocateOutputData(1); + } OverrideGetRaytracingAccelerationStructurePrebuildInfo(replay_object, pDesc, pInfo); @@ -11031,7 +11737,11 @@ void Dx12ReplayConsumer::Process_ID3D12DeviceRemovedExtendedData_GetAutoBreadcru call_info, replay_object, pOutput); - auto replay_result = reinterpret_cast(replay_object->object)->GetAutoBreadcrumbsOutput(pOutput->GetPointer()); + if(!pOutput->IsNull()) + { + pOutput->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetAutoBreadcrumbsOutput(pOutput->GetOutputPointer()); if (SUCCEEDED(replay_result)) { AddStructObjects(pOutput, pOutput->GetPointer(), GetObjectInfoTable()); @@ -11084,7 +11794,11 @@ void Dx12ReplayConsumer::Process_ID3D12DeviceRemovedExtendedData1_GetAutoBreadcr call_info, replay_object, pOutput); - auto replay_result = reinterpret_cast(replay_object->object)->GetAutoBreadcrumbsOutput1(pOutput->GetPointer()); + if(!pOutput->IsNull()) + { + pOutput->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetAutoBreadcrumbsOutput1(pOutput->GetOutputPointer()); if (SUCCEEDED(replay_result)) { AddStructObjects(pOutput, pOutput->GetPointer(), GetObjectInfoTable()); @@ -11197,10 +11911,14 @@ void Dx12ReplayConsumer::Process_ID3D12Device6_SetBackgroundProcessingMode( hEventToSignalUponCompletion, pbFurtherMeasurementsDesired); auto in_hEventToSignalUponCompletion = static_cast(PreProcessExternalObject(hEventToSignalUponCompletion, format::ApiCallId::ApiCall_ID3D12Device6_SetBackgroundProcessingMode, "ID3D12Device6_SetBackgroundProcessingMode")); + if(!pbFurtherMeasurementsDesired->IsNull()) + { + pbFurtherMeasurementsDesired->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->SetBackgroundProcessingMode(Mode, MeasurementsAction, in_hEventToSignalUponCompletion, - pbFurtherMeasurementsDesired->GetPointer()); + pbFurtherMeasurementsDesired->GetOutputPointer()); CheckReplayResult("ID3D12Device6_SetBackgroundProcessingMode", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -11255,9 +11973,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device7_AddToStateObject( ppNewStateObject); MapStructObjects(pAddition->GetMetaStructPointer(), GetObjectInfoTable(), GetGpuVaTable()); auto in_pStateObjectToGrowFrom = GetObjectInfo(pStateObjectToGrowFrom); - if(!ppNewStateObject->IsNull()) ppNewStateObject->SetHandleLength(1); DxObjectInfo object_info_ppNewStateObject{}; - ppNewStateObject->SetConsumerData(0, &object_info_ppNewStateObject); + if(!ppNewStateObject->IsNull()) + { + ppNewStateObject->SetHandleLength(1); + ppNewStateObject->SetConsumerData(0, &object_info_ppNewStateObject); + } auto replay_result = OverrideAddToStateObject(replay_object, return_value, pAddition, @@ -11339,10 +12060,14 @@ void Dx12ReplayConsumer::Process_ID3D12Device8_GetResourceAllocationInfo2( numResourceDescs, pResourceDescs, pResourceAllocationInfo1); + if(!pResourceAllocationInfo1->IsNull()) + { + pResourceAllocationInfo1->AllocateOutputData(numResourceDescs); + } auto replay_result = reinterpret_cast(replay_object->object)->GetResourceAllocationInfo2(visibleMask, numResourceDescs, pResourceDescs->GetPointer(), - pResourceAllocationInfo1->GetPointer()); + pResourceAllocationInfo1->GetOutputPointer()); CustomReplayPostCall::Dispatch( this, call_info, @@ -11383,9 +12108,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device8_CreateCommittedResource2( riidResource, ppvResource); auto in_pProtectedSession = GetObjectInfo(pProtectedSession); - if(!ppvResource->IsNull()) ppvResource->SetHandleLength(1); DxObjectInfo object_info_ppvResource{}; - ppvResource->SetConsumerData(0, &object_info_ppvResource); + if(!ppvResource->IsNull()) + { + ppvResource->SetHandleLength(1); + ppvResource->SetConsumerData(0, &object_info_ppvResource); + } auto replay_result = OverrideCreateCommittedResource2(replay_object, return_value, pHeapProperties, @@ -11444,9 +12172,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device8_CreatePlacedResource1( riid, ppvResource); auto in_pHeap = GetObjectInfo(pHeap); - if(!ppvResource->IsNull()) ppvResource->SetHandleLength(1); DxObjectInfo object_info_ppvResource{}; - ppvResource->SetConsumerData(0, &object_info_ppvResource); + if(!ppvResource->IsNull()) + { + ppvResource->SetHandleLength(1); + ppvResource->SetConsumerData(0, &object_info_ppvResource); + } auto replay_result = OverrideCreatePlacedResource1(replay_object, return_value, in_pHeap, @@ -11536,14 +12267,30 @@ void Dx12ReplayConsumer::Process_ID3D12Device8_GetCopyableFootprints1( pNumRows, pRowSizeInBytes, pTotalBytes); + if(!pLayouts->IsNull()) + { + pLayouts->AllocateOutputData(NumSubresources); + } + if(!pNumRows->IsNull()) + { + pNumRows->AllocateOutputData(NumSubresources); + } + if(!pRowSizeInBytes->IsNull()) + { + pRowSizeInBytes->AllocateOutputData(NumSubresources); + } + if(!pTotalBytes->IsNull()) + { + pTotalBytes->AllocateOutputData(1); + } reinterpret_cast(replay_object->object)->GetCopyableFootprints1(pResourceDesc->GetPointer(), FirstSubresource, NumSubresources, BaseOffset, - pLayouts->GetPointer(), - pNumRows->GetPointer(), - pRowSizeInBytes->GetPointer(), - pTotalBytes->GetPointer()); + pLayouts->GetOutputPointer(), + pNumRows->GetOutputPointer(), + pRowSizeInBytes->GetOutputPointer(), + pTotalBytes->GetOutputPointer()); CustomReplayPostCall::Dispatch( this, call_info, @@ -12059,10 +12806,19 @@ void Dx12ReplayConsumer::Process_ID3D12ShaderCacheSession_FindValue( KeySize, pValue, pValueSize); + if(!pValueSize->IsNull()) + { + pValueSize->AllocateOutputData(1, GetOutputArrayCount("ID3D12ShaderCacheSession::FindValue", return_value, object_id, VariableLengthArrayIndices::kD3D12ShaderCacheSessionArrayFindValue, pValueSize, pValue)); + } + if(!pValue->IsNull() && !pValueSize->IsNull()) + { + pValue->AllocateOutputData(*pValueSize->GetOutputPointer()); + } auto replay_result = reinterpret_cast(replay_object->object)->FindValue(pKey->GetPointer(), KeySize, - pValue->GetPointer(), - pValueSize->GetPointer()); + pValue->GetOutputPointer(), + pValueSize->GetOutputPointer()); + if (pValue->IsNull() && !pValueSize->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D12ShaderCacheSessionArrayFindValue, *pValueSize->GetOutputPointer()); } CheckReplayResult("ID3D12ShaderCacheSession_FindValue", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -12237,9 +12993,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device9_CreateCommandQueue1( CreatorID, riid, ppCommandQueue); - if(!ppCommandQueue->IsNull()) ppCommandQueue->SetHandleLength(1); DxObjectInfo object_info_ppCommandQueue{}; - ppCommandQueue->SetConsumerData(0, &object_info_ppCommandQueue); + if(!ppCommandQueue->IsNull()) + { + ppCommandQueue->SetHandleLength(1); + ppCommandQueue->SetConsumerData(0, &object_info_ppCommandQueue); + } auto replay_result = OverrideCreateCommandQueue1(replay_object, return_value, pDesc, @@ -12295,9 +13054,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device10_CreateCommittedResource3( riidResource, ppvResource); auto in_pProtectedSession = GetObjectInfo(pProtectedSession); - if(!ppvResource->IsNull()) ppvResource->SetHandleLength(1); DxObjectInfo object_info_ppvResource{}; - ppvResource->SetConsumerData(0, &object_info_ppvResource); + if(!ppvResource->IsNull()) + { + ppvResource->SetHandleLength(1); + ppvResource->SetConsumerData(0, &object_info_ppvResource); + } auto replay_result = OverrideCreateCommittedResource3(replay_object, return_value, pHeapProperties, @@ -12364,9 +13126,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device10_CreatePlacedResource2( riid, ppvResource); auto in_pHeap = GetObjectInfo(pHeap); - if(!ppvResource->IsNull()) ppvResource->SetHandleLength(1); DxObjectInfo object_info_ppvResource{}; - ppvResource->SetConsumerData(0, &object_info_ppvResource); + if(!ppvResource->IsNull()) + { + ppvResource->SetHandleLength(1); + ppvResource->SetConsumerData(0, &object_info_ppvResource); + } auto replay_result = OverrideCreatePlacedResource2(replay_object, return_value, in_pHeap, @@ -12429,9 +13194,12 @@ void Dx12ReplayConsumer::Process_ID3D12Device10_CreateReservedResource2( riid, ppvResource); auto in_pProtectedSession = GetObjectInfo(pProtectedSession); - if(!ppvResource->IsNull()) ppvResource->SetHandleLength(1); DxObjectInfo object_info_ppvResource{}; - ppvResource->SetConsumerData(0, &object_info_ppvResource); + if(!ppvResource->IsNull()) + { + ppvResource->SetHandleLength(1); + ppvResource->SetConsumerData(0, &object_info_ppvResource); + } auto replay_result = OverrideCreateReservedResource2(replay_object, return_value, pDesc, @@ -12514,12 +13282,16 @@ void Dx12ReplayConsumer::Process_ID3D12Device12_GetResourceAllocationInfo3( pNumCastableFormats, ppCastableFormats, pResourceAllocationInfo1); + if(!pResourceAllocationInfo1->IsNull()) + { + pResourceAllocationInfo1->AllocateOutputData(numResourceDescs); + } auto replay_result = reinterpret_cast(replay_object->object)->GetResourceAllocationInfo3(visibleMask, numResourceDescs, pResourceDescs->GetPointer(), pNumCastableFormats->GetPointer(), ppCastableFormats->GetPointer(), - pResourceAllocationInfo1->GetPointer()); + pResourceAllocationInfo1->GetOutputPointer()); CustomReplayPostCall::Dispatch( this, call_info, @@ -12588,9 +13360,13 @@ void Dx12ReplayConsumer::Process_ID3D12VirtualizationGuestDevice_CreateFenceFd( FenceValue, pFenceFd); auto in_pFence = MapObject(pFence); + if(!pFenceFd->IsNull()) + { + pFenceFd->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->CreateFenceFd(in_pFence, FenceValue, - pFenceFd->GetPointer()); + pFenceFd->GetOutputPointer()); CheckReplayResult("ID3D12VirtualizationGuestDevice_CreateFenceFd", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -12916,9 +13692,12 @@ void Dx12ReplayConsumer::Process_ID3D12DeviceFactory_CreateDevice( riid, ppvDevice); auto in_adapter = GetObjectInfo(adapter); - if(!ppvDevice->IsNull()) ppvDevice->SetHandleLength(1); DxObjectInfo object_info_ppvDevice{}; - ppvDevice->SetConsumerData(0, &object_info_ppvDevice); + if(!ppvDevice->IsNull()) + { + ppvDevice->SetHandleLength(1); + ppvDevice->SetConsumerData(0, &object_info_ppvDevice); + } auto replay_result = OverrideD3D12DeviceFactoryCreateDevice(replay_object, return_value, in_adapter, @@ -12977,7 +13756,11 @@ void Dx12ReplayConsumer::Process_ID3D12DeviceConfiguration_GetEnabledExperimenta replay_object, pGuids, NumGuids); - auto replay_result = reinterpret_cast(replay_object->object)->GetEnabledExperimentalFeatures(pGuids->GetPointer(), + if(!pGuids->IsNull()) + { + pGuids->AllocateOutputData(NumGuids); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetEnabledExperimentalFeatures(pGuids->GetOutputPointer(), NumGuids); CheckReplayResult("ID3D12DeviceConfiguration_GetEnabledExperimentalFeatures", return_value, replay_result); CustomReplayPostCall::Dispatch( @@ -13446,9 +14229,13 @@ void Dx12ReplayConsumer::Process_ID3DDestructionNotifier_RegisterDestructionCall pData, pCallbackID); auto in_pData = PreProcessExternalObject(pData, format::ApiCallId::ApiCall_ID3DDestructionNotifier_RegisterDestructionCallback, "ID3DDestructionNotifier_RegisterDestructionCallback"); + if(!pCallbackID->IsNull()) + { + pCallbackID->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->RegisterDestructionCallback(reinterpret_cast(callbackFn), in_pData, - pCallbackID->GetPointer()); + pCallbackID->GetOutputPointer()); CheckReplayResult("ID3DDestructionNotifier_RegisterDestructionCallback", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -13767,8 +14554,12 @@ void Dx12ReplayConsumer::Process_ID3D12DebugDevice1_GetDebugParameter( Type, pData, DataSize); + if(!pData->IsNull()) + { + pData->AllocateOutputData(DataSize); + } auto replay_result = reinterpret_cast(replay_object->object)->GetDebugParameter(Type, - pData->GetPointer(), + pData->GetOutputPointer(), DataSize); CheckReplayResult("ID3D12DebugDevice1_GetDebugParameter", return_value, replay_result); CustomReplayPostCall::Dispatch( @@ -13923,8 +14714,12 @@ void Dx12ReplayConsumer::Process_ID3D12DebugDevice2_GetDebugParameter( Type, pData, DataSize); + if(!pData->IsNull()) + { + pData->AllocateOutputData(DataSize); + } auto replay_result = reinterpret_cast(replay_object->object)->GetDebugParameter(Type, - pData->GetPointer(), + pData->GetOutputPointer(), DataSize); CheckReplayResult("ID3D12DebugDevice2_GetDebugParameter", return_value, replay_result); CustomReplayPostCall::Dispatch( @@ -14113,8 +14908,12 @@ void Dx12ReplayConsumer::Process_ID3D12DebugCommandList1_GetDebugParameter( Type, pData, DataSize); + if(!pData->IsNull()) + { + pData->AllocateOutputData(DataSize); + } auto replay_result = reinterpret_cast(replay_object->object)->GetDebugParameter(Type, - pData->GetPointer(), + pData->GetOutputPointer(), DataSize); CheckReplayResult("ID3D12DebugCommandList1_GetDebugParameter", return_value, replay_result); CustomReplayPostCall::Dispatch( @@ -14253,8 +15052,12 @@ void Dx12ReplayConsumer::Process_ID3D12DebugCommandList2_GetDebugParameter( Type, pData, DataSize); + if(!pData->IsNull()) + { + pData->AllocateOutputData(DataSize); + } auto replay_result = reinterpret_cast(replay_object->object)->GetDebugParameter(Type, - pData->GetPointer(), + pData->GetOutputPointer(), DataSize); CheckReplayResult("ID3D12DebugCommandList2_GetDebugParameter", return_value, replay_result); CustomReplayPostCall::Dispatch( @@ -14519,9 +15322,18 @@ void Dx12ReplayConsumer::Process_ID3D12InfoQueue_GetMessage( MessageIndex, pMessage, pMessageByteLength); + if(!pMessageByteLength->IsNull()) + { + pMessageByteLength->AllocateOutputData(1, GetOutputArrayCount("ID3D12InfoQueue::GetMessage", return_value, object_id, VariableLengthArrayIndices::kD3D12InfoQueueArrayGetMessage, pMessageByteLength, pMessage)); + } + if(!pMessage->IsNull() && !pMessageByteLength->IsNull()) + { + pMessage->AllocateOutputData(*pMessageByteLength->GetOutputPointer()); + } auto replay_result = reinterpret_cast(replay_object->object)->GetMessage(MessageIndex, - pMessage->GetPointer(), - pMessageByteLength->GetPointer()); + pMessage->GetOutputPointer(), + pMessageByteLength->GetOutputPointer()); + if (pMessage->IsNull() && !pMessageByteLength->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D12InfoQueueArrayGetMessage, *pMessageByteLength->GetOutputPointer()); } CheckReplayResult("ID3D12InfoQueue_GetMessage", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -14693,8 +15505,17 @@ void Dx12ReplayConsumer::Process_ID3D12InfoQueue_GetStorageFilter( replay_object, pFilter, pFilterByteLength); - auto replay_result = reinterpret_cast(replay_object->object)->GetStorageFilter(pFilter->GetPointer(), - pFilterByteLength->GetPointer()); + if(!pFilterByteLength->IsNull()) + { + pFilterByteLength->AllocateOutputData(1, GetOutputArrayCount("ID3D12InfoQueue::GetStorageFilter", return_value, object_id, VariableLengthArrayIndices::kD3D12InfoQueueArrayGetStorageFilter, pFilterByteLength, pFilter)); + } + if(!pFilter->IsNull() && !pFilterByteLength->IsNull()) + { + pFilter->AllocateOutputData(*pFilterByteLength->GetOutputPointer()); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetStorageFilter(pFilter->GetOutputPointer(), + pFilterByteLength->GetOutputPointer()); + if (pFilter->IsNull() && !pFilterByteLength->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D12InfoQueueArrayGetStorageFilter, *pFilterByteLength->GetOutputPointer()); } CheckReplayResult("ID3D12InfoQueue_GetStorageFilter", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -14869,8 +15690,17 @@ void Dx12ReplayConsumer::Process_ID3D12InfoQueue_GetRetrievalFilter( replay_object, pFilter, pFilterByteLength); - auto replay_result = reinterpret_cast(replay_object->object)->GetRetrievalFilter(pFilter->GetPointer(), - pFilterByteLength->GetPointer()); + if(!pFilterByteLength->IsNull()) + { + pFilterByteLength->AllocateOutputData(1, GetOutputArrayCount("ID3D12InfoQueue::GetRetrievalFilter", return_value, object_id, VariableLengthArrayIndices::kD3D12InfoQueueArrayGetRetrievalFilter, pFilterByteLength, pFilter)); + } + if(!pFilter->IsNull() && !pFilterByteLength->IsNull()) + { + pFilter->AllocateOutputData(*pFilterByteLength->GetOutputPointer()); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetRetrievalFilter(pFilter->GetOutputPointer(), + pFilterByteLength->GetOutputPointer()); + if (pFilter->IsNull() && !pFilterByteLength->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D12InfoQueueArrayGetRetrievalFilter, *pFilterByteLength->GetOutputPointer()); } CheckReplayResult("ID3D12InfoQueue_GetRetrievalFilter", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -15285,10 +16115,14 @@ void Dx12ReplayConsumer::Process_ID3D12InfoQueue1_RegisterMessageCallback( pContext, pCallbackCookie); auto in_pContext = PreProcessExternalObject(pContext, format::ApiCallId::ApiCall_ID3D12InfoQueue1_RegisterMessageCallback, "ID3D12InfoQueue1_RegisterMessageCallback"); + if(!pCallbackCookie->IsNull()) + { + pCallbackCookie->AllocateOutputData(1); + } auto replay_result = reinterpret_cast(replay_object->object)->RegisterMessageCallback(reinterpret_cast(CallbackFunc), CallbackFilterFlags, in_pContext, - pCallbackCookie->GetPointer()); + pCallbackCookie->GetOutputPointer()); CheckReplayResult("ID3D12InfoQueue1_RegisterMessageCallback", return_value, replay_result); CustomReplayPostCall::Dispatch( this, @@ -15325,6 +16159,12954 @@ void Dx12ReplayConsumer::Process_ID3D12InfoQueue1_UnregisterMessageCallback( } } +void Dx12ReplayConsumer::Process_ID3D11DeviceChild_GetDevice( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDevice) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppDevice); + if(!ppDevice->IsNull()) ppDevice->SetHandleLength(1); + auto out_p_ppDevice = ppDevice->GetPointer(); + auto out_hp_ppDevice = ppDevice->GetHandlePointer(); + reinterpret_cast(replay_object->object)->GetDevice(out_hp_ppDevice); + AddObject(out_p_ppDevice, out_hp_ppDevice, format::ApiCall_ID3D11DeviceChild_GetDevice); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppDevice); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceChild_GetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + PointerDecoder* pDataSize, + PointerDecoder* pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + guid, + pDataSize, + pData); + if(!pDataSize->IsNull()) + { + pDataSize->AllocateOutputData(1, GetOutputArrayCount("ID3D11DeviceChild::GetPrivateData", return_value, object_id, VariableLengthArrayIndices::kD3D11DeviceChildArrayGetPrivateData, pDataSize, pData)); + } + if(!pData->IsNull() && !pDataSize->IsNull()) + { + pData->AllocateOutputData(*pDataSize->GetOutputPointer()); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetPrivateData(*guid.decoded_value, + pDataSize->GetOutputPointer(), + pData->GetOutputPointer()); + if (pData->IsNull() && !pDataSize->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11DeviceChildArrayGetPrivateData, *pDataSize->GetOutputPointer()); } + CheckReplayResult("ID3D11DeviceChild_GetPrivateData", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + guid, + pDataSize, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceChild_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + guid, + DataSize, + pData); + auto replay_result = reinterpret_cast(replay_object->object)->SetPrivateData(*guid.decoded_value, + DataSize, + pData->GetPointer()); + CheckReplayResult("ID3D11DeviceChild_SetPrivateData", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + guid, + DataSize, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceChild_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + guid, + pData); + auto in_pData = MapObject(pData); + auto replay_result = reinterpret_cast(replay_object->object)->SetPrivateDataInterface(*guid.decoded_value, + in_pData); + CheckReplayResult("ID3D11DeviceChild_SetPrivateDataInterface", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + guid, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DepthStencilState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11BlendState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11RasterizerState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Resource_GetType( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pResourceDimension) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResourceDimension); + if(!pResourceDimension->IsNull()) + { + pResourceDimension->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetType(pResourceDimension->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResourceDimension); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Resource_SetEvictionPriority( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT EvictionPriority) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + EvictionPriority); + reinterpret_cast(replay_object->object)->SetEvictionPriority(EvictionPriority); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + EvictionPriority); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Resource_GetEvictionPriority( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->GetEvictionPriority(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Buffer_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Texture1D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Texture2D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Texture3D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11View_GetResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResource) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppResource); + if(!ppResource->IsNull()) ppResource->SetHandleLength(1); + auto out_p_ppResource = ppResource->GetPointer(); + auto out_hp_ppResource = ppResource->GetHandlePointer(); + reinterpret_cast(replay_object->object)->GetResource(out_hp_ppResource); + AddObject(out_p_ppResource, out_hp_ppResource, format::ApiCall_ID3D11View_GetResource); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppResource); + } +} + +void Dx12ReplayConsumer::Process_ID3D11ShaderResourceView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11RenderTargetView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DepthStencilView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11UnorderedAccessView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11SamplerState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Asynchronous_GetDataSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->GetDataSize(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Query_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Counter_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11ClassInstance_GetClassLinkage( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppLinkage) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppLinkage); + if(!ppLinkage->IsNull()) ppLinkage->SetHandleLength(1); + auto out_p_ppLinkage = ppLinkage->GetPointer(); + auto out_hp_ppLinkage = ppLinkage->GetHandlePointer(); + reinterpret_cast(replay_object->object)->GetClassLinkage(out_hp_ppLinkage); + AddObject(out_p_ppLinkage, out_hp_ppLinkage, format::ApiCall_ID3D11ClassInstance_GetClassLinkage); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppLinkage); + } +} + +void Dx12ReplayConsumer::Process_ID3D11ClassInstance_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11ClassInstance_GetInstanceName( + const ApiCallInfo& call_info, + format::HandleId object_id, + StringDecoder* pInstanceName, + PointerDecoder* pBufferLength) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pInstanceName, + pBufferLength); + if(!pBufferLength->IsNull()) + { + pBufferLength->AllocateOutputData(1, GetOutputArrayCount("ID3D11ClassInstance::GetInstanceName", S_OK, object_id, VariableLengthArrayIndices::kD3D11ClassInstanceArrayGetInstanceName, pBufferLength, pInstanceName)); + } + if(!pInstanceName->IsNull() && !pBufferLength->IsNull()) + { + pInstanceName->AllocateOutputData(*pBufferLength->GetOutputPointer()); + } + reinterpret_cast(replay_object->object)->GetInstanceName(pInstanceName->GetOutputPointer(), + pBufferLength->GetOutputPointer()); + if (pInstanceName->IsNull() && !pBufferLength->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11ClassInstanceArrayGetInstanceName, *pBufferLength->GetOutputPointer()); } + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pInstanceName, + pBufferLength); + } +} + +void Dx12ReplayConsumer::Process_ID3D11ClassInstance_GetTypeName( + const ApiCallInfo& call_info, + format::HandleId object_id, + StringDecoder* pTypeName, + PointerDecoder* pBufferLength) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pTypeName, + pBufferLength); + if(!pBufferLength->IsNull()) + { + pBufferLength->AllocateOutputData(1, GetOutputArrayCount("ID3D11ClassInstance::GetTypeName", S_OK, object_id, VariableLengthArrayIndices::kD3D11ClassInstanceArrayGetTypeName, pBufferLength, pTypeName)); + } + if(!pTypeName->IsNull() && !pBufferLength->IsNull()) + { + pTypeName->AllocateOutputData(*pBufferLength->GetOutputPointer()); + } + reinterpret_cast(replay_object->object)->GetTypeName(pTypeName->GetOutputPointer(), + pBufferLength->GetOutputPointer()); + if (pTypeName->IsNull() && !pBufferLength->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11ClassInstanceArrayGetTypeName, *pBufferLength->GetOutputPointer()); } + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pTypeName, + pBufferLength); + } +} + +void Dx12ReplayConsumer::Process_ID3D11ClassLinkage_GetClassInstance( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StringDecoder* pClassInstanceName, + UINT InstanceIndex, + HandlePointerDecoder* ppInstance) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pClassInstanceName, + InstanceIndex, + ppInstance); + if(!ppInstance->IsNull()) ppInstance->SetHandleLength(1); + auto out_p_ppInstance = ppInstance->GetPointer(); + auto out_hp_ppInstance = ppInstance->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->GetClassInstance(pClassInstanceName->GetPointer(), + InstanceIndex, + out_hp_ppInstance); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppInstance, out_hp_ppInstance, format::ApiCall_ID3D11ClassLinkage_GetClassInstance); + } + CheckReplayResult("ID3D11ClassLinkage_GetClassInstance", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pClassInstanceName, + InstanceIndex, + ppInstance); + } +} + +void Dx12ReplayConsumer::Process_ID3D11ClassLinkage_CreateClassInstance( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StringDecoder* pClassTypeName, + UINT ConstantBufferOffset, + UINT ConstantVectorOffset, + UINT TextureOffset, + UINT SamplerOffset, + HandlePointerDecoder* ppInstance) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pClassTypeName, + ConstantBufferOffset, + ConstantVectorOffset, + TextureOffset, + SamplerOffset, + ppInstance); + if(!ppInstance->IsNull()) ppInstance->SetHandleLength(1); + auto out_p_ppInstance = ppInstance->GetPointer(); + auto out_hp_ppInstance = ppInstance->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateClassInstance(pClassTypeName->GetPointer(), + ConstantBufferOffset, + ConstantVectorOffset, + TextureOffset, + SamplerOffset, + out_hp_ppInstance); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppInstance, out_hp_ppInstance, format::ApiCall_ID3D11ClassLinkage_CreateClassInstance); + } + CheckReplayResult("ID3D11ClassLinkage_CreateClassInstance", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pClassTypeName, + ConstantBufferOffset, + ConstantVectorOffset, + TextureOffset, + SamplerOffset, + ppInstance); + } +} + +void Dx12ReplayConsumer::Process_ID3D11CommandList_GetContextFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->GetContextFlags(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_VSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + auto in_ppConstantBuffers = MapObjects(ppConstantBuffers, NumBuffers); + reinterpret_cast(replay_object->object)->VSSetConstantBuffers(StartSlot, + NumBuffers, + in_ppConstantBuffers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_PSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + auto in_ppShaderResourceViews = MapObjects(ppShaderResourceViews, NumViews); + reinterpret_cast(replay_object->object)->PSSetShaderResources(StartSlot, + NumViews, + in_ppShaderResourceViews); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_PSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pPixelShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pPixelShader, + ppClassInstances, + NumClassInstances); + auto in_pPixelShader = MapObject(pPixelShader); + auto in_ppClassInstances = MapObjects(ppClassInstances, NumClassInstances); + reinterpret_cast(replay_object->object)->PSSetShader(in_pPixelShader, + in_ppClassInstances, + NumClassInstances); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pPixelShader, + ppClassInstances, + NumClassInstances); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_PSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + auto in_ppSamplers = MapObjects(ppSamplers, NumSamplers); + reinterpret_cast(replay_object->object)->PSSetSamplers(StartSlot, + NumSamplers, + in_ppSamplers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_VSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVertexShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVertexShader, + ppClassInstances, + NumClassInstances); + auto in_pVertexShader = MapObject(pVertexShader); + auto in_ppClassInstances = MapObjects(ppClassInstances, NumClassInstances); + reinterpret_cast(replay_object->object)->VSSetShader(in_pVertexShader, + in_ppClassInstances, + NumClassInstances); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVertexShader, + ppClassInstances, + NumClassInstances); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DrawIndexed( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT IndexCount, + UINT StartIndexLocation, + INT BaseVertexLocation) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + IndexCount, + StartIndexLocation, + BaseVertexLocation); + reinterpret_cast(replay_object->object)->DrawIndexed(IndexCount, + StartIndexLocation, + BaseVertexLocation); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + IndexCount, + StartIndexLocation, + BaseVertexLocation); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_Draw( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT VertexCount, + UINT StartVertexLocation) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + VertexCount, + StartVertexLocation); + reinterpret_cast(replay_object->object)->Draw(VertexCount, + StartVertexLocation); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + VertexCount, + StartVertexLocation); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_Map( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + UINT Subresource, + D3D11_MAP MapType, + UINT MapFlags, + StructPointerDecoder* pMappedResource) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource, + Subresource, + MapType, + MapFlags, + pMappedResource); + auto in_pResource = GetObjectInfo(pResource); + if(!pMappedResource->IsNull()) + { + pMappedResource->AllocateOutputData(1); + } + auto replay_result = OverrideDeviceContextMap(replay_object, + return_value, + in_pResource, + Subresource, + MapType, + MapFlags, + pMappedResource); + CheckReplayResult("ID3D11DeviceContext_Map", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource, + Subresource, + MapType, + MapFlags, + pMappedResource); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_Unmap( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource, + UINT Subresource) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource, + Subresource); + auto in_pResource = GetObjectInfo(pResource); + OverrideDeviceContextUnmap(replay_object, + in_pResource, + Subresource); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource, + Subresource); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_PSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + auto in_ppConstantBuffers = MapObjects(ppConstantBuffers, NumBuffers); + reinterpret_cast(replay_object->object)->PSSetConstantBuffers(StartSlot, + NumBuffers, + in_ppConstantBuffers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_IASetInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pInputLayout) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pInputLayout); + auto in_pInputLayout = MapObject(pInputLayout); + reinterpret_cast(replay_object->object)->IASetInputLayout(in_pInputLayout); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pInputLayout); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_IASetVertexBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppVertexBuffers, + PointerDecoder* pStrides, + PointerDecoder* pOffsets) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppVertexBuffers, + pStrides, + pOffsets); + auto in_ppVertexBuffers = MapObjects(ppVertexBuffers, NumBuffers); + reinterpret_cast(replay_object->object)->IASetVertexBuffers(StartSlot, + NumBuffers, + in_ppVertexBuffers, + pStrides->GetPointer(), + pOffsets->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppVertexBuffers, + pStrides, + pOffsets); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_IASetIndexBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pIndexBuffer, + DXGI_FORMAT Format, + UINT Offset) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pIndexBuffer, + Format, + Offset); + auto in_pIndexBuffer = MapObject(pIndexBuffer); + reinterpret_cast(replay_object->object)->IASetIndexBuffer(in_pIndexBuffer, + Format, + Offset); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pIndexBuffer, + Format, + Offset); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DrawIndexedInstanced( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT IndexCountPerInstance, + UINT InstanceCount, + UINT StartIndexLocation, + INT BaseVertexLocation, + UINT StartInstanceLocation) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + IndexCountPerInstance, + InstanceCount, + StartIndexLocation, + BaseVertexLocation, + StartInstanceLocation); + reinterpret_cast(replay_object->object)->DrawIndexedInstanced(IndexCountPerInstance, + InstanceCount, + StartIndexLocation, + BaseVertexLocation, + StartInstanceLocation); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + IndexCountPerInstance, + InstanceCount, + StartIndexLocation, + BaseVertexLocation, + StartInstanceLocation); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DrawInstanced( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT VertexCountPerInstance, + UINT InstanceCount, + UINT StartVertexLocation, + UINT StartInstanceLocation) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + VertexCountPerInstance, + InstanceCount, + StartVertexLocation, + StartInstanceLocation); + reinterpret_cast(replay_object->object)->DrawInstanced(VertexCountPerInstance, + InstanceCount, + StartVertexLocation, + StartInstanceLocation); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + VertexCountPerInstance, + InstanceCount, + StartVertexLocation, + StartInstanceLocation); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_GSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + auto in_ppConstantBuffers = MapObjects(ppConstantBuffers, NumBuffers); + reinterpret_cast(replay_object->object)->GSSetConstantBuffers(StartSlot, + NumBuffers, + in_ppConstantBuffers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_GSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pShader, + ppClassInstances, + NumClassInstances); + auto in_pShader = MapObject(pShader); + auto in_ppClassInstances = MapObjects(ppClassInstances, NumClassInstances); + reinterpret_cast(replay_object->object)->GSSetShader(in_pShader, + in_ppClassInstances, + NumClassInstances); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pShader, + ppClassInstances, + NumClassInstances); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_IASetPrimitiveTopology( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D_PRIMITIVE_TOPOLOGY Topology) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + Topology); + reinterpret_cast(replay_object->object)->IASetPrimitiveTopology(Topology); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + Topology); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_VSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + auto in_ppShaderResourceViews = MapObjects(ppShaderResourceViews, NumViews); + reinterpret_cast(replay_object->object)->VSSetShaderResources(StartSlot, + NumViews, + in_ppShaderResourceViews); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_VSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + auto in_ppSamplers = MapObjects(ppSamplers, NumSamplers); + reinterpret_cast(replay_object->object)->VSSetSamplers(StartSlot, + NumSamplers, + in_ppSamplers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_Begin( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pAsync) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pAsync); + auto in_pAsync = MapObject(pAsync); + reinterpret_cast(replay_object->object)->Begin(in_pAsync); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pAsync); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_End( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pAsync) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pAsync); + auto in_pAsync = MapObject(pAsync); + reinterpret_cast(replay_object->object)->End(in_pAsync); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pAsync); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_GetData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pAsync, + PointerDecoder* pData, + UINT DataSize, + UINT GetDataFlags) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pAsync, + pData, + DataSize, + GetDataFlags); + auto in_pAsync = GetObjectInfo(pAsync); + if(!pData->IsNull()) + { + pData->AllocateOutputData(DataSize); + } + auto replay_result = OverrideDeviceContextGetData(replay_object, + return_value, + in_pAsync, + pData, + DataSize, + GetDataFlags); + CheckReplayResult("ID3D11DeviceContext_GetData", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pAsync, + pData, + DataSize, + GetDataFlags); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_SetPredication( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pPredicate, + BOOL PredicateValue) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pPredicate, + PredicateValue); + auto in_pPredicate = MapObject(pPredicate); + reinterpret_cast(replay_object->object)->SetPredication(in_pPredicate, + PredicateValue); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pPredicate, + PredicateValue); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_GSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + auto in_ppShaderResourceViews = MapObjects(ppShaderResourceViews, NumViews); + reinterpret_cast(replay_object->object)->GSSetShaderResources(StartSlot, + NumViews, + in_ppShaderResourceViews); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_GSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + auto in_ppSamplers = MapObjects(ppSamplers, NumSamplers); + reinterpret_cast(replay_object->object)->GSSetSamplers(StartSlot, + NumSamplers, + in_ppSamplers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_OMSetRenderTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViews, + HandlePointerDecoder* ppRenderTargetViews, + format::HandleId pDepthStencilView) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + NumViews, + ppRenderTargetViews, + pDepthStencilView); + auto in_ppRenderTargetViews = MapObjects(ppRenderTargetViews, NumViews); + auto in_pDepthStencilView = MapObject(pDepthStencilView); + reinterpret_cast(replay_object->object)->OMSetRenderTargets(NumViews, + in_ppRenderTargetViews, + in_pDepthStencilView); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + NumViews, + ppRenderTargetViews, + pDepthStencilView); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRTVs, + HandlePointerDecoder* ppRenderTargetViews, + format::HandleId pDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews, + PointerDecoder* pUAVInitialCounts) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + NumRTVs, + ppRenderTargetViews, + pDepthStencilView, + UAVStartSlot, + NumUAVs, + ppUnorderedAccessViews, + pUAVInitialCounts); + auto in_ppRenderTargetViews = MapObjects(ppRenderTargetViews, NumRTVs); + auto in_pDepthStencilView = MapObject(pDepthStencilView); + auto in_ppUnorderedAccessViews = MapObjects(ppUnorderedAccessViews, NumUAVs); + reinterpret_cast(replay_object->object)->OMSetRenderTargetsAndUnorderedAccessViews(NumRTVs, + in_ppRenderTargetViews, + in_pDepthStencilView, + UAVStartSlot, + NumUAVs, + in_ppUnorderedAccessViews, + pUAVInitialCounts->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + NumRTVs, + ppRenderTargetViews, + pDepthStencilView, + UAVStartSlot, + NumUAVs, + ppUnorderedAccessViews, + pUAVInitialCounts); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_OMSetBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBlendState, + PointerDecoder* BlendFactor, + UINT SampleMask) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pBlendState, + BlendFactor, + SampleMask); + auto in_pBlendState = MapObject(pBlendState); + reinterpret_cast(replay_object->object)->OMSetBlendState(in_pBlendState, + BlendFactor->GetPointer(), + SampleMask); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pBlendState, + BlendFactor, + SampleMask); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_OMSetDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDepthStencilState, + UINT StencilRef) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDepthStencilState, + StencilRef); + auto in_pDepthStencilState = MapObject(pDepthStencilState); + reinterpret_cast(replay_object->object)->OMSetDepthStencilState(in_pDepthStencilState, + StencilRef); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDepthStencilState, + StencilRef); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_SOSetTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumBuffers, + HandlePointerDecoder* ppSOTargets, + PointerDecoder* pOffsets) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + NumBuffers, + ppSOTargets, + pOffsets); + auto in_ppSOTargets = MapObjects(ppSOTargets, NumBuffers); + reinterpret_cast(replay_object->object)->SOSetTargets(NumBuffers, + in_ppSOTargets, + pOffsets->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + NumBuffers, + ppSOTargets, + pOffsets); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DrawAuto( + const ApiCallInfo& call_info, + format::HandleId object_id) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + reinterpret_cast(replay_object->object)->DrawAuto(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DrawIndexedInstancedIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pBufferForArgs, + AlignedByteOffsetForArgs); + auto in_pBufferForArgs = MapObject(pBufferForArgs); + reinterpret_cast(replay_object->object)->DrawIndexedInstancedIndirect(in_pBufferForArgs, + AlignedByteOffsetForArgs); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pBufferForArgs, + AlignedByteOffsetForArgs); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DrawInstancedIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pBufferForArgs, + AlignedByteOffsetForArgs); + auto in_pBufferForArgs = MapObject(pBufferForArgs); + reinterpret_cast(replay_object->object)->DrawInstancedIndirect(in_pBufferForArgs, + AlignedByteOffsetForArgs); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pBufferForArgs, + AlignedByteOffsetForArgs); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_Dispatch( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT ThreadGroupCountX, + UINT ThreadGroupCountY, + UINT ThreadGroupCountZ) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ThreadGroupCountX, + ThreadGroupCountY, + ThreadGroupCountZ); + reinterpret_cast(replay_object->object)->Dispatch(ThreadGroupCountX, + ThreadGroupCountY, + ThreadGroupCountZ); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ThreadGroupCountX, + ThreadGroupCountY, + ThreadGroupCountZ); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DispatchIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pBufferForArgs, + AlignedByteOffsetForArgs); + auto in_pBufferForArgs = MapObject(pBufferForArgs); + reinterpret_cast(replay_object->object)->DispatchIndirect(in_pBufferForArgs, + AlignedByteOffsetForArgs); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pBufferForArgs, + AlignedByteOffsetForArgs); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_RSSetState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pRasterizerState) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pRasterizerState); + auto in_pRasterizerState = MapObject(pRasterizerState); + reinterpret_cast(replay_object->object)->RSSetState(in_pRasterizerState); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pRasterizerState); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_RSSetViewports( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViewports, + StructPointerDecoder* pViewports) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + NumViewports, + pViewports); + reinterpret_cast(replay_object->object)->RSSetViewports(NumViewports, + pViewports->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + NumViewports, + pViewports); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_RSSetScissorRects( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRects, + StructPointerDecoder* pRects) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + NumRects, + pRects); + reinterpret_cast(replay_object->object)->RSSetScissorRects(NumRects, + pRects->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + NumRects, + pRects); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_CopySubresourceRegion( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDstResource, + DstSubresource, + DstX, + DstY, + DstZ, + pSrcResource, + SrcSubresource, + pSrcBox); + auto in_pDstResource = MapObject(pDstResource); + auto in_pSrcResource = MapObject(pSrcResource); + reinterpret_cast(replay_object->object)->CopySubresourceRegion(in_pDstResource, + DstSubresource, + DstX, + DstY, + DstZ, + in_pSrcResource, + SrcSubresource, + pSrcBox->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDstResource, + DstSubresource, + DstX, + DstY, + DstZ, + pSrcResource, + SrcSubresource, + pSrcBox); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_CopyResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + format::HandleId pSrcResource) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDstResource, + pSrcResource); + auto in_pDstResource = MapObject(pDstResource); + auto in_pSrcResource = MapObject(pSrcResource); + reinterpret_cast(replay_object->object)->CopyResource(in_pDstResource, + in_pSrcResource); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDstResource, + pSrcResource); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_CopyStructureCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstBuffer, + UINT DstAlignedByteOffset, + format::HandleId pSrcView) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDstBuffer, + DstAlignedByteOffset, + pSrcView); + auto in_pDstBuffer = MapObject(pDstBuffer); + auto in_pSrcView = MapObject(pSrcView); + reinterpret_cast(replay_object->object)->CopyStructureCount(in_pDstBuffer, + DstAlignedByteOffset, + in_pSrcView); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDstBuffer, + DstAlignedByteOffset, + pSrcView); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_ClearRenderTargetView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pRenderTargetView, + PointerDecoder* ColorRGBA) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pRenderTargetView, + ColorRGBA); + auto in_pRenderTargetView = MapObject(pRenderTargetView); + reinterpret_cast(replay_object->object)->ClearRenderTargetView(in_pRenderTargetView, + ColorRGBA->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pRenderTargetView, + ColorRGBA); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_ClearUnorderedAccessViewUint( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pUnorderedAccessView, + PointerDecoder* Values) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pUnorderedAccessView, + Values); + auto in_pUnorderedAccessView = MapObject(pUnorderedAccessView); + reinterpret_cast(replay_object->object)->ClearUnorderedAccessViewUint(in_pUnorderedAccessView, + Values->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pUnorderedAccessView, + Values); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_ClearUnorderedAccessViewFloat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pUnorderedAccessView, + PointerDecoder* Values) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pUnorderedAccessView, + Values); + auto in_pUnorderedAccessView = MapObject(pUnorderedAccessView); + reinterpret_cast(replay_object->object)->ClearUnorderedAccessViewFloat(in_pUnorderedAccessView, + Values->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pUnorderedAccessView, + Values); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_ClearDepthStencilView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDepthStencilView, + UINT ClearFlags, + FLOAT Depth, + UINT8 Stencil) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDepthStencilView, + ClearFlags, + Depth, + Stencil); + auto in_pDepthStencilView = MapObject(pDepthStencilView); + reinterpret_cast(replay_object->object)->ClearDepthStencilView(in_pDepthStencilView, + ClearFlags, + Depth, + Stencil); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDepthStencilView, + ClearFlags, + Depth, + Stencil); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_GenerateMips( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pShaderResourceView) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pShaderResourceView); + auto in_pShaderResourceView = MapObject(pShaderResourceView); + reinterpret_cast(replay_object->object)->GenerateMips(in_pShaderResourceView); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pShaderResourceView); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_SetResourceMinLOD( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource, + FLOAT MinLOD) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource, + MinLOD); + auto in_pResource = MapObject(pResource); + reinterpret_cast(replay_object->object)->SetResourceMinLOD(in_pResource, + MinLOD); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource, + MinLOD); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_GetResourceMinLOD( + const ApiCallInfo& call_info, + format::HandleId object_id, + FLOAT return_value, + format::HandleId pResource) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource); + auto in_pResource = MapObject(pResource); + auto replay_result = reinterpret_cast(replay_object->object)->GetResourceMinLOD(in_pResource); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_ResolveSubresource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + format::HandleId pSrcResource, + UINT SrcSubresource, + DXGI_FORMAT Format) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDstResource, + DstSubresource, + pSrcResource, + SrcSubresource, + Format); + auto in_pDstResource = MapObject(pDstResource); + auto in_pSrcResource = MapObject(pSrcResource); + reinterpret_cast(replay_object->object)->ResolveSubresource(in_pDstResource, + DstSubresource, + in_pSrcResource, + SrcSubresource, + Format); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDstResource, + DstSubresource, + pSrcResource, + SrcSubresource, + Format); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_ExecuteCommandList( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCommandList, + BOOL RestoreContextState) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCommandList, + RestoreContextState); + auto in_pCommandList = MapObject(pCommandList); + reinterpret_cast(replay_object->object)->ExecuteCommandList(in_pCommandList, + RestoreContextState); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCommandList, + RestoreContextState); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_HSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + auto in_ppShaderResourceViews = MapObjects(ppShaderResourceViews, NumViews); + reinterpret_cast(replay_object->object)->HSSetShaderResources(StartSlot, + NumViews, + in_ppShaderResourceViews); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_HSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pHullShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pHullShader, + ppClassInstances, + NumClassInstances); + auto in_pHullShader = MapObject(pHullShader); + auto in_ppClassInstances = MapObjects(ppClassInstances, NumClassInstances); + reinterpret_cast(replay_object->object)->HSSetShader(in_pHullShader, + in_ppClassInstances, + NumClassInstances); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pHullShader, + ppClassInstances, + NumClassInstances); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_HSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + auto in_ppSamplers = MapObjects(ppSamplers, NumSamplers); + reinterpret_cast(replay_object->object)->HSSetSamplers(StartSlot, + NumSamplers, + in_ppSamplers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_HSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + auto in_ppConstantBuffers = MapObjects(ppConstantBuffers, NumBuffers); + reinterpret_cast(replay_object->object)->HSSetConstantBuffers(StartSlot, + NumBuffers, + in_ppConstantBuffers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + auto in_ppShaderResourceViews = MapObjects(ppShaderResourceViews, NumViews); + reinterpret_cast(replay_object->object)->DSSetShaderResources(StartSlot, + NumViews, + in_ppShaderResourceViews); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDomainShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDomainShader, + ppClassInstances, + NumClassInstances); + auto in_pDomainShader = MapObject(pDomainShader); + auto in_ppClassInstances = MapObjects(ppClassInstances, NumClassInstances); + reinterpret_cast(replay_object->object)->DSSetShader(in_pDomainShader, + in_ppClassInstances, + NumClassInstances); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDomainShader, + ppClassInstances, + NumClassInstances); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + auto in_ppSamplers = MapObjects(ppSamplers, NumSamplers); + reinterpret_cast(replay_object->object)->DSSetSamplers(StartSlot, + NumSamplers, + in_ppSamplers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + auto in_ppConstantBuffers = MapObjects(ppConstantBuffers, NumBuffers); + reinterpret_cast(replay_object->object)->DSSetConstantBuffers(StartSlot, + NumBuffers, + in_ppConstantBuffers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_CSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + auto in_ppShaderResourceViews = MapObjects(ppShaderResourceViews, NumViews); + reinterpret_cast(replay_object->object)->CSSetShaderResources(StartSlot, + NumViews, + in_ppShaderResourceViews); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_CSSetUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews, + PointerDecoder* pUAVInitialCounts) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumUAVs, + ppUnorderedAccessViews, + pUAVInitialCounts); + auto in_ppUnorderedAccessViews = MapObjects(ppUnorderedAccessViews, NumUAVs); + reinterpret_cast(replay_object->object)->CSSetUnorderedAccessViews(StartSlot, + NumUAVs, + in_ppUnorderedAccessViews, + pUAVInitialCounts->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumUAVs, + ppUnorderedAccessViews, + pUAVInitialCounts); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_CSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pComputeShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pComputeShader, + ppClassInstances, + NumClassInstances); + auto in_pComputeShader = MapObject(pComputeShader); + auto in_ppClassInstances = MapObjects(ppClassInstances, NumClassInstances); + reinterpret_cast(replay_object->object)->CSSetShader(in_pComputeShader, + in_ppClassInstances, + NumClassInstances); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pComputeShader, + ppClassInstances, + NumClassInstances); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_CSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + auto in_ppSamplers = MapObjects(ppSamplers, NumSamplers); + reinterpret_cast(replay_object->object)->CSSetSamplers(StartSlot, + NumSamplers, + in_ppSamplers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_CSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + auto in_ppConstantBuffers = MapObjects(ppConstantBuffers, NumBuffers); + reinterpret_cast(replay_object->object)->CSSetConstantBuffers(StartSlot, + NumBuffers, + in_ppConstantBuffers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_VSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + if(!ppConstantBuffers->IsNull()) ppConstantBuffers->SetHandleLength(NumBuffers); + auto out_p_ppConstantBuffers = ppConstantBuffers->GetPointer(); + auto out_hp_ppConstantBuffers = ppConstantBuffers->GetHandlePointer(); + reinterpret_cast(replay_object->object)->VSGetConstantBuffers(StartSlot, + NumBuffers, + out_hp_ppConstantBuffers); + AddObjects(out_p_ppConstantBuffers, ppConstantBuffers->GetLength(), out_hp_ppConstantBuffers, NumBuffers, format::ApiCall_ID3D11DeviceContext_VSGetConstantBuffers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_PSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + if(!ppShaderResourceViews->IsNull()) ppShaderResourceViews->SetHandleLength(NumViews); + auto out_p_ppShaderResourceViews = ppShaderResourceViews->GetPointer(); + auto out_hp_ppShaderResourceViews = ppShaderResourceViews->GetHandlePointer(); + reinterpret_cast(replay_object->object)->PSGetShaderResources(StartSlot, + NumViews, + out_hp_ppShaderResourceViews); + AddObjects(out_p_ppShaderResourceViews, ppShaderResourceViews->GetLength(), out_hp_ppShaderResourceViews, NumViews, format::ApiCall_ID3D11DeviceContext_PSGetShaderResources); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_PSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppPixelShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppPixelShader, + ppClassInstances, + pNumClassInstances); + if(!ppPixelShader->IsNull()) ppPixelShader->SetHandleLength(1); + auto out_p_ppPixelShader = ppPixelShader->GetPointer(); + auto out_hp_ppPixelShader = ppPixelShader->GetHandlePointer(); + if(!pNumClassInstances->IsNull()) + { + pNumClassInstances->AllocateOutputData(1, GetOutputArrayCount("ID3D11DeviceContext::PSGetShader", S_OK, object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayPSGetShader, pNumClassInstances, ppClassInstances)); + } + if(!ppClassInstances->IsNull() && !pNumClassInstances->IsNull()) + { + ppClassInstances->SetHandleLength(*pNumClassInstances->GetOutputPointer()); + } + auto out_p_ppClassInstances = ppClassInstances->GetPointer(); + auto out_hp_ppClassInstances = ppClassInstances->GetHandlePointer(); + reinterpret_cast(replay_object->object)->PSGetShader(out_hp_ppPixelShader, + out_hp_ppClassInstances, + pNumClassInstances->GetOutputPointer()); + if (ppClassInstances->IsNull() && !pNumClassInstances->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayPSGetShader, *pNumClassInstances->GetOutputPointer()); } + AddObject(out_p_ppPixelShader, out_hp_ppPixelShader, format::ApiCall_ID3D11DeviceContext_PSGetShader); + AddObjects(out_p_ppClassInstances, ppClassInstances->GetLength(), out_hp_ppClassInstances, !pNumClassInstances->IsNull() ? *pNumClassInstances->GetOutputPointer() : 0, format::ApiCall_ID3D11DeviceContext_PSGetShader); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppPixelShader, + ppClassInstances, + pNumClassInstances); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_PSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + if(!ppSamplers->IsNull()) ppSamplers->SetHandleLength(NumSamplers); + auto out_p_ppSamplers = ppSamplers->GetPointer(); + auto out_hp_ppSamplers = ppSamplers->GetHandlePointer(); + reinterpret_cast(replay_object->object)->PSGetSamplers(StartSlot, + NumSamplers, + out_hp_ppSamplers); + AddObjects(out_p_ppSamplers, ppSamplers->GetLength(), out_hp_ppSamplers, NumSamplers, format::ApiCall_ID3D11DeviceContext_PSGetSamplers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_VSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppVertexShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppVertexShader, + ppClassInstances, + pNumClassInstances); + if(!ppVertexShader->IsNull()) ppVertexShader->SetHandleLength(1); + auto out_p_ppVertexShader = ppVertexShader->GetPointer(); + auto out_hp_ppVertexShader = ppVertexShader->GetHandlePointer(); + if(!pNumClassInstances->IsNull()) + { + pNumClassInstances->AllocateOutputData(1, GetOutputArrayCount("ID3D11DeviceContext::VSGetShader", S_OK, object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayVSGetShader, pNumClassInstances, ppClassInstances)); + } + if(!ppClassInstances->IsNull() && !pNumClassInstances->IsNull()) + { + ppClassInstances->SetHandleLength(*pNumClassInstances->GetOutputPointer()); + } + auto out_p_ppClassInstances = ppClassInstances->GetPointer(); + auto out_hp_ppClassInstances = ppClassInstances->GetHandlePointer(); + reinterpret_cast(replay_object->object)->VSGetShader(out_hp_ppVertexShader, + out_hp_ppClassInstances, + pNumClassInstances->GetOutputPointer()); + if (ppClassInstances->IsNull() && !pNumClassInstances->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayVSGetShader, *pNumClassInstances->GetOutputPointer()); } + AddObject(out_p_ppVertexShader, out_hp_ppVertexShader, format::ApiCall_ID3D11DeviceContext_VSGetShader); + AddObjects(out_p_ppClassInstances, ppClassInstances->GetLength(), out_hp_ppClassInstances, !pNumClassInstances->IsNull() ? *pNumClassInstances->GetOutputPointer() : 0, format::ApiCall_ID3D11DeviceContext_VSGetShader); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppVertexShader, + ppClassInstances, + pNumClassInstances); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_PSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + if(!ppConstantBuffers->IsNull()) ppConstantBuffers->SetHandleLength(NumBuffers); + auto out_p_ppConstantBuffers = ppConstantBuffers->GetPointer(); + auto out_hp_ppConstantBuffers = ppConstantBuffers->GetHandlePointer(); + reinterpret_cast(replay_object->object)->PSGetConstantBuffers(StartSlot, + NumBuffers, + out_hp_ppConstantBuffers); + AddObjects(out_p_ppConstantBuffers, ppConstantBuffers->GetLength(), out_hp_ppConstantBuffers, NumBuffers, format::ApiCall_ID3D11DeviceContext_PSGetConstantBuffers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_IAGetInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppInputLayout) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppInputLayout); + if(!ppInputLayout->IsNull()) ppInputLayout->SetHandleLength(1); + auto out_p_ppInputLayout = ppInputLayout->GetPointer(); + auto out_hp_ppInputLayout = ppInputLayout->GetHandlePointer(); + reinterpret_cast(replay_object->object)->IAGetInputLayout(out_hp_ppInputLayout); + AddObject(out_p_ppInputLayout, out_hp_ppInputLayout, format::ApiCall_ID3D11DeviceContext_IAGetInputLayout); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppInputLayout); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_IAGetVertexBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppVertexBuffers, + PointerDecoder* pStrides, + PointerDecoder* pOffsets) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppVertexBuffers, + pStrides, + pOffsets); + if(!ppVertexBuffers->IsNull()) ppVertexBuffers->SetHandleLength(NumBuffers); + auto out_p_ppVertexBuffers = ppVertexBuffers->GetPointer(); + auto out_hp_ppVertexBuffers = ppVertexBuffers->GetHandlePointer(); + if(!pStrides->IsNull()) + { + pStrides->AllocateOutputData(NumBuffers); + } + if(!pOffsets->IsNull()) + { + pOffsets->AllocateOutputData(NumBuffers); + } + reinterpret_cast(replay_object->object)->IAGetVertexBuffers(StartSlot, + NumBuffers, + out_hp_ppVertexBuffers, + pStrides->GetOutputPointer(), + pOffsets->GetOutputPointer()); + AddObjects(out_p_ppVertexBuffers, ppVertexBuffers->GetLength(), out_hp_ppVertexBuffers, NumBuffers, format::ApiCall_ID3D11DeviceContext_IAGetVertexBuffers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppVertexBuffers, + pStrides, + pOffsets); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_IAGetIndexBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* pIndexBuffer, + PointerDecoder* Format, + PointerDecoder* Offset) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pIndexBuffer, + Format, + Offset); + if(!pIndexBuffer->IsNull()) pIndexBuffer->SetHandleLength(1); + auto out_p_pIndexBuffer = pIndexBuffer->GetPointer(); + auto out_hp_pIndexBuffer = pIndexBuffer->GetHandlePointer(); + if(!Format->IsNull()) + { + Format->AllocateOutputData(1); + } + if(!Offset->IsNull()) + { + Offset->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->IAGetIndexBuffer(out_hp_pIndexBuffer, + Format->GetOutputPointer(), + Offset->GetOutputPointer()); + AddObject(out_p_pIndexBuffer, out_hp_pIndexBuffer, format::ApiCall_ID3D11DeviceContext_IAGetIndexBuffer); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pIndexBuffer, + Format, + Offset); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_GSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + if(!ppConstantBuffers->IsNull()) ppConstantBuffers->SetHandleLength(NumBuffers); + auto out_p_ppConstantBuffers = ppConstantBuffers->GetPointer(); + auto out_hp_ppConstantBuffers = ppConstantBuffers->GetHandlePointer(); + reinterpret_cast(replay_object->object)->GSGetConstantBuffers(StartSlot, + NumBuffers, + out_hp_ppConstantBuffers); + AddObjects(out_p_ppConstantBuffers, ppConstantBuffers->GetLength(), out_hp_ppConstantBuffers, NumBuffers, format::ApiCall_ID3D11DeviceContext_GSGetConstantBuffers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_GSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppGeometryShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppGeometryShader, + ppClassInstances, + pNumClassInstances); + if(!ppGeometryShader->IsNull()) ppGeometryShader->SetHandleLength(1); + auto out_p_ppGeometryShader = ppGeometryShader->GetPointer(); + auto out_hp_ppGeometryShader = ppGeometryShader->GetHandlePointer(); + if(!pNumClassInstances->IsNull()) + { + pNumClassInstances->AllocateOutputData(1, GetOutputArrayCount("ID3D11DeviceContext::GSGetShader", S_OK, object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayGSGetShader, pNumClassInstances, ppClassInstances)); + } + if(!ppClassInstances->IsNull() && !pNumClassInstances->IsNull()) + { + ppClassInstances->SetHandleLength(*pNumClassInstances->GetOutputPointer()); + } + auto out_p_ppClassInstances = ppClassInstances->GetPointer(); + auto out_hp_ppClassInstances = ppClassInstances->GetHandlePointer(); + reinterpret_cast(replay_object->object)->GSGetShader(out_hp_ppGeometryShader, + out_hp_ppClassInstances, + pNumClassInstances->GetOutputPointer()); + if (ppClassInstances->IsNull() && !pNumClassInstances->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayGSGetShader, *pNumClassInstances->GetOutputPointer()); } + AddObject(out_p_ppGeometryShader, out_hp_ppGeometryShader, format::ApiCall_ID3D11DeviceContext_GSGetShader); + AddObjects(out_p_ppClassInstances, ppClassInstances->GetLength(), out_hp_ppClassInstances, !pNumClassInstances->IsNull() ? *pNumClassInstances->GetOutputPointer() : 0, format::ApiCall_ID3D11DeviceContext_GSGetShader); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppGeometryShader, + ppClassInstances, + pNumClassInstances); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_IAGetPrimitiveTopology( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pTopology) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pTopology); + if(!pTopology->IsNull()) + { + pTopology->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->IAGetPrimitiveTopology(pTopology->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pTopology); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_VSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + if(!ppShaderResourceViews->IsNull()) ppShaderResourceViews->SetHandleLength(NumViews); + auto out_p_ppShaderResourceViews = ppShaderResourceViews->GetPointer(); + auto out_hp_ppShaderResourceViews = ppShaderResourceViews->GetHandlePointer(); + reinterpret_cast(replay_object->object)->VSGetShaderResources(StartSlot, + NumViews, + out_hp_ppShaderResourceViews); + AddObjects(out_p_ppShaderResourceViews, ppShaderResourceViews->GetLength(), out_hp_ppShaderResourceViews, NumViews, format::ApiCall_ID3D11DeviceContext_VSGetShaderResources); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_VSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + if(!ppSamplers->IsNull()) ppSamplers->SetHandleLength(NumSamplers); + auto out_p_ppSamplers = ppSamplers->GetPointer(); + auto out_hp_ppSamplers = ppSamplers->GetHandlePointer(); + reinterpret_cast(replay_object->object)->VSGetSamplers(StartSlot, + NumSamplers, + out_hp_ppSamplers); + AddObjects(out_p_ppSamplers, ppSamplers->GetLength(), out_hp_ppSamplers, NumSamplers, format::ApiCall_ID3D11DeviceContext_VSGetSamplers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_GetPredication( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppPredicate, + PointerDecoder* pPredicateValue) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppPredicate, + pPredicateValue); + if(!ppPredicate->IsNull()) ppPredicate->SetHandleLength(1); + auto out_p_ppPredicate = ppPredicate->GetPointer(); + auto out_hp_ppPredicate = ppPredicate->GetHandlePointer(); + if(!pPredicateValue->IsNull()) + { + pPredicateValue->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetPredication(out_hp_ppPredicate, + pPredicateValue->GetOutputPointer()); + AddObject(out_p_ppPredicate, out_hp_ppPredicate, format::ApiCall_ID3D11DeviceContext_GetPredication); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppPredicate, + pPredicateValue); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_GSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + if(!ppShaderResourceViews->IsNull()) ppShaderResourceViews->SetHandleLength(NumViews); + auto out_p_ppShaderResourceViews = ppShaderResourceViews->GetPointer(); + auto out_hp_ppShaderResourceViews = ppShaderResourceViews->GetHandlePointer(); + reinterpret_cast(replay_object->object)->GSGetShaderResources(StartSlot, + NumViews, + out_hp_ppShaderResourceViews); + AddObjects(out_p_ppShaderResourceViews, ppShaderResourceViews->GetLength(), out_hp_ppShaderResourceViews, NumViews, format::ApiCall_ID3D11DeviceContext_GSGetShaderResources); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_GSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + if(!ppSamplers->IsNull()) ppSamplers->SetHandleLength(NumSamplers); + auto out_p_ppSamplers = ppSamplers->GetPointer(); + auto out_hp_ppSamplers = ppSamplers->GetHandlePointer(); + reinterpret_cast(replay_object->object)->GSGetSamplers(StartSlot, + NumSamplers, + out_hp_ppSamplers); + AddObjects(out_p_ppSamplers, ppSamplers->GetLength(), out_hp_ppSamplers, NumSamplers, format::ApiCall_ID3D11DeviceContext_GSGetSamplers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_OMGetRenderTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViews, + HandlePointerDecoder* ppRenderTargetViews, + HandlePointerDecoder* ppDepthStencilView) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + NumViews, + ppRenderTargetViews, + ppDepthStencilView); + if(!ppRenderTargetViews->IsNull()) ppRenderTargetViews->SetHandleLength(NumViews); + auto out_p_ppRenderTargetViews = ppRenderTargetViews->GetPointer(); + auto out_hp_ppRenderTargetViews = ppRenderTargetViews->GetHandlePointer(); + if(!ppDepthStencilView->IsNull()) ppDepthStencilView->SetHandleLength(1); + auto out_p_ppDepthStencilView = ppDepthStencilView->GetPointer(); + auto out_hp_ppDepthStencilView = ppDepthStencilView->GetHandlePointer(); + reinterpret_cast(replay_object->object)->OMGetRenderTargets(NumViews, + out_hp_ppRenderTargetViews, + out_hp_ppDepthStencilView); + AddObjects(out_p_ppRenderTargetViews, ppRenderTargetViews->GetLength(), out_hp_ppRenderTargetViews, NumViews, format::ApiCall_ID3D11DeviceContext_OMGetRenderTargets); + AddObject(out_p_ppDepthStencilView, out_hp_ppDepthStencilView, format::ApiCall_ID3D11DeviceContext_OMGetRenderTargets); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + NumViews, + ppRenderTargetViews, + ppDepthStencilView); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRTVs, + HandlePointerDecoder* ppRenderTargetViews, + HandlePointerDecoder* ppDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + NumRTVs, + ppRenderTargetViews, + ppDepthStencilView, + UAVStartSlot, + NumUAVs, + ppUnorderedAccessViews); + if(!ppRenderTargetViews->IsNull()) ppRenderTargetViews->SetHandleLength(NumRTVs); + auto out_p_ppRenderTargetViews = ppRenderTargetViews->GetPointer(); + auto out_hp_ppRenderTargetViews = ppRenderTargetViews->GetHandlePointer(); + if(!ppDepthStencilView->IsNull()) ppDepthStencilView->SetHandleLength(1); + auto out_p_ppDepthStencilView = ppDepthStencilView->GetPointer(); + auto out_hp_ppDepthStencilView = ppDepthStencilView->GetHandlePointer(); + if(!ppUnorderedAccessViews->IsNull()) ppUnorderedAccessViews->SetHandleLength(NumUAVs); + auto out_p_ppUnorderedAccessViews = ppUnorderedAccessViews->GetPointer(); + auto out_hp_ppUnorderedAccessViews = ppUnorderedAccessViews->GetHandlePointer(); + reinterpret_cast(replay_object->object)->OMGetRenderTargetsAndUnorderedAccessViews(NumRTVs, + out_hp_ppRenderTargetViews, + out_hp_ppDepthStencilView, + UAVStartSlot, + NumUAVs, + out_hp_ppUnorderedAccessViews); + AddObjects(out_p_ppRenderTargetViews, ppRenderTargetViews->GetLength(), out_hp_ppRenderTargetViews, NumRTVs, format::ApiCall_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews); + AddObject(out_p_ppDepthStencilView, out_hp_ppDepthStencilView, format::ApiCall_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews); + AddObjects(out_p_ppUnorderedAccessViews, ppUnorderedAccessViews->GetLength(), out_hp_ppUnorderedAccessViews, NumUAVs, format::ApiCall_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + NumRTVs, + ppRenderTargetViews, + ppDepthStencilView, + UAVStartSlot, + NumUAVs, + ppUnorderedAccessViews); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_OMGetBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppBlendState, + PointerDecoder* BlendFactor, + PointerDecoder* pSampleMask) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppBlendState, + BlendFactor, + pSampleMask); + if(!ppBlendState->IsNull()) ppBlendState->SetHandleLength(1); + auto out_p_ppBlendState = ppBlendState->GetPointer(); + auto out_hp_ppBlendState = ppBlendState->GetHandlePointer(); + if(!BlendFactor->IsNull()) + { + BlendFactor->AllocateOutputData(4); + } + if(!pSampleMask->IsNull()) + { + pSampleMask->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->OMGetBlendState(out_hp_ppBlendState, + BlendFactor->GetOutputPointer(), + pSampleMask->GetOutputPointer()); + AddObject(out_p_ppBlendState, out_hp_ppBlendState, format::ApiCall_ID3D11DeviceContext_OMGetBlendState); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppBlendState, + BlendFactor, + pSampleMask); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_OMGetDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDepthStencilState, + PointerDecoder* pStencilRef) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppDepthStencilState, + pStencilRef); + if(!ppDepthStencilState->IsNull()) ppDepthStencilState->SetHandleLength(1); + auto out_p_ppDepthStencilState = ppDepthStencilState->GetPointer(); + auto out_hp_ppDepthStencilState = ppDepthStencilState->GetHandlePointer(); + if(!pStencilRef->IsNull()) + { + pStencilRef->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->OMGetDepthStencilState(out_hp_ppDepthStencilState, + pStencilRef->GetOutputPointer()); + AddObject(out_p_ppDepthStencilState, out_hp_ppDepthStencilState, format::ApiCall_ID3D11DeviceContext_OMGetDepthStencilState); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppDepthStencilState, + pStencilRef); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_SOGetTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumBuffers, + HandlePointerDecoder* ppSOTargets) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + NumBuffers, + ppSOTargets); + if(!ppSOTargets->IsNull()) ppSOTargets->SetHandleLength(NumBuffers); + auto out_p_ppSOTargets = ppSOTargets->GetPointer(); + auto out_hp_ppSOTargets = ppSOTargets->GetHandlePointer(); + reinterpret_cast(replay_object->object)->SOGetTargets(NumBuffers, + out_hp_ppSOTargets); + AddObjects(out_p_ppSOTargets, ppSOTargets->GetLength(), out_hp_ppSOTargets, NumBuffers, format::ApiCall_ID3D11DeviceContext_SOGetTargets); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + NumBuffers, + ppSOTargets); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_RSGetState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppRasterizerState) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppRasterizerState); + if(!ppRasterizerState->IsNull()) ppRasterizerState->SetHandleLength(1); + auto out_p_ppRasterizerState = ppRasterizerState->GetPointer(); + auto out_hp_ppRasterizerState = ppRasterizerState->GetHandlePointer(); + reinterpret_cast(replay_object->object)->RSGetState(out_hp_ppRasterizerState); + AddObject(out_p_ppRasterizerState, out_hp_ppRasterizerState, format::ApiCall_ID3D11DeviceContext_RSGetState); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppRasterizerState); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_RSGetViewports( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pNumViewports, + StructPointerDecoder* pViewports) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pNumViewports, + pViewports); + if(!pNumViewports->IsNull()) + { + pNumViewports->AllocateOutputData(1, GetOutputArrayCount("ID3D11DeviceContext::RSGetViewports", S_OK, object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayRSGetViewports, pNumViewports, pViewports)); + } + if(!pViewports->IsNull() && !pNumViewports->IsNull()) + { + pViewports->AllocateOutputData(*pNumViewports->GetOutputPointer()); + } + reinterpret_cast(replay_object->object)->RSGetViewports(pNumViewports->GetOutputPointer(), + pViewports->GetOutputPointer()); + if (pViewports->IsNull() && !pNumViewports->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayRSGetViewports, *pNumViewports->GetOutputPointer()); } + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pNumViewports, + pViewports); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_RSGetScissorRects( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pNumRects, + StructPointerDecoder* pRects) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pNumRects, + pRects); + if(!pNumRects->IsNull()) + { + pNumRects->AllocateOutputData(1, GetOutputArrayCount("ID3D11DeviceContext::RSGetScissorRects", S_OK, object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayRSGetScissorRects, pNumRects, pRects)); + } + if(!pRects->IsNull() && !pNumRects->IsNull()) + { + pRects->AllocateOutputData(*pNumRects->GetOutputPointer()); + } + reinterpret_cast(replay_object->object)->RSGetScissorRects(pNumRects->GetOutputPointer(), + pRects->GetOutputPointer()); + if (pRects->IsNull() && !pNumRects->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayRSGetScissorRects, *pNumRects->GetOutputPointer()); } + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pNumRects, + pRects); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_HSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + if(!ppShaderResourceViews->IsNull()) ppShaderResourceViews->SetHandleLength(NumViews); + auto out_p_ppShaderResourceViews = ppShaderResourceViews->GetPointer(); + auto out_hp_ppShaderResourceViews = ppShaderResourceViews->GetHandlePointer(); + reinterpret_cast(replay_object->object)->HSGetShaderResources(StartSlot, + NumViews, + out_hp_ppShaderResourceViews); + AddObjects(out_p_ppShaderResourceViews, ppShaderResourceViews->GetLength(), out_hp_ppShaderResourceViews, NumViews, format::ApiCall_ID3D11DeviceContext_HSGetShaderResources); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_HSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppHullShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppHullShader, + ppClassInstances, + pNumClassInstances); + if(!ppHullShader->IsNull()) ppHullShader->SetHandleLength(1); + auto out_p_ppHullShader = ppHullShader->GetPointer(); + auto out_hp_ppHullShader = ppHullShader->GetHandlePointer(); + if(!pNumClassInstances->IsNull()) + { + pNumClassInstances->AllocateOutputData(1, GetOutputArrayCount("ID3D11DeviceContext::HSGetShader", S_OK, object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayHSGetShader, pNumClassInstances, ppClassInstances)); + } + if(!ppClassInstances->IsNull() && !pNumClassInstances->IsNull()) + { + ppClassInstances->SetHandleLength(*pNumClassInstances->GetOutputPointer()); + } + auto out_p_ppClassInstances = ppClassInstances->GetPointer(); + auto out_hp_ppClassInstances = ppClassInstances->GetHandlePointer(); + reinterpret_cast(replay_object->object)->HSGetShader(out_hp_ppHullShader, + out_hp_ppClassInstances, + pNumClassInstances->GetOutputPointer()); + if (ppClassInstances->IsNull() && !pNumClassInstances->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayHSGetShader, *pNumClassInstances->GetOutputPointer()); } + AddObject(out_p_ppHullShader, out_hp_ppHullShader, format::ApiCall_ID3D11DeviceContext_HSGetShader); + AddObjects(out_p_ppClassInstances, ppClassInstances->GetLength(), out_hp_ppClassInstances, !pNumClassInstances->IsNull() ? *pNumClassInstances->GetOutputPointer() : 0, format::ApiCall_ID3D11DeviceContext_HSGetShader); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppHullShader, + ppClassInstances, + pNumClassInstances); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_HSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + if(!ppSamplers->IsNull()) ppSamplers->SetHandleLength(NumSamplers); + auto out_p_ppSamplers = ppSamplers->GetPointer(); + auto out_hp_ppSamplers = ppSamplers->GetHandlePointer(); + reinterpret_cast(replay_object->object)->HSGetSamplers(StartSlot, + NumSamplers, + out_hp_ppSamplers); + AddObjects(out_p_ppSamplers, ppSamplers->GetLength(), out_hp_ppSamplers, NumSamplers, format::ApiCall_ID3D11DeviceContext_HSGetSamplers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_HSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + if(!ppConstantBuffers->IsNull()) ppConstantBuffers->SetHandleLength(NumBuffers); + auto out_p_ppConstantBuffers = ppConstantBuffers->GetPointer(); + auto out_hp_ppConstantBuffers = ppConstantBuffers->GetHandlePointer(); + reinterpret_cast(replay_object->object)->HSGetConstantBuffers(StartSlot, + NumBuffers, + out_hp_ppConstantBuffers); + AddObjects(out_p_ppConstantBuffers, ppConstantBuffers->GetLength(), out_hp_ppConstantBuffers, NumBuffers, format::ApiCall_ID3D11DeviceContext_HSGetConstantBuffers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + if(!ppShaderResourceViews->IsNull()) ppShaderResourceViews->SetHandleLength(NumViews); + auto out_p_ppShaderResourceViews = ppShaderResourceViews->GetPointer(); + auto out_hp_ppShaderResourceViews = ppShaderResourceViews->GetHandlePointer(); + reinterpret_cast(replay_object->object)->DSGetShaderResources(StartSlot, + NumViews, + out_hp_ppShaderResourceViews); + AddObjects(out_p_ppShaderResourceViews, ppShaderResourceViews->GetLength(), out_hp_ppShaderResourceViews, NumViews, format::ApiCall_ID3D11DeviceContext_DSGetShaderResources); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDomainShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppDomainShader, + ppClassInstances, + pNumClassInstances); + if(!ppDomainShader->IsNull()) ppDomainShader->SetHandleLength(1); + auto out_p_ppDomainShader = ppDomainShader->GetPointer(); + auto out_hp_ppDomainShader = ppDomainShader->GetHandlePointer(); + if(!pNumClassInstances->IsNull()) + { + pNumClassInstances->AllocateOutputData(1, GetOutputArrayCount("ID3D11DeviceContext::DSGetShader", S_OK, object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayDSGetShader, pNumClassInstances, ppClassInstances)); + } + if(!ppClassInstances->IsNull() && !pNumClassInstances->IsNull()) + { + ppClassInstances->SetHandleLength(*pNumClassInstances->GetOutputPointer()); + } + auto out_p_ppClassInstances = ppClassInstances->GetPointer(); + auto out_hp_ppClassInstances = ppClassInstances->GetHandlePointer(); + reinterpret_cast(replay_object->object)->DSGetShader(out_hp_ppDomainShader, + out_hp_ppClassInstances, + pNumClassInstances->GetOutputPointer()); + if (ppClassInstances->IsNull() && !pNumClassInstances->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayDSGetShader, *pNumClassInstances->GetOutputPointer()); } + AddObject(out_p_ppDomainShader, out_hp_ppDomainShader, format::ApiCall_ID3D11DeviceContext_DSGetShader); + AddObjects(out_p_ppClassInstances, ppClassInstances->GetLength(), out_hp_ppClassInstances, !pNumClassInstances->IsNull() ? *pNumClassInstances->GetOutputPointer() : 0, format::ApiCall_ID3D11DeviceContext_DSGetShader); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppDomainShader, + ppClassInstances, + pNumClassInstances); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + if(!ppSamplers->IsNull()) ppSamplers->SetHandleLength(NumSamplers); + auto out_p_ppSamplers = ppSamplers->GetPointer(); + auto out_hp_ppSamplers = ppSamplers->GetHandlePointer(); + reinterpret_cast(replay_object->object)->DSGetSamplers(StartSlot, + NumSamplers, + out_hp_ppSamplers); + AddObjects(out_p_ppSamplers, ppSamplers->GetLength(), out_hp_ppSamplers, NumSamplers, format::ApiCall_ID3D11DeviceContext_DSGetSamplers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_DSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + if(!ppConstantBuffers->IsNull()) ppConstantBuffers->SetHandleLength(NumBuffers); + auto out_p_ppConstantBuffers = ppConstantBuffers->GetPointer(); + auto out_hp_ppConstantBuffers = ppConstantBuffers->GetHandlePointer(); + reinterpret_cast(replay_object->object)->DSGetConstantBuffers(StartSlot, + NumBuffers, + out_hp_ppConstantBuffers); + AddObjects(out_p_ppConstantBuffers, ppConstantBuffers->GetLength(), out_hp_ppConstantBuffers, NumBuffers, format::ApiCall_ID3D11DeviceContext_DSGetConstantBuffers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_CSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + if(!ppShaderResourceViews->IsNull()) ppShaderResourceViews->SetHandleLength(NumViews); + auto out_p_ppShaderResourceViews = ppShaderResourceViews->GetPointer(); + auto out_hp_ppShaderResourceViews = ppShaderResourceViews->GetHandlePointer(); + reinterpret_cast(replay_object->object)->CSGetShaderResources(StartSlot, + NumViews, + out_hp_ppShaderResourceViews); + AddObjects(out_p_ppShaderResourceViews, ppShaderResourceViews->GetLength(), out_hp_ppShaderResourceViews, NumViews, format::ApiCall_ID3D11DeviceContext_CSGetShaderResources); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumViews, + ppShaderResourceViews); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_CSGetUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumUAVs, + ppUnorderedAccessViews); + if(!ppUnorderedAccessViews->IsNull()) ppUnorderedAccessViews->SetHandleLength(NumUAVs); + auto out_p_ppUnorderedAccessViews = ppUnorderedAccessViews->GetPointer(); + auto out_hp_ppUnorderedAccessViews = ppUnorderedAccessViews->GetHandlePointer(); + reinterpret_cast(replay_object->object)->CSGetUnorderedAccessViews(StartSlot, + NumUAVs, + out_hp_ppUnorderedAccessViews); + AddObjects(out_p_ppUnorderedAccessViews, ppUnorderedAccessViews->GetLength(), out_hp_ppUnorderedAccessViews, NumUAVs, format::ApiCall_ID3D11DeviceContext_CSGetUnorderedAccessViews); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumUAVs, + ppUnorderedAccessViews); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_CSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppComputeShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppComputeShader, + ppClassInstances, + pNumClassInstances); + if(!ppComputeShader->IsNull()) ppComputeShader->SetHandleLength(1); + auto out_p_ppComputeShader = ppComputeShader->GetPointer(); + auto out_hp_ppComputeShader = ppComputeShader->GetHandlePointer(); + if(!pNumClassInstances->IsNull()) + { + pNumClassInstances->AllocateOutputData(1, GetOutputArrayCount("ID3D11DeviceContext::CSGetShader", S_OK, object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayCSGetShader, pNumClassInstances, ppClassInstances)); + } + if(!ppClassInstances->IsNull() && !pNumClassInstances->IsNull()) + { + ppClassInstances->SetHandleLength(*pNumClassInstances->GetOutputPointer()); + } + auto out_p_ppClassInstances = ppClassInstances->GetPointer(); + auto out_hp_ppClassInstances = ppClassInstances->GetHandlePointer(); + reinterpret_cast(replay_object->object)->CSGetShader(out_hp_ppComputeShader, + out_hp_ppClassInstances, + pNumClassInstances->GetOutputPointer()); + if (ppClassInstances->IsNull() && !pNumClassInstances->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11DeviceContextArrayCSGetShader, *pNumClassInstances->GetOutputPointer()); } + AddObject(out_p_ppComputeShader, out_hp_ppComputeShader, format::ApiCall_ID3D11DeviceContext_CSGetShader); + AddObjects(out_p_ppClassInstances, ppClassInstances->GetLength(), out_hp_ppClassInstances, !pNumClassInstances->IsNull() ? *pNumClassInstances->GetOutputPointer() : 0, format::ApiCall_ID3D11DeviceContext_CSGetShader); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppComputeShader, + ppClassInstances, + pNumClassInstances); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_CSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + if(!ppSamplers->IsNull()) ppSamplers->SetHandleLength(NumSamplers); + auto out_p_ppSamplers = ppSamplers->GetPointer(); + auto out_hp_ppSamplers = ppSamplers->GetHandlePointer(); + reinterpret_cast(replay_object->object)->CSGetSamplers(StartSlot, + NumSamplers, + out_hp_ppSamplers); + AddObjects(out_p_ppSamplers, ppSamplers->GetLength(), out_hp_ppSamplers, NumSamplers, format::ApiCall_ID3D11DeviceContext_CSGetSamplers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumSamplers, + ppSamplers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_CSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + if(!ppConstantBuffers->IsNull()) ppConstantBuffers->SetHandleLength(NumBuffers); + auto out_p_ppConstantBuffers = ppConstantBuffers->GetPointer(); + auto out_hp_ppConstantBuffers = ppConstantBuffers->GetHandlePointer(); + reinterpret_cast(replay_object->object)->CSGetConstantBuffers(StartSlot, + NumBuffers, + out_hp_ppConstantBuffers); + AddObjects(out_p_ppConstantBuffers, ppConstantBuffers->GetLength(), out_hp_ppConstantBuffers, NumBuffers, format::ApiCall_ID3D11DeviceContext_CSGetConstantBuffers); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_ClearState( + const ApiCallInfo& call_info, + format::HandleId object_id) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + reinterpret_cast(replay_object->object)->ClearState(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_Flush( + const ApiCallInfo& call_info, + format::HandleId object_id) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + reinterpret_cast(replay_object->object)->Flush(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_GetType( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D11_DEVICE_CONTEXT_TYPE return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->GetType(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_GetContextFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->GetContextFlags(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext_FinishCommandList( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + BOOL RestoreDeferredContextState, + HandlePointerDecoder* ppCommandList) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + RestoreDeferredContextState, + ppCommandList); + if(!ppCommandList->IsNull()) ppCommandList->SetHandleLength(1); + auto out_p_ppCommandList = ppCommandList->GetPointer(); + auto out_hp_ppCommandList = ppCommandList->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->FinishCommandList(RestoreDeferredContextState, + out_hp_ppCommandList); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppCommandList, out_hp_ppCommandList, format::ApiCall_ID3D11DeviceContext_FinishCommandList); + } + CheckReplayResult("ID3D11DeviceContext_FinishCommandList", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + RestoreDeferredContextState, + ppCommandList); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDecoder_GetCreationParameters( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pVideoDesc, + StructPointerDecoder* pConfig) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoDesc, + pConfig); + if(!pVideoDesc->IsNull()) + { + pVideoDesc->AllocateOutputData(1); + } + if(!pConfig->IsNull()) + { + pConfig->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetCreationParameters(pVideoDesc->GetOutputPointer(), + pConfig->GetOutputPointer()); + CheckReplayResult("ID3D11VideoDecoder_GetCreationParameters", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoDesc, + pConfig); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDecoder_GetDriverHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pDriverHandle) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDriverHandle); + if(!pDriverHandle->IsNull()) + { + pDriverHandle->AllocateOutputData(1); + } + auto out_p_pDriverHandle = pDriverHandle->GetPointer(); + auto out_op_pDriverHandle = reinterpret_cast(pDriverHandle->GetOutputPointer()); + auto replay_result = reinterpret_cast(replay_object->object)->GetDriverHandle(out_op_pDriverHandle); + CheckReplayResult("ID3D11VideoDecoder_GetDriverHandle", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDriverHandle); + PostProcessExternalObject(replay_result, out_op_pDriverHandle, out_p_pDriverHandle, format::ApiCallId::ApiCall_ID3D11VideoDecoder_GetDriverHandle, "ID3D11VideoDecoder_GetDriverHandle"); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pContentDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pContentDesc); + if(!pContentDesc->IsNull()) + { + pContentDesc->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetVideoProcessorContentDesc(pContentDesc->GetOutputPointer()); + CheckReplayResult("ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pContentDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + PointerDecoder* pFlags) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + Format, + pFlags); + if(!pFlags->IsNull()) + { + pFlags->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->CheckVideoProcessorFormat(Format, + pFlags->GetOutputPointer()); + CheckReplayResult("ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + Format, + pFlags); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCaps) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCaps); + if(!pCaps->IsNull()) + { + pCaps->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetVideoProcessorCaps(pCaps->GetOutputPointer()); + CheckReplayResult("ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCaps); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT TypeIndex, + StructPointerDecoder* pCaps) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + TypeIndex, + pCaps); + if(!pCaps->IsNull()) + { + pCaps->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetVideoProcessorRateConversionCaps(TypeIndex, + pCaps->GetOutputPointer()); + CheckReplayResult("ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + TypeIndex, + pCaps); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT TypeIndex, + UINT CustomRateIndex, + StructPointerDecoder* pRate) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + TypeIndex, + CustomRateIndex, + pRate); + if(!pRate->IsNull()) + { + pRate->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetVideoProcessorCustomRate(TypeIndex, + CustomRateIndex, + pRate->GetOutputPointer()); + CheckReplayResult("ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + TypeIndex, + CustomRateIndex, + pRate); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + StructPointerDecoder* pRange) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + Filter, + pRange); + if(!pRange->IsNull()) + { + pRange->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetVideoProcessorFilterRange(Filter, + pRange->GetOutputPointer()); + CheckReplayResult("ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + Filter, + pRange); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoProcessor_GetContentDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetContentDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoProcessor_GetRateConversionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCaps) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCaps); + if(!pCaps->IsNull()) + { + pCaps->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetRateConversionCaps(pCaps->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCaps); + } +} + +void Dx12ReplayConsumer::Process_ID3D11AuthenticatedChannel_GetCertificateSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pCertificateSize) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCertificateSize); + if(!pCertificateSize->IsNull()) + { + pCertificateSize->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetCertificateSize(pCertificateSize->GetOutputPointer()); + CheckReplayResult("ID3D11AuthenticatedChannel_GetCertificateSize", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCertificateSize); + } +} + +void Dx12ReplayConsumer::Process_ID3D11AuthenticatedChannel_GetCertificate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT CertificateSize, + PointerDecoder* pCertificate) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + CertificateSize, + pCertificate); + if(!pCertificate->IsNull()) + { + pCertificate->AllocateOutputData(CertificateSize /sizeof BYTE); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetCertificate(CertificateSize, + pCertificate->GetOutputPointer()); + CheckReplayResult("ID3D11AuthenticatedChannel_GetCertificate", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + CertificateSize, + pCertificate); + } +} + +void Dx12ReplayConsumer::Process_ID3D11AuthenticatedChannel_GetChannelHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pChannelHandle) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pChannelHandle); + if(!pChannelHandle->IsNull()) + { + pChannelHandle->AllocateOutputData(1); + } + auto out_p_pChannelHandle = pChannelHandle->GetPointer(); + auto out_op_pChannelHandle = reinterpret_cast(pChannelHandle->GetOutputPointer()); + reinterpret_cast(replay_object->object)->GetChannelHandle(out_op_pChannelHandle); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pChannelHandle); + PostProcessExternalObject(S_OK, out_op_pChannelHandle, out_p_pChannelHandle, format::ApiCallId::ApiCall_ID3D11AuthenticatedChannel_GetChannelHandle, "ID3D11AuthenticatedChannel_GetChannelHandle"); + } +} + +void Dx12ReplayConsumer::Process_ID3D11CryptoSession_GetCryptoType( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCryptoType) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoType); + if(!pCryptoType->IsNull()) + { + pCryptoType->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetCryptoType(pCryptoType->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoType); + } +} + +void Dx12ReplayConsumer::Process_ID3D11CryptoSession_GetDecoderProfile( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDecoderProfile) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDecoderProfile); + if(!pDecoderProfile->IsNull()) + { + pDecoderProfile->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDecoderProfile(pDecoderProfile->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDecoderProfile); + } +} + +void Dx12ReplayConsumer::Process_ID3D11CryptoSession_GetCertificateSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pCertificateSize) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCertificateSize); + if(!pCertificateSize->IsNull()) + { + pCertificateSize->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetCertificateSize(pCertificateSize->GetOutputPointer()); + CheckReplayResult("ID3D11CryptoSession_GetCertificateSize", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCertificateSize); + } +} + +void Dx12ReplayConsumer::Process_ID3D11CryptoSession_GetCertificate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT CertificateSize, + PointerDecoder* pCertificate) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + CertificateSize, + pCertificate); + if(!pCertificate->IsNull()) + { + pCertificate->AllocateOutputData(CertificateSize /sizeof BYTE); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetCertificate(CertificateSize, + pCertificate->GetOutputPointer()); + CheckReplayResult("ID3D11CryptoSession_GetCertificate", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + CertificateSize, + pCertificate); + } +} + +void Dx12ReplayConsumer::Process_ID3D11CryptoSession_GetCryptoSessionHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pCryptoSessionHandle) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSessionHandle); + if(!pCryptoSessionHandle->IsNull()) + { + pCryptoSessionHandle->AllocateOutputData(1); + } + auto out_p_pCryptoSessionHandle = pCryptoSessionHandle->GetPointer(); + auto out_op_pCryptoSessionHandle = reinterpret_cast(pCryptoSessionHandle->GetOutputPointer()); + reinterpret_cast(replay_object->object)->GetCryptoSessionHandle(out_op_pCryptoSessionHandle); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSessionHandle); + PostProcessExternalObject(S_OK, out_op_pCryptoSessionHandle, out_p_pCryptoSessionHandle, format::ApiCallId::ApiCall_ID3D11CryptoSession_GetCryptoSessionHandle, "ID3D11CryptoSession_GetCryptoSessionHandle"); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDecoderOutputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoProcessorInputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoProcessorOutputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_GetDecoderBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type, + PointerDecoder* pBufferSize, + PointerDecoder* ppBuffer) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + Type, + pBufferSize, + ppBuffer); + auto in_pDecoder = MapObject(pDecoder); + if(!pBufferSize->IsNull()) + { + pBufferSize->AllocateOutputData(1); + } + if(!ppBuffer->IsNull()) + { + ppBuffer->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetDecoderBuffer(in_pDecoder, + Type, + pBufferSize->GetOutputPointer(), + ppBuffer->GetOutputPointer()); + CheckReplayResult("ID3D11VideoContext_GetDecoderBuffer", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + Type, + pBufferSize, + ppBuffer); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_ReleaseDecoderBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + Type); + auto in_pDecoder = MapObject(pDecoder); + auto replay_result = reinterpret_cast(replay_object->object)->ReleaseDecoderBuffer(in_pDecoder, + Type); + CheckReplayResult("ID3D11VideoContext_ReleaseDecoderBuffer", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + Type); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_DecoderBeginFrame( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + format::HandleId pView, + UINT ContentKeySize, + PointerDecoder* pContentKey) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + pView, + ContentKeySize, + pContentKey); + auto in_pDecoder = MapObject(pDecoder); + auto in_pView = MapObject(pView); + auto replay_result = reinterpret_cast(replay_object->object)->DecoderBeginFrame(in_pDecoder, + in_pView, + ContentKeySize, + pContentKey->GetPointer()); + CheckReplayResult("ID3D11VideoContext_DecoderBeginFrame", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + pView, + ContentKeySize, + pContentKey); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_DecoderEndFrame( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDecoder); + auto in_pDecoder = MapObject(pDecoder); + auto replay_result = reinterpret_cast(replay_object->object)->DecoderEndFrame(in_pDecoder); + CheckReplayResult("ID3D11VideoContext_DecoderEndFrame", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDecoder); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_SubmitDecoderBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + NumBuffers, + pBufferDesc); + auto in_pDecoder = MapObject(pDecoder); + auto replay_result = reinterpret_cast(replay_object->object)->SubmitDecoderBuffers(in_pDecoder, + NumBuffers, + pBufferDesc->GetPointer()); + CheckReplayResult("ID3D11VideoContext_SubmitDecoderBuffers", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + NumBuffers, + pBufferDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_DecoderExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + StructPointerDecoder* pExtensionData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + pExtensionData); + auto in_pDecoder = MapObject(pDecoder); + MapStructObjects(pExtensionData->GetMetaStructPointer(), GetObjectInfoTable(), GetGpuVaTable()); + auto replay_result = reinterpret_cast(replay_object->object)->DecoderExtension(in_pDecoder, + pExtensionData->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + pExtensionData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetOutputTargetRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable, + StructPointerDecoder* pRect) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + Enable, + pRect); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetOutputTargetRect(in_pVideoProcessor, + Enable, + pRect->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + Enable, + pRect); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL YCbCr, + StructPointerDecoder* pColor) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + YCbCr, + pColor); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetOutputBackgroundColor(in_pVideoProcessor, + YCbCr, + pColor->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + YCbCr, + pColor); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetOutputColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + StructPointerDecoder* pColorSpace) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pColorSpace); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetOutputColorSpace(in_pVideoProcessor, + pColorSpace->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pColorSpace); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE AlphaFillMode, + UINT StreamIndex) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + AlphaFillMode, + StreamIndex); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetOutputAlphaFillMode(in_pVideoProcessor, + AlphaFillMode, + StreamIndex); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + AlphaFillMode, + StreamIndex); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetOutputConstriction( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable, + Decoded_tagSIZE Size) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + Enable, + Size); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetOutputConstriction(in_pVideoProcessor, + Enable, + *Size.decoded_value); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + Enable, + Size); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetOutputStereoMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + Enable); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetOutputStereoMode(in_pVideoProcessor, + Enable); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + Enable); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetOutputExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + uint64_t pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pExtensionGuid, + DataSize, + pData); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + auto in_pData = PreProcessExternalObject(pData, format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetOutputExtension, "ID3D11VideoContext_VideoProcessorSetOutputExtension"); + auto replay_result = reinterpret_cast(replay_object->object)->VideoProcessorSetOutputExtension(in_pVideoProcessor, + pExtensionGuid->GetPointer(), + DataSize, + in_pData); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pExtensionGuid, + DataSize, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetOutputTargetRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* Enabled, + StructPointerDecoder* pRect) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + Enabled, + pRect); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!Enabled->IsNull()) + { + Enabled->AllocateOutputData(1); + } + if(!pRect->IsNull()) + { + pRect->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetOutputTargetRect(in_pVideoProcessor, + Enabled->GetOutputPointer(), + pRect->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + Enabled, + pRect); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pYCbCr, + StructPointerDecoder* pColor) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pYCbCr, + pColor); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pYCbCr->IsNull()) + { + pYCbCr->AllocateOutputData(1); + } + if(!pColor->IsNull()) + { + pColor->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetOutputBackgroundColor(in_pVideoProcessor, + pYCbCr->GetOutputPointer(), + pColor->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pYCbCr, + pColor); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetOutputColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + StructPointerDecoder* pColorSpace) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pColorSpace); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pColorSpace->IsNull()) + { + pColorSpace->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetOutputColorSpace(in_pVideoProcessor, + pColorSpace->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pColorSpace); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pAlphaFillMode, + PointerDecoder* pStreamIndex) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pAlphaFillMode, + pStreamIndex); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pAlphaFillMode->IsNull()) + { + pAlphaFillMode->AllocateOutputData(1); + } + if(!pStreamIndex->IsNull()) + { + pStreamIndex->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetOutputAlphaFillMode(in_pVideoProcessor, + pAlphaFillMode->GetOutputPointer(), + pStreamIndex->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pAlphaFillMode, + pStreamIndex); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetOutputConstriction( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pEnabled, + StructPointerDecoder* pSize) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pEnabled, + pSize); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pEnabled->IsNull()) + { + pEnabled->AllocateOutputData(1); + } + if(!pSize->IsNull()) + { + pSize->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetOutputConstriction(in_pVideoProcessor, + pEnabled->GetOutputPointer(), + pSize->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pEnabled, + pSize); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetOutputStereoMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pEnabled) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pEnabled); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pEnabled->IsNull()) + { + pEnabled->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetOutputStereoMode(in_pVideoProcessor, + pEnabled->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pEnabled); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetOutputExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + PointerDecoder* pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pExtensionGuid, + DataSize, + pData); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pData->IsNull()) + { + pData->AllocateOutputData(DataSize); + } + auto replay_result = reinterpret_cast(replay_object->object)->VideoProcessorGetOutputExtension(in_pVideoProcessor, + pExtensionGuid->GetPointer(), + DataSize, + pData->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pExtensionGuid, + DataSize, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_FRAME_FORMAT FrameFormat) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + FrameFormat); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamFrameFormat(in_pVideoProcessor, + StreamIndex, + FrameFormat); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + FrameFormat); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pColorSpace) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pColorSpace); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamColorSpace(in_pVideoProcessor, + StreamIndex, + pColorSpace->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pColorSpace); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamOutputRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate, + BOOL RepeatFrame, + StructPointerDecoder* pCustomRate) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + OutputRate, + RepeatFrame, + pCustomRate); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamOutputRate(in_pVideoProcessor, + StreamIndex, + OutputRate, + RepeatFrame, + pCustomRate->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + OutputRate, + RepeatFrame, + pCustomRate); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamSourceRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pRect) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + pRect); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamSourceRect(in_pVideoProcessor, + StreamIndex, + Enable, + pRect->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + pRect); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamDestRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pRect) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + pRect); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamDestRect(in_pVideoProcessor, + StreamIndex, + Enable, + pRect->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + pRect); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamAlpha( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Alpha) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + Alpha); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamAlpha(in_pVideoProcessor, + StreamIndex, + Enable, + Alpha); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + Alpha); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamPalette( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + UINT Count, + PointerDecoder* pEntries) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Count, + pEntries); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamPalette(in_pVideoProcessor, + StreamIndex, + Count, + pEntries->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Count, + pEntries); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pSourceAspectRatio, + StructPointerDecoder* pDestinationAspectRatio) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + pSourceAspectRatio, + pDestinationAspectRatio); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamPixelAspectRatio(in_pVideoProcessor, + StreamIndex, + Enable, + pSourceAspectRatio->GetPointer(), + pDestinationAspectRatio->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + pSourceAspectRatio, + pDestinationAspectRatio); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamLumaKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Lower, + FLOAT Upper) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + Lower, + Upper); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamLumaKey(in_pVideoProcessor, + StreamIndex, + Enable, + Lower, + Upper); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + Lower, + Upper); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT Format, + BOOL LeftViewFrame0, + BOOL BaseViewFrame0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode, + int MonoOffset) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + Format, + LeftViewFrame0, + BaseViewFrame0, + FlipMode, + MonoOffset); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamStereoFormat(in_pVideoProcessor, + StreamIndex, + Enable, + Format, + LeftViewFrame0, + BaseViewFrame0, + FlipMode, + MonoOffset); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + Format, + LeftViewFrame0, + BaseViewFrame0, + FlipMode, + MonoOffset); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamAutoProcessingMode(in_pVideoProcessor, + StreamIndex, + Enable); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamFilter( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + BOOL Enable, + int Level) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Filter, + Enable, + Level); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamFilter(in_pVideoProcessor, + StreamIndex, + Filter, + Enable, + Level); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Filter, + Enable, + Level); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + uint64_t pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pExtensionGuid, + DataSize, + pData); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + auto in_pData = PreProcessExternalObject(pData, format::ApiCallId::ApiCall_ID3D11VideoContext_VideoProcessorSetStreamExtension, "ID3D11VideoContext_VideoProcessorSetStreamExtension"); + auto replay_result = reinterpret_cast(replay_object->object)->VideoProcessorSetStreamExtension(in_pVideoProcessor, + StreamIndex, + pExtensionGuid->GetPointer(), + DataSize, + in_pData); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pExtensionGuid, + DataSize, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pFrameFormat) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pFrameFormat); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pFrameFormat->IsNull()) + { + pFrameFormat->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamFrameFormat(in_pVideoProcessor, + StreamIndex, + pFrameFormat->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pFrameFormat); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pColorSpace) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pColorSpace); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pColorSpace->IsNull()) + { + pColorSpace->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamColorSpace(in_pVideoProcessor, + StreamIndex, + pColorSpace->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pColorSpace); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamOutputRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pOutputRate, + PointerDecoder* pRepeatFrame, + StructPointerDecoder* pCustomRate) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pOutputRate, + pRepeatFrame, + pCustomRate); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pOutputRate->IsNull()) + { + pOutputRate->AllocateOutputData(1); + } + if(!pRepeatFrame->IsNull()) + { + pRepeatFrame->AllocateOutputData(1); + } + if(!pCustomRate->IsNull()) + { + pCustomRate->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamOutputRate(in_pVideoProcessor, + StreamIndex, + pOutputRate->GetOutputPointer(), + pRepeatFrame->GetOutputPointer(), + pCustomRate->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pOutputRate, + pRepeatFrame, + pCustomRate); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamSourceRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pRect) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnabled, + pRect); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pEnabled->IsNull()) + { + pEnabled->AllocateOutputData(1); + } + if(!pRect->IsNull()) + { + pRect->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamSourceRect(in_pVideoProcessor, + StreamIndex, + pEnabled->GetOutputPointer(), + pRect->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnabled, + pRect); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamDestRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pRect) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnabled, + pRect); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pEnabled->IsNull()) + { + pEnabled->AllocateOutputData(1); + } + if(!pRect->IsNull()) + { + pRect->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamDestRect(in_pVideoProcessor, + StreamIndex, + pEnabled->GetOutputPointer(), + pRect->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnabled, + pRect); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamAlpha( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + PointerDecoder* pAlpha) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnabled, + pAlpha); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pEnabled->IsNull()) + { + pEnabled->AllocateOutputData(1); + } + if(!pAlpha->IsNull()) + { + pAlpha->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamAlpha(in_pVideoProcessor, + StreamIndex, + pEnabled->GetOutputPointer(), + pAlpha->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnabled, + pAlpha); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamPalette( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + UINT Count, + PointerDecoder* pEntries) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Count, + pEntries); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pEntries->IsNull()) + { + pEntries->AllocateOutputData(Count); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamPalette(in_pVideoProcessor, + StreamIndex, + Count, + pEntries->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Count, + pEntries); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pSourceAspectRatio, + StructPointerDecoder* pDestinationAspectRatio) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnabled, + pSourceAspectRatio, + pDestinationAspectRatio); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pEnabled->IsNull()) + { + pEnabled->AllocateOutputData(1); + } + if(!pSourceAspectRatio->IsNull()) + { + pSourceAspectRatio->AllocateOutputData(1); + } + if(!pDestinationAspectRatio->IsNull()) + { + pDestinationAspectRatio->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamPixelAspectRatio(in_pVideoProcessor, + StreamIndex, + pEnabled->GetOutputPointer(), + pSourceAspectRatio->GetOutputPointer(), + pDestinationAspectRatio->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnabled, + pSourceAspectRatio, + pDestinationAspectRatio); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamLumaKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + PointerDecoder* pLower, + PointerDecoder* pUpper) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnabled, + pLower, + pUpper); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pEnabled->IsNull()) + { + pEnabled->AllocateOutputData(1); + } + if(!pLower->IsNull()) + { + pLower->AllocateOutputData(1); + } + if(!pUpper->IsNull()) + { + pUpper->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamLumaKey(in_pVideoProcessor, + StreamIndex, + pEnabled->GetOutputPointer(), + pLower->GetOutputPointer(), + pUpper->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnabled, + pLower, + pUpper); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pFormat, + PointerDecoder* pLeftViewFrame0, + PointerDecoder* pBaseViewFrame0, + PointerDecoder* pFlipMode, + PointerDecoder* MonoOffset) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnable, + pFormat, + pLeftViewFrame0, + pBaseViewFrame0, + pFlipMode, + MonoOffset); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pEnable->IsNull()) + { + pEnable->AllocateOutputData(1); + } + if(!pFormat->IsNull()) + { + pFormat->AllocateOutputData(1); + } + if(!pLeftViewFrame0->IsNull()) + { + pLeftViewFrame0->AllocateOutputData(1); + } + if(!pBaseViewFrame0->IsNull()) + { + pBaseViewFrame0->AllocateOutputData(1); + } + if(!pFlipMode->IsNull()) + { + pFlipMode->AllocateOutputData(1); + } + if(!MonoOffset->IsNull()) + { + MonoOffset->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamStereoFormat(in_pVideoProcessor, + StreamIndex, + pEnable->GetOutputPointer(), + pFormat->GetOutputPointer(), + pLeftViewFrame0->GetOutputPointer(), + pBaseViewFrame0->GetOutputPointer(), + pFlipMode->GetOutputPointer(), + MonoOffset->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnable, + pFormat, + pLeftViewFrame0, + pBaseViewFrame0, + pFlipMode, + MonoOffset); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnabled); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pEnabled->IsNull()) + { + pEnabled->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamAutoProcessingMode(in_pVideoProcessor, + StreamIndex, + pEnabled->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnabled); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamFilter( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + PointerDecoder* pEnabled, + PointerDecoder* pLevel) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Filter, + pEnabled, + pLevel); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pEnabled->IsNull()) + { + pEnabled->AllocateOutputData(1); + } + if(!pLevel->IsNull()) + { + pLevel->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamFilter(in_pVideoProcessor, + StreamIndex, + Filter, + pEnabled->GetOutputPointer(), + pLevel->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Filter, + pEnabled, + pLevel); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + PointerDecoder* pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pExtensionGuid, + DataSize, + pData); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pData->IsNull()) + { + pData->AllocateOutputData(DataSize); + } + auto replay_result = reinterpret_cast(replay_object->object)->VideoProcessorGetStreamExtension(in_pVideoProcessor, + StreamIndex, + pExtensionGuid->GetPointer(), + DataSize, + pData->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pExtensionGuid, + DataSize, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + format::HandleId pView, + UINT OutputFrame, + UINT StreamCount, + StructPointerDecoder* pStreams) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pView, + OutputFrame, + StreamCount, + pStreams); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + auto in_pView = MapObject(pView); + MapStructArrayObjects(pStreams->GetMetaStructPointer(), pStreams->GetLength(), GetObjectInfoTable(), GetGpuVaTable()); + auto replay_result = reinterpret_cast(replay_object->object)->VideoProcessorBlt(in_pVideoProcessor, + in_pView, + OutputFrame, + StreamCount, + pStreams->GetPointer()); + CheckReplayResult("ID3D11VideoContext_VideoProcessorBlt", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pView, + OutputFrame, + StreamCount, + pStreams); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT DataSize, + PointerDecoder* pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + DataSize, + pData); + auto in_pCryptoSession = MapObject(pCryptoSession); + if(!pData->IsNull()) + { + pData->AllocateOutputData(DataSize); + } + auto replay_result = reinterpret_cast(replay_object->object)->NegotiateCryptoSessionKeyExchange(in_pCryptoSession, + DataSize, + pData->GetOutputPointer()); + CheckReplayResult("ID3D11VideoContext_NegotiateCryptoSessionKeyExchange", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + DataSize, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_EncryptionBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + format::HandleId pSrcSurface, + format::HandleId pDstSurface, + UINT IVSize, + PointerDecoder* pIV) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + pSrcSurface, + pDstSurface, + IVSize, + pIV); + auto in_pCryptoSession = MapObject(pCryptoSession); + auto in_pSrcSurface = MapObject(pSrcSurface); + auto in_pDstSurface = MapObject(pDstSurface); + if(!pIV->IsNull()) + { + pIV->AllocateOutputData(IVSize); + } + reinterpret_cast(replay_object->object)->EncryptionBlt(in_pCryptoSession, + in_pSrcSurface, + in_pDstSurface, + IVSize, + pIV->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + pSrcSurface, + pDstSurface, + IVSize, + pIV); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_DecryptionBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + format::HandleId pSrcSurface, + format::HandleId pDstSurface, + StructPointerDecoder* pEncryptedBlockInfo, + UINT ContentKeySize, + PointerDecoder* pContentKey, + UINT IVSize, + PointerDecoder* pIV) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + pSrcSurface, + pDstSurface, + pEncryptedBlockInfo, + ContentKeySize, + pContentKey, + IVSize, + pIV); + auto in_pCryptoSession = MapObject(pCryptoSession); + auto in_pSrcSurface = MapObject(pSrcSurface); + auto in_pDstSurface = MapObject(pDstSurface); + if(!pIV->IsNull()) + { + pIV->AllocateOutputData(IVSize); + } + reinterpret_cast(replay_object->object)->DecryptionBlt(in_pCryptoSession, + in_pSrcSurface, + in_pDstSurface, + pEncryptedBlockInfo->GetPointer(), + ContentKeySize, + pContentKey->GetPointer(), + IVSize, + pIV->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + pSrcSurface, + pDstSurface, + pEncryptedBlockInfo, + ContentKeySize, + pContentKey, + IVSize, + pIV); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_StartSessionKeyRefresh( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + UINT RandomNumberSize, + PointerDecoder* pRandomNumber) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + RandomNumberSize, + pRandomNumber); + auto in_pCryptoSession = MapObject(pCryptoSession); + if(!pRandomNumber->IsNull()) + { + pRandomNumber->AllocateOutputData(RandomNumberSize); + } + reinterpret_cast(replay_object->object)->StartSessionKeyRefresh(in_pCryptoSession, + RandomNumberSize, + pRandomNumber->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + RandomNumberSize, + pRandomNumber); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_FinishSessionKeyRefresh( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession); + auto in_pCryptoSession = MapObject(pCryptoSession); + reinterpret_cast(replay_object->object)->FinishSessionKeyRefresh(in_pCryptoSession); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_GetEncryptionBltKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT KeySize, + PointerDecoder* pReadbackKey) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + KeySize, + pReadbackKey); + auto in_pCryptoSession = MapObject(pCryptoSession); + if(!pReadbackKey->IsNull()) + { + pReadbackKey->AllocateOutputData(KeySize); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetEncryptionBltKey(in_pCryptoSession, + KeySize, + pReadbackKey->GetOutputPointer()); + CheckReplayResult("ID3D11VideoContext_GetEncryptionBltKey", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + KeySize, + pReadbackKey); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT DataSize, + PointerDecoder* pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pChannel, + DataSize, + pData); + auto in_pChannel = MapObject(pChannel); + if(!pData->IsNull()) + { + pData->AllocateOutputData(DataSize); + } + auto replay_result = reinterpret_cast(replay_object->object)->NegotiateAuthenticatedChannelKeyExchange(in_pChannel, + DataSize, + pData->GetOutputPointer()); + CheckReplayResult("ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pChannel, + DataSize, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_QueryAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT InputSize, + PointerDecoder* pInput, + UINT OutputSize, + PointerDecoder* pOutput) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pChannel, + InputSize, + pInput, + OutputSize, + pOutput); + auto in_pChannel = MapObject(pChannel); + if(!pOutput->IsNull()) + { + pOutput->AllocateOutputData(OutputSize); + } + auto replay_result = reinterpret_cast(replay_object->object)->QueryAuthenticatedChannel(in_pChannel, + InputSize, + pInput->GetPointer(), + OutputSize, + pOutput->GetOutputPointer()); + CheckReplayResult("ID3D11VideoContext_QueryAuthenticatedChannel", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pChannel, + InputSize, + pInput, + OutputSize, + pOutput); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_ConfigureAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT InputSize, + PointerDecoder* pInput, + StructPointerDecoder* pOutput) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pChannel, + InputSize, + pInput, + pOutput); + auto in_pChannel = MapObject(pChannel); + if(!pOutput->IsNull()) + { + pOutput->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->ConfigureAuthenticatedChannel(in_pChannel, + InputSize, + pInput->GetPointer(), + pOutput->GetOutputPointer()); + CheckReplayResult("ID3D11VideoContext_ConfigureAuthenticatedChannel", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pChannel, + InputSize, + pInput, + pOutput); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorSetStreamRotation( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_ROTATION Rotation) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + Rotation); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamRotation(in_pVideoProcessor, + StreamIndex, + Enable, + Rotation); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + Rotation); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext_VideoProcessorGetStreamRotation( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pRotation) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnable, + pRotation); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pEnable->IsNull()) + { + pEnable->AllocateOutputData(1); + } + if(!pRotation->IsNull()) + { + pRotation->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamRotation(in_pVideoProcessor, + StreamIndex, + pEnable->GetOutputPointer(), + pRotation->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnable, + pRotation); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_CreateVideoDecoder( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pVideoDesc, + StructPointerDecoder* pConfig, + HandlePointerDecoder* ppDecoder) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoDesc, + pConfig, + ppDecoder); + if(!ppDecoder->IsNull()) ppDecoder->SetHandleLength(1); + auto out_p_ppDecoder = ppDecoder->GetPointer(); + auto out_hp_ppDecoder = ppDecoder->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateVideoDecoder(pVideoDesc->GetPointer(), + pConfig->GetPointer(), + out_hp_ppDecoder); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppDecoder, out_hp_ppDecoder, format::ApiCall_ID3D11VideoDevice_CreateVideoDecoder); + } + CheckReplayResult("ID3D11VideoDevice_CreateVideoDecoder", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoDesc, + pConfig, + ppDecoder); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_CreateVideoProcessor( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pEnum, + UINT RateConversionIndex, + HandlePointerDecoder* ppVideoProcessor) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pEnum, + RateConversionIndex, + ppVideoProcessor); + auto in_pEnum = MapObject(pEnum); + if(!ppVideoProcessor->IsNull()) ppVideoProcessor->SetHandleLength(1); + auto out_p_ppVideoProcessor = ppVideoProcessor->GetPointer(); + auto out_hp_ppVideoProcessor = ppVideoProcessor->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateVideoProcessor(in_pEnum, + RateConversionIndex, + out_hp_ppVideoProcessor); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppVideoProcessor, out_hp_ppVideoProcessor, format::ApiCall_ID3D11VideoDevice_CreateVideoProcessor); + } + CheckReplayResult("ID3D11VideoDevice_CreateVideoProcessor", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pEnum, + RateConversionIndex, + ppVideoProcessor); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_CreateAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType, + HandlePointerDecoder* ppAuthenticatedChannel) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ChannelType, + ppAuthenticatedChannel); + if(!ppAuthenticatedChannel->IsNull()) ppAuthenticatedChannel->SetHandleLength(1); + auto out_p_ppAuthenticatedChannel = ppAuthenticatedChannel->GetPointer(); + auto out_hp_ppAuthenticatedChannel = ppAuthenticatedChannel->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateAuthenticatedChannel(ChannelType, + out_hp_ppAuthenticatedChannel); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppAuthenticatedChannel, out_hp_ppAuthenticatedChannel, format::ApiCall_ID3D11VideoDevice_CreateAuthenticatedChannel); + } + CheckReplayResult("ID3D11VideoDevice_CreateAuthenticatedChannel", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ChannelType, + ppAuthenticatedChannel); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_CreateCryptoSession( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pKeyExchangeType, + HandlePointerDecoder* ppCryptoSession) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoType, + pDecoderProfile, + pKeyExchangeType, + ppCryptoSession); + if(!ppCryptoSession->IsNull()) ppCryptoSession->SetHandleLength(1); + auto out_p_ppCryptoSession = ppCryptoSession->GetPointer(); + auto out_hp_ppCryptoSession = ppCryptoSession->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateCryptoSession(pCryptoType->GetPointer(), + pDecoderProfile->GetPointer(), + pKeyExchangeType->GetPointer(), + out_hp_ppCryptoSession); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppCryptoSession, out_hp_ppCryptoSession, format::ApiCall_ID3D11VideoDevice_CreateCryptoSession); + } + CheckReplayResult("ID3D11VideoDevice_CreateCryptoSession", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoType, + pDecoderProfile, + pKeyExchangeType, + ppCryptoSession); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_CreateVideoDecoderOutputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVDOVView) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc, + ppVDOVView); + auto in_pResource = MapObject(pResource); + if(!ppVDOVView->IsNull()) ppVDOVView->SetHandleLength(1); + auto out_p_ppVDOVView = ppVDOVView->GetPointer(); + auto out_hp_ppVDOVView = ppVDOVView->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateVideoDecoderOutputView(in_pResource, + pDesc->GetPointer(), + out_hp_ppVDOVView); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppVDOVView, out_hp_ppVDOVView, format::ApiCall_ID3D11VideoDevice_CreateVideoDecoderOutputView); + } + CheckReplayResult("ID3D11VideoDevice_CreateVideoDecoderOutputView", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc, + ppVDOVView); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_CreateVideoProcessorInputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + format::HandleId pEnum, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVPIView) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pEnum, + pDesc, + ppVPIView); + auto in_pResource = MapObject(pResource); + auto in_pEnum = MapObject(pEnum); + if(!ppVPIView->IsNull()) ppVPIView->SetHandleLength(1); + auto out_p_ppVPIView = ppVPIView->GetPointer(); + auto out_hp_ppVPIView = ppVPIView->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateVideoProcessorInputView(in_pResource, + in_pEnum, + pDesc->GetPointer(), + out_hp_ppVPIView); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppVPIView, out_hp_ppVPIView, format::ApiCall_ID3D11VideoDevice_CreateVideoProcessorInputView); + } + CheckReplayResult("ID3D11VideoDevice_CreateVideoProcessorInputView", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pEnum, + pDesc, + ppVPIView); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_CreateVideoProcessorOutputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + format::HandleId pEnum, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVPOView) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pEnum, + pDesc, + ppVPOView); + auto in_pResource = MapObject(pResource); + auto in_pEnum = MapObject(pEnum); + if(!ppVPOView->IsNull()) ppVPOView->SetHandleLength(1); + auto out_p_ppVPOView = ppVPOView->GetPointer(); + auto out_hp_ppVPOView = ppVPOView->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateVideoProcessorOutputView(in_pResource, + in_pEnum, + pDesc->GetPointer(), + out_hp_ppVPOView); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppVPOView, out_hp_ppVPOView, format::ApiCall_ID3D11VideoDevice_CreateVideoProcessorOutputView); + } + CheckReplayResult("ID3D11VideoDevice_CreateVideoProcessorOutputView", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pEnum, + pDesc, + ppVPOView); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_CreateVideoProcessorEnumerator( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppEnum) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc, + ppEnum); + if(!ppEnum->IsNull()) ppEnum->SetHandleLength(1); + auto out_p_ppEnum = ppEnum->GetPointer(); + auto out_hp_ppEnum = ppEnum->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateVideoProcessorEnumerator(pDesc->GetPointer(), + out_hp_ppEnum); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppEnum, out_hp_ppEnum, format::ApiCall_ID3D11VideoDevice_CreateVideoProcessorEnumerator); + } + CheckReplayResult("ID3D11VideoDevice_CreateVideoProcessorEnumerator", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc, + ppEnum); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_GetVideoDecoderProfileCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->GetVideoDecoderProfileCount(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_GetVideoDecoderProfile( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT Index, + StructPointerDecoder* pDecoderProfile) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + Index, + pDecoderProfile); + if(!pDecoderProfile->IsNull()) + { + pDecoderProfile->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetVideoDecoderProfile(Index, + pDecoderProfile->GetOutputPointer()); + CheckReplayResult("ID3D11VideoDevice_GetVideoDecoderProfile", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + Index, + pDecoderProfile); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_CheckVideoDecoderFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDecoderProfile, + DXGI_FORMAT Format, + PointerDecoder* pSupported) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDecoderProfile, + Format, + pSupported); + if(!pSupported->IsNull()) + { + pSupported->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->CheckVideoDecoderFormat(pDecoderProfile->GetPointer(), + Format, + pSupported->GetOutputPointer()); + CheckReplayResult("ID3D11VideoDevice_CheckVideoDecoderFormat", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDecoderProfile, + Format, + pSupported); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_GetVideoDecoderConfigCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + PointerDecoder* pCount) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc, + pCount); + if(!pCount->IsNull()) + { + pCount->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetVideoDecoderConfigCount(pDesc->GetPointer(), + pCount->GetOutputPointer()); + CheckReplayResult("ID3D11VideoDevice_GetVideoDecoderConfigCount", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc, + pCount); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_GetVideoDecoderConfig( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + UINT Index, + StructPointerDecoder* pConfig) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc, + Index, + pConfig); + if(!pConfig->IsNull()) + { + pConfig->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetVideoDecoderConfig(pDesc->GetPointer(), + Index, + pConfig->GetOutputPointer()); + CheckReplayResult("ID3D11VideoDevice_GetVideoDecoderConfig", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc, + Index, + pConfig); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_GetContentProtectionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pCaps) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoType, + pDecoderProfile, + pCaps); + if(!pCaps->IsNull()) + { + pCaps->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetContentProtectionCaps(pCryptoType->GetPointer(), + pDecoderProfile->GetPointer(), + pCaps->GetOutputPointer()); + CheckReplayResult("ID3D11VideoDevice_GetContentProtectionCaps", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoType, + pDecoderProfile, + pCaps); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_CheckCryptoKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + UINT Index, + StructPointerDecoder* pKeyExchangeType) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoType, + pDecoderProfile, + Index, + pKeyExchangeType); + if(!pKeyExchangeType->IsNull()) + { + pKeyExchangeType->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->CheckCryptoKeyExchange(pCryptoType->GetPointer(), + pDecoderProfile->GetPointer(), + Index, + pKeyExchangeType->GetOutputPointer()); + CheckReplayResult("ID3D11VideoDevice_CheckCryptoKeyExchange", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoType, + pDecoderProfile, + Index, + pKeyExchangeType); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + guid, + DataSize, + pData); + auto replay_result = reinterpret_cast(replay_object->object)->SetPrivateData(*guid.decoded_value, + DataSize, + pData->GetPointer()); + CheckReplayResult("ID3D11VideoDevice_SetPrivateData", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + guid, + DataSize, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + guid, + pData); + auto in_pData = MapObject(pData); + auto replay_result = reinterpret_cast(replay_object->object)->SetPrivateDataInterface(*guid.decoded_value, + in_pData); + CheckReplayResult("ID3D11VideoDevice_SetPrivateDataInterface", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + guid, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateShaderResourceView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppSRView) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc, + ppSRView); + auto in_pResource = MapObject(pResource); + if(!ppSRView->IsNull()) ppSRView->SetHandleLength(1); + auto out_p_ppSRView = ppSRView->GetPointer(); + auto out_hp_ppSRView = ppSRView->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateShaderResourceView(in_pResource, + pDesc->GetPointer(), + out_hp_ppSRView); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppSRView, out_hp_ppSRView, format::ApiCall_ID3D11Device_CreateShaderResourceView); + } + CheckReplayResult("ID3D11Device_CreateShaderResourceView", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc, + ppSRView); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateUnorderedAccessView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppUAView) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc, + ppUAView); + auto in_pResource = MapObject(pResource); + if(!ppUAView->IsNull()) ppUAView->SetHandleLength(1); + auto out_p_ppUAView = ppUAView->GetPointer(); + auto out_hp_ppUAView = ppUAView->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateUnorderedAccessView(in_pResource, + pDesc->GetPointer(), + out_hp_ppUAView); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppUAView, out_hp_ppUAView, format::ApiCall_ID3D11Device_CreateUnorderedAccessView); + } + CheckReplayResult("ID3D11Device_CreateUnorderedAccessView", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc, + ppUAView); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateRenderTargetView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppRTView) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc, + ppRTView); + auto in_pResource = MapObject(pResource); + if(!ppRTView->IsNull()) ppRTView->SetHandleLength(1); + auto out_p_ppRTView = ppRTView->GetPointer(); + auto out_hp_ppRTView = ppRTView->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateRenderTargetView(in_pResource, + pDesc->GetPointer(), + out_hp_ppRTView); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppRTView, out_hp_ppRTView, format::ApiCall_ID3D11Device_CreateRenderTargetView); + } + CheckReplayResult("ID3D11Device_CreateRenderTargetView", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc, + ppRTView); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateDepthStencilView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppDepthStencilView) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc, + ppDepthStencilView); + auto in_pResource = MapObject(pResource); + if(!ppDepthStencilView->IsNull()) ppDepthStencilView->SetHandleLength(1); + auto out_p_ppDepthStencilView = ppDepthStencilView->GetPointer(); + auto out_hp_ppDepthStencilView = ppDepthStencilView->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateDepthStencilView(in_pResource, + pDesc->GetPointer(), + out_hp_ppDepthStencilView); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppDepthStencilView, out_hp_ppDepthStencilView, format::ApiCall_ID3D11Device_CreateDepthStencilView); + } + CheckReplayResult("ID3D11Device_CreateDepthStencilView", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc, + ppDepthStencilView); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputElementDescs, + UINT NumElements, + PointerDecoder* pShaderBytecodeWithInputSignature, + SIZE_T BytecodeLength, + HandlePointerDecoder* ppInputLayout) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pInputElementDescs, + NumElements, + pShaderBytecodeWithInputSignature, + BytecodeLength, + ppInputLayout); + if(!ppInputLayout->IsNull()) ppInputLayout->SetHandleLength(1); + auto out_p_ppInputLayout = ppInputLayout->GetPointer(); + auto out_hp_ppInputLayout = ppInputLayout->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateInputLayout(pInputElementDescs->GetPointer(), + NumElements, + pShaderBytecodeWithInputSignature->GetPointer(), + BytecodeLength, + out_hp_ppInputLayout); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppInputLayout, out_hp_ppInputLayout, format::ApiCall_ID3D11Device_CreateInputLayout); + } + CheckReplayResult("ID3D11Device_CreateInputLayout", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pInputElementDescs, + NumElements, + pShaderBytecodeWithInputSignature, + BytecodeLength, + ppInputLayout); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateVertexShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppVertexShader) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppVertexShader); + auto in_pClassLinkage = MapObject(pClassLinkage); + if(!ppVertexShader->IsNull()) ppVertexShader->SetHandleLength(1); + auto out_p_ppVertexShader = ppVertexShader->GetPointer(); + auto out_hp_ppVertexShader = ppVertexShader->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateVertexShader(pShaderBytecode->GetPointer(), + BytecodeLength, + in_pClassLinkage, + out_hp_ppVertexShader); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppVertexShader, out_hp_ppVertexShader, format::ApiCall_ID3D11Device_CreateVertexShader); + } + CheckReplayResult("ID3D11Device_CreateVertexShader", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppVertexShader); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateGeometryShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppGeometryShader) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppGeometryShader); + auto in_pClassLinkage = MapObject(pClassLinkage); + if(!ppGeometryShader->IsNull()) ppGeometryShader->SetHandleLength(1); + auto out_p_ppGeometryShader = ppGeometryShader->GetPointer(); + auto out_hp_ppGeometryShader = ppGeometryShader->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateGeometryShader(pShaderBytecode->GetPointer(), + BytecodeLength, + in_pClassLinkage, + out_hp_ppGeometryShader); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppGeometryShader, out_hp_ppGeometryShader, format::ApiCall_ID3D11Device_CreateGeometryShader); + } + CheckReplayResult("ID3D11Device_CreateGeometryShader", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppGeometryShader); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateGeometryShaderWithStreamOutput( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + StructPointerDecoder* pSODeclaration, + UINT NumEntries, + PointerDecoder* pBufferStrides, + UINT NumStrides, + UINT RasterizedStream, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppGeometryShader) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pShaderBytecode, + BytecodeLength, + pSODeclaration, + NumEntries, + pBufferStrides, + NumStrides, + RasterizedStream, + pClassLinkage, + ppGeometryShader); + auto in_pClassLinkage = MapObject(pClassLinkage); + if(!ppGeometryShader->IsNull()) ppGeometryShader->SetHandleLength(1); + auto out_p_ppGeometryShader = ppGeometryShader->GetPointer(); + auto out_hp_ppGeometryShader = ppGeometryShader->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateGeometryShaderWithStreamOutput(pShaderBytecode->GetPointer(), + BytecodeLength, + pSODeclaration->GetPointer(), + NumEntries, + pBufferStrides->GetPointer(), + NumStrides, + RasterizedStream, + in_pClassLinkage, + out_hp_ppGeometryShader); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppGeometryShader, out_hp_ppGeometryShader, format::ApiCall_ID3D11Device_CreateGeometryShaderWithStreamOutput); + } + CheckReplayResult("ID3D11Device_CreateGeometryShaderWithStreamOutput", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pShaderBytecode, + BytecodeLength, + pSODeclaration, + NumEntries, + pBufferStrides, + NumStrides, + RasterizedStream, + pClassLinkage, + ppGeometryShader); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreatePixelShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppPixelShader) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppPixelShader); + auto in_pClassLinkage = MapObject(pClassLinkage); + if(!ppPixelShader->IsNull()) ppPixelShader->SetHandleLength(1); + auto out_p_ppPixelShader = ppPixelShader->GetPointer(); + auto out_hp_ppPixelShader = ppPixelShader->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreatePixelShader(pShaderBytecode->GetPointer(), + BytecodeLength, + in_pClassLinkage, + out_hp_ppPixelShader); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppPixelShader, out_hp_ppPixelShader, format::ApiCall_ID3D11Device_CreatePixelShader); + } + CheckReplayResult("ID3D11Device_CreatePixelShader", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppPixelShader); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateHullShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppHullShader) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppHullShader); + auto in_pClassLinkage = MapObject(pClassLinkage); + if(!ppHullShader->IsNull()) ppHullShader->SetHandleLength(1); + auto out_p_ppHullShader = ppHullShader->GetPointer(); + auto out_hp_ppHullShader = ppHullShader->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateHullShader(pShaderBytecode->GetPointer(), + BytecodeLength, + in_pClassLinkage, + out_hp_ppHullShader); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppHullShader, out_hp_ppHullShader, format::ApiCall_ID3D11Device_CreateHullShader); + } + CheckReplayResult("ID3D11Device_CreateHullShader", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppHullShader); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateDomainShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppDomainShader) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppDomainShader); + auto in_pClassLinkage = MapObject(pClassLinkage); + if(!ppDomainShader->IsNull()) ppDomainShader->SetHandleLength(1); + auto out_p_ppDomainShader = ppDomainShader->GetPointer(); + auto out_hp_ppDomainShader = ppDomainShader->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateDomainShader(pShaderBytecode->GetPointer(), + BytecodeLength, + in_pClassLinkage, + out_hp_ppDomainShader); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppDomainShader, out_hp_ppDomainShader, format::ApiCall_ID3D11Device_CreateDomainShader); + } + CheckReplayResult("ID3D11Device_CreateDomainShader", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppDomainShader); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateComputeShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppComputeShader) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppComputeShader); + auto in_pClassLinkage = MapObject(pClassLinkage); + if(!ppComputeShader->IsNull()) ppComputeShader->SetHandleLength(1); + auto out_p_ppComputeShader = ppComputeShader->GetPointer(); + auto out_hp_ppComputeShader = ppComputeShader->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateComputeShader(pShaderBytecode->GetPointer(), + BytecodeLength, + in_pClassLinkage, + out_hp_ppComputeShader); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppComputeShader, out_hp_ppComputeShader, format::ApiCall_ID3D11Device_CreateComputeShader); + } + CheckReplayResult("ID3D11Device_CreateComputeShader", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppComputeShader); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateClassLinkage( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + HandlePointerDecoder* ppLinkage) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppLinkage); + if(!ppLinkage->IsNull()) ppLinkage->SetHandleLength(1); + auto out_p_ppLinkage = ppLinkage->GetPointer(); + auto out_hp_ppLinkage = ppLinkage->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateClassLinkage(out_hp_ppLinkage); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppLinkage, out_hp_ppLinkage, format::ApiCall_ID3D11Device_CreateClassLinkage); + } + CheckReplayResult("ID3D11Device_CreateClassLinkage", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppLinkage); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pBlendStateDesc, + HandlePointerDecoder* ppBlendState) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pBlendStateDesc, + ppBlendState); + if(!ppBlendState->IsNull()) ppBlendState->SetHandleLength(1); + auto out_p_ppBlendState = ppBlendState->GetPointer(); + auto out_hp_ppBlendState = ppBlendState->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateBlendState(pBlendStateDesc->GetPointer(), + out_hp_ppBlendState); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppBlendState, out_hp_ppBlendState, format::ApiCall_ID3D11Device_CreateBlendState); + } + CheckReplayResult("ID3D11Device_CreateBlendState", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pBlendStateDesc, + ppBlendState); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDepthStencilDesc, + HandlePointerDecoder* ppDepthStencilState) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDepthStencilDesc, + ppDepthStencilState); + if(!ppDepthStencilState->IsNull()) ppDepthStencilState->SetHandleLength(1); + auto out_p_ppDepthStencilState = ppDepthStencilState->GetPointer(); + auto out_hp_ppDepthStencilState = ppDepthStencilState->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateDepthStencilState(pDepthStencilDesc->GetPointer(), + out_hp_ppDepthStencilState); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppDepthStencilState, out_hp_ppDepthStencilState, format::ApiCall_ID3D11Device_CreateDepthStencilState); + } + CheckReplayResult("ID3D11Device_CreateDepthStencilState", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDepthStencilDesc, + ppDepthStencilState); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateRasterizerState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pRasterizerDesc, + ppRasterizerState); + if(!ppRasterizerState->IsNull()) ppRasterizerState->SetHandleLength(1); + auto out_p_ppRasterizerState = ppRasterizerState->GetPointer(); + auto out_hp_ppRasterizerState = ppRasterizerState->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateRasterizerState(pRasterizerDesc->GetPointer(), + out_hp_ppRasterizerState); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppRasterizerState, out_hp_ppRasterizerState, format::ApiCall_ID3D11Device_CreateRasterizerState); + } + CheckReplayResult("ID3D11Device_CreateRasterizerState", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pRasterizerDesc, + ppRasterizerState); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateSamplerState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pSamplerDesc, + HandlePointerDecoder* ppSamplerState) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pSamplerDesc, + ppSamplerState); + if(!ppSamplerState->IsNull()) ppSamplerState->SetHandleLength(1); + auto out_p_ppSamplerState = ppSamplerState->GetPointer(); + auto out_hp_ppSamplerState = ppSamplerState->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateSamplerState(pSamplerDesc->GetPointer(), + out_hp_ppSamplerState); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppSamplerState, out_hp_ppSamplerState, format::ApiCall_ID3D11Device_CreateSamplerState); + } + CheckReplayResult("ID3D11Device_CreateSamplerState", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pSamplerDesc, + ppSamplerState); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateQuery( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pQueryDesc, + HandlePointerDecoder* ppQuery) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pQueryDesc, + ppQuery); + if(!ppQuery->IsNull()) ppQuery->SetHandleLength(1); + auto out_p_ppQuery = ppQuery->GetPointer(); + auto out_hp_ppQuery = ppQuery->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateQuery(pQueryDesc->GetPointer(), + out_hp_ppQuery); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppQuery, out_hp_ppQuery, format::ApiCall_ID3D11Device_CreateQuery); + } + CheckReplayResult("ID3D11Device_CreateQuery", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pQueryDesc, + ppQuery); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreatePredicate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pPredicateDesc, + HandlePointerDecoder* ppPredicate) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pPredicateDesc, + ppPredicate); + if(!ppPredicate->IsNull()) ppPredicate->SetHandleLength(1); + auto out_p_ppPredicate = ppPredicate->GetPointer(); + auto out_hp_ppPredicate = ppPredicate->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreatePredicate(pPredicateDesc->GetPointer(), + out_hp_ppPredicate); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppPredicate, out_hp_ppPredicate, format::ApiCall_ID3D11Device_CreatePredicate); + } + CheckReplayResult("ID3D11Device_CreatePredicate", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pPredicateDesc, + ppPredicate); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateCounter( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCounterDesc, + HandlePointerDecoder* ppCounter) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCounterDesc, + ppCounter); + if(!ppCounter->IsNull()) ppCounter->SetHandleLength(1); + auto out_p_ppCounter = ppCounter->GetPointer(); + auto out_hp_ppCounter = ppCounter->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateCounter(pCounterDesc->GetPointer(), + out_hp_ppCounter); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppCounter, out_hp_ppCounter, format::ApiCall_ID3D11Device_CreateCounter); + } + CheckReplayResult("ID3D11Device_CreateCounter", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCounterDesc, + ppCounter); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CreateDeferredContext( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ContextFlags, + ppDeferredContext); + DxObjectInfo object_info_ppDeferredContext{}; + if(!ppDeferredContext->IsNull()) + { + ppDeferredContext->SetHandleLength(1); + ppDeferredContext->SetConsumerData(0, &object_info_ppDeferredContext); + } + auto replay_result = OverrideCreateDeferredContext(replay_object, + return_value, + ContextFlags, + ppDeferredContext); + if (SUCCEEDED(replay_result)) + { + AddObject(ppDeferredContext->GetPointer(), ppDeferredContext->GetHandlePointer(), std::move(object_info_ppDeferredContext), format::ApiCall_ID3D11Device_CreateDeferredContext); + } + CheckReplayResult("ID3D11Device_CreateDeferredContext", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ContextFlags, + ppDeferredContext); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_OpenSharedResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hResource, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppResource) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + hResource, + ReturnedInterface, + ppResource); + auto in_hResource = static_cast(PreProcessExternalObject(hResource, format::ApiCallId::ApiCall_ID3D11Device_OpenSharedResource, "ID3D11Device_OpenSharedResource")); + if(!ppResource->IsNull()) ppResource->SetHandleLength(1); + auto out_p_ppResource = ppResource->GetPointer(); + auto out_hp_ppResource = ppResource->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->OpenSharedResource(in_hResource, + *ReturnedInterface.decoded_value, + out_hp_ppResource); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppResource, out_hp_ppResource, format::ApiCall_ID3D11Device_OpenSharedResource); + } + CheckReplayResult("ID3D11Device_OpenSharedResource", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + hResource, + ReturnedInterface, + ppResource); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CheckFormatSupport( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + PointerDecoder* pFormatSupport) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + Format, + pFormatSupport); + if(!pFormatSupport->IsNull()) + { + pFormatSupport->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->CheckFormatSupport(Format, + pFormatSupport->GetOutputPointer()); + CheckReplayResult("ID3D11Device_CheckFormatSupport", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + Format, + pFormatSupport); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CheckMultisampleQualityLevels( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + UINT SampleCount, + PointerDecoder* pNumQualityLevels) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + Format, + SampleCount, + pNumQualityLevels); + if(!pNumQualityLevels->IsNull()) + { + pNumQualityLevels->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->CheckMultisampleQualityLevels(Format, + SampleCount, + pNumQualityLevels->GetOutputPointer()); + CheckReplayResult("ID3D11Device_CheckMultisampleQualityLevels", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + Format, + SampleCount, + pNumQualityLevels); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CheckCounterInfo( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCounterInfo) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCounterInfo); + if(!pCounterInfo->IsNull()) + { + pCounterInfo->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->CheckCounterInfo(pCounterInfo->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCounterInfo); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_CheckCounter( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + PointerDecoder* pType, + PointerDecoder* pActiveCounters, + StringDecoder* szName, + PointerDecoder* pNameLength, + StringDecoder* szUnits, + PointerDecoder* pUnitsLength, + StringDecoder* szDescription, + PointerDecoder* pDescriptionLength) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc, + pType, + pActiveCounters, + szName, + pNameLength, + szUnits, + pUnitsLength, + szDescription, + pDescriptionLength); + if(!pType->IsNull()) + { + pType->AllocateOutputData(1); + } + if(!pActiveCounters->IsNull()) + { + pActiveCounters->AllocateOutputData(1); + } + if(!pNameLength->IsNull()) + { + pNameLength->AllocateOutputData(1, GetOutputArrayCount("ID3D11Device::CheckCounter", return_value, object_id, VariableLengthArrayIndices::kD3D11DeviceArrayCheckCounter, pNameLength, szName)); + } + if(!pUnitsLength->IsNull()) + { + pUnitsLength->AllocateOutputData(1, GetOutputArrayCount("ID3D11Device::CheckCounter", return_value, object_id, VariableLengthArrayIndices::kD3D11DeviceArrayCheckCounter, pUnitsLength, szUnits)); + } + if(!pDescriptionLength->IsNull()) + { + pDescriptionLength->AllocateOutputData(1, GetOutputArrayCount("ID3D11Device::CheckCounter", return_value, object_id, VariableLengthArrayIndices::kD3D11DeviceArrayCheckCounter, pDescriptionLength, szDescription)); + } + if(!szName->IsNull() && !pNameLength->IsNull()) + { + szName->AllocateOutputData(*pNameLength->GetOutputPointer()); + } + if(!szUnits->IsNull() && !pUnitsLength->IsNull()) + { + szUnits->AllocateOutputData(*pUnitsLength->GetOutputPointer()); + } + if(!szDescription->IsNull() && !pDescriptionLength->IsNull()) + { + szDescription->AllocateOutputData(*pDescriptionLength->GetOutputPointer()); + } + auto replay_result = reinterpret_cast(replay_object->object)->CheckCounter(pDesc->GetPointer(), + pType->GetOutputPointer(), + pActiveCounters->GetOutputPointer(), + szName->GetOutputPointer(), + pNameLength->GetOutputPointer(), + szUnits->GetOutputPointer(), + pUnitsLength->GetOutputPointer(), + szDescription->GetOutputPointer(), + pDescriptionLength->GetOutputPointer()); + if (szName->IsNull() && !pNameLength->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11DeviceArrayCheckCounter, *pNameLength->GetOutputPointer()); } + if (szUnits->IsNull() && !pUnitsLength->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11DeviceArrayCheckCounter, *pUnitsLength->GetOutputPointer()); } + if (szDescription->IsNull() && !pDescriptionLength->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11DeviceArrayCheckCounter, *pDescriptionLength->GetOutputPointer()); } + CheckReplayResult("ID3D11Device_CheckCounter", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc, + pType, + pActiveCounters, + szName, + pNameLength, + szUnits, + pUnitsLength, + szDescription, + pDescriptionLength); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_GetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + PointerDecoder* pDataSize, + PointerDecoder* pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + guid, + pDataSize, + pData); + if(!pDataSize->IsNull()) + { + pDataSize->AllocateOutputData(1, GetOutputArrayCount("ID3D11Device::GetPrivateData", return_value, object_id, VariableLengthArrayIndices::kD3D11DeviceArrayGetPrivateData, pDataSize, pData)); + } + if(!pData->IsNull() && !pDataSize->IsNull()) + { + pData->AllocateOutputData(*pDataSize->GetOutputPointer()); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetPrivateData(*guid.decoded_value, + pDataSize->GetOutputPointer(), + pData->GetOutputPointer()); + if (pData->IsNull() && !pDataSize->IsNull()) { SetOutputArrayCount(object_id, VariableLengthArrayIndices::kD3D11DeviceArrayGetPrivateData, *pDataSize->GetOutputPointer()); } + CheckReplayResult("ID3D11Device_GetPrivateData", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + guid, + pDataSize, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + guid, + DataSize, + pData); + auto replay_result = reinterpret_cast(replay_object->object)->SetPrivateData(*guid.decoded_value, + DataSize, + pData->GetPointer()); + CheckReplayResult("ID3D11Device_SetPrivateData", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + guid, + DataSize, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + guid, + pData); + auto in_pData = MapObject(pData); + auto replay_result = reinterpret_cast(replay_object->object)->SetPrivateDataInterface(*guid.decoded_value, + in_pData); + CheckReplayResult("ID3D11Device_SetPrivateDataInterface", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + guid, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_GetFeatureLevel( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D_FEATURE_LEVEL return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->GetFeatureLevel(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_GetCreationFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->GetCreationFlags(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_GetDeviceRemovedReason( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->GetDeviceRemovedReason(); + CheckReplayResult("ID3D11Device_GetDeviceRemovedReason", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_GetImmediateContext( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppImmediateContext); + if(!ppImmediateContext->IsNull()) ppImmediateContext->SetHandleLength(1); + auto out_p_ppImmediateContext = ppImmediateContext->GetPointer(); + auto out_hp_ppImmediateContext = ppImmediateContext->GetHandlePointer(); + reinterpret_cast(replay_object->object)->GetImmediateContext(out_hp_ppImmediateContext); + AddObject(out_p_ppImmediateContext, out_hp_ppImmediateContext, format::ApiCall_ID3D11Device_GetImmediateContext); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppImmediateContext); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_SetExceptionMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT RaiseFlags) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + RaiseFlags); + auto replay_result = reinterpret_cast(replay_object->object)->SetExceptionMode(RaiseFlags); + CheckReplayResult("ID3D11Device_SetExceptionMode", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + RaiseFlags); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device_GetExceptionMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->GetExceptionMode(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11BlendState1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc1(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11RasterizerState1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc1(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_CopySubresourceRegion1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox, + UINT CopyFlags) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDstResource, + DstSubresource, + DstX, + DstY, + DstZ, + pSrcResource, + SrcSubresource, + pSrcBox, + CopyFlags); + auto in_pDstResource = MapObject(pDstResource); + auto in_pSrcResource = MapObject(pSrcResource); + reinterpret_cast(replay_object->object)->CopySubresourceRegion1(in_pDstResource, + DstSubresource, + DstX, + DstY, + DstZ, + in_pSrcResource, + SrcSubresource, + pSrcBox->GetPointer(), + CopyFlags); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDstResource, + DstSubresource, + DstX, + DstY, + DstZ, + pSrcResource, + SrcSubresource, + pSrcBox, + CopyFlags); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_DiscardResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource); + auto in_pResource = MapObject(pResource); + reinterpret_cast(replay_object->object)->DiscardResource(in_pResource); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_DiscardView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResourceView) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResourceView); + auto in_pResourceView = MapObject(pResourceView); + reinterpret_cast(replay_object->object)->DiscardView(in_pResourceView); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResourceView); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_VSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + auto in_ppConstantBuffers = MapObjects(ppConstantBuffers, NumBuffers); + reinterpret_cast(replay_object->object)->VSSetConstantBuffers1(StartSlot, + NumBuffers, + in_ppConstantBuffers, + pFirstConstant->GetPointer(), + pNumConstants->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_HSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + auto in_ppConstantBuffers = MapObjects(ppConstantBuffers, NumBuffers); + reinterpret_cast(replay_object->object)->HSSetConstantBuffers1(StartSlot, + NumBuffers, + in_ppConstantBuffers, + pFirstConstant->GetPointer(), + pNumConstants->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_DSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + auto in_ppConstantBuffers = MapObjects(ppConstantBuffers, NumBuffers); + reinterpret_cast(replay_object->object)->DSSetConstantBuffers1(StartSlot, + NumBuffers, + in_ppConstantBuffers, + pFirstConstant->GetPointer(), + pNumConstants->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_GSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + auto in_ppConstantBuffers = MapObjects(ppConstantBuffers, NumBuffers); + reinterpret_cast(replay_object->object)->GSSetConstantBuffers1(StartSlot, + NumBuffers, + in_ppConstantBuffers, + pFirstConstant->GetPointer(), + pNumConstants->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_PSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + auto in_ppConstantBuffers = MapObjects(ppConstantBuffers, NumBuffers); + reinterpret_cast(replay_object->object)->PSSetConstantBuffers1(StartSlot, + NumBuffers, + in_ppConstantBuffers, + pFirstConstant->GetPointer(), + pNumConstants->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_CSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + auto in_ppConstantBuffers = MapObjects(ppConstantBuffers, NumBuffers); + reinterpret_cast(replay_object->object)->CSSetConstantBuffers1(StartSlot, + NumBuffers, + in_ppConstantBuffers, + pFirstConstant->GetPointer(), + pNumConstants->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_VSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + if(!ppConstantBuffers->IsNull()) ppConstantBuffers->SetHandleLength(NumBuffers); + auto out_p_ppConstantBuffers = ppConstantBuffers->GetPointer(); + auto out_hp_ppConstantBuffers = ppConstantBuffers->GetHandlePointer(); + if(!pFirstConstant->IsNull()) + { + pFirstConstant->AllocateOutputData(NumBuffers); + } + if(!pNumConstants->IsNull()) + { + pNumConstants->AllocateOutputData(NumBuffers); + } + reinterpret_cast(replay_object->object)->VSGetConstantBuffers1(StartSlot, + NumBuffers, + out_hp_ppConstantBuffers, + pFirstConstant->GetOutputPointer(), + pNumConstants->GetOutputPointer()); + AddObjects(out_p_ppConstantBuffers, ppConstantBuffers->GetLength(), out_hp_ppConstantBuffers, NumBuffers, format::ApiCall_ID3D11DeviceContext1_VSGetConstantBuffers1); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_HSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + if(!ppConstantBuffers->IsNull()) ppConstantBuffers->SetHandleLength(NumBuffers); + auto out_p_ppConstantBuffers = ppConstantBuffers->GetPointer(); + auto out_hp_ppConstantBuffers = ppConstantBuffers->GetHandlePointer(); + if(!pFirstConstant->IsNull()) + { + pFirstConstant->AllocateOutputData(NumBuffers); + } + if(!pNumConstants->IsNull()) + { + pNumConstants->AllocateOutputData(NumBuffers); + } + reinterpret_cast(replay_object->object)->HSGetConstantBuffers1(StartSlot, + NumBuffers, + out_hp_ppConstantBuffers, + pFirstConstant->GetOutputPointer(), + pNumConstants->GetOutputPointer()); + AddObjects(out_p_ppConstantBuffers, ppConstantBuffers->GetLength(), out_hp_ppConstantBuffers, NumBuffers, format::ApiCall_ID3D11DeviceContext1_HSGetConstantBuffers1); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_DSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + if(!ppConstantBuffers->IsNull()) ppConstantBuffers->SetHandleLength(NumBuffers); + auto out_p_ppConstantBuffers = ppConstantBuffers->GetPointer(); + auto out_hp_ppConstantBuffers = ppConstantBuffers->GetHandlePointer(); + if(!pFirstConstant->IsNull()) + { + pFirstConstant->AllocateOutputData(NumBuffers); + } + if(!pNumConstants->IsNull()) + { + pNumConstants->AllocateOutputData(NumBuffers); + } + reinterpret_cast(replay_object->object)->DSGetConstantBuffers1(StartSlot, + NumBuffers, + out_hp_ppConstantBuffers, + pFirstConstant->GetOutputPointer(), + pNumConstants->GetOutputPointer()); + AddObjects(out_p_ppConstantBuffers, ppConstantBuffers->GetLength(), out_hp_ppConstantBuffers, NumBuffers, format::ApiCall_ID3D11DeviceContext1_DSGetConstantBuffers1); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_GSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + if(!ppConstantBuffers->IsNull()) ppConstantBuffers->SetHandleLength(NumBuffers); + auto out_p_ppConstantBuffers = ppConstantBuffers->GetPointer(); + auto out_hp_ppConstantBuffers = ppConstantBuffers->GetHandlePointer(); + if(!pFirstConstant->IsNull()) + { + pFirstConstant->AllocateOutputData(NumBuffers); + } + if(!pNumConstants->IsNull()) + { + pNumConstants->AllocateOutputData(NumBuffers); + } + reinterpret_cast(replay_object->object)->GSGetConstantBuffers1(StartSlot, + NumBuffers, + out_hp_ppConstantBuffers, + pFirstConstant->GetOutputPointer(), + pNumConstants->GetOutputPointer()); + AddObjects(out_p_ppConstantBuffers, ppConstantBuffers->GetLength(), out_hp_ppConstantBuffers, NumBuffers, format::ApiCall_ID3D11DeviceContext1_GSGetConstantBuffers1); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_PSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + if(!ppConstantBuffers->IsNull()) ppConstantBuffers->SetHandleLength(NumBuffers); + auto out_p_ppConstantBuffers = ppConstantBuffers->GetPointer(); + auto out_hp_ppConstantBuffers = ppConstantBuffers->GetHandlePointer(); + if(!pFirstConstant->IsNull()) + { + pFirstConstant->AllocateOutputData(NumBuffers); + } + if(!pNumConstants->IsNull()) + { + pNumConstants->AllocateOutputData(NumBuffers); + } + reinterpret_cast(replay_object->object)->PSGetConstantBuffers1(StartSlot, + NumBuffers, + out_hp_ppConstantBuffers, + pFirstConstant->GetOutputPointer(), + pNumConstants->GetOutputPointer()); + AddObjects(out_p_ppConstantBuffers, ppConstantBuffers->GetLength(), out_hp_ppConstantBuffers, NumBuffers, format::ApiCall_ID3D11DeviceContext1_PSGetConstantBuffers1); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_CSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + if(!ppConstantBuffers->IsNull()) ppConstantBuffers->SetHandleLength(NumBuffers); + auto out_p_ppConstantBuffers = ppConstantBuffers->GetPointer(); + auto out_hp_ppConstantBuffers = ppConstantBuffers->GetHandlePointer(); + if(!pFirstConstant->IsNull()) + { + pFirstConstant->AllocateOutputData(NumBuffers); + } + if(!pNumConstants->IsNull()) + { + pNumConstants->AllocateOutputData(NumBuffers); + } + reinterpret_cast(replay_object->object)->CSGetConstantBuffers1(StartSlot, + NumBuffers, + out_hp_ppConstantBuffers, + pFirstConstant->GetOutputPointer(), + pNumConstants->GetOutputPointer()); + AddObjects(out_p_ppConstantBuffers, ppConstantBuffers->GetLength(), out_hp_ppConstantBuffers, NumBuffers, format::ApiCall_ID3D11DeviceContext1_CSGetConstantBuffers1); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_SwapDeviceContextState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pState, + HandlePointerDecoder* ppPreviousState) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pState, + ppPreviousState); + auto in_pState = MapObject(pState); + if(!ppPreviousState->IsNull()) ppPreviousState->SetHandleLength(1); + auto out_p_ppPreviousState = ppPreviousState->GetPointer(); + auto out_hp_ppPreviousState = ppPreviousState->GetHandlePointer(); + reinterpret_cast(replay_object->object)->SwapDeviceContextState(in_pState, + out_hp_ppPreviousState); + AddObject(out_p_ppPreviousState, out_hp_ppPreviousState, format::ApiCall_ID3D11DeviceContext1_SwapDeviceContextState); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pState, + ppPreviousState); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_ClearView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pView, + PointerDecoder* Color, + StructPointerDecoder* pRect, + UINT NumRects) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pView, + Color, + pRect, + NumRects); + auto in_pView = MapObject(pView); + reinterpret_cast(replay_object->object)->ClearView(in_pView, + Color->GetPointer(), + pRect->GetPointer(), + NumRects); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pView, + Color, + pRect, + NumRects); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext1_DiscardView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResourceView, + StructPointerDecoder* pRects, + UINT NumRects) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResourceView, + pRects, + NumRects); + auto in_pResourceView = MapObject(pResourceView); + reinterpret_cast(replay_object->object)->DiscardView1(in_pResourceView, + pRects->GetPointer(), + NumRects); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResourceView, + pRects, + NumRects); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext1_SubmitDecoderBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + NumBuffers, + pBufferDesc); + auto in_pDecoder = MapObject(pDecoder); + auto replay_result = reinterpret_cast(replay_object->object)->SubmitDecoderBuffers1(in_pDecoder, + NumBuffers, + pBufferDesc->GetPointer()); + CheckReplayResult("ID3D11VideoContext1_SubmitDecoderBuffers1", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + NumBuffers, + pBufferDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext1_GetDataForNewHardwareKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT PrivateInputSize, + PointerDecoder* pPrivatInputData, + PointerDecoder* pPrivateOutputData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + PrivateInputSize, + pPrivatInputData, + pPrivateOutputData); + auto in_pCryptoSession = MapObject(pCryptoSession); + if(!pPrivateOutputData->IsNull()) + { + pPrivateOutputData->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetDataForNewHardwareKey(in_pCryptoSession, + PrivateInputSize, + pPrivatInputData->GetPointer(), + pPrivateOutputData->GetOutputPointer()); + CheckReplayResult("ID3D11VideoContext1_GetDataForNewHardwareKey", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + PrivateInputSize, + pPrivatInputData, + pPrivateOutputData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext1_CheckCryptoSessionStatus( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + PointerDecoder* pStatus) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + pStatus); + auto in_pCryptoSession = MapObject(pCryptoSession); + if(!pStatus->IsNull()) + { + pStatus->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->CheckCryptoSessionStatus(in_pCryptoSession, + pStatus->GetOutputPointer()); + CheckReplayResult("ID3D11VideoContext1_CheckCryptoSessionStatus", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + pStatus); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext1_DecoderEnableDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pOutputDesc, + UINT ReferenceFrameCount) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + InputColorSpace, + pOutputDesc, + ReferenceFrameCount); + auto in_pDecoder = MapObject(pDecoder); + auto replay_result = reinterpret_cast(replay_object->object)->DecoderEnableDownsampling(in_pDecoder, + InputColorSpace, + pOutputDesc->GetPointer(), + ReferenceFrameCount); + CheckReplayResult("ID3D11VideoContext1_DecoderEnableDownsampling", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + InputColorSpace, + pOutputDesc, + ReferenceFrameCount); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext1_DecoderUpdateDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + StructPointerDecoder* pOutputDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + pOutputDesc); + auto in_pDecoder = MapObject(pDecoder); + auto replay_result = reinterpret_cast(replay_object->object)->DecoderUpdateDownsampling(in_pDecoder, + pOutputDesc->GetPointer()); + CheckReplayResult("ID3D11VideoContext1_DecoderUpdateDownsampling", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + pOutputDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + DXGI_COLOR_SPACE_TYPE ColorSpace) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + ColorSpace); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetOutputColorSpace1(in_pVideoProcessor, + ColorSpace); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + ColorSpace); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL ShaderUsage) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + ShaderUsage); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetOutputShaderUsage(in_pVideoProcessor, + ShaderUsage); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + ShaderUsage); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pColorSpace) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pColorSpace); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pColorSpace->IsNull()) + { + pColorSpace->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetOutputColorSpace1(in_pVideoProcessor, + pColorSpace->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pColorSpace); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pShaderUsage) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pShaderUsage); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pShaderUsage->IsNull()) + { + pShaderUsage->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetOutputShaderUsage(in_pVideoProcessor, + pShaderUsage->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pShaderUsage); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + DXGI_COLOR_SPACE_TYPE ColorSpace) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + ColorSpace); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamColorSpace1(in_pVideoProcessor, + StreamIndex, + ColorSpace); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + ColorSpace); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext1_VideoProcessorSetStreamMirror( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + BOOL FlipHorizontal, + BOOL FlipVertical) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + FlipHorizontal, + FlipVertical); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamMirror(in_pVideoProcessor, + StreamIndex, + Enable, + FlipHorizontal, + FlipVertical); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Enable, + FlipHorizontal, + FlipVertical); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pColorSpace) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pColorSpace); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pColorSpace->IsNull()) + { + pColorSpace->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamColorSpace1(in_pVideoProcessor, + StreamIndex, + pColorSpace->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pColorSpace); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext1_VideoProcessorGetStreamMirror( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pFlipHorizontal, + PointerDecoder* pFlipVertical) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnable, + pFlipHorizontal, + pFlipVertical); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pEnable->IsNull()) + { + pEnable->AllocateOutputData(1); + } + if(!pFlipHorizontal->IsNull()) + { + pFlipHorizontal->AllocateOutputData(1); + } + if(!pFlipVertical->IsNull()) + { + pFlipVertical->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamMirror(in_pVideoProcessor, + StreamIndex, + pEnable->GetOutputPointer(), + pFlipHorizontal->GetOutputPointer(), + pFlipVertical->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pEnable, + pFlipHorizontal, + pFlipVertical); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext1_VideoProcessorGetBehaviorHints( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT OutputWidth, + UINT OutputHeight, + DXGI_FORMAT OutputFormat, + UINT StreamCount, + StructPointerDecoder* pStreams, + PointerDecoder* pBehaviorHints) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + OutputWidth, + OutputHeight, + OutputFormat, + StreamCount, + pStreams, + pBehaviorHints); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pBehaviorHints->IsNull()) + { + pBehaviorHints->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->VideoProcessorGetBehaviorHints(in_pVideoProcessor, + OutputWidth, + OutputHeight, + OutputFormat, + StreamCount, + pStreams->GetPointer(), + pBehaviorHints->GetOutputPointer()); + CheckReplayResult("ID3D11VideoContext1_VideoProcessorGetBehaviorHints", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + OutputWidth, + OutputHeight, + OutputFormat, + StreamCount, + pStreams, + pBehaviorHints); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pKeyExchangeType, + PointerDecoder* pPrivateInputSize, + PointerDecoder* pPrivateOutputSize) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoType, + pDecoderProfile, + pKeyExchangeType, + pPrivateInputSize, + pPrivateOutputSize); + if(!pPrivateInputSize->IsNull()) + { + pPrivateInputSize->AllocateOutputData(1); + } + if(!pPrivateOutputSize->IsNull()) + { + pPrivateOutputSize->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetCryptoSessionPrivateDataSize(pCryptoType->GetPointer(), + pDecoderProfile->GetPointer(), + pKeyExchangeType->GetPointer(), + pPrivateInputSize->GetOutputPointer(), + pPrivateOutputSize->GetOutputPointer()); + CheckReplayResult("ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoType, + pDecoderProfile, + pKeyExchangeType, + pPrivateInputSize, + pPrivateOutputSize); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice1_GetVideoDecoderCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDecoderProfile, + UINT SampleWidth, + UINT SampleHeight, + StructPointerDecoder* pFrameRate, + UINT BitRate, + StructPointerDecoder* pCryptoType, + PointerDecoder* pDecoderCaps) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDecoderProfile, + SampleWidth, + SampleHeight, + pFrameRate, + BitRate, + pCryptoType, + pDecoderCaps); + if(!pDecoderCaps->IsNull()) + { + pDecoderCaps->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->GetVideoDecoderCaps(pDecoderProfile->GetPointer(), + SampleWidth, + SampleHeight, + pFrameRate->GetPointer(), + BitRate, + pCryptoType->GetPointer(), + pDecoderCaps->GetOutputPointer()); + CheckReplayResult("ID3D11VideoDevice1_GetVideoDecoderCaps", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDecoderProfile, + SampleWidth, + SampleHeight, + pFrameRate, + BitRate, + pCryptoType, + pDecoderCaps); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice1_CheckVideoDecoderDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pInputConfig, + StructPointerDecoder* pFrameRate, + StructPointerDecoder* pOutputDesc, + PointerDecoder* pSupported, + PointerDecoder* pRealTimeHint) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pInputDesc, + InputColorSpace, + pInputConfig, + pFrameRate, + pOutputDesc, + pSupported, + pRealTimeHint); + if(!pSupported->IsNull()) + { + pSupported->AllocateOutputData(1); + } + if(!pRealTimeHint->IsNull()) + { + pRealTimeHint->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->CheckVideoDecoderDownsampling(pInputDesc->GetPointer(), + InputColorSpace, + pInputConfig->GetPointer(), + pFrameRate->GetPointer(), + pOutputDesc->GetPointer(), + pSupported->GetOutputPointer(), + pRealTimeHint->GetOutputPointer()); + CheckReplayResult("ID3D11VideoDevice1_CheckVideoDecoderDownsampling", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pInputDesc, + InputColorSpace, + pInputConfig, + pFrameRate, + pOutputDesc, + pSupported, + pRealTimeHint); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pInputConfig, + StructPointerDecoder* pFrameRate, + StructPointerDecoder* pRecommendedOutputDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pInputDesc, + InputColorSpace, + pInputConfig, + pFrameRate, + pRecommendedOutputDesc); + if(!pRecommendedOutputDesc->IsNull()) + { + pRecommendedOutputDesc->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->RecommendVideoDecoderDownsampleParameters(pInputDesc->GetPointer(), + InputColorSpace, + pInputConfig->GetPointer(), + pFrameRate->GetPointer(), + pRecommendedOutputDesc->GetOutputPointer()); + CheckReplayResult("ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pInputDesc, + InputColorSpace, + pInputConfig, + pFrameRate, + pRecommendedOutputDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT InputFormat, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + DXGI_FORMAT OutputFormat, + DXGI_COLOR_SPACE_TYPE OutputColorSpace, + PointerDecoder* pSupported) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + InputFormat, + InputColorSpace, + OutputFormat, + OutputColorSpace, + pSupported); + if(!pSupported->IsNull()) + { + pSupported->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->CheckVideoProcessorFormatConversion(InputFormat, + InputColorSpace, + OutputFormat, + OutputColorSpace, + pSupported->GetOutputPointer()); + CheckReplayResult("ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + InputFormat, + InputColorSpace, + OutputFormat, + OutputColorSpace, + pSupported); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device1_GetImmediateContext1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppImmediateContext); + if(!ppImmediateContext->IsNull()) ppImmediateContext->SetHandleLength(1); + auto out_p_ppImmediateContext = ppImmediateContext->GetPointer(); + auto out_hp_ppImmediateContext = ppImmediateContext->GetHandlePointer(); + reinterpret_cast(replay_object->object)->GetImmediateContext1(out_hp_ppImmediateContext); + AddObject(out_p_ppImmediateContext, out_hp_ppImmediateContext, format::ApiCall_ID3D11Device1_GetImmediateContext1); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppImmediateContext); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device1_CreateDeferredContext1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ContextFlags, + ppDeferredContext); + DxObjectInfo object_info_ppDeferredContext{}; + if(!ppDeferredContext->IsNull()) + { + ppDeferredContext->SetHandleLength(1); + ppDeferredContext->SetConsumerData(0, &object_info_ppDeferredContext); + } + auto replay_result = OverrideCreateDeferredContext1(replay_object, + return_value, + ContextFlags, + ppDeferredContext); + if (SUCCEEDED(replay_result)) + { + AddObject(ppDeferredContext->GetPointer(), ppDeferredContext->GetHandlePointer(), std::move(object_info_ppDeferredContext), format::ApiCall_ID3D11Device1_CreateDeferredContext1); + } + CheckReplayResult("ID3D11Device1_CreateDeferredContext1", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ContextFlags, + ppDeferredContext); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device1_CreateBlendState1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pBlendStateDesc, + HandlePointerDecoder* ppBlendState) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pBlendStateDesc, + ppBlendState); + if(!ppBlendState->IsNull()) ppBlendState->SetHandleLength(1); + auto out_p_ppBlendState = ppBlendState->GetPointer(); + auto out_hp_ppBlendState = ppBlendState->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateBlendState1(pBlendStateDesc->GetPointer(), + out_hp_ppBlendState); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppBlendState, out_hp_ppBlendState, format::ApiCall_ID3D11Device1_CreateBlendState1); + } + CheckReplayResult("ID3D11Device1_CreateBlendState1", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pBlendStateDesc, + ppBlendState); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device1_CreateRasterizerState1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pRasterizerDesc, + ppRasterizerState); + if(!ppRasterizerState->IsNull()) ppRasterizerState->SetHandleLength(1); + auto out_p_ppRasterizerState = ppRasterizerState->GetPointer(); + auto out_hp_ppRasterizerState = ppRasterizerState->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateRasterizerState1(pRasterizerDesc->GetPointer(), + out_hp_ppRasterizerState); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppRasterizerState, out_hp_ppRasterizerState, format::ApiCall_ID3D11Device1_CreateRasterizerState1); + } + CheckReplayResult("ID3D11Device1_CreateRasterizerState1", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pRasterizerDesc, + ppRasterizerState); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device1_CreateDeviceContextState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + Decoded_GUID EmulatedInterface, + PointerDecoder* pChosenFeatureLevel, + HandlePointerDecoder* ppContextState) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + EmulatedInterface, + pChosenFeatureLevel, + ppContextState); + if(!pChosenFeatureLevel->IsNull()) + { + pChosenFeatureLevel->AllocateOutputData(1); + } + if(!ppContextState->IsNull()) ppContextState->SetHandleLength(1); + auto out_p_ppContextState = ppContextState->GetPointer(); + auto out_hp_ppContextState = ppContextState->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateDeviceContextState(Flags, + pFeatureLevels->GetPointer(), + FeatureLevels, + SDKVersion, + *EmulatedInterface.decoded_value, + pChosenFeatureLevel->GetOutputPointer(), + out_hp_ppContextState); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppContextState, out_hp_ppContextState, format::ApiCall_ID3D11Device1_CreateDeviceContextState); + } + CheckReplayResult("ID3D11Device1_CreateDeviceContextState", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + EmulatedInterface, + pChosenFeatureLevel, + ppContextState); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device1_OpenSharedResource1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hResource, + Decoded_GUID returnedInterface, + HandlePointerDecoder* ppResource) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + hResource, + returnedInterface, + ppResource); + auto in_hResource = static_cast(PreProcessExternalObject(hResource, format::ApiCallId::ApiCall_ID3D11Device1_OpenSharedResource1, "ID3D11Device1_OpenSharedResource1")); + if(!ppResource->IsNull()) ppResource->SetHandleLength(1); + auto out_p_ppResource = ppResource->GetPointer(); + auto out_hp_ppResource = ppResource->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->OpenSharedResource1(in_hResource, + *returnedInterface.decoded_value, + out_hp_ppResource); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppResource, out_hp_ppResource, format::ApiCall_ID3D11Device1_OpenSharedResource1); + } + CheckReplayResult("ID3D11Device1_OpenSharedResource1", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + hResource, + returnedInterface, + ppResource); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device1_OpenSharedResourceByName( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + WStringDecoder* lpName, + DWORD dwDesiredAccess, + Decoded_GUID returnedInterface, + HandlePointerDecoder* ppResource) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + lpName, + dwDesiredAccess, + returnedInterface, + ppResource); + if(!ppResource->IsNull()) ppResource->SetHandleLength(1); + auto out_p_ppResource = ppResource->GetPointer(); + auto out_hp_ppResource = ppResource->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->OpenSharedResourceByName(lpName->GetPointer(), + dwDesiredAccess, + *returnedInterface.decoded_value, + out_hp_ppResource); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppResource, out_hp_ppResource, format::ApiCall_ID3D11Device1_OpenSharedResourceByName); + } + CheckReplayResult("ID3D11Device1_OpenSharedResourceByName", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + lpName, + dwDesiredAccess, + returnedInterface, + ppResource); + } +} + +void Dx12ReplayConsumer::Process_ID3DUserDefinedAnnotation_BeginEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + INT return_value, + WStringDecoder* Name) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + Name); + auto replay_result = reinterpret_cast(replay_object->object)->BeginEvent(Name->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + Name); + } +} + +void Dx12ReplayConsumer::Process_ID3DUserDefinedAnnotation_EndEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + INT return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->EndEvent(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3DUserDefinedAnnotation_SetMarker( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* Name) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + Name); + reinterpret_cast(replay_object->object)->SetMarker(Name->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + Name); + } +} + +void Dx12ReplayConsumer::Process_ID3DUserDefinedAnnotation_GetStatus( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->GetStatus(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext2_UpdateTileMappings( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pTiledResource, + UINT NumTiledResourceRegions, + StructPointerDecoder* pTiledResourceRegionStartCoordinates, + StructPointerDecoder* pTiledResourceRegionSizes, + format::HandleId pTilePool, + UINT NumRanges, + PointerDecoder* pRangeFlags, + PointerDecoder* pTilePoolStartOffsets, + PointerDecoder* pRangeTileCounts, + UINT Flags) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pTiledResource, + NumTiledResourceRegions, + pTiledResourceRegionStartCoordinates, + pTiledResourceRegionSizes, + pTilePool, + NumRanges, + pRangeFlags, + pTilePoolStartOffsets, + pRangeTileCounts, + Flags); + auto in_pTiledResource = MapObject(pTiledResource); + auto in_pTilePool = MapObject(pTilePool); + auto replay_result = reinterpret_cast(replay_object->object)->UpdateTileMappings(in_pTiledResource, + NumTiledResourceRegions, + pTiledResourceRegionStartCoordinates->GetPointer(), + pTiledResourceRegionSizes->GetPointer(), + in_pTilePool, + NumRanges, + pRangeFlags->GetPointer(), + pTilePoolStartOffsets->GetPointer(), + pRangeTileCounts->GetPointer(), + Flags); + CheckReplayResult("ID3D11DeviceContext2_UpdateTileMappings", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pTiledResource, + NumTiledResourceRegions, + pTiledResourceRegionStartCoordinates, + pTiledResourceRegionSizes, + pTilePool, + NumRanges, + pRangeFlags, + pTilePoolStartOffsets, + pRangeTileCounts, + Flags); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext2_CopyTileMappings( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDestTiledResource, + StructPointerDecoder* pDestRegionStartCoordinate, + format::HandleId pSourceTiledResource, + StructPointerDecoder* pSourceRegionStartCoordinate, + StructPointerDecoder* pTileRegionSize, + UINT Flags) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDestTiledResource, + pDestRegionStartCoordinate, + pSourceTiledResource, + pSourceRegionStartCoordinate, + pTileRegionSize, + Flags); + auto in_pDestTiledResource = MapObject(pDestTiledResource); + auto in_pSourceTiledResource = MapObject(pSourceTiledResource); + auto replay_result = reinterpret_cast(replay_object->object)->CopyTileMappings(in_pDestTiledResource, + pDestRegionStartCoordinate->GetPointer(), + in_pSourceTiledResource, + pSourceRegionStartCoordinate->GetPointer(), + pTileRegionSize->GetPointer(), + Flags); + CheckReplayResult("ID3D11DeviceContext2_CopyTileMappings", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDestTiledResource, + pDestRegionStartCoordinate, + pSourceTiledResource, + pSourceRegionStartCoordinate, + pTileRegionSize, + Flags); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext2_CopyTiles( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResource, + StructPointerDecoder* pTileRegionStartCoordinate, + StructPointerDecoder* pTileRegionSize, + format::HandleId pBuffer, + UINT64 BufferStartOffsetInBytes, + UINT Flags) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pTiledResource, + pTileRegionStartCoordinate, + pTileRegionSize, + pBuffer, + BufferStartOffsetInBytes, + Flags); + auto in_pTiledResource = MapObject(pTiledResource); + auto in_pBuffer = MapObject(pBuffer); + reinterpret_cast(replay_object->object)->CopyTiles(in_pTiledResource, + pTileRegionStartCoordinate->GetPointer(), + pTileRegionSize->GetPointer(), + in_pBuffer, + BufferStartOffsetInBytes, + Flags); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pTiledResource, + pTileRegionStartCoordinate, + pTileRegionSize, + pBuffer, + BufferStartOffsetInBytes, + Flags); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext2_UpdateTiles( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDestTiledResource, + StructPointerDecoder* pDestTileRegionStartCoordinate, + StructPointerDecoder* pDestTileRegionSize, + uint64_t pSourceTileData, + UINT Flags) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDestTiledResource, + pDestTileRegionStartCoordinate, + pDestTileRegionSize, + pSourceTileData, + Flags); + auto in_pDestTiledResource = MapObject(pDestTiledResource); + auto in_pSourceTileData = PreProcessExternalObject(pSourceTileData, format::ApiCallId::ApiCall_ID3D11DeviceContext2_UpdateTiles, "ID3D11DeviceContext2_UpdateTiles"); + reinterpret_cast(replay_object->object)->UpdateTiles(in_pDestTiledResource, + pDestTileRegionStartCoordinate->GetPointer(), + pDestTileRegionSize->GetPointer(), + in_pSourceTileData, + Flags); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDestTiledResource, + pDestTileRegionStartCoordinate, + pDestTileRegionSize, + pSourceTileData, + Flags); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext2_ResizeTilePool( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pTilePool, + UINT64 NewSizeInBytes) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pTilePool, + NewSizeInBytes); + auto in_pTilePool = MapObject(pTilePool); + auto replay_result = reinterpret_cast(replay_object->object)->ResizeTilePool(in_pTilePool, + NewSizeInBytes); + CheckReplayResult("ID3D11DeviceContext2_ResizeTilePool", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pTilePool, + NewSizeInBytes); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext2_TiledResourceBarrier( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResourceOrViewAccessBeforeBarrier, + format::HandleId pTiledResourceOrViewAccessAfterBarrier) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pTiledResourceOrViewAccessBeforeBarrier, + pTiledResourceOrViewAccessAfterBarrier); + auto in_pTiledResourceOrViewAccessBeforeBarrier = MapObject(pTiledResourceOrViewAccessBeforeBarrier); + auto in_pTiledResourceOrViewAccessAfterBarrier = MapObject(pTiledResourceOrViewAccessAfterBarrier); + reinterpret_cast(replay_object->object)->TiledResourceBarrier(in_pTiledResourceOrViewAccessBeforeBarrier, + in_pTiledResourceOrViewAccessAfterBarrier); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pTiledResourceOrViewAccessBeforeBarrier, + pTiledResourceOrViewAccessAfterBarrier); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext2_IsAnnotationEnabled( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->IsAnnotationEnabled(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext2_SetMarkerInt( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* pLabel, + INT Data) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pLabel, + Data); + reinterpret_cast(replay_object->object)->SetMarkerInt(pLabel->GetPointer(), + Data); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pLabel, + Data); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext2_BeginEventInt( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* pLabel, + INT Data) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pLabel, + Data); + reinterpret_cast(replay_object->object)->BeginEventInt(pLabel->GetPointer(), + Data); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pLabel, + Data); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext2_EndEvent( + const ApiCallInfo& call_info, + format::HandleId object_id) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + reinterpret_cast(replay_object->object)->EndEvent(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device2_GetImmediateContext2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppImmediateContext); + if(!ppImmediateContext->IsNull()) ppImmediateContext->SetHandleLength(1); + auto out_p_ppImmediateContext = ppImmediateContext->GetPointer(); + auto out_hp_ppImmediateContext = ppImmediateContext->GetHandlePointer(); + reinterpret_cast(replay_object->object)->GetImmediateContext2(out_hp_ppImmediateContext); + AddObject(out_p_ppImmediateContext, out_hp_ppImmediateContext, format::ApiCall_ID3D11Device2_GetImmediateContext2); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppImmediateContext); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device2_CreateDeferredContext2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ContextFlags, + ppDeferredContext); + DxObjectInfo object_info_ppDeferredContext{}; + if(!ppDeferredContext->IsNull()) + { + ppDeferredContext->SetHandleLength(1); + ppDeferredContext->SetConsumerData(0, &object_info_ppDeferredContext); + } + auto replay_result = OverrideCreateDeferredContext2(replay_object, + return_value, + ContextFlags, + ppDeferredContext); + if (SUCCEEDED(replay_result)) + { + AddObject(ppDeferredContext->GetPointer(), ppDeferredContext->GetHandlePointer(), std::move(object_info_ppDeferredContext), format::ApiCall_ID3D11Device2_CreateDeferredContext2); + } + CheckReplayResult("ID3D11Device2_CreateDeferredContext2", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ContextFlags, + ppDeferredContext); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device2_GetResourceTiling( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResource, + PointerDecoder* pNumTilesForEntireResource, + StructPointerDecoder* pPackedMipDesc, + StructPointerDecoder* pStandardTileShapeForNonPackedMips, + PointerDecoder* pNumSubresourceTilings, + UINT FirstSubresourceTilingToGet, + StructPointerDecoder* pSubresourceTilingsForNonPackedMips) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pTiledResource, + pNumTilesForEntireResource, + pPackedMipDesc, + pStandardTileShapeForNonPackedMips, + pNumSubresourceTilings, + FirstSubresourceTilingToGet, + pSubresourceTilingsForNonPackedMips); + auto in_pTiledResource = MapObject(pTiledResource); + if(!pNumTilesForEntireResource->IsNull()) + { + pNumTilesForEntireResource->AllocateOutputData(1); + } + if(!pPackedMipDesc->IsNull()) + { + pPackedMipDesc->AllocateOutputData(1); + } + if(!pStandardTileShapeForNonPackedMips->IsNull()) + { + pStandardTileShapeForNonPackedMips->AllocateOutputData(1); + } + if(!pNumSubresourceTilings->IsNull()) + { + pNumSubresourceTilings->AllocateOutputData(1); + } + if(!pSubresourceTilingsForNonPackedMips->IsNull()) + { + pSubresourceTilingsForNonPackedMips->AllocateOutputData(!pNumSubresourceTilings->IsNull() ? *pNumSubresourceTilings->GetPointer() : 0); + } + reinterpret_cast(replay_object->object)->GetResourceTiling(in_pTiledResource, + pNumTilesForEntireResource->GetOutputPointer(), + pPackedMipDesc->GetOutputPointer(), + pStandardTileShapeForNonPackedMips->GetOutputPointer(), + pNumSubresourceTilings->GetOutputPointer(), + FirstSubresourceTilingToGet, + pSubresourceTilingsForNonPackedMips->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pTiledResource, + pNumTilesForEntireResource, + pPackedMipDesc, + pStandardTileShapeForNonPackedMips, + pNumSubresourceTilings, + FirstSubresourceTilingToGet, + pSubresourceTilingsForNonPackedMips); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device2_CheckMultisampleQualityLevels1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + UINT SampleCount, + UINT Flags, + PointerDecoder* pNumQualityLevels) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + Format, + SampleCount, + Flags, + pNumQualityLevels); + if(!pNumQualityLevels->IsNull()) + { + pNumQualityLevels->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->CheckMultisampleQualityLevels1(Format, + SampleCount, + Flags, + pNumQualityLevels->GetOutputPointer()); + CheckReplayResult("ID3D11Device2_CheckMultisampleQualityLevels1", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + Format, + SampleCount, + Flags, + pNumQualityLevels); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Texture2D1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc1(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Texture3D1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc1(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11RasterizerState2_GetDesc2( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + if(!pDesc->IsNull()) + { + pDesc->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc2(pDesc->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11ShaderResourceView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc1); + if(!pDesc1->IsNull()) + { + pDesc1->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc1(pDesc1->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc1); + } +} + +void Dx12ReplayConsumer::Process_ID3D11RenderTargetView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc1); + if(!pDesc1->IsNull()) + { + pDesc1->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc1(pDesc1->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc1); + } +} + +void Dx12ReplayConsumer::Process_ID3D11UnorderedAccessView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc1); + if(!pDesc1->IsNull()) + { + pDesc1->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc1(pDesc1->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc1); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Query1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDesc1); + if(!pDesc1->IsNull()) + { + pDesc1->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetDesc1(pDesc1->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDesc1); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext3_Flush1( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D11_CONTEXT_TYPE ContextType, + uint64_t hEvent) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ContextType, + hEvent); + auto in_hEvent = static_cast(PreProcessExternalObject(hEvent, format::ApiCallId::ApiCall_ID3D11DeviceContext3_Flush1, "ID3D11DeviceContext3_Flush1")); + reinterpret_cast(replay_object->object)->Flush1(ContextType, + in_hEvent); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ContextType, + hEvent); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext3_SetHardwareProtectionState( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL HwProtectionEnable) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + HwProtectionEnable); + reinterpret_cast(replay_object->object)->SetHardwareProtectionState(HwProtectionEnable); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + HwProtectionEnable); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext3_GetHardwareProtectionState( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pHwProtectionEnable) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pHwProtectionEnable); + if(!pHwProtectionEnable->IsNull()) + { + pHwProtectionEnable->AllocateOutputData(1); + } + reinterpret_cast(replay_object->object)->GetHardwareProtectionState(pHwProtectionEnable->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pHwProtectionEnable); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Fence_CreateSharedHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pAttributes, + DWORD dwAccess, + WStringDecoder* lpName, + PointerDecoder* pHandle) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pAttributes, + dwAccess, + lpName, + pHandle); + if(!pHandle->IsNull()) + { + pHandle->AllocateOutputData(1); + } + auto out_p_pHandle = pHandle->GetPointer(); + auto out_op_pHandle = reinterpret_cast(pHandle->GetOutputPointer()); + auto replay_result = reinterpret_cast(replay_object->object)->CreateSharedHandle(pAttributes->GetPointer(), + dwAccess, + lpName->GetPointer(), + out_op_pHandle); + CheckReplayResult("ID3D11Fence_CreateSharedHandle", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pAttributes, + dwAccess, + lpName, + pHandle); + PostProcessExternalObject(replay_result, out_op_pHandle, out_p_pHandle, format::ApiCallId::ApiCall_ID3D11Fence_CreateSharedHandle, "ID3D11Fence_CreateSharedHandle"); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Fence_GetCompletedValue( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT64 return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->GetCompletedValue(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Fence_SetEventOnCompletion( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT64 Value, + uint64_t hEvent) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + Value, + hEvent); + auto in_hEvent = static_cast(PreProcessExternalObject(hEvent, format::ApiCallId::ApiCall_ID3D11Fence_SetEventOnCompletion, "ID3D11Fence_SetEventOnCompletion")); + auto replay_result = reinterpret_cast(replay_object->object)->SetEventOnCompletion(Value, + in_hEvent); + CheckReplayResult("ID3D11Fence_SetEventOnCompletion", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + Value, + hEvent); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext4_Signal( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pFence, + UINT64 Value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pFence, + Value); + auto in_pFence = MapObject(pFence); + auto replay_result = reinterpret_cast(replay_object->object)->Signal(in_pFence, + Value); + CheckReplayResult("ID3D11DeviceContext4_Signal", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pFence, + Value); + } +} + +void Dx12ReplayConsumer::Process_ID3D11DeviceContext4_Wait( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pFence, + UINT64 Value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pFence, + Value); + auto in_pFence = MapObject(pFence); + auto replay_result = reinterpret_cast(replay_object->object)->Wait(in_pFence, + Value); + CheckReplayResult("ID3D11DeviceContext4_Wait", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pFence, + Value); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device3_CreateRasterizerState2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pRasterizerDesc, + ppRasterizerState); + if(!ppRasterizerState->IsNull()) ppRasterizerState->SetHandleLength(1); + auto out_p_ppRasterizerState = ppRasterizerState->GetPointer(); + auto out_hp_ppRasterizerState = ppRasterizerState->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateRasterizerState2(pRasterizerDesc->GetPointer(), + out_hp_ppRasterizerState); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppRasterizerState, out_hp_ppRasterizerState, format::ApiCall_ID3D11Device3_CreateRasterizerState2); + } + CheckReplayResult("ID3D11Device3_CreateRasterizerState2", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pRasterizerDesc, + ppRasterizerState); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device3_CreateShaderResourceView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppSRView1) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc1, + ppSRView1); + auto in_pResource = MapObject(pResource); + if(!ppSRView1->IsNull()) ppSRView1->SetHandleLength(1); + auto out_p_ppSRView1 = ppSRView1->GetPointer(); + auto out_hp_ppSRView1 = ppSRView1->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateShaderResourceView1(in_pResource, + pDesc1->GetPointer(), + out_hp_ppSRView1); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppSRView1, out_hp_ppSRView1, format::ApiCall_ID3D11Device3_CreateShaderResourceView1); + } + CheckReplayResult("ID3D11Device3_CreateShaderResourceView1", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc1, + ppSRView1); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device3_CreateUnorderedAccessView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppUAView1) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc1, + ppUAView1); + auto in_pResource = MapObject(pResource); + if(!ppUAView1->IsNull()) ppUAView1->SetHandleLength(1); + auto out_p_ppUAView1 = ppUAView1->GetPointer(); + auto out_hp_ppUAView1 = ppUAView1->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateUnorderedAccessView1(in_pResource, + pDesc1->GetPointer(), + out_hp_ppUAView1); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppUAView1, out_hp_ppUAView1, format::ApiCall_ID3D11Device3_CreateUnorderedAccessView1); + } + CheckReplayResult("ID3D11Device3_CreateUnorderedAccessView1", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc1, + ppUAView1); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device3_CreateRenderTargetView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppRTView1) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc1, + ppRTView1); + auto in_pResource = MapObject(pResource); + if(!ppRTView1->IsNull()) ppRTView1->SetHandleLength(1); + auto out_p_ppRTView1 = ppRTView1->GetPointer(); + auto out_hp_ppRTView1 = ppRTView1->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateRenderTargetView1(in_pResource, + pDesc1->GetPointer(), + out_hp_ppRTView1); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppRTView1, out_hp_ppRTView1, format::ApiCall_ID3D11Device3_CreateRenderTargetView1); + } + CheckReplayResult("ID3D11Device3_CreateRenderTargetView1", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource, + pDesc1, + ppRTView1); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device3_CreateQuery1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pQueryDesc1, + HandlePointerDecoder* ppQuery1) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pQueryDesc1, + ppQuery1); + if(!ppQuery1->IsNull()) ppQuery1->SetHandleLength(1); + auto out_p_ppQuery1 = ppQuery1->GetPointer(); + auto out_hp_ppQuery1 = ppQuery1->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateQuery1(pQueryDesc1->GetPointer(), + out_hp_ppQuery1); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppQuery1, out_hp_ppQuery1, format::ApiCall_ID3D11Device3_CreateQuery1); + } + CheckReplayResult("ID3D11Device3_CreateQuery1", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pQueryDesc1, + ppQuery1); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device3_GetImmediateContext3( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppImmediateContext); + if(!ppImmediateContext->IsNull()) ppImmediateContext->SetHandleLength(1); + auto out_p_ppImmediateContext = ppImmediateContext->GetPointer(); + auto out_hp_ppImmediateContext = ppImmediateContext->GetHandlePointer(); + reinterpret_cast(replay_object->object)->GetImmediateContext3(out_hp_ppImmediateContext); + AddObject(out_p_ppImmediateContext, out_hp_ppImmediateContext, format::ApiCall_ID3D11Device3_GetImmediateContext3); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppImmediateContext); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device3_CreateDeferredContext3( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ContextFlags, + ppDeferredContext); + DxObjectInfo object_info_ppDeferredContext{}; + if(!ppDeferredContext->IsNull()) + { + ppDeferredContext->SetHandleLength(1); + ppDeferredContext->SetConsumerData(0, &object_info_ppDeferredContext); + } + auto replay_result = OverrideCreateDeferredContext3(replay_object, + return_value, + ContextFlags, + ppDeferredContext); + if (SUCCEEDED(replay_result)) + { + AddObject(ppDeferredContext->GetPointer(), ppDeferredContext->GetHandlePointer(), std::move(object_info_ppDeferredContext), format::ApiCall_ID3D11Device3_CreateDeferredContext3); + } + CheckReplayResult("ID3D11Device3_CreateDeferredContext3", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ContextFlags, + ppDeferredContext); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device3_ReadFromSubresource( + const ApiCallInfo& call_info, + format::HandleId object_id, + uint64_t pDstData, + UINT DstRowPitch, + UINT DstDepthPitch, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDstData, + DstRowPitch, + DstDepthPitch, + pSrcResource, + SrcSubresource, + pSrcBox); + auto in_pSrcResource = GetObjectInfo(pSrcResource); + OverrideDevice3ReadFromSubresource(replay_object, + pDstData, + DstRowPitch, + DstDepthPitch, + in_pSrcResource, + SrcSubresource, + pSrcBox); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDstData, + DstRowPitch, + DstDepthPitch, + pSrcResource, + SrcSubresource, + pSrcBox); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device4_RegisterDeviceRemovedEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hEvent, + PointerDecoder* pdwCookie) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + hEvent, + pdwCookie); + auto in_hEvent = static_cast(PreProcessExternalObject(hEvent, format::ApiCallId::ApiCall_ID3D11Device4_RegisterDeviceRemovedEvent, "ID3D11Device4_RegisterDeviceRemovedEvent")); + if(!pdwCookie->IsNull()) + { + pdwCookie->AllocateOutputData(1); + } + auto replay_result = reinterpret_cast(replay_object->object)->RegisterDeviceRemovedEvent(in_hEvent, + pdwCookie->GetOutputPointer()); + CheckReplayResult("ID3D11Device4_RegisterDeviceRemovedEvent", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + hEvent, + pdwCookie); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device4_UnregisterDeviceRemoved( + const ApiCallInfo& call_info, + format::HandleId object_id, + DWORD dwCookie) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + dwCookie); + reinterpret_cast(replay_object->object)->UnregisterDeviceRemoved(dwCookie); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + dwCookie); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device5_OpenSharedFence( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hFence, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppFence) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + hFence, + ReturnedInterface, + ppFence); + auto in_hFence = static_cast(PreProcessExternalObject(hFence, format::ApiCallId::ApiCall_ID3D11Device5_OpenSharedFence, "ID3D11Device5_OpenSharedFence")); + if(!ppFence->IsNull()) ppFence->SetHandleLength(1); + auto out_p_ppFence = ppFence->GetPointer(); + auto out_hp_ppFence = ppFence->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->OpenSharedFence(in_hFence, + *ReturnedInterface.decoded_value, + out_hp_ppFence); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppFence, out_hp_ppFence, format::ApiCall_ID3D11Device5_OpenSharedFence); + } + CheckReplayResult("ID3D11Device5_OpenSharedFence", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + hFence, + ReturnedInterface, + ppFence); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Device5_CreateFence( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT64 InitialValue, + D3D11_FENCE_FLAG Flags, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppFence) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + InitialValue, + Flags, + ReturnedInterface, + ppFence); + if(!ppFence->IsNull()) ppFence->SetHandleLength(1); + auto out_p_ppFence = ppFence->GetPointer(); + auto out_hp_ppFence = ppFence->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateFence(InitialValue, + Flags, + *ReturnedInterface.decoded_value, + out_hp_ppFence); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppFence, out_hp_ppFence, format::ApiCall_ID3D11Device5_CreateFence); + } + CheckReplayResult("ID3D11Device5_CreateFence", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + InitialValue, + Flags, + ReturnedInterface, + ppFence); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Multithread_Enter( + const ApiCallInfo& call_info, + format::HandleId object_id) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + reinterpret_cast(replay_object->object)->Enter(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Multithread_Leave( + const ApiCallInfo& call_info, + format::HandleId object_id) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + reinterpret_cast(replay_object->object)->Leave(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Multithread_SetMultithreadProtected( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value, + BOOL bMTProtect) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + bMTProtect); + auto replay_result = reinterpret_cast(replay_object->object)->SetMultithreadProtected(bMTProtect); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + bMTProtect); + } +} + +void Dx12ReplayConsumer::Process_ID3D11Multithread_GetMultithreadProtected( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object); + auto replay_result = reinterpret_cast(replay_object->object)->GetMultithreadProtected(); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + PointerDecoder* pHDRMetaData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + Type, + Size, + pHDRMetaData); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetOutputHDRMetaData(in_pVideoProcessor, + Type, + Size, + pHDRMetaData->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + Type, + Size, + pHDRMetaData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pType, + UINT Size, + PointerDecoder* pMetaData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pType, + Size, + pMetaData); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pType->IsNull()) + { + pType->AllocateOutputData(1); + } + if(!pMetaData->IsNull()) + { + pMetaData->AllocateOutputData(Size); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetOutputHDRMetaData(in_pVideoProcessor, + pType->GetOutputPointer(), + Size, + pMetaData->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + pType, + Size, + pMetaData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + PointerDecoder* pHDRMetaData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Type, + Size, + pHDRMetaData); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + reinterpret_cast(replay_object->object)->VideoProcessorSetStreamHDRMetaData(in_pVideoProcessor, + StreamIndex, + Type, + Size, + pHDRMetaData->GetPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + Type, + Size, + pHDRMetaData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pType, + UINT Size, + PointerDecoder* pMetaData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pType, + Size, + pMetaData); + auto in_pVideoProcessor = MapObject(pVideoProcessor); + if(!pType->IsNull()) + { + pType->AllocateOutputData(1); + } + if(!pMetaData->IsNull()) + { + pMetaData->AllocateOutputData(Size); + } + reinterpret_cast(replay_object->object)->VideoProcessorGetStreamHDRMetaData(in_pVideoProcessor, + StreamIndex, + pType->GetOutputPointer(), + Size, + pMetaData->GetOutputPointer()); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pVideoProcessor, + StreamIndex, + pType, + Size, + pMetaData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice2_CheckFeatureSupport( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_FEATURE_VIDEO Feature, + PointerDecoder* pFeatureSupportData, + UINT FeatureSupportDataSize) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + Feature, + pFeatureSupportData, + FeatureSupportDataSize); + if(!pFeatureSupportData->IsNull()) + { + pFeatureSupportData->AllocateOutputData(FeatureSupportDataSize); + } + auto replay_result = reinterpret_cast(replay_object->object)->CheckFeatureSupport(Feature, + pFeatureSupportData->GetOutputPointer(), + FeatureSupportDataSize); + CheckReplayResult("ID3D11VideoDevice2_CheckFeatureSupport", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + Feature, + pFeatureSupportData, + FeatureSupportDataSize); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS flags, + UINT DataSize, + PointerDecoder* pData) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + flags, + DataSize, + pData); + auto in_pCryptoSession = MapObject(pCryptoSession); + if(!pData->IsNull()) + { + pData->AllocateOutputData(DataSize); + } + auto replay_result = reinterpret_cast(replay_object->object)->NegotiateCryptoSessionKeyExchangeMT(in_pCryptoSession, + flags, + DataSize, + pData->GetOutputPointer()); + CheckReplayResult("ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pCryptoSession, + flags, + DataSize, + pData); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext3_DecoderBeginFrame1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + format::HandleId pView, + UINT ContentKeySize, + PointerDecoder* pContentKey, + UINT NumComponentHistograms, + PointerDecoder* pHistogramOffsets, + HandlePointerDecoder* ppHistogramBuffers) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + pView, + ContentKeySize, + pContentKey, + NumComponentHistograms, + pHistogramOffsets, + ppHistogramBuffers); + auto in_pDecoder = MapObject(pDecoder); + auto in_pView = MapObject(pView); + auto in_ppHistogramBuffers = MapObjects(ppHistogramBuffers, NumComponentHistograms); + auto replay_result = reinterpret_cast(replay_object->object)->DecoderBeginFrame1(in_pDecoder, + in_pView, + ContentKeySize, + pContentKey->GetPointer(), + NumComponentHistograms, + pHistogramOffsets->GetPointer(), + in_ppHistogramBuffers); + CheckReplayResult("ID3D11VideoContext3_DecoderBeginFrame1", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + pView, + ContentKeySize, + pContentKey, + NumComponentHistograms, + pHistogramOffsets, + ppHistogramBuffers); + } +} + +void Dx12ReplayConsumer::Process_ID3D11VideoContext3_SubmitDecoderBuffers2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + NumBuffers, + pBufferDesc); + auto in_pDecoder = MapObject(pDecoder); + auto replay_result = reinterpret_cast(replay_object->object)->SubmitDecoderBuffers2(in_pDecoder, + NumBuffers, + pBufferDesc->GetPointer()); + CheckReplayResult("ID3D11VideoContext3_SubmitDecoderBuffers2", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pDecoder, + NumBuffers, + pBufferDesc); + } +} + +void Dx12ReplayConsumer::Process_ID3D11On12Device_CreateWrappedResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource12, + StructPointerDecoder* pFlags11, + D3D12_RESOURCE_STATES InState, + D3D12_RESOURCE_STATES OutState, + Decoded_GUID riid, + HandlePointerDecoder* ppResource11) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource12, + pFlags11, + InState, + OutState, + riid, + ppResource11); + auto in_pResource12 = MapObject(pResource12); + if(!ppResource11->IsNull()) ppResource11->SetHandleLength(1); + auto out_p_ppResource11 = ppResource11->GetPointer(); + auto out_hp_ppResource11 = ppResource11->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->CreateWrappedResource(in_pResource12, + pFlags11->GetPointer(), + InState, + OutState, + *riid.decoded_value, + out_hp_ppResource11); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppResource11, out_hp_ppResource11, format::ApiCall_ID3D11On12Device_CreateWrappedResource); + } + CheckReplayResult("ID3D11On12Device_CreateWrappedResource", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource12, + pFlags11, + InState, + OutState, + riid, + ppResource11); + } +} + +void Dx12ReplayConsumer::Process_ID3D11On12Device_ReleaseWrappedResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResources, + UINT NumResources) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppResources, + NumResources); + auto in_ppResources = MapObjects(ppResources, NumResources); + reinterpret_cast(replay_object->object)->ReleaseWrappedResources(in_ppResources, + NumResources); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppResources, + NumResources); + } +} + +void Dx12ReplayConsumer::Process_ID3D11On12Device_AcquireWrappedResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResources, + UINT NumResources) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + ppResources, + NumResources); + auto in_ppResources = MapObjects(ppResources, NumResources); + reinterpret_cast(replay_object->object)->AcquireWrappedResources(in_ppResources, + NumResources); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + ppResources, + NumResources); + } +} + +void Dx12ReplayConsumer::Process_ID3D11On12Device1_GetD3D12Device( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID riid, + HandlePointerDecoder* ppvDevice) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + riid, + ppvDevice); + if(!ppvDevice->IsNull()) ppvDevice->SetHandleLength(1); + auto out_p_ppvDevice = ppvDevice->GetPointer(); + auto out_hp_ppvDevice = ppvDevice->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->GetD3D12Device(*riid.decoded_value, + out_hp_ppvDevice); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppvDevice, out_hp_ppvDevice, format::ApiCall_ID3D11On12Device1_GetD3D12Device); + } + CheckReplayResult("ID3D11On12Device1_GetD3D12Device", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + riid, + ppvDevice); + } +} + +void Dx12ReplayConsumer::Process_ID3D11On12Device2_UnwrapUnderlyingResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource11, + format::HandleId pCommandQueue, + Decoded_GUID riid, + HandlePointerDecoder* ppvResource12) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource11, + pCommandQueue, + riid, + ppvResource12); + auto in_pResource11 = MapObject(pResource11); + auto in_pCommandQueue = MapObject(pCommandQueue); + if(!ppvResource12->IsNull()) ppvResource12->SetHandleLength(1); + auto out_p_ppvResource12 = ppvResource12->GetPointer(); + auto out_hp_ppvResource12 = ppvResource12->GetHandlePointer(); + auto replay_result = reinterpret_cast(replay_object->object)->UnwrapUnderlyingResource(in_pResource11, + in_pCommandQueue, + *riid.decoded_value, + out_hp_ppvResource12); + if (SUCCEEDED(replay_result)) + { + AddObject(out_p_ppvResource12, out_hp_ppvResource12, format::ApiCall_ID3D11On12Device2_UnwrapUnderlyingResource); + } + CheckReplayResult("ID3D11On12Device2_UnwrapUnderlyingResource", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource11, + pCommandQueue, + riid, + ppvResource12); + } +} + +void Dx12ReplayConsumer::Process_ID3D11On12Device2_ReturnUnderlyingResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource11, + UINT NumSync, + PointerDecoder* pSignalValues, + HandlePointerDecoder* ppFences) +{ + auto replay_object = GetObjectInfo(object_id); + if ((replay_object != nullptr) && (replay_object->object != nullptr)) + { + CustomReplayPreCall::Dispatch( + this, + call_info, + replay_object, + pResource11, + NumSync, + pSignalValues, + ppFences); + auto in_pResource11 = MapObject(pResource11); + auto in_ppFences = MapObjects(ppFences, NumSync); + auto replay_result = reinterpret_cast(replay_object->object)->ReturnUnderlyingResource(in_pResource11, + NumSync, + pSignalValues->GetPointer(), + in_ppFences); + CheckReplayResult("ID3D11On12Device2_ReturnUnderlyingResource", return_value, replay_result); + CustomReplayPostCall::Dispatch( + this, + call_info, + replay_object, + pResource11, + NumSync, + pSignalValues, + ppFences); + } +} + void Dx12ReplayConsumer::Process_IUnknown_QueryInterface( const ApiCallInfo& call_info, format::HandleId object_id, diff --git a/framework/generated/generated_dx12_replay_consumer.h b/framework/generated/generated_dx12_replay_consumer.h index c1f9558cdd..21a35554ae 100644 --- a/framework/generated/generated_dx12_replay_consumer.h +++ b/framework/generated/generated_dx12_replay_consumer.h @@ -3388,6 +3388,2785 @@ class Dx12ReplayConsumer : public Dx12ReplayConsumerBase HRESULT return_value, DWORD CallbackCookie) override; +/* +** This part is generated from d3d11.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_D3D11CreateDevice( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pAdapter, + D3D_DRIVER_TYPE DriverType, + uint64_t Software, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + HandlePointerDecoder* ppDevice, + PointerDecoder* pFeatureLevel, + HandlePointerDecoder* ppImmediateContext) override; + + virtual void Process_D3D11CreateDeviceAndSwapChain( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pAdapter, + D3D_DRIVER_TYPE DriverType, + uint64_t Software, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + StructPointerDecoder* pSwapChainDesc, + HandlePointerDecoder* ppSwapChain, + HandlePointerDecoder* ppDevice, + PointerDecoder* pFeatureLevel, + HandlePointerDecoder* ppImmediateContext) override; + + virtual void Process_ID3D11DeviceChild_GetDevice( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDevice) override; + + virtual void Process_ID3D11DeviceChild_GetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + PointerDecoder* pDataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11DeviceChild_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11DeviceChild_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData) override; + + virtual void Process_ID3D11DepthStencilState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11BlendState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11RasterizerState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11Resource_GetType( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pResourceDimension) override; + + virtual void Process_ID3D11Resource_SetEvictionPriority( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT EvictionPriority) override; + + virtual void Process_ID3D11Resource_GetEvictionPriority( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) override; + + virtual void Process_ID3D11Buffer_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11Texture1D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11Texture2D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11Texture3D_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11View_GetResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResource) override; + + virtual void Process_ID3D11ShaderResourceView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11RenderTargetView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11DepthStencilView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11UnorderedAccessView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11SamplerState_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11Asynchronous_GetDataSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) override; + + virtual void Process_ID3D11Query_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11Counter_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11ClassInstance_GetClassLinkage( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppLinkage) override; + + virtual void Process_ID3D11ClassInstance_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11ClassInstance_GetInstanceName( + const ApiCallInfo& call_info, + format::HandleId object_id, + StringDecoder* pInstanceName, + PointerDecoder* pBufferLength) override; + + virtual void Process_ID3D11ClassInstance_GetTypeName( + const ApiCallInfo& call_info, + format::HandleId object_id, + StringDecoder* pTypeName, + PointerDecoder* pBufferLength) override; + + virtual void Process_ID3D11ClassLinkage_GetClassInstance( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StringDecoder* pClassInstanceName, + UINT InstanceIndex, + HandlePointerDecoder* ppInstance) override; + + virtual void Process_ID3D11ClassLinkage_CreateClassInstance( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StringDecoder* pClassTypeName, + UINT ConstantBufferOffset, + UINT ConstantVectorOffset, + UINT TextureOffset, + UINT SamplerOffset, + HandlePointerDecoder* ppInstance) override; + + virtual void Process_ID3D11CommandList_GetContextFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) override; + + virtual void Process_ID3D11DeviceContext_VSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_PSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_PSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pPixelShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_PSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_VSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVertexShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_DrawIndexed( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT IndexCount, + UINT StartIndexLocation, + INT BaseVertexLocation) override; + + virtual void Process_ID3D11DeviceContext_Draw( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT VertexCount, + UINT StartVertexLocation) override; + + virtual void Process_ID3D11DeviceContext_Map( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + UINT Subresource, + D3D11_MAP MapType, + UINT MapFlags, + StructPointerDecoder* pMappedResource) override; + + virtual void Process_ID3D11DeviceContext_Unmap( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource, + UINT Subresource) override; + + virtual void Process_ID3D11DeviceContext_PSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_IASetInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pInputLayout) override; + + virtual void Process_ID3D11DeviceContext_IASetVertexBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppVertexBuffers, + PointerDecoder* pStrides, + PointerDecoder* pOffsets) override; + + virtual void Process_ID3D11DeviceContext_IASetIndexBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pIndexBuffer, + DXGI_FORMAT Format, + UINT Offset) override; + + virtual void Process_ID3D11DeviceContext_DrawIndexedInstanced( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT IndexCountPerInstance, + UINT InstanceCount, + UINT StartIndexLocation, + INT BaseVertexLocation, + UINT StartInstanceLocation) override; + + virtual void Process_ID3D11DeviceContext_DrawInstanced( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT VertexCountPerInstance, + UINT InstanceCount, + UINT StartVertexLocation, + UINT StartInstanceLocation) override; + + virtual void Process_ID3D11DeviceContext_GSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_GSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_IASetPrimitiveTopology( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D_PRIMITIVE_TOPOLOGY Topology) override; + + virtual void Process_ID3D11DeviceContext_VSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_VSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_Begin( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pAsync) override; + + virtual void Process_ID3D11DeviceContext_End( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pAsync) override; + + virtual void Process_ID3D11DeviceContext_GetData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pAsync, + PointerDecoder* pData, + UINT DataSize, + UINT GetDataFlags) override; + + virtual void Process_ID3D11DeviceContext_SetPredication( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pPredicate, + BOOL PredicateValue) override; + + virtual void Process_ID3D11DeviceContext_GSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_GSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_OMSetRenderTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViews, + HandlePointerDecoder* ppRenderTargetViews, + format::HandleId pDepthStencilView) override; + + virtual void Process_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRTVs, + HandlePointerDecoder* ppRenderTargetViews, + format::HandleId pDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews, + PointerDecoder* pUAVInitialCounts) override; + + virtual void Process_ID3D11DeviceContext_OMSetBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBlendState, + PointerDecoder BlendFactor [4], + UINT SampleMask) override; + + virtual void Process_ID3D11DeviceContext_OMSetDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDepthStencilState, + UINT StencilRef) override; + + virtual void Process_ID3D11DeviceContext_SOSetTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumBuffers, + HandlePointerDecoder* ppSOTargets, + PointerDecoder* pOffsets) override; + + virtual void Process_ID3D11DeviceContext_DrawAuto( + const ApiCallInfo& call_info, + format::HandleId object_id) override; + + virtual void Process_ID3D11DeviceContext_DrawIndexedInstancedIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs) override; + + virtual void Process_ID3D11DeviceContext_DrawInstancedIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs) override; + + virtual void Process_ID3D11DeviceContext_Dispatch( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT ThreadGroupCountX, + UINT ThreadGroupCountY, + UINT ThreadGroupCountZ) override; + + virtual void Process_ID3D11DeviceContext_DispatchIndirect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pBufferForArgs, + UINT AlignedByteOffsetForArgs) override; + + virtual void Process_ID3D11DeviceContext_RSSetState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pRasterizerState) override; + + virtual void Process_ID3D11DeviceContext_RSSetViewports( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViewports, + StructPointerDecoder* pViewports) override; + + virtual void Process_ID3D11DeviceContext_RSSetScissorRects( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRects, + StructPointerDecoder* pRects) override; + + virtual void Process_ID3D11DeviceContext_CopySubresourceRegion( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox) override; + + virtual void Process_ID3D11DeviceContext_CopyResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + format::HandleId pSrcResource) override; + + virtual void Process_ID3D11DeviceContext_CopyStructureCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstBuffer, + UINT DstAlignedByteOffset, + format::HandleId pSrcView) override; + + virtual void Process_ID3D11DeviceContext_ClearRenderTargetView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pRenderTargetView, + PointerDecoder ColorRGBA [4]) override; + + virtual void Process_ID3D11DeviceContext_ClearUnorderedAccessViewUint( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pUnorderedAccessView, + PointerDecoder Values [4]) override; + + virtual void Process_ID3D11DeviceContext_ClearUnorderedAccessViewFloat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pUnorderedAccessView, + PointerDecoder Values [4]) override; + + virtual void Process_ID3D11DeviceContext_ClearDepthStencilView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDepthStencilView, + UINT ClearFlags, + FLOAT Depth, + UINT8 Stencil) override; + + virtual void Process_ID3D11DeviceContext_GenerateMips( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pShaderResourceView) override; + + virtual void Process_ID3D11DeviceContext_SetResourceMinLOD( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource, + FLOAT MinLOD) override; + + virtual void Process_ID3D11DeviceContext_GetResourceMinLOD( + const ApiCallInfo& call_info, + format::HandleId object_id, + FLOAT return_value, + format::HandleId pResource) override; + + virtual void Process_ID3D11DeviceContext_ResolveSubresource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + format::HandleId pSrcResource, + UINT SrcSubresource, + DXGI_FORMAT Format) override; + + virtual void Process_ID3D11DeviceContext_ExecuteCommandList( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCommandList, + BOOL RestoreContextState) override; + + virtual void Process_ID3D11DeviceContext_HSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_HSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pHullShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_HSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_HSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_DSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_DSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDomainShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_DSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_DSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_CSSetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_CSSetUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews, + PointerDecoder* pUAVInitialCounts) override; + + virtual void Process_ID3D11DeviceContext_CSSetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pComputeShader, + HandlePointerDecoder* ppClassInstances, + UINT NumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_CSSetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_CSSetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_VSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_PSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_PSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppPixelShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_PSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_VSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppVertexShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_PSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_IAGetInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppInputLayout) override; + + virtual void Process_ID3D11DeviceContext_IAGetVertexBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppVertexBuffers, + PointerDecoder* pStrides, + PointerDecoder* pOffsets) override; + + virtual void Process_ID3D11DeviceContext_IAGetIndexBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* pIndexBuffer, + PointerDecoder* Format, + PointerDecoder* Offset) override; + + virtual void Process_ID3D11DeviceContext_GSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_GSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppGeometryShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_IAGetPrimitiveTopology( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pTopology) override; + + virtual void Process_ID3D11DeviceContext_VSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_VSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_GetPredication( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppPredicate, + PointerDecoder* pPredicateValue) override; + + virtual void Process_ID3D11DeviceContext_GSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_GSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_OMGetRenderTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumViews, + HandlePointerDecoder* ppRenderTargetViews, + HandlePointerDecoder* ppDepthStencilView) override; + + virtual void Process_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumRTVs, + HandlePointerDecoder* ppRenderTargetViews, + HandlePointerDecoder* ppDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews) override; + + virtual void Process_ID3D11DeviceContext_OMGetBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppBlendState, + PointerDecoder BlendFactor [4], + PointerDecoder* pSampleMask) override; + + virtual void Process_ID3D11DeviceContext_OMGetDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDepthStencilState, + PointerDecoder* pStencilRef) override; + + virtual void Process_ID3D11DeviceContext_SOGetTargets( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT NumBuffers, + HandlePointerDecoder* ppSOTargets) override; + + virtual void Process_ID3D11DeviceContext_RSGetState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppRasterizerState) override; + + virtual void Process_ID3D11DeviceContext_RSGetViewports( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pNumViewports, + StructPointerDecoder* pViewports) override; + + virtual void Process_ID3D11DeviceContext_RSGetScissorRects( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pNumRects, + StructPointerDecoder* pRects) override; + + virtual void Process_ID3D11DeviceContext_HSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_HSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppHullShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_HSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_HSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_DSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_DSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppDomainShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_DSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_DSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_CSGetShaderResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumViews, + HandlePointerDecoder* ppShaderResourceViews) override; + + virtual void Process_ID3D11DeviceContext_CSGetUnorderedAccessViews( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumUAVs, + HandlePointerDecoder* ppUnorderedAccessViews) override; + + virtual void Process_ID3D11DeviceContext_CSGetShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppComputeShader, + HandlePointerDecoder* ppClassInstances, + PointerDecoder* pNumClassInstances) override; + + virtual void Process_ID3D11DeviceContext_CSGetSamplers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumSamplers, + HandlePointerDecoder* ppSamplers) override; + + virtual void Process_ID3D11DeviceContext_CSGetConstantBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers) override; + + virtual void Process_ID3D11DeviceContext_ClearState( + const ApiCallInfo& call_info, + format::HandleId object_id) override; + + virtual void Process_ID3D11DeviceContext_Flush( + const ApiCallInfo& call_info, + format::HandleId object_id) override; + + virtual void Process_ID3D11DeviceContext_GetType( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D11_DEVICE_CONTEXT_TYPE return_value) override; + + virtual void Process_ID3D11DeviceContext_GetContextFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) override; + + virtual void Process_ID3D11DeviceContext_FinishCommandList( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + BOOL RestoreDeferredContextState, + HandlePointerDecoder* ppCommandList) override; + + virtual void Process_ID3D11VideoDecoder_GetCreationParameters( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pVideoDesc, + StructPointerDecoder* pConfig) override; + + virtual void Process_ID3D11VideoDecoder_GetDriverHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pDriverHandle) override; + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pContentDesc) override; + + virtual void Process_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + PointerDecoder* pFlags) override; + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCaps) override; + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT TypeIndex, + StructPointerDecoder* pCaps) override; + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT TypeIndex, + UINT CustomRateIndex, + StructPointerDecoder* pRate) override; + + virtual void Process_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + StructPointerDecoder* pRange) override; + + virtual void Process_ID3D11VideoProcessor_GetContentDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11VideoProcessor_GetRateConversionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCaps) override; + + virtual void Process_ID3D11AuthenticatedChannel_GetCertificateSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pCertificateSize) override; + + virtual void Process_ID3D11AuthenticatedChannel_GetCertificate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT CertificateSize, + PointerDecoder* pCertificate) override; + + virtual void Process_ID3D11AuthenticatedChannel_GetChannelHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pChannelHandle) override; + + virtual void Process_ID3D11CryptoSession_GetCryptoType( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCryptoType) override; + + virtual void Process_ID3D11CryptoSession_GetDecoderProfile( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDecoderProfile) override; + + virtual void Process_ID3D11CryptoSession_GetCertificateSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pCertificateSize) override; + + virtual void Process_ID3D11CryptoSession_GetCertificate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT CertificateSize, + PointerDecoder* pCertificate) override; + + virtual void Process_ID3D11CryptoSession_GetCryptoSessionHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pCryptoSessionHandle) override; + + virtual void Process_ID3D11VideoDecoderOutputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11VideoProcessorInputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11VideoProcessorOutputView_GetDesc( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11VideoContext_GetDecoderBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type, + PointerDecoder* pBufferSize, + PointerDecoder* ppBuffer) override; + + virtual void Process_ID3D11VideoContext_ReleaseDecoderBuffer( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type) override; + + virtual void Process_ID3D11VideoContext_DecoderBeginFrame( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + format::HandleId pView, + UINT ContentKeySize, + PointerDecoder* pContentKey) override; + + virtual void Process_ID3D11VideoContext_DecoderEndFrame( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder) override; + + virtual void Process_ID3D11VideoContext_SubmitDecoderBuffers( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc) override; + + virtual void Process_ID3D11VideoContext_DecoderExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + StructPointerDecoder* pExtensionData) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputTargetRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable, + StructPointerDecoder* pRect) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL YCbCr, + StructPointerDecoder* pColor) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + StructPointerDecoder* pColorSpace) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE AlphaFillMode, + UINT StreamIndex) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputConstriction( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable, + Decoded_tagSIZE Size) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputStereoMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL Enable) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetOutputExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + uint64_t pData) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputTargetRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* Enabled, + StructPointerDecoder* pRect) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pYCbCr, + StructPointerDecoder* pColor) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + StructPointerDecoder* pColorSpace) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pAlphaFillMode, + PointerDecoder* pStreamIndex) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputConstriction( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pEnabled, + StructPointerDecoder* pSize) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputStereoMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pEnabled) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetOutputExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_FRAME_FORMAT FrameFormat) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pColorSpace) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamOutputRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate, + BOOL RepeatFrame, + StructPointerDecoder* pCustomRate) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamSourceRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pRect) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamDestRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pRect) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamAlpha( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Alpha) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamPalette( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + UINT Count, + PointerDecoder* pEntries) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + StructPointerDecoder* pSourceAspectRatio, + StructPointerDecoder* pDestinationAspectRatio) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamLumaKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Lower, + FLOAT Upper) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT Format, + BOOL LeftViewFrame0, + BOOL BaseViewFrame0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode, + int MonoOffset) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamFilter( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + BOOL Enable, + int Level) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + uint64_t pData) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pFrameFormat) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamColorSpace( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pColorSpace) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamOutputRate( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pOutputRate, + PointerDecoder* pRepeatFrame, + StructPointerDecoder* pCustomRate) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamSourceRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pRect) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamDestRect( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pRect) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamAlpha( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + PointerDecoder* pAlpha) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamPalette( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + UINT Count, + PointerDecoder* pEntries) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + StructPointerDecoder* pSourceAspectRatio, + StructPointerDecoder* pDestinationAspectRatio) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamLumaKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled, + PointerDecoder* pLower, + PointerDecoder* pUpper) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pFormat, + PointerDecoder* pLeftViewFrame0, + PointerDecoder* pBaseViewFrame0, + PointerDecoder* pFlipMode, + PointerDecoder* MonoOffset) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnabled) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamFilter( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + PointerDecoder* pEnabled, + PointerDecoder* pLevel) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamExtension( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT StreamIndex, + StructPointerDecoder* pExtensionGuid, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + format::HandleId pView, + UINT OutputFrame, + UINT StreamCount, + StructPointerDecoder* pStreams) override; + + virtual void Process_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11VideoContext_EncryptionBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + format::HandleId pSrcSurface, + format::HandleId pDstSurface, + UINT IVSize, + PointerDecoder* pIV) override; + + virtual void Process_ID3D11VideoContext_DecryptionBlt( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + format::HandleId pSrcSurface, + format::HandleId pDstSurface, + StructPointerDecoder* pEncryptedBlockInfo, + UINT ContentKeySize, + PointerDecoder* pContentKey, + UINT IVSize, + PointerDecoder* pIV) override; + + virtual void Process_ID3D11VideoContext_StartSessionKeyRefresh( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession, + UINT RandomNumberSize, + PointerDecoder* pRandomNumber) override; + + virtual void Process_ID3D11VideoContext_FinishSessionKeyRefresh( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pCryptoSession) override; + + virtual void Process_ID3D11VideoContext_GetEncryptionBltKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT KeySize, + PointerDecoder* pReadbackKey) override; + + virtual void Process_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11VideoContext_QueryAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT InputSize, + PointerDecoder* pInput, + UINT OutputSize, + PointerDecoder* pOutput) override; + + virtual void Process_ID3D11VideoContext_ConfigureAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pChannel, + UINT InputSize, + PointerDecoder* pInput, + StructPointerDecoder* pOutput) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorSetStreamRotation( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_ROTATION Rotation) override; + + virtual void Process_ID3D11VideoContext_VideoProcessorGetStreamRotation( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pRotation) override; + + virtual void Process_ID3D11VideoDevice_CreateVideoDecoder( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pVideoDesc, + StructPointerDecoder* pConfig, + HandlePointerDecoder* ppDecoder) override; + + virtual void Process_ID3D11VideoDevice_CreateVideoProcessor( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pEnum, + UINT RateConversionIndex, + HandlePointerDecoder* ppVideoProcessor) override; + + virtual void Process_ID3D11VideoDevice_CreateAuthenticatedChannel( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType, + HandlePointerDecoder* ppAuthenticatedChannel) override; + + virtual void Process_ID3D11VideoDevice_CreateCryptoSession( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pKeyExchangeType, + HandlePointerDecoder* ppCryptoSession) override; + + virtual void Process_ID3D11VideoDevice_CreateVideoDecoderOutputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVDOVView) override; + + virtual void Process_ID3D11VideoDevice_CreateVideoProcessorInputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + format::HandleId pEnum, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVPIView) override; + + virtual void Process_ID3D11VideoDevice_CreateVideoProcessorOutputView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + format::HandleId pEnum, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppVPOView) override; + + virtual void Process_ID3D11VideoDevice_CreateVideoProcessorEnumerator( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppEnum) override; + + virtual void Process_ID3D11VideoDevice_GetVideoDecoderProfileCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) override; + + virtual void Process_ID3D11VideoDevice_GetVideoDecoderProfile( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT Index, + StructPointerDecoder* pDecoderProfile) override; + + virtual void Process_ID3D11VideoDevice_CheckVideoDecoderFormat( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDecoderProfile, + DXGI_FORMAT Format, + PointerDecoder* pSupported) override; + + virtual void Process_ID3D11VideoDevice_GetVideoDecoderConfigCount( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + PointerDecoder* pCount) override; + + virtual void Process_ID3D11VideoDevice_GetVideoDecoderConfig( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + UINT Index, + StructPointerDecoder* pConfig) override; + + virtual void Process_ID3D11VideoDevice_GetContentProtectionCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pCaps) override; + + virtual void Process_ID3D11VideoDevice_CheckCryptoKeyExchange( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + UINT Index, + StructPointerDecoder* pKeyExchangeType) override; + + virtual void Process_ID3D11VideoDevice_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11VideoDevice_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData) override; + + virtual void Process_ID3D11Device_CreateShaderResourceView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppSRView) override; + + virtual void Process_ID3D11Device_CreateUnorderedAccessView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppUAView) override; + + virtual void Process_ID3D11Device_CreateRenderTargetView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppRTView) override; + + virtual void Process_ID3D11Device_CreateDepthStencilView( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc, + HandlePointerDecoder* ppDepthStencilView) override; + + virtual void Process_ID3D11Device_CreateInputLayout( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputElementDescs, + UINT NumElements, + PointerDecoder* pShaderBytecodeWithInputSignature, + SIZE_T BytecodeLength, + HandlePointerDecoder* ppInputLayout) override; + + virtual void Process_ID3D11Device_CreateVertexShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppVertexShader) override; + + virtual void Process_ID3D11Device_CreateGeometryShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppGeometryShader) override; + + virtual void Process_ID3D11Device_CreateGeometryShaderWithStreamOutput( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + StructPointerDecoder* pSODeclaration, + UINT NumEntries, + PointerDecoder* pBufferStrides, + UINT NumStrides, + UINT RasterizedStream, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppGeometryShader) override; + + virtual void Process_ID3D11Device_CreatePixelShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppPixelShader) override; + + virtual void Process_ID3D11Device_CreateHullShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppHullShader) override; + + virtual void Process_ID3D11Device_CreateDomainShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppDomainShader) override; + + virtual void Process_ID3D11Device_CreateComputeShader( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + PointerDecoder* pShaderBytecode, + SIZE_T BytecodeLength, + format::HandleId pClassLinkage, + HandlePointerDecoder* ppComputeShader) override; + + virtual void Process_ID3D11Device_CreateClassLinkage( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + HandlePointerDecoder* ppLinkage) override; + + virtual void Process_ID3D11Device_CreateBlendState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pBlendStateDesc, + HandlePointerDecoder* ppBlendState) override; + + virtual void Process_ID3D11Device_CreateDepthStencilState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDepthStencilDesc, + HandlePointerDecoder* ppDepthStencilState) override; + + virtual void Process_ID3D11Device_CreateRasterizerState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState) override; + + virtual void Process_ID3D11Device_CreateSamplerState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pSamplerDesc, + HandlePointerDecoder* ppSamplerState) override; + + virtual void Process_ID3D11Device_CreateQuery( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pQueryDesc, + HandlePointerDecoder* ppQuery) override; + + virtual void Process_ID3D11Device_CreatePredicate( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pPredicateDesc, + HandlePointerDecoder* ppPredicate) override; + + virtual void Process_ID3D11Device_CreateCounter( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCounterDesc, + HandlePointerDecoder* ppCounter) override; + + virtual void Process_ID3D11Device_CreateDeferredContext( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) override; + + virtual void Process_ID3D11Device_OpenSharedResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hResource, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppResource) override; + + virtual void Process_ID3D11Device_CheckFormatSupport( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + PointerDecoder* pFormatSupport) override; + + virtual void Process_ID3D11Device_CheckMultisampleQualityLevels( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + UINT SampleCount, + PointerDecoder* pNumQualityLevels) override; + + virtual void Process_ID3D11Device_CheckCounterInfo( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pCounterInfo) override; + + virtual void Process_ID3D11Device_CheckCounter( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDesc, + PointerDecoder* pType, + PointerDecoder* pActiveCounters, + StringDecoder* szName, + PointerDecoder* pNameLength, + StringDecoder* szUnits, + PointerDecoder* pUnitsLength, + StringDecoder* szDescription, + PointerDecoder* pDescriptionLength) override; + + virtual void Process_ID3D11Device_GetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + PointerDecoder* pDataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11Device_SetPrivateData( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11Device_SetPrivateDataInterface( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID guid, + format::HandleId pData) override; + + virtual void Process_ID3D11Device_GetFeatureLevel( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D_FEATURE_LEVEL return_value) override; + + virtual void Process_ID3D11Device_GetCreationFlags( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) override; + + virtual void Process_ID3D11Device_GetDeviceRemovedReason( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value) override; + + virtual void Process_ID3D11Device_GetImmediateContext( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) override; + + virtual void Process_ID3D11Device_SetExceptionMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT RaiseFlags) override; + + virtual void Process_ID3D11Device_GetExceptionMode( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT return_value) override; + +/* +** This part is generated from d3d11_1.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_ID3D11BlendState1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11RasterizerState1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11DeviceContext1_CopySubresourceRegion1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox, + UINT CopyFlags) override; + + virtual void Process_ID3D11DeviceContext1_DiscardResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResource) override; + + virtual void Process_ID3D11DeviceContext1_DiscardView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResourceView) override; + + virtual void Process_ID3D11DeviceContext1_VSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_HSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_DSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_GSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_PSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_CSSetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_VSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_HSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_DSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_GSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_PSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_CSGetConstantBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT StartSlot, + UINT NumBuffers, + HandlePointerDecoder* ppConstantBuffers, + PointerDecoder* pFirstConstant, + PointerDecoder* pNumConstants) override; + + virtual void Process_ID3D11DeviceContext1_SwapDeviceContextState( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pState, + HandlePointerDecoder* ppPreviousState) override; + + virtual void Process_ID3D11DeviceContext1_ClearView( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pView, + PointerDecoder Color [4], + StructPointerDecoder* pRect, + UINT NumRects) override; + + virtual void Process_ID3D11DeviceContext1_DiscardView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pResourceView, + StructPointerDecoder* pRects, + UINT NumRects) override; + + virtual void Process_ID3D11VideoContext1_SubmitDecoderBuffers1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc) override; + + virtual void Process_ID3D11VideoContext1_GetDataForNewHardwareKey( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + UINT PrivateInputSize, + PointerDecoder* pPrivatInputData, + PointerDecoder* pPrivateOutputData) override; + + virtual void Process_ID3D11VideoContext1_CheckCryptoSessionStatus( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + PointerDecoder* pStatus) override; + + virtual void Process_ID3D11VideoContext1_DecoderEnableDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pOutputDesc, + UINT ReferenceFrameCount) override; + + virtual void Process_ID3D11VideoContext1_DecoderUpdateDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + StructPointerDecoder* pOutputDesc) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + DXGI_COLOR_SPACE_TYPE ColorSpace) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + BOOL ShaderUsage) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pColorSpace) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pShaderUsage) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + DXGI_COLOR_SPACE_TYPE ColorSpace) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorSetStreamMirror( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + BOOL FlipHorizontal, + BOOL FlipVertical) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pColorSpace) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetStreamMirror( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pEnable, + PointerDecoder* pFlipHorizontal, + PointerDecoder* pFlipVertical) override; + + virtual void Process_ID3D11VideoContext1_VideoProcessorGetBehaviorHints( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pVideoProcessor, + UINT OutputWidth, + UINT OutputHeight, + DXGI_FORMAT OutputFormat, + UINT StreamCount, + StructPointerDecoder* pStreams, + PointerDecoder* pBehaviorHints) override; + + virtual void Process_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pCryptoType, + StructPointerDecoder* pDecoderProfile, + StructPointerDecoder* pKeyExchangeType, + PointerDecoder* pPrivateInputSize, + PointerDecoder* pPrivateOutputSize) override; + + virtual void Process_ID3D11VideoDevice1_GetVideoDecoderCaps( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pDecoderProfile, + UINT SampleWidth, + UINT SampleHeight, + StructPointerDecoder* pFrameRate, + UINT BitRate, + StructPointerDecoder* pCryptoType, + PointerDecoder* pDecoderCaps) override; + + virtual void Process_ID3D11VideoDevice1_CheckVideoDecoderDownsampling( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pInputConfig, + StructPointerDecoder* pFrameRate, + StructPointerDecoder* pOutputDesc, + PointerDecoder* pSupported, + PointerDecoder* pRealTimeHint) override; + + virtual void Process_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + StructPointerDecoder* pInputConfig, + StructPointerDecoder* pFrameRate, + StructPointerDecoder* pRecommendedOutputDesc) override; + + virtual void Process_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT InputFormat, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + DXGI_FORMAT OutputFormat, + DXGI_COLOR_SPACE_TYPE OutputColorSpace, + PointerDecoder* pSupported) override; + + virtual void Process_ID3D11Device1_GetImmediateContext1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) override; + + virtual void Process_ID3D11Device1_CreateDeferredContext1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) override; + + virtual void Process_ID3D11Device1_CreateBlendState1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pBlendStateDesc, + HandlePointerDecoder* ppBlendState) override; + + virtual void Process_ID3D11Device1_CreateRasterizerState1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState) override; + + virtual void Process_ID3D11Device1_CreateDeviceContextState( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + Decoded_GUID EmulatedInterface, + PointerDecoder* pChosenFeatureLevel, + HandlePointerDecoder* ppContextState) override; + + virtual void Process_ID3D11Device1_OpenSharedResource1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hResource, + Decoded_GUID returnedInterface, + HandlePointerDecoder* ppResource) override; + + virtual void Process_ID3D11Device1_OpenSharedResourceByName( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + WStringDecoder* lpName, + DWORD dwDesiredAccess, + Decoded_GUID returnedInterface, + HandlePointerDecoder* ppResource) override; + + virtual void Process_ID3DUserDefinedAnnotation_BeginEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + INT return_value, + WStringDecoder* Name) override; + + virtual void Process_ID3DUserDefinedAnnotation_EndEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + INT return_value) override; + + virtual void Process_ID3DUserDefinedAnnotation_SetMarker( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* Name) override; + + virtual void Process_ID3DUserDefinedAnnotation_GetStatus( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value) override; + +/* +** This part is generated from d3d11_2.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_ID3D11DeviceContext2_UpdateTileMappings( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pTiledResource, + UINT NumTiledResourceRegions, + StructPointerDecoder* pTiledResourceRegionStartCoordinates, + StructPointerDecoder* pTiledResourceRegionSizes, + format::HandleId pTilePool, + UINT NumRanges, + PointerDecoder* pRangeFlags, + PointerDecoder* pTilePoolStartOffsets, + PointerDecoder* pRangeTileCounts, + UINT Flags) override; + + virtual void Process_ID3D11DeviceContext2_CopyTileMappings( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDestTiledResource, + StructPointerDecoder* pDestRegionStartCoordinate, + format::HandleId pSourceTiledResource, + StructPointerDecoder* pSourceRegionStartCoordinate, + StructPointerDecoder* pTileRegionSize, + UINT Flags) override; + + virtual void Process_ID3D11DeviceContext2_CopyTiles( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResource, + StructPointerDecoder* pTileRegionStartCoordinate, + StructPointerDecoder* pTileRegionSize, + format::HandleId pBuffer, + UINT64 BufferStartOffsetInBytes, + UINT Flags) override; + + virtual void Process_ID3D11DeviceContext2_UpdateTiles( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pDestTiledResource, + StructPointerDecoder* pDestTileRegionStartCoordinate, + StructPointerDecoder* pDestTileRegionSize, + uint64_t pSourceTileData, + UINT Flags) override; + + virtual void Process_ID3D11DeviceContext2_ResizeTilePool( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pTilePool, + UINT64 NewSizeInBytes) override; + + virtual void Process_ID3D11DeviceContext2_TiledResourceBarrier( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResourceOrViewAccessBeforeBarrier, + format::HandleId pTiledResourceOrViewAccessAfterBarrier) override; + + virtual void Process_ID3D11DeviceContext2_IsAnnotationEnabled( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value) override; + + virtual void Process_ID3D11DeviceContext2_SetMarkerInt( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* pLabel, + INT Data) override; + + virtual void Process_ID3D11DeviceContext2_BeginEventInt( + const ApiCallInfo& call_info, + format::HandleId object_id, + WStringDecoder* pLabel, + INT Data) override; + + virtual void Process_ID3D11DeviceContext2_EndEvent( + const ApiCallInfo& call_info, + format::HandleId object_id) override; + + virtual void Process_ID3D11Device2_GetImmediateContext2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) override; + + virtual void Process_ID3D11Device2_CreateDeferredContext2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) override; + + virtual void Process_ID3D11Device2_GetResourceTiling( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pTiledResource, + PointerDecoder* pNumTilesForEntireResource, + StructPointerDecoder* pPackedMipDesc, + StructPointerDecoder* pStandardTileShapeForNonPackedMips, + PointerDecoder* pNumSubresourceTilings, + UINT FirstSubresourceTilingToGet, + StructPointerDecoder* pSubresourceTilingsForNonPackedMips) override; + + virtual void Process_ID3D11Device2_CheckMultisampleQualityLevels1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + DXGI_FORMAT Format, + UINT SampleCount, + UINT Flags, + PointerDecoder* pNumQualityLevels) override; + +/* +** This part is generated from d3d11_3.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_ID3D11Texture2D1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11Texture3D1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11RasterizerState2_GetDesc2( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc) override; + + virtual void Process_ID3D11ShaderResourceView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) override; + + virtual void Process_ID3D11RenderTargetView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) override; + + virtual void Process_ID3D11UnorderedAccessView1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) override; + + virtual void Process_ID3D11Query1_GetDesc1( + const ApiCallInfo& call_info, + format::HandleId object_id, + StructPointerDecoder* pDesc1) override; + + virtual void Process_ID3D11DeviceContext3_Flush1( + const ApiCallInfo& call_info, + format::HandleId object_id, + D3D11_CONTEXT_TYPE ContextType, + uint64_t hEvent) override; + + virtual void Process_ID3D11DeviceContext3_SetHardwareProtectionState( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL HwProtectionEnable) override; + + virtual void Process_ID3D11DeviceContext3_GetHardwareProtectionState( + const ApiCallInfo& call_info, + format::HandleId object_id, + PointerDecoder* pHwProtectionEnable) override; + + virtual void Process_ID3D11Fence_CreateSharedHandle( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pAttributes, + DWORD dwAccess, + WStringDecoder* lpName, + PointerDecoder* pHandle) override; + + virtual void Process_ID3D11Fence_GetCompletedValue( + const ApiCallInfo& call_info, + format::HandleId object_id, + UINT64 return_value) override; + + virtual void Process_ID3D11Fence_SetEventOnCompletion( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT64 Value, + uint64_t hEvent) override; + + virtual void Process_ID3D11DeviceContext4_Signal( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pFence, + UINT64 Value) override; + + virtual void Process_ID3D11DeviceContext4_Wait( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pFence, + UINT64 Value) override; + + virtual void Process_ID3D11Device3_CreateRasterizerState2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pRasterizerDesc, + HandlePointerDecoder* ppRasterizerState) override; + + virtual void Process_ID3D11Device3_CreateShaderResourceView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppSRView1) override; + + virtual void Process_ID3D11Device3_CreateUnorderedAccessView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppUAView1) override; + + virtual void Process_ID3D11Device3_CreateRenderTargetView1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource, + StructPointerDecoder* pDesc1, + HandlePointerDecoder* ppRTView1) override; + + virtual void Process_ID3D11Device3_CreateQuery1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + StructPointerDecoder* pQueryDesc1, + HandlePointerDecoder* ppQuery1) override; + + virtual void Process_ID3D11Device3_GetImmediateContext3( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppImmediateContext) override; + + virtual void Process_ID3D11Device3_CreateDeferredContext3( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT ContextFlags, + HandlePointerDecoder* ppDeferredContext) override; + + virtual void Process_ID3D11Device3_ReadFromSubresource( + const ApiCallInfo& call_info, + format::HandleId object_id, + uint64_t pDstData, + UINT DstRowPitch, + UINT DstDepthPitch, + format::HandleId pSrcResource, + UINT SrcSubresource, + StructPointerDecoder* pSrcBox) override; + +/* +** This part is generated from d3d11_4.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_ID3D11Device4_RegisterDeviceRemovedEvent( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hEvent, + PointerDecoder* pdwCookie) override; + + virtual void Process_ID3D11Device4_UnregisterDeviceRemoved( + const ApiCallInfo& call_info, + format::HandleId object_id, + DWORD dwCookie) override; + + virtual void Process_ID3D11Device5_OpenSharedFence( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + uint64_t hFence, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppFence) override; + + virtual void Process_ID3D11Device5_CreateFence( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + UINT64 InitialValue, + D3D11_FENCE_FLAG Flags, + Decoded_GUID ReturnedInterface, + HandlePointerDecoder* ppFence) override; + + virtual void Process_ID3D11Multithread_Enter( + const ApiCallInfo& call_info, + format::HandleId object_id) override; + + virtual void Process_ID3D11Multithread_Leave( + const ApiCallInfo& call_info, + format::HandleId object_id) override; + + virtual void Process_ID3D11Multithread_SetMultithreadProtected( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value, + BOOL bMTProtect) override; + + virtual void Process_ID3D11Multithread_GetMultithreadProtected( + const ApiCallInfo& call_info, + format::HandleId object_id, + BOOL return_value) override; + + virtual void Process_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + PointerDecoder* pHDRMetaData) override; + + virtual void Process_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + PointerDecoder* pType, + UINT Size, + PointerDecoder* pMetaData) override; + + virtual void Process_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + PointerDecoder* pHDRMetaData) override; + + virtual void Process_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData( + const ApiCallInfo& call_info, + format::HandleId object_id, + format::HandleId pVideoProcessor, + UINT StreamIndex, + PointerDecoder* pType, + UINT Size, + PointerDecoder* pMetaData) override; + + virtual void Process_ID3D11VideoDevice2_CheckFeatureSupport( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + D3D11_FEATURE_VIDEO Feature, + PointerDecoder* pFeatureSupportData, + UINT FeatureSupportDataSize) override; + + virtual void Process_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pCryptoSession, + D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS flags, + UINT DataSize, + PointerDecoder* pData) override; + + virtual void Process_ID3D11VideoContext3_DecoderBeginFrame1( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + format::HandleId pView, + UINT ContentKeySize, + PointerDecoder* pContentKey, + UINT NumComponentHistograms, + PointerDecoder* pHistogramOffsets, + HandlePointerDecoder* ppHistogramBuffers) override; + + virtual void Process_ID3D11VideoContext3_SubmitDecoderBuffers2( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pDecoder, + UINT NumBuffers, + StructPointerDecoder* pBufferDesc) override; + +/* +** This part is generated from d3d11on12.h in Windows SDK: 10.0.20348.0 +** +*/ + virtual void Process_D3D11On12CreateDevice( + const ApiCallInfo& call_info, + HRESULT return_value, + format::HandleId pDevice, + UINT Flags, + PointerDecoder* pFeatureLevels, + UINT FeatureLevels, + HandlePointerDecoder* ppCommandQueues, + UINT NumQueues, + UINT NodeMask, + HandlePointerDecoder* ppDevice, + HandlePointerDecoder* ppImmediateContext, + PointerDecoder* pChosenFeatureLevel) override; + + virtual void Process_ID3D11On12Device_CreateWrappedResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource12, + StructPointerDecoder* pFlags11, + D3D12_RESOURCE_STATES InState, + D3D12_RESOURCE_STATES OutState, + Decoded_GUID riid, + HandlePointerDecoder* ppResource11) override; + + virtual void Process_ID3D11On12Device_ReleaseWrappedResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResources, + UINT NumResources) override; + + virtual void Process_ID3D11On12Device_AcquireWrappedResources( + const ApiCallInfo& call_info, + format::HandleId object_id, + HandlePointerDecoder* ppResources, + UINT NumResources) override; + + virtual void Process_ID3D11On12Device1_GetD3D12Device( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + Decoded_GUID riid, + HandlePointerDecoder* ppvDevice) override; + + virtual void Process_ID3D11On12Device2_UnwrapUnderlyingResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource11, + format::HandleId pCommandQueue, + Decoded_GUID riid, + HandlePointerDecoder* ppvResource12) override; + + virtual void Process_ID3D11On12Device2_ReturnUnderlyingResource( + const ApiCallInfo& call_info, + format::HandleId object_id, + HRESULT return_value, + format::HandleId pResource11, + UINT NumSync, + PointerDecoder* pSignalValues, + HandlePointerDecoder* ppFences) override; + /* ** This part is generated from Unknwnbase.h in Windows SDK: 10.0.20348.0 ** diff --git a/framework/generated/generated_dx12_state_table.h b/framework/generated/generated_dx12_state_table.h index fbc439ff31..34b795ea01 100644 --- a/framework/generated/generated_dx12_state_table.h +++ b/framework/generated/generated_dx12_state_table.h @@ -96,6 +96,48 @@ class Dx12StateTable : public Dx12StateTableBase bool InsertWrapper(format::HandleId id, ID3D12SharingContract_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D12SharingContract_Wrapper_map_); } bool InsertWrapper(format::HandleId id, ID3D12ManualWriteTrackingResource_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D12ManualWriteTrackingResource_Wrapper_map_); } bool InsertWrapper(format::HandleId id, ID3D12InfoQueue_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D12InfoQueue_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11DepthStencilState_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11DepthStencilState_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11Buffer_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11Buffer_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11Texture1D_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11Texture1D_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11DepthStencilView_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11DepthStencilView_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11VertexShader_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11VertexShader_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11HullShader_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11HullShader_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11DomainShader_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11DomainShader_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11GeometryShader_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11GeometryShader_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11PixelShader_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11PixelShader_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11ComputeShader_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11ComputeShader_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11InputLayout_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11InputLayout_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11SamplerState_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11SamplerState_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11Predicate_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11Predicate_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11Counter_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11Counter_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11ClassInstance_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11ClassInstance_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11ClassLinkage_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11ClassLinkage_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11CommandList_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11CommandList_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11VideoDecoder_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11VideoDecoder_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11VideoProcessor_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11VideoProcessor_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11AuthenticatedChannel_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11AuthenticatedChannel_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11CryptoSession_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11CryptoSession_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11VideoDecoderOutputView_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11VideoDecoderOutputView_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11VideoProcessorInputView_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11VideoProcessorInputView_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11VideoProcessorOutputView_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11VideoProcessorOutputView_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11BlendState_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11BlendState_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3DDeviceContextState_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3DDeviceContextState_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11VideoProcessorEnumerator_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11VideoProcessorEnumerator_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3DUserDefinedAnnotation_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3DUserDefinedAnnotation_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11Texture2D_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11Texture2D_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11Texture3D_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11Texture3D_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11RasterizerState_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11RasterizerState_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11ShaderResourceView_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11ShaderResourceView_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11RenderTargetView_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11RenderTargetView_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11UnorderedAccessView_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11UnorderedAccessView_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11Query_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11Query_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11Fence_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11Fence_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11DeviceContext_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11DeviceContext_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11Device_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11Device_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11Multithread_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11Multithread_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11VideoDevice_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11VideoDevice_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11VideoContext_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11VideoContext_Wrapper_map_); } + bool InsertWrapper(format::HandleId id, ID3D11On12Device_Wrapper* wrapper) { return InsertEntry(id, wrapper, ID3D11On12Device_Wrapper_map_); } bool RemoveWrapper(const IDXGIKeyedMutex_Wrapper* wrapper) { return RemoveEntry(wrapper, IDXGIKeyedMutex_Wrapper_map_); } bool RemoveWrapper(const IDXGIDisplayControl_Wrapper* wrapper) { return RemoveEntry(wrapper, IDXGIDisplayControl_Wrapper_map_); } @@ -154,6 +196,48 @@ class Dx12StateTable : public Dx12StateTableBase bool RemoveWrapper(const ID3D12SharingContract_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D12SharingContract_Wrapper_map_); } bool RemoveWrapper(const ID3D12ManualWriteTrackingResource_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D12ManualWriteTrackingResource_Wrapper_map_); } bool RemoveWrapper(const ID3D12InfoQueue_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D12InfoQueue_Wrapper_map_); } + bool RemoveWrapper(const ID3D11DepthStencilState_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11DepthStencilState_Wrapper_map_); } + bool RemoveWrapper(const ID3D11Buffer_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11Buffer_Wrapper_map_); } + bool RemoveWrapper(const ID3D11Texture1D_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11Texture1D_Wrapper_map_); } + bool RemoveWrapper(const ID3D11DepthStencilView_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11DepthStencilView_Wrapper_map_); } + bool RemoveWrapper(const ID3D11VertexShader_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11VertexShader_Wrapper_map_); } + bool RemoveWrapper(const ID3D11HullShader_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11HullShader_Wrapper_map_); } + bool RemoveWrapper(const ID3D11DomainShader_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11DomainShader_Wrapper_map_); } + bool RemoveWrapper(const ID3D11GeometryShader_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11GeometryShader_Wrapper_map_); } + bool RemoveWrapper(const ID3D11PixelShader_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11PixelShader_Wrapper_map_); } + bool RemoveWrapper(const ID3D11ComputeShader_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11ComputeShader_Wrapper_map_); } + bool RemoveWrapper(const ID3D11InputLayout_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11InputLayout_Wrapper_map_); } + bool RemoveWrapper(const ID3D11SamplerState_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11SamplerState_Wrapper_map_); } + bool RemoveWrapper(const ID3D11Predicate_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11Predicate_Wrapper_map_); } + bool RemoveWrapper(const ID3D11Counter_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11Counter_Wrapper_map_); } + bool RemoveWrapper(const ID3D11ClassInstance_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11ClassInstance_Wrapper_map_); } + bool RemoveWrapper(const ID3D11ClassLinkage_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11ClassLinkage_Wrapper_map_); } + bool RemoveWrapper(const ID3D11CommandList_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11CommandList_Wrapper_map_); } + bool RemoveWrapper(const ID3D11VideoDecoder_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11VideoDecoder_Wrapper_map_); } + bool RemoveWrapper(const ID3D11VideoProcessor_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11VideoProcessor_Wrapper_map_); } + bool RemoveWrapper(const ID3D11AuthenticatedChannel_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11AuthenticatedChannel_Wrapper_map_); } + bool RemoveWrapper(const ID3D11CryptoSession_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11CryptoSession_Wrapper_map_); } + bool RemoveWrapper(const ID3D11VideoDecoderOutputView_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11VideoDecoderOutputView_Wrapper_map_); } + bool RemoveWrapper(const ID3D11VideoProcessorInputView_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11VideoProcessorInputView_Wrapper_map_); } + bool RemoveWrapper(const ID3D11VideoProcessorOutputView_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11VideoProcessorOutputView_Wrapper_map_); } + bool RemoveWrapper(const ID3D11BlendState_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11BlendState_Wrapper_map_); } + bool RemoveWrapper(const ID3DDeviceContextState_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3DDeviceContextState_Wrapper_map_); } + bool RemoveWrapper(const ID3D11VideoProcessorEnumerator_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11VideoProcessorEnumerator_Wrapper_map_); } + bool RemoveWrapper(const ID3DUserDefinedAnnotation_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3DUserDefinedAnnotation_Wrapper_map_); } + bool RemoveWrapper(const ID3D11Texture2D_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11Texture2D_Wrapper_map_); } + bool RemoveWrapper(const ID3D11Texture3D_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11Texture3D_Wrapper_map_); } + bool RemoveWrapper(const ID3D11RasterizerState_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11RasterizerState_Wrapper_map_); } + bool RemoveWrapper(const ID3D11ShaderResourceView_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11ShaderResourceView_Wrapper_map_); } + bool RemoveWrapper(const ID3D11RenderTargetView_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11RenderTargetView_Wrapper_map_); } + bool RemoveWrapper(const ID3D11UnorderedAccessView_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11UnorderedAccessView_Wrapper_map_); } + bool RemoveWrapper(const ID3D11Query_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11Query_Wrapper_map_); } + bool RemoveWrapper(const ID3D11Fence_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11Fence_Wrapper_map_); } + bool RemoveWrapper(const ID3D11DeviceContext_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11DeviceContext_Wrapper_map_); } + bool RemoveWrapper(const ID3D11Device_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11Device_Wrapper_map_); } + bool RemoveWrapper(const ID3D11Multithread_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11Multithread_Wrapper_map_); } + bool RemoveWrapper(const ID3D11VideoDevice_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11VideoDevice_Wrapper_map_); } + bool RemoveWrapper(const ID3D11VideoContext_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11VideoContext_Wrapper_map_); } + bool RemoveWrapper(const ID3D11On12Device_Wrapper* wrapper) { return RemoveEntry(wrapper, ID3D11On12Device_Wrapper_map_); } void VisitWrappers(std::function visitor) const { for (auto entry : IDXGIKeyedMutex_Wrapper_map_) { visitor(entry.second); } } void VisitWrappers(std::function visitor) const { for (auto entry : IDXGIDisplayControl_Wrapper_map_) { visitor(entry.second); } } @@ -212,6 +296,48 @@ class Dx12StateTable : public Dx12StateTableBase void VisitWrappers(std::function visitor) const { for (auto entry : ID3D12SharingContract_Wrapper_map_) { visitor(entry.second); } } void VisitWrappers(std::function visitor) const { for (auto entry : ID3D12ManualWriteTrackingResource_Wrapper_map_) { visitor(entry.second); } } void VisitWrappers(std::function visitor) const { for (auto entry : ID3D12InfoQueue_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11DepthStencilState_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11Buffer_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11Texture1D_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11DepthStencilView_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11VertexShader_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11HullShader_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11DomainShader_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11GeometryShader_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11PixelShader_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11ComputeShader_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11InputLayout_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11SamplerState_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11Predicate_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11Counter_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11ClassInstance_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11ClassLinkage_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11CommandList_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11VideoDecoder_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11VideoProcessor_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11AuthenticatedChannel_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11CryptoSession_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11VideoDecoderOutputView_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11VideoProcessorInputView_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11VideoProcessorOutputView_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11BlendState_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3DDeviceContextState_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11VideoProcessorEnumerator_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3DUserDefinedAnnotation_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11Texture2D_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11Texture3D_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11RasterizerState_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11ShaderResourceView_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11RenderTargetView_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11UnorderedAccessView_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11Query_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11Fence_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11DeviceContext_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11Device_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11Multithread_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11VideoDevice_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11VideoContext_Wrapper_map_) { visitor(entry.second); } } + void VisitWrappers(std::function visitor) const { for (auto entry : ID3D11On12Device_Wrapper_map_) { visitor(entry.second); } } // // Helper functions for state initialization. @@ -388,6 +514,132 @@ class Dx12StateTable : public Dx12StateTableBase ID3D12InfoQueue_Wrapper* GetID3D12InfoQueue_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D12InfoQueue_Wrapper_map_); } const ID3D12InfoQueue_Wrapper* GetID3D12InfoQueue_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D12InfoQueue_Wrapper_map_); } + ID3D11DepthStencilState_Wrapper* GetID3D11DepthStencilState_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11DepthStencilState_Wrapper_map_); } + const ID3D11DepthStencilState_Wrapper* GetID3D11DepthStencilState_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11DepthStencilState_Wrapper_map_); } + + ID3D11Buffer_Wrapper* GetID3D11Buffer_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11Buffer_Wrapper_map_); } + const ID3D11Buffer_Wrapper* GetID3D11Buffer_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11Buffer_Wrapper_map_); } + + ID3D11Texture1D_Wrapper* GetID3D11Texture1D_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11Texture1D_Wrapper_map_); } + const ID3D11Texture1D_Wrapper* GetID3D11Texture1D_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11Texture1D_Wrapper_map_); } + + ID3D11DepthStencilView_Wrapper* GetID3D11DepthStencilView_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11DepthStencilView_Wrapper_map_); } + const ID3D11DepthStencilView_Wrapper* GetID3D11DepthStencilView_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11DepthStencilView_Wrapper_map_); } + + ID3D11VertexShader_Wrapper* GetID3D11VertexShader_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11VertexShader_Wrapper_map_); } + const ID3D11VertexShader_Wrapper* GetID3D11VertexShader_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11VertexShader_Wrapper_map_); } + + ID3D11HullShader_Wrapper* GetID3D11HullShader_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11HullShader_Wrapper_map_); } + const ID3D11HullShader_Wrapper* GetID3D11HullShader_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11HullShader_Wrapper_map_); } + + ID3D11DomainShader_Wrapper* GetID3D11DomainShader_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11DomainShader_Wrapper_map_); } + const ID3D11DomainShader_Wrapper* GetID3D11DomainShader_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11DomainShader_Wrapper_map_); } + + ID3D11GeometryShader_Wrapper* GetID3D11GeometryShader_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11GeometryShader_Wrapper_map_); } + const ID3D11GeometryShader_Wrapper* GetID3D11GeometryShader_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11GeometryShader_Wrapper_map_); } + + ID3D11PixelShader_Wrapper* GetID3D11PixelShader_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11PixelShader_Wrapper_map_); } + const ID3D11PixelShader_Wrapper* GetID3D11PixelShader_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11PixelShader_Wrapper_map_); } + + ID3D11ComputeShader_Wrapper* GetID3D11ComputeShader_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11ComputeShader_Wrapper_map_); } + const ID3D11ComputeShader_Wrapper* GetID3D11ComputeShader_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11ComputeShader_Wrapper_map_); } + + ID3D11InputLayout_Wrapper* GetID3D11InputLayout_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11InputLayout_Wrapper_map_); } + const ID3D11InputLayout_Wrapper* GetID3D11InputLayout_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11InputLayout_Wrapper_map_); } + + ID3D11SamplerState_Wrapper* GetID3D11SamplerState_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11SamplerState_Wrapper_map_); } + const ID3D11SamplerState_Wrapper* GetID3D11SamplerState_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11SamplerState_Wrapper_map_); } + + ID3D11Predicate_Wrapper* GetID3D11Predicate_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11Predicate_Wrapper_map_); } + const ID3D11Predicate_Wrapper* GetID3D11Predicate_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11Predicate_Wrapper_map_); } + + ID3D11Counter_Wrapper* GetID3D11Counter_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11Counter_Wrapper_map_); } + const ID3D11Counter_Wrapper* GetID3D11Counter_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11Counter_Wrapper_map_); } + + ID3D11ClassInstance_Wrapper* GetID3D11ClassInstance_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11ClassInstance_Wrapper_map_); } + const ID3D11ClassInstance_Wrapper* GetID3D11ClassInstance_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11ClassInstance_Wrapper_map_); } + + ID3D11ClassLinkage_Wrapper* GetID3D11ClassLinkage_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11ClassLinkage_Wrapper_map_); } + const ID3D11ClassLinkage_Wrapper* GetID3D11ClassLinkage_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11ClassLinkage_Wrapper_map_); } + + ID3D11CommandList_Wrapper* GetID3D11CommandList_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11CommandList_Wrapper_map_); } + const ID3D11CommandList_Wrapper* GetID3D11CommandList_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11CommandList_Wrapper_map_); } + + ID3D11VideoDecoder_Wrapper* GetID3D11VideoDecoder_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11VideoDecoder_Wrapper_map_); } + const ID3D11VideoDecoder_Wrapper* GetID3D11VideoDecoder_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11VideoDecoder_Wrapper_map_); } + + ID3D11VideoProcessor_Wrapper* GetID3D11VideoProcessor_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11VideoProcessor_Wrapper_map_); } + const ID3D11VideoProcessor_Wrapper* GetID3D11VideoProcessor_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11VideoProcessor_Wrapper_map_); } + + ID3D11AuthenticatedChannel_Wrapper* GetID3D11AuthenticatedChannel_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11AuthenticatedChannel_Wrapper_map_); } + const ID3D11AuthenticatedChannel_Wrapper* GetID3D11AuthenticatedChannel_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11AuthenticatedChannel_Wrapper_map_); } + + ID3D11CryptoSession_Wrapper* GetID3D11CryptoSession_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11CryptoSession_Wrapper_map_); } + const ID3D11CryptoSession_Wrapper* GetID3D11CryptoSession_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11CryptoSession_Wrapper_map_); } + + ID3D11VideoDecoderOutputView_Wrapper* GetID3D11VideoDecoderOutputView_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11VideoDecoderOutputView_Wrapper_map_); } + const ID3D11VideoDecoderOutputView_Wrapper* GetID3D11VideoDecoderOutputView_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11VideoDecoderOutputView_Wrapper_map_); } + + ID3D11VideoProcessorInputView_Wrapper* GetID3D11VideoProcessorInputView_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11VideoProcessorInputView_Wrapper_map_); } + const ID3D11VideoProcessorInputView_Wrapper* GetID3D11VideoProcessorInputView_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11VideoProcessorInputView_Wrapper_map_); } + + ID3D11VideoProcessorOutputView_Wrapper* GetID3D11VideoProcessorOutputView_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11VideoProcessorOutputView_Wrapper_map_); } + const ID3D11VideoProcessorOutputView_Wrapper* GetID3D11VideoProcessorOutputView_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11VideoProcessorOutputView_Wrapper_map_); } + + ID3D11BlendState_Wrapper* GetID3D11BlendState_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11BlendState_Wrapper_map_); } + const ID3D11BlendState_Wrapper* GetID3D11BlendState_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11BlendState_Wrapper_map_); } + + ID3DDeviceContextState_Wrapper* GetID3DDeviceContextState_Wrapper(format::HandleId id) { return GetWrapper(id, ID3DDeviceContextState_Wrapper_map_); } + const ID3DDeviceContextState_Wrapper* GetID3DDeviceContextState_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3DDeviceContextState_Wrapper_map_); } + + ID3D11VideoProcessorEnumerator_Wrapper* GetID3D11VideoProcessorEnumerator_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11VideoProcessorEnumerator_Wrapper_map_); } + const ID3D11VideoProcessorEnumerator_Wrapper* GetID3D11VideoProcessorEnumerator_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11VideoProcessorEnumerator_Wrapper_map_); } + + ID3DUserDefinedAnnotation_Wrapper* GetID3DUserDefinedAnnotation_Wrapper(format::HandleId id) { return GetWrapper(id, ID3DUserDefinedAnnotation_Wrapper_map_); } + const ID3DUserDefinedAnnotation_Wrapper* GetID3DUserDefinedAnnotation_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3DUserDefinedAnnotation_Wrapper_map_); } + + ID3D11Texture2D_Wrapper* GetID3D11Texture2D_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11Texture2D_Wrapper_map_); } + const ID3D11Texture2D_Wrapper* GetID3D11Texture2D_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11Texture2D_Wrapper_map_); } + + ID3D11Texture3D_Wrapper* GetID3D11Texture3D_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11Texture3D_Wrapper_map_); } + const ID3D11Texture3D_Wrapper* GetID3D11Texture3D_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11Texture3D_Wrapper_map_); } + + ID3D11RasterizerState_Wrapper* GetID3D11RasterizerState_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11RasterizerState_Wrapper_map_); } + const ID3D11RasterizerState_Wrapper* GetID3D11RasterizerState_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11RasterizerState_Wrapper_map_); } + + ID3D11ShaderResourceView_Wrapper* GetID3D11ShaderResourceView_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11ShaderResourceView_Wrapper_map_); } + const ID3D11ShaderResourceView_Wrapper* GetID3D11ShaderResourceView_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11ShaderResourceView_Wrapper_map_); } + + ID3D11RenderTargetView_Wrapper* GetID3D11RenderTargetView_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11RenderTargetView_Wrapper_map_); } + const ID3D11RenderTargetView_Wrapper* GetID3D11RenderTargetView_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11RenderTargetView_Wrapper_map_); } + + ID3D11UnorderedAccessView_Wrapper* GetID3D11UnorderedAccessView_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11UnorderedAccessView_Wrapper_map_); } + const ID3D11UnorderedAccessView_Wrapper* GetID3D11UnorderedAccessView_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11UnorderedAccessView_Wrapper_map_); } + + ID3D11Query_Wrapper* GetID3D11Query_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11Query_Wrapper_map_); } + const ID3D11Query_Wrapper* GetID3D11Query_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11Query_Wrapper_map_); } + + ID3D11Fence_Wrapper* GetID3D11Fence_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11Fence_Wrapper_map_); } + const ID3D11Fence_Wrapper* GetID3D11Fence_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11Fence_Wrapper_map_); } + + ID3D11DeviceContext_Wrapper* GetID3D11DeviceContext_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11DeviceContext_Wrapper_map_); } + const ID3D11DeviceContext_Wrapper* GetID3D11DeviceContext_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11DeviceContext_Wrapper_map_); } + + ID3D11Device_Wrapper* GetID3D11Device_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11Device_Wrapper_map_); } + const ID3D11Device_Wrapper* GetID3D11Device_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11Device_Wrapper_map_); } + + ID3D11Multithread_Wrapper* GetID3D11Multithread_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11Multithread_Wrapper_map_); } + const ID3D11Multithread_Wrapper* GetID3D11Multithread_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11Multithread_Wrapper_map_); } + + ID3D11VideoDevice_Wrapper* GetID3D11VideoDevice_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11VideoDevice_Wrapper_map_); } + const ID3D11VideoDevice_Wrapper* GetID3D11VideoDevice_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11VideoDevice_Wrapper_map_); } + + ID3D11VideoContext_Wrapper* GetID3D11VideoContext_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11VideoContext_Wrapper_map_); } + const ID3D11VideoContext_Wrapper* GetID3D11VideoContext_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11VideoContext_Wrapper_map_); } + + ID3D11On12Device_Wrapper* GetID3D11On12Device_Wrapper(format::HandleId id) { return GetWrapper(id, ID3D11On12Device_Wrapper_map_); } + const ID3D11On12Device_Wrapper* GetID3D11On12Device_Wrapper(format::HandleId id) const { return GetWrapper(id, ID3D11On12Device_Wrapper_map_); } + private: std::map IDXGIKeyedMutex_Wrapper_map_; @@ -447,6 +699,48 @@ class Dx12StateTable : public Dx12StateTableBase std::map ID3D12SharingContract_Wrapper_map_; std::map ID3D12ManualWriteTrackingResource_Wrapper_map_; std::map ID3D12InfoQueue_Wrapper_map_; + std::map ID3D11DepthStencilState_Wrapper_map_; + std::map ID3D11Buffer_Wrapper_map_; + std::map ID3D11Texture1D_Wrapper_map_; + std::map ID3D11DepthStencilView_Wrapper_map_; + std::map ID3D11VertexShader_Wrapper_map_; + std::map ID3D11HullShader_Wrapper_map_; + std::map ID3D11DomainShader_Wrapper_map_; + std::map ID3D11GeometryShader_Wrapper_map_; + std::map ID3D11PixelShader_Wrapper_map_; + std::map ID3D11ComputeShader_Wrapper_map_; + std::map ID3D11InputLayout_Wrapper_map_; + std::map ID3D11SamplerState_Wrapper_map_; + std::map ID3D11Predicate_Wrapper_map_; + std::map ID3D11Counter_Wrapper_map_; + std::map ID3D11ClassInstance_Wrapper_map_; + std::map ID3D11ClassLinkage_Wrapper_map_; + std::map ID3D11CommandList_Wrapper_map_; + std::map ID3D11VideoDecoder_Wrapper_map_; + std::map ID3D11VideoProcessor_Wrapper_map_; + std::map ID3D11AuthenticatedChannel_Wrapper_map_; + std::map ID3D11CryptoSession_Wrapper_map_; + std::map ID3D11VideoDecoderOutputView_Wrapper_map_; + std::map ID3D11VideoProcessorInputView_Wrapper_map_; + std::map ID3D11VideoProcessorOutputView_Wrapper_map_; + std::map ID3D11BlendState_Wrapper_map_; + std::map ID3DDeviceContextState_Wrapper_map_; + std::map ID3D11VideoProcessorEnumerator_Wrapper_map_; + std::map ID3DUserDefinedAnnotation_Wrapper_map_; + std::map ID3D11Texture2D_Wrapper_map_; + std::map ID3D11Texture3D_Wrapper_map_; + std::map ID3D11RasterizerState_Wrapper_map_; + std::map ID3D11ShaderResourceView_Wrapper_map_; + std::map ID3D11RenderTargetView_Wrapper_map_; + std::map ID3D11UnorderedAccessView_Wrapper_map_; + std::map ID3D11Query_Wrapper_map_; + std::map ID3D11Fence_Wrapper_map_; + std::map ID3D11DeviceContext_Wrapper_map_; + std::map ID3D11Device_Wrapper_map_; + std::map ID3D11Multithread_Wrapper_map_; + std::map ID3D11VideoDevice_Wrapper_map_; + std::map ID3D11VideoContext_Wrapper_map_; + std::map ID3D11On12Device_Wrapper_map_; }; GFXRECON_END_NAMESPACE(encode) diff --git a/framework/generated/generated_dx12_struct_decoders.cpp b/framework/generated/generated_dx12_struct_decoders.cpp index a49e8c6aee..e4ed18dca0 100644 --- a/framework/generated/generated_dx12_struct_decoders.cpp +++ b/framework/generated/generated_dx12_struct_decoders.cpp @@ -4236,6 +4236,2442 @@ size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D12_INF return bytes_read; } +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_INPUT_ELEMENT_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_INPUT_ELEMENT_DESC* value = wrapper->decoded_value; + + bytes_read += wrapper->SemanticName.Decode((buffer + bytes_read), (buffer_size - bytes_read)); + value->SemanticName = wrapper->SemanticName.GetPointer(); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SemanticIndex)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->InputSlot)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->AlignedByteOffset)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->InputSlotClass)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->InstanceDataStepRate)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_SO_DECLARATION_ENTRY* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_SO_DECLARATION_ENTRY* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Stream)); + bytes_read += wrapper->SemanticName.Decode((buffer + bytes_read), (buffer_size - bytes_read)); + value->SemanticName = wrapper->SemanticName.GetPointer(); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SemanticIndex)); + bytes_read += ValueDecoder::DecodeUInt8Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StartComponent)); + bytes_read += ValueDecoder::DecodeUInt8Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ComponentCount)); + bytes_read += ValueDecoder::DecodeUInt8Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->OutputSlot)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIEWPORT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIEWPORT* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->TopLeftX)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->TopLeftY)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Width)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Height)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->MinDepth)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->MaxDepth)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_DRAW_INSTANCED_INDIRECT_ARGS* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_DRAW_INSTANCED_INDIRECT_ARGS* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->VertexCountPerInstance)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->InstanceCount)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StartVertexLocation)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StartInstanceLocation)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->IndexCountPerInstance)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->InstanceCount)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StartIndexLocation)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BaseVertexLocation)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StartInstanceLocation)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BOX* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_BOX* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->left)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->top)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->front)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->right)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->bottom)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->back)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_DEPTH_STENCILOP_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_DEPTH_STENCILOP_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->StencilFailOp)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->StencilDepthFailOp)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->StencilPassOp)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->StencilFunc)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_DEPTH_STENCIL_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_DEPTH_STENCIL_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthEnable)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthWriteMask)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthFunc)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StencilEnable)); + bytes_read += ValueDecoder::DecodeUInt8Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StencilReadMask)); + bytes_read += ValueDecoder::DecodeUInt8Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StencilWriteMask)); + wrapper->FrontFace = DecodeAllocator::Allocate(); + wrapper->FrontFace->decoded_value = &(value->FrontFace); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->FrontFace); + wrapper->BackFace = DecodeAllocator::Allocate(); + wrapper->BackFace->decoded_value = &(value->BackFace); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->BackFace); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RENDER_TARGET_BLEND_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_RENDER_TARGET_BLEND_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BlendEnable)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->SrcBlend)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->DestBlend)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->BlendOp)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->SrcBlendAlpha)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->DestBlendAlpha)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->BlendOpAlpha)); + bytes_read += ValueDecoder::DecodeUInt8Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->RenderTargetWriteMask)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BLEND_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_BLEND_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->AlphaToCoverageEnable)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->IndependentBlendEnable)); + wrapper->RenderTarget = DecodeAllocator::Allocate>(); + wrapper->RenderTarget->SetExternalMemory(value->RenderTarget, 8); + bytes_read += wrapper->RenderTarget->Decode((buffer + bytes_read), (buffer_size - bytes_read)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RASTERIZER_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_RASTERIZER_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->FillMode)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->CullMode)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FrontCounterClockwise)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthBias)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthBiasClamp)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->SlopeScaledDepthBias)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthClipEnable)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ScissorEnable)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MultisampleEnable)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->AntialiasedLineEnable)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_MAPPED_SUBRESOURCE* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_MAPPED_SUBRESOURCE* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->pData)); + value->pData = nullptr; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->RowPitch)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthPitch)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BUFFER_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_BUFFER_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ByteWidth)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Usage)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BindFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->CPUAccessFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MiscFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StructureByteStride)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEXTURE1D_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEXTURE1D_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Width)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLevels)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Usage)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BindFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->CPUAccessFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MiscFlags)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEXTURE2D_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEXTURE2D_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Width)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Height)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLevels)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + wrapper->SampleDesc = DecodeAllocator::Allocate(); + wrapper->SampleDesc->decoded_value = &(value->SampleDesc); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->SampleDesc); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Usage)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BindFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->CPUAccessFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MiscFlags)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEXTURE3D_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEXTURE3D_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Width)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Height)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Depth)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLevels)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Usage)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BindFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->CPUAccessFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MiscFlags)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BUFFEREX_SRV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_BUFFEREX_SRV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstElement)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumElements)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Flags)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_SRV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX1D_SRV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MostDetailedMip)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLevels)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_ARRAY_SRV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX1D_ARRAY_SRV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MostDetailedMip)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLevels)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_SRV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_SRV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MostDetailedMip)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLevels)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_SRV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_ARRAY_SRV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MostDetailedMip)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLevels)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX3D_SRV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX3D_SRV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MostDetailedMip)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLevels)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEXCUBE_SRV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEXCUBE_SRV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MostDetailedMip)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLevels)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEXCUBE_ARRAY_SRV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEXCUBE_ARRAY_SRV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MostDetailedMip)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLevels)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->First2DArrayFace)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumCubes)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2DMS_SRV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2DMS_SRV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->UnusedField_NothingToDefine)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2DMS_ARRAY_SRV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2DMS_ARRAY_SRV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_RTV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX1D_RTV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_ARRAY_RTV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX1D_ARRAY_RTV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_RTV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_RTV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2DMS_RTV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2DMS_RTV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->UnusedField_NothingToDefine)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_RTV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_ARRAY_RTV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2DMS_ARRAY_RTV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2DMS_ARRAY_RTV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX3D_RTV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX3D_RTV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstWSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->WSize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_DSV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX1D_DSV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_ARRAY_DSV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX1D_ARRAY_DSV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_DSV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_DSV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_DSV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_ARRAY_DSV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2DMS_DSV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2DMS_DSV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->UnusedField_NothingToDefine)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2DMS_ARRAY_DSV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2DMS_ARRAY_DSV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BUFFER_UAV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_BUFFER_UAV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstElement)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumElements)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Flags)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_UAV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX1D_UAV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_ARRAY_UAV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX1D_ARRAY_UAV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_UAV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_UAV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_UAV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_ARRAY_UAV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX3D_UAV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX3D_UAV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstWSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->WSize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_SAMPLER_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_SAMPLER_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Filter)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->AddressU)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->AddressV)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->AddressW)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLODBias)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MaxAnisotropy)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ComparisonFunc)); + wrapper->BorderColor.SetExternalMemory(value->BorderColor, 4); + bytes_read += wrapper->BorderColor.DecodeFloat((buffer + bytes_read), (buffer_size - bytes_read)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->MinLOD)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->MaxLOD)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_QUERY_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_QUERY_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Query)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MiscFlags)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_QUERY_DATA_TIMESTAMP_DISJOINT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_QUERY_DATA_TIMESTAMP_DISJOINT* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Frequency)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Disjoint)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_QUERY_DATA_PIPELINE_STATISTICS* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_QUERY_DATA_PIPELINE_STATISTICS* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->IAVertices)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->IAPrimitives)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->VSInvocations)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->GSInvocations)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->GSPrimitives)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->CInvocations)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->CPrimitives)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PSInvocations)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->HSInvocations)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DSInvocations)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->CSInvocations)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_QUERY_DATA_SO_STATISTICS* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_QUERY_DATA_SO_STATISTICS* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumPrimitivesWritten)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PrimitivesStorageNeeded)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_COUNTER_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_COUNTER_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Counter)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MiscFlags)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_COUNTER_INFO* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_COUNTER_INFO* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->LastDeviceDependentCounter)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumSimultaneousCounters)); + bytes_read += ValueDecoder::DecodeUInt8Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumDetectableParallelUnits)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_CLASS_INSTANCE_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_CLASS_INSTANCE_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->InstanceId)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->InstanceIndex)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->TypeId)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConstantBuffer)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BaseConstantBufferOffset)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BaseTexture)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BaseSampler)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Created)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_THREADING* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_THREADING* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DriverConcurrentCreates)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DriverCommandLists)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_DOUBLES* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_DOUBLES* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DoublePrecisionFloatShaderOps)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_FORMAT_SUPPORT* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->InFormat)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->OutFormatSupport)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT2* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_FORMAT_SUPPORT2* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->InFormat)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->OutFormatSupport2)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_D3D11_OPTIONS* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->OutputMergerLogicOp)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->UAVOnlyRenderingForcedSampleCount)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DiscardAPIsSeenByDriver)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FlagsForUpdateAndCopySeenByDriver)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ClearView)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->CopyWithOverlap)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConstantBufferPartialUpdate)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConstantBufferOffsetting)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MapNoOverwriteOnDynamicConstantBuffer)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MapNoOverwriteOnDynamicBufferSRV)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MultisampleRTVWithForcedSampleCountOne)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SAD4ShaderInstructions)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ExtendedDoublesShaderInstructions)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ExtendedResourceSharing)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_ARCHITECTURE_INFO* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_ARCHITECTURE_INFO* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->TileBasedDeferredRenderer)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_D3D9_OPTIONS* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FullNonPow2TextureSupport)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SupportsDepthAsTextureWithLessEqualComparisonFilter)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PixelShaderMinPrecision)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->AllOtherShaderStagesMinPrecision)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_D3D11_OPTIONS1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->TiledResourcesTier)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MinMaxFiltering)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ClearViewAlsoSupportsDepthOnlyFormats)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MapOnDefaultBuffers)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SimpleInstancingSupported)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_MARKER_SUPPORT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_MARKER_SUPPORT* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Profile)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_D3D9_OPTIONS1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FullNonPow2TextureSupported)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthAsTextureWithLessEqualComparisonFilterSupported)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SimpleInstancingSupported)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->TextureCubeFaceRenderTargetWithNonCubeDepthStencilSupported)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS2* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_D3D11_OPTIONS2* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PSSpecifiedStencilRefSupported)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->TypedUAVLoadAdditionalFormats)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ROVsSupported)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConservativeRasterizationTier)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->TiledResourcesTier)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MapOnDefaultTextures)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StandardSwizzle)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->UnifiedMemoryArchitecture)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS3* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_D3D11_OPTIONS3* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->VPAndRTArrayIndexFromAnyShaderFeedingRasterizer)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MaxGPUVirtualAddressBitsPerResource)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MaxGPUVirtualAddressBitsPerProcess)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_SHADER_CACHE* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_SHADER_CACHE* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SupportFlags)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS5* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_D3D11_OPTIONS5* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->SharedResourceTier)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_CD3D11_VIDEO_DEFAULT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + CD3D11_VIDEO_DEFAULT* value = wrapper->decoded_value; + + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_DECODER_DESC* value = wrapper->decoded_value; + + wrapper->Guid = DecodeAllocator::Allocate(); + wrapper->Guid->decoded_value = &(value->Guid); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Guid); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SampleWidth)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SampleHeight)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->OutputFormat)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_CONFIG* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_DECODER_CONFIG* value = wrapper->decoded_value; + + wrapper->guidConfigBitstreamEncryption = DecodeAllocator::Allocate(); + wrapper->guidConfigBitstreamEncryption->decoded_value = &(value->guidConfigBitstreamEncryption); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->guidConfigBitstreamEncryption); + wrapper->guidConfigMBcontrolEncryption = DecodeAllocator::Allocate(); + wrapper->guidConfigMBcontrolEncryption->decoded_value = &(value->guidConfigMBcontrolEncryption); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->guidConfigMBcontrolEncryption); + wrapper->guidConfigResidDiffEncryption = DecodeAllocator::Allocate(); + wrapper->guidConfigResidDiffEncryption->decoded_value = &(value->guidConfigResidDiffEncryption); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->guidConfigResidDiffEncryption); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConfigBitstreamRaw)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConfigMBcontrolRasterOrder)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConfigResidDiffHost)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConfigSpatialResid8)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConfigResid8Subtraction)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConfigSpatialHost8or9Clipping)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConfigSpatialResidInterleaved)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConfigIntraResidUnsigned)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConfigResidDiffAccelerator)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConfigHostInverseScan)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConfigSpecificIDCT)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Config4GroupedCoefs)); + bytes_read += ValueDecoder::DecodeUInt16Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConfigMinRenderTargetBuffCount)); + bytes_read += ValueDecoder::DecodeUInt16Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConfigDecoderSpecific)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AES_CTR_IV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AES_CTR_IV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->IV)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Count)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_ENCRYPTED_BLOCK_INFO* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_ENCRYPTED_BLOCK_INFO* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumEncryptedBytesAtBeginning)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumBytesInSkipPattern)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumBytesInEncryptPattern)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_DECODER_BUFFER_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->BufferType)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BufferIndex)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DataOffset)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DataSize)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstMBaddress)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumMBsInBuffer)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Width)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Height)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Stride)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ReservedBits)); + bytes_read += wrapper->pIV.DecodeVoid((buffer + bytes_read), (buffer_size - bytes_read)); + value->pIV = wrapper->pIV.GetPointer(); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->IVSize)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PartialEncryption)); + wrapper->EncryptedBlockInfo = DecodeAllocator::Allocate(); + wrapper->EncryptedBlockInfo->decoded_value = &(value->EncryptedBlockInfo); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->EncryptedBlockInfo); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_EXTENSION* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_DECODER_EXTENSION* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Function)); + bytes_read += wrapper->pPrivateInputData.DecodeVoid((buffer + bytes_read), (buffer_size - bytes_read)); + value->pPrivateInputData = wrapper->pPrivateInputData.GetPointer(); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PrivateInputDataSize)); + bytes_read += wrapper->pPrivateOutputData.DecodeVoid((buffer + bytes_read), (buffer_size - bytes_read)); + value->pPrivateOutputData = wrapper->pPrivateOutputData.GetPointer(); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PrivateOutputDataSize)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ResourceCount)); + bytes_read += wrapper->ppResourceList.Decode((buffer + bytes_read), (buffer_size - bytes_read)); + value->ppResourceList = nullptr; + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_CAPS* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_PROCESSOR_CAPS* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DeviceCaps)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FeatureCaps)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FilterCaps)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->InputFormatCaps)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->AutoStreamCaps)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StereoCaps)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->RateConversionCapsCount)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MaxInputStreams)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MaxStreamStates)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PastFrames)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FutureFrames)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ProcessorCaps)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ITelecineCaps)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->CustomRateCount)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_CONTENT_PROTECTION_CAPS* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_CONTENT_PROTECTION_CAPS* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Caps)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->KeyExchangeTypeCount)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BlockAlignmentSize)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ProtectedMemorySize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_CUSTOM_RATE* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_PROCESSOR_CUSTOM_RATE* value = wrapper->decoded_value; + + wrapper->CustomRate = DecodeAllocator::Allocate(); + wrapper->CustomRate->decoded_value = &(value->CustomRate); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->CustomRate); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->OutputFrames)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->InputInterlaced)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->InputFramesOrFields)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_FILTER_RANGE* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_PROCESSOR_FILTER_RANGE* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Minimum)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Maximum)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Default)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Multiplier)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_CONTENT_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_PROCESSOR_CONTENT_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->InputFrameFormat)); + wrapper->InputFrameRate = DecodeAllocator::Allocate(); + wrapper->InputFrameRate->decoded_value = &(value->InputFrameRate); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->InputFrameRate); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->InputWidth)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->InputHeight)); + wrapper->OutputFrameRate = DecodeAllocator::Allocate(); + wrapper->OutputFrameRate->decoded_value = &(value->OutputFrameRate); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->OutputFrameRate); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->OutputWidth)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->OutputHeight)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Usage)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_COLOR_RGBA* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_COLOR_RGBA* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->R)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->G)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->B)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->A)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_COLOR_YCbCrA* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_COLOR_YCbCrA* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Y)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Cb)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Cr)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->A)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_COLOR_SPACE* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_PROCESSOR_COLOR_SPACE* value = wrapper->decoded_value; + + UINT temp_Usage; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &temp_Usage); + value->Usage = temp_Usage; + UINT temp_RGB_Range; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &temp_RGB_Range); + value->RGB_Range = temp_RGB_Range; + UINT temp_YCbCr_Matrix; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &temp_YCbCr_Matrix); + value->YCbCr_Matrix = temp_YCbCr_Matrix; + UINT temp_YCbCr_xvYCC; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &temp_YCbCr_xvYCC); + value->YCbCr_xvYCC = temp_YCbCr_xvYCC; + UINT temp_Nominal_Range; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &temp_Nominal_Range); + value->Nominal_Range = temp_Nominal_Range; + UINT temp_Reserved; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &temp_Reserved); + value->Reserved = temp_Reserved; + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_STREAM* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_PROCESSOR_STREAM* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Enable)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->OutputIndex)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->InputFrameOrField)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PastFrames)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FutureFrames)); + bytes_read += wrapper->ppPastSurfaces.Decode((buffer + bytes_read), (buffer_size - bytes_read)); + value->ppPastSurfaces = nullptr; + bytes_read += ValueDecoder::DecodeHandleIdValue((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->pInputSurface)); + value->pInputSurface = nullptr; + bytes_read += wrapper->ppFutureSurfaces.Decode((buffer + bytes_read), (buffer_size - bytes_read)); + value->ppFutureSurfaces = nullptr; + bytes_read += wrapper->ppPastSurfacesRight.Decode((buffer + bytes_read), (buffer_size - bytes_read)); + value->ppPastSurfacesRight = nullptr; + bytes_read += ValueDecoder::DecodeHandleIdValue((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->pInputSurfaceRight)); + value->pInputSurfaceRight = nullptr; + bytes_read += wrapper->ppFutureSurfacesRight.Decode((buffer + bytes_read), (buffer_size - bytes_read)); + value->ppFutureSurfacesRight = nullptr; + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_OMAC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_OMAC* value = wrapper->decoded_value; + + wrapper->Omac.SetExternalMemory(value->Omac, 16); + bytes_read += wrapper->Omac.DecodeUInt8((buffer + bytes_read), (buffer_size - bytes_read)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_INPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_INPUT* value = wrapper->decoded_value; + + wrapper->QueryType = DecodeAllocator::Allocate(); + wrapper->QueryType->decoded_value = &(value->QueryType); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->QueryType); + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->hChannel)); + value->hChannel = nullptr; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SequenceNumber)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_OUTPUT* value = wrapper->decoded_value; + + wrapper->omac = DecodeAllocator::Allocate(); + wrapper->omac->decoded_value = &(value->omac); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->omac); + wrapper->QueryType = DecodeAllocator::Allocate(); + wrapper->QueryType->decoded_value = &(value->QueryType); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->QueryType); + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->hChannel)); + value->hChannel = nullptr; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SequenceNumber)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ReturnCode)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT* value = wrapper->decoded_value; + + wrapper->Output = DecodeAllocator::Allocate(); + wrapper->Output->decoded_value = &(value->Output); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Output); + wrapper->ProtectionFlags = DecodeAllocator::Allocate(); + wrapper->ProtectionFlags->decoded_value = &(value->ProtectionFlags); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->ProtectionFlags); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT* value = wrapper->decoded_value; + + wrapper->Output = DecodeAllocator::Allocate(); + wrapper->Output->decoded_value = &(value->Output); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Output); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ChannelType)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT* value = wrapper->decoded_value; + + wrapper->Output = DecodeAllocator::Allocate(); + wrapper->Output->decoded_value = &(value->Output); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Output); + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->DeviceHandle)); + value->DeviceHandle = nullptr; + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT* value = wrapper->decoded_value; + + wrapper->Input = DecodeAllocator::Allocate(); + wrapper->Input->decoded_value = &(value->Input); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Input); + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->DecoderHandle)); + value->DecoderHandle = nullptr; + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT* value = wrapper->decoded_value; + + wrapper->Output = DecodeAllocator::Allocate(); + wrapper->Output->decoded_value = &(value->Output); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Output); + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->DecoderHandle)); + value->DecoderHandle = nullptr; + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->CryptoSessionHandle)); + value->CryptoSessionHandle = nullptr; + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->DeviceHandle)); + value->DeviceHandle = nullptr; + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT* value = wrapper->decoded_value; + + wrapper->Output = DecodeAllocator::Allocate(); + wrapper->Output->decoded_value = &(value->Output); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Output); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->RestrictedSharedResourceProcessCount)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT* value = wrapper->decoded_value; + + wrapper->Input = DecodeAllocator::Allocate(); + wrapper->Input->decoded_value = &(value->Input); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Input); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ProcessIndex)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT* value = wrapper->decoded_value; + + wrapper->Output = DecodeAllocator::Allocate(); + wrapper->Output->decoded_value = &(value->Output); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Output); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ProcessIndex)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ProcessIdentifier)); + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->ProcessHandle)); + value->ProcessHandle = nullptr; + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT* value = wrapper->decoded_value; + + wrapper->Output = DecodeAllocator::Allocate(); + wrapper->Output->decoded_value = &(value->Output); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Output); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->UnrestrictedProtectedSharedResourceCount)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT* value = wrapper->decoded_value; + + wrapper->Input = DecodeAllocator::Allocate(); + wrapper->Input->decoded_value = &(value->Input); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Input); + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->DeviceHandle)); + value->DeviceHandle = nullptr; + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->CryptoSessionHandle)); + value->CryptoSessionHandle = nullptr; + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT* value = wrapper->decoded_value; + + wrapper->Output = DecodeAllocator::Allocate(); + wrapper->Output->decoded_value = &(value->Output); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Output); + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->DeviceHandle)); + value->DeviceHandle = nullptr; + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->CryptoSessionHandle)); + value->CryptoSessionHandle = nullptr; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->OutputIDCount)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT* value = wrapper->decoded_value; + + wrapper->Input = DecodeAllocator::Allocate(); + wrapper->Input->decoded_value = &(value->Input); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Input); + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->DeviceHandle)); + value->DeviceHandle = nullptr; + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->CryptoSessionHandle)); + value->CryptoSessionHandle = nullptr; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->OutputIDIndex)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT* value = wrapper->decoded_value; + + wrapper->Output = DecodeAllocator::Allocate(); + wrapper->Output->decoded_value = &(value->Output); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Output); + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->DeviceHandle)); + value->DeviceHandle = nullptr; + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->CryptoSessionHandle)); + value->CryptoSessionHandle = nullptr; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->OutputIDIndex)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->OutputID)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT* value = wrapper->decoded_value; + + wrapper->Output = DecodeAllocator::Allocate(); + wrapper->Output->decoded_value = &(value->Output); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Output); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->BusType)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->AccessibleInContiguousBlocks)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->AccessibleInNonContiguousBlocks)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT* value = wrapper->decoded_value; + + wrapper->Output = DecodeAllocator::Allocate(); + wrapper->Output->decoded_value = &(value->Output); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Output); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->EncryptionGuidCount)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT* value = wrapper->decoded_value; + + wrapper->Input = DecodeAllocator::Allocate(); + wrapper->Input->decoded_value = &(value->Input); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Input); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->EncryptionGuidIndex)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT* value = wrapper->decoded_value; + + wrapper->Output = DecodeAllocator::Allocate(); + wrapper->Output->decoded_value = &(value->Output); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Output); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->EncryptionGuidIndex)); + wrapper->EncryptionGuid = DecodeAllocator::Allocate(); + wrapper->EncryptionGuid->decoded_value = &(value->EncryptionGuid); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->EncryptionGuid); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT* value = wrapper->decoded_value; + + wrapper->Output = DecodeAllocator::Allocate(); + wrapper->Output->decoded_value = &(value->Output); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Output); + wrapper->EncryptionGuid = DecodeAllocator::Allocate(); + wrapper->EncryptionGuid->decoded_value = &(value->EncryptionGuid); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->EncryptionGuid); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_CONFIGURE_INPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_CONFIGURE_INPUT* value = wrapper->decoded_value; + + wrapper->omac = DecodeAllocator::Allocate(); + wrapper->omac->decoded_value = &(value->omac); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->omac); + wrapper->ConfigureType = DecodeAllocator::Allocate(); + wrapper->ConfigureType->decoded_value = &(value->ConfigureType); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->ConfigureType); + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->hChannel)); + value->hChannel = nullptr; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SequenceNumber)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_CONFIGURE_OUTPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_CONFIGURE_OUTPUT* value = wrapper->decoded_value; + + wrapper->omac = DecodeAllocator::Allocate(); + wrapper->omac->decoded_value = &(value->omac); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->omac); + wrapper->ConfigureType = DecodeAllocator::Allocate(); + wrapper->ConfigureType->decoded_value = &(value->ConfigureType); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->ConfigureType); + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->hChannel)); + value->hChannel = nullptr; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SequenceNumber)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ReturnCode)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT* value = wrapper->decoded_value; + + wrapper->Parameters = DecodeAllocator::Allocate(); + wrapper->Parameters->decoded_value = &(value->Parameters); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Parameters); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StartSequenceQuery)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StartSequenceConfigure)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT* value = wrapper->decoded_value; + + wrapper->Parameters = DecodeAllocator::Allocate(); + wrapper->Parameters->decoded_value = &(value->Parameters); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Parameters); + wrapper->Protections = DecodeAllocator::Allocate(); + wrapper->Protections->decoded_value = &(value->Protections); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Protections); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT* value = wrapper->decoded_value; + + wrapper->Parameters = DecodeAllocator::Allocate(); + wrapper->Parameters->decoded_value = &(value->Parameters); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Parameters); + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->DecoderHandle)); + value->DecoderHandle = nullptr; + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->CryptoSessionHandle)); + value->CryptoSessionHandle = nullptr; + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->DeviceHandle)); + value->DeviceHandle = nullptr; + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT* value = wrapper->decoded_value; + + wrapper->Parameters = DecodeAllocator::Allocate(); + wrapper->Parameters->decoded_value = &(value->Parameters); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Parameters); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ProcessType)); + bytes_read += ValueDecoder::DecodeAddress((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->ProcessHandle)); + value->ProcessHandle = nullptr; + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->AllowAccess)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT* value = wrapper->decoded_value; + + wrapper->Parameters = DecodeAllocator::Allocate(); + wrapper->Parameters->decoded_value = &(value->Parameters); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->Parameters); + wrapper->EncryptionGuid = DecodeAllocator::Allocate(); + wrapper->EncryptionGuid->decoded_value = &(value->EncryptionGuid); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->EncryptionGuid); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_VDOV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_VDOV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_VPIV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_VPIV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_VPOV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_VPOV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_VPOV* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_ARRAY_VPOV* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RENDER_TARGET_BLEND_DESC1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_RENDER_TARGET_BLEND_DESC1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BlendEnable)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->LogicOpEnable)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->SrcBlend)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->DestBlend)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->BlendOp)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->SrcBlendAlpha)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->DestBlendAlpha)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->BlendOpAlpha)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->LogicOp)); + bytes_read += ValueDecoder::DecodeUInt8Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->RenderTargetWriteMask)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BLEND_DESC1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_BLEND_DESC1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->AlphaToCoverageEnable)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->IndependentBlendEnable)); + wrapper->RenderTarget = DecodeAllocator::Allocate>(); + wrapper->RenderTarget->SetExternalMemory(value->RenderTarget, 8); + bytes_read += wrapper->RenderTarget->Decode((buffer + bytes_read), (buffer_size - bytes_read)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RASTERIZER_DESC1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_RASTERIZER_DESC1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->FillMode)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->CullMode)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FrontCounterClockwise)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthBias)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthBiasClamp)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->SlopeScaledDepthBias)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthClipEnable)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ScissorEnable)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MultisampleEnable)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->AntialiasedLineEnable)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ForcedSampleCount)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ClearSize)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->EncryptedSize)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_DECODER_BUFFER_DESC1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->BufferType)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DataOffset)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DataSize)); + bytes_read += wrapper->pIV.DecodeVoid((buffer + bytes_read), (buffer_size - bytes_read)); + value->pIV = wrapper->pIV.GetPointer(); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->IVSize)); + wrapper->pSubSampleMappingBlock = DecodeAllocator::Allocate>(); + bytes_read += wrapper->pSubSampleMappingBlock->Decode((buffer + bytes_read), (buffer_size - bytes_read)); + value->pSubSampleMappingBlock = wrapper->pSubSampleMappingBlock->GetPointer(); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SubSampleMappingCount)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeHandleIdValue((buffer + bytes_read), (buffer_size - bytes_read), &(wrapper->pCryptoSession)); + value->pCryptoSession = nullptr; + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BlobSize)); + bytes_read += wrapper->pBlob.DecodeVoid((buffer + bytes_read), (buffer_size - bytes_read)); + value->pBlob = wrapper->pBlob.GetPointer(); + wrapper->pKeyInfoId = DecodeAllocator::Allocate>(); + bytes_read += wrapper->pKeyInfoId->Decode((buffer + bytes_read), (buffer_size - bytes_read)); + value->pKeyInfoId = wrapper->pKeyInfoId->GetPointer(); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PrivateDataSize)); + bytes_read += wrapper->pPrivateData.DecodeVoid((buffer + bytes_read), (buffer_size - bytes_read)); + value->pPrivateData = wrapper->pPrivateData.GetPointer(); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Enable)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Width)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Height)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PrivateDataSize)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->HWProtectionDataSize)); + wrapper->pbInput.SetExternalMemory(value->pbInput, 4); + bytes_read += wrapper->pbInput.DecodeUInt8((buffer + bytes_read), (buffer_size - bytes_read)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PrivateDataSize)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MaxHWProtectionDataSize)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->HWProtectionDataSize)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->TransportTime)); + bytes_read += ValueDecoder::DecodeUInt64Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ExecutionTime)); + wrapper->pbOutput.SetExternalMemory(value->pbOutput, 4); + bytes_read += wrapper->pbOutput.DecodeUInt8((buffer + bytes_read), (buffer_size - bytes_read)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->HWProtectionFunctionID)); + wrapper->pInputData = DecodeAllocator::Allocate>(); + bytes_read += wrapper->pInputData->Decode((buffer + bytes_read), (buffer_size - bytes_read)); + value->pInputData = wrapper->pInputData->GetPointer(); + wrapper->pOutputData = DecodeAllocator::Allocate>(); + bytes_read += wrapper->pOutputData->Decode((buffer + bytes_read), (buffer_size - bytes_read)); + value->pOutputData = wrapper->pOutputData->GetPointer(); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Status)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_SAMPLE_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_SAMPLE_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Width)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Height)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ColorSpace)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TILED_RESOURCE_COORDINATE* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TILED_RESOURCE_COORDINATE* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->X)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Y)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Z)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Subresource)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TILE_REGION_SIZE* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TILE_REGION_SIZE* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumTiles)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->bUseBox)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Width)); + bytes_read += ValueDecoder::DecodeUInt16Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Height)); + bytes_read += ValueDecoder::DecodeUInt16Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Depth)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_SUBRESOURCE_TILING* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_SUBRESOURCE_TILING* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->WidthInTiles)); + bytes_read += ValueDecoder::DecodeUInt16Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->HeightInTiles)); + bytes_read += ValueDecoder::DecodeUInt16Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthInTiles)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StartTileIndexInOverallResource)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TILE_SHAPE* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TILE_SHAPE* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->WidthInTexels)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->HeightInTexels)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthInTexels)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_PACKED_MIP_DESC* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_PACKED_MIP_DESC* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt8Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumStandardMips)); + bytes_read += ValueDecoder::DecodeUInt8Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumPackedMips)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->NumTilesForPackedMips)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StartTileIndexInOverallResource)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEXTURE2D_DESC1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEXTURE2D_DESC1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Width)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Height)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLevels)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + wrapper->SampleDesc = DecodeAllocator::Allocate(); + wrapper->SampleDesc->decoded_value = &(value->SampleDesc); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->SampleDesc); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Usage)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BindFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->CPUAccessFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MiscFlags)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->TextureLayout)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEXTURE3D_DESC1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEXTURE3D_DESC1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Width)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Height)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->Depth)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLevels)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Format)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Usage)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BindFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->CPUAccessFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MiscFlags)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->TextureLayout)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RASTERIZER_DESC2* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_RASTERIZER_DESC2* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->FillMode)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->CullMode)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FrontCounterClockwise)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthBias)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthBiasClamp)); + bytes_read += ValueDecoder::DecodeFloatValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->SlopeScaledDepthBias)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DepthClipEnable)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ScissorEnable)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MultisampleEnable)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->AntialiasedLineEnable)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ForcedSampleCount)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ConservativeRaster)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_SRV1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_SRV1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MostDetailedMip)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLevels)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PlaneSlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_SRV1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_ARRAY_SRV1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MostDetailedMip)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipLevels)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PlaneSlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_RTV1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_RTV1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PlaneSlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_RTV1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_ARRAY_RTV1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PlaneSlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_UAV1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_UAV1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PlaneSlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_UAV1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_TEX2D_ARRAY_UAV1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MipSlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->FirstArraySlice)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ArraySize)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->PlaneSlice)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_QUERY_DESC1* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_QUERY_DESC1* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Query)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MiscFlags)); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->ContextType)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_VIDEO_DECODER_HISTOGRAM* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_VIDEO_DECODER_HISTOGRAM* value = wrapper->decoded_value; + + wrapper->DecoderDesc = DecodeAllocator::Allocate(); + wrapper->DecoderDesc->decoded_value = &(value->DecoderDesc); + bytes_read += DecodeStruct((buffer + bytes_read), (buffer_size - bytes_read), wrapper->DecoderDesc); + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->Components)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BinCount)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->CounterBitDepth)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC2* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_VIDEO_DECODER_BUFFER_DESC2* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeEnumValue((buffer + bytes_read), (buffer_size - bytes_read), &(value->BufferType)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DataOffset)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->DataSize)); + bytes_read += wrapper->pIV.DecodeVoid((buffer + bytes_read), (buffer_size - bytes_read)); + value->pIV = wrapper->pIV.GetPointer(); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->IVSize)); + wrapper->pSubSampleMappingBlock = DecodeAllocator::Allocate>(); + bytes_read += wrapper->pSubSampleMappingBlock->Decode((buffer + bytes_read), (buffer_size - bytes_read)); + value->pSubSampleMappingBlock = wrapper->pSubSampleMappingBlock->GetPointer(); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->SubSampleMappingCount)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->cBlocksStripeEncrypted)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->cBlocksStripeClear)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS4* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_FEATURE_DATA_D3D11_OPTIONS4* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->ExtendedNV12SharedTextureSupported)); + + return bytes_read; +} + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RESOURCE_FLAGS* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + D3D11_RESOURCE_FLAGS* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->BindFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->MiscFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->CPUAccessFlags)); + bytes_read += ValueDecoder::DecodeUInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->StructureByteStride)); + + return bytes_read; +} + size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_GUID* wrapper) { assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); @@ -4280,6 +6716,19 @@ size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_tagPOINT* return bytes_read; } +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_tagSIZE* wrapper) +{ + assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); + + size_t bytes_read = 0; + tagSIZE* value = wrapper->decoded_value; + + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->cx)); + bytes_read += ValueDecoder::DecodeInt32Value((buffer + bytes_read), (buffer_size - bytes_read), &(value->cy)); + + return bytes_read; +} + size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded__SECURITY_ATTRIBUTES* wrapper) { assert((wrapper != nullptr) && (wrapper->decoded_value != nullptr)); diff --git a/framework/generated/generated_dx12_struct_decoders.h b/framework/generated/generated_dx12_struct_decoders.h index cbdcb42ee6..12ef34eb0d 100644 --- a/framework/generated/generated_dx12_struct_decoders.h +++ b/framework/generated/generated_dx12_struct_decoders.h @@ -40,6 +40,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -2179,6 +2185,1213 @@ struct Decoded_D3D12_INFO_QUEUE_FILTER Decoded_D3D12_INFO_QUEUE_FILTER_DESC* DenyList{ nullptr }; }; +struct Decoded_D3D11_INPUT_ELEMENT_DESC +{ + using struct_type = D3D11_INPUT_ELEMENT_DESC; + + D3D11_INPUT_ELEMENT_DESC* decoded_value{ nullptr }; + + StringDecoder SemanticName; +}; + +struct Decoded_D3D11_SO_DECLARATION_ENTRY +{ + using struct_type = D3D11_SO_DECLARATION_ENTRY; + + D3D11_SO_DECLARATION_ENTRY* decoded_value{ nullptr }; + + StringDecoder SemanticName; +}; + +struct Decoded_D3D11_VIEWPORT +{ + using struct_type = D3D11_VIEWPORT; + + D3D11_VIEWPORT* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_DRAW_INSTANCED_INDIRECT_ARGS +{ + using struct_type = D3D11_DRAW_INSTANCED_INDIRECT_ARGS; + + D3D11_DRAW_INSTANCED_INDIRECT_ARGS* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS +{ + using struct_type = D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS; + + D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_BOX +{ + using struct_type = D3D11_BOX; + + D3D11_BOX* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_DEPTH_STENCILOP_DESC +{ + using struct_type = D3D11_DEPTH_STENCILOP_DESC; + + D3D11_DEPTH_STENCILOP_DESC* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_DEPTH_STENCIL_DESC +{ + using struct_type = D3D11_DEPTH_STENCIL_DESC; + + D3D11_DEPTH_STENCIL_DESC* decoded_value{ nullptr }; + + Decoded_D3D11_DEPTH_STENCILOP_DESC* FrontFace{ nullptr }; + Decoded_D3D11_DEPTH_STENCILOP_DESC* BackFace{ nullptr }; +}; + +struct Decoded_D3D11_RENDER_TARGET_BLEND_DESC +{ + using struct_type = D3D11_RENDER_TARGET_BLEND_DESC; + + D3D11_RENDER_TARGET_BLEND_DESC* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_BLEND_DESC +{ + using struct_type = D3D11_BLEND_DESC; + + D3D11_BLEND_DESC* decoded_value{ nullptr }; + + StructPointerDecoder* RenderTarget{ nullptr }; +}; + +struct Decoded_D3D11_RASTERIZER_DESC +{ + using struct_type = D3D11_RASTERIZER_DESC; + + D3D11_RASTERIZER_DESC* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_MAPPED_SUBRESOURCE +{ + using struct_type = D3D11_MAPPED_SUBRESOURCE; + + D3D11_MAPPED_SUBRESOURCE* decoded_value{ nullptr }; + + uint64_t pData{ 0 }; +}; + +struct Decoded_D3D11_BUFFER_DESC +{ + using struct_type = D3D11_BUFFER_DESC; + + D3D11_BUFFER_DESC* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEXTURE1D_DESC +{ + using struct_type = D3D11_TEXTURE1D_DESC; + + D3D11_TEXTURE1D_DESC* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEXTURE2D_DESC +{ + using struct_type = D3D11_TEXTURE2D_DESC; + + D3D11_TEXTURE2D_DESC* decoded_value{ nullptr }; + + Decoded_DXGI_SAMPLE_DESC* SampleDesc{ nullptr }; +}; + +struct Decoded_D3D11_TEXTURE3D_DESC +{ + using struct_type = D3D11_TEXTURE3D_DESC; + + D3D11_TEXTURE3D_DESC* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_BUFFEREX_SRV +{ + using struct_type = D3D11_BUFFEREX_SRV; + + D3D11_BUFFEREX_SRV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX1D_SRV +{ + using struct_type = D3D11_TEX1D_SRV; + + D3D11_TEX1D_SRV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX1D_ARRAY_SRV +{ + using struct_type = D3D11_TEX1D_ARRAY_SRV; + + D3D11_TEX1D_ARRAY_SRV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_SRV +{ + using struct_type = D3D11_TEX2D_SRV; + + D3D11_TEX2D_SRV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_ARRAY_SRV +{ + using struct_type = D3D11_TEX2D_ARRAY_SRV; + + D3D11_TEX2D_ARRAY_SRV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX3D_SRV +{ + using struct_type = D3D11_TEX3D_SRV; + + D3D11_TEX3D_SRV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEXCUBE_SRV +{ + using struct_type = D3D11_TEXCUBE_SRV; + + D3D11_TEXCUBE_SRV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEXCUBE_ARRAY_SRV +{ + using struct_type = D3D11_TEXCUBE_ARRAY_SRV; + + D3D11_TEXCUBE_ARRAY_SRV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2DMS_SRV +{ + using struct_type = D3D11_TEX2DMS_SRV; + + D3D11_TEX2DMS_SRV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2DMS_ARRAY_SRV +{ + using struct_type = D3D11_TEX2DMS_ARRAY_SRV; + + D3D11_TEX2DMS_ARRAY_SRV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX1D_RTV +{ + using struct_type = D3D11_TEX1D_RTV; + + D3D11_TEX1D_RTV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX1D_ARRAY_RTV +{ + using struct_type = D3D11_TEX1D_ARRAY_RTV; + + D3D11_TEX1D_ARRAY_RTV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_RTV +{ + using struct_type = D3D11_TEX2D_RTV; + + D3D11_TEX2D_RTV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2DMS_RTV +{ + using struct_type = D3D11_TEX2DMS_RTV; + + D3D11_TEX2DMS_RTV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_ARRAY_RTV +{ + using struct_type = D3D11_TEX2D_ARRAY_RTV; + + D3D11_TEX2D_ARRAY_RTV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2DMS_ARRAY_RTV +{ + using struct_type = D3D11_TEX2DMS_ARRAY_RTV; + + D3D11_TEX2DMS_ARRAY_RTV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX3D_RTV +{ + using struct_type = D3D11_TEX3D_RTV; + + D3D11_TEX3D_RTV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX1D_DSV +{ + using struct_type = D3D11_TEX1D_DSV; + + D3D11_TEX1D_DSV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX1D_ARRAY_DSV +{ + using struct_type = D3D11_TEX1D_ARRAY_DSV; + + D3D11_TEX1D_ARRAY_DSV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_DSV +{ + using struct_type = D3D11_TEX2D_DSV; + + D3D11_TEX2D_DSV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_ARRAY_DSV +{ + using struct_type = D3D11_TEX2D_ARRAY_DSV; + + D3D11_TEX2D_ARRAY_DSV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2DMS_DSV +{ + using struct_type = D3D11_TEX2DMS_DSV; + + D3D11_TEX2DMS_DSV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2DMS_ARRAY_DSV +{ + using struct_type = D3D11_TEX2DMS_ARRAY_DSV; + + D3D11_TEX2DMS_ARRAY_DSV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_BUFFER_UAV +{ + using struct_type = D3D11_BUFFER_UAV; + + D3D11_BUFFER_UAV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX1D_UAV +{ + using struct_type = D3D11_TEX1D_UAV; + + D3D11_TEX1D_UAV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX1D_ARRAY_UAV +{ + using struct_type = D3D11_TEX1D_ARRAY_UAV; + + D3D11_TEX1D_ARRAY_UAV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_UAV +{ + using struct_type = D3D11_TEX2D_UAV; + + D3D11_TEX2D_UAV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_ARRAY_UAV +{ + using struct_type = D3D11_TEX2D_ARRAY_UAV; + + D3D11_TEX2D_ARRAY_UAV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX3D_UAV +{ + using struct_type = D3D11_TEX3D_UAV; + + D3D11_TEX3D_UAV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_SAMPLER_DESC +{ + using struct_type = D3D11_SAMPLER_DESC; + + D3D11_SAMPLER_DESC* decoded_value{ nullptr }; + + PointerDecoder BorderColor; +}; + +struct Decoded_D3D11_QUERY_DESC +{ + using struct_type = D3D11_QUERY_DESC; + + D3D11_QUERY_DESC* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_QUERY_DATA_TIMESTAMP_DISJOINT +{ + using struct_type = D3D11_QUERY_DATA_TIMESTAMP_DISJOINT; + + D3D11_QUERY_DATA_TIMESTAMP_DISJOINT* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_QUERY_DATA_PIPELINE_STATISTICS +{ + using struct_type = D3D11_QUERY_DATA_PIPELINE_STATISTICS; + + D3D11_QUERY_DATA_PIPELINE_STATISTICS* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_QUERY_DATA_SO_STATISTICS +{ + using struct_type = D3D11_QUERY_DATA_SO_STATISTICS; + + D3D11_QUERY_DATA_SO_STATISTICS* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_COUNTER_DESC +{ + using struct_type = D3D11_COUNTER_DESC; + + D3D11_COUNTER_DESC* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_COUNTER_INFO +{ + using struct_type = D3D11_COUNTER_INFO; + + D3D11_COUNTER_INFO* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_CLASS_INSTANCE_DESC +{ + using struct_type = D3D11_CLASS_INSTANCE_DESC; + + D3D11_CLASS_INSTANCE_DESC* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_THREADING +{ + using struct_type = D3D11_FEATURE_DATA_THREADING; + + D3D11_FEATURE_DATA_THREADING* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_DOUBLES +{ + using struct_type = D3D11_FEATURE_DATA_DOUBLES; + + D3D11_FEATURE_DATA_DOUBLES* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT +{ + using struct_type = D3D11_FEATURE_DATA_FORMAT_SUPPORT; + + D3D11_FEATURE_DATA_FORMAT_SUPPORT* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT2 +{ + using struct_type = D3D11_FEATURE_DATA_FORMAT_SUPPORT2; + + D3D11_FEATURE_DATA_FORMAT_SUPPORT2* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS +{ + using struct_type = D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS; + + D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS +{ + using struct_type = D3D11_FEATURE_DATA_D3D11_OPTIONS; + + D3D11_FEATURE_DATA_D3D11_OPTIONS* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_ARCHITECTURE_INFO +{ + using struct_type = D3D11_FEATURE_DATA_ARCHITECTURE_INFO; + + D3D11_FEATURE_DATA_ARCHITECTURE_INFO* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS +{ + using struct_type = D3D11_FEATURE_DATA_D3D9_OPTIONS; + + D3D11_FEATURE_DATA_D3D9_OPTIONS* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT +{ + using struct_type = D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT; + + D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT +{ + using struct_type = D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT; + + D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS1 +{ + using struct_type = D3D11_FEATURE_DATA_D3D11_OPTIONS1; + + D3D11_FEATURE_DATA_D3D11_OPTIONS1* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT +{ + using struct_type = D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT; + + D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_MARKER_SUPPORT +{ + using struct_type = D3D11_FEATURE_DATA_MARKER_SUPPORT; + + D3D11_FEATURE_DATA_MARKER_SUPPORT* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS1 +{ + using struct_type = D3D11_FEATURE_DATA_D3D9_OPTIONS1; + + D3D11_FEATURE_DATA_D3D9_OPTIONS1* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS2 +{ + using struct_type = D3D11_FEATURE_DATA_D3D11_OPTIONS2; + + D3D11_FEATURE_DATA_D3D11_OPTIONS2* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS3 +{ + using struct_type = D3D11_FEATURE_DATA_D3D11_OPTIONS3; + + D3D11_FEATURE_DATA_D3D11_OPTIONS3* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT +{ + using struct_type = D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT; + + D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_SHADER_CACHE +{ + using struct_type = D3D11_FEATURE_DATA_SHADER_CACHE; + + D3D11_FEATURE_DATA_SHADER_CACHE* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS5 +{ + using struct_type = D3D11_FEATURE_DATA_D3D11_OPTIONS5; + + D3D11_FEATURE_DATA_D3D11_OPTIONS5* decoded_value{ nullptr }; +}; + +struct Decoded_CD3D11_VIDEO_DEFAULT +{ + using struct_type = CD3D11_VIDEO_DEFAULT; + + CD3D11_VIDEO_DEFAULT* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_DECODER_DESC +{ + using struct_type = D3D11_VIDEO_DECODER_DESC; + + D3D11_VIDEO_DECODER_DESC* decoded_value{ nullptr }; + + Decoded_GUID* Guid{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_DECODER_CONFIG +{ + using struct_type = D3D11_VIDEO_DECODER_CONFIG; + + D3D11_VIDEO_DECODER_CONFIG* decoded_value{ nullptr }; + + Decoded_GUID* guidConfigBitstreamEncryption{ nullptr }; + Decoded_GUID* guidConfigMBcontrolEncryption{ nullptr }; + Decoded_GUID* guidConfigResidDiffEncryption{ nullptr }; +}; + +struct Decoded_D3D11_AES_CTR_IV +{ + using struct_type = D3D11_AES_CTR_IV; + + D3D11_AES_CTR_IV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_ENCRYPTED_BLOCK_INFO +{ + using struct_type = D3D11_ENCRYPTED_BLOCK_INFO; + + D3D11_ENCRYPTED_BLOCK_INFO* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC +{ + using struct_type = D3D11_VIDEO_DECODER_BUFFER_DESC; + + D3D11_VIDEO_DECODER_BUFFER_DESC* decoded_value{ nullptr }; + + PointerDecoder pIV; + Decoded_D3D11_ENCRYPTED_BLOCK_INFO* EncryptedBlockInfo{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_DECODER_EXTENSION +{ + using struct_type = D3D11_VIDEO_DECODER_EXTENSION; + + D3D11_VIDEO_DECODER_EXTENSION* decoded_value{ nullptr }; + + PointerDecoder pPrivateInputData; + PointerDecoder pPrivateOutputData; + HandlePointerDecoder ppResourceList; +}; + +struct Decoded_D3D11_VIDEO_PROCESSOR_CAPS +{ + using struct_type = D3D11_VIDEO_PROCESSOR_CAPS; + + D3D11_VIDEO_PROCESSOR_CAPS* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS +{ + using struct_type = D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS; + + D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_CONTENT_PROTECTION_CAPS +{ + using struct_type = D3D11_VIDEO_CONTENT_PROTECTION_CAPS; + + D3D11_VIDEO_CONTENT_PROTECTION_CAPS* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_PROCESSOR_CUSTOM_RATE +{ + using struct_type = D3D11_VIDEO_PROCESSOR_CUSTOM_RATE; + + D3D11_VIDEO_PROCESSOR_CUSTOM_RATE* decoded_value{ nullptr }; + + Decoded_DXGI_RATIONAL* CustomRate{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_PROCESSOR_FILTER_RANGE +{ + using struct_type = D3D11_VIDEO_PROCESSOR_FILTER_RANGE; + + D3D11_VIDEO_PROCESSOR_FILTER_RANGE* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_PROCESSOR_CONTENT_DESC +{ + using struct_type = D3D11_VIDEO_PROCESSOR_CONTENT_DESC; + + D3D11_VIDEO_PROCESSOR_CONTENT_DESC* decoded_value{ nullptr }; + + Decoded_DXGI_RATIONAL* InputFrameRate{ nullptr }; + Decoded_DXGI_RATIONAL* OutputFrameRate{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_COLOR_RGBA +{ + using struct_type = D3D11_VIDEO_COLOR_RGBA; + + D3D11_VIDEO_COLOR_RGBA* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_COLOR_YCbCrA +{ + using struct_type = D3D11_VIDEO_COLOR_YCbCrA; + + D3D11_VIDEO_COLOR_YCbCrA* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_PROCESSOR_COLOR_SPACE +{ + using struct_type = D3D11_VIDEO_PROCESSOR_COLOR_SPACE; + + D3D11_VIDEO_PROCESSOR_COLOR_SPACE* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_PROCESSOR_STREAM +{ + using struct_type = D3D11_VIDEO_PROCESSOR_STREAM; + + D3D11_VIDEO_PROCESSOR_STREAM* decoded_value{ nullptr }; + + HandlePointerDecoder ppPastSurfaces; + format::HandleId pInputSurface{ format::kNullHandleId }; + HandlePointerDecoder ppFutureSurfaces; + HandlePointerDecoder ppPastSurfacesRight; + format::HandleId pInputSurfaceRight{ format::kNullHandleId }; + HandlePointerDecoder ppFutureSurfacesRight; +}; + +struct Decoded_D3D11_OMAC +{ + using struct_type = D3D11_OMAC; + + D3D11_OMAC* decoded_value{ nullptr }; + + PointerDecoder Omac; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_INPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_INPUT; + + D3D11_AUTHENTICATED_QUERY_INPUT* decoded_value{ nullptr }; + + Decoded_GUID* QueryType{ nullptr }; + uint64_t hChannel{ 0 }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_OUTPUT; + + D3D11_AUTHENTICATED_QUERY_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_OMAC* omac{ nullptr }; + Decoded_GUID* QueryType{ nullptr }; + uint64_t hChannel{ 0 }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT; + + D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* Output{ nullptr }; + Decoded_D3D11_AUTHENTICATED_PROTECTION_FLAGS* ProtectionFlags{ nullptr }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT; + + D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* Output{ nullptr }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT; + + D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* Output{ nullptr }; + uint64_t DeviceHandle{ 0 }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT; + + D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_INPUT* Input{ nullptr }; + uint64_t DecoderHandle{ 0 }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT; + + D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* Output{ nullptr }; + uint64_t DecoderHandle{ 0 }; + uint64_t CryptoSessionHandle{ 0 }; + uint64_t DeviceHandle{ 0 }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT; + + D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* Output{ nullptr }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT; + + D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_INPUT* Input{ nullptr }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT; + + D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* Output{ nullptr }; + uint64_t ProcessHandle{ 0 }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT; + + D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* Output{ nullptr }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT; + + D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_INPUT* Input{ nullptr }; + uint64_t DeviceHandle{ 0 }; + uint64_t CryptoSessionHandle{ 0 }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT; + + D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* Output{ nullptr }; + uint64_t DeviceHandle{ 0 }; + uint64_t CryptoSessionHandle{ 0 }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT; + + D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_INPUT* Input{ nullptr }; + uint64_t DeviceHandle{ 0 }; + uint64_t CryptoSessionHandle{ 0 }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT; + + D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* Output{ nullptr }; + uint64_t DeviceHandle{ 0 }; + uint64_t CryptoSessionHandle{ 0 }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT; + + D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* Output{ nullptr }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT; + + D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* Output{ nullptr }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT; + + D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_INPUT* Input{ nullptr }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT; + + D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* Output{ nullptr }; + Decoded_GUID* EncryptionGuid{ nullptr }; +}; + +struct Decoded_D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT; + + D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* Output{ nullptr }; + Decoded_GUID* EncryptionGuid{ nullptr }; +}; + +struct Decoded_D3D11_AUTHENTICATED_CONFIGURE_INPUT +{ + using struct_type = D3D11_AUTHENTICATED_CONFIGURE_INPUT; + + D3D11_AUTHENTICATED_CONFIGURE_INPUT* decoded_value{ nullptr }; + + Decoded_D3D11_OMAC* omac{ nullptr }; + Decoded_GUID* ConfigureType{ nullptr }; + uint64_t hChannel{ 0 }; +}; + +struct Decoded_D3D11_AUTHENTICATED_CONFIGURE_OUTPUT +{ + using struct_type = D3D11_AUTHENTICATED_CONFIGURE_OUTPUT; + + D3D11_AUTHENTICATED_CONFIGURE_OUTPUT* decoded_value{ nullptr }; + + Decoded_D3D11_OMAC* omac{ nullptr }; + Decoded_GUID* ConfigureType{ nullptr }; + uint64_t hChannel{ 0 }; +}; + +struct Decoded_D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT +{ + using struct_type = D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT; + + D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_CONFIGURE_INPUT* Parameters{ nullptr }; +}; + +struct Decoded_D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT +{ + using struct_type = D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT; + + D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_CONFIGURE_INPUT* Parameters{ nullptr }; + Decoded_D3D11_AUTHENTICATED_PROTECTION_FLAGS* Protections{ nullptr }; +}; + +struct Decoded_D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT +{ + using struct_type = D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT; + + D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_CONFIGURE_INPUT* Parameters{ nullptr }; + uint64_t DecoderHandle{ 0 }; + uint64_t CryptoSessionHandle{ 0 }; + uint64_t DeviceHandle{ 0 }; +}; + +struct Decoded_D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT +{ + using struct_type = D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT; + + D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_CONFIGURE_INPUT* Parameters{ nullptr }; + uint64_t ProcessHandle{ 0 }; +}; + +struct Decoded_D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT +{ + using struct_type = D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT; + + D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT* decoded_value{ nullptr }; + + Decoded_D3D11_AUTHENTICATED_CONFIGURE_INPUT* Parameters{ nullptr }; + Decoded_GUID* EncryptionGuid{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_VDOV +{ + using struct_type = D3D11_TEX2D_VDOV; + + D3D11_TEX2D_VDOV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_VPIV +{ + using struct_type = D3D11_TEX2D_VPIV; + + D3D11_TEX2D_VPIV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_VPOV +{ + using struct_type = D3D11_TEX2D_VPOV; + + D3D11_TEX2D_VPOV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_ARRAY_VPOV +{ + using struct_type = D3D11_TEX2D_ARRAY_VPOV; + + D3D11_TEX2D_ARRAY_VPOV* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_RENDER_TARGET_BLEND_DESC1 +{ + using struct_type = D3D11_RENDER_TARGET_BLEND_DESC1; + + D3D11_RENDER_TARGET_BLEND_DESC1* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_BLEND_DESC1 +{ + using struct_type = D3D11_BLEND_DESC1; + + D3D11_BLEND_DESC1* decoded_value{ nullptr }; + + StructPointerDecoder* RenderTarget{ nullptr }; +}; + +struct Decoded_D3D11_RASTERIZER_DESC1 +{ + using struct_type = D3D11_RASTERIZER_DESC1; + + D3D11_RASTERIZER_DESC1* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK +{ + using struct_type = D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK; + + D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC1 +{ + using struct_type = D3D11_VIDEO_DECODER_BUFFER_DESC1; + + D3D11_VIDEO_DECODER_BUFFER_DESC1* decoded_value{ nullptr }; + + PointerDecoder pIV; + StructPointerDecoder* pSubSampleMappingBlock{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION +{ + using struct_type = D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION; + + D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* decoded_value{ nullptr }; + + format::HandleId pCryptoSession{ format::kNullHandleId }; + PointerDecoder pBlob; + StructPointerDecoder* pKeyInfoId{ nullptr }; + PointerDecoder pPrivateData; +}; + +struct Decoded_D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT +{ + using struct_type = D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT; + + D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA +{ + using struct_type = D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA; + + D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA* decoded_value{ nullptr }; + + PointerDecoder pbInput; +}; + +struct Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA +{ + using struct_type = D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA; + + D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA* decoded_value{ nullptr }; + + PointerDecoder pbOutput; +}; + +struct Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA +{ + using struct_type = D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA; + + D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA* decoded_value{ nullptr }; + + StructPointerDecoder* pInputData{ nullptr }; + StructPointerDecoder* pOutputData{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_SAMPLE_DESC +{ + using struct_type = D3D11_VIDEO_SAMPLE_DESC; + + D3D11_VIDEO_SAMPLE_DESC* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TILED_RESOURCE_COORDINATE +{ + using struct_type = D3D11_TILED_RESOURCE_COORDINATE; + + D3D11_TILED_RESOURCE_COORDINATE* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TILE_REGION_SIZE +{ + using struct_type = D3D11_TILE_REGION_SIZE; + + D3D11_TILE_REGION_SIZE* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_SUBRESOURCE_TILING +{ + using struct_type = D3D11_SUBRESOURCE_TILING; + + D3D11_SUBRESOURCE_TILING* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TILE_SHAPE +{ + using struct_type = D3D11_TILE_SHAPE; + + D3D11_TILE_SHAPE* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_PACKED_MIP_DESC +{ + using struct_type = D3D11_PACKED_MIP_DESC; + + D3D11_PACKED_MIP_DESC* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEXTURE2D_DESC1 +{ + using struct_type = D3D11_TEXTURE2D_DESC1; + + D3D11_TEXTURE2D_DESC1* decoded_value{ nullptr }; + + Decoded_DXGI_SAMPLE_DESC* SampleDesc{ nullptr }; +}; + +struct Decoded_D3D11_TEXTURE3D_DESC1 +{ + using struct_type = D3D11_TEXTURE3D_DESC1; + + D3D11_TEXTURE3D_DESC1* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_RASTERIZER_DESC2 +{ + using struct_type = D3D11_RASTERIZER_DESC2; + + D3D11_RASTERIZER_DESC2* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_SRV1 +{ + using struct_type = D3D11_TEX2D_SRV1; + + D3D11_TEX2D_SRV1* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_ARRAY_SRV1 +{ + using struct_type = D3D11_TEX2D_ARRAY_SRV1; + + D3D11_TEX2D_ARRAY_SRV1* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_RTV1 +{ + using struct_type = D3D11_TEX2D_RTV1; + + D3D11_TEX2D_RTV1* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_ARRAY_RTV1 +{ + using struct_type = D3D11_TEX2D_ARRAY_RTV1; + + D3D11_TEX2D_ARRAY_RTV1* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_UAV1 +{ + using struct_type = D3D11_TEX2D_UAV1; + + D3D11_TEX2D_UAV1* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_TEX2D_ARRAY_UAV1 +{ + using struct_type = D3D11_TEX2D_ARRAY_UAV1; + + D3D11_TEX2D_ARRAY_UAV1* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_QUERY_DESC1 +{ + using struct_type = D3D11_QUERY_DESC1; + + D3D11_QUERY_DESC1* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_VIDEO_DECODER_HISTOGRAM +{ + using struct_type = D3D11_FEATURE_DATA_VIDEO_DECODER_HISTOGRAM; + + D3D11_FEATURE_DATA_VIDEO_DECODER_HISTOGRAM* decoded_value{ nullptr }; + + Decoded_D3D11_VIDEO_DECODER_DESC* DecoderDesc{ nullptr }; +}; + +struct Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC2 +{ + using struct_type = D3D11_VIDEO_DECODER_BUFFER_DESC2; + + D3D11_VIDEO_DECODER_BUFFER_DESC2* decoded_value{ nullptr }; + + PointerDecoder pIV; + StructPointerDecoder* pSubSampleMappingBlock{ nullptr }; +}; + +struct Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS4 +{ + using struct_type = D3D11_FEATURE_DATA_D3D11_OPTIONS4; + + D3D11_FEATURE_DATA_D3D11_OPTIONS4* decoded_value{ nullptr }; +}; + +struct Decoded_D3D11_RESOURCE_FLAGS +{ + using struct_type = D3D11_RESOURCE_FLAGS; + + D3D11_RESOURCE_FLAGS* decoded_value{ nullptr }; +}; + struct Decoded_GUID { using struct_type = GUID; @@ -2202,6 +3415,13 @@ struct Decoded_tagPOINT tagPOINT* decoded_value{ nullptr }; }; +struct Decoded_tagSIZE +{ + using struct_type = tagSIZE; + + tagSIZE* decoded_value{ nullptr }; +}; + struct Decoded__SECURITY_ATTRIBUTES { using struct_type = _SECURITY_ATTRIBUTES; diff --git a/framework/generated/generated_dx12_struct_decoders_forward.h b/framework/generated/generated_dx12_struct_decoders_forward.h index e419814466..45c3e0dc70 100644 --- a/framework/generated/generated_dx12_struct_decoders_forward.h +++ b/framework/generated/generated_dx12_struct_decoders_forward.h @@ -315,9 +315,175 @@ struct Decoded_D3D12_DEBUG_COMMAND_LIST_GPU_BASED_VALIDATION_SETTINGS; struct Decoded_D3D12_MESSAGE; struct Decoded_D3D12_INFO_QUEUE_FILTER_DESC; struct Decoded_D3D12_INFO_QUEUE_FILTER; +struct Decoded_D3D11_INPUT_ELEMENT_DESC; +struct Decoded_D3D11_SO_DECLARATION_ENTRY; +struct Decoded_D3D11_VIEWPORT; +struct Decoded_D3D11_DRAW_INSTANCED_INDIRECT_ARGS; +struct Decoded_D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS; +struct Decoded_D3D11_BOX; +struct Decoded_D3D11_DEPTH_STENCILOP_DESC; +struct Decoded_D3D11_DEPTH_STENCIL_DESC; +struct Decoded_D3D11_RENDER_TARGET_BLEND_DESC; +struct Decoded_D3D11_BLEND_DESC; +struct Decoded_D3D11_RASTERIZER_DESC; +struct Decoded_D3D11_SUBRESOURCE_DATA; +struct Decoded_D3D11_MAPPED_SUBRESOURCE; +struct Decoded_D3D11_BUFFER_DESC; +struct Decoded_D3D11_TEXTURE1D_DESC; +struct Decoded_D3D11_TEXTURE2D_DESC; +struct Decoded_D3D11_TEXTURE3D_DESC; +struct Decoded_D3D11_BUFFER_SRV; +struct Decoded_D3D11_BUFFEREX_SRV; +struct Decoded_D3D11_TEX1D_SRV; +struct Decoded_D3D11_TEX1D_ARRAY_SRV; +struct Decoded_D3D11_TEX2D_SRV; +struct Decoded_D3D11_TEX2D_ARRAY_SRV; +struct Decoded_D3D11_TEX3D_SRV; +struct Decoded_D3D11_TEXCUBE_SRV; +struct Decoded_D3D11_TEXCUBE_ARRAY_SRV; +struct Decoded_D3D11_TEX2DMS_SRV; +struct Decoded_D3D11_TEX2DMS_ARRAY_SRV; +struct Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC; +struct Decoded_D3D11_BUFFER_RTV; +struct Decoded_D3D11_TEX1D_RTV; +struct Decoded_D3D11_TEX1D_ARRAY_RTV; +struct Decoded_D3D11_TEX2D_RTV; +struct Decoded_D3D11_TEX2DMS_RTV; +struct Decoded_D3D11_TEX2D_ARRAY_RTV; +struct Decoded_D3D11_TEX2DMS_ARRAY_RTV; +struct Decoded_D3D11_TEX3D_RTV; +struct Decoded_D3D11_RENDER_TARGET_VIEW_DESC; +struct Decoded_D3D11_TEX1D_DSV; +struct Decoded_D3D11_TEX1D_ARRAY_DSV; +struct Decoded_D3D11_TEX2D_DSV; +struct Decoded_D3D11_TEX2D_ARRAY_DSV; +struct Decoded_D3D11_TEX2DMS_DSV; +struct Decoded_D3D11_TEX2DMS_ARRAY_DSV; +struct Decoded_D3D11_DEPTH_STENCIL_VIEW_DESC; +struct Decoded_D3D11_BUFFER_UAV; +struct Decoded_D3D11_TEX1D_UAV; +struct Decoded_D3D11_TEX1D_ARRAY_UAV; +struct Decoded_D3D11_TEX2D_UAV; +struct Decoded_D3D11_TEX2D_ARRAY_UAV; +struct Decoded_D3D11_TEX3D_UAV; +struct Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC; +struct Decoded_D3D11_SAMPLER_DESC; +struct Decoded_D3D11_QUERY_DESC; +struct Decoded_D3D11_QUERY_DATA_TIMESTAMP_DISJOINT; +struct Decoded_D3D11_QUERY_DATA_PIPELINE_STATISTICS; +struct Decoded_D3D11_QUERY_DATA_SO_STATISTICS; +struct Decoded_D3D11_COUNTER_DESC; +struct Decoded_D3D11_COUNTER_INFO; +struct Decoded_D3D11_CLASS_INSTANCE_DESC; +struct Decoded_D3D11_FEATURE_DATA_THREADING; +struct Decoded_D3D11_FEATURE_DATA_DOUBLES; +struct Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT; +struct Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT2; +struct Decoded_D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS; +struct Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS; +struct Decoded_D3D11_FEATURE_DATA_ARCHITECTURE_INFO; +struct Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS; +struct Decoded_D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT; +struct Decoded_D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT; +struct Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS1; +struct Decoded_D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT; +struct Decoded_D3D11_FEATURE_DATA_MARKER_SUPPORT; +struct Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS1; +struct Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS2; +struct Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS3; +struct Decoded_D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT; +struct Decoded_D3D11_FEATURE_DATA_SHADER_CACHE; +struct Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS5; +struct Decoded_CD3D11_VIDEO_DEFAULT; +struct Decoded_D3D11_VIDEO_DECODER_DESC; +struct Decoded_D3D11_VIDEO_DECODER_CONFIG; +struct Decoded_D3D11_AES_CTR_IV; +struct Decoded_D3D11_ENCRYPTED_BLOCK_INFO; +struct Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC; +struct Decoded_D3D11_VIDEO_DECODER_EXTENSION; +struct Decoded_D3D11_VIDEO_PROCESSOR_CAPS; +struct Decoded_D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS; +struct Decoded_D3D11_VIDEO_CONTENT_PROTECTION_CAPS; +struct Decoded_D3D11_VIDEO_PROCESSOR_CUSTOM_RATE; +struct Decoded_D3D11_VIDEO_PROCESSOR_FILTER_RANGE; +struct Decoded_D3D11_VIDEO_PROCESSOR_CONTENT_DESC; +struct Decoded_D3D11_VIDEO_COLOR_RGBA; +struct Decoded_D3D11_VIDEO_COLOR_YCbCrA; +struct Decoded_D3D11_VIDEO_COLOR; +struct Decoded_D3D11_VIDEO_PROCESSOR_COLOR_SPACE; +struct Decoded_D3D11_VIDEO_PROCESSOR_STREAM; +struct Decoded_D3D11_OMAC; +struct Decoded_D3D11_AUTHENTICATED_QUERY_INPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_CONFIGURE_INPUT; +struct Decoded_D3D11_AUTHENTICATED_CONFIGURE_OUTPUT; +struct Decoded_D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT; +struct Decoded_D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT; +struct Decoded_D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT; +struct Decoded_D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT; +struct Decoded_D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT; +struct Decoded_D3D11_TEX2D_VDOV; +struct Decoded_D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC; +struct Decoded_D3D11_TEX2D_VPIV; +struct Decoded_D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC; +struct Decoded_D3D11_TEX2D_VPOV; +struct Decoded_D3D11_TEX2D_ARRAY_VPOV; +struct Decoded_D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC; +struct Decoded_D3D11_RENDER_TARGET_BLEND_DESC1; +struct Decoded_D3D11_BLEND_DESC1; +struct Decoded_D3D11_RASTERIZER_DESC1; +struct Decoded_D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK; +struct Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC1; +struct Decoded_D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION; +struct Decoded_D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT; +struct Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA; +struct Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA; +struct Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA; +struct Decoded_D3D11_VIDEO_SAMPLE_DESC; +struct Decoded_D3D11_TILED_RESOURCE_COORDINATE; +struct Decoded_D3D11_TILE_REGION_SIZE; +struct Decoded_D3D11_SUBRESOURCE_TILING; +struct Decoded_D3D11_TILE_SHAPE; +struct Decoded_D3D11_PACKED_MIP_DESC; +struct Decoded_D3D11_TEXTURE2D_DESC1; +struct Decoded_D3D11_TEXTURE3D_DESC1; +struct Decoded_D3D11_RASTERIZER_DESC2; +struct Decoded_D3D11_TEX2D_SRV1; +struct Decoded_D3D11_TEX2D_ARRAY_SRV1; +struct Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC1; +struct Decoded_D3D11_TEX2D_RTV1; +struct Decoded_D3D11_TEX2D_ARRAY_RTV1; +struct Decoded_D3D11_RENDER_TARGET_VIEW_DESC1; +struct Decoded_D3D11_TEX2D_UAV1; +struct Decoded_D3D11_TEX2D_ARRAY_UAV1; +struct Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC1; +struct Decoded_D3D11_QUERY_DESC1; +struct Decoded_D3D11_FEATURE_DATA_VIDEO_DECODER_HISTOGRAM; +struct Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC2; +struct Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS4; +struct Decoded_D3D11_RESOURCE_FLAGS; struct Decoded_GUID; struct Decoded_tagRECT; struct Decoded_tagPOINT; +struct Decoded_tagSIZE; struct Decoded__SECURITY_ATTRIBUTES; struct Decoded_LARGE_INTEGER; @@ -879,6 +1045,332 @@ size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D12_INF size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D12_INFO_QUEUE_FILTER* wrapper); +/* +** This part is generated from d3d11.h in Windows SDK: 10.0.20348.0 +** +*/ +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_INPUT_ELEMENT_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_SO_DECLARATION_ENTRY* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIEWPORT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_DRAW_INSTANCED_INDIRECT_ARGS* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BOX* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_DEPTH_STENCILOP_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_DEPTH_STENCIL_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RENDER_TARGET_BLEND_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BLEND_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RASTERIZER_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_MAPPED_SUBRESOURCE* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BUFFER_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEXTURE1D_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEXTURE2D_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEXTURE3D_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BUFFEREX_SRV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_SRV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_ARRAY_SRV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_SRV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_SRV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX3D_SRV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEXCUBE_SRV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEXCUBE_ARRAY_SRV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2DMS_SRV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2DMS_ARRAY_SRV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_RTV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_ARRAY_RTV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_RTV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2DMS_RTV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_RTV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2DMS_ARRAY_RTV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX3D_RTV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_DSV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_ARRAY_DSV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_DSV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_DSV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2DMS_DSV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2DMS_ARRAY_DSV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BUFFER_UAV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_UAV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX1D_ARRAY_UAV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_UAV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_UAV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX3D_UAV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_SAMPLER_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_QUERY_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_QUERY_DATA_TIMESTAMP_DISJOINT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_QUERY_DATA_PIPELINE_STATISTICS* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_QUERY_DATA_SO_STATISTICS* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_COUNTER_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_COUNTER_INFO* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_CLASS_INSTANCE_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_THREADING* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_DOUBLES* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT2* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_ARCHITECTURE_INFO* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS1* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_MARKER_SUPPORT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS1* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS2* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS3* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_SHADER_CACHE* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS5* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_CD3D11_VIDEO_DEFAULT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_CONFIG* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AES_CTR_IV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_ENCRYPTED_BLOCK_INFO* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_EXTENSION* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_CAPS* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_CONTENT_PROTECTION_CAPS* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_CUSTOM_RATE* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_FILTER_RANGE* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_CONTENT_DESC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_COLOR_RGBA* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_COLOR_YCbCrA* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_COLOR_SPACE* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_STREAM* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_OMAC* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_INPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_CONFIGURE_INPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_CONFIGURE_OUTPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_VDOV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_VPIV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_VPOV* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_VPOV* wrapper); + +/* +** This part is generated from d3d11_1.h in Windows SDK: 10.0.20348.0 +** +*/ +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RENDER_TARGET_BLEND_DESC1* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_BLEND_DESC1* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RASTERIZER_DESC1* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC1* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_SAMPLE_DESC* wrapper); + +/* +** This part is generated from d3d11_2.h in Windows SDK: 10.0.20348.0 +** +*/ +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TILED_RESOURCE_COORDINATE* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TILE_REGION_SIZE* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_SUBRESOURCE_TILING* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TILE_SHAPE* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_PACKED_MIP_DESC* wrapper); + +/* +** This part is generated from d3d11_3.h in Windows SDK: 10.0.20348.0 +** +*/ +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEXTURE2D_DESC1* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEXTURE3D_DESC1* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RASTERIZER_DESC2* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_SRV1* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_SRV1* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_RTV1* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_RTV1* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_UAV1* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_TEX2D_ARRAY_UAV1* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_QUERY_DESC1* wrapper); + +/* +** This part is generated from d3d11_4.h in Windows SDK: 10.0.20348.0 +** +*/ +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_VIDEO_DECODER_HISTOGRAM* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC2* wrapper); + +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS4* wrapper); + +/* +** This part is generated from d3d11on12.h in Windows SDK: 10.0.20348.0 +** +*/ +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_D3D11_RESOURCE_FLAGS* wrapper); + /* ** This part is generated from guiddef.h in Windows SDK: 10.0.20348.0 ** @@ -893,6 +1385,8 @@ size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_tagRECT* size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_tagPOINT* wrapper); +size_t DecodeStruct(const uint8_t* buffer, size_t buffer_size, Decoded_tagSIZE* wrapper); + /* ** This part is generated from minwinbase.h in Windows SDK: 10.0.20348.0 ** diff --git a/framework/generated/generated_dx12_struct_decoders_to_json.cpp b/framework/generated/generated_dx12_struct_decoders_to_json.cpp index 779d464998..de00ca9d3d 100644 --- a/framework/generated/generated_dx12_struct_decoders_to_json.cpp +++ b/framework/generated/generated_dx12_struct_decoders_to_json.cpp @@ -4475,6 +4475,2669 @@ void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_INFO_QUEUE_F } } +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_INPUT_ELEMENT_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_INPUT_ELEMENT_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_INPUT_ELEMENT_DESC& meta_struct = *data; + FieldToJson(jdata["SemanticName"], meta_struct.SemanticName, options); + FieldToJson(jdata["SemanticIndex"], decoded_value.SemanticIndex, options); + FieldToJson(jdata["Format"], decoded_value.Format, options); + FieldToJson(jdata["InputSlot"], decoded_value.InputSlot, options); + FieldToJson(jdata["AlignedByteOffset"], decoded_value.AlignedByteOffset, options); + FieldToJson(jdata["InputSlotClass"], decoded_value.InputSlotClass, options); + FieldToJson(jdata["InstanceDataStepRate"], decoded_value.InstanceDataStepRate, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SO_DECLARATION_ENTRY* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_SO_DECLARATION_ENTRY& decoded_value = *data->decoded_value; + const Decoded_D3D11_SO_DECLARATION_ENTRY& meta_struct = *data; + FieldToJson(jdata["Stream"], decoded_value.Stream, options); + FieldToJson(jdata["SemanticName"], meta_struct.SemanticName, options); + FieldToJson(jdata["SemanticIndex"], decoded_value.SemanticIndex, options); + FieldToJson(jdata["StartComponent"], decoded_value.StartComponent, options); + FieldToJson(jdata["ComponentCount"], decoded_value.ComponentCount, options); + FieldToJson(jdata["OutputSlot"], decoded_value.OutputSlot, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIEWPORT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIEWPORT& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIEWPORT& meta_struct = *data; + FieldToJson(jdata["TopLeftX"], decoded_value.TopLeftX, options); + FieldToJson(jdata["TopLeftY"], decoded_value.TopLeftY, options); + FieldToJson(jdata["Width"], decoded_value.Width, options); + FieldToJson(jdata["Height"], decoded_value.Height, options); + FieldToJson(jdata["MinDepth"], decoded_value.MinDepth, options); + FieldToJson(jdata["MaxDepth"], decoded_value.MaxDepth, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DRAW_INSTANCED_INDIRECT_ARGS* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_DRAW_INSTANCED_INDIRECT_ARGS& decoded_value = *data->decoded_value; + const Decoded_D3D11_DRAW_INSTANCED_INDIRECT_ARGS& meta_struct = *data; + FieldToJson(jdata["VertexCountPerInstance"], decoded_value.VertexCountPerInstance, options); + FieldToJson(jdata["InstanceCount"], decoded_value.InstanceCount, options); + FieldToJson(jdata["StartVertexLocation"], decoded_value.StartVertexLocation, options); + FieldToJson(jdata["StartInstanceLocation"], decoded_value.StartInstanceLocation, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS& decoded_value = *data->decoded_value; + const Decoded_D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS& meta_struct = *data; + FieldToJson(jdata["IndexCountPerInstance"], decoded_value.IndexCountPerInstance, options); + FieldToJson(jdata["InstanceCount"], decoded_value.InstanceCount, options); + FieldToJson(jdata["StartIndexLocation"], decoded_value.StartIndexLocation, options); + FieldToJson(jdata["BaseVertexLocation"], decoded_value.BaseVertexLocation, options); + FieldToJson(jdata["StartInstanceLocation"], decoded_value.StartInstanceLocation, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BOX* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_BOX& decoded_value = *data->decoded_value; + const Decoded_D3D11_BOX& meta_struct = *data; + FieldToJson(jdata["left"], decoded_value.left, options); + FieldToJson(jdata["top"], decoded_value.top, options); + FieldToJson(jdata["front"], decoded_value.front, options); + FieldToJson(jdata["right"], decoded_value.right, options); + FieldToJson(jdata["bottom"], decoded_value.bottom, options); + FieldToJson(jdata["back"], decoded_value.back, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DEPTH_STENCILOP_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_DEPTH_STENCILOP_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_DEPTH_STENCILOP_DESC& meta_struct = *data; + FieldToJson(jdata["StencilFailOp"], decoded_value.StencilFailOp, options); + FieldToJson(jdata["StencilDepthFailOp"], decoded_value.StencilDepthFailOp, options); + FieldToJson(jdata["StencilPassOp"], decoded_value.StencilPassOp, options); + FieldToJson(jdata["StencilFunc"], decoded_value.StencilFunc, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DEPTH_STENCIL_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_DEPTH_STENCIL_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_DEPTH_STENCIL_DESC& meta_struct = *data; + Bool32ToJson(jdata["DepthEnable"], decoded_value.DepthEnable, options); + FieldToJson(jdata["DepthWriteMask"], decoded_value.DepthWriteMask, options); + FieldToJson(jdata["DepthFunc"], decoded_value.DepthFunc, options); + Bool32ToJson(jdata["StencilEnable"], decoded_value.StencilEnable, options); + FieldToJsonAsFixedWidthBinary(jdata["StencilReadMask"], decoded_value.StencilReadMask, options); + FieldToJsonAsFixedWidthBinary(jdata["StencilWriteMask"], decoded_value.StencilWriteMask, options); + FieldToJson(jdata["FrontFace"], meta_struct.FrontFace, options); + FieldToJson(jdata["BackFace"], meta_struct.BackFace, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RENDER_TARGET_BLEND_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_RENDER_TARGET_BLEND_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_RENDER_TARGET_BLEND_DESC& meta_struct = *data; + Bool32ToJson(jdata["BlendEnable"], decoded_value.BlendEnable, options); + FieldToJson(jdata["SrcBlend"], decoded_value.SrcBlend, options); + FieldToJson(jdata["DestBlend"], decoded_value.DestBlend, options); + FieldToJson(jdata["BlendOp"], decoded_value.BlendOp, options); + FieldToJson(jdata["SrcBlendAlpha"], decoded_value.SrcBlendAlpha, options); + FieldToJson(jdata["DestBlendAlpha"], decoded_value.DestBlendAlpha, options); + FieldToJson(jdata["BlendOpAlpha"], decoded_value.BlendOpAlpha, options); + FieldToJsonAsFixedWidthBinary(jdata["RenderTargetWriteMask"], decoded_value.RenderTargetWriteMask, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BLEND_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_BLEND_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_BLEND_DESC& meta_struct = *data; + Bool32ToJson(jdata["AlphaToCoverageEnable"], decoded_value.AlphaToCoverageEnable, options); + Bool32ToJson(jdata["IndependentBlendEnable"], decoded_value.IndependentBlendEnable, options); + FieldToJson(jdata["RenderTarget"], meta_struct.RenderTarget, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RASTERIZER_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_RASTERIZER_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_RASTERIZER_DESC& meta_struct = *data; + FieldToJson(jdata["FillMode"], decoded_value.FillMode, options); + FieldToJson(jdata["CullMode"], decoded_value.CullMode, options); + Bool32ToJson(jdata["FrontCounterClockwise"], decoded_value.FrontCounterClockwise, options); + FieldToJson(jdata["DepthBias"], decoded_value.DepthBias, options); + FieldToJson(jdata["DepthBiasClamp"], decoded_value.DepthBiasClamp, options); + FieldToJson(jdata["SlopeScaledDepthBias"], decoded_value.SlopeScaledDepthBias, options); + Bool32ToJson(jdata["DepthClipEnable"], decoded_value.DepthClipEnable, options); + Bool32ToJson(jdata["ScissorEnable"], decoded_value.ScissorEnable, options); + Bool32ToJson(jdata["MultisampleEnable"], decoded_value.MultisampleEnable, options); + Bool32ToJson(jdata["AntialiasedLineEnable"], decoded_value.AntialiasedLineEnable, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SUBRESOURCE_DATA* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_SUBRESOURCE_DATA& decoded_value = *data->decoded_value; + const Decoded_D3D11_SUBRESOURCE_DATA& meta_struct = *data; + static thread_local uint64_t D3D11_SUBRESOURCE_DATA_pSysMem_counter{ 0 }; + const bool written = RepresentBinaryFile(options, jdata["pSysMem"], "D3D11_SUBRESOURCE_DATA.pSysMem", D3D11_SUBRESOURCE_DATA_pSysMem_counter, meta_struct.pSysMem); + D3D11_SUBRESOURCE_DATA_pSysMem_counter += written; + + FieldToJson(jdata["SysMemPitch"], decoded_value.SysMemPitch, options); + FieldToJson(jdata["SysMemSlicePitch"], decoded_value.SysMemSlicePitch, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_MAPPED_SUBRESOURCE* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_MAPPED_SUBRESOURCE& decoded_value = *data->decoded_value; + const Decoded_D3D11_MAPPED_SUBRESOURCE& meta_struct = *data; + FieldToJson(jdata["pData"], meta_struct.pData, options); + FieldToJson(jdata["RowPitch"], decoded_value.RowPitch, options); + FieldToJson(jdata["DepthPitch"], decoded_value.DepthPitch, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFER_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_BUFFER_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_BUFFER_DESC& meta_struct = *data; + FieldToJson(jdata["ByteWidth"], decoded_value.ByteWidth, options); + FieldToJson(jdata["Usage"], decoded_value.Usage, options); + FieldToJson(jdata["BindFlags"], decoded_value.BindFlags, options); + FieldToJson(jdata["CPUAccessFlags"], decoded_value.CPUAccessFlags, options); + FieldToJson(jdata["MiscFlags"], decoded_value.MiscFlags, options); + FieldToJson(jdata["StructureByteStride"], decoded_value.StructureByteStride, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE1D_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEXTURE1D_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEXTURE1D_DESC& meta_struct = *data; + FieldToJson(jdata["Width"], decoded_value.Width, options); + FieldToJson(jdata["MipLevels"], decoded_value.MipLevels, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + FieldToJson(jdata["Format"], decoded_value.Format, options); + FieldToJson(jdata["Usage"], decoded_value.Usage, options); + FieldToJson(jdata["BindFlags"], decoded_value.BindFlags, options); + FieldToJson(jdata["CPUAccessFlags"], decoded_value.CPUAccessFlags, options); + FieldToJson(jdata["MiscFlags"], decoded_value.MiscFlags, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE2D_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEXTURE2D_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEXTURE2D_DESC& meta_struct = *data; + FieldToJson(jdata["Width"], decoded_value.Width, options); + FieldToJson(jdata["Height"], decoded_value.Height, options); + FieldToJson(jdata["MipLevels"], decoded_value.MipLevels, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + FieldToJson(jdata["Format"], decoded_value.Format, options); + FieldToJson(jdata["SampleDesc"], meta_struct.SampleDesc, options); + FieldToJson(jdata["Usage"], decoded_value.Usage, options); + FieldToJson(jdata["BindFlags"], decoded_value.BindFlags, options); + FieldToJson(jdata["CPUAccessFlags"], decoded_value.CPUAccessFlags, options); + FieldToJson(jdata["MiscFlags"], decoded_value.MiscFlags, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE3D_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEXTURE3D_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEXTURE3D_DESC& meta_struct = *data; + FieldToJson(jdata["Width"], decoded_value.Width, options); + FieldToJson(jdata["Height"], decoded_value.Height, options); + FieldToJson(jdata["Depth"], decoded_value.Depth, options); + FieldToJson(jdata["MipLevels"], decoded_value.MipLevels, options); + FieldToJson(jdata["Format"], decoded_value.Format, options); + FieldToJson(jdata["Usage"], decoded_value.Usage, options); + FieldToJson(jdata["BindFlags"], decoded_value.BindFlags, options); + FieldToJson(jdata["CPUAccessFlags"], decoded_value.CPUAccessFlags, options); + FieldToJson(jdata["MiscFlags"], decoded_value.MiscFlags, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFER_SRV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_BUFFER_SRV& decoded_value = *data->decoded_value; + const Decoded_D3D11_BUFFER_SRV& meta_struct = *data; + FieldToJson(jdata["FirstElement"], decoded_value.FirstElement, options); + FieldToJson(jdata["ElementOffset"], decoded_value.ElementOffset, options); + FieldToJson(jdata["NumElements"], decoded_value.NumElements, options); + FieldToJson(jdata["ElementWidth"], decoded_value.ElementWidth, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFEREX_SRV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_BUFFEREX_SRV& decoded_value = *data->decoded_value; + const Decoded_D3D11_BUFFEREX_SRV& meta_struct = *data; + FieldToJson(jdata["FirstElement"], decoded_value.FirstElement, options); + FieldToJson(jdata["NumElements"], decoded_value.NumElements, options); + FieldToJson(jdata["Flags"], decoded_value.Flags, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_SRV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX1D_SRV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX1D_SRV& meta_struct = *data; + FieldToJson(jdata["MostDetailedMip"], decoded_value.MostDetailedMip, options); + FieldToJson(jdata["MipLevels"], decoded_value.MipLevels, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_ARRAY_SRV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX1D_ARRAY_SRV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX1D_ARRAY_SRV& meta_struct = *data; + FieldToJson(jdata["MostDetailedMip"], decoded_value.MostDetailedMip, options); + FieldToJson(jdata["MipLevels"], decoded_value.MipLevels, options); + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_SRV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_SRV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_SRV& meta_struct = *data; + FieldToJson(jdata["MostDetailedMip"], decoded_value.MostDetailedMip, options); + FieldToJson(jdata["MipLevels"], decoded_value.MipLevels, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_SRV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_ARRAY_SRV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_ARRAY_SRV& meta_struct = *data; + FieldToJson(jdata["MostDetailedMip"], decoded_value.MostDetailedMip, options); + FieldToJson(jdata["MipLevels"], decoded_value.MipLevels, options); + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX3D_SRV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX3D_SRV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX3D_SRV& meta_struct = *data; + FieldToJson(jdata["MostDetailedMip"], decoded_value.MostDetailedMip, options); + FieldToJson(jdata["MipLevels"], decoded_value.MipLevels, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXCUBE_SRV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEXCUBE_SRV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEXCUBE_SRV& meta_struct = *data; + FieldToJson(jdata["MostDetailedMip"], decoded_value.MostDetailedMip, options); + FieldToJson(jdata["MipLevels"], decoded_value.MipLevels, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXCUBE_ARRAY_SRV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEXCUBE_ARRAY_SRV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEXCUBE_ARRAY_SRV& meta_struct = *data; + FieldToJson(jdata["MostDetailedMip"], decoded_value.MostDetailedMip, options); + FieldToJson(jdata["MipLevels"], decoded_value.MipLevels, options); + FieldToJson(jdata["First2DArrayFace"], decoded_value.First2DArrayFace, options); + FieldToJson(jdata["NumCubes"], decoded_value.NumCubes, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_SRV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2DMS_SRV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2DMS_SRV& meta_struct = *data; + FieldToJson(jdata["UnusedField_NothingToDefine"], decoded_value.UnusedField_NothingToDefine, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_ARRAY_SRV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2DMS_ARRAY_SRV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2DMS_ARRAY_SRV& meta_struct = *data; + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_SHADER_RESOURCE_VIEW_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC& meta_struct = *data; + FieldToJson(jdata["Format"], decoded_value.Format, options); + FieldToJson(jdata["ViewDimension"], decoded_value.ViewDimension, options); + switch (decoded_value.ViewDimension) + { + case D3D11_SRV_DIMENSION_BUFFER: + { + FieldToJson(jdata["Buffer"], meta_struct.Buffer, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURE1D: + { + FieldToJson(jdata["Texture1D"], meta_struct.Texture1D, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURE1DARRAY: + { + FieldToJson(jdata["Texture1DArray"], meta_struct.Texture1DArray, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURE2D: + { + FieldToJson(jdata["Texture2D"], meta_struct.Texture2D, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURE2DARRAY: + { + FieldToJson(jdata["Texture2DArray"], meta_struct.Texture2DArray, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURE2DMS: + { + FieldToJson(jdata["Texture2DMS"], meta_struct.Texture2DMS, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY: + { + FieldToJson(jdata["Texture2DMSArray"], meta_struct.Texture2DMSArray, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURE3D: + { + FieldToJson(jdata["Texture3D"], meta_struct.Texture3D, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURECUBE: + { + FieldToJson(jdata["TextureCube"], meta_struct.TextureCube, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY: + { + FieldToJson(jdata["TextureCubeArray"], meta_struct.TextureCubeArray, options); + break; + } + case D3D11_SRV_DIMENSION_BUFFEREX: + { + FieldToJson(jdata["BufferEx"], meta_struct.BufferEx, options); + break; + } + default: + { + break; + } + } + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFER_RTV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_BUFFER_RTV& decoded_value = *data->decoded_value; + const Decoded_D3D11_BUFFER_RTV& meta_struct = *data; + FieldToJson(jdata["FirstElement"], decoded_value.FirstElement, options); + FieldToJson(jdata["ElementOffset"], decoded_value.ElementOffset, options); + FieldToJson(jdata["NumElements"], decoded_value.NumElements, options); + FieldToJson(jdata["ElementWidth"], decoded_value.ElementWidth, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_RTV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX1D_RTV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX1D_RTV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_ARRAY_RTV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX1D_ARRAY_RTV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX1D_ARRAY_RTV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_RTV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_RTV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_RTV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_RTV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2DMS_RTV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2DMS_RTV& meta_struct = *data; + FieldToJson(jdata["UnusedField_NothingToDefine"], decoded_value.UnusedField_NothingToDefine, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_RTV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_ARRAY_RTV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_ARRAY_RTV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_ARRAY_RTV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2DMS_ARRAY_RTV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2DMS_ARRAY_RTV& meta_struct = *data; + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX3D_RTV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX3D_RTV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX3D_RTV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + FieldToJson(jdata["FirstWSlice"], decoded_value.FirstWSlice, options); + FieldToJson(jdata["WSize"], decoded_value.WSize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RENDER_TARGET_VIEW_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_RENDER_TARGET_VIEW_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_RENDER_TARGET_VIEW_DESC& meta_struct = *data; + FieldToJson(jdata["Format"], decoded_value.Format, options); + FieldToJson(jdata["ViewDimension"], decoded_value.ViewDimension, options); + switch (decoded_value.ViewDimension) + { + case D3D11_RTV_DIMENSION_BUFFER: + { + FieldToJson(jdata["Buffer"], meta_struct.Buffer, options); + break; + } + case D3D11_RTV_DIMENSION_TEXTURE1D: + { + FieldToJson(jdata["Texture1D"], meta_struct.Texture1D, options); + break; + } + case D3D11_RTV_DIMENSION_TEXTURE1DARRAY: + { + FieldToJson(jdata["Texture1DArray"], meta_struct.Texture1DArray, options); + break; + } + case D3D11_RTV_DIMENSION_TEXTURE2D: + { + FieldToJson(jdata["Texture2D"], meta_struct.Texture2D, options); + break; + } + case D3D11_RTV_DIMENSION_TEXTURE2DARRAY: + { + FieldToJson(jdata["Texture2DArray"], meta_struct.Texture2DArray, options); + break; + } + case D3D11_RTV_DIMENSION_TEXTURE2DMS: + { + FieldToJson(jdata["Texture2DMS"], meta_struct.Texture2DMS, options); + break; + } + case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY: + { + FieldToJson(jdata["Texture2DMSArray"], meta_struct.Texture2DMSArray, options); + break; + } + case D3D11_RTV_DIMENSION_TEXTURE3D: + { + FieldToJson(jdata["Texture3D"], meta_struct.Texture3D, options); + break; + } + default: + { + break; + } + } + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_DSV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX1D_DSV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX1D_DSV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_ARRAY_DSV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX1D_ARRAY_DSV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX1D_ARRAY_DSV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_DSV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_DSV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_DSV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_DSV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_ARRAY_DSV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_ARRAY_DSV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_DSV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2DMS_DSV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2DMS_DSV& meta_struct = *data; + FieldToJson(jdata["UnusedField_NothingToDefine"], decoded_value.UnusedField_NothingToDefine, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_ARRAY_DSV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2DMS_ARRAY_DSV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2DMS_ARRAY_DSV& meta_struct = *data; + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DEPTH_STENCIL_VIEW_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_DEPTH_STENCIL_VIEW_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_DEPTH_STENCIL_VIEW_DESC& meta_struct = *data; + FieldToJson(jdata["Format"], decoded_value.Format, options); + FieldToJson(jdata["ViewDimension"], decoded_value.ViewDimension, options); + FieldToJson(jdata["Flags"], decoded_value.Flags, options); + switch (decoded_value.ViewDimension) + { + case D3D11_DSV_DIMENSION_TEXTURE1D: + { + FieldToJson(jdata["Texture1D"], meta_struct.Texture1D, options); + break; + } + case D3D11_DSV_DIMENSION_TEXTURE1DARRAY: + { + FieldToJson(jdata["Texture1DArray"], meta_struct.Texture1DArray, options); + break; + } + case D3D11_DSV_DIMENSION_TEXTURE2D: + { + FieldToJson(jdata["Texture2D"], meta_struct.Texture2D, options); + break; + } + case D3D11_DSV_DIMENSION_TEXTURE2DARRAY: + { + FieldToJson(jdata["Texture2DArray"], meta_struct.Texture2DArray, options); + break; + } + case D3D11_DSV_DIMENSION_TEXTURE2DMS: + { + FieldToJson(jdata["Texture2DMS"], meta_struct.Texture2DMS, options); + break; + } + case D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY: + { + FieldToJson(jdata["Texture2DMSArray"], meta_struct.Texture2DMSArray, options); + break; + } + default: + { + break; + } + } + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFER_UAV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_BUFFER_UAV& decoded_value = *data->decoded_value; + const Decoded_D3D11_BUFFER_UAV& meta_struct = *data; + FieldToJson(jdata["FirstElement"], decoded_value.FirstElement, options); + FieldToJson(jdata["NumElements"], decoded_value.NumElements, options); + FieldToJson(jdata["Flags"], decoded_value.Flags, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_UAV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX1D_UAV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX1D_UAV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_ARRAY_UAV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX1D_ARRAY_UAV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX1D_ARRAY_UAV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_UAV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_UAV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_UAV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_UAV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_ARRAY_UAV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_ARRAY_UAV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX3D_UAV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX3D_UAV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX3D_UAV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + FieldToJson(jdata["FirstWSlice"], decoded_value.FirstWSlice, options); + FieldToJson(jdata["WSize"], decoded_value.WSize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_UNORDERED_ACCESS_VIEW_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC& meta_struct = *data; + FieldToJson(jdata["Format"], decoded_value.Format, options); + FieldToJson(jdata["ViewDimension"], decoded_value.ViewDimension, options); + switch (decoded_value.ViewDimension) + { + case D3D11_UAV_DIMENSION_BUFFER: + { + FieldToJson(jdata["Buffer"], meta_struct.Buffer, options); + break; + } + case D3D11_UAV_DIMENSION_TEXTURE1D: + { + FieldToJson(jdata["Texture1D"], meta_struct.Texture1D, options); + break; + } + case D3D11_UAV_DIMENSION_TEXTURE1DARRAY: + { + FieldToJson(jdata["Texture1DArray"], meta_struct.Texture1DArray, options); + break; + } + case D3D11_UAV_DIMENSION_TEXTURE2D: + { + FieldToJson(jdata["Texture2D"], meta_struct.Texture2D, options); + break; + } + case D3D11_UAV_DIMENSION_TEXTURE2DARRAY: + { + FieldToJson(jdata["Texture2DArray"], meta_struct.Texture2DArray, options); + break; + } + case D3D11_UAV_DIMENSION_TEXTURE3D: + { + FieldToJson(jdata["Texture3D"], meta_struct.Texture3D, options); + break; + } + default: + { + break; + } + } + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SAMPLER_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_SAMPLER_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_SAMPLER_DESC& meta_struct = *data; + FieldToJson(jdata["Filter"], decoded_value.Filter, options); + FieldToJson(jdata["AddressU"], decoded_value.AddressU, options); + FieldToJson(jdata["AddressV"], decoded_value.AddressV, options); + FieldToJson(jdata["AddressW"], decoded_value.AddressW, options); + FieldToJson(jdata["MipLODBias"], decoded_value.MipLODBias, options); + FieldToJson(jdata["MaxAnisotropy"], decoded_value.MaxAnisotropy, options); + FieldToJson(jdata["ComparisonFunc"], decoded_value.ComparisonFunc, options); + FieldToJson(jdata["BorderColor"], meta_struct.BorderColor, options); + FieldToJson(jdata["MinLOD"], decoded_value.MinLOD, options); + FieldToJson(jdata["MaxLOD"], decoded_value.MaxLOD, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_QUERY_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_QUERY_DESC& meta_struct = *data; + FieldToJson(jdata["Query"], decoded_value.Query, options); + FieldToJson(jdata["MiscFlags"], decoded_value.MiscFlags, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DATA_TIMESTAMP_DISJOINT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_QUERY_DATA_TIMESTAMP_DISJOINT& decoded_value = *data->decoded_value; + const Decoded_D3D11_QUERY_DATA_TIMESTAMP_DISJOINT& meta_struct = *data; + FieldToJson(jdata["Frequency"], decoded_value.Frequency, options); + Bool32ToJson(jdata["Disjoint"], decoded_value.Disjoint, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DATA_PIPELINE_STATISTICS* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_QUERY_DATA_PIPELINE_STATISTICS& decoded_value = *data->decoded_value; + const Decoded_D3D11_QUERY_DATA_PIPELINE_STATISTICS& meta_struct = *data; + FieldToJson(jdata["IAVertices"], decoded_value.IAVertices, options); + FieldToJson(jdata["IAPrimitives"], decoded_value.IAPrimitives, options); + FieldToJson(jdata["VSInvocations"], decoded_value.VSInvocations, options); + FieldToJson(jdata["GSInvocations"], decoded_value.GSInvocations, options); + FieldToJson(jdata["GSPrimitives"], decoded_value.GSPrimitives, options); + FieldToJson(jdata["CInvocations"], decoded_value.CInvocations, options); + FieldToJson(jdata["CPrimitives"], decoded_value.CPrimitives, options); + FieldToJson(jdata["PSInvocations"], decoded_value.PSInvocations, options); + FieldToJson(jdata["HSInvocations"], decoded_value.HSInvocations, options); + FieldToJson(jdata["DSInvocations"], decoded_value.DSInvocations, options); + FieldToJson(jdata["CSInvocations"], decoded_value.CSInvocations, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DATA_SO_STATISTICS* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_QUERY_DATA_SO_STATISTICS& decoded_value = *data->decoded_value; + const Decoded_D3D11_QUERY_DATA_SO_STATISTICS& meta_struct = *data; + FieldToJson(jdata["NumPrimitivesWritten"], decoded_value.NumPrimitivesWritten, options); + FieldToJson(jdata["PrimitivesStorageNeeded"], decoded_value.PrimitivesStorageNeeded, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_COUNTER_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_COUNTER_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_COUNTER_DESC& meta_struct = *data; + FieldToJson(jdata["Counter"], decoded_value.Counter, options); + FieldToJson(jdata["MiscFlags"], decoded_value.MiscFlags, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_COUNTER_INFO* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_COUNTER_INFO& decoded_value = *data->decoded_value; + const Decoded_D3D11_COUNTER_INFO& meta_struct = *data; + FieldToJson(jdata["LastDeviceDependentCounter"], decoded_value.LastDeviceDependentCounter, options); + FieldToJson(jdata["NumSimultaneousCounters"], decoded_value.NumSimultaneousCounters, options); + FieldToJson(jdata["NumDetectableParallelUnits"], decoded_value.NumDetectableParallelUnits, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_CLASS_INSTANCE_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_CLASS_INSTANCE_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_CLASS_INSTANCE_DESC& meta_struct = *data; + FieldToJson(jdata["InstanceId"], decoded_value.InstanceId, options); + FieldToJson(jdata["InstanceIndex"], decoded_value.InstanceIndex, options); + FieldToJson(jdata["TypeId"], decoded_value.TypeId, options); + FieldToJson(jdata["ConstantBuffer"], decoded_value.ConstantBuffer, options); + FieldToJson(jdata["BaseConstantBufferOffset"], decoded_value.BaseConstantBufferOffset, options); + FieldToJson(jdata["BaseTexture"], decoded_value.BaseTexture, options); + FieldToJson(jdata["BaseSampler"], decoded_value.BaseSampler, options); + Bool32ToJson(jdata["Created"], decoded_value.Created, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_THREADING* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_THREADING& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_THREADING& meta_struct = *data; + Bool32ToJson(jdata["DriverConcurrentCreates"], decoded_value.DriverConcurrentCreates, options); + Bool32ToJson(jdata["DriverCommandLists"], decoded_value.DriverCommandLists, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_DOUBLES* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_DOUBLES& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_DOUBLES& meta_struct = *data; + Bool32ToJson(jdata["DoublePrecisionFloatShaderOps"], decoded_value.DoublePrecisionFloatShaderOps, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_FORMAT_SUPPORT& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT& meta_struct = *data; + FieldToJson(jdata["InFormat"], decoded_value.InFormat, options); + FieldToJson(jdata["OutFormatSupport"], decoded_value.OutFormatSupport, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT2* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_FORMAT_SUPPORT2& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT2& meta_struct = *data; + FieldToJson(jdata["InFormat"], decoded_value.InFormat, options); + FieldToJson(jdata["OutFormatSupport2"], decoded_value.OutFormatSupport2, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS& meta_struct = *data; + Bool32ToJson(jdata["ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x"], decoded_value.ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_D3D11_OPTIONS& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS& meta_struct = *data; + Bool32ToJson(jdata["OutputMergerLogicOp"], decoded_value.OutputMergerLogicOp, options); + Bool32ToJson(jdata["UAVOnlyRenderingForcedSampleCount"], decoded_value.UAVOnlyRenderingForcedSampleCount, options); + Bool32ToJson(jdata["DiscardAPIsSeenByDriver"], decoded_value.DiscardAPIsSeenByDriver, options); + Bool32ToJson(jdata["FlagsForUpdateAndCopySeenByDriver"], decoded_value.FlagsForUpdateAndCopySeenByDriver, options); + Bool32ToJson(jdata["ClearView"], decoded_value.ClearView, options); + Bool32ToJson(jdata["CopyWithOverlap"], decoded_value.CopyWithOverlap, options); + Bool32ToJson(jdata["ConstantBufferPartialUpdate"], decoded_value.ConstantBufferPartialUpdate, options); + Bool32ToJson(jdata["ConstantBufferOffsetting"], decoded_value.ConstantBufferOffsetting, options); + Bool32ToJson(jdata["MapNoOverwriteOnDynamicConstantBuffer"], decoded_value.MapNoOverwriteOnDynamicConstantBuffer, options); + Bool32ToJson(jdata["MapNoOverwriteOnDynamicBufferSRV"], decoded_value.MapNoOverwriteOnDynamicBufferSRV, options); + Bool32ToJson(jdata["MultisampleRTVWithForcedSampleCountOne"], decoded_value.MultisampleRTVWithForcedSampleCountOne, options); + Bool32ToJson(jdata["SAD4ShaderInstructions"], decoded_value.SAD4ShaderInstructions, options); + Bool32ToJson(jdata["ExtendedDoublesShaderInstructions"], decoded_value.ExtendedDoublesShaderInstructions, options); + Bool32ToJson(jdata["ExtendedResourceSharing"], decoded_value.ExtendedResourceSharing, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_ARCHITECTURE_INFO* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_ARCHITECTURE_INFO& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_ARCHITECTURE_INFO& meta_struct = *data; + Bool32ToJson(jdata["TileBasedDeferredRenderer"], decoded_value.TileBasedDeferredRenderer, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_D3D9_OPTIONS& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS& meta_struct = *data; + Bool32ToJson(jdata["FullNonPow2TextureSupport"], decoded_value.FullNonPow2TextureSupport, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT& meta_struct = *data; + Bool32ToJson(jdata["SupportsDepthAsTextureWithLessEqualComparisonFilter"], decoded_value.SupportsDepthAsTextureWithLessEqualComparisonFilter, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT& meta_struct = *data; + FieldToJson(jdata["PixelShaderMinPrecision"], decoded_value.PixelShaderMinPrecision, options); + FieldToJson(jdata["AllOtherShaderStagesMinPrecision"], decoded_value.AllOtherShaderStagesMinPrecision, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_D3D11_OPTIONS1& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS1& meta_struct = *data; + FieldToJson(jdata["TiledResourcesTier"], decoded_value.TiledResourcesTier, options); + Bool32ToJson(jdata["MinMaxFiltering"], decoded_value.MinMaxFiltering, options); + Bool32ToJson(jdata["ClearViewAlsoSupportsDepthOnlyFormats"], decoded_value.ClearViewAlsoSupportsDepthOnlyFormats, options); + Bool32ToJson(jdata["MapOnDefaultBuffers"], decoded_value.MapOnDefaultBuffers, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT& meta_struct = *data; + Bool32ToJson(jdata["SimpleInstancingSupported"], decoded_value.SimpleInstancingSupported, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_MARKER_SUPPORT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_MARKER_SUPPORT& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_MARKER_SUPPORT& meta_struct = *data; + Bool32ToJson(jdata["Profile"], decoded_value.Profile, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_D3D9_OPTIONS1& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS1& meta_struct = *data; + Bool32ToJson(jdata["FullNonPow2TextureSupported"], decoded_value.FullNonPow2TextureSupported, options); + Bool32ToJson(jdata["DepthAsTextureWithLessEqualComparisonFilterSupported"], decoded_value.DepthAsTextureWithLessEqualComparisonFilterSupported, options); + Bool32ToJson(jdata["SimpleInstancingSupported"], decoded_value.SimpleInstancingSupported, options); + Bool32ToJson(jdata["TextureCubeFaceRenderTargetWithNonCubeDepthStencilSupported"], decoded_value.TextureCubeFaceRenderTargetWithNonCubeDepthStencilSupported, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS2* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_D3D11_OPTIONS2& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS2& meta_struct = *data; + Bool32ToJson(jdata["PSSpecifiedStencilRefSupported"], decoded_value.PSSpecifiedStencilRefSupported, options); + Bool32ToJson(jdata["TypedUAVLoadAdditionalFormats"], decoded_value.TypedUAVLoadAdditionalFormats, options); + Bool32ToJson(jdata["ROVsSupported"], decoded_value.ROVsSupported, options); + FieldToJson(jdata["ConservativeRasterizationTier"], decoded_value.ConservativeRasterizationTier, options); + FieldToJson(jdata["TiledResourcesTier"], decoded_value.TiledResourcesTier, options); + Bool32ToJson(jdata["MapOnDefaultTextures"], decoded_value.MapOnDefaultTextures, options); + Bool32ToJson(jdata["StandardSwizzle"], decoded_value.StandardSwizzle, options); + Bool32ToJson(jdata["UnifiedMemoryArchitecture"], decoded_value.UnifiedMemoryArchitecture, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS3* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_D3D11_OPTIONS3& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS3& meta_struct = *data; + Bool32ToJson(jdata["VPAndRTArrayIndexFromAnyShaderFeedingRasterizer"], decoded_value.VPAndRTArrayIndexFromAnyShaderFeedingRasterizer, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT& meta_struct = *data; + FieldToJson(jdata["MaxGPUVirtualAddressBitsPerResource"], decoded_value.MaxGPUVirtualAddressBitsPerResource, options); + FieldToJson(jdata["MaxGPUVirtualAddressBitsPerProcess"], decoded_value.MaxGPUVirtualAddressBitsPerProcess, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_SHADER_CACHE* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_SHADER_CACHE& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_SHADER_CACHE& meta_struct = *data; + FieldToJson(jdata["SupportFlags"], decoded_value.SupportFlags, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS5* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_D3D11_OPTIONS5& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS5& meta_struct = *data; + FieldToJson(jdata["SharedResourceTier"], decoded_value.SharedResourceTier, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_CD3D11_VIDEO_DEFAULT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const CD3D11_VIDEO_DEFAULT& decoded_value = *data->decoded_value; + const Decoded_CD3D11_VIDEO_DEFAULT& meta_struct = *data; + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_DECODER_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_DECODER_DESC& meta_struct = *data; + FieldToJson(jdata["Guid"], meta_struct.Guid, options); + FieldToJson(jdata["SampleWidth"], decoded_value.SampleWidth, options); + FieldToJson(jdata["SampleHeight"], decoded_value.SampleHeight, options); + FieldToJson(jdata["OutputFormat"], decoded_value.OutputFormat, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_CONFIG* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_DECODER_CONFIG& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_DECODER_CONFIG& meta_struct = *data; + FieldToJson(jdata["guidConfigBitstreamEncryption"], meta_struct.guidConfigBitstreamEncryption, options); + FieldToJson(jdata["guidConfigMBcontrolEncryption"], meta_struct.guidConfigMBcontrolEncryption, options); + FieldToJson(jdata["guidConfigResidDiffEncryption"], meta_struct.guidConfigResidDiffEncryption, options); + FieldToJson(jdata["ConfigBitstreamRaw"], decoded_value.ConfigBitstreamRaw, options); + FieldToJson(jdata["ConfigMBcontrolRasterOrder"], decoded_value.ConfigMBcontrolRasterOrder, options); + FieldToJson(jdata["ConfigResidDiffHost"], decoded_value.ConfigResidDiffHost, options); + FieldToJson(jdata["ConfigSpatialResid8"], decoded_value.ConfigSpatialResid8, options); + FieldToJson(jdata["ConfigResid8Subtraction"], decoded_value.ConfigResid8Subtraction, options); + FieldToJson(jdata["ConfigSpatialHost8or9Clipping"], decoded_value.ConfigSpatialHost8or9Clipping, options); + FieldToJson(jdata["ConfigSpatialResidInterleaved"], decoded_value.ConfigSpatialResidInterleaved, options); + FieldToJson(jdata["ConfigIntraResidUnsigned"], decoded_value.ConfigIntraResidUnsigned, options); + FieldToJson(jdata["ConfigResidDiffAccelerator"], decoded_value.ConfigResidDiffAccelerator, options); + FieldToJson(jdata["ConfigHostInverseScan"], decoded_value.ConfigHostInverseScan, options); + FieldToJson(jdata["ConfigSpecificIDCT"], decoded_value.ConfigSpecificIDCT, options); + FieldToJson(jdata["Config4GroupedCoefs"], decoded_value.Config4GroupedCoefs, options); + FieldToJson(jdata["ConfigMinRenderTargetBuffCount"], decoded_value.ConfigMinRenderTargetBuffCount, options); + FieldToJson(jdata["ConfigDecoderSpecific"], decoded_value.ConfigDecoderSpecific, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AES_CTR_IV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AES_CTR_IV& decoded_value = *data->decoded_value; + const Decoded_D3D11_AES_CTR_IV& meta_struct = *data; + FieldToJson(jdata["IV"], decoded_value.IV, options); + FieldToJson(jdata["Count"], decoded_value.Count, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_ENCRYPTED_BLOCK_INFO* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_ENCRYPTED_BLOCK_INFO& decoded_value = *data->decoded_value; + const Decoded_D3D11_ENCRYPTED_BLOCK_INFO& meta_struct = *data; + FieldToJson(jdata["NumEncryptedBytesAtBeginning"], decoded_value.NumEncryptedBytesAtBeginning, options); + FieldToJson(jdata["NumBytesInSkipPattern"], decoded_value.NumBytesInSkipPattern, options); + FieldToJson(jdata["NumBytesInEncryptPattern"], decoded_value.NumBytesInEncryptPattern, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_DECODER_BUFFER_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC& meta_struct = *data; + FieldToJson(jdata["BufferType"], decoded_value.BufferType, options); + FieldToJson(jdata["BufferIndex"], decoded_value.BufferIndex, options); + FieldToJson(jdata["DataOffset"], decoded_value.DataOffset, options); + FieldToJson(jdata["DataSize"], decoded_value.DataSize, options); + FieldToJson(jdata["FirstMBaddress"], decoded_value.FirstMBaddress, options); + FieldToJson(jdata["NumMBsInBuffer"], decoded_value.NumMBsInBuffer, options); + FieldToJson(jdata["Width"], decoded_value.Width, options); + FieldToJson(jdata["Height"], decoded_value.Height, options); + FieldToJson(jdata["Stride"], decoded_value.Stride, options); + FieldToJson(jdata["ReservedBits"], decoded_value.ReservedBits, options); + FieldToJson(jdata["pIV"], meta_struct.pIV, options); + FieldToJson(jdata["IVSize"], decoded_value.IVSize, options); + Bool32ToJson(jdata["PartialEncryption"], decoded_value.PartialEncryption, options); + FieldToJson(jdata["EncryptedBlockInfo"], meta_struct.EncryptedBlockInfo, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_EXTENSION* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_DECODER_EXTENSION& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_DECODER_EXTENSION& meta_struct = *data; + FieldToJson(jdata["Function"], decoded_value.Function, options); + FieldToJson(jdata["pPrivateInputData"], meta_struct.pPrivateInputData, options); + FieldToJson(jdata["PrivateInputDataSize"], decoded_value.PrivateInputDataSize, options); + FieldToJson(jdata["pPrivateOutputData"], meta_struct.pPrivateOutputData, options); + FieldToJson(jdata["PrivateOutputDataSize"], decoded_value.PrivateOutputDataSize, options); + FieldToJson(jdata["ResourceCount"], decoded_value.ResourceCount, options); + FieldToJson(jdata["ppResourceList"], meta_struct.ppResourceList, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_CAPS* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_PROCESSOR_CAPS& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_PROCESSOR_CAPS& meta_struct = *data; + FieldToJson(jdata["DeviceCaps"], decoded_value.DeviceCaps, options); + FieldToJson(jdata["FeatureCaps"], decoded_value.FeatureCaps, options); + FieldToJson(jdata["FilterCaps"], decoded_value.FilterCaps, options); + FieldToJson(jdata["InputFormatCaps"], decoded_value.InputFormatCaps, options); + FieldToJson(jdata["AutoStreamCaps"], decoded_value.AutoStreamCaps, options); + FieldToJson(jdata["StereoCaps"], decoded_value.StereoCaps, options); + FieldToJson(jdata["RateConversionCapsCount"], decoded_value.RateConversionCapsCount, options); + FieldToJson(jdata["MaxInputStreams"], decoded_value.MaxInputStreams, options); + FieldToJson(jdata["MaxStreamStates"], decoded_value.MaxStreamStates, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS& meta_struct = *data; + FieldToJson(jdata["PastFrames"], decoded_value.PastFrames, options); + FieldToJson(jdata["FutureFrames"], decoded_value.FutureFrames, options); + FieldToJson(jdata["ProcessorCaps"], decoded_value.ProcessorCaps, options); + FieldToJson(jdata["ITelecineCaps"], decoded_value.ITelecineCaps, options); + FieldToJson(jdata["CustomRateCount"], decoded_value.CustomRateCount, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_CONTENT_PROTECTION_CAPS* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_CONTENT_PROTECTION_CAPS& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_CONTENT_PROTECTION_CAPS& meta_struct = *data; + FieldToJson(jdata["Caps"], decoded_value.Caps, options); + FieldToJson(jdata["KeyExchangeTypeCount"], decoded_value.KeyExchangeTypeCount, options); + FieldToJson(jdata["BlockAlignmentSize"], decoded_value.BlockAlignmentSize, options); + FieldToJson(jdata["ProtectedMemorySize"], decoded_value.ProtectedMemorySize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_CUSTOM_RATE* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_PROCESSOR_CUSTOM_RATE& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_PROCESSOR_CUSTOM_RATE& meta_struct = *data; + FieldToJson(jdata["CustomRate"], meta_struct.CustomRate, options); + FieldToJson(jdata["OutputFrames"], decoded_value.OutputFrames, options); + Bool32ToJson(jdata["InputInterlaced"], decoded_value.InputInterlaced, options); + FieldToJson(jdata["InputFramesOrFields"], decoded_value.InputFramesOrFields, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_FILTER_RANGE* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_PROCESSOR_FILTER_RANGE& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_PROCESSOR_FILTER_RANGE& meta_struct = *data; + FieldToJson(jdata["Minimum"], decoded_value.Minimum, options); + FieldToJson(jdata["Maximum"], decoded_value.Maximum, options); + FieldToJson(jdata["Default"], decoded_value.Default, options); + FieldToJson(jdata["Multiplier"], decoded_value.Multiplier, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_CONTENT_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_PROCESSOR_CONTENT_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_PROCESSOR_CONTENT_DESC& meta_struct = *data; + FieldToJson(jdata["InputFrameFormat"], decoded_value.InputFrameFormat, options); + FieldToJson(jdata["InputFrameRate"], meta_struct.InputFrameRate, options); + FieldToJson(jdata["InputWidth"], decoded_value.InputWidth, options); + FieldToJson(jdata["InputHeight"], decoded_value.InputHeight, options); + FieldToJson(jdata["OutputFrameRate"], meta_struct.OutputFrameRate, options); + FieldToJson(jdata["OutputWidth"], decoded_value.OutputWidth, options); + FieldToJson(jdata["OutputHeight"], decoded_value.OutputHeight, options); + FieldToJson(jdata["Usage"], decoded_value.Usage, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_COLOR_RGBA* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_COLOR_RGBA& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_COLOR_RGBA& meta_struct = *data; + FieldToJson(jdata["R"], decoded_value.R, options); + FieldToJson(jdata["G"], decoded_value.G, options); + FieldToJson(jdata["B"], decoded_value.B, options); + FieldToJson(jdata["A"], decoded_value.A, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_COLOR_YCbCrA* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_COLOR_YCbCrA& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_COLOR_YCbCrA& meta_struct = *data; + FieldToJson(jdata["Y"], decoded_value.Y, options); + FieldToJson(jdata["Cb"], decoded_value.Cb, options); + FieldToJson(jdata["Cr"], decoded_value.Cr, options); + FieldToJson(jdata["A"], decoded_value.A, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_COLOR* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_COLOR& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_COLOR& meta_struct = *data; + auto& rgba = jdata["RGBA"]; + FieldToJson(rgba["R"], decoded_value.RGBA.R, options); + FieldToJson(rgba["G"], decoded_value.RGBA.G, options); + FieldToJson(rgba["B"], decoded_value.RGBA.B, options); + FieldToJson(rgba["A"], decoded_value.RGBA.A, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_COLOR_SPACE* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_PROCESSOR_COLOR_SPACE& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_PROCESSOR_COLOR_SPACE& meta_struct = *data; + FieldToJson(jdata["Usage"], decoded_value.Usage, options); + FieldToJson(jdata["RGB_Range"], decoded_value.RGB_Range, options); + FieldToJson(jdata["YCbCr_Matrix"], decoded_value.YCbCr_Matrix, options); + FieldToJson(jdata["YCbCr_xvYCC"], decoded_value.YCbCr_xvYCC, options); + FieldToJson(jdata["Nominal_Range"], decoded_value.Nominal_Range, options); + FieldToJson(jdata["Reserved"], decoded_value.Reserved, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_STREAM* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_PROCESSOR_STREAM& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_PROCESSOR_STREAM& meta_struct = *data; + Bool32ToJson(jdata["Enable"], decoded_value.Enable, options); + FieldToJson(jdata["OutputIndex"], decoded_value.OutputIndex, options); + FieldToJson(jdata["InputFrameOrField"], decoded_value.InputFrameOrField, options); + FieldToJson(jdata["PastFrames"], decoded_value.PastFrames, options); + FieldToJson(jdata["FutureFrames"], decoded_value.FutureFrames, options); + FieldToJson(jdata["ppPastSurfaces"], meta_struct.ppPastSurfaces, options); + FieldToJson(jdata["pInputSurface"], meta_struct.pInputSurface, options); + FieldToJson(jdata["ppFutureSurfaces"], meta_struct.ppFutureSurfaces, options); + FieldToJson(jdata["ppPastSurfacesRight"], meta_struct.ppPastSurfacesRight, options); + FieldToJson(jdata["pInputSurfaceRight"], meta_struct.pInputSurfaceRight, options); + FieldToJson(jdata["ppFutureSurfacesRight"], meta_struct.ppFutureSurfacesRight, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_OMAC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_OMAC& decoded_value = *data->decoded_value; + const Decoded_D3D11_OMAC& meta_struct = *data; + FieldToJson(jdata["Omac"], meta_struct.Omac, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_INPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_INPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_INPUT& meta_struct = *data; + FieldToJson(jdata["QueryType"], meta_struct.QueryType, options); + FieldToJson(jdata["hChannel"], meta_struct.hChannel, options); + FieldToJson(jdata["SequenceNumber"], decoded_value.SequenceNumber, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT& meta_struct = *data; + FieldToJson(jdata["omac"], meta_struct.omac, options); + FieldToJson(jdata["QueryType"], meta_struct.QueryType, options); + FieldToJson(jdata["hChannel"], meta_struct.hChannel, options); + FieldToJson(jdata["SequenceNumber"], decoded_value.SequenceNumber, options); + HresultToJson(jdata["ReturnCode"], decoded_value.ReturnCode, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT& meta_struct = *data; + FieldToJson(jdata["Output"], meta_struct.Output, options); + FieldToJson(jdata["ProtectionFlags"], meta_struct.ProtectionFlags, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT& meta_struct = *data; + FieldToJson(jdata["Output"], meta_struct.Output, options); + FieldToJson(jdata["ChannelType"], decoded_value.ChannelType, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT& meta_struct = *data; + FieldToJson(jdata["Output"], meta_struct.Output, options); + FieldToJson(jdata["DeviceHandle"], meta_struct.DeviceHandle, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT& meta_struct = *data; + FieldToJson(jdata["Input"], meta_struct.Input, options); + FieldToJson(jdata["DecoderHandle"], meta_struct.DecoderHandle, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT& meta_struct = *data; + FieldToJson(jdata["Output"], meta_struct.Output, options); + FieldToJson(jdata["DecoderHandle"], meta_struct.DecoderHandle, options); + FieldToJson(jdata["CryptoSessionHandle"], meta_struct.CryptoSessionHandle, options); + FieldToJson(jdata["DeviceHandle"], meta_struct.DeviceHandle, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT& meta_struct = *data; + FieldToJson(jdata["Output"], meta_struct.Output, options); + FieldToJson(jdata["RestrictedSharedResourceProcessCount"], decoded_value.RestrictedSharedResourceProcessCount, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT& meta_struct = *data; + FieldToJson(jdata["Input"], meta_struct.Input, options); + FieldToJson(jdata["ProcessIndex"], decoded_value.ProcessIndex, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT& meta_struct = *data; + FieldToJson(jdata["Output"], meta_struct.Output, options); + FieldToJson(jdata["ProcessIndex"], decoded_value.ProcessIndex, options); + FieldToJson(jdata["ProcessIdentifier"], decoded_value.ProcessIdentifier, options); + FieldToJson(jdata["ProcessHandle"], meta_struct.ProcessHandle, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT& meta_struct = *data; + FieldToJson(jdata["Output"], meta_struct.Output, options); + FieldToJson(jdata["UnrestrictedProtectedSharedResourceCount"], decoded_value.UnrestrictedProtectedSharedResourceCount, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT& meta_struct = *data; + FieldToJson(jdata["Input"], meta_struct.Input, options); + FieldToJson(jdata["DeviceHandle"], meta_struct.DeviceHandle, options); + FieldToJson(jdata["CryptoSessionHandle"], meta_struct.CryptoSessionHandle, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT& meta_struct = *data; + FieldToJson(jdata["Output"], meta_struct.Output, options); + FieldToJson(jdata["DeviceHandle"], meta_struct.DeviceHandle, options); + FieldToJson(jdata["CryptoSessionHandle"], meta_struct.CryptoSessionHandle, options); + FieldToJson(jdata["OutputIDCount"], decoded_value.OutputIDCount, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT& meta_struct = *data; + FieldToJson(jdata["Input"], meta_struct.Input, options); + FieldToJson(jdata["DeviceHandle"], meta_struct.DeviceHandle, options); + FieldToJson(jdata["CryptoSessionHandle"], meta_struct.CryptoSessionHandle, options); + FieldToJson(jdata["OutputIDIndex"], decoded_value.OutputIDIndex, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT& meta_struct = *data; + FieldToJson(jdata["Output"], meta_struct.Output, options); + FieldToJson(jdata["DeviceHandle"], meta_struct.DeviceHandle, options); + FieldToJson(jdata["CryptoSessionHandle"], meta_struct.CryptoSessionHandle, options); + FieldToJson(jdata["OutputIDIndex"], decoded_value.OutputIDIndex, options); + FieldToJson(jdata["OutputID"], decoded_value.OutputID, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT& meta_struct = *data; + FieldToJson(jdata["Output"], meta_struct.Output, options); + FieldToJson(jdata["BusType"], decoded_value.BusType, options); + Bool32ToJson(jdata["AccessibleInContiguousBlocks"], decoded_value.AccessibleInContiguousBlocks, options); + Bool32ToJson(jdata["AccessibleInNonContiguousBlocks"], decoded_value.AccessibleInNonContiguousBlocks, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT& meta_struct = *data; + FieldToJson(jdata["Output"], meta_struct.Output, options); + FieldToJson(jdata["EncryptionGuidCount"], decoded_value.EncryptionGuidCount, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT& meta_struct = *data; + FieldToJson(jdata["Input"], meta_struct.Input, options); + FieldToJson(jdata["EncryptionGuidIndex"], decoded_value.EncryptionGuidIndex, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT& meta_struct = *data; + FieldToJson(jdata["Output"], meta_struct.Output, options); + FieldToJson(jdata["EncryptionGuidIndex"], decoded_value.EncryptionGuidIndex, options); + FieldToJson(jdata["EncryptionGuid"], meta_struct.EncryptionGuid, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT& meta_struct = *data; + FieldToJson(jdata["Output"], meta_struct.Output, options); + FieldToJson(jdata["EncryptionGuid"], meta_struct.EncryptionGuid, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_INPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_CONFIGURE_INPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_CONFIGURE_INPUT& meta_struct = *data; + FieldToJson(jdata["omac"], meta_struct.omac, options); + FieldToJson(jdata["ConfigureType"], meta_struct.ConfigureType, options); + FieldToJson(jdata["hChannel"], meta_struct.hChannel, options); + FieldToJson(jdata["SequenceNumber"], decoded_value.SequenceNumber, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_OUTPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_CONFIGURE_OUTPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_CONFIGURE_OUTPUT& meta_struct = *data; + FieldToJson(jdata["omac"], meta_struct.omac, options); + FieldToJson(jdata["ConfigureType"], meta_struct.ConfigureType, options); + FieldToJson(jdata["hChannel"], meta_struct.hChannel, options); + FieldToJson(jdata["SequenceNumber"], decoded_value.SequenceNumber, options); + HresultToJson(jdata["ReturnCode"], decoded_value.ReturnCode, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT& meta_struct = *data; + FieldToJson(jdata["Parameters"], meta_struct.Parameters, options); + FieldToJson(jdata["StartSequenceQuery"], decoded_value.StartSequenceQuery, options); + FieldToJson(jdata["StartSequenceConfigure"], decoded_value.StartSequenceConfigure, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT& meta_struct = *data; + FieldToJson(jdata["Parameters"], meta_struct.Parameters, options); + FieldToJson(jdata["Protections"], meta_struct.Protections, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT& meta_struct = *data; + FieldToJson(jdata["Parameters"], meta_struct.Parameters, options); + FieldToJson(jdata["DecoderHandle"], meta_struct.DecoderHandle, options); + FieldToJson(jdata["CryptoSessionHandle"], meta_struct.CryptoSessionHandle, options); + FieldToJson(jdata["DeviceHandle"], meta_struct.DeviceHandle, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT& meta_struct = *data; + FieldToJson(jdata["Parameters"], meta_struct.Parameters, options); + FieldToJson(jdata["ProcessType"], decoded_value.ProcessType, options); + FieldToJson(jdata["ProcessHandle"], meta_struct.ProcessHandle, options); + Bool32ToJson(jdata["AllowAccess"], decoded_value.AllowAccess, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT& decoded_value = *data->decoded_value; + const Decoded_D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT& meta_struct = *data; + FieldToJson(jdata["Parameters"], meta_struct.Parameters, options); + FieldToJson(jdata["EncryptionGuid"], meta_struct.EncryptionGuid, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_VDOV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_VDOV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_VDOV& meta_struct = *data; + FieldToJson(jdata["ArraySlice"], decoded_value.ArraySlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC& meta_struct = *data; + FieldToJson(jdata["DecodeProfile"], meta_struct.DecodeProfile, options); + FieldToJson(jdata["ViewDimension"], decoded_value.ViewDimension, options); + switch (decoded_value.ViewDimension) + { + case D3D11_VDOV_DIMENSION_TEXTURE2D: + { + FieldToJson(jdata["Texture2D"], meta_struct.Texture2D, options); + break; + } + default: + { + break; + } + } + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_VPIV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_VPIV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_VPIV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + FieldToJson(jdata["ArraySlice"], decoded_value.ArraySlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC& meta_struct = *data; + FieldToJson(jdata["FourCC"], decoded_value.FourCC, options); + FieldToJson(jdata["ViewDimension"], decoded_value.ViewDimension, options); + switch (decoded_value.ViewDimension) + { + case D3D11_VPIV_DIMENSION_TEXTURE2D: + { + FieldToJson(jdata["Texture2D"], meta_struct.Texture2D, options); + break; + } + default: + { + break; + } + } + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_VPOV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_VPOV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_VPOV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_VPOV* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_ARRAY_VPOV& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_ARRAY_VPOV& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC& meta_struct = *data; + FieldToJson(jdata["ViewDimension"], decoded_value.ViewDimension, options); + switch (decoded_value.ViewDimension) + { + case D3D11_VPOV_DIMENSION_TEXTURE2D: + { + FieldToJson(jdata["Texture2D"], meta_struct.Texture2D, options); + break; + } + case D3D11_VPOV_DIMENSION_TEXTURE2DARRAY: + { + FieldToJson(jdata["Texture2DArray"], meta_struct.Texture2DArray, options); + break; + } + default: + { + break; + } + } + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RENDER_TARGET_BLEND_DESC1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_RENDER_TARGET_BLEND_DESC1& decoded_value = *data->decoded_value; + const Decoded_D3D11_RENDER_TARGET_BLEND_DESC1& meta_struct = *data; + Bool32ToJson(jdata["BlendEnable"], decoded_value.BlendEnable, options); + Bool32ToJson(jdata["LogicOpEnable"], decoded_value.LogicOpEnable, options); + FieldToJson(jdata["SrcBlend"], decoded_value.SrcBlend, options); + FieldToJson(jdata["DestBlend"], decoded_value.DestBlend, options); + FieldToJson(jdata["BlendOp"], decoded_value.BlendOp, options); + FieldToJson(jdata["SrcBlendAlpha"], decoded_value.SrcBlendAlpha, options); + FieldToJson(jdata["DestBlendAlpha"], decoded_value.DestBlendAlpha, options); + FieldToJson(jdata["BlendOpAlpha"], decoded_value.BlendOpAlpha, options); + FieldToJson(jdata["LogicOp"], decoded_value.LogicOp, options); + FieldToJsonAsFixedWidthBinary(jdata["RenderTargetWriteMask"], decoded_value.RenderTargetWriteMask, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BLEND_DESC1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_BLEND_DESC1& decoded_value = *data->decoded_value; + const Decoded_D3D11_BLEND_DESC1& meta_struct = *data; + Bool32ToJson(jdata["AlphaToCoverageEnable"], decoded_value.AlphaToCoverageEnable, options); + Bool32ToJson(jdata["IndependentBlendEnable"], decoded_value.IndependentBlendEnable, options); + FieldToJson(jdata["RenderTarget"], meta_struct.RenderTarget, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RASTERIZER_DESC1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_RASTERIZER_DESC1& decoded_value = *data->decoded_value; + const Decoded_D3D11_RASTERIZER_DESC1& meta_struct = *data; + FieldToJson(jdata["FillMode"], decoded_value.FillMode, options); + FieldToJson(jdata["CullMode"], decoded_value.CullMode, options); + Bool32ToJson(jdata["FrontCounterClockwise"], decoded_value.FrontCounterClockwise, options); + FieldToJson(jdata["DepthBias"], decoded_value.DepthBias, options); + FieldToJson(jdata["DepthBiasClamp"], decoded_value.DepthBiasClamp, options); + FieldToJson(jdata["SlopeScaledDepthBias"], decoded_value.SlopeScaledDepthBias, options); + Bool32ToJson(jdata["DepthClipEnable"], decoded_value.DepthClipEnable, options); + Bool32ToJson(jdata["ScissorEnable"], decoded_value.ScissorEnable, options); + Bool32ToJson(jdata["MultisampleEnable"], decoded_value.MultisampleEnable, options); + Bool32ToJson(jdata["AntialiasedLineEnable"], decoded_value.AntialiasedLineEnable, options); + FieldToJson(jdata["ForcedSampleCount"], decoded_value.ForcedSampleCount, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK& meta_struct = *data; + FieldToJson(jdata["ClearSize"], decoded_value.ClearSize, options); + FieldToJson(jdata["EncryptedSize"], decoded_value.EncryptedSize, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_DECODER_BUFFER_DESC1& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC1& meta_struct = *data; + FieldToJson(jdata["BufferType"], decoded_value.BufferType, options); + FieldToJson(jdata["DataOffset"], decoded_value.DataOffset, options); + FieldToJson(jdata["DataSize"], decoded_value.DataSize, options); + FieldToJson(jdata["pIV"], meta_struct.pIV, options); + FieldToJson(jdata["IVSize"], decoded_value.IVSize, options); + FieldToJson(jdata["pSubSampleMappingBlock"], meta_struct.pSubSampleMappingBlock, options); + FieldToJson(jdata["SubSampleMappingCount"], decoded_value.SubSampleMappingCount, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION& meta_struct = *data; + FieldToJson(jdata["pCryptoSession"], meta_struct.pCryptoSession, options); + FieldToJson(jdata["BlobSize"], decoded_value.BlobSize, options); + FieldToJson(jdata["pBlob"], meta_struct.pBlob, options); + FieldToJson(jdata["pKeyInfoId"], meta_struct.pKeyInfoId, options); + FieldToJson(jdata["PrivateDataSize"], decoded_value.PrivateDataSize, options); + FieldToJson(jdata["pPrivateData"], meta_struct.pPrivateData, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT& meta_struct = *data; + Bool32ToJson(jdata["Enable"], decoded_value.Enable, options); + FieldToJson(jdata["Width"], decoded_value.Width, options); + FieldToJson(jdata["Height"], decoded_value.Height, options); + FieldToJson(jdata["Format"], decoded_value.Format, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA& decoded_value = *data->decoded_value; + const Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA& meta_struct = *data; + FieldToJson(jdata["PrivateDataSize"], decoded_value.PrivateDataSize, options); + FieldToJson(jdata["HWProtectionDataSize"], decoded_value.HWProtectionDataSize, options); + FieldToJson(jdata["pbInput"], meta_struct.pbInput, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA& decoded_value = *data->decoded_value; + const Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA& meta_struct = *data; + FieldToJson(jdata["PrivateDataSize"], decoded_value.PrivateDataSize, options); + FieldToJson(jdata["MaxHWProtectionDataSize"], decoded_value.MaxHWProtectionDataSize, options); + FieldToJson(jdata["HWProtectionDataSize"], decoded_value.HWProtectionDataSize, options); + FieldToJson(jdata["TransportTime"], decoded_value.TransportTime, options); + FieldToJson(jdata["ExecutionTime"], decoded_value.ExecutionTime, options); + FieldToJson(jdata["pbOutput"], meta_struct.pbOutput, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA& decoded_value = *data->decoded_value; + const Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA& meta_struct = *data; + FieldToJson(jdata["HWProtectionFunctionID"], decoded_value.HWProtectionFunctionID, options); + FieldToJson(jdata["pInputData"], meta_struct.pInputData, options); + FieldToJson(jdata["pOutputData"], meta_struct.pOutputData, options); + HresultToJson(jdata["Status"], decoded_value.Status, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_SAMPLE_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_SAMPLE_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_SAMPLE_DESC& meta_struct = *data; + FieldToJson(jdata["Width"], decoded_value.Width, options); + FieldToJson(jdata["Height"], decoded_value.Height, options); + FieldToJson(jdata["Format"], decoded_value.Format, options); + FieldToJson(jdata["ColorSpace"], decoded_value.ColorSpace, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TILED_RESOURCE_COORDINATE* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TILED_RESOURCE_COORDINATE& decoded_value = *data->decoded_value; + const Decoded_D3D11_TILED_RESOURCE_COORDINATE& meta_struct = *data; + FieldToJson(jdata["X"], decoded_value.X, options); + FieldToJson(jdata["Y"], decoded_value.Y, options); + FieldToJson(jdata["Z"], decoded_value.Z, options); + FieldToJson(jdata["Subresource"], decoded_value.Subresource, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TILE_REGION_SIZE* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TILE_REGION_SIZE& decoded_value = *data->decoded_value; + const Decoded_D3D11_TILE_REGION_SIZE& meta_struct = *data; + FieldToJson(jdata["NumTiles"], decoded_value.NumTiles, options); + Bool32ToJson(jdata["bUseBox"], decoded_value.bUseBox, options); + FieldToJson(jdata["Width"], decoded_value.Width, options); + FieldToJson(jdata["Height"], decoded_value.Height, options); + FieldToJson(jdata["Depth"], decoded_value.Depth, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SUBRESOURCE_TILING* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_SUBRESOURCE_TILING& decoded_value = *data->decoded_value; + const Decoded_D3D11_SUBRESOURCE_TILING& meta_struct = *data; + FieldToJson(jdata["WidthInTiles"], decoded_value.WidthInTiles, options); + FieldToJson(jdata["HeightInTiles"], decoded_value.HeightInTiles, options); + FieldToJson(jdata["DepthInTiles"], decoded_value.DepthInTiles, options); + FieldToJson(jdata["StartTileIndexInOverallResource"], decoded_value.StartTileIndexInOverallResource, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TILE_SHAPE* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TILE_SHAPE& decoded_value = *data->decoded_value; + const Decoded_D3D11_TILE_SHAPE& meta_struct = *data; + FieldToJson(jdata["WidthInTexels"], decoded_value.WidthInTexels, options); + FieldToJson(jdata["HeightInTexels"], decoded_value.HeightInTexels, options); + FieldToJson(jdata["DepthInTexels"], decoded_value.DepthInTexels, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_PACKED_MIP_DESC* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_PACKED_MIP_DESC& decoded_value = *data->decoded_value; + const Decoded_D3D11_PACKED_MIP_DESC& meta_struct = *data; + FieldToJson(jdata["NumStandardMips"], decoded_value.NumStandardMips, options); + FieldToJson(jdata["NumPackedMips"], decoded_value.NumPackedMips, options); + FieldToJson(jdata["NumTilesForPackedMips"], decoded_value.NumTilesForPackedMips, options); + FieldToJson(jdata["StartTileIndexInOverallResource"], decoded_value.StartTileIndexInOverallResource, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE2D_DESC1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEXTURE2D_DESC1& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEXTURE2D_DESC1& meta_struct = *data; + FieldToJson(jdata["Width"], decoded_value.Width, options); + FieldToJson(jdata["Height"], decoded_value.Height, options); + FieldToJson(jdata["MipLevels"], decoded_value.MipLevels, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + FieldToJson(jdata["Format"], decoded_value.Format, options); + FieldToJson(jdata["SampleDesc"], meta_struct.SampleDesc, options); + FieldToJson(jdata["Usage"], decoded_value.Usage, options); + FieldToJson(jdata["BindFlags"], decoded_value.BindFlags, options); + FieldToJson(jdata["CPUAccessFlags"], decoded_value.CPUAccessFlags, options); + FieldToJson(jdata["MiscFlags"], decoded_value.MiscFlags, options); + FieldToJson(jdata["TextureLayout"], decoded_value.TextureLayout, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE3D_DESC1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEXTURE3D_DESC1& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEXTURE3D_DESC1& meta_struct = *data; + FieldToJson(jdata["Width"], decoded_value.Width, options); + FieldToJson(jdata["Height"], decoded_value.Height, options); + FieldToJson(jdata["Depth"], decoded_value.Depth, options); + FieldToJson(jdata["MipLevels"], decoded_value.MipLevels, options); + FieldToJson(jdata["Format"], decoded_value.Format, options); + FieldToJson(jdata["Usage"], decoded_value.Usage, options); + FieldToJson(jdata["BindFlags"], decoded_value.BindFlags, options); + FieldToJson(jdata["CPUAccessFlags"], decoded_value.CPUAccessFlags, options); + FieldToJson(jdata["MiscFlags"], decoded_value.MiscFlags, options); + FieldToJson(jdata["TextureLayout"], decoded_value.TextureLayout, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RASTERIZER_DESC2* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_RASTERIZER_DESC2& decoded_value = *data->decoded_value; + const Decoded_D3D11_RASTERIZER_DESC2& meta_struct = *data; + FieldToJson(jdata["FillMode"], decoded_value.FillMode, options); + FieldToJson(jdata["CullMode"], decoded_value.CullMode, options); + Bool32ToJson(jdata["FrontCounterClockwise"], decoded_value.FrontCounterClockwise, options); + FieldToJson(jdata["DepthBias"], decoded_value.DepthBias, options); + FieldToJson(jdata["DepthBiasClamp"], decoded_value.DepthBiasClamp, options); + FieldToJson(jdata["SlopeScaledDepthBias"], decoded_value.SlopeScaledDepthBias, options); + Bool32ToJson(jdata["DepthClipEnable"], decoded_value.DepthClipEnable, options); + Bool32ToJson(jdata["ScissorEnable"], decoded_value.ScissorEnable, options); + Bool32ToJson(jdata["MultisampleEnable"], decoded_value.MultisampleEnable, options); + Bool32ToJson(jdata["AntialiasedLineEnable"], decoded_value.AntialiasedLineEnable, options); + FieldToJson(jdata["ForcedSampleCount"], decoded_value.ForcedSampleCount, options); + FieldToJson(jdata["ConservativeRaster"], decoded_value.ConservativeRaster, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_SRV1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_SRV1& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_SRV1& meta_struct = *data; + FieldToJson(jdata["MostDetailedMip"], decoded_value.MostDetailedMip, options); + FieldToJson(jdata["MipLevels"], decoded_value.MipLevels, options); + FieldToJson(jdata["PlaneSlice"], decoded_value.PlaneSlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_SRV1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_ARRAY_SRV1& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_ARRAY_SRV1& meta_struct = *data; + FieldToJson(jdata["MostDetailedMip"], decoded_value.MostDetailedMip, options); + FieldToJson(jdata["MipLevels"], decoded_value.MipLevels, options); + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + FieldToJson(jdata["PlaneSlice"], decoded_value.PlaneSlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_SHADER_RESOURCE_VIEW_DESC1& decoded_value = *data->decoded_value; + const Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC1& meta_struct = *data; + FieldToJson(jdata["Format"], decoded_value.Format, options); + FieldToJson(jdata["ViewDimension"], decoded_value.ViewDimension, options); + switch (decoded_value.ViewDimension) + { + case D3D11_SRV_DIMENSION_BUFFER: + { + FieldToJson(jdata["Buffer"], meta_struct.Buffer, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURE1D: + { + FieldToJson(jdata["Texture1D"], meta_struct.Texture1D, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURE1DARRAY: + { + FieldToJson(jdata["Texture1DArray"], meta_struct.Texture1DArray, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURE2D: + { + FieldToJson(jdata["Texture2D"], meta_struct.Texture2D, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURE2DARRAY: + { + FieldToJson(jdata["Texture2DArray"], meta_struct.Texture2DArray, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURE2DMS: + { + FieldToJson(jdata["Texture2DMS"], meta_struct.Texture2DMS, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY: + { + FieldToJson(jdata["Texture2DMSArray"], meta_struct.Texture2DMSArray, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURE3D: + { + FieldToJson(jdata["Texture3D"], meta_struct.Texture3D, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURECUBE: + { + FieldToJson(jdata["TextureCube"], meta_struct.TextureCube, options); + break; + } + case D3D11_SRV_DIMENSION_TEXTURECUBEARRAY: + { + FieldToJson(jdata["TextureCubeArray"], meta_struct.TextureCubeArray, options); + break; + } + case D3D11_SRV_DIMENSION_BUFFEREX: + { + FieldToJson(jdata["BufferEx"], meta_struct.BufferEx, options); + break; + } + default: + { + break; + } + } + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_RTV1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_RTV1& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_RTV1& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + FieldToJson(jdata["PlaneSlice"], decoded_value.PlaneSlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_RTV1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_ARRAY_RTV1& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_ARRAY_RTV1& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + FieldToJson(jdata["PlaneSlice"], decoded_value.PlaneSlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RENDER_TARGET_VIEW_DESC1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_RENDER_TARGET_VIEW_DESC1& decoded_value = *data->decoded_value; + const Decoded_D3D11_RENDER_TARGET_VIEW_DESC1& meta_struct = *data; + FieldToJson(jdata["Format"], decoded_value.Format, options); + FieldToJson(jdata["ViewDimension"], decoded_value.ViewDimension, options); + switch (decoded_value.ViewDimension) + { + case D3D11_RTV_DIMENSION_BUFFER: + { + FieldToJson(jdata["Buffer"], meta_struct.Buffer, options); + break; + } + case D3D11_RTV_DIMENSION_TEXTURE1D: + { + FieldToJson(jdata["Texture1D"], meta_struct.Texture1D, options); + break; + } + case D3D11_RTV_DIMENSION_TEXTURE1DARRAY: + { + FieldToJson(jdata["Texture1DArray"], meta_struct.Texture1DArray, options); + break; + } + case D3D11_RTV_DIMENSION_TEXTURE2D: + { + FieldToJson(jdata["Texture2D"], meta_struct.Texture2D, options); + break; + } + case D3D11_RTV_DIMENSION_TEXTURE2DARRAY: + { + FieldToJson(jdata["Texture2DArray"], meta_struct.Texture2DArray, options); + break; + } + case D3D11_RTV_DIMENSION_TEXTURE2DMS: + { + FieldToJson(jdata["Texture2DMS"], meta_struct.Texture2DMS, options); + break; + } + case D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY: + { + FieldToJson(jdata["Texture2DMSArray"], meta_struct.Texture2DMSArray, options); + break; + } + case D3D11_RTV_DIMENSION_TEXTURE3D: + { + FieldToJson(jdata["Texture3D"], meta_struct.Texture3D, options); + break; + } + default: + { + break; + } + } + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_UAV1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_UAV1& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_UAV1& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + FieldToJson(jdata["PlaneSlice"], decoded_value.PlaneSlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_UAV1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_TEX2D_ARRAY_UAV1& decoded_value = *data->decoded_value; + const Decoded_D3D11_TEX2D_ARRAY_UAV1& meta_struct = *data; + FieldToJson(jdata["MipSlice"], decoded_value.MipSlice, options); + FieldToJson(jdata["FirstArraySlice"], decoded_value.FirstArraySlice, options); + FieldToJson(jdata["ArraySize"], decoded_value.ArraySize, options); + FieldToJson(jdata["PlaneSlice"], decoded_value.PlaneSlice, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_UNORDERED_ACCESS_VIEW_DESC1& decoded_value = *data->decoded_value; + const Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC1& meta_struct = *data; + FieldToJson(jdata["Format"], decoded_value.Format, options); + FieldToJson(jdata["ViewDimension"], decoded_value.ViewDimension, options); + switch (decoded_value.ViewDimension) + { + case D3D11_DSV_DIMENSION_TEXTURE1D: + { + FieldToJson(jdata["Texture1D"], meta_struct.Texture1D, options); + break; + } + case D3D11_DSV_DIMENSION_TEXTURE1DARRAY: + { + FieldToJson(jdata["Texture1DArray"], meta_struct.Texture1DArray, options); + break; + } + case D3D11_DSV_DIMENSION_TEXTURE2D: + { + FieldToJson(jdata["Texture2D"], meta_struct.Texture2D, options); + break; + } + case D3D11_DSV_DIMENSION_TEXTURE2DARRAY: + { + FieldToJson(jdata["Texture2DArray"], meta_struct.Texture2DArray, options); + break; + } + case D3D11_DSV_DIMENSION_TEXTURE2DMS: + { + FieldToJson(jdata["Texture3D"], meta_struct.Texture3D, options); + break; + } + default: + { + break; + } + } + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DESC1* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_QUERY_DESC1& decoded_value = *data->decoded_value; + const Decoded_D3D11_QUERY_DESC1& meta_struct = *data; + FieldToJson(jdata["Query"], decoded_value.Query, options); + FieldToJson(jdata["MiscFlags"], decoded_value.MiscFlags, options); + FieldToJson(jdata["ContextType"], decoded_value.ContextType, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_VIDEO_DECODER_HISTOGRAM* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_VIDEO_DECODER_HISTOGRAM& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_VIDEO_DECODER_HISTOGRAM& meta_struct = *data; + FieldToJson(jdata["DecoderDesc"], meta_struct.DecoderDesc, options); + FieldToJson_D3D11_VIDEO_DECODER_HISTOGRAM_COMPONENT_FLAGS(jdata["Components"], decoded_value.Components, options); + FieldToJson(jdata["BinCount"], decoded_value.BinCount, options); + FieldToJson(jdata["CounterBitDepth"], decoded_value.CounterBitDepth, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC2* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_VIDEO_DECODER_BUFFER_DESC2& decoded_value = *data->decoded_value; + const Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC2& meta_struct = *data; + FieldToJson(jdata["BufferType"], decoded_value.BufferType, options); + FieldToJson(jdata["DataOffset"], decoded_value.DataOffset, options); + FieldToJson(jdata["DataSize"], decoded_value.DataSize, options); + FieldToJson(jdata["pIV"], meta_struct.pIV, options); + FieldToJson(jdata["IVSize"], decoded_value.IVSize, options); + FieldToJson(jdata["pSubSampleMappingBlock"], meta_struct.pSubSampleMappingBlock, options); + FieldToJson(jdata["SubSampleMappingCount"], decoded_value.SubSampleMappingCount, options); + FieldToJson(jdata["cBlocksStripeEncrypted"], decoded_value.cBlocksStripeEncrypted, options); + FieldToJson(jdata["cBlocksStripeClear"], decoded_value.cBlocksStripeClear, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS4* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_FEATURE_DATA_D3D11_OPTIONS4& decoded_value = *data->decoded_value; + const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS4& meta_struct = *data; + Bool32ToJson(jdata["ExtendedNV12SharedTextureSupported"], decoded_value.ExtendedNV12SharedTextureSupported, options); + } +} + +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RESOURCE_FLAGS* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const D3D11_RESOURCE_FLAGS& decoded_value = *data->decoded_value; + const Decoded_D3D11_RESOURCE_FLAGS& meta_struct = *data; + FieldToJson(jdata["BindFlags"], decoded_value.BindFlags, options); + FieldToJson(jdata["MiscFlags"], decoded_value.MiscFlags, options); + FieldToJson(jdata["CPUAccessFlags"], decoded_value.CPUAccessFlags, options); + FieldToJson(jdata["StructureByteStride"], decoded_value.StructureByteStride, options); + } +} + void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_tagRECT* data, const JsonOptions& options) { using namespace util; @@ -4501,6 +7164,18 @@ void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_tagPOINT* data, co } } +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_tagSIZE* data, const JsonOptions& options) +{ + using namespace util; + if (data && data->decoded_value) + { + const tagSIZE& decoded_value = *data->decoded_value; + const Decoded_tagSIZE& meta_struct = *data; + FieldToJson(jdata["cx"], decoded_value.cx, options); + FieldToJson(jdata["cy"], decoded_value.cy, options); + } +} + void FieldToJson(nlohmann::ordered_json& jdata, const Decoded__SECURITY_ATTRIBUTES* data, const JsonOptions& options) { using namespace util; @@ -4650,6 +7325,19 @@ void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_CPU_DESCRIPT } } +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_PROTECTION_FLAGS* data, const JsonOptions& options) +{ + if (data && data->decoded_value) + { + const auto& decoded_value = *data->decoded_value; + const auto& meta_struct = *data; + // This is a bitfield defined as an anonymous struct within a union. + FieldToJson(jdata["ProtectionEnabled"], decoded_value.Flags.ProtectionEnabled, options); + FieldToJson(jdata["OverlayOrFullscreenRequired"], decoded_value.Flags.OverlayOrFullscreenRequired, options); + FieldToJson(jdata["Reserved"], decoded_value.Flags.Reserved, options); + } +} + /** @} */ GFXRECON_END_NAMESPACE(decode) diff --git a/framework/generated/generated_dx12_struct_decoders_to_json.h b/framework/generated/generated_dx12_struct_decoders_to_json.h index 234909eebc..871c2b886c 100644 --- a/framework/generated/generated_dx12_struct_decoders_to_json.h +++ b/framework/generated/generated_dx12_struct_decoders_to_json.h @@ -326,9 +326,175 @@ void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_DEBUG_COMMAN void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_MESSAGE* pObj, const util::JsonOptions& options); void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_INFO_QUEUE_FILTER_DESC* pObj, const util::JsonOptions& options); void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_INFO_QUEUE_FILTER* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_INPUT_ELEMENT_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SO_DECLARATION_ENTRY* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIEWPORT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DRAW_INSTANCED_INDIRECT_ARGS* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BOX* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DEPTH_STENCILOP_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DEPTH_STENCIL_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RENDER_TARGET_BLEND_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BLEND_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RASTERIZER_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SUBRESOURCE_DATA* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_MAPPED_SUBRESOURCE* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFER_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE1D_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE2D_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE3D_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFER_SRV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFEREX_SRV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_SRV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_ARRAY_SRV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_SRV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_SRV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX3D_SRV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXCUBE_SRV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXCUBE_ARRAY_SRV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_SRV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_ARRAY_SRV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFER_RTV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_RTV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_ARRAY_RTV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_RTV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_RTV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_RTV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_ARRAY_RTV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX3D_RTV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RENDER_TARGET_VIEW_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_DSV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_ARRAY_DSV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_DSV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_DSV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_DSV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_ARRAY_DSV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DEPTH_STENCIL_VIEW_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFER_UAV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_UAV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_ARRAY_UAV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_UAV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_UAV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX3D_UAV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SAMPLER_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DATA_TIMESTAMP_DISJOINT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DATA_PIPELINE_STATISTICS* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DATA_SO_STATISTICS* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_COUNTER_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_COUNTER_INFO* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_CLASS_INSTANCE_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_THREADING* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_DOUBLES* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT2* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_ARCHITECTURE_INFO* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_MARKER_SUPPORT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS2* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS3* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_SHADER_CACHE* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS5* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_CD3D11_VIDEO_DEFAULT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_CONFIG* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AES_CTR_IV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_ENCRYPTED_BLOCK_INFO* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_EXTENSION* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_CAPS* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_CONTENT_PROTECTION_CAPS* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_CUSTOM_RATE* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_FILTER_RANGE* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_COLOR_RGBA* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_COLOR_YCbCrA* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_COLOR* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_STREAM* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_OMAC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_INPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_INPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_OUTPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_VDOV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_VPIV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_VPOV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_VPOV* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RENDER_TARGET_BLEND_DESC1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BLEND_DESC1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RASTERIZER_DESC1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_SAMPLE_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TILED_RESOURCE_COORDINATE* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TILE_REGION_SIZE* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SUBRESOURCE_TILING* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TILE_SHAPE* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_PACKED_MIP_DESC* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE2D_DESC1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE3D_DESC1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RASTERIZER_DESC2* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_SRV1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_SRV1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_RTV1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_RTV1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RENDER_TARGET_VIEW_DESC1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_UAV1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_UAV1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DESC1* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_VIDEO_DECODER_HISTOGRAM* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC2* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS4* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RESOURCE_FLAGS* pObj, const util::JsonOptions& options); void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_GUID* pObj, const util::JsonOptions& options); void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_tagRECT* pObj, const util::JsonOptions& options); void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_tagPOINT* pObj, const util::JsonOptions& options); +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_tagSIZE* pObj, const util::JsonOptions& options); void FieldToJson(nlohmann::ordered_json& jdata, const Decoded__SECURITY_ATTRIBUTES* pObj, const util::JsonOptions& options); // Reference versions of above which simply pipe through to the pointer versions. @@ -612,9 +778,175 @@ inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_DEBUG inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_MESSAGE& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_INFO_QUEUE_FILTER_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D12_INFO_QUEUE_FILTER& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_INPUT_ELEMENT_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SO_DECLARATION_ENTRY& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIEWPORT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DRAW_INSTANCED_INDIRECT_ARGS& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BOX& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DEPTH_STENCILOP_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DEPTH_STENCIL_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RENDER_TARGET_BLEND_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BLEND_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RASTERIZER_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SUBRESOURCE_DATA& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_MAPPED_SUBRESOURCE& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFER_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE1D_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE2D_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE3D_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFER_SRV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFEREX_SRV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_SRV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_ARRAY_SRV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_SRV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_SRV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX3D_SRV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXCUBE_SRV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXCUBE_ARRAY_SRV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_SRV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_ARRAY_SRV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFER_RTV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_RTV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_ARRAY_RTV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_RTV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_RTV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_RTV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_ARRAY_RTV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX3D_RTV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RENDER_TARGET_VIEW_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_DSV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_ARRAY_DSV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_DSV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_DSV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_DSV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2DMS_ARRAY_DSV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_DEPTH_STENCIL_VIEW_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BUFFER_UAV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_UAV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX1D_ARRAY_UAV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_UAV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_UAV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX3D_UAV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SAMPLER_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DATA_TIMESTAMP_DISJOINT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DATA_PIPELINE_STATISTICS& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DATA_SO_STATISTICS& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_COUNTER_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_COUNTER_INFO& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_CLASS_INSTANCE_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_THREADING& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_DOUBLES& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_FORMAT_SUPPORT2& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_ARCHITECTURE_INFO& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_MARKER_SUPPORT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D9_OPTIONS1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS2& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS3& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_SHADER_CACHE& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS5& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_CD3D11_VIDEO_DEFAULT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_CONFIG& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AES_CTR_IV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_ENCRYPTED_BLOCK_INFO& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_EXTENSION& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_CAPS& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_CONTENT_PROTECTION_CAPS& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_CUSTOM_RATE& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_FILTER_RANGE& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_CONTENT_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_COLOR_RGBA& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_COLOR_YCbCrA& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_COLOR& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_COLOR_SPACE& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_STREAM& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_OMAC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_INPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_PROTECTION_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_INPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_INPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_INPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_INPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_COUNT_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_INPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_ACCESSIBILITY_ENCRYPTION_GUID_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_QUERY_CURRENT_ACCESSIBILITY_ENCRYPTION_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_INPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_OUTPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE_INPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_PROTECTION_INPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION_INPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE_INPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_CONFIGURE_ACCESSIBLE_ENCRYPTION_INPUT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_VDOV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_VPIV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_VPOV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_VPOV& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RENDER_TARGET_BLEND_DESC1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_BLEND_DESC1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RASTERIZER_DESC1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_SAMPLE_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TILED_RESOURCE_COORDINATE& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TILE_REGION_SIZE& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SUBRESOURCE_TILING& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TILE_SHAPE& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_PACKED_MIP_DESC& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE2D_DESC1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEXTURE3D_DESC1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RASTERIZER_DESC2& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_SRV1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_SRV1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_SHADER_RESOURCE_VIEW_DESC1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_RTV1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_RTV1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RENDER_TARGET_VIEW_DESC1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_UAV1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_TEX2D_ARRAY_UAV1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_UNORDERED_ACCESS_VIEW_DESC1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_QUERY_DESC1& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_VIDEO_DECODER_HISTOGRAM& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_VIDEO_DECODER_BUFFER_DESC2& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_FEATURE_DATA_D3D11_OPTIONS4& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_RESOURCE_FLAGS& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_GUID& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_tagRECT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_tagPOINT& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_tagSIZE& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded__SECURITY_ATTRIBUTES& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } // Custom, manually written implementations whose prototypes haven't been generated above: @@ -622,6 +954,7 @@ inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded__SECURITY_A /// Named union type with two structs and a uint64_t inside. void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_LARGE_INTEGER* pObj, const util::JsonOptions& options); inline void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_LARGE_INTEGER& obj, const util::JsonOptions& options){ FieldToJson(jdata, &obj, options); } +void FieldToJson(nlohmann::ordered_json& jdata, const Decoded_D3D11_AUTHENTICATED_PROTECTION_FLAGS* data, const util::JsonOptions& options); GFXRECON_END_NAMESPACE(decode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/generated/generated_dx12_struct_object_mappers.cpp b/framework/generated/generated_dx12_struct_object_mappers.cpp index e01d5e4bbe..3c2b1d1038 100644 --- a/framework/generated/generated_dx12_struct_object_mappers.cpp +++ b/framework/generated/generated_dx12_struct_object_mappers.cpp @@ -48,6 +48,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -449,6 +455,46 @@ void MapStructObjects(Decoded_D3D12_BUFFER_BARRIER* wrapper, const Dx12ObjectInf value->pResource = object_mapping::MapObject(wrapper->pResource, object_info_table); } } + +void MapStructObjects(Decoded_D3D11_VIDEO_DECODER_EXTENSION* wrapper, const Dx12ObjectInfoTable& object_info_table, const graphics::Dx12GpuVaMap& gpu_va_map) +{ + if ((wrapper != nullptr) && (wrapper->decoded_value != nullptr)) + { + D3D11_VIDEO_DECODER_EXTENSION* value = wrapper->decoded_value; + + value->ppResourceList = object_mapping::MapObjectArray(&wrapper->ppResourceList, object_info_table); + } +} + +void MapStructObjects(Decoded_D3D11_VIDEO_PROCESSOR_STREAM* wrapper, const Dx12ObjectInfoTable& object_info_table, const graphics::Dx12GpuVaMap& gpu_va_map) +{ + if ((wrapper != nullptr) && (wrapper->decoded_value != nullptr)) + { + D3D11_VIDEO_PROCESSOR_STREAM* value = wrapper->decoded_value; + + value->ppPastSurfaces = object_mapping::MapObjectArray(&wrapper->ppPastSurfaces, object_info_table); + + value->pInputSurface = object_mapping::MapObject(wrapper->pInputSurface, object_info_table); + + value->ppFutureSurfaces = object_mapping::MapObjectArray(&wrapper->ppFutureSurfaces, object_info_table); + + value->ppPastSurfacesRight = object_mapping::MapObjectArray(&wrapper->ppPastSurfacesRight, object_info_table); + + value->pInputSurfaceRight = object_mapping::MapObject(wrapper->pInputSurfaceRight, object_info_table); + + value->ppFutureSurfacesRight = object_mapping::MapObjectArray(&wrapper->ppFutureSurfacesRight, object_info_table); + } +} + +void MapStructObjects(Decoded_D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* wrapper, const Dx12ObjectInfoTable& object_info_table, const graphics::Dx12GpuVaMap& gpu_va_map) +{ + if ((wrapper != nullptr) && (wrapper->decoded_value != nullptr)) + { + D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* value = wrapper->decoded_value; + + value->pCryptoSession = object_mapping::MapObject(wrapper->pCryptoSession, object_info_table); + } +} void AddStructObjects(const StructPointerDecoder* capture_value, const D3D12_GRAPHICS_PIPELINE_STATE_DESC* new_value, Dx12ObjectInfoTable& object_info_table) { auto decoded_struct = capture_value->GetMetaStructPointer(); @@ -644,6 +690,28 @@ void AddStructObjects(const StructPointerDecoder* } } +void AddStructObjects(const StructPointerDecoder* capture_value, const D3D11_VIDEO_PROCESSOR_STREAM* new_value, Dx12ObjectInfoTable& object_info_table) +{ + auto decoded_struct = capture_value->GetMetaStructPointer(); + if(decoded_struct->pInputSurface && new_value->pInputSurface) + { + object_mapping::AddObject(&decoded_struct->pInputSurface, const_cast(&new_value->pInputSurface), &object_info_table); + } + if(decoded_struct->pInputSurfaceRight && new_value->pInputSurfaceRight) + { + object_mapping::AddObject(&decoded_struct->pInputSurfaceRight, const_cast(&new_value->pInputSurfaceRight), &object_info_table); + } +} + +void AddStructObjects(const StructPointerDecoder* capture_value, const D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* new_value, Dx12ObjectInfoTable& object_info_table) +{ + auto decoded_struct = capture_value->GetMetaStructPointer(); + if(decoded_struct->pCryptoSession && new_value->pCryptoSession) + { + object_mapping::AddObject(&decoded_struct->pCryptoSession, const_cast(&new_value->pCryptoSession), &object_info_table); + } +} + GFXRECON_END_NAMESPACE(decode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/generated/generated_dx12_struct_object_mappers.h b/framework/generated/generated_dx12_struct_object_mappers.h index 6524d6f3de..31a4a8109d 100644 --- a/framework/generated/generated_dx12_struct_object_mappers.h +++ b/framework/generated/generated_dx12_struct_object_mappers.h @@ -108,6 +108,12 @@ void MapStructObjects(Decoded_D3D12_TEXTURE_BARRIER* wrapper, const Dx12ObjectIn void MapStructObjects(Decoded_D3D12_BUFFER_BARRIER* wrapper, const Dx12ObjectInfoTable& object_info_table, const graphics::Dx12GpuVaMap& gpu_va_map); +void MapStructObjects(Decoded_D3D11_VIDEO_DECODER_EXTENSION* wrapper, const Dx12ObjectInfoTable& object_info_table, const graphics::Dx12GpuVaMap& gpu_va_map); + +void MapStructObjects(Decoded_D3D11_VIDEO_PROCESSOR_STREAM* wrapper, const Dx12ObjectInfoTable& object_info_table, const graphics::Dx12GpuVaMap& gpu_va_map); + +void MapStructObjects(Decoded_D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* wrapper, const Dx12ObjectInfoTable& object_info_table, const graphics::Dx12GpuVaMap& gpu_va_map); + void AddStructObjects(const StructPointerDecoder* capture_value, const D3D12_GRAPHICS_PIPELINE_STATE_DESC* new_value, Dx12ObjectInfoTable& object_info_table); void AddStructObjects(const StructPointerDecoder* capture_value, const D3D12_COMPUTE_PIPELINE_STATE_DESC* new_value, Dx12ObjectInfoTable& object_info_table); @@ -146,6 +152,12 @@ void AddStructObjects(const StructPointerDecoder* void AddStructObjects(const StructPointerDecoder* capture_value, const D3D12_BUFFER_BARRIER* new_value, Dx12ObjectInfoTable& object_info_table); +void AddStructObjects(const StructPointerDecoder* capture_value, const D3D11_VIDEO_DECODER_EXTENSION* new_value, Dx12ObjectInfoTable& object_info_table); + +void AddStructObjects(const StructPointerDecoder* capture_value, const D3D11_VIDEO_PROCESSOR_STREAM* new_value, Dx12ObjectInfoTable& object_info_table); + +void AddStructObjects(const StructPointerDecoder* capture_value, const D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* new_value, Dx12ObjectInfoTable& object_info_table); + template void MapStructArrayObjects(T* structs, size_t len, const Dx12ObjectInfoTable& object_info_table, const graphics::Dx12GpuVaMap& gpu_va_map) diff --git a/framework/generated/generated_dx12_struct_unwrappers.cpp b/framework/generated/generated_dx12_struct_unwrappers.cpp index 5f6474c78d..89b5109787 100644 --- a/framework/generated/generated_dx12_struct_unwrappers.cpp +++ b/framework/generated/generated_dx12_struct_unwrappers.cpp @@ -44,6 +44,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -190,5 +196,34 @@ void UnwrapStructObjects(D3D12_BUFFER_BARRIER* value, HandleUnwrapMemory* unwrap } } +void UnwrapStructObjects(D3D11_VIDEO_DECODER_EXTENSION* value, HandleUnwrapMemory* unwrap_memory) +{ + if (value != nullptr) + { + value->ppResourceList = UnwrapObjects(value->ppResourceList, value->ResourceCount, unwrap_memory); + } +} + +void UnwrapStructObjects(D3D11_VIDEO_PROCESSOR_STREAM* value, HandleUnwrapMemory* unwrap_memory) +{ + if (value != nullptr) + { + value->ppPastSurfaces = UnwrapObjects(value->ppPastSurfaces, value->PastFrames, unwrap_memory); + value->pInputSurface = GetWrappedObject(value->pInputSurface); + value->ppFutureSurfaces = UnwrapObjects(value->ppFutureSurfaces, value->FutureFrames, unwrap_memory); + value->ppPastSurfacesRight = UnwrapObjects(value->ppPastSurfacesRight, value->PastFrames, unwrap_memory); + value->pInputSurfaceRight = GetWrappedObject(value->pInputSurfaceRight); + value->ppFutureSurfacesRight = UnwrapObjects(value->ppFutureSurfacesRight, value->FutureFrames, unwrap_memory); + } +} + +void UnwrapStructObjects(D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* value, HandleUnwrapMemory* unwrap_memory) +{ + if (value != nullptr) + { + value->pCryptoSession = GetWrappedObject(value->pCryptoSession); + } +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/generated/generated_dx12_struct_unwrappers.h b/framework/generated/generated_dx12_struct_unwrappers.h index 41587b9c40..f74a57b393 100644 --- a/framework/generated/generated_dx12_struct_unwrappers.h +++ b/framework/generated/generated_dx12_struct_unwrappers.h @@ -43,6 +43,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -83,6 +89,12 @@ void UnwrapStructObjects(D3D12_TEXTURE_BARRIER* value, HandleUnwrapMemory* unwra void UnwrapStructObjects(D3D12_BUFFER_BARRIER* value, HandleUnwrapMemory* unwrap_memory); +void UnwrapStructObjects(D3D11_VIDEO_DECODER_EXTENSION* value, HandleUnwrapMemory* unwrap_memory); + +void UnwrapStructObjects(D3D11_VIDEO_PROCESSOR_STREAM* value, HandleUnwrapMemory* unwrap_memory); + +void UnwrapStructObjects(D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* value, HandleUnwrapMemory* unwrap_memory); + template T* MakeUnwrapStructs(const T* values, size_t len, HandleUnwrapMemory* unwrap_memory) { diff --git a/framework/generated/generated_dx12_struct_wrappers.cpp b/framework/generated/generated_dx12_struct_wrappers.cpp index 4b6a7f8171..987f7ab3f8 100644 --- a/framework/generated/generated_dx12_struct_wrappers.cpp +++ b/framework/generated/generated_dx12_struct_wrappers.cpp @@ -42,6 +42,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -234,5 +240,49 @@ void WrapStruct(const D3D12_BUFFER_BARRIER* value) } } +void WrapStruct(const D3D11_VIDEO_DECODER_EXTENSION* value) +{ + if(value->ppResourceList) + { + WrapObject(IID_ID3D11Resource, reinterpret_cast(value->ppResourceList), nullptr); + } +} + +void WrapStruct(const D3D11_VIDEO_PROCESSOR_STREAM* value) +{ + if(value->ppPastSurfaces) + { + WrapObject(IID_ID3D11VideoProcessorInputView, reinterpret_cast(value->ppPastSurfaces), nullptr); + } + if(value->pInputSurface) + { + WrapObject(IID_ID3D11VideoProcessorInputView, reinterpret_cast(value->pInputSurface), nullptr); + } + if(value->ppFutureSurfaces) + { + WrapObject(IID_ID3D11VideoProcessorInputView, reinterpret_cast(value->ppFutureSurfaces), nullptr); + } + if(value->ppPastSurfacesRight) + { + WrapObject(IID_ID3D11VideoProcessorInputView, reinterpret_cast(value->ppPastSurfacesRight), nullptr); + } + if(value->pInputSurfaceRight) + { + WrapObject(IID_ID3D11VideoProcessorInputView, reinterpret_cast(value->pInputSurfaceRight), nullptr); + } + if(value->ppFutureSurfacesRight) + { + WrapObject(IID_ID3D11VideoProcessorInputView, reinterpret_cast(value->ppFutureSurfacesRight), nullptr); + } +} + +void WrapStruct(const D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* value) +{ + if(value->pCryptoSession) + { + WrapObject(IID_ID3D11CryptoSession, reinterpret_cast(value->pCryptoSession), nullptr); + } +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/generated/generated_dx12_struct_wrappers.h b/framework/generated/generated_dx12_struct_wrappers.h index b306e5c5d6..5009f6504f 100644 --- a/framework/generated/generated_dx12_struct_wrappers.h +++ b/framework/generated/generated_dx12_struct_wrappers.h @@ -42,6 +42,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -90,6 +96,12 @@ void WrapStruct(const D3D12_TEXTURE_BARRIER* value); void WrapStruct(const D3D12_BUFFER_BARRIER* value); +void WrapStruct(const D3D11_VIDEO_DECODER_EXTENSION* value); + +void WrapStruct(const D3D11_VIDEO_PROCESSOR_STREAM* value); + +void WrapStruct(const D3D11_VIDEO_DECODER_BEGIN_FRAME_CRYPTO_SESSION* value); + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/generated/generated_dx12_wrapper_creators.cpp b/framework/generated/generated_dx12_wrapper_creators.cpp index 5cf21b1db5..db49fcead3 100644 --- a/framework/generated/generated_dx12_wrapper_creators.cpp +++ b/framework/generated/generated_dx12_wrapper_creators.cpp @@ -45,6 +45,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -1218,5 +1224,845 @@ void WrapID3D12InfoQueue(REFIID riid, void** object, DxWrapperResources* resourc } } +void WrapID3D11DepthStencilState(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11DepthStencilState_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11DepthStencilState_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11Buffer(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11Buffer_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11Buffer_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11Texture1D(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11Texture1D_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11Texture1D_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11DepthStencilView(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11DepthStencilView_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11DepthStencilView_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11VertexShader(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11VertexShader_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11VertexShader_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11HullShader(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11HullShader_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11HullShader_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11DomainShader(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11DomainShader_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11DomainShader_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11GeometryShader(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11GeometryShader_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11GeometryShader_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11PixelShader(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11PixelShader_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11PixelShader_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11ComputeShader(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11ComputeShader_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11ComputeShader_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11InputLayout(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11InputLayout_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11InputLayout_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11SamplerState(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11SamplerState_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11SamplerState_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11Predicate(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11Predicate_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11Predicate_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11Counter(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11Counter_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11Counter_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11ClassInstance(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11ClassInstance_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11ClassInstance_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11ClassLinkage(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11ClassLinkage_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11ClassLinkage_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11CommandList(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11CommandList_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11CommandList_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11VideoDecoder(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11VideoDecoder_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11VideoDecoder_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11VideoProcessor(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11VideoProcessor_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11VideoProcessor_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11AuthenticatedChannel(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11AuthenticatedChannel_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11AuthenticatedChannel_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11CryptoSession(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11CryptoSession_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11CryptoSession_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11VideoDecoderOutputView(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11VideoDecoderOutputView_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11VideoDecoderOutputView_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11VideoProcessorInputView(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11VideoProcessorInputView_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11VideoProcessorInputView_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11VideoProcessorOutputView(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11VideoProcessorOutputView_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11VideoProcessorOutputView_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11BlendState(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11BlendState_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11BlendState1_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3DDeviceContextState(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3DDeviceContextState_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3DDeviceContextState_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11VideoProcessorEnumerator(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11VideoProcessorEnumerator_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11VideoProcessorEnumerator1_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3DUserDefinedAnnotation(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3DUserDefinedAnnotation_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3DUserDefinedAnnotation_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11Texture2D(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11Texture2D_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11Texture2D1_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11Texture3D(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11Texture3D_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11Texture3D1_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11RasterizerState(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11RasterizerState_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11RasterizerState2_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11ShaderResourceView(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11ShaderResourceView_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11ShaderResourceView1_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11RenderTargetView(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11RenderTargetView_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11RenderTargetView1_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11UnorderedAccessView(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11UnorderedAccessView_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11UnorderedAccessView1_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11Query(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11Query_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11Query1_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11Fence(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11Fence_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11Fence_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11DeviceContext(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11DeviceContext_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11DeviceContext4_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11Device(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11Device_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11Device5_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11Multithread(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11Multithread_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11Multithread_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11VideoDevice(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11VideoDevice_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11VideoDevice2_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11VideoContext(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11VideoContext_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11VideoContext3_Wrapper(riid, *wrap_object, resources); + } +} + +void WrapID3D11On12Device(REFIID riid, void** object, DxWrapperResources* resources) +{ + assert((object != nullptr) && (*object != nullptr)); + auto wrap_object = reinterpret_cast(object); + + auto existing = ID3D11On12Device_Wrapper::GetExistingWrapper(*wrap_object); + if (existing != nullptr) + { + // Transfer reference count from the object to the wrapper so that the wrapper holds a single reference to the object. + existing->AddRef(); + (*wrap_object)->Release(); + (*object) = existing; + } + else + { + // Create a wrapper for the latest interface version. The application will only use the wrapper as the interface type that it expects it to be. + (*object) = new ID3D11On12Device2_Wrapper(riid, *wrap_object, resources); + } +} + GFXRECON_END_NAMESPACE(encode) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/generated/generated_dx12_wrapper_creators.h b/framework/generated/generated_dx12_wrapper_creators.h index 5452bd2209..6d98e1a26b 100644 --- a/framework/generated/generated_dx12_wrapper_creators.h +++ b/framework/generated/generated_dx12_wrapper_creators.h @@ -28,6 +28,7 @@ #ifndef GFXRECON_GENERATED_DX12_WRAPPER_CREATORS_H #define GFXRECON_GENERATED_DX12_WRAPPER_CREATORS_H +#include "encode/custom_dx12_wrapper_creators.h" #include "encode/dx12_object_wrapper_resources.h" #include "util/defines.h" #include @@ -45,6 +46,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -178,6 +185,90 @@ void WrapID3D12ManualWriteTrackingResource(REFIID riid, void** object, DxWrapper void WrapID3D12InfoQueue(REFIID riid, void** object, DxWrapperResources* resources); +void WrapID3D11DepthStencilState(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11Buffer(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11Texture1D(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11DepthStencilView(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11VertexShader(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11HullShader(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11DomainShader(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11GeometryShader(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11PixelShader(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11ComputeShader(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11InputLayout(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11SamplerState(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11Predicate(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11Counter(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11ClassInstance(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11ClassLinkage(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11CommandList(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11VideoDecoder(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11VideoProcessor(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11AuthenticatedChannel(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11CryptoSession(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11VideoDecoderOutputView(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11VideoProcessorInputView(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11VideoProcessorOutputView(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11BlendState(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3DDeviceContextState(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11VideoProcessorEnumerator(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3DUserDefinedAnnotation(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11Texture2D(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11Texture3D(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11RasterizerState(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11ShaderResourceView(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11RenderTargetView(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11UnorderedAccessView(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11Query(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11Fence(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11DeviceContext(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11Device(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11Multithread(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11VideoDevice(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11VideoContext(REFIID riid, void** object, DxWrapperResources* resources); + +void WrapID3D11On12Device(REFIID riid, void** object, DxWrapperResources* resources); + const std::unordered_map,IidHash> kFunctionTable { { IID_IDXGIKeyedMutex, WrapIDXGIKeyedMutex }, @@ -311,6 +402,75 @@ const std::unordered_map #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -175,6 +181,90 @@ ID3D12ManualWriteTrackingResource_Wrapper::ObjectMap ID3D12ManualWriteTrackingRe std::mutex ID3D12ManualWriteTrackingResource_Wrapper::object_map_lock_; ID3D12InfoQueue_Wrapper::ObjectMap ID3D12InfoQueue_Wrapper::object_map_; std::mutex ID3D12InfoQueue_Wrapper::object_map_lock_; +ID3D11DepthStencilState_Wrapper::ObjectMap ID3D11DepthStencilState_Wrapper::object_map_; +std::mutex ID3D11DepthStencilState_Wrapper::object_map_lock_; +ID3D11Buffer_Wrapper::ObjectMap ID3D11Buffer_Wrapper::object_map_; +std::mutex ID3D11Buffer_Wrapper::object_map_lock_; +ID3D11Texture1D_Wrapper::ObjectMap ID3D11Texture1D_Wrapper::object_map_; +std::mutex ID3D11Texture1D_Wrapper::object_map_lock_; +ID3D11DepthStencilView_Wrapper::ObjectMap ID3D11DepthStencilView_Wrapper::object_map_; +std::mutex ID3D11DepthStencilView_Wrapper::object_map_lock_; +ID3D11VertexShader_Wrapper::ObjectMap ID3D11VertexShader_Wrapper::object_map_; +std::mutex ID3D11VertexShader_Wrapper::object_map_lock_; +ID3D11HullShader_Wrapper::ObjectMap ID3D11HullShader_Wrapper::object_map_; +std::mutex ID3D11HullShader_Wrapper::object_map_lock_; +ID3D11DomainShader_Wrapper::ObjectMap ID3D11DomainShader_Wrapper::object_map_; +std::mutex ID3D11DomainShader_Wrapper::object_map_lock_; +ID3D11GeometryShader_Wrapper::ObjectMap ID3D11GeometryShader_Wrapper::object_map_; +std::mutex ID3D11GeometryShader_Wrapper::object_map_lock_; +ID3D11PixelShader_Wrapper::ObjectMap ID3D11PixelShader_Wrapper::object_map_; +std::mutex ID3D11PixelShader_Wrapper::object_map_lock_; +ID3D11ComputeShader_Wrapper::ObjectMap ID3D11ComputeShader_Wrapper::object_map_; +std::mutex ID3D11ComputeShader_Wrapper::object_map_lock_; +ID3D11InputLayout_Wrapper::ObjectMap ID3D11InputLayout_Wrapper::object_map_; +std::mutex ID3D11InputLayout_Wrapper::object_map_lock_; +ID3D11SamplerState_Wrapper::ObjectMap ID3D11SamplerState_Wrapper::object_map_; +std::mutex ID3D11SamplerState_Wrapper::object_map_lock_; +ID3D11Predicate_Wrapper::ObjectMap ID3D11Predicate_Wrapper::object_map_; +std::mutex ID3D11Predicate_Wrapper::object_map_lock_; +ID3D11Counter_Wrapper::ObjectMap ID3D11Counter_Wrapper::object_map_; +std::mutex ID3D11Counter_Wrapper::object_map_lock_; +ID3D11ClassInstance_Wrapper::ObjectMap ID3D11ClassInstance_Wrapper::object_map_; +std::mutex ID3D11ClassInstance_Wrapper::object_map_lock_; +ID3D11ClassLinkage_Wrapper::ObjectMap ID3D11ClassLinkage_Wrapper::object_map_; +std::mutex ID3D11ClassLinkage_Wrapper::object_map_lock_; +ID3D11CommandList_Wrapper::ObjectMap ID3D11CommandList_Wrapper::object_map_; +std::mutex ID3D11CommandList_Wrapper::object_map_lock_; +ID3D11VideoDecoder_Wrapper::ObjectMap ID3D11VideoDecoder_Wrapper::object_map_; +std::mutex ID3D11VideoDecoder_Wrapper::object_map_lock_; +ID3D11VideoProcessor_Wrapper::ObjectMap ID3D11VideoProcessor_Wrapper::object_map_; +std::mutex ID3D11VideoProcessor_Wrapper::object_map_lock_; +ID3D11AuthenticatedChannel_Wrapper::ObjectMap ID3D11AuthenticatedChannel_Wrapper::object_map_; +std::mutex ID3D11AuthenticatedChannel_Wrapper::object_map_lock_; +ID3D11CryptoSession_Wrapper::ObjectMap ID3D11CryptoSession_Wrapper::object_map_; +std::mutex ID3D11CryptoSession_Wrapper::object_map_lock_; +ID3D11VideoDecoderOutputView_Wrapper::ObjectMap ID3D11VideoDecoderOutputView_Wrapper::object_map_; +std::mutex ID3D11VideoDecoderOutputView_Wrapper::object_map_lock_; +ID3D11VideoProcessorInputView_Wrapper::ObjectMap ID3D11VideoProcessorInputView_Wrapper::object_map_; +std::mutex ID3D11VideoProcessorInputView_Wrapper::object_map_lock_; +ID3D11VideoProcessorOutputView_Wrapper::ObjectMap ID3D11VideoProcessorOutputView_Wrapper::object_map_; +std::mutex ID3D11VideoProcessorOutputView_Wrapper::object_map_lock_; +ID3D11BlendState_Wrapper::ObjectMap ID3D11BlendState_Wrapper::object_map_; +std::mutex ID3D11BlendState_Wrapper::object_map_lock_; +ID3DDeviceContextState_Wrapper::ObjectMap ID3DDeviceContextState_Wrapper::object_map_; +std::mutex ID3DDeviceContextState_Wrapper::object_map_lock_; +ID3D11VideoProcessorEnumerator_Wrapper::ObjectMap ID3D11VideoProcessorEnumerator_Wrapper::object_map_; +std::mutex ID3D11VideoProcessorEnumerator_Wrapper::object_map_lock_; +ID3DUserDefinedAnnotation_Wrapper::ObjectMap ID3DUserDefinedAnnotation_Wrapper::object_map_; +std::mutex ID3DUserDefinedAnnotation_Wrapper::object_map_lock_; +ID3D11Texture2D_Wrapper::ObjectMap ID3D11Texture2D_Wrapper::object_map_; +std::mutex ID3D11Texture2D_Wrapper::object_map_lock_; +ID3D11Texture3D_Wrapper::ObjectMap ID3D11Texture3D_Wrapper::object_map_; +std::mutex ID3D11Texture3D_Wrapper::object_map_lock_; +ID3D11RasterizerState_Wrapper::ObjectMap ID3D11RasterizerState_Wrapper::object_map_; +std::mutex ID3D11RasterizerState_Wrapper::object_map_lock_; +ID3D11ShaderResourceView_Wrapper::ObjectMap ID3D11ShaderResourceView_Wrapper::object_map_; +std::mutex ID3D11ShaderResourceView_Wrapper::object_map_lock_; +ID3D11RenderTargetView_Wrapper::ObjectMap ID3D11RenderTargetView_Wrapper::object_map_; +std::mutex ID3D11RenderTargetView_Wrapper::object_map_lock_; +ID3D11UnorderedAccessView_Wrapper::ObjectMap ID3D11UnorderedAccessView_Wrapper::object_map_; +std::mutex ID3D11UnorderedAccessView_Wrapper::object_map_lock_; +ID3D11Query_Wrapper::ObjectMap ID3D11Query_Wrapper::object_map_; +std::mutex ID3D11Query_Wrapper::object_map_lock_; +ID3D11Fence_Wrapper::ObjectMap ID3D11Fence_Wrapper::object_map_; +std::mutex ID3D11Fence_Wrapper::object_map_lock_; +ID3D11DeviceContext_Wrapper::ObjectMap ID3D11DeviceContext_Wrapper::object_map_; +std::mutex ID3D11DeviceContext_Wrapper::object_map_lock_; +ID3D11Device_Wrapper::ObjectMap ID3D11Device_Wrapper::object_map_; +std::mutex ID3D11Device_Wrapper::object_map_lock_; +ID3D11Multithread_Wrapper::ObjectMap ID3D11Multithread_Wrapper::object_map_; +std::mutex ID3D11Multithread_Wrapper::object_map_lock_; +ID3D11VideoDevice_Wrapper::ObjectMap ID3D11VideoDevice_Wrapper::object_map_; +std::mutex ID3D11VideoDevice_Wrapper::object_map_lock_; +ID3D11VideoContext_Wrapper::ObjectMap ID3D11VideoContext_Wrapper::object_map_; +std::mutex ID3D11VideoContext_Wrapper::object_map_lock_; +ID3D11On12Device_Wrapper::ObjectMap ID3D11On12Device_Wrapper::object_map_; +std::mutex ID3D11On12Device_Wrapper::object_map_lock_; /* ** This part is generated from dxgi.h in Windows SDK: 10.0.20348.0 @@ -30160,6 +30250,24796 @@ HRESULT STDMETHODCALLTYPE ID3D12InfoQueue1_Wrapper::UnregisterMessageCallback( } +/* +** This part is generated from d3d11.h in Windows SDK: 10.0.20348.0 +** +*/ + +HRESULT WINAPI D3D11CreateDevice( + IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + ID3D11Device** ppDevice, + D3D_FEATURE_LEVEL* pFeatureLevel, + ID3D11DeviceContext** ppImmediateContext) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + ppDevice, + pFeatureLevel, + ppImmediateContext); + + result = D3D12CaptureManager::Get()->OverrideD3D11CreateDevice( + encode::GetWrappedObject(pAdapter), + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + ppDevice, + pFeatureLevel, + ppImmediateContext); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11Device, reinterpret_cast(ppDevice), nullptr); + WrapObject(IID_ID3D11DeviceContext, reinterpret_cast(ppImmediateContext), nullptr); + } + + Encode_D3D11CreateDevice( + result, + pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + ppDevice, + pFeatureLevel, + ppImmediateContext); + + CustomWrapperPostCall::Dispatch( + manager, + result, + pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + ppDevice, + pFeatureLevel, + ppImmediateContext); + } + else + { + result = manager->GetD3D11DispatchTable().D3D11CreateDevice( + pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + ppDevice, + pFeatureLevel, + ppImmediateContext); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT WINAPI D3D11CreateDeviceAndSwapChain( + IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, + IDXGISwapChain** ppSwapChain, + ID3D11Device** ppDevice, + D3D_FEATURE_LEVEL* pFeatureLevel, + ID3D11DeviceContext** ppImmediateContext) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + pSwapChainDesc, + ppSwapChain, + ppDevice, + pFeatureLevel, + ppImmediateContext); + + result = D3D12CaptureManager::Get()->OverrideD3D11CreateDeviceAndSwapChain( + encode::GetWrappedObject(pAdapter), + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + pSwapChainDesc, + ppSwapChain, + ppDevice, + pFeatureLevel, + ppImmediateContext); + + if (SUCCEEDED(result)) + { + WrapObject(IID_IDXGISwapChain, reinterpret_cast(ppSwapChain), nullptr); + WrapObject(IID_ID3D11Device, reinterpret_cast(ppDevice), nullptr); + WrapObject(IID_ID3D11DeviceContext, reinterpret_cast(ppImmediateContext), nullptr); + } + + Encode_D3D11CreateDeviceAndSwapChain( + result, + pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + pSwapChainDesc, + ppSwapChain, + ppDevice, + pFeatureLevel, + ppImmediateContext); + + CustomWrapperPostCall::Dispatch( + manager, + result, + pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + pSwapChainDesc, + ppSwapChain, + ppDevice, + pFeatureLevel, + ppImmediateContext); + } + else + { + result = manager->GetD3D11DispatchTable().D3D11CreateDeviceAndSwapChain( + pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + pSwapChainDesc, + ppSwapChain, + ppDevice, + pFeatureLevel, + ppImmediateContext); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11DeviceChild_Wrapper::ID3D11DeviceChild_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : IUnknown_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11DeviceChild_Wrapper::GetDevice( + ID3D11Device** ppDevice) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppDevice); + + GetWrappedObjectAs()->GetDevice( + ppDevice); + + WrapObject(IID_ID3D11Device, reinterpret_cast(ppDevice), nullptr); + + Encode_ID3D11DeviceChild_GetDevice( + this, + ppDevice); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppDevice); + } + else + { + GetWrappedObjectAs()->GetDevice( + ppDevice); + } + + manager->DecrementCallScope(); +} + +HRESULT STDMETHODCALLTYPE ID3D11DeviceChild_Wrapper::GetPrivateData( + REFGUID guid, + UINT* pDataSize, + void* pData) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + guid, + pDataSize, + pData); + + result = GetWrappedObjectAs()->GetPrivateData( + guid, + pDataSize, + pData); + + Encode_ID3D11DeviceChild_GetPrivateData( + this, + result, + guid, + pDataSize, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + guid, + pDataSize, + pData); + } + else + { + result = GetWrappedObjectAs()->GetPrivateData( + guid, + pDataSize, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11DeviceChild_Wrapper::SetPrivateData( + REFGUID guid, + UINT DataSize, + const void* pData) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + guid, + DataSize, + pData); + + result = GetWrappedObjectAs()->SetPrivateData( + guid, + DataSize, + pData); + + Encode_ID3D11DeviceChild_SetPrivateData( + this, + result, + guid, + DataSize, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + guid, + DataSize, + pData); + } + else + { + result = GetWrappedObjectAs()->SetPrivateData( + guid, + DataSize, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11DeviceChild_Wrapper::SetPrivateDataInterface( + REFGUID guid, + const IUnknown* pData) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + guid, + pData); + + result = GetWrappedObjectAs()->SetPrivateDataInterface( + guid, + encode::GetWrappedObject(pData)); + + Encode_ID3D11DeviceChild_SetPrivateDataInterface( + this, + result, + guid, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + guid, + pData); + } + else + { + result = GetWrappedObjectAs()->SetPrivateDataInterface( + guid, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11DepthStencilState_Wrapper::ID3D11DepthStencilState_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11DepthStencilState_Wrapper::~ID3D11DepthStencilState_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11DepthStencilState_Wrapper* ID3D11DepthStencilState_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11DepthStencilState_Wrapper::GetDesc( + D3D11_DEPTH_STENCIL_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11DepthStencilState_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11BlendState_Wrapper::ID3D11BlendState_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11BlendState_Wrapper::~ID3D11BlendState_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11BlendState_Wrapper* ID3D11BlendState_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11BlendState_Wrapper::GetDesc( + D3D11_BLEND_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11BlendState_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11RasterizerState_Wrapper::ID3D11RasterizerState_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11RasterizerState_Wrapper::~ID3D11RasterizerState_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11RasterizerState_Wrapper* ID3D11RasterizerState_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11RasterizerState_Wrapper::GetDesc( + D3D11_RASTERIZER_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11RasterizerState_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11Resource_Wrapper::ID3D11Resource_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11Resource_Wrapper::GetType( + D3D11_RESOURCE_DIMENSION* pResourceDimension) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResourceDimension); + + GetWrappedObjectAs()->GetType( + pResourceDimension); + + Encode_ID3D11Resource_GetType( + this, + pResourceDimension); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pResourceDimension); + } + else + { + GetWrappedObjectAs()->GetType( + pResourceDimension); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11Resource_Wrapper::SetEvictionPriority( + UINT EvictionPriority) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + EvictionPriority); + + GetWrappedObjectAs()->SetEvictionPriority( + EvictionPriority); + + Encode_ID3D11Resource_SetEvictionPriority( + this, + EvictionPriority); + + CustomWrapperPostCall::Dispatch( + manager, + this, + EvictionPriority); + } + else + { + GetWrappedObjectAs()->SetEvictionPriority( + EvictionPriority); + } + + manager->DecrementCallScope(); +} + +UINT STDMETHODCALLTYPE ID3D11Resource_Wrapper::GetEvictionPriority() +{ + UINT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->GetEvictionPriority(); + + Encode_ID3D11Resource_GetEvictionPriority( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->GetEvictionPriority(); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11Buffer_Wrapper::ID3D11Buffer_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Resource_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11Buffer_Wrapper::~ID3D11Buffer_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11Buffer_Wrapper* ID3D11Buffer_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11Buffer_Wrapper::GetDesc( + D3D11_BUFFER_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11Buffer_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11Texture1D_Wrapper::ID3D11Texture1D_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Resource_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11Texture1D_Wrapper::~ID3D11Texture1D_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11Texture1D_Wrapper* ID3D11Texture1D_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11Texture1D_Wrapper::GetDesc( + D3D11_TEXTURE1D_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11Texture1D_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11Texture2D_Wrapper::ID3D11Texture2D_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Resource_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11Texture2D_Wrapper::~ID3D11Texture2D_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11Texture2D_Wrapper* ID3D11Texture2D_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11Texture2D_Wrapper::GetDesc( + D3D11_TEXTURE2D_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11Texture2D_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11Texture3D_Wrapper::ID3D11Texture3D_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Resource_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11Texture3D_Wrapper::~ID3D11Texture3D_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11Texture3D_Wrapper* ID3D11Texture3D_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11Texture3D_Wrapper::GetDesc( + D3D11_TEXTURE3D_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11Texture3D_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11View_Wrapper::ID3D11View_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11View_Wrapper::GetResource( + ID3D11Resource** ppResource) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppResource); + + GetWrappedObjectAs()->GetResource( + ppResource); + + WrapObject(IID_ID3D11Resource, reinterpret_cast(ppResource), nullptr); + + Encode_ID3D11View_GetResource( + this, + ppResource); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppResource); + } + else + { + GetWrappedObjectAs()->GetResource( + ppResource); + } + + manager->DecrementCallScope(); +} + +ID3D11ShaderResourceView_Wrapper::ID3D11ShaderResourceView_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11View_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11ShaderResourceView_Wrapper::~ID3D11ShaderResourceView_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11ShaderResourceView_Wrapper* ID3D11ShaderResourceView_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11ShaderResourceView_Wrapper::GetDesc( + D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11ShaderResourceView_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11RenderTargetView_Wrapper::ID3D11RenderTargetView_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11View_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11RenderTargetView_Wrapper::~ID3D11RenderTargetView_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11RenderTargetView_Wrapper* ID3D11RenderTargetView_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11RenderTargetView_Wrapper::GetDesc( + D3D11_RENDER_TARGET_VIEW_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11RenderTargetView_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11DepthStencilView_Wrapper::ID3D11DepthStencilView_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11View_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11DepthStencilView_Wrapper::~ID3D11DepthStencilView_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11DepthStencilView_Wrapper* ID3D11DepthStencilView_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11DepthStencilView_Wrapper::GetDesc( + D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11DepthStencilView_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11UnorderedAccessView_Wrapper::ID3D11UnorderedAccessView_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11View_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11UnorderedAccessView_Wrapper::~ID3D11UnorderedAccessView_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11UnorderedAccessView_Wrapper* ID3D11UnorderedAccessView_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11UnorderedAccessView_Wrapper::GetDesc( + D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11UnorderedAccessView_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11VertexShader_Wrapper::ID3D11VertexShader_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11VertexShader_Wrapper::~ID3D11VertexShader_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11VertexShader_Wrapper* ID3D11VertexShader_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +ID3D11HullShader_Wrapper::ID3D11HullShader_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11HullShader_Wrapper::~ID3D11HullShader_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11HullShader_Wrapper* ID3D11HullShader_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +ID3D11DomainShader_Wrapper::ID3D11DomainShader_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11DomainShader_Wrapper::~ID3D11DomainShader_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11DomainShader_Wrapper* ID3D11DomainShader_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +ID3D11GeometryShader_Wrapper::ID3D11GeometryShader_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11GeometryShader_Wrapper::~ID3D11GeometryShader_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11GeometryShader_Wrapper* ID3D11GeometryShader_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +ID3D11PixelShader_Wrapper::ID3D11PixelShader_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11PixelShader_Wrapper::~ID3D11PixelShader_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11PixelShader_Wrapper* ID3D11PixelShader_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +ID3D11ComputeShader_Wrapper::ID3D11ComputeShader_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11ComputeShader_Wrapper::~ID3D11ComputeShader_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11ComputeShader_Wrapper* ID3D11ComputeShader_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +ID3D11InputLayout_Wrapper::ID3D11InputLayout_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11InputLayout_Wrapper::~ID3D11InputLayout_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11InputLayout_Wrapper* ID3D11InputLayout_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +ID3D11SamplerState_Wrapper::ID3D11SamplerState_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11SamplerState_Wrapper::~ID3D11SamplerState_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11SamplerState_Wrapper* ID3D11SamplerState_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11SamplerState_Wrapper::GetDesc( + D3D11_SAMPLER_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11SamplerState_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11Asynchronous_Wrapper::ID3D11Asynchronous_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ +} + +UINT STDMETHODCALLTYPE ID3D11Asynchronous_Wrapper::GetDataSize() +{ + UINT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->GetDataSize(); + + Encode_ID3D11Asynchronous_GetDataSize( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->GetDataSize(); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11Query_Wrapper::ID3D11Query_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Asynchronous_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11Query_Wrapper::~ID3D11Query_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11Query_Wrapper* ID3D11Query_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11Query_Wrapper::GetDesc( + D3D11_QUERY_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11Query_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11Predicate_Wrapper::ID3D11Predicate_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Query_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11Predicate_Wrapper::~ID3D11Predicate_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11Predicate_Wrapper* ID3D11Predicate_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +ID3D11Counter_Wrapper::ID3D11Counter_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Asynchronous_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11Counter_Wrapper::~ID3D11Counter_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11Counter_Wrapper* ID3D11Counter_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11Counter_Wrapper::GetDesc( + D3D11_COUNTER_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11Counter_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11ClassInstance_Wrapper::ID3D11ClassInstance_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11ClassInstance_Wrapper::~ID3D11ClassInstance_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11ClassInstance_Wrapper* ID3D11ClassInstance_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11ClassInstance_Wrapper::GetClassLinkage( + ID3D11ClassLinkage** ppLinkage) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppLinkage); + + GetWrappedObjectAs()->GetClassLinkage( + ppLinkage); + + WrapObject(IID_ID3D11ClassLinkage, reinterpret_cast(ppLinkage), nullptr); + + Encode_ID3D11ClassInstance_GetClassLinkage( + this, + ppLinkage); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppLinkage); + } + else + { + GetWrappedObjectAs()->GetClassLinkage( + ppLinkage); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11ClassInstance_Wrapper::GetDesc( + D3D11_CLASS_INSTANCE_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11ClassInstance_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11ClassInstance_Wrapper::GetInstanceName( + LPSTR pInstanceName, + SIZE_T* pBufferLength) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pInstanceName, + pBufferLength); + + GetWrappedObjectAs()->GetInstanceName( + pInstanceName, + pBufferLength); + + Encode_ID3D11ClassInstance_GetInstanceName( + this, + pInstanceName, + pBufferLength); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pInstanceName, + pBufferLength); + } + else + { + GetWrappedObjectAs()->GetInstanceName( + pInstanceName, + pBufferLength); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11ClassInstance_Wrapper::GetTypeName( + LPSTR pTypeName, + SIZE_T* pBufferLength) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pTypeName, + pBufferLength); + + GetWrappedObjectAs()->GetTypeName( + pTypeName, + pBufferLength); + + Encode_ID3D11ClassInstance_GetTypeName( + this, + pTypeName, + pBufferLength); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pTypeName, + pBufferLength); + } + else + { + GetWrappedObjectAs()->GetTypeName( + pTypeName, + pBufferLength); + } + + manager->DecrementCallScope(); +} + +ID3D11ClassLinkage_Wrapper::ID3D11ClassLinkage_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11ClassLinkage_Wrapper::~ID3D11ClassLinkage_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11ClassLinkage_Wrapper* ID3D11ClassLinkage_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +HRESULT STDMETHODCALLTYPE ID3D11ClassLinkage_Wrapper::GetClassInstance( + LPCSTR pClassInstanceName, + UINT InstanceIndex, + ID3D11ClassInstance** ppInstance) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pClassInstanceName, + InstanceIndex, + ppInstance); + + result = GetWrappedObjectAs()->GetClassInstance( + pClassInstanceName, + InstanceIndex, + ppInstance); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11ClassInstance, reinterpret_cast(ppInstance), nullptr); + } + + Encode_ID3D11ClassLinkage_GetClassInstance( + this, + result, + pClassInstanceName, + InstanceIndex, + ppInstance); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pClassInstanceName, + InstanceIndex, + ppInstance); + } + else + { + result = GetWrappedObjectAs()->GetClassInstance( + pClassInstanceName, + InstanceIndex, + ppInstance); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11ClassLinkage_Wrapper::CreateClassInstance( + LPCSTR pClassTypeName, + UINT ConstantBufferOffset, + UINT ConstantVectorOffset, + UINT TextureOffset, + UINT SamplerOffset, + ID3D11ClassInstance** ppInstance) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pClassTypeName, + ConstantBufferOffset, + ConstantVectorOffset, + TextureOffset, + SamplerOffset, + ppInstance); + + result = GetWrappedObjectAs()->CreateClassInstance( + pClassTypeName, + ConstantBufferOffset, + ConstantVectorOffset, + TextureOffset, + SamplerOffset, + ppInstance); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11ClassInstance, reinterpret_cast(ppInstance), nullptr); + } + + Encode_ID3D11ClassLinkage_CreateClassInstance( + this, + result, + pClassTypeName, + ConstantBufferOffset, + ConstantVectorOffset, + TextureOffset, + SamplerOffset, + ppInstance); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pClassTypeName, + ConstantBufferOffset, + ConstantVectorOffset, + TextureOffset, + SamplerOffset, + ppInstance); + } + else + { + result = GetWrappedObjectAs()->CreateClassInstance( + pClassTypeName, + ConstantBufferOffset, + ConstantVectorOffset, + TextureOffset, + SamplerOffset, + ppInstance); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11CommandList_Wrapper::ID3D11CommandList_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11CommandList_Wrapper::~ID3D11CommandList_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11CommandList_Wrapper* ID3D11CommandList_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +UINT STDMETHODCALLTYPE ID3D11CommandList_Wrapper::GetContextFlags() +{ + UINT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->GetContextFlags(); + + Encode_ID3D11CommandList_GetContextFlags( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->GetContextFlags(); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11DeviceContext_Wrapper::ID3D11DeviceContext_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11DeviceContext_Wrapper::~ID3D11DeviceContext_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11DeviceContext_Wrapper* ID3D11DeviceContext_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::VSSetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->VSSetConstantBuffers( + StartSlot, + NumBuffers, + UnwrapObjects(ppConstantBuffers, NumBuffers, unwrap_memory)); + + Encode_ID3D11DeviceContext_VSSetConstantBuffers( + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + } + else + { + GetWrappedObjectAs()->VSSetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::PSSetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->PSSetShaderResources( + StartSlot, + NumViews, + UnwrapObjects(ppShaderResourceViews, NumViews, unwrap_memory)); + + Encode_ID3D11DeviceContext_PSSetShaderResources( + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + } + else + { + GetWrappedObjectAs()->PSSetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::PSSetShader( + ID3D11PixelShader* pPixelShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pPixelShader, + ppClassInstances, + NumClassInstances); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->PSSetShader( + encode::GetWrappedObject(pPixelShader), + UnwrapObjects(ppClassInstances, NumClassInstances, unwrap_memory), + NumClassInstances); + + Encode_ID3D11DeviceContext_PSSetShader( + this, + pPixelShader, + ppClassInstances, + NumClassInstances); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pPixelShader, + ppClassInstances, + NumClassInstances); + } + else + { + GetWrappedObjectAs()->PSSetShader( + pPixelShader, + ppClassInstances, + NumClassInstances); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::PSSetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->PSSetSamplers( + StartSlot, + NumSamplers, + UnwrapObjects(ppSamplers, NumSamplers, unwrap_memory)); + + Encode_ID3D11DeviceContext_PSSetSamplers( + this, + StartSlot, + NumSamplers, + ppSamplers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + } + else + { + GetWrappedObjectAs()->PSSetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::VSSetShader( + ID3D11VertexShader* pVertexShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVertexShader, + ppClassInstances, + NumClassInstances); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->VSSetShader( + encode::GetWrappedObject(pVertexShader), + UnwrapObjects(ppClassInstances, NumClassInstances, unwrap_memory), + NumClassInstances); + + Encode_ID3D11DeviceContext_VSSetShader( + this, + pVertexShader, + ppClassInstances, + NumClassInstances); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVertexShader, + ppClassInstances, + NumClassInstances); + } + else + { + GetWrappedObjectAs()->VSSetShader( + pVertexShader, + ppClassInstances, + NumClassInstances); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DrawIndexed( + UINT IndexCount, + UINT StartIndexLocation, + INT BaseVertexLocation) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + IndexCount, + StartIndexLocation, + BaseVertexLocation); + + GetWrappedObjectAs()->DrawIndexed( + IndexCount, + StartIndexLocation, + BaseVertexLocation); + + Encode_ID3D11DeviceContext_DrawIndexed( + this, + IndexCount, + StartIndexLocation, + BaseVertexLocation); + + CustomWrapperPostCall::Dispatch( + manager, + this, + IndexCount, + StartIndexLocation, + BaseVertexLocation); + } + else + { + GetWrappedObjectAs()->DrawIndexed( + IndexCount, + StartIndexLocation, + BaseVertexLocation); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::Draw( + UINT VertexCount, + UINT StartVertexLocation) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + VertexCount, + StartVertexLocation); + + GetWrappedObjectAs()->Draw( + VertexCount, + StartVertexLocation); + + Encode_ID3D11DeviceContext_Draw( + this, + VertexCount, + StartVertexLocation); + + CustomWrapperPostCall::Dispatch( + manager, + this, + VertexCount, + StartVertexLocation); + } + else + { + GetWrappedObjectAs()->Draw( + VertexCount, + StartVertexLocation); + } + + manager->DecrementCallScope(); +} + +HRESULT STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::Map( + ID3D11Resource* pResource, + UINT Subresource, + D3D11_MAP MapType, + UINT MapFlags, + D3D11_MAPPED_SUBRESOURCE* pMappedResource) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource, + Subresource, + MapType, + MapFlags, + pMappedResource); + + result = GetWrappedObjectAs()->Map( + encode::GetWrappedObject(pResource), + Subresource, + MapType, + MapFlags, + pMappedResource); + + Encode_ID3D11DeviceContext_Map( + this, + result, + pResource, + Subresource, + MapType, + MapFlags, + pMappedResource); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource, + Subresource, + MapType, + MapFlags, + pMappedResource); + } + else + { + result = GetWrappedObjectAs()->Map( + pResource, + Subresource, + MapType, + MapFlags, + pMappedResource); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::Unmap( + ID3D11Resource* pResource, + UINT Subresource) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource, + Subresource); + + GetWrappedObjectAs()->Unmap( + encode::GetWrappedObject(pResource), + Subresource); + + Encode_ID3D11DeviceContext_Unmap( + this, + pResource, + Subresource); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pResource, + Subresource); + } + else + { + GetWrappedObjectAs()->Unmap( + pResource, + Subresource); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::PSSetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->PSSetConstantBuffers( + StartSlot, + NumBuffers, + UnwrapObjects(ppConstantBuffers, NumBuffers, unwrap_memory)); + + Encode_ID3D11DeviceContext_PSSetConstantBuffers( + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + } + else + { + GetWrappedObjectAs()->PSSetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::IASetInputLayout( + ID3D11InputLayout* pInputLayout) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pInputLayout); + + GetWrappedObjectAs()->IASetInputLayout( + encode::GetWrappedObject(pInputLayout)); + + Encode_ID3D11DeviceContext_IASetInputLayout( + this, + pInputLayout); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pInputLayout); + } + else + { + GetWrappedObjectAs()->IASetInputLayout( + pInputLayout); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::IASetVertexBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppVertexBuffers, + const UINT* pStrides, + const UINT* pOffsets) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppVertexBuffers, + pStrides, + pOffsets); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->IASetVertexBuffers( + StartSlot, + NumBuffers, + UnwrapObjects(ppVertexBuffers, NumBuffers, unwrap_memory), + pStrides, + pOffsets); + + Encode_ID3D11DeviceContext_IASetVertexBuffers( + this, + StartSlot, + NumBuffers, + ppVertexBuffers, + pStrides, + pOffsets); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppVertexBuffers, + pStrides, + pOffsets); + } + else + { + GetWrappedObjectAs()->IASetVertexBuffers( + StartSlot, + NumBuffers, + ppVertexBuffers, + pStrides, + pOffsets); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::IASetIndexBuffer( + ID3D11Buffer* pIndexBuffer, + DXGI_FORMAT Format, + UINT Offset) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pIndexBuffer, + Format, + Offset); + + GetWrappedObjectAs()->IASetIndexBuffer( + encode::GetWrappedObject(pIndexBuffer), + Format, + Offset); + + Encode_ID3D11DeviceContext_IASetIndexBuffer( + this, + pIndexBuffer, + Format, + Offset); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pIndexBuffer, + Format, + Offset); + } + else + { + GetWrappedObjectAs()->IASetIndexBuffer( + pIndexBuffer, + Format, + Offset); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DrawIndexedInstanced( + UINT IndexCountPerInstance, + UINT InstanceCount, + UINT StartIndexLocation, + INT BaseVertexLocation, + UINT StartInstanceLocation) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + IndexCountPerInstance, + InstanceCount, + StartIndexLocation, + BaseVertexLocation, + StartInstanceLocation); + + GetWrappedObjectAs()->DrawIndexedInstanced( + IndexCountPerInstance, + InstanceCount, + StartIndexLocation, + BaseVertexLocation, + StartInstanceLocation); + + Encode_ID3D11DeviceContext_DrawIndexedInstanced( + this, + IndexCountPerInstance, + InstanceCount, + StartIndexLocation, + BaseVertexLocation, + StartInstanceLocation); + + CustomWrapperPostCall::Dispatch( + manager, + this, + IndexCountPerInstance, + InstanceCount, + StartIndexLocation, + BaseVertexLocation, + StartInstanceLocation); + } + else + { + GetWrappedObjectAs()->DrawIndexedInstanced( + IndexCountPerInstance, + InstanceCount, + StartIndexLocation, + BaseVertexLocation, + StartInstanceLocation); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DrawInstanced( + UINT VertexCountPerInstance, + UINT InstanceCount, + UINT StartVertexLocation, + UINT StartInstanceLocation) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + VertexCountPerInstance, + InstanceCount, + StartVertexLocation, + StartInstanceLocation); + + GetWrappedObjectAs()->DrawInstanced( + VertexCountPerInstance, + InstanceCount, + StartVertexLocation, + StartInstanceLocation); + + Encode_ID3D11DeviceContext_DrawInstanced( + this, + VertexCountPerInstance, + InstanceCount, + StartVertexLocation, + StartInstanceLocation); + + CustomWrapperPostCall::Dispatch( + manager, + this, + VertexCountPerInstance, + InstanceCount, + StartVertexLocation, + StartInstanceLocation); + } + else + { + GetWrappedObjectAs()->DrawInstanced( + VertexCountPerInstance, + InstanceCount, + StartVertexLocation, + StartInstanceLocation); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::GSSetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->GSSetConstantBuffers( + StartSlot, + NumBuffers, + UnwrapObjects(ppConstantBuffers, NumBuffers, unwrap_memory)); + + Encode_ID3D11DeviceContext_GSSetConstantBuffers( + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + } + else + { + GetWrappedObjectAs()->GSSetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::GSSetShader( + ID3D11GeometryShader* pShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pShader, + ppClassInstances, + NumClassInstances); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->GSSetShader( + encode::GetWrappedObject(pShader), + UnwrapObjects(ppClassInstances, NumClassInstances, unwrap_memory), + NumClassInstances); + + Encode_ID3D11DeviceContext_GSSetShader( + this, + pShader, + ppClassInstances, + NumClassInstances); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pShader, + ppClassInstances, + NumClassInstances); + } + else + { + GetWrappedObjectAs()->GSSetShader( + pShader, + ppClassInstances, + NumClassInstances); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::IASetPrimitiveTopology( + D3D11_PRIMITIVE_TOPOLOGY Topology) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + Topology); + + GetWrappedObjectAs()->IASetPrimitiveTopology( + Topology); + + Encode_ID3D11DeviceContext_IASetPrimitiveTopology( + this, + Topology); + + CustomWrapperPostCall::Dispatch( + manager, + this, + Topology); + } + else + { + GetWrappedObjectAs()->IASetPrimitiveTopology( + Topology); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::VSSetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->VSSetShaderResources( + StartSlot, + NumViews, + UnwrapObjects(ppShaderResourceViews, NumViews, unwrap_memory)); + + Encode_ID3D11DeviceContext_VSSetShaderResources( + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + } + else + { + GetWrappedObjectAs()->VSSetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::VSSetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->VSSetSamplers( + StartSlot, + NumSamplers, + UnwrapObjects(ppSamplers, NumSamplers, unwrap_memory)); + + Encode_ID3D11DeviceContext_VSSetSamplers( + this, + StartSlot, + NumSamplers, + ppSamplers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + } + else + { + GetWrappedObjectAs()->VSSetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::Begin( + ID3D11Asynchronous* pAsync) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pAsync); + + GetWrappedObjectAs()->Begin( + encode::GetWrappedObject(pAsync)); + + Encode_ID3D11DeviceContext_Begin( + this, + pAsync); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pAsync); + } + else + { + GetWrappedObjectAs()->Begin( + pAsync); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::End( + ID3D11Asynchronous* pAsync) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pAsync); + + GetWrappedObjectAs()->End( + encode::GetWrappedObject(pAsync)); + + Encode_ID3D11DeviceContext_End( + this, + pAsync); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pAsync); + } + else + { + GetWrappedObjectAs()->End( + pAsync); + } + + manager->DecrementCallScope(); +} + +HRESULT STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::GetData( + ID3D11Asynchronous* pAsync, + void* pData, + UINT DataSize, + UINT GetDataFlags) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pAsync, + pData, + DataSize, + GetDataFlags); + + result = GetWrappedObjectAs()->GetData( + encode::GetWrappedObject(pAsync), + pData, + DataSize, + GetDataFlags); + + Encode_ID3D11DeviceContext_GetData( + this, + result, + pAsync, + pData, + DataSize, + GetDataFlags); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pAsync, + pData, + DataSize, + GetDataFlags); + } + else + { + result = GetWrappedObjectAs()->GetData( + pAsync, + pData, + DataSize, + GetDataFlags); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::SetPredication( + ID3D11Predicate* pPredicate, + BOOL PredicateValue) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pPredicate, + PredicateValue); + + GetWrappedObjectAs()->SetPredication( + encode::GetWrappedObject(pPredicate), + PredicateValue); + + Encode_ID3D11DeviceContext_SetPredication( + this, + pPredicate, + PredicateValue); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pPredicate, + PredicateValue); + } + else + { + GetWrappedObjectAs()->SetPredication( + pPredicate, + PredicateValue); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::GSSetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->GSSetShaderResources( + StartSlot, + NumViews, + UnwrapObjects(ppShaderResourceViews, NumViews, unwrap_memory)); + + Encode_ID3D11DeviceContext_GSSetShaderResources( + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + } + else + { + GetWrappedObjectAs()->GSSetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::GSSetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->GSSetSamplers( + StartSlot, + NumSamplers, + UnwrapObjects(ppSamplers, NumSamplers, unwrap_memory)); + + Encode_ID3D11DeviceContext_GSSetSamplers( + this, + StartSlot, + NumSamplers, + ppSamplers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + } + else + { + GetWrappedObjectAs()->GSSetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::OMSetRenderTargets( + UINT NumViews, + ID3D11RenderTargetView* const* ppRenderTargetViews, + ID3D11DepthStencilView* pDepthStencilView) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + NumViews, + ppRenderTargetViews, + pDepthStencilView); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->OMSetRenderTargets( + NumViews, + UnwrapObjects(ppRenderTargetViews, NumViews, unwrap_memory), + encode::GetWrappedObject(pDepthStencilView)); + + Encode_ID3D11DeviceContext_OMSetRenderTargets( + this, + NumViews, + ppRenderTargetViews, + pDepthStencilView); + + CustomWrapperPostCall::Dispatch( + manager, + this, + NumViews, + ppRenderTargetViews, + pDepthStencilView); + } + else + { + GetWrappedObjectAs()->OMSetRenderTargets( + NumViews, + ppRenderTargetViews, + pDepthStencilView); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::OMSetRenderTargetsAndUnorderedAccessViews( + UINT NumRTVs, + ID3D11RenderTargetView* const* ppRenderTargetViews, + ID3D11DepthStencilView* pDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView* const* ppUnorderedAccessViews, + const UINT* pUAVInitialCounts) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + NumRTVs, + ppRenderTargetViews, + pDepthStencilView, + UAVStartSlot, + NumUAVs, + ppUnorderedAccessViews, + pUAVInitialCounts); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->OMSetRenderTargetsAndUnorderedAccessViews( + NumRTVs, + UnwrapObjects(ppRenderTargetViews, NumRTVs, unwrap_memory), + encode::GetWrappedObject(pDepthStencilView), + UAVStartSlot, + NumUAVs, + UnwrapObjects(ppUnorderedAccessViews, NumUAVs, unwrap_memory), + pUAVInitialCounts); + + Encode_ID3D11DeviceContext_OMSetRenderTargetsAndUnorderedAccessViews( + this, + NumRTVs, + ppRenderTargetViews, + pDepthStencilView, + UAVStartSlot, + NumUAVs, + ppUnorderedAccessViews, + pUAVInitialCounts); + + CustomWrapperPostCall::Dispatch( + manager, + this, + NumRTVs, + ppRenderTargetViews, + pDepthStencilView, + UAVStartSlot, + NumUAVs, + ppUnorderedAccessViews, + pUAVInitialCounts); + } + else + { + GetWrappedObjectAs()->OMSetRenderTargetsAndUnorderedAccessViews( + NumRTVs, + ppRenderTargetViews, + pDepthStencilView, + UAVStartSlot, + NumUAVs, + ppUnorderedAccessViews, + pUAVInitialCounts); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::OMSetBlendState( + ID3D11BlendState* pBlendState, + const FLOAT BlendFactor [4], + UINT SampleMask) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pBlendState, + BlendFactor, + SampleMask); + + GetWrappedObjectAs()->OMSetBlendState( + encode::GetWrappedObject(pBlendState), + BlendFactor, + SampleMask); + + Encode_ID3D11DeviceContext_OMSetBlendState( + this, + pBlendState, + BlendFactor, + SampleMask); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pBlendState, + BlendFactor, + SampleMask); + } + else + { + GetWrappedObjectAs()->OMSetBlendState( + pBlendState, + BlendFactor, + SampleMask); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::OMSetDepthStencilState( + ID3D11DepthStencilState* pDepthStencilState, + UINT StencilRef) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDepthStencilState, + StencilRef); + + GetWrappedObjectAs()->OMSetDepthStencilState( + encode::GetWrappedObject(pDepthStencilState), + StencilRef); + + Encode_ID3D11DeviceContext_OMSetDepthStencilState( + this, + pDepthStencilState, + StencilRef); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDepthStencilState, + StencilRef); + } + else + { + GetWrappedObjectAs()->OMSetDepthStencilState( + pDepthStencilState, + StencilRef); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::SOSetTargets( + UINT NumBuffers, + ID3D11Buffer* const* ppSOTargets, + const UINT* pOffsets) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + NumBuffers, + ppSOTargets, + pOffsets); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->SOSetTargets( + NumBuffers, + UnwrapObjects(ppSOTargets, NumBuffers, unwrap_memory), + pOffsets); + + Encode_ID3D11DeviceContext_SOSetTargets( + this, + NumBuffers, + ppSOTargets, + pOffsets); + + CustomWrapperPostCall::Dispatch( + manager, + this, + NumBuffers, + ppSOTargets, + pOffsets); + } + else + { + GetWrappedObjectAs()->SOSetTargets( + NumBuffers, + ppSOTargets, + pOffsets); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DrawAuto() +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + GetWrappedObjectAs()->DrawAuto(); + + Encode_ID3D11DeviceContext_DrawAuto( + this); + + CustomWrapperPostCall::Dispatch( + manager, + this); + } + else + { + GetWrappedObjectAs()->DrawAuto(); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DrawIndexedInstancedIndirect( + ID3D11Buffer* pBufferForArgs, + UINT AlignedByteOffsetForArgs) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pBufferForArgs, + AlignedByteOffsetForArgs); + + GetWrappedObjectAs()->DrawIndexedInstancedIndirect( + encode::GetWrappedObject(pBufferForArgs), + AlignedByteOffsetForArgs); + + Encode_ID3D11DeviceContext_DrawIndexedInstancedIndirect( + this, + pBufferForArgs, + AlignedByteOffsetForArgs); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pBufferForArgs, + AlignedByteOffsetForArgs); + } + else + { + GetWrappedObjectAs()->DrawIndexedInstancedIndirect( + pBufferForArgs, + AlignedByteOffsetForArgs); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DrawInstancedIndirect( + ID3D11Buffer* pBufferForArgs, + UINT AlignedByteOffsetForArgs) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pBufferForArgs, + AlignedByteOffsetForArgs); + + GetWrappedObjectAs()->DrawInstancedIndirect( + encode::GetWrappedObject(pBufferForArgs), + AlignedByteOffsetForArgs); + + Encode_ID3D11DeviceContext_DrawInstancedIndirect( + this, + pBufferForArgs, + AlignedByteOffsetForArgs); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pBufferForArgs, + AlignedByteOffsetForArgs); + } + else + { + GetWrappedObjectAs()->DrawInstancedIndirect( + pBufferForArgs, + AlignedByteOffsetForArgs); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::Dispatch( + UINT ThreadGroupCountX, + UINT ThreadGroupCountY, + UINT ThreadGroupCountZ) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ThreadGroupCountX, + ThreadGroupCountY, + ThreadGroupCountZ); + + GetWrappedObjectAs()->Dispatch( + ThreadGroupCountX, + ThreadGroupCountY, + ThreadGroupCountZ); + + Encode_ID3D11DeviceContext_Dispatch( + this, + ThreadGroupCountX, + ThreadGroupCountY, + ThreadGroupCountZ); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ThreadGroupCountX, + ThreadGroupCountY, + ThreadGroupCountZ); + } + else + { + GetWrappedObjectAs()->Dispatch( + ThreadGroupCountX, + ThreadGroupCountY, + ThreadGroupCountZ); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DispatchIndirect( + ID3D11Buffer* pBufferForArgs, + UINT AlignedByteOffsetForArgs) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pBufferForArgs, + AlignedByteOffsetForArgs); + + GetWrappedObjectAs()->DispatchIndirect( + encode::GetWrappedObject(pBufferForArgs), + AlignedByteOffsetForArgs); + + Encode_ID3D11DeviceContext_DispatchIndirect( + this, + pBufferForArgs, + AlignedByteOffsetForArgs); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pBufferForArgs, + AlignedByteOffsetForArgs); + } + else + { + GetWrappedObjectAs()->DispatchIndirect( + pBufferForArgs, + AlignedByteOffsetForArgs); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::RSSetState( + ID3D11RasterizerState* pRasterizerState) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pRasterizerState); + + GetWrappedObjectAs()->RSSetState( + encode::GetWrappedObject(pRasterizerState)); + + Encode_ID3D11DeviceContext_RSSetState( + this, + pRasterizerState); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pRasterizerState); + } + else + { + GetWrappedObjectAs()->RSSetState( + pRasterizerState); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::RSSetViewports( + UINT NumViewports, + const D3D11_VIEWPORT* pViewports) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + NumViewports, + pViewports); + + GetWrappedObjectAs()->RSSetViewports( + NumViewports, + pViewports); + + Encode_ID3D11DeviceContext_RSSetViewports( + this, + NumViewports, + pViewports); + + CustomWrapperPostCall::Dispatch( + manager, + this, + NumViewports, + pViewports); + } + else + { + GetWrappedObjectAs()->RSSetViewports( + NumViewports, + pViewports); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::RSSetScissorRects( + UINT NumRects, + const D3D11_RECT* pRects) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + NumRects, + pRects); + + GetWrappedObjectAs()->RSSetScissorRects( + NumRects, + pRects); + + Encode_ID3D11DeviceContext_RSSetScissorRects( + this, + NumRects, + pRects); + + CustomWrapperPostCall::Dispatch( + manager, + this, + NumRects, + pRects); + } + else + { + GetWrappedObjectAs()->RSSetScissorRects( + NumRects, + pRects); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::CopySubresourceRegion( + ID3D11Resource* pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + const D3D11_BOX* pSrcBox) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDstResource, + DstSubresource, + DstX, + DstY, + DstZ, + pSrcResource, + SrcSubresource, + pSrcBox); + + GetWrappedObjectAs()->CopySubresourceRegion( + encode::GetWrappedObject(pDstResource), + DstSubresource, + DstX, + DstY, + DstZ, + encode::GetWrappedObject(pSrcResource), + SrcSubresource, + pSrcBox); + + Encode_ID3D11DeviceContext_CopySubresourceRegion( + this, + pDstResource, + DstSubresource, + DstX, + DstY, + DstZ, + pSrcResource, + SrcSubresource, + pSrcBox); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDstResource, + DstSubresource, + DstX, + DstY, + DstZ, + pSrcResource, + SrcSubresource, + pSrcBox); + } + else + { + GetWrappedObjectAs()->CopySubresourceRegion( + pDstResource, + DstSubresource, + DstX, + DstY, + DstZ, + pSrcResource, + SrcSubresource, + pSrcBox); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::CopyResource( + ID3D11Resource* pDstResource, + ID3D11Resource* pSrcResource) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDstResource, + pSrcResource); + + GetWrappedObjectAs()->CopyResource( + encode::GetWrappedObject(pDstResource), + encode::GetWrappedObject(pSrcResource)); + + Encode_ID3D11DeviceContext_CopyResource( + this, + pDstResource, + pSrcResource); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDstResource, + pSrcResource); + } + else + { + GetWrappedObjectAs()->CopyResource( + pDstResource, + pSrcResource); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::UpdateSubresource( + ID3D11Resource* pDstResource, + UINT DstSubresource, + const D3D11_BOX* pDstBox, + const void* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDstResource, + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch); + + GetWrappedObjectAs()->UpdateSubresource( + encode::GetWrappedObject(pDstResource), + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch); + + Encode_ID3D11DeviceContext_UpdateSubresource( + this, + pDstResource, + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDstResource, + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch); + } + else + { + GetWrappedObjectAs()->UpdateSubresource( + pDstResource, + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::CopyStructureCount( + ID3D11Buffer* pDstBuffer, + UINT DstAlignedByteOffset, + ID3D11UnorderedAccessView* pSrcView) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDstBuffer, + DstAlignedByteOffset, + pSrcView); + + GetWrappedObjectAs()->CopyStructureCount( + encode::GetWrappedObject(pDstBuffer), + DstAlignedByteOffset, + encode::GetWrappedObject(pSrcView)); + + Encode_ID3D11DeviceContext_CopyStructureCount( + this, + pDstBuffer, + DstAlignedByteOffset, + pSrcView); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDstBuffer, + DstAlignedByteOffset, + pSrcView); + } + else + { + GetWrappedObjectAs()->CopyStructureCount( + pDstBuffer, + DstAlignedByteOffset, + pSrcView); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::ClearRenderTargetView( + ID3D11RenderTargetView* pRenderTargetView, + const FLOAT ColorRGBA [4]) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pRenderTargetView, + ColorRGBA); + + GetWrappedObjectAs()->ClearRenderTargetView( + encode::GetWrappedObject(pRenderTargetView), + ColorRGBA); + + Encode_ID3D11DeviceContext_ClearRenderTargetView( + this, + pRenderTargetView, + ColorRGBA); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pRenderTargetView, + ColorRGBA); + } + else + { + GetWrappedObjectAs()->ClearRenderTargetView( + pRenderTargetView, + ColorRGBA); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::ClearUnorderedAccessViewUint( + ID3D11UnorderedAccessView* pUnorderedAccessView, + const UINT Values [4]) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pUnorderedAccessView, + Values); + + GetWrappedObjectAs()->ClearUnorderedAccessViewUint( + encode::GetWrappedObject(pUnorderedAccessView), + Values); + + Encode_ID3D11DeviceContext_ClearUnorderedAccessViewUint( + this, + pUnorderedAccessView, + Values); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pUnorderedAccessView, + Values); + } + else + { + GetWrappedObjectAs()->ClearUnorderedAccessViewUint( + pUnorderedAccessView, + Values); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::ClearUnorderedAccessViewFloat( + ID3D11UnorderedAccessView* pUnorderedAccessView, + const FLOAT Values [4]) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pUnorderedAccessView, + Values); + + GetWrappedObjectAs()->ClearUnorderedAccessViewFloat( + encode::GetWrappedObject(pUnorderedAccessView), + Values); + + Encode_ID3D11DeviceContext_ClearUnorderedAccessViewFloat( + this, + pUnorderedAccessView, + Values); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pUnorderedAccessView, + Values); + } + else + { + GetWrappedObjectAs()->ClearUnorderedAccessViewFloat( + pUnorderedAccessView, + Values); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::ClearDepthStencilView( + ID3D11DepthStencilView* pDepthStencilView, + UINT ClearFlags, + FLOAT Depth, + UINT8 Stencil) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDepthStencilView, + ClearFlags, + Depth, + Stencil); + + GetWrappedObjectAs()->ClearDepthStencilView( + encode::GetWrappedObject(pDepthStencilView), + ClearFlags, + Depth, + Stencil); + + Encode_ID3D11DeviceContext_ClearDepthStencilView( + this, + pDepthStencilView, + ClearFlags, + Depth, + Stencil); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDepthStencilView, + ClearFlags, + Depth, + Stencil); + } + else + { + GetWrappedObjectAs()->ClearDepthStencilView( + pDepthStencilView, + ClearFlags, + Depth, + Stencil); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::GenerateMips( + ID3D11ShaderResourceView* pShaderResourceView) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pShaderResourceView); + + GetWrappedObjectAs()->GenerateMips( + encode::GetWrappedObject(pShaderResourceView)); + + Encode_ID3D11DeviceContext_GenerateMips( + this, + pShaderResourceView); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pShaderResourceView); + } + else + { + GetWrappedObjectAs()->GenerateMips( + pShaderResourceView); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::SetResourceMinLOD( + ID3D11Resource* pResource, + FLOAT MinLOD) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource, + MinLOD); + + GetWrappedObjectAs()->SetResourceMinLOD( + encode::GetWrappedObject(pResource), + MinLOD); + + Encode_ID3D11DeviceContext_SetResourceMinLOD( + this, + pResource, + MinLOD); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pResource, + MinLOD); + } + else + { + GetWrappedObjectAs()->SetResourceMinLOD( + pResource, + MinLOD); + } + + manager->DecrementCallScope(); +} + +FLOAT STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::GetResourceMinLOD( + ID3D11Resource* pResource) +{ + FLOAT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource); + + result = GetWrappedObjectAs()->GetResourceMinLOD( + encode::GetWrappedObject(pResource)); + + Encode_ID3D11DeviceContext_GetResourceMinLOD( + this, + result, + pResource); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource); + } + else + { + result = GetWrappedObjectAs()->GetResourceMinLOD( + pResource); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::ResolveSubresource( + ID3D11Resource* pDstResource, + UINT DstSubresource, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + DXGI_FORMAT Format) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDstResource, + DstSubresource, + pSrcResource, + SrcSubresource, + Format); + + GetWrappedObjectAs()->ResolveSubresource( + encode::GetWrappedObject(pDstResource), + DstSubresource, + encode::GetWrappedObject(pSrcResource), + SrcSubresource, + Format); + + Encode_ID3D11DeviceContext_ResolveSubresource( + this, + pDstResource, + DstSubresource, + pSrcResource, + SrcSubresource, + Format); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDstResource, + DstSubresource, + pSrcResource, + SrcSubresource, + Format); + } + else + { + GetWrappedObjectAs()->ResolveSubresource( + pDstResource, + DstSubresource, + pSrcResource, + SrcSubresource, + Format); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::ExecuteCommandList( + ID3D11CommandList* pCommandList, + BOOL RestoreContextState) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCommandList, + RestoreContextState); + + GetWrappedObjectAs()->ExecuteCommandList( + encode::GetWrappedObject(pCommandList), + RestoreContextState); + + Encode_ID3D11DeviceContext_ExecuteCommandList( + this, + pCommandList, + RestoreContextState); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pCommandList, + RestoreContextState); + } + else + { + GetWrappedObjectAs()->ExecuteCommandList( + pCommandList, + RestoreContextState); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::HSSetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->HSSetShaderResources( + StartSlot, + NumViews, + UnwrapObjects(ppShaderResourceViews, NumViews, unwrap_memory)); + + Encode_ID3D11DeviceContext_HSSetShaderResources( + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + } + else + { + GetWrappedObjectAs()->HSSetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::HSSetShader( + ID3D11HullShader* pHullShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pHullShader, + ppClassInstances, + NumClassInstances); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->HSSetShader( + encode::GetWrappedObject(pHullShader), + UnwrapObjects(ppClassInstances, NumClassInstances, unwrap_memory), + NumClassInstances); + + Encode_ID3D11DeviceContext_HSSetShader( + this, + pHullShader, + ppClassInstances, + NumClassInstances); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pHullShader, + ppClassInstances, + NumClassInstances); + } + else + { + GetWrappedObjectAs()->HSSetShader( + pHullShader, + ppClassInstances, + NumClassInstances); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::HSSetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->HSSetSamplers( + StartSlot, + NumSamplers, + UnwrapObjects(ppSamplers, NumSamplers, unwrap_memory)); + + Encode_ID3D11DeviceContext_HSSetSamplers( + this, + StartSlot, + NumSamplers, + ppSamplers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + } + else + { + GetWrappedObjectAs()->HSSetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::HSSetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->HSSetConstantBuffers( + StartSlot, + NumBuffers, + UnwrapObjects(ppConstantBuffers, NumBuffers, unwrap_memory)); + + Encode_ID3D11DeviceContext_HSSetConstantBuffers( + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + } + else + { + GetWrappedObjectAs()->HSSetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DSSetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->DSSetShaderResources( + StartSlot, + NumViews, + UnwrapObjects(ppShaderResourceViews, NumViews, unwrap_memory)); + + Encode_ID3D11DeviceContext_DSSetShaderResources( + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + } + else + { + GetWrappedObjectAs()->DSSetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DSSetShader( + ID3D11DomainShader* pDomainShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDomainShader, + ppClassInstances, + NumClassInstances); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->DSSetShader( + encode::GetWrappedObject(pDomainShader), + UnwrapObjects(ppClassInstances, NumClassInstances, unwrap_memory), + NumClassInstances); + + Encode_ID3D11DeviceContext_DSSetShader( + this, + pDomainShader, + ppClassInstances, + NumClassInstances); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDomainShader, + ppClassInstances, + NumClassInstances); + } + else + { + GetWrappedObjectAs()->DSSetShader( + pDomainShader, + ppClassInstances, + NumClassInstances); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DSSetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->DSSetSamplers( + StartSlot, + NumSamplers, + UnwrapObjects(ppSamplers, NumSamplers, unwrap_memory)); + + Encode_ID3D11DeviceContext_DSSetSamplers( + this, + StartSlot, + NumSamplers, + ppSamplers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + } + else + { + GetWrappedObjectAs()->DSSetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DSSetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->DSSetConstantBuffers( + StartSlot, + NumBuffers, + UnwrapObjects(ppConstantBuffers, NumBuffers, unwrap_memory)); + + Encode_ID3D11DeviceContext_DSSetConstantBuffers( + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + } + else + { + GetWrappedObjectAs()->DSSetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::CSSetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->CSSetShaderResources( + StartSlot, + NumViews, + UnwrapObjects(ppShaderResourceViews, NumViews, unwrap_memory)); + + Encode_ID3D11DeviceContext_CSSetShaderResources( + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + } + else + { + GetWrappedObjectAs()->CSSetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::CSSetUnorderedAccessViews( + UINT StartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView* const* ppUnorderedAccessViews, + const UINT* pUAVInitialCounts) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumUAVs, + ppUnorderedAccessViews, + pUAVInitialCounts); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->CSSetUnorderedAccessViews( + StartSlot, + NumUAVs, + UnwrapObjects(ppUnorderedAccessViews, NumUAVs, unwrap_memory), + pUAVInitialCounts); + + Encode_ID3D11DeviceContext_CSSetUnorderedAccessViews( + this, + StartSlot, + NumUAVs, + ppUnorderedAccessViews, + pUAVInitialCounts); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumUAVs, + ppUnorderedAccessViews, + pUAVInitialCounts); + } + else + { + GetWrappedObjectAs()->CSSetUnorderedAccessViews( + StartSlot, + NumUAVs, + ppUnorderedAccessViews, + pUAVInitialCounts); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::CSSetShader( + ID3D11ComputeShader* pComputeShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pComputeShader, + ppClassInstances, + NumClassInstances); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->CSSetShader( + encode::GetWrappedObject(pComputeShader), + UnwrapObjects(ppClassInstances, NumClassInstances, unwrap_memory), + NumClassInstances); + + Encode_ID3D11DeviceContext_CSSetShader( + this, + pComputeShader, + ppClassInstances, + NumClassInstances); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pComputeShader, + ppClassInstances, + NumClassInstances); + } + else + { + GetWrappedObjectAs()->CSSetShader( + pComputeShader, + ppClassInstances, + NumClassInstances); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::CSSetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->CSSetSamplers( + StartSlot, + NumSamplers, + UnwrapObjects(ppSamplers, NumSamplers, unwrap_memory)); + + Encode_ID3D11DeviceContext_CSSetSamplers( + this, + StartSlot, + NumSamplers, + ppSamplers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + } + else + { + GetWrappedObjectAs()->CSSetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::CSSetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->CSSetConstantBuffers( + StartSlot, + NumBuffers, + UnwrapObjects(ppConstantBuffers, NumBuffers, unwrap_memory)); + + Encode_ID3D11DeviceContext_CSSetConstantBuffers( + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + } + else + { + GetWrappedObjectAs()->CSSetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::VSGetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + GetWrappedObjectAs()->VSGetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + + WrapObjectArray(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), NumBuffers, nullptr); + + Encode_ID3D11DeviceContext_VSGetConstantBuffers( + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + } + else + { + GetWrappedObjectAs()->VSGetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::PSGetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + GetWrappedObjectAs()->PSGetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + + WrapObjectArray(IID_ID3D11ShaderResourceView, reinterpret_cast(ppShaderResourceViews), NumViews, nullptr); + + Encode_ID3D11DeviceContext_PSGetShaderResources( + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + } + else + { + GetWrappedObjectAs()->PSGetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::PSGetShader( + ID3D11PixelShader** ppPixelShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppPixelShader, + ppClassInstances, + pNumClassInstances); + + GetWrappedObjectAs()->PSGetShader( + ppPixelShader, + ppClassInstances, + pNumClassInstances); + + WrapObject(IID_ID3D11PixelShader, reinterpret_cast(ppPixelShader), nullptr); + WrapObjectArray(IID_ID3D11ClassInstance, reinterpret_cast(ppClassInstances), (pNumClassInstances != nullptr) ? *pNumClassInstances : 0, nullptr); + + Encode_ID3D11DeviceContext_PSGetShader( + this, + ppPixelShader, + ppClassInstances, + pNumClassInstances); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppPixelShader, + ppClassInstances, + pNumClassInstances); + } + else + { + GetWrappedObjectAs()->PSGetShader( + ppPixelShader, + ppClassInstances, + pNumClassInstances); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::PSGetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + + GetWrappedObjectAs()->PSGetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + + WrapObjectArray(IID_ID3D11SamplerState, reinterpret_cast(ppSamplers), NumSamplers, nullptr); + + Encode_ID3D11DeviceContext_PSGetSamplers( + this, + StartSlot, + NumSamplers, + ppSamplers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + } + else + { + GetWrappedObjectAs()->PSGetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::VSGetShader( + ID3D11VertexShader** ppVertexShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppVertexShader, + ppClassInstances, + pNumClassInstances); + + GetWrappedObjectAs()->VSGetShader( + ppVertexShader, + ppClassInstances, + pNumClassInstances); + + WrapObject(IID_ID3D11VertexShader, reinterpret_cast(ppVertexShader), nullptr); + WrapObjectArray(IID_ID3D11ClassInstance, reinterpret_cast(ppClassInstances), (pNumClassInstances != nullptr) ? *pNumClassInstances : 0, nullptr); + + Encode_ID3D11DeviceContext_VSGetShader( + this, + ppVertexShader, + ppClassInstances, + pNumClassInstances); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppVertexShader, + ppClassInstances, + pNumClassInstances); + } + else + { + GetWrappedObjectAs()->VSGetShader( + ppVertexShader, + ppClassInstances, + pNumClassInstances); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::PSGetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + GetWrappedObjectAs()->PSGetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + + WrapObjectArray(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), NumBuffers, nullptr); + + Encode_ID3D11DeviceContext_PSGetConstantBuffers( + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + } + else + { + GetWrappedObjectAs()->PSGetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::IAGetInputLayout( + ID3D11InputLayout** ppInputLayout) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppInputLayout); + + GetWrappedObjectAs()->IAGetInputLayout( + ppInputLayout); + + WrapObject(IID_ID3D11InputLayout, reinterpret_cast(ppInputLayout), nullptr); + + Encode_ID3D11DeviceContext_IAGetInputLayout( + this, + ppInputLayout); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppInputLayout); + } + else + { + GetWrappedObjectAs()->IAGetInputLayout( + ppInputLayout); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::IAGetVertexBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppVertexBuffers, + UINT* pStrides, + UINT* pOffsets) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppVertexBuffers, + pStrides, + pOffsets); + + GetWrappedObjectAs()->IAGetVertexBuffers( + StartSlot, + NumBuffers, + ppVertexBuffers, + pStrides, + pOffsets); + + WrapObjectArray(IID_ID3D11Buffer, reinterpret_cast(ppVertexBuffers), NumBuffers, nullptr); + + Encode_ID3D11DeviceContext_IAGetVertexBuffers( + this, + StartSlot, + NumBuffers, + ppVertexBuffers, + pStrides, + pOffsets); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppVertexBuffers, + pStrides, + pOffsets); + } + else + { + GetWrappedObjectAs()->IAGetVertexBuffers( + StartSlot, + NumBuffers, + ppVertexBuffers, + pStrides, + pOffsets); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::IAGetIndexBuffer( + ID3D11Buffer** pIndexBuffer, + DXGI_FORMAT* Format, + UINT* Offset) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pIndexBuffer, + Format, + Offset); + + GetWrappedObjectAs()->IAGetIndexBuffer( + pIndexBuffer, + Format, + Offset); + + WrapObject(IID_ID3D11Buffer, reinterpret_cast(pIndexBuffer), nullptr); + + Encode_ID3D11DeviceContext_IAGetIndexBuffer( + this, + pIndexBuffer, + Format, + Offset); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pIndexBuffer, + Format, + Offset); + } + else + { + GetWrappedObjectAs()->IAGetIndexBuffer( + pIndexBuffer, + Format, + Offset); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::GSGetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + GetWrappedObjectAs()->GSGetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + + WrapObjectArray(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), NumBuffers, nullptr); + + Encode_ID3D11DeviceContext_GSGetConstantBuffers( + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + } + else + { + GetWrappedObjectAs()->GSGetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::GSGetShader( + ID3D11GeometryShader** ppGeometryShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppGeometryShader, + ppClassInstances, + pNumClassInstances); + + GetWrappedObjectAs()->GSGetShader( + ppGeometryShader, + ppClassInstances, + pNumClassInstances); + + WrapObject(IID_ID3D11GeometryShader, reinterpret_cast(ppGeometryShader), nullptr); + WrapObjectArray(IID_ID3D11ClassInstance, reinterpret_cast(ppClassInstances), (pNumClassInstances != nullptr) ? *pNumClassInstances : 0, nullptr); + + Encode_ID3D11DeviceContext_GSGetShader( + this, + ppGeometryShader, + ppClassInstances, + pNumClassInstances); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppGeometryShader, + ppClassInstances, + pNumClassInstances); + } + else + { + GetWrappedObjectAs()->GSGetShader( + ppGeometryShader, + ppClassInstances, + pNumClassInstances); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::IAGetPrimitiveTopology( + D3D11_PRIMITIVE_TOPOLOGY* pTopology) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pTopology); + + GetWrappedObjectAs()->IAGetPrimitiveTopology( + pTopology); + + Encode_ID3D11DeviceContext_IAGetPrimitiveTopology( + this, + pTopology); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pTopology); + } + else + { + GetWrappedObjectAs()->IAGetPrimitiveTopology( + pTopology); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::VSGetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + GetWrappedObjectAs()->VSGetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + + WrapObjectArray(IID_ID3D11ShaderResourceView, reinterpret_cast(ppShaderResourceViews), NumViews, nullptr); + + Encode_ID3D11DeviceContext_VSGetShaderResources( + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + } + else + { + GetWrappedObjectAs()->VSGetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::VSGetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + + GetWrappedObjectAs()->VSGetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + + WrapObjectArray(IID_ID3D11SamplerState, reinterpret_cast(ppSamplers), NumSamplers, nullptr); + + Encode_ID3D11DeviceContext_VSGetSamplers( + this, + StartSlot, + NumSamplers, + ppSamplers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + } + else + { + GetWrappedObjectAs()->VSGetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::GetPredication( + ID3D11Predicate** ppPredicate, + BOOL* pPredicateValue) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppPredicate, + pPredicateValue); + + GetWrappedObjectAs()->GetPredication( + ppPredicate, + pPredicateValue); + + WrapObject(IID_ID3D11Predicate, reinterpret_cast(ppPredicate), nullptr); + + Encode_ID3D11DeviceContext_GetPredication( + this, + ppPredicate, + pPredicateValue); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppPredicate, + pPredicateValue); + } + else + { + GetWrappedObjectAs()->GetPredication( + ppPredicate, + pPredicateValue); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::GSGetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + GetWrappedObjectAs()->GSGetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + + WrapObjectArray(IID_ID3D11ShaderResourceView, reinterpret_cast(ppShaderResourceViews), NumViews, nullptr); + + Encode_ID3D11DeviceContext_GSGetShaderResources( + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + } + else + { + GetWrappedObjectAs()->GSGetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::GSGetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + + GetWrappedObjectAs()->GSGetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + + WrapObjectArray(IID_ID3D11SamplerState, reinterpret_cast(ppSamplers), NumSamplers, nullptr); + + Encode_ID3D11DeviceContext_GSGetSamplers( + this, + StartSlot, + NumSamplers, + ppSamplers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + } + else + { + GetWrappedObjectAs()->GSGetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::OMGetRenderTargets( + UINT NumViews, + ID3D11RenderTargetView** ppRenderTargetViews, + ID3D11DepthStencilView** ppDepthStencilView) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + NumViews, + ppRenderTargetViews, + ppDepthStencilView); + + GetWrappedObjectAs()->OMGetRenderTargets( + NumViews, + ppRenderTargetViews, + ppDepthStencilView); + + WrapObjectArray(IID_ID3D11RenderTargetView, reinterpret_cast(ppRenderTargetViews), NumViews, nullptr); + WrapObject(IID_ID3D11DepthStencilView, reinterpret_cast(ppDepthStencilView), nullptr); + + Encode_ID3D11DeviceContext_OMGetRenderTargets( + this, + NumViews, + ppRenderTargetViews, + ppDepthStencilView); + + CustomWrapperPostCall::Dispatch( + manager, + this, + NumViews, + ppRenderTargetViews, + ppDepthStencilView); + } + else + { + GetWrappedObjectAs()->OMGetRenderTargets( + NumViews, + ppRenderTargetViews, + ppDepthStencilView); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::OMGetRenderTargetsAndUnorderedAccessViews( + UINT NumRTVs, + ID3D11RenderTargetView** ppRenderTargetViews, + ID3D11DepthStencilView** ppDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView** ppUnorderedAccessViews) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + NumRTVs, + ppRenderTargetViews, + ppDepthStencilView, + UAVStartSlot, + NumUAVs, + ppUnorderedAccessViews); + + GetWrappedObjectAs()->OMGetRenderTargetsAndUnorderedAccessViews( + NumRTVs, + ppRenderTargetViews, + ppDepthStencilView, + UAVStartSlot, + NumUAVs, + ppUnorderedAccessViews); + + WrapObjectArray(IID_ID3D11RenderTargetView, reinterpret_cast(ppRenderTargetViews), NumRTVs, nullptr); + WrapObject(IID_ID3D11DepthStencilView, reinterpret_cast(ppDepthStencilView), nullptr); + WrapObjectArray(IID_ID3D11UnorderedAccessView, reinterpret_cast(ppUnorderedAccessViews), NumUAVs, nullptr); + + Encode_ID3D11DeviceContext_OMGetRenderTargetsAndUnorderedAccessViews( + this, + NumRTVs, + ppRenderTargetViews, + ppDepthStencilView, + UAVStartSlot, + NumUAVs, + ppUnorderedAccessViews); + + CustomWrapperPostCall::Dispatch( + manager, + this, + NumRTVs, + ppRenderTargetViews, + ppDepthStencilView, + UAVStartSlot, + NumUAVs, + ppUnorderedAccessViews); + } + else + { + GetWrappedObjectAs()->OMGetRenderTargetsAndUnorderedAccessViews( + NumRTVs, + ppRenderTargetViews, + ppDepthStencilView, + UAVStartSlot, + NumUAVs, + ppUnorderedAccessViews); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::OMGetBlendState( + ID3D11BlendState** ppBlendState, + FLOAT BlendFactor [4], + UINT* pSampleMask) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppBlendState, + BlendFactor, + pSampleMask); + + GetWrappedObjectAs()->OMGetBlendState( + ppBlendState, + BlendFactor, + pSampleMask); + + WrapObject(IID_ID3D11BlendState, reinterpret_cast(ppBlendState), nullptr); + + Encode_ID3D11DeviceContext_OMGetBlendState( + this, + ppBlendState, + BlendFactor, + pSampleMask); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppBlendState, + BlendFactor, + pSampleMask); + } + else + { + GetWrappedObjectAs()->OMGetBlendState( + ppBlendState, + BlendFactor, + pSampleMask); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::OMGetDepthStencilState( + ID3D11DepthStencilState** ppDepthStencilState, + UINT* pStencilRef) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppDepthStencilState, + pStencilRef); + + GetWrappedObjectAs()->OMGetDepthStencilState( + ppDepthStencilState, + pStencilRef); + + WrapObject(IID_ID3D11DepthStencilState, reinterpret_cast(ppDepthStencilState), nullptr); + + Encode_ID3D11DeviceContext_OMGetDepthStencilState( + this, + ppDepthStencilState, + pStencilRef); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppDepthStencilState, + pStencilRef); + } + else + { + GetWrappedObjectAs()->OMGetDepthStencilState( + ppDepthStencilState, + pStencilRef); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::SOGetTargets( + UINT NumBuffers, + ID3D11Buffer** ppSOTargets) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + NumBuffers, + ppSOTargets); + + GetWrappedObjectAs()->SOGetTargets( + NumBuffers, + ppSOTargets); + + WrapObjectArray(IID_ID3D11Buffer, reinterpret_cast(ppSOTargets), NumBuffers, nullptr); + + Encode_ID3D11DeviceContext_SOGetTargets( + this, + NumBuffers, + ppSOTargets); + + CustomWrapperPostCall::Dispatch( + manager, + this, + NumBuffers, + ppSOTargets); + } + else + { + GetWrappedObjectAs()->SOGetTargets( + NumBuffers, + ppSOTargets); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::RSGetState( + ID3D11RasterizerState** ppRasterizerState) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppRasterizerState); + + GetWrappedObjectAs()->RSGetState( + ppRasterizerState); + + WrapObject(IID_ID3D11RasterizerState, reinterpret_cast(ppRasterizerState), nullptr); + + Encode_ID3D11DeviceContext_RSGetState( + this, + ppRasterizerState); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppRasterizerState); + } + else + { + GetWrappedObjectAs()->RSGetState( + ppRasterizerState); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::RSGetViewports( + UINT* pNumViewports, + D3D11_VIEWPORT* pViewports) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pNumViewports, + pViewports); + + GetWrappedObjectAs()->RSGetViewports( + pNumViewports, + pViewports); + + Encode_ID3D11DeviceContext_RSGetViewports( + this, + pNumViewports, + pViewports); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pNumViewports, + pViewports); + } + else + { + GetWrappedObjectAs()->RSGetViewports( + pNumViewports, + pViewports); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::RSGetScissorRects( + UINT* pNumRects, + D3D11_RECT* pRects) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pNumRects, + pRects); + + GetWrappedObjectAs()->RSGetScissorRects( + pNumRects, + pRects); + + Encode_ID3D11DeviceContext_RSGetScissorRects( + this, + pNumRects, + pRects); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pNumRects, + pRects); + } + else + { + GetWrappedObjectAs()->RSGetScissorRects( + pNumRects, + pRects); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::HSGetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + GetWrappedObjectAs()->HSGetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + + WrapObjectArray(IID_ID3D11ShaderResourceView, reinterpret_cast(ppShaderResourceViews), NumViews, nullptr); + + Encode_ID3D11DeviceContext_HSGetShaderResources( + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + } + else + { + GetWrappedObjectAs()->HSGetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::HSGetShader( + ID3D11HullShader** ppHullShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppHullShader, + ppClassInstances, + pNumClassInstances); + + GetWrappedObjectAs()->HSGetShader( + ppHullShader, + ppClassInstances, + pNumClassInstances); + + WrapObject(IID_ID3D11HullShader, reinterpret_cast(ppHullShader), nullptr); + WrapObjectArray(IID_ID3D11ClassInstance, reinterpret_cast(ppClassInstances), (pNumClassInstances != nullptr) ? *pNumClassInstances : 0, nullptr); + + Encode_ID3D11DeviceContext_HSGetShader( + this, + ppHullShader, + ppClassInstances, + pNumClassInstances); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppHullShader, + ppClassInstances, + pNumClassInstances); + } + else + { + GetWrappedObjectAs()->HSGetShader( + ppHullShader, + ppClassInstances, + pNumClassInstances); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::HSGetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + + GetWrappedObjectAs()->HSGetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + + WrapObjectArray(IID_ID3D11SamplerState, reinterpret_cast(ppSamplers), NumSamplers, nullptr); + + Encode_ID3D11DeviceContext_HSGetSamplers( + this, + StartSlot, + NumSamplers, + ppSamplers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + } + else + { + GetWrappedObjectAs()->HSGetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::HSGetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + GetWrappedObjectAs()->HSGetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + + WrapObjectArray(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), NumBuffers, nullptr); + + Encode_ID3D11DeviceContext_HSGetConstantBuffers( + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + } + else + { + GetWrappedObjectAs()->HSGetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DSGetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + GetWrappedObjectAs()->DSGetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + + WrapObjectArray(IID_ID3D11ShaderResourceView, reinterpret_cast(ppShaderResourceViews), NumViews, nullptr); + + Encode_ID3D11DeviceContext_DSGetShaderResources( + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + } + else + { + GetWrappedObjectAs()->DSGetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DSGetShader( + ID3D11DomainShader** ppDomainShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppDomainShader, + ppClassInstances, + pNumClassInstances); + + GetWrappedObjectAs()->DSGetShader( + ppDomainShader, + ppClassInstances, + pNumClassInstances); + + WrapObject(IID_ID3D11DomainShader, reinterpret_cast(ppDomainShader), nullptr); + WrapObjectArray(IID_ID3D11ClassInstance, reinterpret_cast(ppClassInstances), (pNumClassInstances != nullptr) ? *pNumClassInstances : 0, nullptr); + + Encode_ID3D11DeviceContext_DSGetShader( + this, + ppDomainShader, + ppClassInstances, + pNumClassInstances); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppDomainShader, + ppClassInstances, + pNumClassInstances); + } + else + { + GetWrappedObjectAs()->DSGetShader( + ppDomainShader, + ppClassInstances, + pNumClassInstances); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DSGetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + + GetWrappedObjectAs()->DSGetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + + WrapObjectArray(IID_ID3D11SamplerState, reinterpret_cast(ppSamplers), NumSamplers, nullptr); + + Encode_ID3D11DeviceContext_DSGetSamplers( + this, + StartSlot, + NumSamplers, + ppSamplers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + } + else + { + GetWrappedObjectAs()->DSGetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::DSGetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + GetWrappedObjectAs()->DSGetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + + WrapObjectArray(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), NumBuffers, nullptr); + + Encode_ID3D11DeviceContext_DSGetConstantBuffers( + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + } + else + { + GetWrappedObjectAs()->DSGetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::CSGetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + GetWrappedObjectAs()->CSGetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + + WrapObjectArray(IID_ID3D11ShaderResourceView, reinterpret_cast(ppShaderResourceViews), NumViews, nullptr); + + Encode_ID3D11DeviceContext_CSGetShaderResources( + this, + StartSlot, + NumViews, + ppShaderResourceViews); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumViews, + ppShaderResourceViews); + } + else + { + GetWrappedObjectAs()->CSGetShaderResources( + StartSlot, + NumViews, + ppShaderResourceViews); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::CSGetUnorderedAccessViews( + UINT StartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView** ppUnorderedAccessViews) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumUAVs, + ppUnorderedAccessViews); + + GetWrappedObjectAs()->CSGetUnorderedAccessViews( + StartSlot, + NumUAVs, + ppUnorderedAccessViews); + + WrapObjectArray(IID_ID3D11UnorderedAccessView, reinterpret_cast(ppUnorderedAccessViews), NumUAVs, nullptr); + + Encode_ID3D11DeviceContext_CSGetUnorderedAccessViews( + this, + StartSlot, + NumUAVs, + ppUnorderedAccessViews); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumUAVs, + ppUnorderedAccessViews); + } + else + { + GetWrappedObjectAs()->CSGetUnorderedAccessViews( + StartSlot, + NumUAVs, + ppUnorderedAccessViews); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::CSGetShader( + ID3D11ComputeShader** ppComputeShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppComputeShader, + ppClassInstances, + pNumClassInstances); + + GetWrappedObjectAs()->CSGetShader( + ppComputeShader, + ppClassInstances, + pNumClassInstances); + + WrapObject(IID_ID3D11ComputeShader, reinterpret_cast(ppComputeShader), nullptr); + WrapObjectArray(IID_ID3D11ClassInstance, reinterpret_cast(ppClassInstances), (pNumClassInstances != nullptr) ? *pNumClassInstances : 0, nullptr); + + Encode_ID3D11DeviceContext_CSGetShader( + this, + ppComputeShader, + ppClassInstances, + pNumClassInstances); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppComputeShader, + ppClassInstances, + pNumClassInstances); + } + else + { + GetWrappedObjectAs()->CSGetShader( + ppComputeShader, + ppClassInstances, + pNumClassInstances); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::CSGetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + + GetWrappedObjectAs()->CSGetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + + WrapObjectArray(IID_ID3D11SamplerState, reinterpret_cast(ppSamplers), NumSamplers, nullptr); + + Encode_ID3D11DeviceContext_CSGetSamplers( + this, + StartSlot, + NumSamplers, + ppSamplers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumSamplers, + ppSamplers); + } + else + { + GetWrappedObjectAs()->CSGetSamplers( + StartSlot, + NumSamplers, + ppSamplers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::CSGetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + GetWrappedObjectAs()->CSGetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + + WrapObjectArray(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), NumBuffers, nullptr); + + Encode_ID3D11DeviceContext_CSGetConstantBuffers( + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers); + } + else + { + GetWrappedObjectAs()->CSGetConstantBuffers( + StartSlot, + NumBuffers, + ppConstantBuffers); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::ClearState() +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + GetWrappedObjectAs()->ClearState(); + + Encode_ID3D11DeviceContext_ClearState( + this); + + CustomWrapperPostCall::Dispatch( + manager, + this); + } + else + { + GetWrappedObjectAs()->ClearState(); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::Flush() +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + GetWrappedObjectAs()->Flush(); + + Encode_ID3D11DeviceContext_Flush( + this); + + CustomWrapperPostCall::Dispatch( + manager, + this); + } + else + { + GetWrappedObjectAs()->Flush(); + } + + manager->DecrementCallScope(); +} + +D3D11_DEVICE_CONTEXT_TYPE STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::GetType() +{ + D3D11_DEVICE_CONTEXT_TYPE result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->GetType(); + + Encode_ID3D11DeviceContext_GetType( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->GetType(); + } + + manager->DecrementCallScope(); + + return result; +} + +UINT STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::GetContextFlags() +{ + UINT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->GetContextFlags(); + + Encode_ID3D11DeviceContext_GetContextFlags( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->GetContextFlags(); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11DeviceContext_Wrapper::FinishCommandList( + BOOL RestoreDeferredContextState, + ID3D11CommandList** ppCommandList) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + RestoreDeferredContextState, + ppCommandList); + + result = GetWrappedObjectAs()->FinishCommandList( + RestoreDeferredContextState, + ppCommandList); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11CommandList, reinterpret_cast(ppCommandList), nullptr); + } + + Encode_ID3D11DeviceContext_FinishCommandList( + this, + result, + RestoreDeferredContextState, + ppCommandList); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + RestoreDeferredContextState, + ppCommandList); + } + else + { + result = GetWrappedObjectAs()->FinishCommandList( + RestoreDeferredContextState, + ppCommandList); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11VideoDecoder_Wrapper::ID3D11VideoDecoder_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11VideoDecoder_Wrapper::~ID3D11VideoDecoder_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11VideoDecoder_Wrapper* ID3D11VideoDecoder_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDecoder_Wrapper::GetCreationParameters( + D3D11_VIDEO_DECODER_DESC* pVideoDesc, + D3D11_VIDEO_DECODER_CONFIG* pConfig) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoDesc, + pConfig); + + result = GetWrappedObjectAs()->GetCreationParameters( + pVideoDesc, + pConfig); + + Encode_ID3D11VideoDecoder_GetCreationParameters( + this, + result, + pVideoDesc, + pConfig); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pVideoDesc, + pConfig); + } + else + { + result = GetWrappedObjectAs()->GetCreationParameters( + pVideoDesc, + pConfig); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDecoder_Wrapper::GetDriverHandle( + HANDLE* pDriverHandle) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDriverHandle); + + result = GetWrappedObjectAs()->GetDriverHandle( + pDriverHandle); + + Encode_ID3D11VideoDecoder_GetDriverHandle( + this, + result, + pDriverHandle); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDriverHandle); + } + else + { + result = GetWrappedObjectAs()->GetDriverHandle( + pDriverHandle); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11VideoProcessorEnumerator_Wrapper::ID3D11VideoProcessorEnumerator_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11VideoProcessorEnumerator_Wrapper::~ID3D11VideoProcessorEnumerator_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11VideoProcessorEnumerator_Wrapper* ID3D11VideoProcessorEnumerator_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoProcessorEnumerator_Wrapper::GetVideoProcessorContentDesc( + D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pContentDesc) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pContentDesc); + + result = GetWrappedObjectAs()->GetVideoProcessorContentDesc( + pContentDesc); + + Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorContentDesc( + this, + result, + pContentDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pContentDesc); + } + else + { + result = GetWrappedObjectAs()->GetVideoProcessorContentDesc( + pContentDesc); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoProcessorEnumerator_Wrapper::CheckVideoProcessorFormat( + DXGI_FORMAT Format, + UINT* pFlags) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + Format, + pFlags); + + result = GetWrappedObjectAs()->CheckVideoProcessorFormat( + Format, + pFlags); + + Encode_ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat( + this, + result, + Format, + pFlags); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + Format, + pFlags); + } + else + { + result = GetWrappedObjectAs()->CheckVideoProcessorFormat( + Format, + pFlags); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoProcessorEnumerator_Wrapper::GetVideoProcessorCaps( + D3D11_VIDEO_PROCESSOR_CAPS* pCaps) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCaps); + + result = GetWrappedObjectAs()->GetVideoProcessorCaps( + pCaps); + + Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorCaps( + this, + result, + pCaps); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pCaps); + } + else + { + result = GetWrappedObjectAs()->GetVideoProcessorCaps( + pCaps); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoProcessorEnumerator_Wrapper::GetVideoProcessorRateConversionCaps( + UINT TypeIndex, + D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* pCaps) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + TypeIndex, + pCaps); + + result = GetWrappedObjectAs()->GetVideoProcessorRateConversionCaps( + TypeIndex, + pCaps); + + Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorRateConversionCaps( + this, + result, + TypeIndex, + pCaps); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + TypeIndex, + pCaps); + } + else + { + result = GetWrappedObjectAs()->GetVideoProcessorRateConversionCaps( + TypeIndex, + pCaps); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoProcessorEnumerator_Wrapper::GetVideoProcessorCustomRate( + UINT TypeIndex, + UINT CustomRateIndex, + D3D11_VIDEO_PROCESSOR_CUSTOM_RATE* pRate) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + TypeIndex, + CustomRateIndex, + pRate); + + result = GetWrappedObjectAs()->GetVideoProcessorCustomRate( + TypeIndex, + CustomRateIndex, + pRate); + + Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorCustomRate( + this, + result, + TypeIndex, + CustomRateIndex, + pRate); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + TypeIndex, + CustomRateIndex, + pRate); + } + else + { + result = GetWrappedObjectAs()->GetVideoProcessorCustomRate( + TypeIndex, + CustomRateIndex, + pRate); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoProcessorEnumerator_Wrapper::GetVideoProcessorFilterRange( + D3D11_VIDEO_PROCESSOR_FILTER Filter, + D3D11_VIDEO_PROCESSOR_FILTER_RANGE* pRange) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + Filter, + pRange); + + result = GetWrappedObjectAs()->GetVideoProcessorFilterRange( + Filter, + pRange); + + Encode_ID3D11VideoProcessorEnumerator_GetVideoProcessorFilterRange( + this, + result, + Filter, + pRange); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + Filter, + pRange); + } + else + { + result = GetWrappedObjectAs()->GetVideoProcessorFilterRange( + Filter, + pRange); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11VideoProcessor_Wrapper::ID3D11VideoProcessor_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11VideoProcessor_Wrapper::~ID3D11VideoProcessor_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11VideoProcessor_Wrapper* ID3D11VideoProcessor_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11VideoProcessor_Wrapper::GetContentDesc( + D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetContentDesc( + pDesc); + + Encode_ID3D11VideoProcessor_GetContentDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetContentDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoProcessor_Wrapper::GetRateConversionCaps( + D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* pCaps) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCaps); + + GetWrappedObjectAs()->GetRateConversionCaps( + pCaps); + + Encode_ID3D11VideoProcessor_GetRateConversionCaps( + this, + pCaps); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pCaps); + } + else + { + GetWrappedObjectAs()->GetRateConversionCaps( + pCaps); + } + + manager->DecrementCallScope(); +} + +ID3D11AuthenticatedChannel_Wrapper::ID3D11AuthenticatedChannel_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11AuthenticatedChannel_Wrapper::~ID3D11AuthenticatedChannel_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11AuthenticatedChannel_Wrapper* ID3D11AuthenticatedChannel_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +HRESULT STDMETHODCALLTYPE ID3D11AuthenticatedChannel_Wrapper::GetCertificateSize( + UINT* pCertificateSize) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCertificateSize); + + result = GetWrappedObjectAs()->GetCertificateSize( + pCertificateSize); + + Encode_ID3D11AuthenticatedChannel_GetCertificateSize( + this, + result, + pCertificateSize); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pCertificateSize); + } + else + { + result = GetWrappedObjectAs()->GetCertificateSize( + pCertificateSize); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11AuthenticatedChannel_Wrapper::GetCertificate( + UINT CertificateSize, + BYTE* pCertificate) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + CertificateSize, + pCertificate); + + result = GetWrappedObjectAs()->GetCertificate( + CertificateSize, + pCertificate); + + Encode_ID3D11AuthenticatedChannel_GetCertificate( + this, + result, + CertificateSize, + pCertificate); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + CertificateSize, + pCertificate); + } + else + { + result = GetWrappedObjectAs()->GetCertificate( + CertificateSize, + pCertificate); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11AuthenticatedChannel_Wrapper::GetChannelHandle( + HANDLE* pChannelHandle) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pChannelHandle); + + GetWrappedObjectAs()->GetChannelHandle( + pChannelHandle); + + Encode_ID3D11AuthenticatedChannel_GetChannelHandle( + this, + pChannelHandle); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pChannelHandle); + } + else + { + GetWrappedObjectAs()->GetChannelHandle( + pChannelHandle); + } + + manager->DecrementCallScope(); +} + +ID3D11CryptoSession_Wrapper::ID3D11CryptoSession_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11CryptoSession_Wrapper::~ID3D11CryptoSession_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11CryptoSession_Wrapper* ID3D11CryptoSession_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11CryptoSession_Wrapper::GetCryptoType( + GUID* pCryptoType) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoType); + + GetWrappedObjectAs()->GetCryptoType( + pCryptoType); + + Encode_ID3D11CryptoSession_GetCryptoType( + this, + pCryptoType); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pCryptoType); + } + else + { + GetWrappedObjectAs()->GetCryptoType( + pCryptoType); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11CryptoSession_Wrapper::GetDecoderProfile( + GUID* pDecoderProfile) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDecoderProfile); + + GetWrappedObjectAs()->GetDecoderProfile( + pDecoderProfile); + + Encode_ID3D11CryptoSession_GetDecoderProfile( + this, + pDecoderProfile); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDecoderProfile); + } + else + { + GetWrappedObjectAs()->GetDecoderProfile( + pDecoderProfile); + } + + manager->DecrementCallScope(); +} + +HRESULT STDMETHODCALLTYPE ID3D11CryptoSession_Wrapper::GetCertificateSize( + UINT* pCertificateSize) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCertificateSize); + + result = GetWrappedObjectAs()->GetCertificateSize( + pCertificateSize); + + Encode_ID3D11CryptoSession_GetCertificateSize( + this, + result, + pCertificateSize); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pCertificateSize); + } + else + { + result = GetWrappedObjectAs()->GetCertificateSize( + pCertificateSize); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11CryptoSession_Wrapper::GetCertificate( + UINT CertificateSize, + BYTE* pCertificate) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + CertificateSize, + pCertificate); + + result = GetWrappedObjectAs()->GetCertificate( + CertificateSize, + pCertificate); + + Encode_ID3D11CryptoSession_GetCertificate( + this, + result, + CertificateSize, + pCertificate); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + CertificateSize, + pCertificate); + } + else + { + result = GetWrappedObjectAs()->GetCertificate( + CertificateSize, + pCertificate); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11CryptoSession_Wrapper::GetCryptoSessionHandle( + HANDLE* pCryptoSessionHandle) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoSessionHandle); + + GetWrappedObjectAs()->GetCryptoSessionHandle( + pCryptoSessionHandle); + + Encode_ID3D11CryptoSession_GetCryptoSessionHandle( + this, + pCryptoSessionHandle); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pCryptoSessionHandle); + } + else + { + GetWrappedObjectAs()->GetCryptoSessionHandle( + pCryptoSessionHandle); + } + + manager->DecrementCallScope(); +} + +ID3D11VideoDecoderOutputView_Wrapper::ID3D11VideoDecoderOutputView_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11View_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11VideoDecoderOutputView_Wrapper::~ID3D11VideoDecoderOutputView_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11VideoDecoderOutputView_Wrapper* ID3D11VideoDecoderOutputView_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11VideoDecoderOutputView_Wrapper::GetDesc( + D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11VideoDecoderOutputView_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11VideoProcessorInputView_Wrapper::ID3D11VideoProcessorInputView_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11View_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11VideoProcessorInputView_Wrapper::~ID3D11VideoProcessorInputView_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11VideoProcessorInputView_Wrapper* ID3D11VideoProcessorInputView_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11VideoProcessorInputView_Wrapper::GetDesc( + D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11VideoProcessorInputView_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11VideoProcessorOutputView_Wrapper::ID3D11VideoProcessorOutputView_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11View_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11VideoProcessorOutputView_Wrapper::~ID3D11VideoProcessorOutputView_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11VideoProcessorOutputView_Wrapper* ID3D11VideoProcessorOutputView_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11VideoProcessorOutputView_Wrapper::GetDesc( + D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc( + pDesc); + + Encode_ID3D11VideoProcessorOutputView_GetDesc( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11VideoContext_Wrapper::ID3D11VideoContext_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11VideoContext_Wrapper::~ID3D11VideoContext_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11VideoContext_Wrapper* ID3D11VideoContext_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::GetDecoderBuffer( + ID3D11VideoDecoder* pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type, + UINT* pBufferSize, + void** ppBuffer) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDecoder, + Type, + pBufferSize, + ppBuffer); + + result = GetWrappedObjectAs()->GetDecoderBuffer( + encode::GetWrappedObject(pDecoder), + Type, + pBufferSize, + ppBuffer); + + Encode_ID3D11VideoContext_GetDecoderBuffer( + this, + result, + pDecoder, + Type, + pBufferSize, + ppBuffer); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDecoder, + Type, + pBufferSize, + ppBuffer); + } + else + { + result = GetWrappedObjectAs()->GetDecoderBuffer( + pDecoder, + Type, + pBufferSize, + ppBuffer); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::ReleaseDecoderBuffer( + ID3D11VideoDecoder* pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDecoder, + Type); + + result = GetWrappedObjectAs()->ReleaseDecoderBuffer( + encode::GetWrappedObject(pDecoder), + Type); + + Encode_ID3D11VideoContext_ReleaseDecoderBuffer( + this, + result, + pDecoder, + Type); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDecoder, + Type); + } + else + { + result = GetWrappedObjectAs()->ReleaseDecoderBuffer( + pDecoder, + Type); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::DecoderBeginFrame( + ID3D11VideoDecoder* pDecoder, + ID3D11VideoDecoderOutputView* pView, + UINT ContentKeySize, + const void* pContentKey) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDecoder, + pView, + ContentKeySize, + pContentKey); + + result = GetWrappedObjectAs()->DecoderBeginFrame( + encode::GetWrappedObject(pDecoder), + encode::GetWrappedObject(pView), + ContentKeySize, + pContentKey); + + Encode_ID3D11VideoContext_DecoderBeginFrame( + this, + result, + pDecoder, + pView, + ContentKeySize, + pContentKey); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDecoder, + pView, + ContentKeySize, + pContentKey); + } + else + { + result = GetWrappedObjectAs()->DecoderBeginFrame( + pDecoder, + pView, + ContentKeySize, + pContentKey); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::DecoderEndFrame( + ID3D11VideoDecoder* pDecoder) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDecoder); + + result = GetWrappedObjectAs()->DecoderEndFrame( + encode::GetWrappedObject(pDecoder)); + + Encode_ID3D11VideoContext_DecoderEndFrame( + this, + result, + pDecoder); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDecoder); + } + else + { + result = GetWrappedObjectAs()->DecoderEndFrame( + pDecoder); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::SubmitDecoderBuffers( + ID3D11VideoDecoder* pDecoder, + UINT NumBuffers, + const D3D11_VIDEO_DECODER_BUFFER_DESC* pBufferDesc) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDecoder, + NumBuffers, + pBufferDesc); + + result = GetWrappedObjectAs()->SubmitDecoderBuffers( + encode::GetWrappedObject(pDecoder), + NumBuffers, + pBufferDesc); + + Encode_ID3D11VideoContext_SubmitDecoderBuffers( + this, + result, + pDecoder, + NumBuffers, + pBufferDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDecoder, + NumBuffers, + pBufferDesc); + } + else + { + result = GetWrappedObjectAs()->SubmitDecoderBuffers( + pDecoder, + NumBuffers, + pBufferDesc); + } + + manager->DecrementCallScope(); + + return result; +} + +APP_DEPRECATED_HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::DecoderExtension( + ID3D11VideoDecoder* pDecoder, + const D3D11_VIDEO_DECODER_EXTENSION* pExtensionData) +{ + APP_DEPRECATED_HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDecoder, + pExtensionData); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + result = GetWrappedObjectAs()->DecoderExtension( + encode::GetWrappedObject(pDecoder), + UnwrapStructPtrObjects(pExtensionData, unwrap_memory)); + + Encode_ID3D11VideoContext_DecoderExtension( + this, + result, + pDecoder, + pExtensionData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDecoder, + pExtensionData); + } + else + { + result = GetWrappedObjectAs()->DecoderExtension( + pDecoder, + pExtensionData); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetOutputTargetRect( + ID3D11VideoProcessor* pVideoProcessor, + BOOL Enable, + const RECT* pRect) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + Enable, + pRect); + + GetWrappedObjectAs()->VideoProcessorSetOutputTargetRect( + encode::GetWrappedObject(pVideoProcessor), + Enable, + pRect); + + Encode_ID3D11VideoContext_VideoProcessorSetOutputTargetRect( + this, + pVideoProcessor, + Enable, + pRect); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + Enable, + pRect); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetOutputTargetRect( + pVideoProcessor, + Enable, + pRect); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetOutputBackgroundColor( + ID3D11VideoProcessor* pVideoProcessor, + BOOL YCbCr, + const D3D11_VIDEO_COLOR* pColor) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + YCbCr, + pColor); + + GetWrappedObjectAs()->VideoProcessorSetOutputBackgroundColor( + encode::GetWrappedObject(pVideoProcessor), + YCbCr, + pColor); + + Encode_ID3D11VideoContext_VideoProcessorSetOutputBackgroundColor( + this, + pVideoProcessor, + YCbCr, + pColor); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + YCbCr, + pColor); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetOutputBackgroundColor( + pVideoProcessor, + YCbCr, + pColor); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetOutputColorSpace( + ID3D11VideoProcessor* pVideoProcessor, + const D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + pColorSpace); + + GetWrappedObjectAs()->VideoProcessorSetOutputColorSpace( + encode::GetWrappedObject(pVideoProcessor), + pColorSpace); + + Encode_ID3D11VideoContext_VideoProcessorSetOutputColorSpace( + this, + pVideoProcessor, + pColorSpace); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + pColorSpace); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetOutputColorSpace( + pVideoProcessor, + pColorSpace); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetOutputAlphaFillMode( + ID3D11VideoProcessor* pVideoProcessor, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE AlphaFillMode, + UINT StreamIndex) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + AlphaFillMode, + StreamIndex); + + GetWrappedObjectAs()->VideoProcessorSetOutputAlphaFillMode( + encode::GetWrappedObject(pVideoProcessor), + AlphaFillMode, + StreamIndex); + + Encode_ID3D11VideoContext_VideoProcessorSetOutputAlphaFillMode( + this, + pVideoProcessor, + AlphaFillMode, + StreamIndex); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + AlphaFillMode, + StreamIndex); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetOutputAlphaFillMode( + pVideoProcessor, + AlphaFillMode, + StreamIndex); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetOutputConstriction( + ID3D11VideoProcessor* pVideoProcessor, + BOOL Enable, + SIZE Size) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + Enable, + Size); + + GetWrappedObjectAs()->VideoProcessorSetOutputConstriction( + encode::GetWrappedObject(pVideoProcessor), + Enable, + Size); + + Encode_ID3D11VideoContext_VideoProcessorSetOutputConstriction( + this, + pVideoProcessor, + Enable, + Size); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + Enable, + Size); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetOutputConstriction( + pVideoProcessor, + Enable, + Size); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetOutputStereoMode( + ID3D11VideoProcessor* pVideoProcessor, + BOOL Enable) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + Enable); + + GetWrappedObjectAs()->VideoProcessorSetOutputStereoMode( + encode::GetWrappedObject(pVideoProcessor), + Enable); + + Encode_ID3D11VideoContext_VideoProcessorSetOutputStereoMode( + this, + pVideoProcessor, + Enable); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + Enable); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetOutputStereoMode( + pVideoProcessor, + Enable); + } + + manager->DecrementCallScope(); +} + +APP_DEPRECATED_HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetOutputExtension( + ID3D11VideoProcessor* pVideoProcessor, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData) +{ + APP_DEPRECATED_HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + pExtensionGuid, + DataSize, + pData); + + result = GetWrappedObjectAs()->VideoProcessorSetOutputExtension( + encode::GetWrappedObject(pVideoProcessor), + pExtensionGuid, + DataSize, + pData); + + Encode_ID3D11VideoContext_VideoProcessorSetOutputExtension( + this, + result, + pVideoProcessor, + pExtensionGuid, + DataSize, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pVideoProcessor, + pExtensionGuid, + DataSize, + pData); + } + else + { + result = GetWrappedObjectAs()->VideoProcessorSetOutputExtension( + pVideoProcessor, + pExtensionGuid, + DataSize, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetOutputTargetRect( + ID3D11VideoProcessor* pVideoProcessor, + BOOL* Enabled, + RECT* pRect) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + Enabled, + pRect); + + GetWrappedObjectAs()->VideoProcessorGetOutputTargetRect( + encode::GetWrappedObject(pVideoProcessor), + Enabled, + pRect); + + Encode_ID3D11VideoContext_VideoProcessorGetOutputTargetRect( + this, + pVideoProcessor, + Enabled, + pRect); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + Enabled, + pRect); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetOutputTargetRect( + pVideoProcessor, + Enabled, + pRect); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetOutputBackgroundColor( + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pYCbCr, + D3D11_VIDEO_COLOR* pColor) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + pYCbCr, + pColor); + + GetWrappedObjectAs()->VideoProcessorGetOutputBackgroundColor( + encode::GetWrappedObject(pVideoProcessor), + pYCbCr, + pColor); + + Encode_ID3D11VideoContext_VideoProcessorGetOutputBackgroundColor( + this, + pVideoProcessor, + pYCbCr, + pColor); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + pYCbCr, + pColor); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetOutputBackgroundColor( + pVideoProcessor, + pYCbCr, + pColor); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetOutputColorSpace( + ID3D11VideoProcessor* pVideoProcessor, + D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + pColorSpace); + + GetWrappedObjectAs()->VideoProcessorGetOutputColorSpace( + encode::GetWrappedObject(pVideoProcessor), + pColorSpace); + + Encode_ID3D11VideoContext_VideoProcessorGetOutputColorSpace( + this, + pVideoProcessor, + pColorSpace); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + pColorSpace); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetOutputColorSpace( + pVideoProcessor, + pColorSpace); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetOutputAlphaFillMode( + ID3D11VideoProcessor* pVideoProcessor, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE* pAlphaFillMode, + UINT* pStreamIndex) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + pAlphaFillMode, + pStreamIndex); + + GetWrappedObjectAs()->VideoProcessorGetOutputAlphaFillMode( + encode::GetWrappedObject(pVideoProcessor), + pAlphaFillMode, + pStreamIndex); + + Encode_ID3D11VideoContext_VideoProcessorGetOutputAlphaFillMode( + this, + pVideoProcessor, + pAlphaFillMode, + pStreamIndex); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + pAlphaFillMode, + pStreamIndex); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetOutputAlphaFillMode( + pVideoProcessor, + pAlphaFillMode, + pStreamIndex); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetOutputConstriction( + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pEnabled, + SIZE* pSize) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + pEnabled, + pSize); + + GetWrappedObjectAs()->VideoProcessorGetOutputConstriction( + encode::GetWrappedObject(pVideoProcessor), + pEnabled, + pSize); + + Encode_ID3D11VideoContext_VideoProcessorGetOutputConstriction( + this, + pVideoProcessor, + pEnabled, + pSize); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + pEnabled, + pSize); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetOutputConstriction( + pVideoProcessor, + pEnabled, + pSize); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetOutputStereoMode( + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pEnabled) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + pEnabled); + + GetWrappedObjectAs()->VideoProcessorGetOutputStereoMode( + encode::GetWrappedObject(pVideoProcessor), + pEnabled); + + Encode_ID3D11VideoContext_VideoProcessorGetOutputStereoMode( + this, + pVideoProcessor, + pEnabled); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + pEnabled); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetOutputStereoMode( + pVideoProcessor, + pEnabled); + } + + manager->DecrementCallScope(); +} + +APP_DEPRECATED_HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetOutputExtension( + ID3D11VideoProcessor* pVideoProcessor, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData) +{ + APP_DEPRECATED_HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + pExtensionGuid, + DataSize, + pData); + + result = GetWrappedObjectAs()->VideoProcessorGetOutputExtension( + encode::GetWrappedObject(pVideoProcessor), + pExtensionGuid, + DataSize, + pData); + + Encode_ID3D11VideoContext_VideoProcessorGetOutputExtension( + this, + result, + pVideoProcessor, + pExtensionGuid, + DataSize, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pVideoProcessor, + pExtensionGuid, + DataSize, + pData); + } + else + { + result = GetWrappedObjectAs()->VideoProcessorGetOutputExtension( + pVideoProcessor, + pExtensionGuid, + DataSize, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetStreamFrameFormat( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_FRAME_FORMAT FrameFormat) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + FrameFormat); + + GetWrappedObjectAs()->VideoProcessorSetStreamFrameFormat( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + FrameFormat); + + Encode_ID3D11VideoContext_VideoProcessorSetStreamFrameFormat( + this, + pVideoProcessor, + StreamIndex, + FrameFormat); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + FrameFormat); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamFrameFormat( + pVideoProcessor, + StreamIndex, + FrameFormat); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetStreamColorSpace( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + const D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pColorSpace); + + GetWrappedObjectAs()->VideoProcessorSetStreamColorSpace( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pColorSpace); + + Encode_ID3D11VideoContext_VideoProcessorSetStreamColorSpace( + this, + pVideoProcessor, + StreamIndex, + pColorSpace); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pColorSpace); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamColorSpace( + pVideoProcessor, + StreamIndex, + pColorSpace); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetStreamOutputRate( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate, + BOOL RepeatFrame, + const DXGI_RATIONAL* pCustomRate) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + OutputRate, + RepeatFrame, + pCustomRate); + + GetWrappedObjectAs()->VideoProcessorSetStreamOutputRate( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + OutputRate, + RepeatFrame, + pCustomRate); + + Encode_ID3D11VideoContext_VideoProcessorSetStreamOutputRate( + this, + pVideoProcessor, + StreamIndex, + OutputRate, + RepeatFrame, + pCustomRate); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + OutputRate, + RepeatFrame, + pCustomRate); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamOutputRate( + pVideoProcessor, + StreamIndex, + OutputRate, + RepeatFrame, + pCustomRate); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetStreamSourceRect( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + const RECT* pRect) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + pRect); + + GetWrappedObjectAs()->VideoProcessorSetStreamSourceRect( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + Enable, + pRect); + + Encode_ID3D11VideoContext_VideoProcessorSetStreamSourceRect( + this, + pVideoProcessor, + StreamIndex, + Enable, + pRect); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + pRect); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamSourceRect( + pVideoProcessor, + StreamIndex, + Enable, + pRect); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetStreamDestRect( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + const RECT* pRect) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + pRect); + + GetWrappedObjectAs()->VideoProcessorSetStreamDestRect( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + Enable, + pRect); + + Encode_ID3D11VideoContext_VideoProcessorSetStreamDestRect( + this, + pVideoProcessor, + StreamIndex, + Enable, + pRect); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + pRect); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamDestRect( + pVideoProcessor, + StreamIndex, + Enable, + pRect); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetStreamAlpha( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Alpha) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + Alpha); + + GetWrappedObjectAs()->VideoProcessorSetStreamAlpha( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + Enable, + Alpha); + + Encode_ID3D11VideoContext_VideoProcessorSetStreamAlpha( + this, + pVideoProcessor, + StreamIndex, + Enable, + Alpha); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + Alpha); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamAlpha( + pVideoProcessor, + StreamIndex, + Enable, + Alpha); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetStreamPalette( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + UINT Count, + const UINT* pEntries) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Count, + pEntries); + + GetWrappedObjectAs()->VideoProcessorSetStreamPalette( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + Count, + pEntries); + + Encode_ID3D11VideoContext_VideoProcessorSetStreamPalette( + this, + pVideoProcessor, + StreamIndex, + Count, + pEntries); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Count, + pEntries); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamPalette( + pVideoProcessor, + StreamIndex, + Count, + pEntries); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetStreamPixelAspectRatio( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + const DXGI_RATIONAL* pSourceAspectRatio, + const DXGI_RATIONAL* pDestinationAspectRatio) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + pSourceAspectRatio, + pDestinationAspectRatio); + + GetWrappedObjectAs()->VideoProcessorSetStreamPixelAspectRatio( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + Enable, + pSourceAspectRatio, + pDestinationAspectRatio); + + Encode_ID3D11VideoContext_VideoProcessorSetStreamPixelAspectRatio( + this, + pVideoProcessor, + StreamIndex, + Enable, + pSourceAspectRatio, + pDestinationAspectRatio); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + pSourceAspectRatio, + pDestinationAspectRatio); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamPixelAspectRatio( + pVideoProcessor, + StreamIndex, + Enable, + pSourceAspectRatio, + pDestinationAspectRatio); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetStreamLumaKey( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Lower, + FLOAT Upper) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + Lower, + Upper); + + GetWrappedObjectAs()->VideoProcessorSetStreamLumaKey( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + Enable, + Lower, + Upper); + + Encode_ID3D11VideoContext_VideoProcessorSetStreamLumaKey( + this, + pVideoProcessor, + StreamIndex, + Enable, + Lower, + Upper); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + Lower, + Upper); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamLumaKey( + pVideoProcessor, + StreamIndex, + Enable, + Lower, + Upper); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetStreamStereoFormat( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT Format, + BOOL LeftViewFrame0, + BOOL BaseViewFrame0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode, + int MonoOffset) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + Format, + LeftViewFrame0, + BaseViewFrame0, + FlipMode, + MonoOffset); + + GetWrappedObjectAs()->VideoProcessorSetStreamStereoFormat( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + Enable, + Format, + LeftViewFrame0, + BaseViewFrame0, + FlipMode, + MonoOffset); + + Encode_ID3D11VideoContext_VideoProcessorSetStreamStereoFormat( + this, + pVideoProcessor, + StreamIndex, + Enable, + Format, + LeftViewFrame0, + BaseViewFrame0, + FlipMode, + MonoOffset); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + Format, + LeftViewFrame0, + BaseViewFrame0, + FlipMode, + MonoOffset); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamStereoFormat( + pVideoProcessor, + StreamIndex, + Enable, + Format, + LeftViewFrame0, + BaseViewFrame0, + FlipMode, + MonoOffset); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetStreamAutoProcessingMode( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable); + + GetWrappedObjectAs()->VideoProcessorSetStreamAutoProcessingMode( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + Enable); + + Encode_ID3D11VideoContext_VideoProcessorSetStreamAutoProcessingMode( + this, + pVideoProcessor, + StreamIndex, + Enable); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamAutoProcessingMode( + pVideoProcessor, + StreamIndex, + Enable); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetStreamFilter( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + BOOL Enable, + int Level) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Filter, + Enable, + Level); + + GetWrappedObjectAs()->VideoProcessorSetStreamFilter( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + Filter, + Enable, + Level); + + Encode_ID3D11VideoContext_VideoProcessorSetStreamFilter( + this, + pVideoProcessor, + StreamIndex, + Filter, + Enable, + Level); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Filter, + Enable, + Level); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamFilter( + pVideoProcessor, + StreamIndex, + Filter, + Enable, + Level); + } + + manager->DecrementCallScope(); +} + +APP_DEPRECATED_HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetStreamExtension( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData) +{ + APP_DEPRECATED_HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pExtensionGuid, + DataSize, + pData); + + result = GetWrappedObjectAs()->VideoProcessorSetStreamExtension( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pExtensionGuid, + DataSize, + pData); + + Encode_ID3D11VideoContext_VideoProcessorSetStreamExtension( + this, + result, + pVideoProcessor, + StreamIndex, + pExtensionGuid, + DataSize, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pVideoProcessor, + StreamIndex, + pExtensionGuid, + DataSize, + pData); + } + else + { + result = GetWrappedObjectAs()->VideoProcessorSetStreamExtension( + pVideoProcessor, + StreamIndex, + pExtensionGuid, + DataSize, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetStreamFrameFormat( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_FRAME_FORMAT* pFrameFormat) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pFrameFormat); + + GetWrappedObjectAs()->VideoProcessorGetStreamFrameFormat( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pFrameFormat); + + Encode_ID3D11VideoContext_VideoProcessorGetStreamFrameFormat( + this, + pVideoProcessor, + StreamIndex, + pFrameFormat); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pFrameFormat); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamFrameFormat( + pVideoProcessor, + StreamIndex, + pFrameFormat); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetStreamColorSpace( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pColorSpace); + + GetWrappedObjectAs()->VideoProcessorGetStreamColorSpace( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pColorSpace); + + Encode_ID3D11VideoContext_VideoProcessorGetStreamColorSpace( + this, + pVideoProcessor, + StreamIndex, + pColorSpace); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pColorSpace); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamColorSpace( + pVideoProcessor, + StreamIndex, + pColorSpace); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetStreamOutputRate( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE* pOutputRate, + BOOL* pRepeatFrame, + DXGI_RATIONAL* pCustomRate) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pOutputRate, + pRepeatFrame, + pCustomRate); + + GetWrappedObjectAs()->VideoProcessorGetStreamOutputRate( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pOutputRate, + pRepeatFrame, + pCustomRate); + + Encode_ID3D11VideoContext_VideoProcessorGetStreamOutputRate( + this, + pVideoProcessor, + StreamIndex, + pOutputRate, + pRepeatFrame, + pCustomRate); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pOutputRate, + pRepeatFrame, + pCustomRate); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamOutputRate( + pVideoProcessor, + StreamIndex, + pOutputRate, + pRepeatFrame, + pCustomRate); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetStreamSourceRect( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + RECT* pRect) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pRect); + + GetWrappedObjectAs()->VideoProcessorGetStreamSourceRect( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pEnabled, + pRect); + + Encode_ID3D11VideoContext_VideoProcessorGetStreamSourceRect( + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pRect); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pRect); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamSourceRect( + pVideoProcessor, + StreamIndex, + pEnabled, + pRect); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetStreamDestRect( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + RECT* pRect) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pRect); + + GetWrappedObjectAs()->VideoProcessorGetStreamDestRect( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pEnabled, + pRect); + + Encode_ID3D11VideoContext_VideoProcessorGetStreamDestRect( + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pRect); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pRect); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamDestRect( + pVideoProcessor, + StreamIndex, + pEnabled, + pRect); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetStreamAlpha( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + FLOAT* pAlpha) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pAlpha); + + GetWrappedObjectAs()->VideoProcessorGetStreamAlpha( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pEnabled, + pAlpha); + + Encode_ID3D11VideoContext_VideoProcessorGetStreamAlpha( + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pAlpha); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pAlpha); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamAlpha( + pVideoProcessor, + StreamIndex, + pEnabled, + pAlpha); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetStreamPalette( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + UINT Count, + UINT* pEntries) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Count, + pEntries); + + GetWrappedObjectAs()->VideoProcessorGetStreamPalette( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + Count, + pEntries); + + Encode_ID3D11VideoContext_VideoProcessorGetStreamPalette( + this, + pVideoProcessor, + StreamIndex, + Count, + pEntries); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Count, + pEntries); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamPalette( + pVideoProcessor, + StreamIndex, + Count, + pEntries); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetStreamPixelAspectRatio( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + DXGI_RATIONAL* pSourceAspectRatio, + DXGI_RATIONAL* pDestinationAspectRatio) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pSourceAspectRatio, + pDestinationAspectRatio); + + GetWrappedObjectAs()->VideoProcessorGetStreamPixelAspectRatio( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pEnabled, + pSourceAspectRatio, + pDestinationAspectRatio); + + Encode_ID3D11VideoContext_VideoProcessorGetStreamPixelAspectRatio( + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pSourceAspectRatio, + pDestinationAspectRatio); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pSourceAspectRatio, + pDestinationAspectRatio); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamPixelAspectRatio( + pVideoProcessor, + StreamIndex, + pEnabled, + pSourceAspectRatio, + pDestinationAspectRatio); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetStreamLumaKey( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + FLOAT* pLower, + FLOAT* pUpper) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pLower, + pUpper); + + GetWrappedObjectAs()->VideoProcessorGetStreamLumaKey( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pEnabled, + pLower, + pUpper); + + Encode_ID3D11VideoContext_VideoProcessorGetStreamLumaKey( + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pLower, + pUpper); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnabled, + pLower, + pUpper); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamLumaKey( + pVideoProcessor, + StreamIndex, + pEnabled, + pLower, + pUpper); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetStreamStereoFormat( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnable, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT* pFormat, + BOOL* pLeftViewFrame0, + BOOL* pBaseViewFrame0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE* pFlipMode, + int* MonoOffset) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnable, + pFormat, + pLeftViewFrame0, + pBaseViewFrame0, + pFlipMode, + MonoOffset); + + GetWrappedObjectAs()->VideoProcessorGetStreamStereoFormat( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pEnable, + pFormat, + pLeftViewFrame0, + pBaseViewFrame0, + pFlipMode, + MonoOffset); + + Encode_ID3D11VideoContext_VideoProcessorGetStreamStereoFormat( + this, + pVideoProcessor, + StreamIndex, + pEnable, + pFormat, + pLeftViewFrame0, + pBaseViewFrame0, + pFlipMode, + MonoOffset); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnable, + pFormat, + pLeftViewFrame0, + pBaseViewFrame0, + pFlipMode, + MonoOffset); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamStereoFormat( + pVideoProcessor, + StreamIndex, + pEnable, + pFormat, + pLeftViewFrame0, + pBaseViewFrame0, + pFlipMode, + MonoOffset); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetStreamAutoProcessingMode( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnabled); + + GetWrappedObjectAs()->VideoProcessorGetStreamAutoProcessingMode( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pEnabled); + + Encode_ID3D11VideoContext_VideoProcessorGetStreamAutoProcessingMode( + this, + pVideoProcessor, + StreamIndex, + pEnabled); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnabled); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamAutoProcessingMode( + pVideoProcessor, + StreamIndex, + pEnabled); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetStreamFilter( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + BOOL* pEnabled, + int* pLevel) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Filter, + pEnabled, + pLevel); + + GetWrappedObjectAs()->VideoProcessorGetStreamFilter( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + Filter, + pEnabled, + pLevel); + + Encode_ID3D11VideoContext_VideoProcessorGetStreamFilter( + this, + pVideoProcessor, + StreamIndex, + Filter, + pEnabled, + pLevel); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Filter, + pEnabled, + pLevel); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamFilter( + pVideoProcessor, + StreamIndex, + Filter, + pEnabled, + pLevel); + } + + manager->DecrementCallScope(); +} + +APP_DEPRECATED_HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetStreamExtension( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData) +{ + APP_DEPRECATED_HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pExtensionGuid, + DataSize, + pData); + + result = GetWrappedObjectAs()->VideoProcessorGetStreamExtension( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pExtensionGuid, + DataSize, + pData); + + Encode_ID3D11VideoContext_VideoProcessorGetStreamExtension( + this, + result, + pVideoProcessor, + StreamIndex, + pExtensionGuid, + DataSize, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pVideoProcessor, + StreamIndex, + pExtensionGuid, + DataSize, + pData); + } + else + { + result = GetWrappedObjectAs()->VideoProcessorGetStreamExtension( + pVideoProcessor, + StreamIndex, + pExtensionGuid, + DataSize, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorBlt( + ID3D11VideoProcessor* pVideoProcessor, + ID3D11VideoProcessorOutputView* pView, + UINT OutputFrame, + UINT StreamCount, + const D3D11_VIDEO_PROCESSOR_STREAM* pStreams) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + pView, + OutputFrame, + StreamCount, + pStreams); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + result = GetWrappedObjectAs()->VideoProcessorBlt( + encode::GetWrappedObject(pVideoProcessor), + encode::GetWrappedObject(pView), + OutputFrame, + StreamCount, + UnwrapStructArrayObjects(pStreams, StreamCount, unwrap_memory)); + + Encode_ID3D11VideoContext_VideoProcessorBlt( + this, + result, + pVideoProcessor, + pView, + OutputFrame, + StreamCount, + pStreams); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pVideoProcessor, + pView, + OutputFrame, + StreamCount, + pStreams); + } + else + { + result = GetWrappedObjectAs()->VideoProcessorBlt( + pVideoProcessor, + pView, + OutputFrame, + StreamCount, + pStreams); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::NegotiateCryptoSessionKeyExchange( + ID3D11CryptoSession* pCryptoSession, + UINT DataSize, + void* pData) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoSession, + DataSize, + pData); + + result = GetWrappedObjectAs()->NegotiateCryptoSessionKeyExchange( + encode::GetWrappedObject(pCryptoSession), + DataSize, + pData); + + Encode_ID3D11VideoContext_NegotiateCryptoSessionKeyExchange( + this, + result, + pCryptoSession, + DataSize, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pCryptoSession, + DataSize, + pData); + } + else + { + result = GetWrappedObjectAs()->NegotiateCryptoSessionKeyExchange( + pCryptoSession, + DataSize, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::EncryptionBlt( + ID3D11CryptoSession* pCryptoSession, + ID3D11Texture2D* pSrcSurface, + ID3D11Texture2D* pDstSurface, + UINT IVSize, + void* pIV) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoSession, + pSrcSurface, + pDstSurface, + IVSize, + pIV); + + GetWrappedObjectAs()->EncryptionBlt( + encode::GetWrappedObject(pCryptoSession), + encode::GetWrappedObject(pSrcSurface), + encode::GetWrappedObject(pDstSurface), + IVSize, + pIV); + + Encode_ID3D11VideoContext_EncryptionBlt( + this, + pCryptoSession, + pSrcSurface, + pDstSurface, + IVSize, + pIV); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pCryptoSession, + pSrcSurface, + pDstSurface, + IVSize, + pIV); + } + else + { + GetWrappedObjectAs()->EncryptionBlt( + pCryptoSession, + pSrcSurface, + pDstSurface, + IVSize, + pIV); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::DecryptionBlt( + ID3D11CryptoSession* pCryptoSession, + ID3D11Texture2D* pSrcSurface, + ID3D11Texture2D* pDstSurface, + D3D11_ENCRYPTED_BLOCK_INFO* pEncryptedBlockInfo, + UINT ContentKeySize, + const void* pContentKey, + UINT IVSize, + void* pIV) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoSession, + pSrcSurface, + pDstSurface, + pEncryptedBlockInfo, + ContentKeySize, + pContentKey, + IVSize, + pIV); + + GetWrappedObjectAs()->DecryptionBlt( + encode::GetWrappedObject(pCryptoSession), + encode::GetWrappedObject(pSrcSurface), + encode::GetWrappedObject(pDstSurface), + pEncryptedBlockInfo, + ContentKeySize, + pContentKey, + IVSize, + pIV); + + Encode_ID3D11VideoContext_DecryptionBlt( + this, + pCryptoSession, + pSrcSurface, + pDstSurface, + pEncryptedBlockInfo, + ContentKeySize, + pContentKey, + IVSize, + pIV); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pCryptoSession, + pSrcSurface, + pDstSurface, + pEncryptedBlockInfo, + ContentKeySize, + pContentKey, + IVSize, + pIV); + } + else + { + GetWrappedObjectAs()->DecryptionBlt( + pCryptoSession, + pSrcSurface, + pDstSurface, + pEncryptedBlockInfo, + ContentKeySize, + pContentKey, + IVSize, + pIV); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::StartSessionKeyRefresh( + ID3D11CryptoSession* pCryptoSession, + UINT RandomNumberSize, + void* pRandomNumber) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoSession, + RandomNumberSize, + pRandomNumber); + + GetWrappedObjectAs()->StartSessionKeyRefresh( + encode::GetWrappedObject(pCryptoSession), + RandomNumberSize, + pRandomNumber); + + Encode_ID3D11VideoContext_StartSessionKeyRefresh( + this, + pCryptoSession, + RandomNumberSize, + pRandomNumber); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pCryptoSession, + RandomNumberSize, + pRandomNumber); + } + else + { + GetWrappedObjectAs()->StartSessionKeyRefresh( + pCryptoSession, + RandomNumberSize, + pRandomNumber); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::FinishSessionKeyRefresh( + ID3D11CryptoSession* pCryptoSession) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoSession); + + GetWrappedObjectAs()->FinishSessionKeyRefresh( + encode::GetWrappedObject(pCryptoSession)); + + Encode_ID3D11VideoContext_FinishSessionKeyRefresh( + this, + pCryptoSession); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pCryptoSession); + } + else + { + GetWrappedObjectAs()->FinishSessionKeyRefresh( + pCryptoSession); + } + + manager->DecrementCallScope(); +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::GetEncryptionBltKey( + ID3D11CryptoSession* pCryptoSession, + UINT KeySize, + void* pReadbackKey) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoSession, + KeySize, + pReadbackKey); + + result = GetWrappedObjectAs()->GetEncryptionBltKey( + encode::GetWrappedObject(pCryptoSession), + KeySize, + pReadbackKey); + + Encode_ID3D11VideoContext_GetEncryptionBltKey( + this, + result, + pCryptoSession, + KeySize, + pReadbackKey); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pCryptoSession, + KeySize, + pReadbackKey); + } + else + { + result = GetWrappedObjectAs()->GetEncryptionBltKey( + pCryptoSession, + KeySize, + pReadbackKey); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::NegotiateAuthenticatedChannelKeyExchange( + ID3D11AuthenticatedChannel* pChannel, + UINT DataSize, + void* pData) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pChannel, + DataSize, + pData); + + result = GetWrappedObjectAs()->NegotiateAuthenticatedChannelKeyExchange( + encode::GetWrappedObject(pChannel), + DataSize, + pData); + + Encode_ID3D11VideoContext_NegotiateAuthenticatedChannelKeyExchange( + this, + result, + pChannel, + DataSize, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pChannel, + DataSize, + pData); + } + else + { + result = GetWrappedObjectAs()->NegotiateAuthenticatedChannelKeyExchange( + pChannel, + DataSize, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::QueryAuthenticatedChannel( + ID3D11AuthenticatedChannel* pChannel, + UINT InputSize, + const void* pInput, + UINT OutputSize, + void* pOutput) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pChannel, + InputSize, + pInput, + OutputSize, + pOutput); + + result = GetWrappedObjectAs()->QueryAuthenticatedChannel( + encode::GetWrappedObject(pChannel), + InputSize, + pInput, + OutputSize, + pOutput); + + Encode_ID3D11VideoContext_QueryAuthenticatedChannel( + this, + result, + pChannel, + InputSize, + pInput, + OutputSize, + pOutput); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pChannel, + InputSize, + pInput, + OutputSize, + pOutput); + } + else + { + result = GetWrappedObjectAs()->QueryAuthenticatedChannel( + pChannel, + InputSize, + pInput, + OutputSize, + pOutput); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::ConfigureAuthenticatedChannel( + ID3D11AuthenticatedChannel* pChannel, + UINT InputSize, + const void* pInput, + D3D11_AUTHENTICATED_CONFIGURE_OUTPUT* pOutput) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pChannel, + InputSize, + pInput, + pOutput); + + result = GetWrappedObjectAs()->ConfigureAuthenticatedChannel( + encode::GetWrappedObject(pChannel), + InputSize, + pInput, + pOutput); + + Encode_ID3D11VideoContext_ConfigureAuthenticatedChannel( + this, + result, + pChannel, + InputSize, + pInput, + pOutput); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pChannel, + InputSize, + pInput, + pOutput); + } + else + { + result = GetWrappedObjectAs()->ConfigureAuthenticatedChannel( + pChannel, + InputSize, + pInput, + pOutput); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorSetStreamRotation( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_ROTATION Rotation) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + Rotation); + + GetWrappedObjectAs()->VideoProcessorSetStreamRotation( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + Enable, + Rotation); + + Encode_ID3D11VideoContext_VideoProcessorSetStreamRotation( + this, + pVideoProcessor, + StreamIndex, + Enable, + Rotation); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + Rotation); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamRotation( + pVideoProcessor, + StreamIndex, + Enable, + Rotation); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext_Wrapper::VideoProcessorGetStreamRotation( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnable, + D3D11_VIDEO_PROCESSOR_ROTATION* pRotation) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnable, + pRotation); + + GetWrappedObjectAs()->VideoProcessorGetStreamRotation( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pEnable, + pRotation); + + Encode_ID3D11VideoContext_VideoProcessorGetStreamRotation( + this, + pVideoProcessor, + StreamIndex, + pEnable, + pRotation); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnable, + pRotation); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamRotation( + pVideoProcessor, + StreamIndex, + pEnable, + pRotation); + } + + manager->DecrementCallScope(); +} + +ID3D11VideoDevice_Wrapper::ID3D11VideoDevice_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : IUnknown_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11VideoDevice_Wrapper::~ID3D11VideoDevice_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11VideoDevice_Wrapper* ID3D11VideoDevice_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::CreateVideoDecoder( + const D3D11_VIDEO_DECODER_DESC* pVideoDesc, + const D3D11_VIDEO_DECODER_CONFIG* pConfig, + ID3D11VideoDecoder** ppDecoder) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoDesc, + pConfig, + ppDecoder); + + result = GetWrappedObjectAs()->CreateVideoDecoder( + pVideoDesc, + pConfig, + ppDecoder); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11VideoDecoder, reinterpret_cast(ppDecoder), nullptr); + } + + Encode_ID3D11VideoDevice_CreateVideoDecoder( + this, + result, + pVideoDesc, + pConfig, + ppDecoder); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pVideoDesc, + pConfig, + ppDecoder); + } + else + { + result = GetWrappedObjectAs()->CreateVideoDecoder( + pVideoDesc, + pConfig, + ppDecoder); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::CreateVideoProcessor( + ID3D11VideoProcessorEnumerator* pEnum, + UINT RateConversionIndex, + ID3D11VideoProcessor** ppVideoProcessor) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pEnum, + RateConversionIndex, + ppVideoProcessor); + + result = GetWrappedObjectAs()->CreateVideoProcessor( + encode::GetWrappedObject(pEnum), + RateConversionIndex, + ppVideoProcessor); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11VideoProcessor, reinterpret_cast(ppVideoProcessor), nullptr); + } + + Encode_ID3D11VideoDevice_CreateVideoProcessor( + this, + result, + pEnum, + RateConversionIndex, + ppVideoProcessor); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pEnum, + RateConversionIndex, + ppVideoProcessor); + } + else + { + result = GetWrappedObjectAs()->CreateVideoProcessor( + pEnum, + RateConversionIndex, + ppVideoProcessor); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::CreateAuthenticatedChannel( + D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType, + ID3D11AuthenticatedChannel** ppAuthenticatedChannel) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ChannelType, + ppAuthenticatedChannel); + + result = GetWrappedObjectAs()->CreateAuthenticatedChannel( + ChannelType, + ppAuthenticatedChannel); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11AuthenticatedChannel, reinterpret_cast(ppAuthenticatedChannel), nullptr); + } + + Encode_ID3D11VideoDevice_CreateAuthenticatedChannel( + this, + result, + ChannelType, + ppAuthenticatedChannel); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + ChannelType, + ppAuthenticatedChannel); + } + else + { + result = GetWrappedObjectAs()->CreateAuthenticatedChannel( + ChannelType, + ppAuthenticatedChannel); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::CreateCryptoSession( + const GUID* pCryptoType, + const GUID* pDecoderProfile, + const GUID* pKeyExchangeType, + ID3D11CryptoSession** ppCryptoSession) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoType, + pDecoderProfile, + pKeyExchangeType, + ppCryptoSession); + + result = GetWrappedObjectAs()->CreateCryptoSession( + pCryptoType, + pDecoderProfile, + pKeyExchangeType, + ppCryptoSession); + + Encode_ID3D11VideoDevice_CreateCryptoSession( + this, + result, + pCryptoType, + pDecoderProfile, + pKeyExchangeType, + ppCryptoSession); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pCryptoType, + pDecoderProfile, + pKeyExchangeType, + ppCryptoSession); + } + else + { + result = GetWrappedObjectAs()->CreateCryptoSession( + pCryptoType, + pDecoderProfile, + pKeyExchangeType, + ppCryptoSession); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::CreateVideoDecoderOutputView( + ID3D11Resource* pResource, + const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* pDesc, + ID3D11VideoDecoderOutputView** ppVDOVView) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource, + pDesc, + ppVDOVView); + + result = GetWrappedObjectAs()->CreateVideoDecoderOutputView( + encode::GetWrappedObject(pResource), + pDesc, + ppVDOVView); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11VideoDecoderOutputView, reinterpret_cast(ppVDOVView), nullptr); + } + + Encode_ID3D11VideoDevice_CreateVideoDecoderOutputView( + this, + result, + pResource, + pDesc, + ppVDOVView); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource, + pDesc, + ppVDOVView); + } + else + { + result = GetWrappedObjectAs()->CreateVideoDecoderOutputView( + pResource, + pDesc, + ppVDOVView); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::CreateVideoProcessorInputView( + ID3D11Resource* pResource, + ID3D11VideoProcessorEnumerator* pEnum, + const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* pDesc, + ID3D11VideoProcessorInputView** ppVPIView) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource, + pEnum, + pDesc, + ppVPIView); + + result = GetWrappedObjectAs()->CreateVideoProcessorInputView( + encode::GetWrappedObject(pResource), + encode::GetWrappedObject(pEnum), + pDesc, + ppVPIView); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11VideoProcessorInputView, reinterpret_cast(ppVPIView), nullptr); + } + + Encode_ID3D11VideoDevice_CreateVideoProcessorInputView( + this, + result, + pResource, + pEnum, + pDesc, + ppVPIView); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource, + pEnum, + pDesc, + ppVPIView); + } + else + { + result = GetWrappedObjectAs()->CreateVideoProcessorInputView( + pResource, + pEnum, + pDesc, + ppVPIView); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::CreateVideoProcessorOutputView( + ID3D11Resource* pResource, + ID3D11VideoProcessorEnumerator* pEnum, + const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* pDesc, + ID3D11VideoProcessorOutputView** ppVPOView) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource, + pEnum, + pDesc, + ppVPOView); + + result = GetWrappedObjectAs()->CreateVideoProcessorOutputView( + encode::GetWrappedObject(pResource), + encode::GetWrappedObject(pEnum), + pDesc, + ppVPOView); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11VideoProcessorOutputView, reinterpret_cast(ppVPOView), nullptr); + } + + Encode_ID3D11VideoDevice_CreateVideoProcessorOutputView( + this, + result, + pResource, + pEnum, + pDesc, + ppVPOView); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource, + pEnum, + pDesc, + ppVPOView); + } + else + { + result = GetWrappedObjectAs()->CreateVideoProcessorOutputView( + pResource, + pEnum, + pDesc, + ppVPOView); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::CreateVideoProcessorEnumerator( + const D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pDesc, + ID3D11VideoProcessorEnumerator** ppEnum) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc, + ppEnum); + + result = GetWrappedObjectAs()->CreateVideoProcessorEnumerator( + pDesc, + ppEnum); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11VideoProcessorEnumerator, reinterpret_cast(ppEnum), nullptr); + } + + Encode_ID3D11VideoDevice_CreateVideoProcessorEnumerator( + this, + result, + pDesc, + ppEnum); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDesc, + ppEnum); + } + else + { + result = GetWrappedObjectAs()->CreateVideoProcessorEnumerator( + pDesc, + ppEnum); + } + + manager->DecrementCallScope(); + + return result; +} + +UINT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::GetVideoDecoderProfileCount() +{ + UINT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->GetVideoDecoderProfileCount(); + + Encode_ID3D11VideoDevice_GetVideoDecoderProfileCount( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->GetVideoDecoderProfileCount(); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::GetVideoDecoderProfile( + UINT Index, + GUID* pDecoderProfile) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + Index, + pDecoderProfile); + + result = GetWrappedObjectAs()->GetVideoDecoderProfile( + Index, + pDecoderProfile); + + Encode_ID3D11VideoDevice_GetVideoDecoderProfile( + this, + result, + Index, + pDecoderProfile); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + Index, + pDecoderProfile); + } + else + { + result = GetWrappedObjectAs()->GetVideoDecoderProfile( + Index, + pDecoderProfile); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::CheckVideoDecoderFormat( + const GUID* pDecoderProfile, + DXGI_FORMAT Format, + BOOL* pSupported) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDecoderProfile, + Format, + pSupported); + + result = GetWrappedObjectAs()->CheckVideoDecoderFormat( + pDecoderProfile, + Format, + pSupported); + + Encode_ID3D11VideoDevice_CheckVideoDecoderFormat( + this, + result, + pDecoderProfile, + Format, + pSupported); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDecoderProfile, + Format, + pSupported); + } + else + { + result = GetWrappedObjectAs()->CheckVideoDecoderFormat( + pDecoderProfile, + Format, + pSupported); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::GetVideoDecoderConfigCount( + const D3D11_VIDEO_DECODER_DESC* pDesc, + UINT* pCount) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc, + pCount); + + result = GetWrappedObjectAs()->GetVideoDecoderConfigCount( + pDesc, + pCount); + + Encode_ID3D11VideoDevice_GetVideoDecoderConfigCount( + this, + result, + pDesc, + pCount); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDesc, + pCount); + } + else + { + result = GetWrappedObjectAs()->GetVideoDecoderConfigCount( + pDesc, + pCount); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::GetVideoDecoderConfig( + const D3D11_VIDEO_DECODER_DESC* pDesc, + UINT Index, + D3D11_VIDEO_DECODER_CONFIG* pConfig) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc, + Index, + pConfig); + + result = GetWrappedObjectAs()->GetVideoDecoderConfig( + pDesc, + Index, + pConfig); + + Encode_ID3D11VideoDevice_GetVideoDecoderConfig( + this, + result, + pDesc, + Index, + pConfig); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDesc, + Index, + pConfig); + } + else + { + result = GetWrappedObjectAs()->GetVideoDecoderConfig( + pDesc, + Index, + pConfig); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::GetContentProtectionCaps( + const GUID* pCryptoType, + const GUID* pDecoderProfile, + D3D11_VIDEO_CONTENT_PROTECTION_CAPS* pCaps) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoType, + pDecoderProfile, + pCaps); + + result = GetWrappedObjectAs()->GetContentProtectionCaps( + pCryptoType, + pDecoderProfile, + pCaps); + + Encode_ID3D11VideoDevice_GetContentProtectionCaps( + this, + result, + pCryptoType, + pDecoderProfile, + pCaps); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pCryptoType, + pDecoderProfile, + pCaps); + } + else + { + result = GetWrappedObjectAs()->GetContentProtectionCaps( + pCryptoType, + pDecoderProfile, + pCaps); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::CheckCryptoKeyExchange( + const GUID* pCryptoType, + const GUID* pDecoderProfile, + UINT Index, + GUID* pKeyExchangeType) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoType, + pDecoderProfile, + Index, + pKeyExchangeType); + + result = GetWrappedObjectAs()->CheckCryptoKeyExchange( + pCryptoType, + pDecoderProfile, + Index, + pKeyExchangeType); + + Encode_ID3D11VideoDevice_CheckCryptoKeyExchange( + this, + result, + pCryptoType, + pDecoderProfile, + Index, + pKeyExchangeType); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pCryptoType, + pDecoderProfile, + Index, + pKeyExchangeType); + } + else + { + result = GetWrappedObjectAs()->CheckCryptoKeyExchange( + pCryptoType, + pDecoderProfile, + Index, + pKeyExchangeType); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::SetPrivateData( + REFGUID guid, + UINT DataSize, + const void* pData) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + guid, + DataSize, + pData); + + result = GetWrappedObjectAs()->SetPrivateData( + guid, + DataSize, + pData); + + Encode_ID3D11VideoDevice_SetPrivateData( + this, + result, + guid, + DataSize, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + guid, + DataSize, + pData); + } + else + { + result = GetWrappedObjectAs()->SetPrivateData( + guid, + DataSize, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice_Wrapper::SetPrivateDataInterface( + REFGUID guid, + const IUnknown* pData) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + guid, + pData); + + result = GetWrappedObjectAs()->SetPrivateDataInterface( + guid, + encode::GetWrappedObject(pData)); + + Encode_ID3D11VideoDevice_SetPrivateDataInterface( + this, + result, + guid, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + guid, + pData); + } + else + { + result = GetWrappedObjectAs()->SetPrivateDataInterface( + guid, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11Device_Wrapper::ID3D11Device_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : IUnknown_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11Device_Wrapper::~ID3D11Device_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11Device_Wrapper* ID3D11Device_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateBuffer( + const D3D11_BUFFER_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Buffer** ppBuffer) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc, + pInitialData, + ppBuffer); + + result = GetWrappedObjectAs()->CreateBuffer( + pDesc, + pInitialData, + ppBuffer); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11Buffer, reinterpret_cast(ppBuffer), nullptr); + } + + Encode_ID3D11Device_CreateBuffer( + this, + result, + pDesc, + pInitialData, + ppBuffer); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDesc, + pInitialData, + ppBuffer); + } + else + { + result = GetWrappedObjectAs()->CreateBuffer( + pDesc, + pInitialData, + ppBuffer); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateTexture1D( + const D3D11_TEXTURE1D_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture1D** ppTexture1D) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc, + pInitialData, + ppTexture1D); + + result = GetWrappedObjectAs()->CreateTexture1D( + pDesc, + pInitialData, + ppTexture1D); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11Texture1D, reinterpret_cast(ppTexture1D), nullptr); + } + + Encode_ID3D11Device_CreateTexture1D( + this, + result, + pDesc, + pInitialData, + ppTexture1D); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDesc, + pInitialData, + ppTexture1D); + } + else + { + result = GetWrappedObjectAs()->CreateTexture1D( + pDesc, + pInitialData, + ppTexture1D); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateTexture2D( + const D3D11_TEXTURE2D_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture2D** ppTexture2D) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc, + pInitialData, + ppTexture2D); + + result = GetWrappedObjectAs()->CreateTexture2D( + pDesc, + pInitialData, + ppTexture2D); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11Texture2D, reinterpret_cast(ppTexture2D), nullptr); + } + + Encode_ID3D11Device_CreateTexture2D( + this, + result, + pDesc, + pInitialData, + ppTexture2D); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDesc, + pInitialData, + ppTexture2D); + } + else + { + result = GetWrappedObjectAs()->CreateTexture2D( + pDesc, + pInitialData, + ppTexture2D); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateTexture3D( + const D3D11_TEXTURE3D_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture3D** ppTexture3D) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc, + pInitialData, + ppTexture3D); + + result = GetWrappedObjectAs()->CreateTexture3D( + pDesc, + pInitialData, + ppTexture3D); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11Texture3D, reinterpret_cast(ppTexture3D), nullptr); + } + + Encode_ID3D11Device_CreateTexture3D( + this, + result, + pDesc, + pInitialData, + ppTexture3D); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDesc, + pInitialData, + ppTexture3D); + } + else + { + result = GetWrappedObjectAs()->CreateTexture3D( + pDesc, + pInitialData, + ppTexture3D); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateShaderResourceView( + ID3D11Resource* pResource, + const D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc, + ID3D11ShaderResourceView** ppSRView) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource, + pDesc, + ppSRView); + + result = GetWrappedObjectAs()->CreateShaderResourceView( + encode::GetWrappedObject(pResource), + pDesc, + ppSRView); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11ShaderResourceView, reinterpret_cast(ppSRView), nullptr); + } + + Encode_ID3D11Device_CreateShaderResourceView( + this, + result, + pResource, + pDesc, + ppSRView); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource, + pDesc, + ppSRView); + } + else + { + result = GetWrappedObjectAs()->CreateShaderResourceView( + pResource, + pDesc, + ppSRView); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateUnorderedAccessView( + ID3D11Resource* pResource, + const D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc, + ID3D11UnorderedAccessView** ppUAView) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource, + pDesc, + ppUAView); + + result = GetWrappedObjectAs()->CreateUnorderedAccessView( + encode::GetWrappedObject(pResource), + pDesc, + ppUAView); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11UnorderedAccessView, reinterpret_cast(ppUAView), nullptr); + } + + Encode_ID3D11Device_CreateUnorderedAccessView( + this, + result, + pResource, + pDesc, + ppUAView); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource, + pDesc, + ppUAView); + } + else + { + result = GetWrappedObjectAs()->CreateUnorderedAccessView( + pResource, + pDesc, + ppUAView); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateRenderTargetView( + ID3D11Resource* pResource, + const D3D11_RENDER_TARGET_VIEW_DESC* pDesc, + ID3D11RenderTargetView** ppRTView) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource, + pDesc, + ppRTView); + + result = GetWrappedObjectAs()->CreateRenderTargetView( + encode::GetWrappedObject(pResource), + pDesc, + ppRTView); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11RenderTargetView, reinterpret_cast(ppRTView), nullptr); + } + + Encode_ID3D11Device_CreateRenderTargetView( + this, + result, + pResource, + pDesc, + ppRTView); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource, + pDesc, + ppRTView); + } + else + { + result = GetWrappedObjectAs()->CreateRenderTargetView( + pResource, + pDesc, + ppRTView); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateDepthStencilView( + ID3D11Resource* pResource, + const D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc, + ID3D11DepthStencilView** ppDepthStencilView) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource, + pDesc, + ppDepthStencilView); + + result = GetWrappedObjectAs()->CreateDepthStencilView( + encode::GetWrappedObject(pResource), + pDesc, + ppDepthStencilView); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11DepthStencilView, reinterpret_cast(ppDepthStencilView), nullptr); + } + + Encode_ID3D11Device_CreateDepthStencilView( + this, + result, + pResource, + pDesc, + ppDepthStencilView); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource, + pDesc, + ppDepthStencilView); + } + else + { + result = GetWrappedObjectAs()->CreateDepthStencilView( + pResource, + pDesc, + ppDepthStencilView); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateInputLayout( + const D3D11_INPUT_ELEMENT_DESC* pInputElementDescs, + UINT NumElements, + const void* pShaderBytecodeWithInputSignature, + SIZE_T BytecodeLength, + ID3D11InputLayout** ppInputLayout) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pInputElementDescs, + NumElements, + pShaderBytecodeWithInputSignature, + BytecodeLength, + ppInputLayout); + + result = GetWrappedObjectAs()->CreateInputLayout( + pInputElementDescs, + NumElements, + pShaderBytecodeWithInputSignature, + BytecodeLength, + ppInputLayout); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11InputLayout, reinterpret_cast(ppInputLayout), nullptr); + } + + Encode_ID3D11Device_CreateInputLayout( + this, + result, + pInputElementDescs, + NumElements, + pShaderBytecodeWithInputSignature, + BytecodeLength, + ppInputLayout); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pInputElementDescs, + NumElements, + pShaderBytecodeWithInputSignature, + BytecodeLength, + ppInputLayout); + } + else + { + result = GetWrappedObjectAs()->CreateInputLayout( + pInputElementDescs, + NumElements, + pShaderBytecodeWithInputSignature, + BytecodeLength, + ppInputLayout); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateVertexShader( + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11VertexShader** ppVertexShader) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppVertexShader); + + result = GetWrappedObjectAs()->CreateVertexShader( + pShaderBytecode, + BytecodeLength, + encode::GetWrappedObject(pClassLinkage), + ppVertexShader); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11VertexShader, reinterpret_cast(ppVertexShader), nullptr); + } + + Encode_ID3D11Device_CreateVertexShader( + this, + result, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppVertexShader); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppVertexShader); + } + else + { + result = GetWrappedObjectAs()->CreateVertexShader( + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppVertexShader); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateGeometryShader( + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11GeometryShader** ppGeometryShader) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppGeometryShader); + + result = GetWrappedObjectAs()->CreateGeometryShader( + pShaderBytecode, + BytecodeLength, + encode::GetWrappedObject(pClassLinkage), + ppGeometryShader); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11GeometryShader, reinterpret_cast(ppGeometryShader), nullptr); + } + + Encode_ID3D11Device_CreateGeometryShader( + this, + result, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppGeometryShader); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppGeometryShader); + } + else + { + result = GetWrappedObjectAs()->CreateGeometryShader( + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppGeometryShader); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateGeometryShaderWithStreamOutput( + const void* pShaderBytecode, + SIZE_T BytecodeLength, + const D3D11_SO_DECLARATION_ENTRY* pSODeclaration, + UINT NumEntries, + const UINT* pBufferStrides, + UINT NumStrides, + UINT RasterizedStream, + ID3D11ClassLinkage* pClassLinkage, + ID3D11GeometryShader** ppGeometryShader) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pShaderBytecode, + BytecodeLength, + pSODeclaration, + NumEntries, + pBufferStrides, + NumStrides, + RasterizedStream, + pClassLinkage, + ppGeometryShader); + + result = GetWrappedObjectAs()->CreateGeometryShaderWithStreamOutput( + pShaderBytecode, + BytecodeLength, + pSODeclaration, + NumEntries, + pBufferStrides, + NumStrides, + RasterizedStream, + encode::GetWrappedObject(pClassLinkage), + ppGeometryShader); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11GeometryShader, reinterpret_cast(ppGeometryShader), nullptr); + } + + Encode_ID3D11Device_CreateGeometryShaderWithStreamOutput( + this, + result, + pShaderBytecode, + BytecodeLength, + pSODeclaration, + NumEntries, + pBufferStrides, + NumStrides, + RasterizedStream, + pClassLinkage, + ppGeometryShader); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pShaderBytecode, + BytecodeLength, + pSODeclaration, + NumEntries, + pBufferStrides, + NumStrides, + RasterizedStream, + pClassLinkage, + ppGeometryShader); + } + else + { + result = GetWrappedObjectAs()->CreateGeometryShaderWithStreamOutput( + pShaderBytecode, + BytecodeLength, + pSODeclaration, + NumEntries, + pBufferStrides, + NumStrides, + RasterizedStream, + pClassLinkage, + ppGeometryShader); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreatePixelShader( + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11PixelShader** ppPixelShader) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppPixelShader); + + result = GetWrappedObjectAs()->CreatePixelShader( + pShaderBytecode, + BytecodeLength, + encode::GetWrappedObject(pClassLinkage), + ppPixelShader); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11PixelShader, reinterpret_cast(ppPixelShader), nullptr); + } + + Encode_ID3D11Device_CreatePixelShader( + this, + result, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppPixelShader); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppPixelShader); + } + else + { + result = GetWrappedObjectAs()->CreatePixelShader( + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppPixelShader); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateHullShader( + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11HullShader** ppHullShader) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppHullShader); + + result = GetWrappedObjectAs()->CreateHullShader( + pShaderBytecode, + BytecodeLength, + encode::GetWrappedObject(pClassLinkage), + ppHullShader); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11HullShader, reinterpret_cast(ppHullShader), nullptr); + } + + Encode_ID3D11Device_CreateHullShader( + this, + result, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppHullShader); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppHullShader); + } + else + { + result = GetWrappedObjectAs()->CreateHullShader( + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppHullShader); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateDomainShader( + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11DomainShader** ppDomainShader) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppDomainShader); + + result = GetWrappedObjectAs()->CreateDomainShader( + pShaderBytecode, + BytecodeLength, + encode::GetWrappedObject(pClassLinkage), + ppDomainShader); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11DomainShader, reinterpret_cast(ppDomainShader), nullptr); + } + + Encode_ID3D11Device_CreateDomainShader( + this, + result, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppDomainShader); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppDomainShader); + } + else + { + result = GetWrappedObjectAs()->CreateDomainShader( + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppDomainShader); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateComputeShader( + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11ComputeShader** ppComputeShader) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppComputeShader); + + result = GetWrappedObjectAs()->CreateComputeShader( + pShaderBytecode, + BytecodeLength, + encode::GetWrappedObject(pClassLinkage), + ppComputeShader); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11ComputeShader, reinterpret_cast(ppComputeShader), nullptr); + } + + Encode_ID3D11Device_CreateComputeShader( + this, + result, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppComputeShader); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppComputeShader); + } + else + { + result = GetWrappedObjectAs()->CreateComputeShader( + pShaderBytecode, + BytecodeLength, + pClassLinkage, + ppComputeShader); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateClassLinkage( + ID3D11ClassLinkage** ppLinkage) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppLinkage); + + result = GetWrappedObjectAs()->CreateClassLinkage( + ppLinkage); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11ClassLinkage, reinterpret_cast(ppLinkage), nullptr); + } + + Encode_ID3D11Device_CreateClassLinkage( + this, + result, + ppLinkage); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + ppLinkage); + } + else + { + result = GetWrappedObjectAs()->CreateClassLinkage( + ppLinkage); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateBlendState( + const D3D11_BLEND_DESC* pBlendStateDesc, + ID3D11BlendState** ppBlendState) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pBlendStateDesc, + ppBlendState); + + result = GetWrappedObjectAs()->CreateBlendState( + pBlendStateDesc, + ppBlendState); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11BlendState, reinterpret_cast(ppBlendState), nullptr); + } + + Encode_ID3D11Device_CreateBlendState( + this, + result, + pBlendStateDesc, + ppBlendState); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pBlendStateDesc, + ppBlendState); + } + else + { + result = GetWrappedObjectAs()->CreateBlendState( + pBlendStateDesc, + ppBlendState); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateDepthStencilState( + const D3D11_DEPTH_STENCIL_DESC* pDepthStencilDesc, + ID3D11DepthStencilState** ppDepthStencilState) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDepthStencilDesc, + ppDepthStencilState); + + result = GetWrappedObjectAs()->CreateDepthStencilState( + pDepthStencilDesc, + ppDepthStencilState); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11DepthStencilState, reinterpret_cast(ppDepthStencilState), nullptr); + } + + Encode_ID3D11Device_CreateDepthStencilState( + this, + result, + pDepthStencilDesc, + ppDepthStencilState); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDepthStencilDesc, + ppDepthStencilState); + } + else + { + result = GetWrappedObjectAs()->CreateDepthStencilState( + pDepthStencilDesc, + ppDepthStencilState); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateRasterizerState( + const D3D11_RASTERIZER_DESC* pRasterizerDesc, + ID3D11RasterizerState** ppRasterizerState) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pRasterizerDesc, + ppRasterizerState); + + result = GetWrappedObjectAs()->CreateRasterizerState( + pRasterizerDesc, + ppRasterizerState); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11RasterizerState, reinterpret_cast(ppRasterizerState), nullptr); + } + + Encode_ID3D11Device_CreateRasterizerState( + this, + result, + pRasterizerDesc, + ppRasterizerState); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pRasterizerDesc, + ppRasterizerState); + } + else + { + result = GetWrappedObjectAs()->CreateRasterizerState( + pRasterizerDesc, + ppRasterizerState); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateSamplerState( + const D3D11_SAMPLER_DESC* pSamplerDesc, + ID3D11SamplerState** ppSamplerState) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pSamplerDesc, + ppSamplerState); + + result = GetWrappedObjectAs()->CreateSamplerState( + pSamplerDesc, + ppSamplerState); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11SamplerState, reinterpret_cast(ppSamplerState), nullptr); + } + + Encode_ID3D11Device_CreateSamplerState( + this, + result, + pSamplerDesc, + ppSamplerState); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pSamplerDesc, + ppSamplerState); + } + else + { + result = GetWrappedObjectAs()->CreateSamplerState( + pSamplerDesc, + ppSamplerState); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateQuery( + const D3D11_QUERY_DESC* pQueryDesc, + ID3D11Query** ppQuery) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pQueryDesc, + ppQuery); + + result = GetWrappedObjectAs()->CreateQuery( + pQueryDesc, + ppQuery); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11Query, reinterpret_cast(ppQuery), nullptr); + } + + Encode_ID3D11Device_CreateQuery( + this, + result, + pQueryDesc, + ppQuery); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pQueryDesc, + ppQuery); + } + else + { + result = GetWrappedObjectAs()->CreateQuery( + pQueryDesc, + ppQuery); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreatePredicate( + const D3D11_QUERY_DESC* pPredicateDesc, + ID3D11Predicate** ppPredicate) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pPredicateDesc, + ppPredicate); + + result = GetWrappedObjectAs()->CreatePredicate( + pPredicateDesc, + ppPredicate); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11Predicate, reinterpret_cast(ppPredicate), nullptr); + } + + Encode_ID3D11Device_CreatePredicate( + this, + result, + pPredicateDesc, + ppPredicate); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pPredicateDesc, + ppPredicate); + } + else + { + result = GetWrappedObjectAs()->CreatePredicate( + pPredicateDesc, + ppPredicate); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateCounter( + const D3D11_COUNTER_DESC* pCounterDesc, + ID3D11Counter** ppCounter) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCounterDesc, + ppCounter); + + result = GetWrappedObjectAs()->CreateCounter( + pCounterDesc, + ppCounter); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11Counter, reinterpret_cast(ppCounter), nullptr); + } + + Encode_ID3D11Device_CreateCounter( + this, + result, + pCounterDesc, + ppCounter); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pCounterDesc, + ppCounter); + } + else + { + result = GetWrappedObjectAs()->CreateCounter( + pCounterDesc, + ppCounter); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CreateDeferredContext( + UINT ContextFlags, + ID3D11DeviceContext** ppDeferredContext) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ContextFlags, + ppDeferredContext); + + result = GetWrappedObjectAs()->CreateDeferredContext( + ContextFlags, + ppDeferredContext); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11DeviceContext, reinterpret_cast(ppDeferredContext), nullptr); + } + + Encode_ID3D11Device_CreateDeferredContext( + this, + result, + ContextFlags, + ppDeferredContext); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + ContextFlags, + ppDeferredContext); + } + else + { + result = GetWrappedObjectAs()->CreateDeferredContext( + ContextFlags, + ppDeferredContext); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::OpenSharedResource( + HANDLE hResource, + REFIID ReturnedInterface, + void** ppResource) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + hResource, + ReturnedInterface, + ppResource); + + result = GetWrappedObjectAs()->OpenSharedResource( + hResource, + ReturnedInterface, + ppResource); + + if (SUCCEEDED(result)) + { + WrapObject(ReturnedInterface, ppResource, nullptr); + } + + Encode_ID3D11Device_OpenSharedResource( + this, + result, + hResource, + ReturnedInterface, + ppResource); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + hResource, + ReturnedInterface, + ppResource); + } + else + { + result = GetWrappedObjectAs()->OpenSharedResource( + hResource, + ReturnedInterface, + ppResource); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CheckFormatSupport( + DXGI_FORMAT Format, + UINT* pFormatSupport) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + Format, + pFormatSupport); + + result = GetWrappedObjectAs()->CheckFormatSupport( + Format, + pFormatSupport); + + Encode_ID3D11Device_CheckFormatSupport( + this, + result, + Format, + pFormatSupport); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + Format, + pFormatSupport); + } + else + { + result = GetWrappedObjectAs()->CheckFormatSupport( + Format, + pFormatSupport); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CheckMultisampleQualityLevels( + DXGI_FORMAT Format, + UINT SampleCount, + UINT* pNumQualityLevels) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + Format, + SampleCount, + pNumQualityLevels); + + result = GetWrappedObjectAs()->CheckMultisampleQualityLevels( + Format, + SampleCount, + pNumQualityLevels); + + Encode_ID3D11Device_CheckMultisampleQualityLevels( + this, + result, + Format, + SampleCount, + pNumQualityLevels); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + Format, + SampleCount, + pNumQualityLevels); + } + else + { + result = GetWrappedObjectAs()->CheckMultisampleQualityLevels( + Format, + SampleCount, + pNumQualityLevels); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11Device_Wrapper::CheckCounterInfo( + D3D11_COUNTER_INFO* pCounterInfo) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCounterInfo); + + GetWrappedObjectAs()->CheckCounterInfo( + pCounterInfo); + + Encode_ID3D11Device_CheckCounterInfo( + this, + pCounterInfo); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pCounterInfo); + } + else + { + GetWrappedObjectAs()->CheckCounterInfo( + pCounterInfo); + } + + manager->DecrementCallScope(); +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CheckCounter( + const D3D11_COUNTER_DESC* pDesc, + D3D11_COUNTER_TYPE* pType, + UINT* pActiveCounters, + LPSTR szName, + UINT* pNameLength, + LPSTR szUnits, + UINT* pUnitsLength, + LPSTR szDescription, + UINT* pDescriptionLength) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc, + pType, + pActiveCounters, + szName, + pNameLength, + szUnits, + pUnitsLength, + szDescription, + pDescriptionLength); + + result = GetWrappedObjectAs()->CheckCounter( + pDesc, + pType, + pActiveCounters, + szName, + pNameLength, + szUnits, + pUnitsLength, + szDescription, + pDescriptionLength); + + Encode_ID3D11Device_CheckCounter( + this, + result, + pDesc, + pType, + pActiveCounters, + szName, + pNameLength, + szUnits, + pUnitsLength, + szDescription, + pDescriptionLength); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDesc, + pType, + pActiveCounters, + szName, + pNameLength, + szUnits, + pUnitsLength, + szDescription, + pDescriptionLength); + } + else + { + result = GetWrappedObjectAs()->CheckCounter( + pDesc, + pType, + pActiveCounters, + szName, + pNameLength, + szUnits, + pUnitsLength, + szDescription, + pDescriptionLength); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::CheckFeatureSupport( + D3D11_FEATURE Feature, + void* pFeatureSupportData, + UINT FeatureSupportDataSize) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + Feature, + pFeatureSupportData, + FeatureSupportDataSize); + + result = GetWrappedObjectAs()->CheckFeatureSupport( + Feature, + pFeatureSupportData, + FeatureSupportDataSize); + + Encode_ID3D11Device_CheckFeatureSupport( + this, + result, + Feature, + pFeatureSupportData, + FeatureSupportDataSize); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + Feature, + pFeatureSupportData, + FeatureSupportDataSize); + } + else + { + result = GetWrappedObjectAs()->CheckFeatureSupport( + Feature, + pFeatureSupportData, + FeatureSupportDataSize); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::GetPrivateData( + REFGUID guid, + UINT* pDataSize, + void* pData) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + guid, + pDataSize, + pData); + + result = GetWrappedObjectAs()->GetPrivateData( + guid, + pDataSize, + pData); + + Encode_ID3D11Device_GetPrivateData( + this, + result, + guid, + pDataSize, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + guid, + pDataSize, + pData); + } + else + { + result = GetWrappedObjectAs()->GetPrivateData( + guid, + pDataSize, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::SetPrivateData( + REFGUID guid, + UINT DataSize, + const void* pData) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + guid, + DataSize, + pData); + + result = GetWrappedObjectAs()->SetPrivateData( + guid, + DataSize, + pData); + + Encode_ID3D11Device_SetPrivateData( + this, + result, + guid, + DataSize, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + guid, + DataSize, + pData); + } + else + { + result = GetWrappedObjectAs()->SetPrivateData( + guid, + DataSize, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::SetPrivateDataInterface( + REFGUID guid, + const IUnknown* pData) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + guid, + pData); + + result = GetWrappedObjectAs()->SetPrivateDataInterface( + guid, + encode::GetWrappedObject(pData)); + + Encode_ID3D11Device_SetPrivateDataInterface( + this, + result, + guid, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + guid, + pData); + } + else + { + result = GetWrappedObjectAs()->SetPrivateDataInterface( + guid, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +D3D_FEATURE_LEVEL STDMETHODCALLTYPE ID3D11Device_Wrapper::GetFeatureLevel() +{ + D3D_FEATURE_LEVEL result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->GetFeatureLevel(); + + Encode_ID3D11Device_GetFeatureLevel( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->GetFeatureLevel(); + } + + manager->DecrementCallScope(); + + return result; +} + +UINT STDMETHODCALLTYPE ID3D11Device_Wrapper::GetCreationFlags() +{ + UINT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->GetCreationFlags(); + + Encode_ID3D11Device_GetCreationFlags( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->GetCreationFlags(); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::GetDeviceRemovedReason() +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->GetDeviceRemovedReason(); + + Encode_ID3D11Device_GetDeviceRemovedReason( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->GetDeviceRemovedReason(); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11Device_Wrapper::GetImmediateContext( + ID3D11DeviceContext** ppImmediateContext) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppImmediateContext); + + GetWrappedObjectAs()->GetImmediateContext( + ppImmediateContext); + + WrapObject(IID_ID3D11DeviceContext, reinterpret_cast(ppImmediateContext), nullptr); + + Encode_ID3D11Device_GetImmediateContext( + this, + ppImmediateContext); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppImmediateContext); + } + else + { + GetWrappedObjectAs()->GetImmediateContext( + ppImmediateContext); + } + + manager->DecrementCallScope(); +} + +HRESULT STDMETHODCALLTYPE ID3D11Device_Wrapper::SetExceptionMode( + UINT RaiseFlags) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + RaiseFlags); + + result = GetWrappedObjectAs()->SetExceptionMode( + RaiseFlags); + + Encode_ID3D11Device_SetExceptionMode( + this, + result, + RaiseFlags); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + RaiseFlags); + } + else + { + result = GetWrappedObjectAs()->SetExceptionMode( + RaiseFlags); + } + + manager->DecrementCallScope(); + + return result; +} + +UINT STDMETHODCALLTYPE ID3D11Device_Wrapper::GetExceptionMode() +{ + UINT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->GetExceptionMode(); + + Encode_ID3D11Device_GetExceptionMode( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->GetExceptionMode(); + } + + manager->DecrementCallScope(); + + return result; +} + + +/* +** This part is generated from d3d11_1.h in Windows SDK: 10.0.20348.0 +** +*/ + +ID3D11BlendState1_Wrapper::ID3D11BlendState1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11BlendState_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11BlendState1_Wrapper::GetDesc1( + D3D11_BLEND_DESC1* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc1( + pDesc); + + Encode_ID3D11BlendState1_GetDesc1( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc1( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11RasterizerState1_Wrapper::ID3D11RasterizerState1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11RasterizerState_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11RasterizerState1_Wrapper::GetDesc1( + D3D11_RASTERIZER_DESC1* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc1( + pDesc); + + Encode_ID3D11RasterizerState1_GetDesc1( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc1( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3DDeviceContextState_Wrapper::ID3DDeviceContextState_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3DDeviceContextState_Wrapper::~ID3DDeviceContextState_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3DDeviceContextState_Wrapper* ID3DDeviceContextState_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +ID3D11DeviceContext1_Wrapper::ID3D11DeviceContext1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceContext_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::CopySubresourceRegion1( + ID3D11Resource* pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + const D3D11_BOX* pSrcBox, + UINT CopyFlags) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDstResource, + DstSubresource, + DstX, + DstY, + DstZ, + pSrcResource, + SrcSubresource, + pSrcBox, + CopyFlags); + + GetWrappedObjectAs()->CopySubresourceRegion1( + encode::GetWrappedObject(pDstResource), + DstSubresource, + DstX, + DstY, + DstZ, + encode::GetWrappedObject(pSrcResource), + SrcSubresource, + pSrcBox, + CopyFlags); + + Encode_ID3D11DeviceContext1_CopySubresourceRegion1( + this, + pDstResource, + DstSubresource, + DstX, + DstY, + DstZ, + pSrcResource, + SrcSubresource, + pSrcBox, + CopyFlags); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDstResource, + DstSubresource, + DstX, + DstY, + DstZ, + pSrcResource, + SrcSubresource, + pSrcBox, + CopyFlags); + } + else + { + GetWrappedObjectAs()->CopySubresourceRegion1( + pDstResource, + DstSubresource, + DstX, + DstY, + DstZ, + pSrcResource, + SrcSubresource, + pSrcBox, + CopyFlags); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::UpdateSubresource1( + ID3D11Resource* pDstResource, + UINT DstSubresource, + const D3D11_BOX* pDstBox, + const void* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch, + UINT CopyFlags) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDstResource, + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch, + CopyFlags); + + GetWrappedObjectAs()->UpdateSubresource1( + encode::GetWrappedObject(pDstResource), + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch, + CopyFlags); + + Encode_ID3D11DeviceContext1_UpdateSubresource1( + this, + pDstResource, + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch, + CopyFlags); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDstResource, + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch, + CopyFlags); + } + else + { + GetWrappedObjectAs()->UpdateSubresource1( + pDstResource, + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch, + CopyFlags); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::DiscardResource( + ID3D11Resource* pResource) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource); + + GetWrappedObjectAs()->DiscardResource( + encode::GetWrappedObject(pResource)); + + Encode_ID3D11DeviceContext1_DiscardResource( + this, + pResource); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pResource); + } + else + { + GetWrappedObjectAs()->DiscardResource( + pResource); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::DiscardView( + ID3D11View* pResourceView) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResourceView); + + GetWrappedObjectAs()->DiscardView( + encode::GetWrappedObject(pResourceView)); + + Encode_ID3D11DeviceContext1_DiscardView( + this, + pResourceView); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pResourceView); + } + else + { + GetWrappedObjectAs()->DiscardView( + pResourceView); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::VSSetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->VSSetConstantBuffers1( + StartSlot, + NumBuffers, + UnwrapObjects(ppConstantBuffers, NumBuffers, unwrap_memory), + pFirstConstant, + pNumConstants); + + Encode_ID3D11DeviceContext1_VSSetConstantBuffers1( + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + else + { + GetWrappedObjectAs()->VSSetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::HSSetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->HSSetConstantBuffers1( + StartSlot, + NumBuffers, + UnwrapObjects(ppConstantBuffers, NumBuffers, unwrap_memory), + pFirstConstant, + pNumConstants); + + Encode_ID3D11DeviceContext1_HSSetConstantBuffers1( + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + else + { + GetWrappedObjectAs()->HSSetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::DSSetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->DSSetConstantBuffers1( + StartSlot, + NumBuffers, + UnwrapObjects(ppConstantBuffers, NumBuffers, unwrap_memory), + pFirstConstant, + pNumConstants); + + Encode_ID3D11DeviceContext1_DSSetConstantBuffers1( + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + else + { + GetWrappedObjectAs()->DSSetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::GSSetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->GSSetConstantBuffers1( + StartSlot, + NumBuffers, + UnwrapObjects(ppConstantBuffers, NumBuffers, unwrap_memory), + pFirstConstant, + pNumConstants); + + Encode_ID3D11DeviceContext1_GSSetConstantBuffers1( + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + else + { + GetWrappedObjectAs()->GSSetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::PSSetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->PSSetConstantBuffers1( + StartSlot, + NumBuffers, + UnwrapObjects(ppConstantBuffers, NumBuffers, unwrap_memory), + pFirstConstant, + pNumConstants); + + Encode_ID3D11DeviceContext1_PSSetConstantBuffers1( + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + else + { + GetWrappedObjectAs()->PSSetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::CSSetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->CSSetConstantBuffers1( + StartSlot, + NumBuffers, + UnwrapObjects(ppConstantBuffers, NumBuffers, unwrap_memory), + pFirstConstant, + pNumConstants); + + Encode_ID3D11DeviceContext1_CSSetConstantBuffers1( + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + else + { + GetWrappedObjectAs()->CSSetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::VSGetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + GetWrappedObjectAs()->VSGetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + WrapObjectArray(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), NumBuffers, nullptr); + + Encode_ID3D11DeviceContext1_VSGetConstantBuffers1( + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + else + { + GetWrappedObjectAs()->VSGetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::HSGetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + GetWrappedObjectAs()->HSGetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + WrapObjectArray(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), NumBuffers, nullptr); + + Encode_ID3D11DeviceContext1_HSGetConstantBuffers1( + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + else + { + GetWrappedObjectAs()->HSGetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::DSGetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + GetWrappedObjectAs()->DSGetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + WrapObjectArray(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), NumBuffers, nullptr); + + Encode_ID3D11DeviceContext1_DSGetConstantBuffers1( + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + else + { + GetWrappedObjectAs()->DSGetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::GSGetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + GetWrappedObjectAs()->GSGetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + WrapObjectArray(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), NumBuffers, nullptr); + + Encode_ID3D11DeviceContext1_GSGetConstantBuffers1( + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + else + { + GetWrappedObjectAs()->GSGetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::PSGetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + GetWrappedObjectAs()->PSGetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + WrapObjectArray(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), NumBuffers, nullptr); + + Encode_ID3D11DeviceContext1_PSGetConstantBuffers1( + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + else + { + GetWrappedObjectAs()->PSGetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::CSGetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + GetWrappedObjectAs()->CSGetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + WrapObjectArray(IID_ID3D11Buffer, reinterpret_cast(ppConstantBuffers), NumBuffers, nullptr); + + Encode_ID3D11DeviceContext1_CSGetConstantBuffers1( + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + + CustomWrapperPostCall::Dispatch( + manager, + this, + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + else + { + GetWrappedObjectAs()->CSGetConstantBuffers1( + StartSlot, + NumBuffers, + ppConstantBuffers, + pFirstConstant, + pNumConstants); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::SwapDeviceContextState( + ID3DDeviceContextState* pState, + ID3DDeviceContextState** ppPreviousState) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pState, + ppPreviousState); + + GetWrappedObjectAs()->SwapDeviceContextState( + encode::GetWrappedObject(pState), + ppPreviousState); + + WrapObject(IID_ID3DDeviceContextState, reinterpret_cast(ppPreviousState), nullptr); + + Encode_ID3D11DeviceContext1_SwapDeviceContextState( + this, + pState, + ppPreviousState); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pState, + ppPreviousState); + } + else + { + GetWrappedObjectAs()->SwapDeviceContextState( + pState, + ppPreviousState); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::ClearView( + ID3D11View* pView, + const FLOAT Color [4], + const D3D11_RECT* pRect, + UINT NumRects) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pView, + Color, + pRect, + NumRects); + + GetWrappedObjectAs()->ClearView( + encode::GetWrappedObject(pView), + Color, + pRect, + NumRects); + + Encode_ID3D11DeviceContext1_ClearView( + this, + pView, + Color, + pRect, + NumRects); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pView, + Color, + pRect, + NumRects); + } + else + { + GetWrappedObjectAs()->ClearView( + pView, + Color, + pRect, + NumRects); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext1_Wrapper::DiscardView1( + ID3D11View* pResourceView, + const D3D11_RECT* pRects, + UINT NumRects) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResourceView, + pRects, + NumRects); + + GetWrappedObjectAs()->DiscardView1( + encode::GetWrappedObject(pResourceView), + pRects, + NumRects); + + Encode_ID3D11DeviceContext1_DiscardView1( + this, + pResourceView, + pRects, + NumRects); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pResourceView, + pRects, + NumRects); + } + else + { + GetWrappedObjectAs()->DiscardView1( + pResourceView, + pRects, + NumRects); + } + + manager->DecrementCallScope(); +} + +ID3D11VideoContext1_Wrapper::ID3D11VideoContext1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11VideoContext_Wrapper(riid, object, resources, destructor) +{ +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext1_Wrapper::SubmitDecoderBuffers1( + ID3D11VideoDecoder* pDecoder, + UINT NumBuffers, + const D3D11_VIDEO_DECODER_BUFFER_DESC1* pBufferDesc) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDecoder, + NumBuffers, + pBufferDesc); + + result = GetWrappedObjectAs()->SubmitDecoderBuffers1( + encode::GetWrappedObject(pDecoder), + NumBuffers, + pBufferDesc); + + Encode_ID3D11VideoContext1_SubmitDecoderBuffers1( + this, + result, + pDecoder, + NumBuffers, + pBufferDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDecoder, + NumBuffers, + pBufferDesc); + } + else + { + result = GetWrappedObjectAs()->SubmitDecoderBuffers1( + pDecoder, + NumBuffers, + pBufferDesc); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext1_Wrapper::GetDataForNewHardwareKey( + ID3D11CryptoSession* pCryptoSession, + UINT PrivateInputSize, + const void* pPrivatInputData, + UINT64* pPrivateOutputData) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoSession, + PrivateInputSize, + pPrivatInputData, + pPrivateOutputData); + + result = GetWrappedObjectAs()->GetDataForNewHardwareKey( + encode::GetWrappedObject(pCryptoSession), + PrivateInputSize, + pPrivatInputData, + pPrivateOutputData); + + Encode_ID3D11VideoContext1_GetDataForNewHardwareKey( + this, + result, + pCryptoSession, + PrivateInputSize, + pPrivatInputData, + pPrivateOutputData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pCryptoSession, + PrivateInputSize, + pPrivatInputData, + pPrivateOutputData); + } + else + { + result = GetWrappedObjectAs()->GetDataForNewHardwareKey( + pCryptoSession, + PrivateInputSize, + pPrivatInputData, + pPrivateOutputData); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext1_Wrapper::CheckCryptoSessionStatus( + ID3D11CryptoSession* pCryptoSession, + D3D11_CRYPTO_SESSION_STATUS* pStatus) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoSession, + pStatus); + + result = GetWrappedObjectAs()->CheckCryptoSessionStatus( + encode::GetWrappedObject(pCryptoSession), + pStatus); + + Encode_ID3D11VideoContext1_CheckCryptoSessionStatus( + this, + result, + pCryptoSession, + pStatus); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pCryptoSession, + pStatus); + } + else + { + result = GetWrappedObjectAs()->CheckCryptoSessionStatus( + pCryptoSession, + pStatus); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext1_Wrapper::DecoderEnableDownsampling( + ID3D11VideoDecoder* pDecoder, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + const D3D11_VIDEO_SAMPLE_DESC* pOutputDesc, + UINT ReferenceFrameCount) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDecoder, + InputColorSpace, + pOutputDesc, + ReferenceFrameCount); + + result = GetWrappedObjectAs()->DecoderEnableDownsampling( + encode::GetWrappedObject(pDecoder), + InputColorSpace, + pOutputDesc, + ReferenceFrameCount); + + Encode_ID3D11VideoContext1_DecoderEnableDownsampling( + this, + result, + pDecoder, + InputColorSpace, + pOutputDesc, + ReferenceFrameCount); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDecoder, + InputColorSpace, + pOutputDesc, + ReferenceFrameCount); + } + else + { + result = GetWrappedObjectAs()->DecoderEnableDownsampling( + pDecoder, + InputColorSpace, + pOutputDesc, + ReferenceFrameCount); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext1_Wrapper::DecoderUpdateDownsampling( + ID3D11VideoDecoder* pDecoder, + const D3D11_VIDEO_SAMPLE_DESC* pOutputDesc) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDecoder, + pOutputDesc); + + result = GetWrappedObjectAs()->DecoderUpdateDownsampling( + encode::GetWrappedObject(pDecoder), + pOutputDesc); + + Encode_ID3D11VideoContext1_DecoderUpdateDownsampling( + this, + result, + pDecoder, + pOutputDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDecoder, + pOutputDesc); + } + else + { + result = GetWrappedObjectAs()->DecoderUpdateDownsampling( + pDecoder, + pOutputDesc); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11VideoContext1_Wrapper::VideoProcessorSetOutputColorSpace1( + ID3D11VideoProcessor* pVideoProcessor, + DXGI_COLOR_SPACE_TYPE ColorSpace) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + ColorSpace); + + GetWrappedObjectAs()->VideoProcessorSetOutputColorSpace1( + encode::GetWrappedObject(pVideoProcessor), + ColorSpace); + + Encode_ID3D11VideoContext1_VideoProcessorSetOutputColorSpace1( + this, + pVideoProcessor, + ColorSpace); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + ColorSpace); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetOutputColorSpace1( + pVideoProcessor, + ColorSpace); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext1_Wrapper::VideoProcessorSetOutputShaderUsage( + ID3D11VideoProcessor* pVideoProcessor, + BOOL ShaderUsage) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + ShaderUsage); + + GetWrappedObjectAs()->VideoProcessorSetOutputShaderUsage( + encode::GetWrappedObject(pVideoProcessor), + ShaderUsage); + + Encode_ID3D11VideoContext1_VideoProcessorSetOutputShaderUsage( + this, + pVideoProcessor, + ShaderUsage); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + ShaderUsage); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetOutputShaderUsage( + pVideoProcessor, + ShaderUsage); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext1_Wrapper::VideoProcessorGetOutputColorSpace1( + ID3D11VideoProcessor* pVideoProcessor, + DXGI_COLOR_SPACE_TYPE* pColorSpace) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + pColorSpace); + + GetWrappedObjectAs()->VideoProcessorGetOutputColorSpace1( + encode::GetWrappedObject(pVideoProcessor), + pColorSpace); + + Encode_ID3D11VideoContext1_VideoProcessorGetOutputColorSpace1( + this, + pVideoProcessor, + pColorSpace); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + pColorSpace); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetOutputColorSpace1( + pVideoProcessor, + pColorSpace); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext1_Wrapper::VideoProcessorGetOutputShaderUsage( + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pShaderUsage) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + pShaderUsage); + + GetWrappedObjectAs()->VideoProcessorGetOutputShaderUsage( + encode::GetWrappedObject(pVideoProcessor), + pShaderUsage); + + Encode_ID3D11VideoContext1_VideoProcessorGetOutputShaderUsage( + this, + pVideoProcessor, + pShaderUsage); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + pShaderUsage); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetOutputShaderUsage( + pVideoProcessor, + pShaderUsage); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext1_Wrapper::VideoProcessorSetStreamColorSpace1( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_COLOR_SPACE_TYPE ColorSpace) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + ColorSpace); + + GetWrappedObjectAs()->VideoProcessorSetStreamColorSpace1( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + ColorSpace); + + Encode_ID3D11VideoContext1_VideoProcessorSetStreamColorSpace1( + this, + pVideoProcessor, + StreamIndex, + ColorSpace); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + ColorSpace); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamColorSpace1( + pVideoProcessor, + StreamIndex, + ColorSpace); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext1_Wrapper::VideoProcessorSetStreamMirror( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + BOOL FlipHorizontal, + BOOL FlipVertical) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + FlipHorizontal, + FlipVertical); + + GetWrappedObjectAs()->VideoProcessorSetStreamMirror( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + Enable, + FlipHorizontal, + FlipVertical); + + Encode_ID3D11VideoContext1_VideoProcessorSetStreamMirror( + this, + pVideoProcessor, + StreamIndex, + Enable, + FlipHorizontal, + FlipVertical); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Enable, + FlipHorizontal, + FlipVertical); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamMirror( + pVideoProcessor, + StreamIndex, + Enable, + FlipHorizontal, + FlipVertical); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext1_Wrapper::VideoProcessorGetStreamColorSpace1( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_COLOR_SPACE_TYPE* pColorSpace) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pColorSpace); + + GetWrappedObjectAs()->VideoProcessorGetStreamColorSpace1( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pColorSpace); + + Encode_ID3D11VideoContext1_VideoProcessorGetStreamColorSpace1( + this, + pVideoProcessor, + StreamIndex, + pColorSpace); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pColorSpace); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamColorSpace1( + pVideoProcessor, + StreamIndex, + pColorSpace); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext1_Wrapper::VideoProcessorGetStreamMirror( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnable, + BOOL* pFlipHorizontal, + BOOL* pFlipVertical) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnable, + pFlipHorizontal, + pFlipVertical); + + GetWrappedObjectAs()->VideoProcessorGetStreamMirror( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pEnable, + pFlipHorizontal, + pFlipVertical); + + Encode_ID3D11VideoContext1_VideoProcessorGetStreamMirror( + this, + pVideoProcessor, + StreamIndex, + pEnable, + pFlipHorizontal, + pFlipVertical); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pEnable, + pFlipHorizontal, + pFlipVertical); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamMirror( + pVideoProcessor, + StreamIndex, + pEnable, + pFlipHorizontal, + pFlipVertical); + } + + manager->DecrementCallScope(); +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext1_Wrapper::VideoProcessorGetBehaviorHints( + ID3D11VideoProcessor* pVideoProcessor, + UINT OutputWidth, + UINT OutputHeight, + DXGI_FORMAT OutputFormat, + UINT StreamCount, + const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT* pStreams, + UINT* pBehaviorHints) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + OutputWidth, + OutputHeight, + OutputFormat, + StreamCount, + pStreams, + pBehaviorHints); + + result = GetWrappedObjectAs()->VideoProcessorGetBehaviorHints( + encode::GetWrappedObject(pVideoProcessor), + OutputWidth, + OutputHeight, + OutputFormat, + StreamCount, + pStreams, + pBehaviorHints); + + Encode_ID3D11VideoContext1_VideoProcessorGetBehaviorHints( + this, + result, + pVideoProcessor, + OutputWidth, + OutputHeight, + OutputFormat, + StreamCount, + pStreams, + pBehaviorHints); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pVideoProcessor, + OutputWidth, + OutputHeight, + OutputFormat, + StreamCount, + pStreams, + pBehaviorHints); + } + else + { + result = GetWrappedObjectAs()->VideoProcessorGetBehaviorHints( + pVideoProcessor, + OutputWidth, + OutputHeight, + OutputFormat, + StreamCount, + pStreams, + pBehaviorHints); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11VideoDevice1_Wrapper::ID3D11VideoDevice1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11VideoDevice_Wrapper(riid, object, resources, destructor) +{ +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice1_Wrapper::GetCryptoSessionPrivateDataSize( + const GUID* pCryptoType, + const GUID* pDecoderProfile, + const GUID* pKeyExchangeType, + UINT* pPrivateInputSize, + UINT* pPrivateOutputSize) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoType, + pDecoderProfile, + pKeyExchangeType, + pPrivateInputSize, + pPrivateOutputSize); + + result = GetWrappedObjectAs()->GetCryptoSessionPrivateDataSize( + pCryptoType, + pDecoderProfile, + pKeyExchangeType, + pPrivateInputSize, + pPrivateOutputSize); + + Encode_ID3D11VideoDevice1_GetCryptoSessionPrivateDataSize( + this, + result, + pCryptoType, + pDecoderProfile, + pKeyExchangeType, + pPrivateInputSize, + pPrivateOutputSize); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pCryptoType, + pDecoderProfile, + pKeyExchangeType, + pPrivateInputSize, + pPrivateOutputSize); + } + else + { + result = GetWrappedObjectAs()->GetCryptoSessionPrivateDataSize( + pCryptoType, + pDecoderProfile, + pKeyExchangeType, + pPrivateInputSize, + pPrivateOutputSize); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice1_Wrapper::GetVideoDecoderCaps( + const GUID* pDecoderProfile, + UINT SampleWidth, + UINT SampleHeight, + const DXGI_RATIONAL* pFrameRate, + UINT BitRate, + const GUID* pCryptoType, + UINT* pDecoderCaps) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDecoderProfile, + SampleWidth, + SampleHeight, + pFrameRate, + BitRate, + pCryptoType, + pDecoderCaps); + + result = GetWrappedObjectAs()->GetVideoDecoderCaps( + pDecoderProfile, + SampleWidth, + SampleHeight, + pFrameRate, + BitRate, + pCryptoType, + pDecoderCaps); + + Encode_ID3D11VideoDevice1_GetVideoDecoderCaps( + this, + result, + pDecoderProfile, + SampleWidth, + SampleHeight, + pFrameRate, + BitRate, + pCryptoType, + pDecoderCaps); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDecoderProfile, + SampleWidth, + SampleHeight, + pFrameRate, + BitRate, + pCryptoType, + pDecoderCaps); + } + else + { + result = GetWrappedObjectAs()->GetVideoDecoderCaps( + pDecoderProfile, + SampleWidth, + SampleHeight, + pFrameRate, + BitRate, + pCryptoType, + pDecoderCaps); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice1_Wrapper::CheckVideoDecoderDownsampling( + const D3D11_VIDEO_DECODER_DESC* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + const D3D11_VIDEO_DECODER_CONFIG* pInputConfig, + const DXGI_RATIONAL* pFrameRate, + const D3D11_VIDEO_SAMPLE_DESC* pOutputDesc, + BOOL* pSupported, + BOOL* pRealTimeHint) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pInputDesc, + InputColorSpace, + pInputConfig, + pFrameRate, + pOutputDesc, + pSupported, + pRealTimeHint); + + result = GetWrappedObjectAs()->CheckVideoDecoderDownsampling( + pInputDesc, + InputColorSpace, + pInputConfig, + pFrameRate, + pOutputDesc, + pSupported, + pRealTimeHint); + + Encode_ID3D11VideoDevice1_CheckVideoDecoderDownsampling( + this, + result, + pInputDesc, + InputColorSpace, + pInputConfig, + pFrameRate, + pOutputDesc, + pSupported, + pRealTimeHint); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pInputDesc, + InputColorSpace, + pInputConfig, + pFrameRate, + pOutputDesc, + pSupported, + pRealTimeHint); + } + else + { + result = GetWrappedObjectAs()->CheckVideoDecoderDownsampling( + pInputDesc, + InputColorSpace, + pInputConfig, + pFrameRate, + pOutputDesc, + pSupported, + pRealTimeHint); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice1_Wrapper::RecommendVideoDecoderDownsampleParameters( + const D3D11_VIDEO_DECODER_DESC* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + const D3D11_VIDEO_DECODER_CONFIG* pInputConfig, + const DXGI_RATIONAL* pFrameRate, + D3D11_VIDEO_SAMPLE_DESC* pRecommendedOutputDesc) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pInputDesc, + InputColorSpace, + pInputConfig, + pFrameRate, + pRecommendedOutputDesc); + + result = GetWrappedObjectAs()->RecommendVideoDecoderDownsampleParameters( + pInputDesc, + InputColorSpace, + pInputConfig, + pFrameRate, + pRecommendedOutputDesc); + + Encode_ID3D11VideoDevice1_RecommendVideoDecoderDownsampleParameters( + this, + result, + pInputDesc, + InputColorSpace, + pInputConfig, + pFrameRate, + pRecommendedOutputDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pInputDesc, + InputColorSpace, + pInputConfig, + pFrameRate, + pRecommendedOutputDesc); + } + else + { + result = GetWrappedObjectAs()->RecommendVideoDecoderDownsampleParameters( + pInputDesc, + InputColorSpace, + pInputConfig, + pFrameRate, + pRecommendedOutputDesc); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11VideoProcessorEnumerator1_Wrapper::ID3D11VideoProcessorEnumerator1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11VideoProcessorEnumerator_Wrapper(riid, object, resources, destructor) +{ +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoProcessorEnumerator1_Wrapper::CheckVideoProcessorFormatConversion( + DXGI_FORMAT InputFormat, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + DXGI_FORMAT OutputFormat, + DXGI_COLOR_SPACE_TYPE OutputColorSpace, + BOOL* pSupported) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + InputFormat, + InputColorSpace, + OutputFormat, + OutputColorSpace, + pSupported); + + result = GetWrappedObjectAs()->CheckVideoProcessorFormatConversion( + InputFormat, + InputColorSpace, + OutputFormat, + OutputColorSpace, + pSupported); + + Encode_ID3D11VideoProcessorEnumerator1_CheckVideoProcessorFormatConversion( + this, + result, + InputFormat, + InputColorSpace, + OutputFormat, + OutputColorSpace, + pSupported); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + InputFormat, + InputColorSpace, + OutputFormat, + OutputColorSpace, + pSupported); + } + else + { + result = GetWrappedObjectAs()->CheckVideoProcessorFormatConversion( + InputFormat, + InputColorSpace, + OutputFormat, + OutputColorSpace, + pSupported); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11Device1_Wrapper::ID3D11Device1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Device_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11Device1_Wrapper::GetImmediateContext1( + ID3D11DeviceContext1** ppImmediateContext) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppImmediateContext); + + GetWrappedObjectAs()->GetImmediateContext1( + ppImmediateContext); + + WrapObject(IID_ID3D11DeviceContext1, reinterpret_cast(ppImmediateContext), nullptr); + + Encode_ID3D11Device1_GetImmediateContext1( + this, + ppImmediateContext); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppImmediateContext); + } + else + { + GetWrappedObjectAs()->GetImmediateContext1( + ppImmediateContext); + } + + manager->DecrementCallScope(); +} + +HRESULT STDMETHODCALLTYPE ID3D11Device1_Wrapper::CreateDeferredContext1( + UINT ContextFlags, + ID3D11DeviceContext1** ppDeferredContext) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ContextFlags, + ppDeferredContext); + + result = GetWrappedObjectAs()->CreateDeferredContext1( + ContextFlags, + ppDeferredContext); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11DeviceContext1, reinterpret_cast(ppDeferredContext), nullptr); + } + + Encode_ID3D11Device1_CreateDeferredContext1( + this, + result, + ContextFlags, + ppDeferredContext); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + ContextFlags, + ppDeferredContext); + } + else + { + result = GetWrappedObjectAs()->CreateDeferredContext1( + ContextFlags, + ppDeferredContext); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device1_Wrapper::CreateBlendState1( + const D3D11_BLEND_DESC1* pBlendStateDesc, + ID3D11BlendState1** ppBlendState) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pBlendStateDesc, + ppBlendState); + + result = GetWrappedObjectAs()->CreateBlendState1( + pBlendStateDesc, + ppBlendState); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11BlendState1, reinterpret_cast(ppBlendState), nullptr); + } + + Encode_ID3D11Device1_CreateBlendState1( + this, + result, + pBlendStateDesc, + ppBlendState); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pBlendStateDesc, + ppBlendState); + } + else + { + result = GetWrappedObjectAs()->CreateBlendState1( + pBlendStateDesc, + ppBlendState); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device1_Wrapper::CreateRasterizerState1( + const D3D11_RASTERIZER_DESC1* pRasterizerDesc, + ID3D11RasterizerState1** ppRasterizerState) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pRasterizerDesc, + ppRasterizerState); + + result = GetWrappedObjectAs()->CreateRasterizerState1( + pRasterizerDesc, + ppRasterizerState); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11RasterizerState1, reinterpret_cast(ppRasterizerState), nullptr); + } + + Encode_ID3D11Device1_CreateRasterizerState1( + this, + result, + pRasterizerDesc, + ppRasterizerState); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pRasterizerDesc, + ppRasterizerState); + } + else + { + result = GetWrappedObjectAs()->CreateRasterizerState1( + pRasterizerDesc, + ppRasterizerState); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device1_Wrapper::CreateDeviceContextState( + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + REFIID EmulatedInterface, + D3D_FEATURE_LEVEL* pChosenFeatureLevel, + ID3DDeviceContextState** ppContextState) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + EmulatedInterface, + pChosenFeatureLevel, + ppContextState); + + result = GetWrappedObjectAs()->CreateDeviceContextState( + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + EmulatedInterface, + pChosenFeatureLevel, + ppContextState); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3DDeviceContextState, reinterpret_cast(ppContextState), nullptr); + } + + Encode_ID3D11Device1_CreateDeviceContextState( + this, + result, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + EmulatedInterface, + pChosenFeatureLevel, + ppContextState); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + EmulatedInterface, + pChosenFeatureLevel, + ppContextState); + } + else + { + result = GetWrappedObjectAs()->CreateDeviceContextState( + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + EmulatedInterface, + pChosenFeatureLevel, + ppContextState); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device1_Wrapper::OpenSharedResource1( + HANDLE hResource, + REFIID returnedInterface, + void** ppResource) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + hResource, + returnedInterface, + ppResource); + + result = GetWrappedObjectAs()->OpenSharedResource1( + hResource, + returnedInterface, + ppResource); + + if (SUCCEEDED(result)) + { + WrapObject(returnedInterface, ppResource, nullptr); + } + + Encode_ID3D11Device1_OpenSharedResource1( + this, + result, + hResource, + returnedInterface, + ppResource); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + hResource, + returnedInterface, + ppResource); + } + else + { + result = GetWrappedObjectAs()->OpenSharedResource1( + hResource, + returnedInterface, + ppResource); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device1_Wrapper::OpenSharedResourceByName( + LPCWSTR lpName, + DWORD dwDesiredAccess, + REFIID returnedInterface, + void** ppResource) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + lpName, + dwDesiredAccess, + returnedInterface, + ppResource); + + result = GetWrappedObjectAs()->OpenSharedResourceByName( + lpName, + dwDesiredAccess, + returnedInterface, + ppResource); + + if (SUCCEEDED(result)) + { + WrapObject(returnedInterface, ppResource, nullptr); + } + + Encode_ID3D11Device1_OpenSharedResourceByName( + this, + result, + lpName, + dwDesiredAccess, + returnedInterface, + ppResource); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + lpName, + dwDesiredAccess, + returnedInterface, + ppResource); + } + else + { + result = GetWrappedObjectAs()->OpenSharedResourceByName( + lpName, + dwDesiredAccess, + returnedInterface, + ppResource); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3DUserDefinedAnnotation_Wrapper::ID3DUserDefinedAnnotation_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : IUnknown_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3DUserDefinedAnnotation_Wrapper::~ID3DUserDefinedAnnotation_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3DUserDefinedAnnotation_Wrapper* ID3DUserDefinedAnnotation_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +INT STDMETHODCALLTYPE ID3DUserDefinedAnnotation_Wrapper::BeginEvent( + LPCWSTR Name) +{ + INT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + Name); + + result = GetWrappedObjectAs()->BeginEvent( + Name); + + Encode_ID3DUserDefinedAnnotation_BeginEvent( + this, + result, + Name); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + Name); + } + else + { + result = GetWrappedObjectAs()->BeginEvent( + Name); + } + + manager->DecrementCallScope(); + + return result; +} + +INT STDMETHODCALLTYPE ID3DUserDefinedAnnotation_Wrapper::EndEvent() +{ + INT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->EndEvent(); + + Encode_ID3DUserDefinedAnnotation_EndEvent( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->EndEvent(); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3DUserDefinedAnnotation_Wrapper::SetMarker( + LPCWSTR Name) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + Name); + + GetWrappedObjectAs()->SetMarker( + Name); + + Encode_ID3DUserDefinedAnnotation_SetMarker( + this, + Name); + + CustomWrapperPostCall::Dispatch( + manager, + this, + Name); + } + else + { + GetWrappedObjectAs()->SetMarker( + Name); + } + + manager->DecrementCallScope(); +} + +BOOL STDMETHODCALLTYPE ID3DUserDefinedAnnotation_Wrapper::GetStatus() +{ + BOOL result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->GetStatus(); + + Encode_ID3DUserDefinedAnnotation_GetStatus( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->GetStatus(); + } + + manager->DecrementCallScope(); + + return result; +} + + +/* +** This part is generated from d3d11_2.h in Windows SDK: 10.0.20348.0 +** +*/ + +ID3D11DeviceContext2_Wrapper::ID3D11DeviceContext2_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceContext1_Wrapper(riid, object, resources, destructor) +{ +} + +HRESULT STDMETHODCALLTYPE ID3D11DeviceContext2_Wrapper::UpdateTileMappings( + ID3D11Resource* pTiledResource, + UINT NumTiledResourceRegions, + const D3D11_TILED_RESOURCE_COORDINATE* pTiledResourceRegionStartCoordinates, + const D3D11_TILE_REGION_SIZE* pTiledResourceRegionSizes, + ID3D11Buffer* pTilePool, + UINT NumRanges, + const UINT* pRangeFlags, + const UINT* pTilePoolStartOffsets, + const UINT* pRangeTileCounts, + UINT Flags) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pTiledResource, + NumTiledResourceRegions, + pTiledResourceRegionStartCoordinates, + pTiledResourceRegionSizes, + pTilePool, + NumRanges, + pRangeFlags, + pTilePoolStartOffsets, + pRangeTileCounts, + Flags); + + result = GetWrappedObjectAs()->UpdateTileMappings( + encode::GetWrappedObject(pTiledResource), + NumTiledResourceRegions, + pTiledResourceRegionStartCoordinates, + pTiledResourceRegionSizes, + encode::GetWrappedObject(pTilePool), + NumRanges, + pRangeFlags, + pTilePoolStartOffsets, + pRangeTileCounts, + Flags); + + Encode_ID3D11DeviceContext2_UpdateTileMappings( + this, + result, + pTiledResource, + NumTiledResourceRegions, + pTiledResourceRegionStartCoordinates, + pTiledResourceRegionSizes, + pTilePool, + NumRanges, + pRangeFlags, + pTilePoolStartOffsets, + pRangeTileCounts, + Flags); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pTiledResource, + NumTiledResourceRegions, + pTiledResourceRegionStartCoordinates, + pTiledResourceRegionSizes, + pTilePool, + NumRanges, + pRangeFlags, + pTilePoolStartOffsets, + pRangeTileCounts, + Flags); + } + else + { + result = GetWrappedObjectAs()->UpdateTileMappings( + pTiledResource, + NumTiledResourceRegions, + pTiledResourceRegionStartCoordinates, + pTiledResourceRegionSizes, + pTilePool, + NumRanges, + pRangeFlags, + pTilePoolStartOffsets, + pRangeTileCounts, + Flags); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11DeviceContext2_Wrapper::CopyTileMappings( + ID3D11Resource* pDestTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pDestRegionStartCoordinate, + ID3D11Resource* pSourceTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pSourceRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE* pTileRegionSize, + UINT Flags) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDestTiledResource, + pDestRegionStartCoordinate, + pSourceTiledResource, + pSourceRegionStartCoordinate, + pTileRegionSize, + Flags); + + result = GetWrappedObjectAs()->CopyTileMappings( + encode::GetWrappedObject(pDestTiledResource), + pDestRegionStartCoordinate, + encode::GetWrappedObject(pSourceTiledResource), + pSourceRegionStartCoordinate, + pTileRegionSize, + Flags); + + Encode_ID3D11DeviceContext2_CopyTileMappings( + this, + result, + pDestTiledResource, + pDestRegionStartCoordinate, + pSourceTiledResource, + pSourceRegionStartCoordinate, + pTileRegionSize, + Flags); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDestTiledResource, + pDestRegionStartCoordinate, + pSourceTiledResource, + pSourceRegionStartCoordinate, + pTileRegionSize, + Flags); + } + else + { + result = GetWrappedObjectAs()->CopyTileMappings( + pDestTiledResource, + pDestRegionStartCoordinate, + pSourceTiledResource, + pSourceRegionStartCoordinate, + pTileRegionSize, + Flags); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11DeviceContext2_Wrapper::CopyTiles( + ID3D11Resource* pTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pTileRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE* pTileRegionSize, + ID3D11Buffer* pBuffer, + UINT64 BufferStartOffsetInBytes, + UINT Flags) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pTiledResource, + pTileRegionStartCoordinate, + pTileRegionSize, + pBuffer, + BufferStartOffsetInBytes, + Flags); + + GetWrappedObjectAs()->CopyTiles( + encode::GetWrappedObject(pTiledResource), + pTileRegionStartCoordinate, + pTileRegionSize, + encode::GetWrappedObject(pBuffer), + BufferStartOffsetInBytes, + Flags); + + Encode_ID3D11DeviceContext2_CopyTiles( + this, + pTiledResource, + pTileRegionStartCoordinate, + pTileRegionSize, + pBuffer, + BufferStartOffsetInBytes, + Flags); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pTiledResource, + pTileRegionStartCoordinate, + pTileRegionSize, + pBuffer, + BufferStartOffsetInBytes, + Flags); + } + else + { + GetWrappedObjectAs()->CopyTiles( + pTiledResource, + pTileRegionStartCoordinate, + pTileRegionSize, + pBuffer, + BufferStartOffsetInBytes, + Flags); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext2_Wrapper::UpdateTiles( + ID3D11Resource* pDestTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pDestTileRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE* pDestTileRegionSize, + const void* pSourceTileData, + UINT Flags) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDestTiledResource, + pDestTileRegionStartCoordinate, + pDestTileRegionSize, + pSourceTileData, + Flags); + + GetWrappedObjectAs()->UpdateTiles( + encode::GetWrappedObject(pDestTiledResource), + pDestTileRegionStartCoordinate, + pDestTileRegionSize, + pSourceTileData, + Flags); + + Encode_ID3D11DeviceContext2_UpdateTiles( + this, + pDestTiledResource, + pDestTileRegionStartCoordinate, + pDestTileRegionSize, + pSourceTileData, + Flags); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDestTiledResource, + pDestTileRegionStartCoordinate, + pDestTileRegionSize, + pSourceTileData, + Flags); + } + else + { + GetWrappedObjectAs()->UpdateTiles( + pDestTiledResource, + pDestTileRegionStartCoordinate, + pDestTileRegionSize, + pSourceTileData, + Flags); + } + + manager->DecrementCallScope(); +} + +HRESULT STDMETHODCALLTYPE ID3D11DeviceContext2_Wrapper::ResizeTilePool( + ID3D11Buffer* pTilePool, + UINT64 NewSizeInBytes) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pTilePool, + NewSizeInBytes); + + result = GetWrappedObjectAs()->ResizeTilePool( + encode::GetWrappedObject(pTilePool), + NewSizeInBytes); + + Encode_ID3D11DeviceContext2_ResizeTilePool( + this, + result, + pTilePool, + NewSizeInBytes); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pTilePool, + NewSizeInBytes); + } + else + { + result = GetWrappedObjectAs()->ResizeTilePool( + pTilePool, + NewSizeInBytes); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11DeviceContext2_Wrapper::TiledResourceBarrier( + ID3D11DeviceChild* pTiledResourceOrViewAccessBeforeBarrier, + ID3D11DeviceChild* pTiledResourceOrViewAccessAfterBarrier) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pTiledResourceOrViewAccessBeforeBarrier, + pTiledResourceOrViewAccessAfterBarrier); + + GetWrappedObjectAs()->TiledResourceBarrier( + encode::GetWrappedObject(pTiledResourceOrViewAccessBeforeBarrier), + encode::GetWrappedObject(pTiledResourceOrViewAccessAfterBarrier)); + + Encode_ID3D11DeviceContext2_TiledResourceBarrier( + this, + pTiledResourceOrViewAccessBeforeBarrier, + pTiledResourceOrViewAccessAfterBarrier); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pTiledResourceOrViewAccessBeforeBarrier, + pTiledResourceOrViewAccessAfterBarrier); + } + else + { + GetWrappedObjectAs()->TiledResourceBarrier( + pTiledResourceOrViewAccessBeforeBarrier, + pTiledResourceOrViewAccessAfterBarrier); + } + + manager->DecrementCallScope(); +} + +BOOL STDMETHODCALLTYPE ID3D11DeviceContext2_Wrapper::IsAnnotationEnabled() +{ + BOOL result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->IsAnnotationEnabled(); + + Encode_ID3D11DeviceContext2_IsAnnotationEnabled( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->IsAnnotationEnabled(); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11DeviceContext2_Wrapper::SetMarkerInt( + LPCWSTR pLabel, + INT Data) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pLabel, + Data); + + GetWrappedObjectAs()->SetMarkerInt( + pLabel, + Data); + + Encode_ID3D11DeviceContext2_SetMarkerInt( + this, + pLabel, + Data); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pLabel, + Data); + } + else + { + GetWrappedObjectAs()->SetMarkerInt( + pLabel, + Data); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext2_Wrapper::BeginEventInt( + LPCWSTR pLabel, + INT Data) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pLabel, + Data); + + GetWrappedObjectAs()->BeginEventInt( + pLabel, + Data); + + Encode_ID3D11DeviceContext2_BeginEventInt( + this, + pLabel, + Data); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pLabel, + Data); + } + else + { + GetWrappedObjectAs()->BeginEventInt( + pLabel, + Data); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext2_Wrapper::EndEvent() +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + GetWrappedObjectAs()->EndEvent(); + + Encode_ID3D11DeviceContext2_EndEvent( + this); + + CustomWrapperPostCall::Dispatch( + manager, + this); + } + else + { + GetWrappedObjectAs()->EndEvent(); + } + + manager->DecrementCallScope(); +} + +ID3D11Device2_Wrapper::ID3D11Device2_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Device1_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11Device2_Wrapper::GetImmediateContext2( + ID3D11DeviceContext2** ppImmediateContext) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppImmediateContext); + + GetWrappedObjectAs()->GetImmediateContext2( + ppImmediateContext); + + WrapObject(IID_ID3D11DeviceContext2, reinterpret_cast(ppImmediateContext), nullptr); + + Encode_ID3D11Device2_GetImmediateContext2( + this, + ppImmediateContext); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppImmediateContext); + } + else + { + GetWrappedObjectAs()->GetImmediateContext2( + ppImmediateContext); + } + + manager->DecrementCallScope(); +} + +HRESULT STDMETHODCALLTYPE ID3D11Device2_Wrapper::CreateDeferredContext2( + UINT ContextFlags, + ID3D11DeviceContext2** ppDeferredContext) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ContextFlags, + ppDeferredContext); + + result = GetWrappedObjectAs()->CreateDeferredContext2( + ContextFlags, + ppDeferredContext); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11DeviceContext2, reinterpret_cast(ppDeferredContext), nullptr); + } + + Encode_ID3D11Device2_CreateDeferredContext2( + this, + result, + ContextFlags, + ppDeferredContext); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + ContextFlags, + ppDeferredContext); + } + else + { + result = GetWrappedObjectAs()->CreateDeferredContext2( + ContextFlags, + ppDeferredContext); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11Device2_Wrapper::GetResourceTiling( + ID3D11Resource* pTiledResource, + UINT* pNumTilesForEntireResource, + D3D11_PACKED_MIP_DESC* pPackedMipDesc, + D3D11_TILE_SHAPE* pStandardTileShapeForNonPackedMips, + UINT* pNumSubresourceTilings, + UINT FirstSubresourceTilingToGet, + D3D11_SUBRESOURCE_TILING* pSubresourceTilingsForNonPackedMips) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pTiledResource, + pNumTilesForEntireResource, + pPackedMipDesc, + pStandardTileShapeForNonPackedMips, + pNumSubresourceTilings, + FirstSubresourceTilingToGet, + pSubresourceTilingsForNonPackedMips); + + GetWrappedObjectAs()->GetResourceTiling( + encode::GetWrappedObject(pTiledResource), + pNumTilesForEntireResource, + pPackedMipDesc, + pStandardTileShapeForNonPackedMips, + pNumSubresourceTilings, + FirstSubresourceTilingToGet, + pSubresourceTilingsForNonPackedMips); + + Encode_ID3D11Device2_GetResourceTiling( + this, + pTiledResource, + pNumTilesForEntireResource, + pPackedMipDesc, + pStandardTileShapeForNonPackedMips, + pNumSubresourceTilings, + FirstSubresourceTilingToGet, + pSubresourceTilingsForNonPackedMips); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pTiledResource, + pNumTilesForEntireResource, + pPackedMipDesc, + pStandardTileShapeForNonPackedMips, + pNumSubresourceTilings, + FirstSubresourceTilingToGet, + pSubresourceTilingsForNonPackedMips); + } + else + { + GetWrappedObjectAs()->GetResourceTiling( + pTiledResource, + pNumTilesForEntireResource, + pPackedMipDesc, + pStandardTileShapeForNonPackedMips, + pNumSubresourceTilings, + FirstSubresourceTilingToGet, + pSubresourceTilingsForNonPackedMips); + } + + manager->DecrementCallScope(); +} + +HRESULT STDMETHODCALLTYPE ID3D11Device2_Wrapper::CheckMultisampleQualityLevels1( + DXGI_FORMAT Format, + UINT SampleCount, + UINT Flags, + UINT* pNumQualityLevels) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + Format, + SampleCount, + Flags, + pNumQualityLevels); + + result = GetWrappedObjectAs()->CheckMultisampleQualityLevels1( + Format, + SampleCount, + Flags, + pNumQualityLevels); + + Encode_ID3D11Device2_CheckMultisampleQualityLevels1( + this, + result, + Format, + SampleCount, + Flags, + pNumQualityLevels); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + Format, + SampleCount, + Flags, + pNumQualityLevels); + } + else + { + result = GetWrappedObjectAs()->CheckMultisampleQualityLevels1( + Format, + SampleCount, + Flags, + pNumQualityLevels); + } + + manager->DecrementCallScope(); + + return result; +} + + +/* +** This part is generated from d3d11_3.h in Windows SDK: 10.0.20348.0 +** +*/ + +ID3D11Texture2D1_Wrapper::ID3D11Texture2D1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Texture2D_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11Texture2D1_Wrapper::GetDesc1( + D3D11_TEXTURE2D_DESC1* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc1( + pDesc); + + Encode_ID3D11Texture2D1_GetDesc1( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc1( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11Texture3D1_Wrapper::ID3D11Texture3D1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Texture3D_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11Texture3D1_Wrapper::GetDesc1( + D3D11_TEXTURE3D_DESC1* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc1( + pDesc); + + Encode_ID3D11Texture3D1_GetDesc1( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc1( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11RasterizerState2_Wrapper::ID3D11RasterizerState2_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11RasterizerState1_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11RasterizerState2_Wrapper::GetDesc2( + D3D11_RASTERIZER_DESC2* pDesc) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc); + + GetWrappedObjectAs()->GetDesc2( + pDesc); + + Encode_ID3D11RasterizerState2_GetDesc2( + this, + pDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc); + } + else + { + GetWrappedObjectAs()->GetDesc2( + pDesc); + } + + manager->DecrementCallScope(); +} + +ID3D11ShaderResourceView1_Wrapper::ID3D11ShaderResourceView1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11ShaderResourceView_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11ShaderResourceView1_Wrapper::GetDesc1( + D3D11_SHADER_RESOURCE_VIEW_DESC1* pDesc1) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc1); + + GetWrappedObjectAs()->GetDesc1( + pDesc1); + + Encode_ID3D11ShaderResourceView1_GetDesc1( + this, + pDesc1); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc1); + } + else + { + GetWrappedObjectAs()->GetDesc1( + pDesc1); + } + + manager->DecrementCallScope(); +} + +ID3D11RenderTargetView1_Wrapper::ID3D11RenderTargetView1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11RenderTargetView_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11RenderTargetView1_Wrapper::GetDesc1( + D3D11_RENDER_TARGET_VIEW_DESC1* pDesc1) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc1); + + GetWrappedObjectAs()->GetDesc1( + pDesc1); + + Encode_ID3D11RenderTargetView1_GetDesc1( + this, + pDesc1); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc1); + } + else + { + GetWrappedObjectAs()->GetDesc1( + pDesc1); + } + + manager->DecrementCallScope(); +} + +ID3D11UnorderedAccessView1_Wrapper::ID3D11UnorderedAccessView1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11UnorderedAccessView_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11UnorderedAccessView1_Wrapper::GetDesc1( + D3D11_UNORDERED_ACCESS_VIEW_DESC1* pDesc1) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc1); + + GetWrappedObjectAs()->GetDesc1( + pDesc1); + + Encode_ID3D11UnorderedAccessView1_GetDesc1( + this, + pDesc1); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc1); + } + else + { + GetWrappedObjectAs()->GetDesc1( + pDesc1); + } + + manager->DecrementCallScope(); +} + +ID3D11Query1_Wrapper::ID3D11Query1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Query_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11Query1_Wrapper::GetDesc1( + D3D11_QUERY_DESC1* pDesc1) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc1); + + GetWrappedObjectAs()->GetDesc1( + pDesc1); + + Encode_ID3D11Query1_GetDesc1( + this, + pDesc1); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDesc1); + } + else + { + GetWrappedObjectAs()->GetDesc1( + pDesc1); + } + + manager->DecrementCallScope(); +} + +ID3D11DeviceContext3_Wrapper::ID3D11DeviceContext3_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceContext2_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11DeviceContext3_Wrapper::Flush1( + D3D11_CONTEXT_TYPE ContextType, + HANDLE hEvent) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ContextType, + hEvent); + + GetWrappedObjectAs()->Flush1( + ContextType, + hEvent); + + Encode_ID3D11DeviceContext3_Flush1( + this, + ContextType, + hEvent); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ContextType, + hEvent); + } + else + { + GetWrappedObjectAs()->Flush1( + ContextType, + hEvent); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext3_Wrapper::SetHardwareProtectionState( + BOOL HwProtectionEnable) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + HwProtectionEnable); + + GetWrappedObjectAs()->SetHardwareProtectionState( + HwProtectionEnable); + + Encode_ID3D11DeviceContext3_SetHardwareProtectionState( + this, + HwProtectionEnable); + + CustomWrapperPostCall::Dispatch( + manager, + this, + HwProtectionEnable); + } + else + { + GetWrappedObjectAs()->SetHardwareProtectionState( + HwProtectionEnable); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11DeviceContext3_Wrapper::GetHardwareProtectionState( + BOOL* pHwProtectionEnable) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pHwProtectionEnable); + + GetWrappedObjectAs()->GetHardwareProtectionState( + pHwProtectionEnable); + + Encode_ID3D11DeviceContext3_GetHardwareProtectionState( + this, + pHwProtectionEnable); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pHwProtectionEnable); + } + else + { + GetWrappedObjectAs()->GetHardwareProtectionState( + pHwProtectionEnable); + } + + manager->DecrementCallScope(); +} + +ID3D11Fence_Wrapper::ID3D11Fence_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceChild_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11Fence_Wrapper::~ID3D11Fence_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11Fence_Wrapper* ID3D11Fence_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +HRESULT STDMETHODCALLTYPE ID3D11Fence_Wrapper::CreateSharedHandle( + const SECURITY_ATTRIBUTES* pAttributes, + DWORD dwAccess, + LPCWSTR lpName, + HANDLE* pHandle) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pAttributes, + dwAccess, + lpName, + pHandle); + + result = GetWrappedObjectAs()->CreateSharedHandle( + pAttributes, + dwAccess, + lpName, + pHandle); + + Encode_ID3D11Fence_CreateSharedHandle( + this, + result, + pAttributes, + dwAccess, + lpName, + pHandle); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pAttributes, + dwAccess, + lpName, + pHandle); + } + else + { + result = GetWrappedObjectAs()->CreateSharedHandle( + pAttributes, + dwAccess, + lpName, + pHandle); + } + + manager->DecrementCallScope(); + + return result; +} + +UINT64 STDMETHODCALLTYPE ID3D11Fence_Wrapper::GetCompletedValue() +{ + UINT64 result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->GetCompletedValue(); + + Encode_ID3D11Fence_GetCompletedValue( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->GetCompletedValue(); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Fence_Wrapper::SetEventOnCompletion( + UINT64 Value, + HANDLE hEvent) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + Value, + hEvent); + + result = GetWrappedObjectAs()->SetEventOnCompletion( + Value, + hEvent); + + Encode_ID3D11Fence_SetEventOnCompletion( + this, + result, + Value, + hEvent); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + Value, + hEvent); + } + else + { + result = GetWrappedObjectAs()->SetEventOnCompletion( + Value, + hEvent); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11DeviceContext4_Wrapper::ID3D11DeviceContext4_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11DeviceContext3_Wrapper(riid, object, resources, destructor) +{ +} + +HRESULT STDMETHODCALLTYPE ID3D11DeviceContext4_Wrapper::Signal( + ID3D11Fence* pFence, + UINT64 Value) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pFence, + Value); + + result = GetWrappedObjectAs()->Signal( + encode::GetWrappedObject(pFence), + Value); + + Encode_ID3D11DeviceContext4_Signal( + this, + result, + pFence, + Value); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pFence, + Value); + } + else + { + result = GetWrappedObjectAs()->Signal( + pFence, + Value); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11DeviceContext4_Wrapper::Wait( + ID3D11Fence* pFence, + UINT64 Value) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pFence, + Value); + + result = GetWrappedObjectAs()->Wait( + encode::GetWrappedObject(pFence), + Value); + + Encode_ID3D11DeviceContext4_Wait( + this, + result, + pFence, + Value); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pFence, + Value); + } + else + { + result = GetWrappedObjectAs()->Wait( + pFence, + Value); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11Device3_Wrapper::ID3D11Device3_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Device2_Wrapper(riid, object, resources, destructor) +{ +} + +HRESULT STDMETHODCALLTYPE ID3D11Device3_Wrapper::CreateTexture2D1( + const D3D11_TEXTURE2D_DESC1* pDesc1, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture2D1** ppTexture2D) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc1, + pInitialData, + ppTexture2D); + + result = GetWrappedObjectAs()->CreateTexture2D1( + pDesc1, + pInitialData, + ppTexture2D); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11Texture2D1, reinterpret_cast(ppTexture2D), nullptr); + } + + Encode_ID3D11Device3_CreateTexture2D1( + this, + result, + pDesc1, + pInitialData, + ppTexture2D); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDesc1, + pInitialData, + ppTexture2D); + } + else + { + result = GetWrappedObjectAs()->CreateTexture2D1( + pDesc1, + pInitialData, + ppTexture2D); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device3_Wrapper::CreateTexture3D1( + const D3D11_TEXTURE3D_DESC1* pDesc1, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture3D1** ppTexture3D) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDesc1, + pInitialData, + ppTexture3D); + + result = GetWrappedObjectAs()->CreateTexture3D1( + pDesc1, + pInitialData, + ppTexture3D); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11Texture3D1, reinterpret_cast(ppTexture3D), nullptr); + } + + Encode_ID3D11Device3_CreateTexture3D1( + this, + result, + pDesc1, + pInitialData, + ppTexture3D); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDesc1, + pInitialData, + ppTexture3D); + } + else + { + result = GetWrappedObjectAs()->CreateTexture3D1( + pDesc1, + pInitialData, + ppTexture3D); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device3_Wrapper::CreateRasterizerState2( + const D3D11_RASTERIZER_DESC2* pRasterizerDesc, + ID3D11RasterizerState2** ppRasterizerState) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pRasterizerDesc, + ppRasterizerState); + + result = GetWrappedObjectAs()->CreateRasterizerState2( + pRasterizerDesc, + ppRasterizerState); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11RasterizerState2, reinterpret_cast(ppRasterizerState), nullptr); + } + + Encode_ID3D11Device3_CreateRasterizerState2( + this, + result, + pRasterizerDesc, + ppRasterizerState); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pRasterizerDesc, + ppRasterizerState); + } + else + { + result = GetWrappedObjectAs()->CreateRasterizerState2( + pRasterizerDesc, + ppRasterizerState); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device3_Wrapper::CreateShaderResourceView1( + ID3D11Resource* pResource, + const D3D11_SHADER_RESOURCE_VIEW_DESC1* pDesc1, + ID3D11ShaderResourceView1** ppSRView1) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource, + pDesc1, + ppSRView1); + + result = GetWrappedObjectAs()->CreateShaderResourceView1( + encode::GetWrappedObject(pResource), + pDesc1, + ppSRView1); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11ShaderResourceView1, reinterpret_cast(ppSRView1), nullptr); + } + + Encode_ID3D11Device3_CreateShaderResourceView1( + this, + result, + pResource, + pDesc1, + ppSRView1); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource, + pDesc1, + ppSRView1); + } + else + { + result = GetWrappedObjectAs()->CreateShaderResourceView1( + pResource, + pDesc1, + ppSRView1); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device3_Wrapper::CreateUnorderedAccessView1( + ID3D11Resource* pResource, + const D3D11_UNORDERED_ACCESS_VIEW_DESC1* pDesc1, + ID3D11UnorderedAccessView1** ppUAView1) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource, + pDesc1, + ppUAView1); + + result = GetWrappedObjectAs()->CreateUnorderedAccessView1( + encode::GetWrappedObject(pResource), + pDesc1, + ppUAView1); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11UnorderedAccessView1, reinterpret_cast(ppUAView1), nullptr); + } + + Encode_ID3D11Device3_CreateUnorderedAccessView1( + this, + result, + pResource, + pDesc1, + ppUAView1); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource, + pDesc1, + ppUAView1); + } + else + { + result = GetWrappedObjectAs()->CreateUnorderedAccessView1( + pResource, + pDesc1, + ppUAView1); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device3_Wrapper::CreateRenderTargetView1( + ID3D11Resource* pResource, + const D3D11_RENDER_TARGET_VIEW_DESC1* pDesc1, + ID3D11RenderTargetView1** ppRTView1) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource, + pDesc1, + ppRTView1); + + result = GetWrappedObjectAs()->CreateRenderTargetView1( + encode::GetWrappedObject(pResource), + pDesc1, + ppRTView1); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11RenderTargetView1, reinterpret_cast(ppRTView1), nullptr); + } + + Encode_ID3D11Device3_CreateRenderTargetView1( + this, + result, + pResource, + pDesc1, + ppRTView1); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource, + pDesc1, + ppRTView1); + } + else + { + result = GetWrappedObjectAs()->CreateRenderTargetView1( + pResource, + pDesc1, + ppRTView1); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device3_Wrapper::CreateQuery1( + const D3D11_QUERY_DESC1* pQueryDesc1, + ID3D11Query1** ppQuery1) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pQueryDesc1, + ppQuery1); + + result = GetWrappedObjectAs()->CreateQuery1( + pQueryDesc1, + ppQuery1); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11Query1, reinterpret_cast(ppQuery1), nullptr); + } + + Encode_ID3D11Device3_CreateQuery1( + this, + result, + pQueryDesc1, + ppQuery1); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pQueryDesc1, + ppQuery1); + } + else + { + result = GetWrappedObjectAs()->CreateQuery1( + pQueryDesc1, + ppQuery1); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11Device3_Wrapper::GetImmediateContext3( + ID3D11DeviceContext3** ppImmediateContext) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppImmediateContext); + + GetWrappedObjectAs()->GetImmediateContext3( + ppImmediateContext); + + WrapObject(IID_ID3D11DeviceContext3, reinterpret_cast(ppImmediateContext), nullptr); + + Encode_ID3D11Device3_GetImmediateContext3( + this, + ppImmediateContext); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppImmediateContext); + } + else + { + GetWrappedObjectAs()->GetImmediateContext3( + ppImmediateContext); + } + + manager->DecrementCallScope(); +} + +HRESULT STDMETHODCALLTYPE ID3D11Device3_Wrapper::CreateDeferredContext3( + UINT ContextFlags, + ID3D11DeviceContext3** ppDeferredContext) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ContextFlags, + ppDeferredContext); + + result = GetWrappedObjectAs()->CreateDeferredContext3( + ContextFlags, + ppDeferredContext); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11DeviceContext3, reinterpret_cast(ppDeferredContext), nullptr); + } + + Encode_ID3D11Device3_CreateDeferredContext3( + this, + result, + ContextFlags, + ppDeferredContext); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + ContextFlags, + ppDeferredContext); + } + else + { + result = GetWrappedObjectAs()->CreateDeferredContext3( + ContextFlags, + ppDeferredContext); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11Device3_Wrapper::WriteToSubresource( + ID3D11Resource* pDstResource, + UINT DstSubresource, + const D3D11_BOX* pDstBox, + const void* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDstResource, + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch); + + GetWrappedObjectAs()->WriteToSubresource( + encode::GetWrappedObject(pDstResource), + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch); + + Encode_ID3D11Device3_WriteToSubresource( + this, + pDstResource, + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDstResource, + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch); + } + else + { + GetWrappedObjectAs()->WriteToSubresource( + pDstResource, + DstSubresource, + pDstBox, + pSrcData, + SrcRowPitch, + SrcDepthPitch); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11Device3_Wrapper::ReadFromSubresource( + void* pDstData, + UINT DstRowPitch, + UINT DstDepthPitch, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + const D3D11_BOX* pSrcBox) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDstData, + DstRowPitch, + DstDepthPitch, + pSrcResource, + SrcSubresource, + pSrcBox); + + GetWrappedObjectAs()->ReadFromSubresource( + pDstData, + DstRowPitch, + DstDepthPitch, + encode::GetWrappedObject(pSrcResource), + SrcSubresource, + pSrcBox); + + Encode_ID3D11Device3_ReadFromSubresource( + this, + pDstData, + DstRowPitch, + DstDepthPitch, + pSrcResource, + SrcSubresource, + pSrcBox); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pDstData, + DstRowPitch, + DstDepthPitch, + pSrcResource, + SrcSubresource, + pSrcBox); + } + else + { + GetWrappedObjectAs()->ReadFromSubresource( + pDstData, + DstRowPitch, + DstDepthPitch, + pSrcResource, + SrcSubresource, + pSrcBox); + } + + manager->DecrementCallScope(); +} + + +/* +** This part is generated from d3d11_4.h in Windows SDK: 10.0.20348.0 +** +*/ + +ID3D11Device4_Wrapper::ID3D11Device4_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Device3_Wrapper(riid, object, resources, destructor) +{ +} + +HRESULT STDMETHODCALLTYPE ID3D11Device4_Wrapper::RegisterDeviceRemovedEvent( + HANDLE hEvent, + DWORD* pdwCookie) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + hEvent, + pdwCookie); + + result = GetWrappedObjectAs()->RegisterDeviceRemovedEvent( + hEvent, + pdwCookie); + + Encode_ID3D11Device4_RegisterDeviceRemovedEvent( + this, + result, + hEvent, + pdwCookie); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + hEvent, + pdwCookie); + } + else + { + result = GetWrappedObjectAs()->RegisterDeviceRemovedEvent( + hEvent, + pdwCookie); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11Device4_Wrapper::UnregisterDeviceRemoved( + DWORD dwCookie) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + dwCookie); + + GetWrappedObjectAs()->UnregisterDeviceRemoved( + dwCookie); + + Encode_ID3D11Device4_UnregisterDeviceRemoved( + this, + dwCookie); + + CustomWrapperPostCall::Dispatch( + manager, + this, + dwCookie); + } + else + { + GetWrappedObjectAs()->UnregisterDeviceRemoved( + dwCookie); + } + + manager->DecrementCallScope(); +} + +ID3D11Device5_Wrapper::ID3D11Device5_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11Device4_Wrapper(riid, object, resources, destructor) +{ +} + +HRESULT STDMETHODCALLTYPE ID3D11Device5_Wrapper::OpenSharedFence( + HANDLE hFence, + REFIID ReturnedInterface, + void** ppFence) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + hFence, + ReturnedInterface, + ppFence); + + result = GetWrappedObjectAs()->OpenSharedFence( + hFence, + ReturnedInterface, + ppFence); + + if (SUCCEEDED(result)) + { + WrapObject(ReturnedInterface, ppFence, nullptr); + } + + Encode_ID3D11Device5_OpenSharedFence( + this, + result, + hFence, + ReturnedInterface, + ppFence); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + hFence, + ReturnedInterface, + ppFence); + } + else + { + result = GetWrappedObjectAs()->OpenSharedFence( + hFence, + ReturnedInterface, + ppFence); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11Device5_Wrapper::CreateFence( + UINT64 InitialValue, + D3D11_FENCE_FLAG Flags, + REFIID ReturnedInterface, + void** ppFence) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + InitialValue, + Flags, + ReturnedInterface, + ppFence); + + result = GetWrappedObjectAs()->CreateFence( + InitialValue, + Flags, + ReturnedInterface, + ppFence); + + if (SUCCEEDED(result)) + { + WrapObject(ReturnedInterface, ppFence, nullptr); + } + + Encode_ID3D11Device5_CreateFence( + this, + result, + InitialValue, + Flags, + ReturnedInterface, + ppFence); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + InitialValue, + Flags, + ReturnedInterface, + ppFence); + } + else + { + result = GetWrappedObjectAs()->CreateFence( + InitialValue, + Flags, + ReturnedInterface, + ppFence); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11Multithread_Wrapper::ID3D11Multithread_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : IUnknown_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11Multithread_Wrapper::~ID3D11Multithread_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11Multithread_Wrapper* ID3D11Multithread_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +void STDMETHODCALLTYPE ID3D11Multithread_Wrapper::Enter() +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + GetWrappedObjectAs()->Enter(); + + Encode_ID3D11Multithread_Enter( + this); + + CustomWrapperPostCall::Dispatch( + manager, + this); + } + else + { + GetWrappedObjectAs()->Enter(); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11Multithread_Wrapper::Leave() +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + GetWrappedObjectAs()->Leave(); + + Encode_ID3D11Multithread_Leave( + this); + + CustomWrapperPostCall::Dispatch( + manager, + this); + } + else + { + GetWrappedObjectAs()->Leave(); + } + + manager->DecrementCallScope(); +} + +BOOL STDMETHODCALLTYPE ID3D11Multithread_Wrapper::SetMultithreadProtected( + BOOL bMTProtect) +{ + BOOL result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + bMTProtect); + + result = GetWrappedObjectAs()->SetMultithreadProtected( + bMTProtect); + + Encode_ID3D11Multithread_SetMultithreadProtected( + this, + result, + bMTProtect); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + bMTProtect); + } + else + { + result = GetWrappedObjectAs()->SetMultithreadProtected( + bMTProtect); + } + + manager->DecrementCallScope(); + + return result; +} + +BOOL STDMETHODCALLTYPE ID3D11Multithread_Wrapper::GetMultithreadProtected() +{ + BOOL result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this); + + result = GetWrappedObjectAs()->GetMultithreadProtected(); + + Encode_ID3D11Multithread_GetMultithreadProtected( + this, + result); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result); + } + else + { + result = GetWrappedObjectAs()->GetMultithreadProtected(); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11VideoContext2_Wrapper::ID3D11VideoContext2_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11VideoContext1_Wrapper(riid, object, resources, destructor) +{ +} + +void STDMETHODCALLTYPE ID3D11VideoContext2_Wrapper::VideoProcessorSetOutputHDRMetaData( + ID3D11VideoProcessor* pVideoProcessor, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + const void* pHDRMetaData) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + Type, + Size, + pHDRMetaData); + + GetWrappedObjectAs()->VideoProcessorSetOutputHDRMetaData( + encode::GetWrappedObject(pVideoProcessor), + Type, + Size, + pHDRMetaData); + + Encode_ID3D11VideoContext2_VideoProcessorSetOutputHDRMetaData( + this, + pVideoProcessor, + Type, + Size, + pHDRMetaData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + Type, + Size, + pHDRMetaData); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetOutputHDRMetaData( + pVideoProcessor, + Type, + Size, + pHDRMetaData); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext2_Wrapper::VideoProcessorGetOutputHDRMetaData( + ID3D11VideoProcessor* pVideoProcessor, + DXGI_HDR_METADATA_TYPE* pType, + UINT Size, + void* pMetaData) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + pType, + Size, + pMetaData); + + GetWrappedObjectAs()->VideoProcessorGetOutputHDRMetaData( + encode::GetWrappedObject(pVideoProcessor), + pType, + Size, + pMetaData); + + Encode_ID3D11VideoContext2_VideoProcessorGetOutputHDRMetaData( + this, + pVideoProcessor, + pType, + Size, + pMetaData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + pType, + Size, + pMetaData); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetOutputHDRMetaData( + pVideoProcessor, + pType, + Size, + pMetaData); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext2_Wrapper::VideoProcessorSetStreamHDRMetaData( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + const void* pHDRMetaData) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Type, + Size, + pHDRMetaData); + + GetWrappedObjectAs()->VideoProcessorSetStreamHDRMetaData( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + Type, + Size, + pHDRMetaData); + + Encode_ID3D11VideoContext2_VideoProcessorSetStreamHDRMetaData( + this, + pVideoProcessor, + StreamIndex, + Type, + Size, + pHDRMetaData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + Type, + Size, + pHDRMetaData); + } + else + { + GetWrappedObjectAs()->VideoProcessorSetStreamHDRMetaData( + pVideoProcessor, + StreamIndex, + Type, + Size, + pHDRMetaData); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11VideoContext2_Wrapper::VideoProcessorGetStreamHDRMetaData( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_HDR_METADATA_TYPE* pType, + UINT Size, + void* pMetaData) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pType, + Size, + pMetaData); + + GetWrappedObjectAs()->VideoProcessorGetStreamHDRMetaData( + encode::GetWrappedObject(pVideoProcessor), + StreamIndex, + pType, + Size, + pMetaData); + + Encode_ID3D11VideoContext2_VideoProcessorGetStreamHDRMetaData( + this, + pVideoProcessor, + StreamIndex, + pType, + Size, + pMetaData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + pVideoProcessor, + StreamIndex, + pType, + Size, + pMetaData); + } + else + { + GetWrappedObjectAs()->VideoProcessorGetStreamHDRMetaData( + pVideoProcessor, + StreamIndex, + pType, + Size, + pMetaData); + } + + manager->DecrementCallScope(); +} + +ID3D11VideoDevice2_Wrapper::ID3D11VideoDevice2_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11VideoDevice1_Wrapper(riid, object, resources, destructor) +{ +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice2_Wrapper::CheckFeatureSupport( + D3D11_FEATURE_VIDEO Feature, + void* pFeatureSupportData, + UINT FeatureSupportDataSize) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + Feature, + pFeatureSupportData, + FeatureSupportDataSize); + + result = GetWrappedObjectAs()->CheckFeatureSupport( + Feature, + pFeatureSupportData, + FeatureSupportDataSize); + + Encode_ID3D11VideoDevice2_CheckFeatureSupport( + this, + result, + Feature, + pFeatureSupportData, + FeatureSupportDataSize); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + Feature, + pFeatureSupportData, + FeatureSupportDataSize); + } + else + { + result = GetWrappedObjectAs()->CheckFeatureSupport( + Feature, + pFeatureSupportData, + FeatureSupportDataSize); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoDevice2_Wrapper::NegotiateCryptoSessionKeyExchangeMT( + ID3D11CryptoSession* pCryptoSession, + D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS flags, + UINT DataSize, + void* pData) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pCryptoSession, + flags, + DataSize, + pData); + + result = GetWrappedObjectAs()->NegotiateCryptoSessionKeyExchangeMT( + encode::GetWrappedObject(pCryptoSession), + flags, + DataSize, + pData); + + Encode_ID3D11VideoDevice2_NegotiateCryptoSessionKeyExchangeMT( + this, + result, + pCryptoSession, + flags, + DataSize, + pData); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pCryptoSession, + flags, + DataSize, + pData); + } + else + { + result = GetWrappedObjectAs()->NegotiateCryptoSessionKeyExchangeMT( + pCryptoSession, + flags, + DataSize, + pData); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11VideoContext3_Wrapper::ID3D11VideoContext3_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11VideoContext2_Wrapper(riid, object, resources, destructor) +{ +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext3_Wrapper::DecoderBeginFrame1( + ID3D11VideoDecoder* pDecoder, + ID3D11VideoDecoderOutputView* pView, + UINT ContentKeySize, + const void* pContentKey, + UINT NumComponentHistograms, + const UINT* pHistogramOffsets, + ID3D11Buffer* const* ppHistogramBuffers) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDecoder, + pView, + ContentKeySize, + pContentKey, + NumComponentHistograms, + pHistogramOffsets, + ppHistogramBuffers); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + result = GetWrappedObjectAs()->DecoderBeginFrame1( + encode::GetWrappedObject(pDecoder), + encode::GetWrappedObject(pView), + ContentKeySize, + pContentKey, + NumComponentHistograms, + pHistogramOffsets, + UnwrapObjects(ppHistogramBuffers, NumComponentHistograms, unwrap_memory)); + + Encode_ID3D11VideoContext3_DecoderBeginFrame1( + this, + result, + pDecoder, + pView, + ContentKeySize, + pContentKey, + NumComponentHistograms, + pHistogramOffsets, + ppHistogramBuffers); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDecoder, + pView, + ContentKeySize, + pContentKey, + NumComponentHistograms, + pHistogramOffsets, + ppHistogramBuffers); + } + else + { + result = GetWrappedObjectAs()->DecoderBeginFrame1( + pDecoder, + pView, + ContentKeySize, + pContentKey, + NumComponentHistograms, + pHistogramOffsets, + ppHistogramBuffers); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11VideoContext3_Wrapper::SubmitDecoderBuffers2( + ID3D11VideoDecoder* pDecoder, + UINT NumBuffers, + const D3D11_VIDEO_DECODER_BUFFER_DESC2* pBufferDesc) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pDecoder, + NumBuffers, + pBufferDesc); + + result = GetWrappedObjectAs()->SubmitDecoderBuffers2( + encode::GetWrappedObject(pDecoder), + NumBuffers, + pBufferDesc); + + Encode_ID3D11VideoContext3_SubmitDecoderBuffers2( + this, + result, + pDecoder, + NumBuffers, + pBufferDesc); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pDecoder, + NumBuffers, + pBufferDesc); + } + else + { + result = GetWrappedObjectAs()->SubmitDecoderBuffers2( + pDecoder, + NumBuffers, + pBufferDesc); + } + + manager->DecrementCallScope(); + + return result; +} + + +/* +** This part is generated from d3d11on12.h in Windows SDK: 10.0.20348.0 +** +*/ + +HRESULT WINAPI D3D11On12CreateDevice( + IUnknown* pDevice, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + IUnknown* const* ppCommandQueues, + UINT NumQueues, + UINT NodeMask, + ID3D11Device** ppDevice, + ID3D11DeviceContext** ppImmediateContext, + D3D_FEATURE_LEVEL* pChosenFeatureLevel) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + pDevice, + Flags, + pFeatureLevels, + FeatureLevels, + ppCommandQueues, + NumQueues, + NodeMask, + ppDevice, + ppImmediateContext, + pChosenFeatureLevel); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + result = manager->GetD3D11DispatchTable().D3D11On12CreateDevice( + encode::GetWrappedObject(pDevice), + Flags, + pFeatureLevels, + FeatureLevels, + UnwrapObjects(ppCommandQueues, NumQueues, unwrap_memory), + NumQueues, + NodeMask, + ppDevice, + ppImmediateContext, + pChosenFeatureLevel); + + if (SUCCEEDED(result)) + { + WrapObject(IID_ID3D11Device, reinterpret_cast(ppDevice), nullptr); + WrapObject(IID_ID3D11DeviceContext, reinterpret_cast(ppImmediateContext), nullptr); + } + + Encode_D3D11On12CreateDevice( + result, + pDevice, + Flags, + pFeatureLevels, + FeatureLevels, + ppCommandQueues, + NumQueues, + NodeMask, + ppDevice, + ppImmediateContext, + pChosenFeatureLevel); + + CustomWrapperPostCall::Dispatch( + manager, + result, + pDevice, + Flags, + pFeatureLevels, + FeatureLevels, + ppCommandQueues, + NumQueues, + NodeMask, + ppDevice, + ppImmediateContext, + pChosenFeatureLevel); + } + else + { + result = manager->GetD3D11DispatchTable().D3D11On12CreateDevice( + pDevice, + Flags, + pFeatureLevels, + FeatureLevels, + ppCommandQueues, + NumQueues, + NodeMask, + ppDevice, + ppImmediateContext, + pChosenFeatureLevel); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11On12Device_Wrapper::ID3D11On12Device_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : IUnknown_Wrapper(riid, object, resources, destructor) +{ + info_ = std::make_shared(); + info_->SetWrapper(this); + AddWrapperMapEntry(object, this, object_map_, object_map_lock_); +} + +ID3D11On12Device_Wrapper::~ID3D11On12Device_Wrapper() +{ + CustomWrapperDestroyCall(this); + RemoveWrapperMapEntry(GetWrappedObjectAs(), object_map_, object_map_lock_); + D3D12CaptureManager::Get()->ProcessWrapperDestroy(this); + info_->SetWrapper(nullptr); +} + +ID3D11On12Device_Wrapper* ID3D11On12Device_Wrapper::GetExistingWrapper(IUnknown* object) +{ + return FindMapEntry(object, object_map_, object_map_lock_); +} + +HRESULT STDMETHODCALLTYPE ID3D11On12Device_Wrapper::CreateWrappedResource( + IUnknown* pResource12, + const D3D11_RESOURCE_FLAGS* pFlags11, + D3D12_RESOURCE_STATES InState, + D3D12_RESOURCE_STATES OutState, + REFIID riid, + void** ppResource11) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource12, + pFlags11, + InState, + OutState, + riid, + ppResource11); + + result = GetWrappedObjectAs()->CreateWrappedResource( + encode::GetWrappedObject(pResource12), + pFlags11, + InState, + OutState, + riid, + ppResource11); + + if (SUCCEEDED(result)) + { + WrapObject(riid, ppResource11, nullptr); + } + + Encode_ID3D11On12Device_CreateWrappedResource( + this, + result, + pResource12, + pFlags11, + InState, + OutState, + riid, + ppResource11); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource12, + pFlags11, + InState, + OutState, + riid, + ppResource11); + } + else + { + result = GetWrappedObjectAs()->CreateWrappedResource( + pResource12, + pFlags11, + InState, + OutState, + riid, + ppResource11); + } + + manager->DecrementCallScope(); + + return result; +} + +void STDMETHODCALLTYPE ID3D11On12Device_Wrapper::ReleaseWrappedResources( + ID3D11Resource* const* ppResources, + UINT NumResources) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppResources, + NumResources); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->ReleaseWrappedResources( + UnwrapObjects(ppResources, NumResources, unwrap_memory), + NumResources); + + Encode_ID3D11On12Device_ReleaseWrappedResources( + this, + ppResources, + NumResources); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppResources, + NumResources); + } + else + { + GetWrappedObjectAs()->ReleaseWrappedResources( + ppResources, + NumResources); + } + + manager->DecrementCallScope(); +} + +void STDMETHODCALLTYPE ID3D11On12Device_Wrapper::AcquireWrappedResources( + ID3D11Resource* const* ppResources, + UINT NumResources) +{ + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + ppResources, + NumResources); + + auto unwrap_memory = manager->GetHandleUnwrapMemory(); + + GetWrappedObjectAs()->AcquireWrappedResources( + UnwrapObjects(ppResources, NumResources, unwrap_memory), + NumResources); + + Encode_ID3D11On12Device_AcquireWrappedResources( + this, + ppResources, + NumResources); + + CustomWrapperPostCall::Dispatch( + manager, + this, + ppResources, + NumResources); + } + else + { + GetWrappedObjectAs()->AcquireWrappedResources( + ppResources, + NumResources); + } + + manager->DecrementCallScope(); +} + +ID3D11On12Device1_Wrapper::ID3D11On12Device1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11On12Device_Wrapper(riid, object, resources, destructor) +{ +} + +HRESULT STDMETHODCALLTYPE ID3D11On12Device1_Wrapper::GetD3D12Device( + REFIID riid, + void** ppvDevice) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + riid, + ppvDevice); + + result = GetWrappedObjectAs()->GetD3D12Device( + riid, + ppvDevice); + + if (SUCCEEDED(result)) + { + WrapObject(riid, ppvDevice, nullptr); + } + + Encode_ID3D11On12Device1_GetD3D12Device( + this, + result, + riid, + ppvDevice); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + riid, + ppvDevice); + } + else + { + result = GetWrappedObjectAs()->GetD3D12Device( + riid, + ppvDevice); + } + + manager->DecrementCallScope(); + + return result; +} + +ID3D11On12Device2_Wrapper::ID3D11On12Device2_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources, const std::function& destructor) : ID3D11On12Device1_Wrapper(riid, object, resources, destructor) +{ +} + +HRESULT STDMETHODCALLTYPE ID3D11On12Device2_Wrapper::UnwrapUnderlyingResource( + ID3D11Resource* pResource11, + ID3D12CommandQueue* pCommandQueue, + REFIID riid, + void** ppvResource12) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource11, + pCommandQueue, + riid, + ppvResource12); + + result = GetWrappedObjectAs()->UnwrapUnderlyingResource( + encode::GetWrappedObject(pResource11), + encode::GetWrappedObject(pCommandQueue), + riid, + ppvResource12); + + if (SUCCEEDED(result)) + { + WrapObject(riid, ppvResource12, nullptr); + } + + Encode_ID3D11On12Device2_UnwrapUnderlyingResource( + this, + result, + pResource11, + pCommandQueue, + riid, + ppvResource12); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource11, + pCommandQueue, + riid, + ppvResource12); + } + else + { + result = GetWrappedObjectAs()->UnwrapUnderlyingResource( + pResource11, + pCommandQueue, + riid, + ppvResource12); + } + + manager->DecrementCallScope(); + + return result; +} + +HRESULT STDMETHODCALLTYPE ID3D11On12Device2_Wrapper::ReturnUnderlyingResource( + ID3D11Resource* pResource11, + UINT NumSync, + UINT64* pSignalValues, + ID3D12Fence** ppFences) +{ + HRESULT result{}; + + auto manager = D3D12CaptureManager::Get(); + auto call_scope = manager->IncrementCallScope(); + + if (call_scope == 1) + { + auto force_command_serialization = D3D12CaptureManager::Get()->GetForceCommandSerialization(); + std::shared_lock shared_api_call_lock; + std::unique_lock exclusive_api_call_lock; + if (force_command_serialization) + { + exclusive_api_call_lock = D3D12CaptureManager::AcquireExclusiveApiCallLock(); + } + else + { + shared_api_call_lock = D3D12CaptureManager::AcquireSharedApiCallLock(); + } + + CustomWrapperPreCall::Dispatch( + manager, + this, + pResource11, + NumSync, + pSignalValues, + ppFences); + + result = GetWrappedObjectAs()->ReturnUnderlyingResource( + encode::GetWrappedObject(pResource11), + NumSync, + pSignalValues, + ppFences); + + if (SUCCEEDED(result)) + { + WrapObjectArray(IID_ID3D12Fence, reinterpret_cast(ppFences), NumSync, nullptr); + } + + Encode_ID3D11On12Device2_ReturnUnderlyingResource( + this, + result, + pResource11, + NumSync, + pSignalValues, + ppFences); + + CustomWrapperPostCall::Dispatch( + manager, + this, + result, + pResource11, + NumSync, + pSignalValues, + ppFences); + } + else + { + result = GetWrappedObjectAs()->ReturnUnderlyingResource( + pResource11, + NumSync, + pSignalValues, + ppFences); + } + + manager->DecrementCallScope(); + + return result; +} + + /* ** This part is generated from Unknwnbase.h in Windows SDK: 10.0.20348.0 ** diff --git a/framework/generated/generated_dx12_wrappers.h b/framework/generated/generated_dx12_wrappers.h index 022957ce58..ab0e5eed55 100644 --- a/framework/generated/generated_dx12_wrappers.h +++ b/framework/generated/generated_dx12_wrappers.h @@ -44,6 +44,12 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include @@ -3954,6 +3960,3089 @@ class ID3D12InfoQueue1_Wrapper : public ID3D12InfoQueue_Wrapper }; +/* +** This part is generated from d3d11.h in Windows SDK: 10.0.20348.0 +** +*/ + +HRESULT WINAPI D3D11CreateDevice( + IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + ID3D11Device** ppDevice, + D3D_FEATURE_LEVEL* pFeatureLevel, + ID3D11DeviceContext** ppImmediateContext); + +HRESULT WINAPI D3D11CreateDeviceAndSwapChain( + IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, + IDXGISwapChain** ppSwapChain, + ID3D11Device** ppDevice, + D3D_FEATURE_LEVEL* pFeatureLevel, + ID3D11DeviceContext** ppImmediateContext); + +class ID3D11DeviceChild_Wrapper : public IUnknown_Wrapper +{ + public: + ID3D11DeviceChild_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE GetDevice( + ID3D11Device** ppDevice); + + virtual HRESULT STDMETHODCALLTYPE GetPrivateData( + REFGUID guid, + UINT* pDataSize, + void* pData); + + virtual HRESULT STDMETHODCALLTYPE SetPrivateData( + REFGUID guid, + UINT DataSize, + const void* pData); + + virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( + REFGUID guid, + const IUnknown* pData); + +}; + +class ID3D11DepthStencilState_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11DepthStencilState_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11DepthStencilState_Wrapper(); + + static ID3D11DepthStencilState_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_DEPTH_STENCIL_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11BlendState_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11BlendState_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11BlendState_Wrapper(); + + static ID3D11BlendState_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_BLEND_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11RasterizerState_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11RasterizerState_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11RasterizerState_Wrapper(); + + static ID3D11RasterizerState_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_RASTERIZER_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11Resource_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11Resource_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE GetType( + D3D11_RESOURCE_DIMENSION* pResourceDimension); + + virtual void STDMETHODCALLTYPE SetEvictionPriority( + UINT EvictionPriority); + + virtual UINT STDMETHODCALLTYPE GetEvictionPriority(); + +}; + +class ID3D11Buffer_Wrapper : public ID3D11Resource_Wrapper +{ + public: + ID3D11Buffer_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11Buffer_Wrapper(); + + static ID3D11Buffer_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_BUFFER_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11Texture1D_Wrapper : public ID3D11Resource_Wrapper +{ + public: + ID3D11Texture1D_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11Texture1D_Wrapper(); + + static ID3D11Texture1D_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_TEXTURE1D_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11Texture2D_Wrapper : public ID3D11Resource_Wrapper +{ + public: + ID3D11Texture2D_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11Texture2D_Wrapper(); + + static ID3D11Texture2D_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_TEXTURE2D_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11Texture3D_Wrapper : public ID3D11Resource_Wrapper +{ + public: + ID3D11Texture3D_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11Texture3D_Wrapper(); + + static ID3D11Texture3D_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_TEXTURE3D_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11View_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11View_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE GetResource( + ID3D11Resource** ppResource); + +}; + +class ID3D11ShaderResourceView_Wrapper : public ID3D11View_Wrapper +{ + public: + ID3D11ShaderResourceView_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11ShaderResourceView_Wrapper(); + + static ID3D11ShaderResourceView_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11RenderTargetView_Wrapper : public ID3D11View_Wrapper +{ + public: + ID3D11RenderTargetView_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11RenderTargetView_Wrapper(); + + static ID3D11RenderTargetView_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_RENDER_TARGET_VIEW_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11DepthStencilView_Wrapper : public ID3D11View_Wrapper +{ + public: + ID3D11DepthStencilView_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11DepthStencilView_Wrapper(); + + static ID3D11DepthStencilView_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11UnorderedAccessView_Wrapper : public ID3D11View_Wrapper +{ + public: + ID3D11UnorderedAccessView_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11UnorderedAccessView_Wrapper(); + + static ID3D11UnorderedAccessView_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11VertexShader_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11VertexShader_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11VertexShader_Wrapper(); + + static ID3D11VertexShader_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11HullShader_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11HullShader_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11HullShader_Wrapper(); + + static ID3D11HullShader_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11DomainShader_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11DomainShader_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11DomainShader_Wrapper(); + + static ID3D11DomainShader_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11GeometryShader_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11GeometryShader_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11GeometryShader_Wrapper(); + + static ID3D11GeometryShader_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11PixelShader_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11PixelShader_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11PixelShader_Wrapper(); + + static ID3D11PixelShader_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11ComputeShader_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11ComputeShader_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11ComputeShader_Wrapper(); + + static ID3D11ComputeShader_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11InputLayout_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11InputLayout_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11InputLayout_Wrapper(); + + static ID3D11InputLayout_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11SamplerState_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11SamplerState_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11SamplerState_Wrapper(); + + static ID3D11SamplerState_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_SAMPLER_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11Asynchronous_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11Asynchronous_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual UINT STDMETHODCALLTYPE GetDataSize(); + +}; + +class ID3D11Query_Wrapper : public ID3D11Asynchronous_Wrapper +{ + public: + ID3D11Query_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11Query_Wrapper(); + + static ID3D11Query_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_QUERY_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11Predicate_Wrapper : public ID3D11Query_Wrapper +{ + public: + ID3D11Predicate_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11Predicate_Wrapper(); + + static ID3D11Predicate_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11Counter_Wrapper : public ID3D11Asynchronous_Wrapper +{ + public: + ID3D11Counter_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11Counter_Wrapper(); + + static ID3D11Counter_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_COUNTER_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11ClassInstance_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11ClassInstance_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11ClassInstance_Wrapper(); + + static ID3D11ClassInstance_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetClassLinkage( + ID3D11ClassLinkage** ppLinkage); + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_CLASS_INSTANCE_DESC* pDesc); + + virtual void STDMETHODCALLTYPE GetInstanceName( + LPSTR pInstanceName, + SIZE_T* pBufferLength); + + virtual void STDMETHODCALLTYPE GetTypeName( + LPSTR pTypeName, + SIZE_T* pBufferLength); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11ClassLinkage_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11ClassLinkage_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11ClassLinkage_Wrapper(); + + static ID3D11ClassLinkage_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual HRESULT STDMETHODCALLTYPE GetClassInstance( + LPCSTR pClassInstanceName, + UINT InstanceIndex, + ID3D11ClassInstance** ppInstance); + + virtual HRESULT STDMETHODCALLTYPE CreateClassInstance( + LPCSTR pClassTypeName, + UINT ConstantBufferOffset, + UINT ConstantVectorOffset, + UINT TextureOffset, + UINT SamplerOffset, + ID3D11ClassInstance** ppInstance); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11CommandList_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11CommandList_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11CommandList_Wrapper(); + + static ID3D11CommandList_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual UINT STDMETHODCALLTYPE GetContextFlags(); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11DeviceContext_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11DeviceContext_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11DeviceContext_Wrapper(); + + static ID3D11DeviceContext_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE VSSetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers); + + virtual void STDMETHODCALLTYPE PSSetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews); + + virtual void STDMETHODCALLTYPE PSSetShader( + ID3D11PixelShader* pPixelShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances); + + virtual void STDMETHODCALLTYPE PSSetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers); + + virtual void STDMETHODCALLTYPE VSSetShader( + ID3D11VertexShader* pVertexShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances); + + virtual void STDMETHODCALLTYPE DrawIndexed( + UINT IndexCount, + UINT StartIndexLocation, + INT BaseVertexLocation); + + virtual void STDMETHODCALLTYPE Draw( + UINT VertexCount, + UINT StartVertexLocation); + + virtual HRESULT STDMETHODCALLTYPE Map( + ID3D11Resource* pResource, + UINT Subresource, + D3D11_MAP MapType, + UINT MapFlags, + D3D11_MAPPED_SUBRESOURCE* pMappedResource); + + virtual void STDMETHODCALLTYPE Unmap( + ID3D11Resource* pResource, + UINT Subresource); + + virtual void STDMETHODCALLTYPE PSSetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers); + + virtual void STDMETHODCALLTYPE IASetInputLayout( + ID3D11InputLayout* pInputLayout); + + virtual void STDMETHODCALLTYPE IASetVertexBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppVertexBuffers, + const UINT* pStrides, + const UINT* pOffsets); + + virtual void STDMETHODCALLTYPE IASetIndexBuffer( + ID3D11Buffer* pIndexBuffer, + DXGI_FORMAT Format, + UINT Offset); + + virtual void STDMETHODCALLTYPE DrawIndexedInstanced( + UINT IndexCountPerInstance, + UINT InstanceCount, + UINT StartIndexLocation, + INT BaseVertexLocation, + UINT StartInstanceLocation); + + virtual void STDMETHODCALLTYPE DrawInstanced( + UINT VertexCountPerInstance, + UINT InstanceCount, + UINT StartVertexLocation, + UINT StartInstanceLocation); + + virtual void STDMETHODCALLTYPE GSSetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers); + + virtual void STDMETHODCALLTYPE GSSetShader( + ID3D11GeometryShader* pShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances); + + virtual void STDMETHODCALLTYPE IASetPrimitiveTopology( + D3D11_PRIMITIVE_TOPOLOGY Topology); + + virtual void STDMETHODCALLTYPE VSSetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews); + + virtual void STDMETHODCALLTYPE VSSetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers); + + virtual void STDMETHODCALLTYPE Begin( + ID3D11Asynchronous* pAsync); + + virtual void STDMETHODCALLTYPE End( + ID3D11Asynchronous* pAsync); + + virtual HRESULT STDMETHODCALLTYPE GetData( + ID3D11Asynchronous* pAsync, + void* pData, + UINT DataSize, + UINT GetDataFlags); + + virtual void STDMETHODCALLTYPE SetPredication( + ID3D11Predicate* pPredicate, + BOOL PredicateValue); + + virtual void STDMETHODCALLTYPE GSSetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews); + + virtual void STDMETHODCALLTYPE GSSetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers); + + virtual void STDMETHODCALLTYPE OMSetRenderTargets( + UINT NumViews, + ID3D11RenderTargetView* const* ppRenderTargetViews, + ID3D11DepthStencilView* pDepthStencilView); + + virtual void STDMETHODCALLTYPE OMSetRenderTargetsAndUnorderedAccessViews( + UINT NumRTVs, + ID3D11RenderTargetView* const* ppRenderTargetViews, + ID3D11DepthStencilView* pDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView* const* ppUnorderedAccessViews, + const UINT* pUAVInitialCounts); + + virtual void STDMETHODCALLTYPE OMSetBlendState( + ID3D11BlendState* pBlendState, + const FLOAT BlendFactor [4], + UINT SampleMask); + + virtual void STDMETHODCALLTYPE OMSetDepthStencilState( + ID3D11DepthStencilState* pDepthStencilState, + UINT StencilRef); + + virtual void STDMETHODCALLTYPE SOSetTargets( + UINT NumBuffers, + ID3D11Buffer* const* ppSOTargets, + const UINT* pOffsets); + + virtual void STDMETHODCALLTYPE DrawAuto(); + + virtual void STDMETHODCALLTYPE DrawIndexedInstancedIndirect( + ID3D11Buffer* pBufferForArgs, + UINT AlignedByteOffsetForArgs); + + virtual void STDMETHODCALLTYPE DrawInstancedIndirect( + ID3D11Buffer* pBufferForArgs, + UINT AlignedByteOffsetForArgs); + + virtual void STDMETHODCALLTYPE Dispatch( + UINT ThreadGroupCountX, + UINT ThreadGroupCountY, + UINT ThreadGroupCountZ); + + virtual void STDMETHODCALLTYPE DispatchIndirect( + ID3D11Buffer* pBufferForArgs, + UINT AlignedByteOffsetForArgs); + + virtual void STDMETHODCALLTYPE RSSetState( + ID3D11RasterizerState* pRasterizerState); + + virtual void STDMETHODCALLTYPE RSSetViewports( + UINT NumViewports, + const D3D11_VIEWPORT* pViewports); + + virtual void STDMETHODCALLTYPE RSSetScissorRects( + UINT NumRects, + const D3D11_RECT* pRects); + + virtual void STDMETHODCALLTYPE CopySubresourceRegion( + ID3D11Resource* pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + const D3D11_BOX* pSrcBox); + + virtual void STDMETHODCALLTYPE CopyResource( + ID3D11Resource* pDstResource, + ID3D11Resource* pSrcResource); + + virtual void STDMETHODCALLTYPE UpdateSubresource( + ID3D11Resource* pDstResource, + UINT DstSubresource, + const D3D11_BOX* pDstBox, + const void* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch); + + virtual void STDMETHODCALLTYPE CopyStructureCount( + ID3D11Buffer* pDstBuffer, + UINT DstAlignedByteOffset, + ID3D11UnorderedAccessView* pSrcView); + + virtual void STDMETHODCALLTYPE ClearRenderTargetView( + ID3D11RenderTargetView* pRenderTargetView, + const FLOAT ColorRGBA [4]); + + virtual void STDMETHODCALLTYPE ClearUnorderedAccessViewUint( + ID3D11UnorderedAccessView* pUnorderedAccessView, + const UINT Values [4]); + + virtual void STDMETHODCALLTYPE ClearUnorderedAccessViewFloat( + ID3D11UnorderedAccessView* pUnorderedAccessView, + const FLOAT Values [4]); + + virtual void STDMETHODCALLTYPE ClearDepthStencilView( + ID3D11DepthStencilView* pDepthStencilView, + UINT ClearFlags, + FLOAT Depth, + UINT8 Stencil); + + virtual void STDMETHODCALLTYPE GenerateMips( + ID3D11ShaderResourceView* pShaderResourceView); + + virtual void STDMETHODCALLTYPE SetResourceMinLOD( + ID3D11Resource* pResource, + FLOAT MinLOD); + + virtual FLOAT STDMETHODCALLTYPE GetResourceMinLOD( + ID3D11Resource* pResource); + + virtual void STDMETHODCALLTYPE ResolveSubresource( + ID3D11Resource* pDstResource, + UINT DstSubresource, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + DXGI_FORMAT Format); + + virtual void STDMETHODCALLTYPE ExecuteCommandList( + ID3D11CommandList* pCommandList, + BOOL RestoreContextState); + + virtual void STDMETHODCALLTYPE HSSetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews); + + virtual void STDMETHODCALLTYPE HSSetShader( + ID3D11HullShader* pHullShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances); + + virtual void STDMETHODCALLTYPE HSSetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers); + + virtual void STDMETHODCALLTYPE HSSetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers); + + virtual void STDMETHODCALLTYPE DSSetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews); + + virtual void STDMETHODCALLTYPE DSSetShader( + ID3D11DomainShader* pDomainShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances); + + virtual void STDMETHODCALLTYPE DSSetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers); + + virtual void STDMETHODCALLTYPE DSSetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers); + + virtual void STDMETHODCALLTYPE CSSetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView* const* ppShaderResourceViews); + + virtual void STDMETHODCALLTYPE CSSetUnorderedAccessViews( + UINT StartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView* const* ppUnorderedAccessViews, + const UINT* pUAVInitialCounts); + + virtual void STDMETHODCALLTYPE CSSetShader( + ID3D11ComputeShader* pComputeShader, + ID3D11ClassInstance* const* ppClassInstances, + UINT NumClassInstances); + + virtual void STDMETHODCALLTYPE CSSetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState* const* ppSamplers); + + virtual void STDMETHODCALLTYPE CSSetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers); + + virtual void STDMETHODCALLTYPE VSGetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers); + + virtual void STDMETHODCALLTYPE PSGetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews); + + virtual void STDMETHODCALLTYPE PSGetShader( + ID3D11PixelShader** ppPixelShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances); + + virtual void STDMETHODCALLTYPE PSGetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers); + + virtual void STDMETHODCALLTYPE VSGetShader( + ID3D11VertexShader** ppVertexShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances); + + virtual void STDMETHODCALLTYPE PSGetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers); + + virtual void STDMETHODCALLTYPE IAGetInputLayout( + ID3D11InputLayout** ppInputLayout); + + virtual void STDMETHODCALLTYPE IAGetVertexBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppVertexBuffers, + UINT* pStrides, + UINT* pOffsets); + + virtual void STDMETHODCALLTYPE IAGetIndexBuffer( + ID3D11Buffer** pIndexBuffer, + DXGI_FORMAT* Format, + UINT* Offset); + + virtual void STDMETHODCALLTYPE GSGetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers); + + virtual void STDMETHODCALLTYPE GSGetShader( + ID3D11GeometryShader** ppGeometryShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances); + + virtual void STDMETHODCALLTYPE IAGetPrimitiveTopology( + D3D11_PRIMITIVE_TOPOLOGY* pTopology); + + virtual void STDMETHODCALLTYPE VSGetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews); + + virtual void STDMETHODCALLTYPE VSGetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers); + + virtual void STDMETHODCALLTYPE GetPredication( + ID3D11Predicate** ppPredicate, + BOOL* pPredicateValue); + + virtual void STDMETHODCALLTYPE GSGetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews); + + virtual void STDMETHODCALLTYPE GSGetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers); + + virtual void STDMETHODCALLTYPE OMGetRenderTargets( + UINT NumViews, + ID3D11RenderTargetView** ppRenderTargetViews, + ID3D11DepthStencilView** ppDepthStencilView); + + virtual void STDMETHODCALLTYPE OMGetRenderTargetsAndUnorderedAccessViews( + UINT NumRTVs, + ID3D11RenderTargetView** ppRenderTargetViews, + ID3D11DepthStencilView** ppDepthStencilView, + UINT UAVStartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView** ppUnorderedAccessViews); + + virtual void STDMETHODCALLTYPE OMGetBlendState( + ID3D11BlendState** ppBlendState, + FLOAT BlendFactor [4], + UINT* pSampleMask); + + virtual void STDMETHODCALLTYPE OMGetDepthStencilState( + ID3D11DepthStencilState** ppDepthStencilState, + UINT* pStencilRef); + + virtual void STDMETHODCALLTYPE SOGetTargets( + UINT NumBuffers, + ID3D11Buffer** ppSOTargets); + + virtual void STDMETHODCALLTYPE RSGetState( + ID3D11RasterizerState** ppRasterizerState); + + virtual void STDMETHODCALLTYPE RSGetViewports( + UINT* pNumViewports, + D3D11_VIEWPORT* pViewports); + + virtual void STDMETHODCALLTYPE RSGetScissorRects( + UINT* pNumRects, + D3D11_RECT* pRects); + + virtual void STDMETHODCALLTYPE HSGetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews); + + virtual void STDMETHODCALLTYPE HSGetShader( + ID3D11HullShader** ppHullShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances); + + virtual void STDMETHODCALLTYPE HSGetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers); + + virtual void STDMETHODCALLTYPE HSGetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers); + + virtual void STDMETHODCALLTYPE DSGetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews); + + virtual void STDMETHODCALLTYPE DSGetShader( + ID3D11DomainShader** ppDomainShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances); + + virtual void STDMETHODCALLTYPE DSGetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers); + + virtual void STDMETHODCALLTYPE DSGetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers); + + virtual void STDMETHODCALLTYPE CSGetShaderResources( + UINT StartSlot, + UINT NumViews, + ID3D11ShaderResourceView** ppShaderResourceViews); + + virtual void STDMETHODCALLTYPE CSGetUnorderedAccessViews( + UINT StartSlot, + UINT NumUAVs, + ID3D11UnorderedAccessView** ppUnorderedAccessViews); + + virtual void STDMETHODCALLTYPE CSGetShader( + ID3D11ComputeShader** ppComputeShader, + ID3D11ClassInstance** ppClassInstances, + UINT* pNumClassInstances); + + virtual void STDMETHODCALLTYPE CSGetSamplers( + UINT StartSlot, + UINT NumSamplers, + ID3D11SamplerState** ppSamplers); + + virtual void STDMETHODCALLTYPE CSGetConstantBuffers( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers); + + virtual void STDMETHODCALLTYPE ClearState(); + + virtual void STDMETHODCALLTYPE Flush(); + + virtual D3D11_DEVICE_CONTEXT_TYPE STDMETHODCALLTYPE GetType(); + + virtual UINT STDMETHODCALLTYPE GetContextFlags(); + + virtual HRESULT STDMETHODCALLTYPE FinishCommandList( + BOOL RestoreDeferredContextState, + ID3D11CommandList** ppCommandList); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11VideoDecoder_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11VideoDecoder_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11VideoDecoder_Wrapper(); + + static ID3D11VideoDecoder_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual HRESULT STDMETHODCALLTYPE GetCreationParameters( + D3D11_VIDEO_DECODER_DESC* pVideoDesc, + D3D11_VIDEO_DECODER_CONFIG* pConfig); + + virtual HRESULT STDMETHODCALLTYPE GetDriverHandle( + HANDLE* pDriverHandle); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11VideoProcessorEnumerator_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11VideoProcessorEnumerator_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11VideoProcessorEnumerator_Wrapper(); + + static ID3D11VideoProcessorEnumerator_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorContentDesc( + D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pContentDesc); + + virtual HRESULT STDMETHODCALLTYPE CheckVideoProcessorFormat( + DXGI_FORMAT Format, + UINT* pFlags); + + virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorCaps( + D3D11_VIDEO_PROCESSOR_CAPS* pCaps); + + virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorRateConversionCaps( + UINT TypeIndex, + D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* pCaps); + + virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorCustomRate( + UINT TypeIndex, + UINT CustomRateIndex, + D3D11_VIDEO_PROCESSOR_CUSTOM_RATE* pRate); + + virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorFilterRange( + D3D11_VIDEO_PROCESSOR_FILTER Filter, + D3D11_VIDEO_PROCESSOR_FILTER_RANGE* pRange); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11VideoProcessor_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11VideoProcessor_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11VideoProcessor_Wrapper(); + + static ID3D11VideoProcessor_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetContentDesc( + D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pDesc); + + virtual void STDMETHODCALLTYPE GetRateConversionCaps( + D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS* pCaps); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11AuthenticatedChannel_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11AuthenticatedChannel_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11AuthenticatedChannel_Wrapper(); + + static ID3D11AuthenticatedChannel_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual HRESULT STDMETHODCALLTYPE GetCertificateSize( + UINT* pCertificateSize); + + virtual HRESULT STDMETHODCALLTYPE GetCertificate( + UINT CertificateSize, + BYTE* pCertificate); + + virtual void STDMETHODCALLTYPE GetChannelHandle( + HANDLE* pChannelHandle); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11CryptoSession_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11CryptoSession_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11CryptoSession_Wrapper(); + + static ID3D11CryptoSession_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetCryptoType( + GUID* pCryptoType); + + virtual void STDMETHODCALLTYPE GetDecoderProfile( + GUID* pDecoderProfile); + + virtual HRESULT STDMETHODCALLTYPE GetCertificateSize( + UINT* pCertificateSize); + + virtual HRESULT STDMETHODCALLTYPE GetCertificate( + UINT CertificateSize, + BYTE* pCertificate); + + virtual void STDMETHODCALLTYPE GetCryptoSessionHandle( + HANDLE* pCryptoSessionHandle); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11VideoDecoderOutputView_Wrapper : public ID3D11View_Wrapper +{ + public: + ID3D11VideoDecoderOutputView_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11VideoDecoderOutputView_Wrapper(); + + static ID3D11VideoDecoderOutputView_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11VideoProcessorInputView_Wrapper : public ID3D11View_Wrapper +{ + public: + ID3D11VideoProcessorInputView_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11VideoProcessorInputView_Wrapper(); + + static ID3D11VideoProcessorInputView_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11VideoProcessorOutputView_Wrapper : public ID3D11View_Wrapper +{ + public: + ID3D11VideoProcessorOutputView_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11VideoProcessorOutputView_Wrapper(); + + static ID3D11VideoProcessorOutputView_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE GetDesc( + D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* pDesc); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11VideoContext_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11VideoContext_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11VideoContext_Wrapper(); + + static ID3D11VideoContext_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual HRESULT STDMETHODCALLTYPE GetDecoderBuffer( + ID3D11VideoDecoder* pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type, + UINT* pBufferSize, + void** ppBuffer); + + virtual HRESULT STDMETHODCALLTYPE ReleaseDecoderBuffer( + ID3D11VideoDecoder* pDecoder, + D3D11_VIDEO_DECODER_BUFFER_TYPE Type); + + virtual HRESULT STDMETHODCALLTYPE DecoderBeginFrame( + ID3D11VideoDecoder* pDecoder, + ID3D11VideoDecoderOutputView* pView, + UINT ContentKeySize, + const void* pContentKey); + + virtual HRESULT STDMETHODCALLTYPE DecoderEndFrame( + ID3D11VideoDecoder* pDecoder); + + virtual HRESULT STDMETHODCALLTYPE SubmitDecoderBuffers( + ID3D11VideoDecoder* pDecoder, + UINT NumBuffers, + const D3D11_VIDEO_DECODER_BUFFER_DESC* pBufferDesc); + + virtual APP_DEPRECATED_HRESULT STDMETHODCALLTYPE DecoderExtension( + ID3D11VideoDecoder* pDecoder, + const D3D11_VIDEO_DECODER_EXTENSION* pExtensionData); + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputTargetRect( + ID3D11VideoProcessor* pVideoProcessor, + BOOL Enable, + const RECT* pRect); + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputBackgroundColor( + ID3D11VideoProcessor* pVideoProcessor, + BOOL YCbCr, + const D3D11_VIDEO_COLOR* pColor); + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputColorSpace( + ID3D11VideoProcessor* pVideoProcessor, + const D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace); + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputAlphaFillMode( + ID3D11VideoProcessor* pVideoProcessor, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE AlphaFillMode, + UINT StreamIndex); + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputConstriction( + ID3D11VideoProcessor* pVideoProcessor, + BOOL Enable, + SIZE Size); + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputStereoMode( + ID3D11VideoProcessor* pVideoProcessor, + BOOL Enable); + + virtual APP_DEPRECATED_HRESULT STDMETHODCALLTYPE VideoProcessorSetOutputExtension( + ID3D11VideoProcessor* pVideoProcessor, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData); + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputTargetRect( + ID3D11VideoProcessor* pVideoProcessor, + BOOL* Enabled, + RECT* pRect); + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputBackgroundColor( + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pYCbCr, + D3D11_VIDEO_COLOR* pColor); + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputColorSpace( + ID3D11VideoProcessor* pVideoProcessor, + D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace); + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputAlphaFillMode( + ID3D11VideoProcessor* pVideoProcessor, + D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE* pAlphaFillMode, + UINT* pStreamIndex); + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputConstriction( + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pEnabled, + SIZE* pSize); + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputStereoMode( + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pEnabled); + + virtual APP_DEPRECATED_HRESULT STDMETHODCALLTYPE VideoProcessorGetOutputExtension( + ID3D11VideoProcessor* pVideoProcessor, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamFrameFormat( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_FRAME_FORMAT FrameFormat); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamColorSpace( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + const D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamOutputRate( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE OutputRate, + BOOL RepeatFrame, + const DXGI_RATIONAL* pCustomRate); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamSourceRect( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + const RECT* pRect); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamDestRect( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + const RECT* pRect); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamAlpha( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Alpha); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamPalette( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + UINT Count, + const UINT* pEntries); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamPixelAspectRatio( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + const DXGI_RATIONAL* pSourceAspectRatio, + const DXGI_RATIONAL* pDestinationAspectRatio); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamLumaKey( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + FLOAT Lower, + FLOAT Upper); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamStereoFormat( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT Format, + BOOL LeftViewFrame0, + BOOL BaseViewFrame0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE FlipMode, + int MonoOffset); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamAutoProcessingMode( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamFilter( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + BOOL Enable, + int Level); + + virtual APP_DEPRECATED_HRESULT STDMETHODCALLTYPE VideoProcessorSetStreamExtension( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamFrameFormat( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_FRAME_FORMAT* pFrameFormat); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamColorSpace( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_COLOR_SPACE* pColorSpace); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamOutputRate( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_OUTPUT_RATE* pOutputRate, + BOOL* pRepeatFrame, + DXGI_RATIONAL* pCustomRate); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamSourceRect( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + RECT* pRect); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamDestRect( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + RECT* pRect); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamAlpha( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + FLOAT* pAlpha); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamPalette( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + UINT Count, + UINT* pEntries); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamPixelAspectRatio( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + DXGI_RATIONAL* pSourceAspectRatio, + DXGI_RATIONAL* pDestinationAspectRatio); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamLumaKey( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled, + FLOAT* pLower, + FLOAT* pUpper); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamStereoFormat( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnable, + D3D11_VIDEO_PROCESSOR_STEREO_FORMAT* pFormat, + BOOL* pLeftViewFrame0, + BOOL* pBaseViewFrame0, + D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE* pFlipMode, + int* MonoOffset); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamAutoProcessingMode( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnabled); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamFilter( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + D3D11_VIDEO_PROCESSOR_FILTER Filter, + BOOL* pEnabled, + int* pLevel); + + virtual APP_DEPRECATED_HRESULT STDMETHODCALLTYPE VideoProcessorGetStreamExtension( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + const GUID* pExtensionGuid, + UINT DataSize, + void* pData); + + virtual HRESULT STDMETHODCALLTYPE VideoProcessorBlt( + ID3D11VideoProcessor* pVideoProcessor, + ID3D11VideoProcessorOutputView* pView, + UINT OutputFrame, + UINT StreamCount, + const D3D11_VIDEO_PROCESSOR_STREAM* pStreams); + + virtual HRESULT STDMETHODCALLTYPE NegotiateCryptoSessionKeyExchange( + ID3D11CryptoSession* pCryptoSession, + UINT DataSize, + void* pData); + + virtual void STDMETHODCALLTYPE EncryptionBlt( + ID3D11CryptoSession* pCryptoSession, + ID3D11Texture2D* pSrcSurface, + ID3D11Texture2D* pDstSurface, + UINT IVSize, + void* pIV); + + virtual void STDMETHODCALLTYPE DecryptionBlt( + ID3D11CryptoSession* pCryptoSession, + ID3D11Texture2D* pSrcSurface, + ID3D11Texture2D* pDstSurface, + D3D11_ENCRYPTED_BLOCK_INFO* pEncryptedBlockInfo, + UINT ContentKeySize, + const void* pContentKey, + UINT IVSize, + void* pIV); + + virtual void STDMETHODCALLTYPE StartSessionKeyRefresh( + ID3D11CryptoSession* pCryptoSession, + UINT RandomNumberSize, + void* pRandomNumber); + + virtual void STDMETHODCALLTYPE FinishSessionKeyRefresh( + ID3D11CryptoSession* pCryptoSession); + + virtual HRESULT STDMETHODCALLTYPE GetEncryptionBltKey( + ID3D11CryptoSession* pCryptoSession, + UINT KeySize, + void* pReadbackKey); + + virtual HRESULT STDMETHODCALLTYPE NegotiateAuthenticatedChannelKeyExchange( + ID3D11AuthenticatedChannel* pChannel, + UINT DataSize, + void* pData); + + virtual HRESULT STDMETHODCALLTYPE QueryAuthenticatedChannel( + ID3D11AuthenticatedChannel* pChannel, + UINT InputSize, + const void* pInput, + UINT OutputSize, + void* pOutput); + + virtual HRESULT STDMETHODCALLTYPE ConfigureAuthenticatedChannel( + ID3D11AuthenticatedChannel* pChannel, + UINT InputSize, + const void* pInput, + D3D11_AUTHENTICATED_CONFIGURE_OUTPUT* pOutput); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamRotation( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + D3D11_VIDEO_PROCESSOR_ROTATION Rotation); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamRotation( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnable, + D3D11_VIDEO_PROCESSOR_ROTATION* pRotation); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11VideoDevice_Wrapper : public IUnknown_Wrapper +{ + public: + ID3D11VideoDevice_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11VideoDevice_Wrapper(); + + static ID3D11VideoDevice_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual HRESULT STDMETHODCALLTYPE CreateVideoDecoder( + const D3D11_VIDEO_DECODER_DESC* pVideoDesc, + const D3D11_VIDEO_DECODER_CONFIG* pConfig, + ID3D11VideoDecoder** ppDecoder); + + virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessor( + ID3D11VideoProcessorEnumerator* pEnum, + UINT RateConversionIndex, + ID3D11VideoProcessor** ppVideoProcessor); + + virtual HRESULT STDMETHODCALLTYPE CreateAuthenticatedChannel( + D3D11_AUTHENTICATED_CHANNEL_TYPE ChannelType, + ID3D11AuthenticatedChannel** ppAuthenticatedChannel); + + virtual HRESULT STDMETHODCALLTYPE CreateCryptoSession( + const GUID* pCryptoType, + const GUID* pDecoderProfile, + const GUID* pKeyExchangeType, + ID3D11CryptoSession** ppCryptoSession); + + virtual HRESULT STDMETHODCALLTYPE CreateVideoDecoderOutputView( + ID3D11Resource* pResource, + const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC* pDesc, + ID3D11VideoDecoderOutputView** ppVDOVView); + + virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessorInputView( + ID3D11Resource* pResource, + ID3D11VideoProcessorEnumerator* pEnum, + const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC* pDesc, + ID3D11VideoProcessorInputView** ppVPIView); + + virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessorOutputView( + ID3D11Resource* pResource, + ID3D11VideoProcessorEnumerator* pEnum, + const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC* pDesc, + ID3D11VideoProcessorOutputView** ppVPOView); + + virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessorEnumerator( + const D3D11_VIDEO_PROCESSOR_CONTENT_DESC* pDesc, + ID3D11VideoProcessorEnumerator** ppEnum); + + virtual UINT STDMETHODCALLTYPE GetVideoDecoderProfileCount(); + + virtual HRESULT STDMETHODCALLTYPE GetVideoDecoderProfile( + UINT Index, + GUID* pDecoderProfile); + + virtual HRESULT STDMETHODCALLTYPE CheckVideoDecoderFormat( + const GUID* pDecoderProfile, + DXGI_FORMAT Format, + BOOL* pSupported); + + virtual HRESULT STDMETHODCALLTYPE GetVideoDecoderConfigCount( + const D3D11_VIDEO_DECODER_DESC* pDesc, + UINT* pCount); + + virtual HRESULT STDMETHODCALLTYPE GetVideoDecoderConfig( + const D3D11_VIDEO_DECODER_DESC* pDesc, + UINT Index, + D3D11_VIDEO_DECODER_CONFIG* pConfig); + + virtual HRESULT STDMETHODCALLTYPE GetContentProtectionCaps( + const GUID* pCryptoType, + const GUID* pDecoderProfile, + D3D11_VIDEO_CONTENT_PROTECTION_CAPS* pCaps); + + virtual HRESULT STDMETHODCALLTYPE CheckCryptoKeyExchange( + const GUID* pCryptoType, + const GUID* pDecoderProfile, + UINT Index, + GUID* pKeyExchangeType); + + virtual HRESULT STDMETHODCALLTYPE SetPrivateData( + REFGUID guid, + UINT DataSize, + const void* pData); + + virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( + REFGUID guid, + const IUnknown* pData); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11Device_Wrapper : public IUnknown_Wrapper +{ + public: + ID3D11Device_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11Device_Wrapper(); + + static ID3D11Device_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual HRESULT STDMETHODCALLTYPE CreateBuffer( + const D3D11_BUFFER_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Buffer** ppBuffer); + + virtual HRESULT STDMETHODCALLTYPE CreateTexture1D( + const D3D11_TEXTURE1D_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture1D** ppTexture1D); + + virtual HRESULT STDMETHODCALLTYPE CreateTexture2D( + const D3D11_TEXTURE2D_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture2D** ppTexture2D); + + virtual HRESULT STDMETHODCALLTYPE CreateTexture3D( + const D3D11_TEXTURE3D_DESC* pDesc, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture3D** ppTexture3D); + + virtual HRESULT STDMETHODCALLTYPE CreateShaderResourceView( + ID3D11Resource* pResource, + const D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc, + ID3D11ShaderResourceView** ppSRView); + + virtual HRESULT STDMETHODCALLTYPE CreateUnorderedAccessView( + ID3D11Resource* pResource, + const D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc, + ID3D11UnorderedAccessView** ppUAView); + + virtual HRESULT STDMETHODCALLTYPE CreateRenderTargetView( + ID3D11Resource* pResource, + const D3D11_RENDER_TARGET_VIEW_DESC* pDesc, + ID3D11RenderTargetView** ppRTView); + + virtual HRESULT STDMETHODCALLTYPE CreateDepthStencilView( + ID3D11Resource* pResource, + const D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc, + ID3D11DepthStencilView** ppDepthStencilView); + + virtual HRESULT STDMETHODCALLTYPE CreateInputLayout( + const D3D11_INPUT_ELEMENT_DESC* pInputElementDescs, + UINT NumElements, + const void* pShaderBytecodeWithInputSignature, + SIZE_T BytecodeLength, + ID3D11InputLayout** ppInputLayout); + + virtual HRESULT STDMETHODCALLTYPE CreateVertexShader( + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11VertexShader** ppVertexShader); + + virtual HRESULT STDMETHODCALLTYPE CreateGeometryShader( + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11GeometryShader** ppGeometryShader); + + virtual HRESULT STDMETHODCALLTYPE CreateGeometryShaderWithStreamOutput( + const void* pShaderBytecode, + SIZE_T BytecodeLength, + const D3D11_SO_DECLARATION_ENTRY* pSODeclaration, + UINT NumEntries, + const UINT* pBufferStrides, + UINT NumStrides, + UINT RasterizedStream, + ID3D11ClassLinkage* pClassLinkage, + ID3D11GeometryShader** ppGeometryShader); + + virtual HRESULT STDMETHODCALLTYPE CreatePixelShader( + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11PixelShader** ppPixelShader); + + virtual HRESULT STDMETHODCALLTYPE CreateHullShader( + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11HullShader** ppHullShader); + + virtual HRESULT STDMETHODCALLTYPE CreateDomainShader( + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11DomainShader** ppDomainShader); + + virtual HRESULT STDMETHODCALLTYPE CreateComputeShader( + const void* pShaderBytecode, + SIZE_T BytecodeLength, + ID3D11ClassLinkage* pClassLinkage, + ID3D11ComputeShader** ppComputeShader); + + virtual HRESULT STDMETHODCALLTYPE CreateClassLinkage( + ID3D11ClassLinkage** ppLinkage); + + virtual HRESULT STDMETHODCALLTYPE CreateBlendState( + const D3D11_BLEND_DESC* pBlendStateDesc, + ID3D11BlendState** ppBlendState); + + virtual HRESULT STDMETHODCALLTYPE CreateDepthStencilState( + const D3D11_DEPTH_STENCIL_DESC* pDepthStencilDesc, + ID3D11DepthStencilState** ppDepthStencilState); + + virtual HRESULT STDMETHODCALLTYPE CreateRasterizerState( + const D3D11_RASTERIZER_DESC* pRasterizerDesc, + ID3D11RasterizerState** ppRasterizerState); + + virtual HRESULT STDMETHODCALLTYPE CreateSamplerState( + const D3D11_SAMPLER_DESC* pSamplerDesc, + ID3D11SamplerState** ppSamplerState); + + virtual HRESULT STDMETHODCALLTYPE CreateQuery( + const D3D11_QUERY_DESC* pQueryDesc, + ID3D11Query** ppQuery); + + virtual HRESULT STDMETHODCALLTYPE CreatePredicate( + const D3D11_QUERY_DESC* pPredicateDesc, + ID3D11Predicate** ppPredicate); + + virtual HRESULT STDMETHODCALLTYPE CreateCounter( + const D3D11_COUNTER_DESC* pCounterDesc, + ID3D11Counter** ppCounter); + + virtual HRESULT STDMETHODCALLTYPE CreateDeferredContext( + UINT ContextFlags, + ID3D11DeviceContext** ppDeferredContext); + + virtual HRESULT STDMETHODCALLTYPE OpenSharedResource( + HANDLE hResource, + REFIID ReturnedInterface, + void** ppResource); + + virtual HRESULT STDMETHODCALLTYPE CheckFormatSupport( + DXGI_FORMAT Format, + UINT* pFormatSupport); + + virtual HRESULT STDMETHODCALLTYPE CheckMultisampleQualityLevels( + DXGI_FORMAT Format, + UINT SampleCount, + UINT* pNumQualityLevels); + + virtual void STDMETHODCALLTYPE CheckCounterInfo( + D3D11_COUNTER_INFO* pCounterInfo); + + virtual HRESULT STDMETHODCALLTYPE CheckCounter( + const D3D11_COUNTER_DESC* pDesc, + D3D11_COUNTER_TYPE* pType, + UINT* pActiveCounters, + LPSTR szName, + UINT* pNameLength, + LPSTR szUnits, + UINT* pUnitsLength, + LPSTR szDescription, + UINT* pDescriptionLength); + + virtual HRESULT STDMETHODCALLTYPE CheckFeatureSupport( + D3D11_FEATURE Feature, + void* pFeatureSupportData, + UINT FeatureSupportDataSize); + + virtual HRESULT STDMETHODCALLTYPE GetPrivateData( + REFGUID guid, + UINT* pDataSize, + void* pData); + + virtual HRESULT STDMETHODCALLTYPE SetPrivateData( + REFGUID guid, + UINT DataSize, + const void* pData); + + virtual HRESULT STDMETHODCALLTYPE SetPrivateDataInterface( + REFGUID guid, + const IUnknown* pData); + + virtual D3D_FEATURE_LEVEL STDMETHODCALLTYPE GetFeatureLevel(); + + virtual UINT STDMETHODCALLTYPE GetCreationFlags(); + + virtual HRESULT STDMETHODCALLTYPE GetDeviceRemovedReason(); + + virtual void STDMETHODCALLTYPE GetImmediateContext( + ID3D11DeviceContext** ppImmediateContext); + + virtual HRESULT STDMETHODCALLTYPE SetExceptionMode( + UINT RaiseFlags); + + virtual UINT STDMETHODCALLTYPE GetExceptionMode(); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + + +/* +** This part is generated from d3d11_1.h in Windows SDK: 10.0.20348.0 +** +*/ + +class ID3D11BlendState1_Wrapper : public ID3D11BlendState_Wrapper +{ + public: + ID3D11BlendState1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE GetDesc1( + D3D11_BLEND_DESC1* pDesc); + +}; + +class ID3D11RasterizerState1_Wrapper : public ID3D11RasterizerState_Wrapper +{ + public: + ID3D11RasterizerState1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE GetDesc1( + D3D11_RASTERIZER_DESC1* pDesc); + +}; + +class ID3DDeviceContextState_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3DDeviceContextState_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3DDeviceContextState_Wrapper(); + + static ID3DDeviceContextState_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11DeviceContext1_Wrapper : public ID3D11DeviceContext_Wrapper +{ + public: + ID3D11DeviceContext1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE CopySubresourceRegion1( + ID3D11Resource* pDstResource, + UINT DstSubresource, + UINT DstX, + UINT DstY, + UINT DstZ, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + const D3D11_BOX* pSrcBox, + UINT CopyFlags); + + virtual void STDMETHODCALLTYPE UpdateSubresource1( + ID3D11Resource* pDstResource, + UINT DstSubresource, + const D3D11_BOX* pDstBox, + const void* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch, + UINT CopyFlags); + + virtual void STDMETHODCALLTYPE DiscardResource( + ID3D11Resource* pResource); + + virtual void STDMETHODCALLTYPE DiscardView( + ID3D11View* pResourceView); + + virtual void STDMETHODCALLTYPE VSSetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants); + + virtual void STDMETHODCALLTYPE HSSetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants); + + virtual void STDMETHODCALLTYPE DSSetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants); + + virtual void STDMETHODCALLTYPE GSSetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants); + + virtual void STDMETHODCALLTYPE PSSetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants); + + virtual void STDMETHODCALLTYPE CSSetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer* const* ppConstantBuffers, + const UINT* pFirstConstant, + const UINT* pNumConstants); + + virtual void STDMETHODCALLTYPE VSGetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants); + + virtual void STDMETHODCALLTYPE HSGetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants); + + virtual void STDMETHODCALLTYPE DSGetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants); + + virtual void STDMETHODCALLTYPE GSGetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants); + + virtual void STDMETHODCALLTYPE PSGetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants); + + virtual void STDMETHODCALLTYPE CSGetConstantBuffers1( + UINT StartSlot, + UINT NumBuffers, + ID3D11Buffer** ppConstantBuffers, + UINT* pFirstConstant, + UINT* pNumConstants); + + virtual void STDMETHODCALLTYPE SwapDeviceContextState( + ID3DDeviceContextState* pState, + ID3DDeviceContextState** ppPreviousState); + + virtual void STDMETHODCALLTYPE ClearView( + ID3D11View* pView, + const FLOAT Color [4], + const D3D11_RECT* pRect, + UINT NumRects); + + virtual void STDMETHODCALLTYPE DiscardView1( + ID3D11View* pResourceView, + const D3D11_RECT* pRects, + UINT NumRects); + +}; + +class ID3D11VideoContext1_Wrapper : public ID3D11VideoContext_Wrapper +{ + public: + ID3D11VideoContext1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual HRESULT STDMETHODCALLTYPE SubmitDecoderBuffers1( + ID3D11VideoDecoder* pDecoder, + UINT NumBuffers, + const D3D11_VIDEO_DECODER_BUFFER_DESC1* pBufferDesc); + + virtual HRESULT STDMETHODCALLTYPE GetDataForNewHardwareKey( + ID3D11CryptoSession* pCryptoSession, + UINT PrivateInputSize, + const void* pPrivatInputData, + UINT64* pPrivateOutputData); + + virtual HRESULT STDMETHODCALLTYPE CheckCryptoSessionStatus( + ID3D11CryptoSession* pCryptoSession, + D3D11_CRYPTO_SESSION_STATUS* pStatus); + + virtual HRESULT STDMETHODCALLTYPE DecoderEnableDownsampling( + ID3D11VideoDecoder* pDecoder, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + const D3D11_VIDEO_SAMPLE_DESC* pOutputDesc, + UINT ReferenceFrameCount); + + virtual HRESULT STDMETHODCALLTYPE DecoderUpdateDownsampling( + ID3D11VideoDecoder* pDecoder, + const D3D11_VIDEO_SAMPLE_DESC* pOutputDesc); + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputColorSpace1( + ID3D11VideoProcessor* pVideoProcessor, + DXGI_COLOR_SPACE_TYPE ColorSpace); + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputShaderUsage( + ID3D11VideoProcessor* pVideoProcessor, + BOOL ShaderUsage); + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputColorSpace1( + ID3D11VideoProcessor* pVideoProcessor, + DXGI_COLOR_SPACE_TYPE* pColorSpace); + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputShaderUsage( + ID3D11VideoProcessor* pVideoProcessor, + BOOL* pShaderUsage); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamColorSpace1( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_COLOR_SPACE_TYPE ColorSpace); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamMirror( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL Enable, + BOOL FlipHorizontal, + BOOL FlipVertical); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamColorSpace1( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_COLOR_SPACE_TYPE* pColorSpace); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamMirror( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + BOOL* pEnable, + BOOL* pFlipHorizontal, + BOOL* pFlipVertical); + + virtual HRESULT STDMETHODCALLTYPE VideoProcessorGetBehaviorHints( + ID3D11VideoProcessor* pVideoProcessor, + UINT OutputWidth, + UINT OutputHeight, + DXGI_FORMAT OutputFormat, + UINT StreamCount, + const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT* pStreams, + UINT* pBehaviorHints); + +}; + +class ID3D11VideoDevice1_Wrapper : public ID3D11VideoDevice_Wrapper +{ + public: + ID3D11VideoDevice1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual HRESULT STDMETHODCALLTYPE GetCryptoSessionPrivateDataSize( + const GUID* pCryptoType, + const GUID* pDecoderProfile, + const GUID* pKeyExchangeType, + UINT* pPrivateInputSize, + UINT* pPrivateOutputSize); + + virtual HRESULT STDMETHODCALLTYPE GetVideoDecoderCaps( + const GUID* pDecoderProfile, + UINT SampleWidth, + UINT SampleHeight, + const DXGI_RATIONAL* pFrameRate, + UINT BitRate, + const GUID* pCryptoType, + UINT* pDecoderCaps); + + virtual HRESULT STDMETHODCALLTYPE CheckVideoDecoderDownsampling( + const D3D11_VIDEO_DECODER_DESC* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + const D3D11_VIDEO_DECODER_CONFIG* pInputConfig, + const DXGI_RATIONAL* pFrameRate, + const D3D11_VIDEO_SAMPLE_DESC* pOutputDesc, + BOOL* pSupported, + BOOL* pRealTimeHint); + + virtual HRESULT STDMETHODCALLTYPE RecommendVideoDecoderDownsampleParameters( + const D3D11_VIDEO_DECODER_DESC* pInputDesc, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + const D3D11_VIDEO_DECODER_CONFIG* pInputConfig, + const DXGI_RATIONAL* pFrameRate, + D3D11_VIDEO_SAMPLE_DESC* pRecommendedOutputDesc); + +}; + +class ID3D11VideoProcessorEnumerator1_Wrapper : public ID3D11VideoProcessorEnumerator_Wrapper +{ + public: + ID3D11VideoProcessorEnumerator1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual HRESULT STDMETHODCALLTYPE CheckVideoProcessorFormatConversion( + DXGI_FORMAT InputFormat, + DXGI_COLOR_SPACE_TYPE InputColorSpace, + DXGI_FORMAT OutputFormat, + DXGI_COLOR_SPACE_TYPE OutputColorSpace, + BOOL* pSupported); + +}; + +class ID3D11Device1_Wrapper : public ID3D11Device_Wrapper +{ + public: + ID3D11Device1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE GetImmediateContext1( + ID3D11DeviceContext1** ppImmediateContext); + + virtual HRESULT STDMETHODCALLTYPE CreateDeferredContext1( + UINT ContextFlags, + ID3D11DeviceContext1** ppDeferredContext); + + virtual HRESULT STDMETHODCALLTYPE CreateBlendState1( + const D3D11_BLEND_DESC1* pBlendStateDesc, + ID3D11BlendState1** ppBlendState); + + virtual HRESULT STDMETHODCALLTYPE CreateRasterizerState1( + const D3D11_RASTERIZER_DESC1* pRasterizerDesc, + ID3D11RasterizerState1** ppRasterizerState); + + virtual HRESULT STDMETHODCALLTYPE CreateDeviceContextState( + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + REFIID EmulatedInterface, + D3D_FEATURE_LEVEL* pChosenFeatureLevel, + ID3DDeviceContextState** ppContextState); + + virtual HRESULT STDMETHODCALLTYPE OpenSharedResource1( + HANDLE hResource, + REFIID returnedInterface, + void** ppResource); + + virtual HRESULT STDMETHODCALLTYPE OpenSharedResourceByName( + LPCWSTR lpName, + DWORD dwDesiredAccess, + REFIID returnedInterface, + void** ppResource); + +}; + +class ID3DUserDefinedAnnotation_Wrapper : public IUnknown_Wrapper +{ + public: + ID3DUserDefinedAnnotation_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3DUserDefinedAnnotation_Wrapper(); + + static ID3DUserDefinedAnnotation_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual INT STDMETHODCALLTYPE BeginEvent( + LPCWSTR Name); + + virtual INT STDMETHODCALLTYPE EndEvent(); + + virtual void STDMETHODCALLTYPE SetMarker( + LPCWSTR Name); + + virtual BOOL STDMETHODCALLTYPE GetStatus(); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + + +/* +** This part is generated from d3d11_2.h in Windows SDK: 10.0.20348.0 +** +*/ + +class ID3D11DeviceContext2_Wrapper : public ID3D11DeviceContext1_Wrapper +{ + public: + ID3D11DeviceContext2_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual HRESULT STDMETHODCALLTYPE UpdateTileMappings( + ID3D11Resource* pTiledResource, + UINT NumTiledResourceRegions, + const D3D11_TILED_RESOURCE_COORDINATE* pTiledResourceRegionStartCoordinates, + const D3D11_TILE_REGION_SIZE* pTiledResourceRegionSizes, + ID3D11Buffer* pTilePool, + UINT NumRanges, + const UINT* pRangeFlags, + const UINT* pTilePoolStartOffsets, + const UINT* pRangeTileCounts, + UINT Flags); + + virtual HRESULT STDMETHODCALLTYPE CopyTileMappings( + ID3D11Resource* pDestTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pDestRegionStartCoordinate, + ID3D11Resource* pSourceTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pSourceRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE* pTileRegionSize, + UINT Flags); + + virtual void STDMETHODCALLTYPE CopyTiles( + ID3D11Resource* pTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pTileRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE* pTileRegionSize, + ID3D11Buffer* pBuffer, + UINT64 BufferStartOffsetInBytes, + UINT Flags); + + virtual void STDMETHODCALLTYPE UpdateTiles( + ID3D11Resource* pDestTiledResource, + const D3D11_TILED_RESOURCE_COORDINATE* pDestTileRegionStartCoordinate, + const D3D11_TILE_REGION_SIZE* pDestTileRegionSize, + const void* pSourceTileData, + UINT Flags); + + virtual HRESULT STDMETHODCALLTYPE ResizeTilePool( + ID3D11Buffer* pTilePool, + UINT64 NewSizeInBytes); + + virtual void STDMETHODCALLTYPE TiledResourceBarrier( + ID3D11DeviceChild* pTiledResourceOrViewAccessBeforeBarrier, + ID3D11DeviceChild* pTiledResourceOrViewAccessAfterBarrier); + + virtual BOOL STDMETHODCALLTYPE IsAnnotationEnabled(); + + virtual void STDMETHODCALLTYPE SetMarkerInt( + LPCWSTR pLabel, + INT Data); + + virtual void STDMETHODCALLTYPE BeginEventInt( + LPCWSTR pLabel, + INT Data); + + virtual void STDMETHODCALLTYPE EndEvent(); + +}; + +class ID3D11Device2_Wrapper : public ID3D11Device1_Wrapper +{ + public: + ID3D11Device2_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE GetImmediateContext2( + ID3D11DeviceContext2** ppImmediateContext); + + virtual HRESULT STDMETHODCALLTYPE CreateDeferredContext2( + UINT ContextFlags, + ID3D11DeviceContext2** ppDeferredContext); + + virtual void STDMETHODCALLTYPE GetResourceTiling( + ID3D11Resource* pTiledResource, + UINT* pNumTilesForEntireResource, + D3D11_PACKED_MIP_DESC* pPackedMipDesc, + D3D11_TILE_SHAPE* pStandardTileShapeForNonPackedMips, + UINT* pNumSubresourceTilings, + UINT FirstSubresourceTilingToGet, + D3D11_SUBRESOURCE_TILING* pSubresourceTilingsForNonPackedMips); + + virtual HRESULT STDMETHODCALLTYPE CheckMultisampleQualityLevels1( + DXGI_FORMAT Format, + UINT SampleCount, + UINT Flags, + UINT* pNumQualityLevels); + +}; + + +/* +** This part is generated from d3d11_3.h in Windows SDK: 10.0.20348.0 +** +*/ + +class ID3D11Texture2D1_Wrapper : public ID3D11Texture2D_Wrapper +{ + public: + ID3D11Texture2D1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE GetDesc1( + D3D11_TEXTURE2D_DESC1* pDesc); + +}; + +class ID3D11Texture3D1_Wrapper : public ID3D11Texture3D_Wrapper +{ + public: + ID3D11Texture3D1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE GetDesc1( + D3D11_TEXTURE3D_DESC1* pDesc); + +}; + +class ID3D11RasterizerState2_Wrapper : public ID3D11RasterizerState1_Wrapper +{ + public: + ID3D11RasterizerState2_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE GetDesc2( + D3D11_RASTERIZER_DESC2* pDesc); + +}; + +class ID3D11ShaderResourceView1_Wrapper : public ID3D11ShaderResourceView_Wrapper +{ + public: + ID3D11ShaderResourceView1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE GetDesc1( + D3D11_SHADER_RESOURCE_VIEW_DESC1* pDesc1); + +}; + +class ID3D11RenderTargetView1_Wrapper : public ID3D11RenderTargetView_Wrapper +{ + public: + ID3D11RenderTargetView1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE GetDesc1( + D3D11_RENDER_TARGET_VIEW_DESC1* pDesc1); + +}; + +class ID3D11UnorderedAccessView1_Wrapper : public ID3D11UnorderedAccessView_Wrapper +{ + public: + ID3D11UnorderedAccessView1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE GetDesc1( + D3D11_UNORDERED_ACCESS_VIEW_DESC1* pDesc1); + +}; + +class ID3D11Query1_Wrapper : public ID3D11Query_Wrapper +{ + public: + ID3D11Query1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE GetDesc1( + D3D11_QUERY_DESC1* pDesc1); + +}; + +class ID3D11DeviceContext3_Wrapper : public ID3D11DeviceContext2_Wrapper +{ + public: + ID3D11DeviceContext3_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE Flush1( + D3D11_CONTEXT_TYPE ContextType, + HANDLE hEvent); + + virtual void STDMETHODCALLTYPE SetHardwareProtectionState( + BOOL HwProtectionEnable); + + virtual void STDMETHODCALLTYPE GetHardwareProtectionState( + BOOL* pHwProtectionEnable); + +}; + +class ID3D11Fence_Wrapper : public ID3D11DeviceChild_Wrapper +{ + public: + ID3D11Fence_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11Fence_Wrapper(); + + static ID3D11Fence_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual HRESULT STDMETHODCALLTYPE CreateSharedHandle( + const SECURITY_ATTRIBUTES* pAttributes, + DWORD dwAccess, + LPCWSTR lpName, + HANDLE* pHandle); + + virtual UINT64 STDMETHODCALLTYPE GetCompletedValue(); + + virtual HRESULT STDMETHODCALLTYPE SetEventOnCompletion( + UINT64 Value, + HANDLE hEvent); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11DeviceContext4_Wrapper : public ID3D11DeviceContext3_Wrapper +{ + public: + ID3D11DeviceContext4_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual HRESULT STDMETHODCALLTYPE Signal( + ID3D11Fence* pFence, + UINT64 Value); + + virtual HRESULT STDMETHODCALLTYPE Wait( + ID3D11Fence* pFence, + UINT64 Value); + +}; + +class ID3D11Device3_Wrapper : public ID3D11Device2_Wrapper +{ + public: + ID3D11Device3_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual HRESULT STDMETHODCALLTYPE CreateTexture2D1( + const D3D11_TEXTURE2D_DESC1* pDesc1, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture2D1** ppTexture2D); + + virtual HRESULT STDMETHODCALLTYPE CreateTexture3D1( + const D3D11_TEXTURE3D_DESC1* pDesc1, + const D3D11_SUBRESOURCE_DATA* pInitialData, + ID3D11Texture3D1** ppTexture3D); + + virtual HRESULT STDMETHODCALLTYPE CreateRasterizerState2( + const D3D11_RASTERIZER_DESC2* pRasterizerDesc, + ID3D11RasterizerState2** ppRasterizerState); + + virtual HRESULT STDMETHODCALLTYPE CreateShaderResourceView1( + ID3D11Resource* pResource, + const D3D11_SHADER_RESOURCE_VIEW_DESC1* pDesc1, + ID3D11ShaderResourceView1** ppSRView1); + + virtual HRESULT STDMETHODCALLTYPE CreateUnorderedAccessView1( + ID3D11Resource* pResource, + const D3D11_UNORDERED_ACCESS_VIEW_DESC1* pDesc1, + ID3D11UnorderedAccessView1** ppUAView1); + + virtual HRESULT STDMETHODCALLTYPE CreateRenderTargetView1( + ID3D11Resource* pResource, + const D3D11_RENDER_TARGET_VIEW_DESC1* pDesc1, + ID3D11RenderTargetView1** ppRTView1); + + virtual HRESULT STDMETHODCALLTYPE CreateQuery1( + const D3D11_QUERY_DESC1* pQueryDesc1, + ID3D11Query1** ppQuery1); + + virtual void STDMETHODCALLTYPE GetImmediateContext3( + ID3D11DeviceContext3** ppImmediateContext); + + virtual HRESULT STDMETHODCALLTYPE CreateDeferredContext3( + UINT ContextFlags, + ID3D11DeviceContext3** ppDeferredContext); + + virtual void STDMETHODCALLTYPE WriteToSubresource( + ID3D11Resource* pDstResource, + UINT DstSubresource, + const D3D11_BOX* pDstBox, + const void* pSrcData, + UINT SrcRowPitch, + UINT SrcDepthPitch); + + virtual void STDMETHODCALLTYPE ReadFromSubresource( + void* pDstData, + UINT DstRowPitch, + UINT DstDepthPitch, + ID3D11Resource* pSrcResource, + UINT SrcSubresource, + const D3D11_BOX* pSrcBox); + +}; + + +/* +** This part is generated from d3d11_4.h in Windows SDK: 10.0.20348.0 +** +*/ + +class ID3D11Device4_Wrapper : public ID3D11Device3_Wrapper +{ + public: + ID3D11Device4_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual HRESULT STDMETHODCALLTYPE RegisterDeviceRemovedEvent( + HANDLE hEvent, + DWORD* pdwCookie); + + virtual void STDMETHODCALLTYPE UnregisterDeviceRemoved( + DWORD dwCookie); + +}; + +class ID3D11Device5_Wrapper : public ID3D11Device4_Wrapper +{ + public: + ID3D11Device5_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual HRESULT STDMETHODCALLTYPE OpenSharedFence( + HANDLE hFence, + REFIID ReturnedInterface, + void** ppFence); + + virtual HRESULT STDMETHODCALLTYPE CreateFence( + UINT64 InitialValue, + D3D11_FENCE_FLAG Flags, + REFIID ReturnedInterface, + void** ppFence); + +}; + +class ID3D11Multithread_Wrapper : public IUnknown_Wrapper +{ + public: + ID3D11Multithread_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11Multithread_Wrapper(); + + static ID3D11Multithread_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual void STDMETHODCALLTYPE Enter(); + + virtual void STDMETHODCALLTYPE Leave(); + + virtual BOOL STDMETHODCALLTYPE SetMultithreadProtected( + BOOL bMTProtect); + + virtual BOOL STDMETHODCALLTYPE GetMultithreadProtected(); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11VideoContext2_Wrapper : public ID3D11VideoContext1_Wrapper +{ + public: + ID3D11VideoContext2_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual void STDMETHODCALLTYPE VideoProcessorSetOutputHDRMetaData( + ID3D11VideoProcessor* pVideoProcessor, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + const void* pHDRMetaData); + + virtual void STDMETHODCALLTYPE VideoProcessorGetOutputHDRMetaData( + ID3D11VideoProcessor* pVideoProcessor, + DXGI_HDR_METADATA_TYPE* pType, + UINT Size, + void* pMetaData); + + virtual void STDMETHODCALLTYPE VideoProcessorSetStreamHDRMetaData( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_HDR_METADATA_TYPE Type, + UINT Size, + const void* pHDRMetaData); + + virtual void STDMETHODCALLTYPE VideoProcessorGetStreamHDRMetaData( + ID3D11VideoProcessor* pVideoProcessor, + UINT StreamIndex, + DXGI_HDR_METADATA_TYPE* pType, + UINT Size, + void* pMetaData); + +}; + +class ID3D11VideoDevice2_Wrapper : public ID3D11VideoDevice1_Wrapper +{ + public: + ID3D11VideoDevice2_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual HRESULT STDMETHODCALLTYPE CheckFeatureSupport( + D3D11_FEATURE_VIDEO Feature, + void* pFeatureSupportData, + UINT FeatureSupportDataSize); + + virtual HRESULT STDMETHODCALLTYPE NegotiateCryptoSessionKeyExchangeMT( + ID3D11CryptoSession* pCryptoSession, + D3D11_CRYPTO_SESSION_KEY_EXCHANGE_FLAGS flags, + UINT DataSize, + void* pData); + +}; + +class ID3D11VideoContext3_Wrapper : public ID3D11VideoContext2_Wrapper +{ + public: + ID3D11VideoContext3_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual HRESULT STDMETHODCALLTYPE DecoderBeginFrame1( + ID3D11VideoDecoder* pDecoder, + ID3D11VideoDecoderOutputView* pView, + UINT ContentKeySize, + const void* pContentKey, + UINT NumComponentHistograms, + const UINT* pHistogramOffsets, + ID3D11Buffer* const* ppHistogramBuffers); + + virtual HRESULT STDMETHODCALLTYPE SubmitDecoderBuffers2( + ID3D11VideoDecoder* pDecoder, + UINT NumBuffers, + const D3D11_VIDEO_DECODER_BUFFER_DESC2* pBufferDesc); + +}; + + +/* +** This part is generated from d3d11on12.h in Windows SDK: 10.0.20348.0 +** +*/ + +HRESULT WINAPI D3D11On12CreateDevice( + IUnknown* pDevice, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + IUnknown* const* ppCommandQueues, + UINT NumQueues, + UINT NodeMask, + ID3D11Device** ppDevice, + ID3D11DeviceContext** ppImmediateContext, + D3D_FEATURE_LEVEL* pChosenFeatureLevel); + +class ID3D11On12Device_Wrapper : public IUnknown_Wrapper +{ + public: + ID3D11On12Device_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + ~ID3D11On12Device_Wrapper(); + + static ID3D11On12Device_Wrapper* GetExistingWrapper(IUnknown* object); + + std::shared_ptr GetObjectInfo() const { return info_; } + + std::shared_ptr GetObjectInfo() { return info_; } + + virtual HRESULT STDMETHODCALLTYPE CreateWrappedResource( + IUnknown* pResource12, + const D3D11_RESOURCE_FLAGS* pFlags11, + D3D12_RESOURCE_STATES InState, + D3D12_RESOURCE_STATES OutState, + REFIID riid, + void** ppResource11); + + virtual void STDMETHODCALLTYPE ReleaseWrappedResources( + ID3D11Resource* const* ppResources, + UINT NumResources); + + virtual void STDMETHODCALLTYPE AcquireWrappedResources( + ID3D11Resource* const* ppResources, + UINT NumResources); + + private: + // Map to prevent creation of more than one interface wrapper per object. + typedef std::unordered_map ObjectMap; + static ObjectMap object_map_; + static std::mutex object_map_lock_; + + std::shared_ptr info_; +}; + +class ID3D11On12Device1_Wrapper : public ID3D11On12Device_Wrapper +{ + public: + ID3D11On12Device1_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual HRESULT STDMETHODCALLTYPE GetD3D12Device( + REFIID riid, + void** ppvDevice); + +}; + +class ID3D11On12Device2_Wrapper : public ID3D11On12Device1_Wrapper +{ + public: + ID3D11On12Device2_Wrapper(REFIID riid, IUnknown* object, DxWrapperResources* resources = nullptr, const std::function& destructor = [](IUnknown_Wrapper* u){ delete reinterpret_cast(u); }); + + virtual HRESULT STDMETHODCALLTYPE UnwrapUnderlyingResource( + ID3D11Resource* pResource11, + ID3D12CommandQueue* pCommandQueue, + REFIID riid, + void** ppvResource12); + + virtual HRESULT STDMETHODCALLTYPE ReturnUnderlyingResource( + ID3D11Resource* pResource11, + UINT NumSync, + UINT64* pSignalValues, + ID3D12Fence** ppFences); + +}; + + /* ** This part is generated from Unknwnbase.h in Windows SDK: 10.0.20348.0 ** diff --git a/framework/generated/vulkan_generators/base_generator.py b/framework/generated/vulkan_generators/base_generator.py index 1682f78a05..f8bb6946b3 100644 --- a/framework/generated/vulkan_generators/base_generator.py +++ b/framework/generated/vulkan_generators/base_generator.py @@ -1241,7 +1241,7 @@ def make_decoded_param_type(self, value): if value.is_pointer or value.is_array: count = value.pointer_count - if self.is_struct(type_name): + if self.is_struct(type_name) or self.is_union(type_name): if ( self.is_dx12_class() and (value.array_dimension and value.array_dimension == 1) @@ -1270,8 +1270,14 @@ def make_decoded_param_type(self, value): type_name = 'StringDecoder' elif type_name == 'void': if value.is_array: - # If this was an array (void*) it was encoded as an array of bytes. - type_name = 'PointerDecoder' + if (self.is_dx12_class() and count > 1): + # If this was a pointer to memory (void**) allocated internally by the implementation, it was encoded as + # an array of bytes but must be retrieved as a pointer to a memory allocation. For this case, the array + # length value defines the size of the memory referenced by the single retrieved pointer. + type_name = 'PointerDecoder' + else: + # If this was an array (void*) it was encoded as an array of bytes. + type_name = 'PointerDecoder' elif count > 1: # If this was a pointer to a pointer to an unknown object (void**), it was encoded as a pointer to a 64-bit address value. # So, we specify uint64_t as the decode type and void* as the type to be used for Vulkan API call output parameters. @@ -1289,7 +1295,7 @@ def make_decoded_param_type(self, value): elif self.is_function_ptr(type_name): # Function pointers are encoded as a 64-bit address value. type_name = 'uint64_t' - elif self.is_struct(type_name): + elif self.is_struct(type_name) or self.is_union(type_name): type_name = 'Decoded_{}'.format(type_name) elif self.is_handle(type_name): type_name = 'format::HandleId' diff --git a/framework/graphics/CMakeLists.txt b/framework/graphics/CMakeLists.txt index a249b01def..e2eab0c86d 100644 --- a/framework/graphics/CMakeLists.txt +++ b/framework/graphics/CMakeLists.txt @@ -37,6 +37,10 @@ target_sources(gfxrecon_graphics $<$:${CMAKE_CURRENT_LIST_DIR}/dx12_util.cpp> $<$:${CMAKE_CURRENT_LIST_DIR}/dx12_shader_id_map.h> $<$:${CMAKE_CURRENT_LIST_DIR}/dx12_shader_id_map.cpp> + $<$:${CMAKE_CURRENT_LIST_DIR}/dx_image_renderer.h> + $<$:${CMAKE_CURRENT_LIST_DIR}/dx_image_renderer.cpp> + $<$:${CMAKE_CURRENT_LIST_DIR}/dx11_image_renderer.h> + $<$:${CMAKE_CURRENT_LIST_DIR}/dx11_image_renderer.cpp> $<$:${CMAKE_CURRENT_LIST_DIR}/dx12_image_renderer.h> $<$:${CMAKE_CURRENT_LIST_DIR}/dx12_image_renderer.cpp> ${CMAKE_CURRENT_LIST_DIR}/fps_info.h diff --git a/framework/graphics/dx11_image_renderer.cpp b/framework/graphics/dx11_image_renderer.cpp new file mode 100644 index 0000000000..53db4f442f --- /dev/null +++ b/framework/graphics/dx11_image_renderer.cpp @@ -0,0 +1,205 @@ +/* +** Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and associated documentation files (the "Software"), +** to deal in the Software without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Software, and to permit persons to whom the +** Software is furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +*/ + +#include "graphics/dx11_image_renderer.h" + +#include + +GFXRECON_BEGIN_NAMESPACE(gfxrecon) +GFXRECON_BEGIN_NAMESPACE(graphics) + +std::unique_ptr DX11ImageRenderer::Create(const DX11ImageRendererConfig& config) +{ + std::unique_ptr out(new DX11ImageRenderer()); + + if (out != nullptr) + { + if (out->Init(config) != S_OK) + { + GFXRECON_LOG_WARNING("DX11ImageRenderer initialization failed"); + } + } + return std::move(out); +} + +//----------------------------------------------------------------------------- +/// Constructor. +//----------------------------------------------------------------------------- +DX11ImageRenderer::DX11ImageRenderer() : + staging_resource_format_(DXGI_FORMAT_UNKNOWN), staging_resource_width_(0), staging_resource_height_(0), + resolve_resource_format_(DXGI_FORMAT_UNKNOWN), resolve_resource_width_(0), resolve_resource_height_(0) + +{} + +//----------------------------------------------------------------------------- +/// Destructor. +//----------------------------------------------------------------------------- +DX11ImageRenderer::~DX11ImageRenderer() {} + +HRESULT DX11ImageRenderer::Init(const DX11ImageRendererConfig& config) +{ + GFXRECON_ASSERT(config.device && config.context); + + if (config.device && config.context) + { + config_ = config; + } + + return S_OK; +} + +HRESULT DX11ImageRenderer::CaptureImage( + ID3D11Texture2D* res, uint32_t sample_count, uint32_t width, uint32_t height, DXGI_FORMAT format) +{ + HRESULT result = E_FAIL; + + if ((res != nullptr) && (width > 0) && (height > 0)) + { + ID3D11Resource* src = res; + result = S_OK; + + if (sample_count > 1) + { + if ((resolve_resource_format_ != format) || (resolve_resource_width_ != width) || + (resolve_resource_height_ != height)) + { + result = CreateResolveResource(width, height, format); + } + + if (SUCCEEDED(result)) + { + GFXRECON_ASSERT(resolve_); + config_.context->ResolveSubresource(resolve_, 0, src, 0, format); + src = resolve_; + } + } + + if ((staging_resource_format_ != format) || (staging_resource_width_ != width) || + (staging_resource_height_ != height)) + { + result = CreateStagingResource(width, height, format); + } + + if (SUCCEEDED(result)) + { + GFXRECON_ASSERT(staging_ != nullptr); + config_.context->CopySubresourceRegion(staging_, 0, 0, 0, 0, src, 0, nullptr); + } + } + + return result; +} + +HRESULT DX11ImageRenderer::CreateStagingResource(uint32_t width, uint32_t height, DXGI_FORMAT format) +{ + D3D11_TEXTURE2D_DESC desc{}; + desc.Width = width; + desc.Height = height; + desc.MipLevels = 1; + desc.ArraySize = 1; + desc.Format = format; + desc.SampleDesc.Count = 1; + desc.SampleDesc.Quality = 0; + desc.Usage = D3D11_USAGE_STAGING; + desc.BindFlags = 0; + desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ; + desc.MiscFlags = 0; + + auto result = config_.device->CreateTexture2D(&desc, nullptr, &staging_); + if (result == S_OK) + { + staging_resource_width_ = width; + staging_resource_height_ = height; + staging_resource_format_ = format; + } + return result; +} + +HRESULT DX11ImageRenderer::CreateResolveResource(uint32_t width, uint32_t height, DXGI_FORMAT format) +{ + D3D11_TEXTURE2D_DESC desc{}; + desc.Width = width; + desc.Height = height; + desc.MipLevels = 1; + desc.ArraySize = 1; + desc.Format = format; + desc.SampleDesc.Count = 1; + desc.SampleDesc.Quality = 0; + desc.Usage = D3D11_USAGE_DEFAULT; + desc.BindFlags = 0; + desc.CPUAccessFlags = 0; + desc.MiscFlags = 0; + + auto result = config_.device->CreateTexture2D(&desc, nullptr, &resolve_); + if (result == S_OK) + { + resolve_resource_width_ = width; + resolve_resource_height_ = height; + resolve_resource_format_ = format; + } + return result; +} + +HRESULT DX11ImageRenderer::RetrieveImageData( + CpuImage& img_out, uint32_t width, uint32_t height, DXGI_FORMAT format, bool convert_to_bgra) +{ + D3D11_MAPPED_SUBRESOURCE mapped_subresource{}; + auto result = config_.context->Map(staging_, 0, D3D11_MAP_READ, 0, &mapped_subresource); + + if (SUCCEEDED(result) && mapped_subresource.pData != nullptr) + { + const auto total_bytes = mapped_subresource.RowPitch * height; + + img_out.pitch = mapped_subresource.RowPitch; + img_out.width = width; + img_out.height = height; + img_out.data.resize(total_bytes); + + auto success = CopyImageData(std::data(img_out.data), + reinterpret_cast(mapped_subresource.pData), + total_bytes, + width, + height, + mapped_subresource.RowPitch, + format, + convert_to_bgra); + + if (!success) + { + // Only report errors once per format. + auto entry = std::find(issued_warning_list_.begin(), issued_warning_list_.end(), format); + if (entry == issued_warning_list_.end()) + { + issued_warning_list_.insert(entry, format); + GFXRECON_LOG_ERROR("DX11ImageRenderer does not support %d DXGI_FORMAT", format); + } + } + + config_.context->Unmap(staging_, 0); + } + + return result; +} + +GFXRECON_END_NAMESPACE(graphics) +GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/graphics/dx11_image_renderer.h b/framework/graphics/dx11_image_renderer.h new file mode 100644 index 0000000000..5e1ed308c0 --- /dev/null +++ b/framework/graphics/dx11_image_renderer.h @@ -0,0 +1,115 @@ +/* +** Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and associated documentation files (the "Software"), +** to deal in the Software without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Software, and to permit persons to whom the +** Software is furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +*/ + +#ifndef GFXRECON_DECODE_DX11_IMAGE_RENDERER_H +#define GFXRECON_DECODE_DX11_IMAGE_RENDERER_H + +#include "graphics/dx_image_renderer.h" +#include "graphics/dx12_util.h" +#include "util/defines.h" + +#include + +#include + +GFXRECON_BEGIN_NAMESPACE(gfxrecon) +GFXRECON_BEGIN_NAMESPACE(graphics) + +//----------------------------------------------------------------------------- +/// A structure containing ImageRenderer initialization info. +//----------------------------------------------------------------------------- +struct DX11ImageRendererConfig +{ + dx12::ID3D11DeviceComPtr device; ///< The device that the Image Renderer will use. + dx12::ID3D11DeviceContextComPtr context; ///< The DeviceContext that the Image Renderer will use. +}; + +//----------------------------------------------------------------------------- +/// An Image Renderer used to capture the DX11 Render Target of the +/// instrumented application. +//----------------------------------------------------------------------------- +class DX11ImageRenderer : public DXImageRenderer +{ + public: + //----------------------------------------------------------------------------- + /// Statically create a DX11ImageRenderer. + /// \param config A structure containing all of the necessary initialization + /// info. + /// \returns A new DX11ImageRenderer instance. + //----------------------------------------------------------------------------- + static std::unique_ptr Create(const DX11ImageRendererConfig& config); + + //----------------------------------------------------------------------------- + /// Destructor. + //----------------------------------------------------------------------------- + virtual ~DX11ImageRenderer() override; + + HRESULT + RetrieveImageData(CpuImage& img_out, uint32_t width, uint32_t height, DXGI_FORMAT format, bool convert_to_bgra); + + //----------------------------------------------------------------------------- + /// Convert a DX11 resource to a CPU-visible linear buffer of pixels. + /// The data is filled in a user-provided CpuImage struct retrieved with + /// #RetrieveImageData. + /// \param res The Render Target resource to capture image data for. + /// \param width The width of the image data. + /// \param height The height of the image data. + /// \returns The result code of the capture operation. + //----------------------------------------------------------------------------- + HRESULT + CaptureImage(ID3D11Texture2D* res, uint32_t sample_count, uint32_t width, uint32_t height, DXGI_FORMAT format); + + private: + //----------------------------------------------------------------------------- + /// Constructor. + //----------------------------------------------------------------------------- + DX11ImageRenderer(); + + //----------------------------------------------------------------------------- + /// Initialize all members needed by this rendering class. + /// \param config A structure containing all of the necessary initialization + /// info. \returns The result code for the initialization step. + //----------------------------------------------------------------------------- + HRESULT Init(const DX11ImageRendererConfig& config); + + HRESULT CreateStagingResource(uint32_t width, uint32_t height, DXGI_FORMAT format); + + HRESULT CreateResolveResource(uint32_t width, uint32_t height, DXGI_FORMAT format); + + private: + DX11ImageRendererConfig config_; ///< The structure containing all configuration info for this Image Renderer. + dx12::ID3D11Texture2DComPtr staging_; + DXGI_FORMAT staging_resource_format_; + uint32_t staging_resource_width_; + uint32_t staging_resource_height_; + dx12::ID3D11Texture2DComPtr resolve_; + DXGI_FORMAT resolve_resource_format_; + uint32_t resolve_resource_width_; + uint32_t resolve_resource_height_; + std::list issued_warning_list_; +}; + +GFXRECON_END_NAMESPACE(graphics) +GFXRECON_END_NAMESPACE(gfxrecon) + +#endif // GFXRECON_DECODE_DX11_IMAGE_RENDERER_H diff --git a/framework/graphics/dx12_image_renderer.cpp b/framework/graphics/dx12_image_renderer.cpp index db4713b755..e1d5595676 100644 --- a/framework/graphics/dx12_image_renderer.cpp +++ b/framework/graphics/dx12_image_renderer.cpp @@ -1,5 +1,6 @@ /* ** Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -22,17 +23,11 @@ #include "graphics/dx12_image_renderer.h" -#include #include GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(graphics) -//----------------------------------------------------------------------------- -/// Statically create a DX12ImageRenderer. -/// \param config A structure containing all of the necessary initialization -/// info. \returns A new DX12ImageRenderer instance. -//----------------------------------------------------------------------------- std::unique_ptr DX12ImageRenderer::Create(const DX12ImageRendererConfig& config) { std::unique_ptr out(new DX12ImageRenderer()); @@ -47,54 +42,6 @@ std::unique_ptr DX12ImageRenderer::Create(const DX12ImageRend return std::move(out); } -void DX12ImageRenderer::ConvertR8G8B8A8ToB8G8R8A8(std::vector& data, UINT width, UINT height, UINT pitch) -{ - uint32_t* pixel; - uint32_t r16, g16, b16, a16, b8g8r8a8; - for (UINT j = 0; j < height; j++) - { - for (UINT i = 0; i < width; i++) - { - pixel = (uint32_t*)((uint8_t*)&data[0] + i * 4 + j * pitch); - - r16 = ((*pixel >> 0U) & 0xFFU); - g16 = ((*pixel >> 8U) & 0xFFU); - b16 = ((*pixel >> 16U) & 0xFFU); - a16 = ((*pixel >> 24U) & 0xFFU); - b8g8r8a8 = ((b16 << 0U) & 0xFFU) | ((g16 << 8U) & 0xFF00U) | ((r16 << 16U) & 0xFF0000U) | - ((a16 << 24U) & 0xFF000000); - *pixel = b8g8r8a8; - } - } -} - -void DX12ImageRenderer::ConvertR10G10B10A2ToB8G8R8A8(std::vector& data, UINT width, UINT height, UINT pitch) -{ - GFXRECON_LOG_INFO_ONCE("Converting image data form R10G10B10A2 to B8G8R8A8. Image RGB data will be truncated to 8 " - "bits and alpha data will be set to 0xFF."); - - uint32_t* pixel; - uint32_t r16, g16, b16, a16, b8g8r8a8; - for (UINT j = 0; j < height; j++) - { - for (UINT i = 0; i < width; i++) - { - pixel = (uint32_t*)((uint8_t*)&data[0] + i * 4 + j * pitch); - - r16 = ((*pixel >> 0U) & 0x3FFU) << 6U; - g16 = ((*pixel >> 10U) & 0x3FFU) << 6U; - b16 = ((*pixel >> 20U) & 0x3FFU) << 6U; - - // Ignore 2-bit alpha, generate opaque image data. - a16 = 0xFFFFU; - - // This truncates 10bit RGB channels to 8 bits. - b8g8r8a8 = ((b16 >> 8U) << 0U) | ((g16 >> 8U) << 8U) | ((r16 >> 8U) << 16U) | ((a16 >> 8U) << 24U); - *pixel = b8g8r8a8; - } - } -} - //----------------------------------------------------------------------------- /// Constructor. //----------------------------------------------------------------------------- @@ -114,29 +61,24 @@ DX12ImageRenderer::~DX12ImageRenderer() } } -//----------------------------------------------------------------------------- -/// Initialize all members needed by this rendering class. -/// \param config A structure containing all of the necessary initialization -/// info. \returns The result code for the initialization step. -//----------------------------------------------------------------------------- HRESULT DX12ImageRenderer::Init(const DX12ImageRendererConfig& config) { - config_ = std::make_unique(config); + config_ = config; // Create command allocator HRESULT result = - config_->device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&cmd_allocator_)); + config_.device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&cmd_allocator_)); // Create command list if (result == S_OK) { - result = config_->device->CreateCommandList( - 0, D3D12_COMMAND_LIST_TYPE_DIRECT, cmd_allocator_.Get(), nullptr, IID_PPV_ARGS(&cmd_list_)); + result = config_.device->CreateCommandList( + 0, D3D12_COMMAND_LIST_TYPE_DIRECT, cmd_allocator_, nullptr, IID_PPV_ARGS(&cmd_list_)); } // Create synchronization objects if (result == S_OK) { - result = config_->device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&fence_)); + result = config_.device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&fence_)); fence_value_ = 1; // Create an event handle to use for frame synchronization @@ -153,35 +95,22 @@ HRESULT DX12ImageRenderer::Init(const DX12ImageRendererConfig& config) return result; } -//----------------------------------------------------------------------------- -/// Convert a DX12 resource to a CPU-visible linear buffer of pixels. -/// The data is filled in a user - provided CpuImage struct. -/// IMPORTANT : Memory inside pImgOut is allocated on behalf of the caller, so -/// it is their responsibility to free it. \param pRes The Render Target -/// resource to capture image data for. \param prevState The previous state that -/// has been set on the resource. \param newWidth The width of the output image -/// data. \param newHeight The height of the output image data. \param format -/// The image format for the output image data. \param pImgOut A pointer to the -/// structure containing all capture image data. \param bFlipX Option used to -/// flip the image horizontally. \param bFlipY Option used to flip the image -/// vertically. \returns The result code of the capture operation. -//----------------------------------------------------------------------------- - -HRESULT DX12ImageRenderer::CaptureImage( - ID3D12Resource* res, D3D12_RESOURCE_STATES prev_state, UINT width, UINT height, UINT pitch, DXGI_FORMAT format) +HRESULT DX12ImageRenderer::CaptureImage(ID3D12Resource* res, + D3D12_RESOURCE_STATES prev_state, + uint32_t width, + uint32_t height, + uint32_t pitch, + DXGI_FORMAT format) { HRESULT result = E_FAIL; if ((res != nullptr) && (width > 0) && (height > 0)) { - auto desc = res->GetDesc(); - // Create temp assets used in this capture - result = cmd_allocator_->Reset(); if (result == S_OK) { - result = cmd_list_->Reset(cmd_allocator_.Get(), nullptr); + result = cmd_list_->Reset(cmd_allocator_, nullptr); } // Render work @@ -203,11 +132,11 @@ HRESULT DX12ImageRenderer::CaptureImage( if (result == S_OK) { - D3D12_TEXTURE_COPY_LOCATION dst_location = { staging_.Get(), D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT }; - dst_location.PlacedFootprint.Footprint.Width = width; - dst_location.PlacedFootprint.Footprint.Height = height; - dst_location.PlacedFootprint.Footprint.Depth = 1; - dst_location.PlacedFootprint.Footprint.Format = format; + D3D12_TEXTURE_COPY_LOCATION dst_location = { staging_, D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT }; + dst_location.PlacedFootprint.Footprint.Width = width; + dst_location.PlacedFootprint.Footprint.Height = height; + dst_location.PlacedFootprint.Footprint.Depth = 1; + dst_location.PlacedFootprint.Footprint.Format = format; dst_location.PlacedFootprint.Footprint.RowPitch = pitch; dst_location.PlacedFootprint.Offset = 0; @@ -224,8 +153,8 @@ HRESULT DX12ImageRenderer::CaptureImage( // Execute the command list result = cmd_list_->Close(); - ID3D12CommandList* pp_command_lists[] = { cmd_list_.Get() }; - config_->cmd_queue->ExecuteCommandLists(_countof(pp_command_lists), pp_command_lists); + ID3D12CommandList* pp_command_lists[] = { cmd_list_ }; + config_.cmd_queue->ExecuteCommandLists(_countof(pp_command_lists), pp_command_lists); WaitCmdListFinish(); } } @@ -234,7 +163,7 @@ HRESULT DX12ImageRenderer::CaptureImage( return result; } -HRESULT DX12ImageRenderer::CreateStagingResource(unsigned int buffer_byte_size) +HRESULT DX12ImageRenderer::CreateStagingResource(uint32_t buffer_byte_size) { D3D12_HEAP_PROPERTIES props{}; props.Type = D3D12_HEAP_TYPE_READBACK; @@ -256,7 +185,7 @@ HRESULT DX12ImageRenderer::CreateStagingResource(unsigned int buffer_byte_size) descriptor.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR; descriptor.Flags = D3D12_RESOURCE_FLAG_NONE; - auto result = config_->device->CreateCommittedResource( + auto result = config_.device->CreateCommittedResource( &props, D3D12_HEAP_FLAG_NONE, &descriptor, D3D12_RESOURCE_STATE_COPY_DEST, nullptr, IID_PPV_ARGS(&staging_)); if (result == S_OK) { @@ -268,11 +197,11 @@ HRESULT DX12ImageRenderer::CreateStagingResource(unsigned int buffer_byte_size) void DX12ImageRenderer::WaitCmdListFinish() { // Signal and increment the fence value - const UINT64 fence_v = fence_value_; - HRESULT result = config_->cmd_queue->Signal(fence_.Get(), fence_v); + const uint64_t fence_v = fence_value_; + HRESULT result = config_.cmd_queue->Signal(fence_, fence_v); fence_value_++; - const UINT64 fenceCompletedVal = fence_->GetCompletedValue(); + const uint64_t fenceCompletedVal = fence_->GetCompletedValue(); // Wait until the previous frame is finished if (fenceCompletedVal < fence_v) @@ -284,7 +213,7 @@ void DX12ImageRenderer::WaitCmdListFinish() HRESULT DX12ImageRenderer::RetrieveImageData( - CpuImage* img_out, UINT width, UINT height, UINT pitch, DXGI_FORMAT format, bool convert_to_bgra) + CpuImage& img_out, uint32_t width, uint32_t height, uint32_t pitch, DXGI_FORMAT format, bool convert_to_bgra) { void* uav_data = nullptr; D3D12_RANGE read_range = { 0, 0 }; @@ -293,34 +222,25 @@ DX12ImageRenderer::RetrieveImageData( if (result == S_OK) { - const UINT total_bytes = pitch * height; - - img_out->pitch = pitch; - img_out->width = width; - img_out->height = height; - img_out->data.resize(total_bytes); - memcpy(&img_out->data[0], uav_data, total_bytes); - - bool is_bgr8 = B8G8R8.find(format) != B8G8R8.end(); - bool is_rgb8 = R8G8B8A8.find(format) != R8G8B8A8.end(); - bool is_r10g10b10a2 = R10G10B10A2.find(format) != R10G10B10A2.end(); - - bool swap_red_blue = (convert_to_bgra && is_rgb8) || (!convert_to_bgra && is_bgr8); - - if (swap_red_blue) - { - ConvertR8G8B8A8ToB8G8R8A8(img_out->data, width, height, pitch); - } - else if (is_r10g10b10a2) - { - ConvertR10G10B10A2ToB8G8R8A8(img_out->data, width, height, pitch); - if (!convert_to_bgra) - { - ConvertR8G8B8A8ToB8G8R8A8(img_out->data, width, height, pitch); - } - } - else if (!(is_bgr8 || is_rgb8 || is_r10g10b10a2)) + const uint32_t total_bytes = pitch * height; + + img_out.pitch = pitch; + img_out.width = width; + img_out.height = height; + img_out.data.resize(total_bytes); + + auto success = CopyImageData(std::data(img_out.data), + reinterpret_cast(uav_data), + total_bytes, + width, + height, + pitch, + format, + convert_to_bgra); + + if (!success) { + // Only report errors once per format. auto entry = std::find(issued_warning_list_.begin(), issued_warning_list_.end(), format); if (entry == issued_warning_list_.end()) { @@ -328,8 +248,10 @@ DX12ImageRenderer::RetrieveImageData( GFXRECON_LOG_ERROR("DX12ImageRenderer does not support %d DXGI_FORMAT", format); } } + staging_->Unmap(0, nullptr); } + return result; } diff --git a/framework/graphics/dx12_image_renderer.h b/framework/graphics/dx12_image_renderer.h index ac428c5068..247e7e8b7b 100644 --- a/framework/graphics/dx12_image_renderer.h +++ b/framework/graphics/dx12_image_renderer.h @@ -1,5 +1,6 @@ /* ** Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -23,105 +24,67 @@ #ifndef GFXRECON_DECODE_DX12_IMAGE_RENDERER_H #define GFXRECON_DECODE_DX12_IMAGE_RENDERER_H +#include "graphics/dx_image_renderer.h" +#include "graphics/dx12_util.h" #include "util/defines.h" #include #include -#include -#include -#include -#include GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(graphics) -static const std::set B8G8R8 = { DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_FORMAT_B8G8R8X8_UNORM, - DXGI_FORMAT_B8G8R8A8_TYPELESS, DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, - DXGI_FORMAT_B8G8R8X8_TYPELESS, DXGI_FORMAT_B8G8R8X8_UNORM_SRGB }; - -static const std::set R8G8B8A8 = { DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, - DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, - DXGI_FORMAT_R8G8B8A8_UINT, DXGI_FORMAT_R8G8B8A8_SNORM, - DXGI_FORMAT_R8G8B8A8_SINT }; - -static const std::set R10G10B10A2 = { DXGI_FORMAT_R10G10B10A2_TYPELESS, - DXGI_FORMAT_R10G10B10A2_UNORM, - DXGI_FORMAT_R10G10B10A2_UINT }; - -/// Bytes per pixel definition -static const UINT BytesPerPixel = 4; - -//----------------------------------------------------------------------------- -/// A structure of data that data we'll upload to a constant buffer. -//----------------------------------------------------------------------------- -struct ConstantBuffer -{ - UINT rt_width; ///< The width of the render target. - UINT flip_x; ///< Responsible for flipping the image horizontally. - UINT flip_y; ///< Responsible for flipping the image vertically. -}; - //----------------------------------------------------------------------------- /// A structure containing ImageRenderer initialization info. //----------------------------------------------------------------------------- struct DX12ImageRendererConfig { - Microsoft::WRL::ComPtr device; ///< The device that the Image Renderer will use. - Microsoft::WRL::ComPtr cmd_queue; ///< The CommandQueue that the Image Renderer will use. -}; - -struct CpuImage -{ - std::vector data; ///< pointer to the image data - unsigned int pitch; ///< pitch of the image - unsigned int width; ///< width of the image - unsigned int height; ///< height of the image + dx12::ID3D12DeviceComPtr device; ///< The device that the Image Renderer will use. + dx12::ID3D12CommandQueueComPtr cmd_queue; ///< The CommandQueue that the Image Renderer will use. }; //----------------------------------------------------------------------------- -/// An Image Renderer used to capture the Render Target of the instrumented -/// application. +/// An Image Renderer used to capture the DX12 Render Target of the +/// instrumented application. //----------------------------------------------------------------------------- -class DX12ImageRenderer +class DX12ImageRenderer : public DXImageRenderer { public: //----------------------------------------------------------------------------- /// Statically create a DX12ImageRenderer. /// \param config A structure containing all of the necessary initialization - /// info. \returns A new DX12ImageRenderer instance. + /// info. + /// \returns A new DX12ImageRenderer instance. //----------------------------------------------------------------------------- static std::unique_ptr Create(const DX12ImageRendererConfig& config); - static void ConvertR8G8B8A8ToB8G8R8A8(std::vector& data, UINT width, UINT height, UINT pitch); - - static void ConvertR10G10B10A2ToB8G8R8A8(std::vector& data, UINT width, UINT height, UINT pitch); - - HRESULT - RetrieveImageData(CpuImage* img_out, UINT width, UINT height, UINT pitch, DXGI_FORMAT format, bool convert_to_bgra); - //----------------------------------------------------------------------------- /// Destructor. //----------------------------------------------------------------------------- - ~DX12ImageRenderer(); + virtual ~DX12ImageRenderer() override; + + HRESULT RetrieveImageData( + CpuImage& img_out, uint32_t width, uint32_t height, uint32_t pitch, DXGI_FORMAT format, bool convert_to_bgra); //----------------------------------------------------------------------------- /// Convert a DX12 resource to a CPU-visible linear buffer of pixels. - /// The data is filled in a user - provided CpuImage struct. - /// IMPORTANT : Memory inside pImgOut is allocated on behalf of the caller, so - /// it is their responsibility to free it. \param pRes The Render Target - /// resource to capture image data for. \param prevState The previous state - /// that has been set on the resource. \param newWidth The width of the output - /// image data. \param newHeight The height of the output image data. \param - /// format The image format for the output image data. \param pImgOut A - /// pointer to the structure containing all capture image data. \param bFlipX - /// Option used to flip the image horizontally. \param bFlipY Option used to - /// flip the image vertically. \returns The result code of the capture - /// operation. + /// The data is filled in a user-provided CpuImage struct retrieved with + /// #RetrieveImageData. + /// \param res The Render Target resource to capture image data for. + /// \param width The width of the image data. + /// \param height The height of the image data. + /// \param pitch The row pitch of the image data. + /// \param format The image format for the output image data. + /// \returns The result code of the capture operation. //----------------------------------------------------------------------------- HRESULT - CaptureImage( - ID3D12Resource* res, D3D12_RESOURCE_STATES prev_state, UINT width, UINT height, UINT pitch, DXGI_FORMAT format); + CaptureImage(ID3D12Resource* res, + D3D12_RESOURCE_STATES prev_state, + uint32_t width, + uint32_t height, + uint32_t pitch, + DXGI_FORMAT format); private: //----------------------------------------------------------------------------- @@ -136,36 +99,24 @@ class DX12ImageRenderer //----------------------------------------------------------------------------- HRESULT Init(const DX12ImageRendererConfig& config); - HRESULT CreateStagingResource(unsigned int buffer_byte_size); + HRESULT CreateStagingResource(uint32_t buffer_byte_size); void WaitCmdListFinish(); - /// The structure containing all configuration info for this Image Renderer. - std::unique_ptr config_; - - /// The command allocator used to make a copy the Render Target. - Microsoft::WRL::ComPtr cmd_allocator_; - - /// The command list that will do the work of copying the Render Target data. - Microsoft::WRL::ComPtr cmd_list_; - - /// Fence used to indicate completed Render Target capture. - Microsoft::WRL::ComPtr fence_; - - /// Handle to the event that indicates completed Render Target capture. - HANDLE fence_event_; - - /// The value to watch for in the next fence wait. - UINT64 fence_value_; - - Microsoft::WRL::ComPtr staging_; - - unsigned int staging_resource_size_; - - std::list issued_warning_list_; + private: + DX12ImageRendererConfig config_; ///< The structure containing all configuration info for this Image Renderer. + dx12::ID3D12CommandAllocatorComPtr cmd_allocator_; ///< The command allocator used to make a copy the Render Target. + dx12::ID3D12GraphicsCommandListComPtr + cmd_list_; ///< The command list that will do the work of copying the Render Target data. + dx12::ID3D12FenceComPtr fence_; ///< Fence used to indicate completed Render Target capture. + HANDLE fence_event_; ///< Handle to the event that indicates completed Render Target capture. + uint64_t fence_value_; ///< The value to watch for in the next fence wait. + dx12::ID3D12ResourceComPtr staging_; + uint32_t staging_resource_size_; + std::list issued_warning_list_; }; GFXRECON_END_NAMESPACE(graphics) GFXRECON_END_NAMESPACE(gfxrecon) -#endif +#endif // GFXRECON_DECODE_DX12_IMAGE_RENDERER_H diff --git a/framework/graphics/dx12_util.cpp b/framework/graphics/dx12_util.cpp index 658f4c0209..d7b4628e21 100644 --- a/framework/graphics/dx12_util.cpp +++ b/framework/graphics/dx12_util.cpp @@ -1,6 +1,7 @@ /* ** Copyright (c) 2021 LunarG, Inc. ** Copyright (c) 2021-2023 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -23,6 +24,8 @@ #include "graphics/dx12_util.h" +#include "graphics/dx11_image_renderer.h" +#include "graphics/dx12_image_renderer.h" #include "util/image_writer.h" #include "util/logging.h" @@ -32,12 +35,191 @@ GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(graphics) GFXRECON_BEGIN_NAMESPACE(dx12) +static uint64_t FindSubresourcePixelByteSize(DXGI_FORMAT format) +{ + static const std::unordered_map byte_size_map = { + { DXGI_FORMAT_R32G32B32A32_TYPELESS, 16 }, + { DXGI_FORMAT_R32G32B32A32_FLOAT, 16 }, + { DXGI_FORMAT_R32G32B32A32_UINT, 16 }, + { DXGI_FORMAT_R32G32B32A32_SINT, 16 }, + { DXGI_FORMAT_R32G32B32_TYPELESS, 12 }, + { DXGI_FORMAT_R32G32B32_FLOAT, 12 }, + { DXGI_FORMAT_R32G32B32_UINT, 12 }, + { DXGI_FORMAT_R32G32B32_SINT, 12 }, + { DXGI_FORMAT_R16G16B16A16_TYPELESS, 8 }, + { DXGI_FORMAT_R16G16B16A16_FLOAT, 8 }, + { DXGI_FORMAT_R16G16B16A16_UNORM, 8 }, + { DXGI_FORMAT_R16G16B16A16_UINT, 8 }, + { DXGI_FORMAT_R16G16B16A16_SNORM, 8 }, + { DXGI_FORMAT_R16G16B16A16_SINT, 8 }, + { DXGI_FORMAT_R32G32_TYPELESS, 8 }, + { DXGI_FORMAT_R32G32_FLOAT, 8 }, + { DXGI_FORMAT_R32G32_UINT, 8 }, + { DXGI_FORMAT_R32G32_SINT, 8 }, + { DXGI_FORMAT_R32G8X24_TYPELESS, 8 }, + { DXGI_FORMAT_D32_FLOAT_S8X24_UINT, 4 }, + { DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS, 4 }, + { DXGI_FORMAT_X32_TYPELESS_G8X24_UINT, 4 }, + { DXGI_FORMAT_R10G10B10A2_TYPELESS, 4 }, + { DXGI_FORMAT_R10G10B10A2_UNORM, 4 }, + { DXGI_FORMAT_R10G10B10A2_UINT, 4 }, + { DXGI_FORMAT_R11G11B10_FLOAT, 4 }, + { DXGI_FORMAT_R8G8B8A8_TYPELESS, 4 }, + { DXGI_FORMAT_R8G8B8A8_UNORM, 4 }, + { DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, 4 }, + { DXGI_FORMAT_R8G8B8A8_UINT, 4 }, + { DXGI_FORMAT_R8G8B8A8_SNORM, 4 }, + { DXGI_FORMAT_R8G8B8A8_SINT, 4 }, + { DXGI_FORMAT_R16G16_TYPELESS, 4 }, + { DXGI_FORMAT_R16G16_FLOAT, 4 }, + { DXGI_FORMAT_R16G16_UNORM, 4 }, + { DXGI_FORMAT_R16G16_UINT, 4 }, + { DXGI_FORMAT_R16G16_SNORM, 4 }, + { DXGI_FORMAT_R16G16_SINT, 4 }, + { DXGI_FORMAT_R32_TYPELESS, 4 }, + { DXGI_FORMAT_D32_FLOAT, 4 }, + { DXGI_FORMAT_R32_FLOAT, 4 }, + { DXGI_FORMAT_R32_UINT, 4 }, + { DXGI_FORMAT_R32_SINT, 4 }, + { DXGI_FORMAT_R24G8_TYPELESS, 4 }, + { DXGI_FORMAT_D24_UNORM_S8_UINT, 4 }, + { DXGI_FORMAT_R24_UNORM_X8_TYPELESS, 4 }, + { DXGI_FORMAT_X24_TYPELESS_G8_UINT, 4 }, + { DXGI_FORMAT_R8G8_TYPELESS, 2 }, + { DXGI_FORMAT_R8G8_UNORM, 2 }, + { DXGI_FORMAT_R8G8_UINT, 2 }, + { DXGI_FORMAT_R8G8_SNORM, 2 }, + { DXGI_FORMAT_R8G8_SINT, 2 }, + { DXGI_FORMAT_R16_TYPELESS, 2 }, + { DXGI_FORMAT_R16_FLOAT, 2 }, + { DXGI_FORMAT_D16_UNORM, 2 }, + { DXGI_FORMAT_R16_UNORM, 2 }, + { DXGI_FORMAT_R16_UINT, 2 }, + { DXGI_FORMAT_R16_SNORM, 2 }, + { DXGI_FORMAT_R16_SINT, 2 }, + { DXGI_FORMAT_R8_TYPELESS, 1 }, + { DXGI_FORMAT_R8_UNORM, 1 }, + { DXGI_FORMAT_R8_UINT, 1 }, + { DXGI_FORMAT_R8_SNORM, 1 }, + { DXGI_FORMAT_R8_SINT, 1 }, + { DXGI_FORMAT_A8_UNORM, 1 }, + { DXGI_FORMAT_R9G9B9E5_SHAREDEXP, 4 }, + { DXGI_FORMAT_R8G8_B8G8_UNORM, + 2 }, // Each 32-bit block describes a pair of pixels: (R8, G8, B8) and (R8, G8, B8) where the R8/B8 values are + // repeated, and the G8 values are unique to each pixel + { DXGI_FORMAT_G8R8_G8B8_UNORM, + 2 }, // Each 32-bit block describes a pair of pixels: (R8, G8, B8) and (R8, G8, B8) where the R8/B8 values + // are repeated, and the G8 values are unique to each pixel + { DXGI_FORMAT_B5G6R5_UNORM, 2 }, // A three-component, 16-bit unsigned-normalized-integer format that supports 5 + // bits for blue, 6 bits for green, and 5 bits for red + { DXGI_FORMAT_B5G5R5A1_UNORM, 4 }, + { DXGI_FORMAT_B8G8R8A8_UNORM, 4 }, + { DXGI_FORMAT_B8G8R8X8_UNORM, 4 }, + { DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM, 4 }, + { DXGI_FORMAT_B8G8R8A8_TYPELESS, 4 }, + { DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, 4 }, + { DXGI_FORMAT_B8G8R8X8_TYPELESS, 4 }, + { DXGI_FORMAT_B8G8R8X8_UNORM_SRGB, 4 }, + { DXGI_FORMAT_P8, 1 }, + { DXGI_FORMAT_A8P8, 2 }, + { DXGI_FORMAT_B4G4R4A4_UNORM, 2 }, + + { DXGI_FORMAT_P208, 1 }, + { DXGI_FORMAT_V208, 1 }, + { DXGI_FORMAT_V408, 1 }, + + { DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE, 4 }, + { DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE, 4 } + }; + + const auto iter = byte_size_map.find(format); + if (iter != byte_size_map.end()) + { + return iter->second; + } + + return 0; +} + +static uint64_t FindCompressedSubresourcePixelByteSize(DXGI_FORMAT format) +{ + static const std::unordered_map byte_size_map = { + { DXGI_FORMAT_BC1_TYPELESS, 8 }, { DXGI_FORMAT_BC1_UNORM, 8 }, { DXGI_FORMAT_BC1_UNORM_SRGB, 8 }, + { DXGI_FORMAT_BC2_TYPELESS, 16 }, { DXGI_FORMAT_BC2_UNORM, 16 }, { DXGI_FORMAT_BC2_UNORM_SRGB, 16 }, + { DXGI_FORMAT_BC3_TYPELESS, 16 }, { DXGI_FORMAT_BC3_UNORM, 16 }, { DXGI_FORMAT_BC3_UNORM_SRGB, 16 }, + { DXGI_FORMAT_BC4_TYPELESS, 8 }, { DXGI_FORMAT_BC4_UNORM, 8 }, { DXGI_FORMAT_BC4_SNORM, 8 }, + { DXGI_FORMAT_BC5_TYPELESS, 16 }, { DXGI_FORMAT_BC5_UNORM, 16 }, { DXGI_FORMAT_BC5_SNORM, 16 }, + { DXGI_FORMAT_BC6H_TYPELESS, 16 }, { DXGI_FORMAT_BC6H_UF16, 16 }, { DXGI_FORMAT_BC6H_SF16, 16 }, + { DXGI_FORMAT_BC7_TYPELESS, 16 }, { DXGI_FORMAT_BC7_UNORM, 16 }, { DXGI_FORMAT_BC7_UNORM_SRGB, 16 } + }; + + const auto iter = byte_size_map.find(format); + if (iter != byte_size_map.end()) + { + return iter->second; + } + + return 0; +} + UINT GetTexturePitch(UINT64 width) { return (width * graphics::BytesPerPixel + D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1) / D3D12_TEXTURE_DATA_PITCH_ALIGNMENT * D3D12_TEXTURE_DATA_PITCH_ALIGNMENT; } +template +static T GetCurrentBackBuffer(IDXGISwapChain* swapchain) +{ + GFXRECON_ASSERT(swapchain != nullptr); + + auto buffer = T{}; + auto swapchain3 = IDXGISwapChain3ComPtr{}; + auto hr = swapchain->QueryInterface(IID_PPV_ARGS(&swapchain3)); + + if (SUCCEEDED(hr)) + { + const int backbuffer_idx = swapchain3->GetCurrentBackBufferIndex(); + swapchain->GetBuffer(backbuffer_idx, IID_PPV_ARGS(&buffer)); + } + + return buffer; +} + +static void WriteImageFile(const std::string& filename_prefix, + uint32_t frame_num, + gfxrecon::util::ScreenshotFormat screenshot_format, + uint32_t width, + uint32_t height, + uint32_t pitch, + size_t size, + const void* data) +{ + std::string filename = filename_prefix; + filename += "_frame_"; + filename += std::to_string(frame_num); + + switch (screenshot_format) + { + default: + GFXRECON_LOG_ERROR("Screenshot format invalid! Expected BMP or PNG, falling back to BMP."); + // Intentional fall-through + case gfxrecon::util::ScreenshotFormat::kBmp: + if (!util::imagewriter::WriteBmpImage(filename + ".bmp", width, height, size, data, pitch)) + { + GFXRECON_LOG_ERROR("Screenshot could not be created: failed to write BMP file %s", filename.c_str()); + } + break; + case gfxrecon::util::ScreenshotFormat::kPng: + if (!util::imagewriter::WritePngImage( + filename + ".png", width, height, size, data, pitch, util::imagewriter::kFormat_RGBA)) + { + GFXRECON_LOG_ERROR("Screenshot could not be created: failed to write PNG file %s", filename.c_str()); + } + break; + } +} + void TakeScreenshot(std::unique_ptr& image_renderer, ID3D12CommandQueue* queue, IDXGISwapChain* swapchain, @@ -45,108 +227,116 @@ void TakeScreenshot(std::unique_ptr& image_renderer const std::string& filename_prefix, gfxrecon::util::ScreenshotFormat screenshot_format) { - if (queue != nullptr && swapchain != nullptr) + if (queue == nullptr || swapchain == nullptr) { - Microsoft::WRL::ComPtr swapchain3 = nullptr; - Microsoft::WRL::ComPtr swapChainCom = swapchain; + return; + } + + auto frame_buffer_resource = GetCurrentBackBuffer(swapchain); + if (frame_buffer_resource) + { + if (image_renderer == nullptr) + { + auto parent_device = dx12::ID3D12DeviceComPtr{}; + auto hr = queue->GetDevice(IID_PPV_ARGS(&parent_device)); - HRESULT hr = swapChainCom.As(&swapchain3); + if (SUCCEEDED(hr)) + { + gfxrecon::graphics::DX12ImageRendererConfig renderer_config; + renderer_config.cmd_queue = queue; + renderer_config.device = parent_device; + + image_renderer = gfxrecon::graphics::DX12ImageRenderer::Create(renderer_config); + } + } - if (hr == S_OK) + if (image_renderer != nullptr) { - const int backbuffer_idx = swapchain3->GetCurrentBackBufferIndex(); + auto fb_desc = frame_buffer_resource->GetDesc(); + auto pitch = GetTexturePitch(fb_desc.Width); - Microsoft::WRL::ComPtr frame_buffer_resource = nullptr; - hr = swapchain->GetBuffer(backbuffer_idx, - __uuidof(ID3D12Resource), - reinterpret_cast(frame_buffer_resource.GetAddressOf())); + HRESULT capture_result = image_renderer->CaptureImage(frame_buffer_resource.GetInterfacePtr(), + D3D12_RESOURCE_STATE_PRESENT, + static_cast(fb_desc.Width), + fb_desc.Height, + static_cast(pitch), + fb_desc.Format); - if (hr == S_OK) + if (SUCCEEDED(capture_result)) { - if (image_renderer == nullptr) + bool convert_to_bgra = (screenshot_format == gfxrecon::util::ScreenshotFormat::kBmp); + auto captured_image = graphics::CpuImage{}; + capture_result = image_renderer->RetrieveImageData(captured_image, + static_cast(fb_desc.Width), + fb_desc.Height, + static_cast(pitch), + fb_desc.Format, + convert_to_bgra); + + if (SUCCEEDED(capture_result)) { - Microsoft::WRL::ComPtr parent_device = nullptr; - hr = queue->GetDevice(IID_PPV_ARGS(&parent_device)); - - if (hr == S_OK) - { - gfxrecon::graphics::DX12ImageRendererConfig renderer_config; - renderer_config.cmd_queue = queue; - renderer_config.device = parent_device.Get(); - - image_renderer = gfxrecon::graphics::DX12ImageRenderer::Create(renderer_config); - } + WriteImageFile(filename_prefix, + frame_num, + screenshot_format, + captured_image.width, + captured_image.height, + captured_image.pitch, + std::size(captured_image.data), + std::data(captured_image.data)); } + } + } + } +} - if (image_renderer != nullptr) - { - D3D12_RESOURCE_DESC fb_desc = frame_buffer_resource->GetDesc(); +void TakeScreenshot(std::unique_ptr& image_renderer, + ID3D11Device* device, + IDXGISwapChain* swapchain, + uint32_t frame_num, + const std::string& filename_prefix, + gfxrecon::util::ScreenshotFormat screenshot_format) +{ + if (device != nullptr && swapchain != nullptr) + { + auto frame_buffer_resource = GetCurrentBackBuffer(swapchain); + if (frame_buffer_resource) + { + if (image_renderer == nullptr) + { + auto device_context = dx12::ID3D11DeviceContextComPtr{}; + device->GetImmediateContext(&device_context); + + gfxrecon::graphics::DX11ImageRendererConfig renderer_config; + renderer_config.device = device; + renderer_config.context = device_context; - auto pitch = GetTexturePitch(fb_desc.Width); + image_renderer = gfxrecon::graphics::DX11ImageRenderer::Create(renderer_config); + } - graphics::CpuImage captured_image = {}; + if (image_renderer != nullptr) + { + auto fb_desc = D3D11_TEXTURE2D_DESC{}; + frame_buffer_resource->GetDesc(&fb_desc); + HRESULT capture_result = image_renderer->CaptureImage( + frame_buffer_resource, fb_desc.SampleDesc.Count, fb_desc.Width, fb_desc.Height, fb_desc.Format); - HRESULT capture_result = image_renderer->CaptureImage(frame_buffer_resource.Get(), - D3D12_RESOURCE_STATE_PRESENT, - static_cast(fb_desc.Width), - fb_desc.Height, - static_cast(pitch), - fb_desc.Format); + if (SUCCEEDED(capture_result)) + { + bool convert_to_bgra = (screenshot_format == gfxrecon::util::ScreenshotFormat::kBmp); + graphics::CpuImage captured_image = {}; + capture_result = image_renderer->RetrieveImageData( + captured_image, fb_desc.Width, fb_desc.Height, fb_desc.Format, convert_to_bgra); - if (capture_result == S_OK) + if (SUCCEEDED(capture_result)) { - bool convert_to_bgra = (screenshot_format == gfxrecon::util::ScreenshotFormat::kBmp); - auto buffer_byte_size = pitch * fb_desc.Height; - capture_result = image_renderer->RetrieveImageData(&captured_image, - static_cast(fb_desc.Width), - fb_desc.Height, - static_cast(pitch), - fb_desc.Format, - convert_to_bgra); - - if (capture_result == S_OK) - { - auto datasize = static_cast(buffer_byte_size); - std::string filename = filename_prefix; - - filename += "_frame_"; - filename += std::to_string(frame_num); - - switch (screenshot_format) - { - default: - GFXRECON_LOG_ERROR( - "Screenshot format invalid! Expected BMP or PNG, falling back to BMP."); - // Intentional fall-through - case gfxrecon::util::ScreenshotFormat::kBmp: - if (!util::imagewriter::WriteBmpImage(filename + ".bmp", - static_cast(fb_desc.Width), - static_cast(fb_desc.Height), - datasize, - std::data(captured_image.data), - static_cast(pitch))) - { - GFXRECON_LOG_ERROR( - "Screenshot could not be created: failed to write BMP file %s", - filename.c_str()); - } - break; - case gfxrecon::util::ScreenshotFormat::kPng: - if (!util::imagewriter::WritePngImage(filename + ".png", - static_cast(fb_desc.Width), - static_cast(fb_desc.Height), - datasize, - std::data(captured_image.data), - static_cast(pitch), - util::imagewriter::kFormat_RGBA)) - { - GFXRECON_LOG_ERROR( - "Screenshot could not be created: failed to write PNG file %s", - filename.c_str()); - } - break; - } - } + WriteImageFile(filename_prefix, + frame_num, + screenshot_format, + captured_image.width, + captured_image.height, + captured_image.pitch, + std::size(captured_image.data), + std::data(captured_image.data)); } } } @@ -412,107 +602,9 @@ void GetAccelerationStructureInputsBufferEntries(D3D12_BUILD_RAYTRACING_ACCELERA // unpadded size through inserting some API calls. uint64_t GetSubresourcePixelByteSize(DXGI_FORMAT format) { - uint64_t size = 0; - std::unordered_map byte_size_map = { - { DXGI_FORMAT_R32G32B32A32_TYPELESS, 16 }, - { DXGI_FORMAT_R32G32B32A32_FLOAT, 16 }, - { DXGI_FORMAT_R32G32B32A32_UINT, 16 }, - { DXGI_FORMAT_R32G32B32A32_SINT, 16 }, - { DXGI_FORMAT_R32G32B32_TYPELESS, 12 }, - { DXGI_FORMAT_R32G32B32_FLOAT, 12 }, - { DXGI_FORMAT_R32G32B32_UINT, 12 }, - { DXGI_FORMAT_R32G32B32_SINT, 12 }, - { DXGI_FORMAT_R16G16B16A16_TYPELESS, 8 }, - { DXGI_FORMAT_R16G16B16A16_FLOAT, 8 }, - { DXGI_FORMAT_R16G16B16A16_UNORM, 8 }, - { DXGI_FORMAT_R16G16B16A16_UINT, 8 }, - { DXGI_FORMAT_R16G16B16A16_SNORM, 8 }, - { DXGI_FORMAT_R16G16B16A16_SINT, 8 }, - { DXGI_FORMAT_R32G32_TYPELESS, 8 }, - { DXGI_FORMAT_R32G32_FLOAT, 8 }, - { DXGI_FORMAT_R32G32_UINT, 8 }, - { DXGI_FORMAT_R32G32_SINT, 8 }, - { DXGI_FORMAT_R32G8X24_TYPELESS, 8 }, - { DXGI_FORMAT_D32_FLOAT_S8X24_UINT, 4 }, - { DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS, 4 }, - { DXGI_FORMAT_X32_TYPELESS_G8X24_UINT, 4 }, - { DXGI_FORMAT_R10G10B10A2_TYPELESS, 4 }, - { DXGI_FORMAT_R10G10B10A2_UNORM, 4 }, - { DXGI_FORMAT_R10G10B10A2_UINT, 4 }, - { DXGI_FORMAT_R11G11B10_FLOAT, 4 }, - { DXGI_FORMAT_R8G8B8A8_TYPELESS, 4 }, - { DXGI_FORMAT_R8G8B8A8_UNORM, 4 }, - { DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, 4 }, - { DXGI_FORMAT_R8G8B8A8_UINT, 4 }, - { DXGI_FORMAT_R8G8B8A8_SNORM, 4 }, - { DXGI_FORMAT_R8G8B8A8_SINT, 4 }, - { DXGI_FORMAT_R16G16_TYPELESS, 4 }, - { DXGI_FORMAT_R16G16_FLOAT, 4 }, - { DXGI_FORMAT_R16G16_UNORM, 4 }, - { DXGI_FORMAT_R16G16_UINT, 4 }, - { DXGI_FORMAT_R16G16_SNORM, 4 }, - { DXGI_FORMAT_R16G16_SINT, 4 }, - { DXGI_FORMAT_R32_TYPELESS, 4 }, - { DXGI_FORMAT_D32_FLOAT, 4 }, - { DXGI_FORMAT_R32_FLOAT, 4 }, - { DXGI_FORMAT_R32_UINT, 4 }, - { DXGI_FORMAT_R32_SINT, 4 }, - { DXGI_FORMAT_R24G8_TYPELESS, 4 }, - { DXGI_FORMAT_D24_UNORM_S8_UINT, 4 }, - { DXGI_FORMAT_R24_UNORM_X8_TYPELESS, 4 }, - { DXGI_FORMAT_X24_TYPELESS_G8_UINT, 4 }, - { DXGI_FORMAT_R8G8_TYPELESS, 2 }, - { DXGI_FORMAT_R8G8_UNORM, 2 }, - { DXGI_FORMAT_R8G8_UINT, 2 }, - { DXGI_FORMAT_R8G8_SNORM, 2 }, - { DXGI_FORMAT_R8G8_SINT, 2 }, - { DXGI_FORMAT_R16_TYPELESS, 2 }, - { DXGI_FORMAT_R16_FLOAT, 2 }, - { DXGI_FORMAT_D16_UNORM, 2 }, - { DXGI_FORMAT_R16_UNORM, 2 }, - { DXGI_FORMAT_R16_UINT, 2 }, - { DXGI_FORMAT_R16_SNORM, 2 }, - { DXGI_FORMAT_R16_SINT, 2 }, - { DXGI_FORMAT_R8_TYPELESS, 1 }, - { DXGI_FORMAT_R8_UNORM, 1 }, - { DXGI_FORMAT_R8_UINT, 1 }, - { DXGI_FORMAT_R8_SNORM, 1 }, - { DXGI_FORMAT_R8_SINT, 1 }, - { DXGI_FORMAT_A8_UNORM, 1 }, - { DXGI_FORMAT_R9G9B9E5_SHAREDEXP, 4 }, - { DXGI_FORMAT_R8G8_B8G8_UNORM, - 2 }, // Each 32-bit block describes a pair of pixels: (R8, G8, B8) and (R8, G8, B8) where the R8/B8 values are - // repeated, and the G8 values are unique to each pixel - { DXGI_FORMAT_G8R8_G8B8_UNORM, - 2 }, // Each 32-bit block describes a pair of pixels: (R8, G8, B8) and (R8, G8, B8) where the R8/B8 values - // are repeated, and the G8 values are unique to each pixel - { DXGI_FORMAT_B5G6R5_UNORM, 2 }, // A three-component, 16-bit unsigned-normalized-integer format that supports 5 - // bits for blue, 6 bits for green, and 5 bits for red - { DXGI_FORMAT_B5G5R5A1_UNORM, 4 }, - { DXGI_FORMAT_B8G8R8A8_UNORM, 4 }, - { DXGI_FORMAT_B8G8R8X8_UNORM, 4 }, - { DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM, 4 }, - { DXGI_FORMAT_B8G8R8A8_TYPELESS, 4 }, - { DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, 4 }, - { DXGI_FORMAT_B8G8R8X8_TYPELESS, 4 }, - { DXGI_FORMAT_B8G8R8X8_UNORM_SRGB, 4 }, - { DXGI_FORMAT_P8, 1 }, - { DXGI_FORMAT_A8P8, 2 }, - { DXGI_FORMAT_B4G4R4A4_UNORM, 2 }, - - { DXGI_FORMAT_P208, 1 }, - { DXGI_FORMAT_V208, 1 }, - { DXGI_FORMAT_V408, 1 }, - - { DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE, 4 }, - { DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE, 4 } - }; + uint64_t size = FindSubresourcePixelByteSize(format); - if (byte_size_map.find(format) != byte_size_map.end()) - { - size = byte_size_map[format]; - } - else + if (size == 0) { GFXRECON_LOG_ERROR("Unsupported format: %d", format); } @@ -695,36 +787,18 @@ void TrackAdapterDesc(IDXGIAdapter* adapter, } } -void TrackAdapters(HRESULT result, void** ppFactory, graphics::dx12::ActiveAdapterMap& adapters) +void TrackAdapters(IDXGIFactory* factory, graphics::dx12::ActiveAdapterMap& adapters) { - if (SUCCEEDED(result)) + if (factory != nullptr) { // First see if the created factory can be queried as a 1.1 factory - IDXGIFactory1* factory1 = reinterpret_cast(*ppFactory); + IDXGIFactory1ComPtr factory1; // DXGI 1.1 tracking (default) - if (SUCCEEDED(factory1->QueryInterface(__uuidof(IDXGIFactory1), reinterpret_cast(&factory1)))) + if (SUCCEEDED(factory->QueryInterface(IID_PPV_ARGS(&factory1)))) { - // Get a fresh enumeration, in case it was previously filled by 1.0 tracking - RemoveDeactivatedAdapters(adapters); - - // Enumerate 1.1 adapters and fetch data with GetDesc1() - IDXGIAdapter1* adapter1 = nullptr; - - for (UINT adapter_idx = 0; SUCCEEDED(factory1->EnumAdapters1(adapter_idx, &adapter1)); ++adapter_idx) - { - DXGI_ADAPTER_DESC1 dxgi_desc = {}; - adapter1->GetDesc1(&dxgi_desc); - - format::AdapterType adapter_type = format::AdapterType::kHardwareAdapter; - if (dxgi_desc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE) - { - adapter_type = format::AdapterType::kSoftwareAdapter; - } - - TrackAdapterDesc(adapter1, adapter_idx, dxgi_desc, adapters, adapter_type); - } - } + TrackAdapters(factory1, adapters); + } // DXGI 1.0 tracking (fall-back) else @@ -732,31 +806,47 @@ void TrackAdapters(HRESULT result, void** ppFactory, graphics::dx12::ActiveAdapt // Only enumerate 1.0 factory adapters if nothing has been seen yet if (adapters.empty()) { - IDXGIFactory* factory = reinterpret_cast(*ppFactory); + // Enumerate 1.0 adapters and fetch data with GetDesc() + IDXGIAdapter* adapter = nullptr; - if (SUCCEEDED(factory->QueryInterface(__uuidof(IDXGIFactory), reinterpret_cast(&factory)))) + for (UINT adapter_idx = 0; SUCCEEDED(factory->EnumAdapters(adapter_idx, &adapter)); ++adapter_idx) { - // Enumerate 1.0 adapters and fetch data with GetDesc() - IDXGIAdapter* adapter = nullptr; + DXGI_ADAPTER_DESC dxgi_desc = {}; + adapter->GetDesc(&dxgi_desc); - for (UINT adapter_idx = 0; SUCCEEDED(factory->EnumAdapters(adapter_idx, &adapter)); ++adapter_idx) - { - DXGI_ADAPTER_DESC dxgi_desc = {}; - adapter->GetDesc(&dxgi_desc); - - TrackAdapterDesc( - adapter, adapter_idx, dxgi_desc, adapters, format::AdapterType::kUnknownAdapter); - } - } - else - { - GFXRECON_LOG_ERROR("Could not enumerate and track factory's adapters.") + TrackAdapterDesc(adapter, adapter_idx, dxgi_desc, adapters, format::AdapterType::kUnknownAdapter); } } } } } +void TrackAdapters(IDXGIFactory1* factory1, graphics::dx12::ActiveAdapterMap& adapters) +{ + if (factory1 != nullptr) + { + // Get a fresh enumeration, in case it was previously filled by 1.0 tracking + RemoveDeactivatedAdapters(adapters); + + // Enumerate 1.1 adapters and fetch data with GetDesc1() + IDXGIAdapter1* adapter1 = nullptr; + + for (UINT adapter_idx = 0; SUCCEEDED(factory1->EnumAdapters1(adapter_idx, &adapter1)); ++adapter_idx) + { + DXGI_ADAPTER_DESC1 dxgi_desc = {}; + adapter1->GetDesc1(&dxgi_desc); + + format::AdapterType adapter_type = format::AdapterType::kHardwareAdapter; + if (dxgi_desc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE) + { + adapter_type = format::AdapterType::kSoftwareAdapter; + } + + TrackAdapterDesc(adapter1, adapter_idx, dxgi_desc, adapters, adapter_type); + } + } +} + void RemoveDeactivatedAdapters(graphics::dx12::ActiveAdapterMap& adapters) { std::vector deactivated_adapters; @@ -774,32 +864,87 @@ void RemoveDeactivatedAdapters(graphics::dx12::ActiveAdapterMap& adapters) } } +IDXGIAdapterComPtr GetAdapter(ID3D11Device* device) +{ + // Get the device's parent adapter. + IDXGIAdapterComPtr adapter; + + if (device) + { + IDXGIDeviceComPtr device_parent; + auto result = device->QueryInterface(IID_PPV_ARGS(&device_parent)); + + if (SUCCEEDED(result) && (device_parent != nullptr)) + { + device_parent->GetAdapter(&adapter); + } + } + + return adapter; +} + +LUID GetAdapterLuid(ID3D11Device* device) +{ + // Get the device's parent adapter identifier. + LUID luid{}; + IDXGIAdapterComPtr adapter = GetAdapter(device); + + if (adapter != nullptr) + { + DXGI_ADAPTER_DESC desc{}; + adapter->GetDesc(&desc); + + luid = desc.AdapterLuid; + } + + return luid; +} + +format::DxgiAdapterDesc* MarkActiveAdapter(ID3D11Device* device, graphics::dx12::ActiveAdapterMap& adapters) +{ + format::DxgiAdapterDesc* active_adapter_desc = nullptr; + + if (device != nullptr) + { + active_adapter_desc = MarkActiveAdapter(GetAdapterLuid(device), adapters); + } + + return active_adapter_desc; +} + format::DxgiAdapterDesc* MarkActiveAdapter(ID3D12Device* device, graphics::dx12::ActiveAdapterMap& adapters) { format::DxgiAdapterDesc* active_adapter_desc = nullptr; if (device != nullptr) { - // Get the device's parent adapter identifier - LUID parent_adapter_luid = device->GetAdapterLuid(); + // Get the device's parent adapter identifier. + active_adapter_desc = MarkActiveAdapter(device->GetAdapterLuid(), adapters); + } + + return active_adapter_desc; +} - const int64_t packed_luid = (parent_adapter_luid.HighPart << 31) | parent_adapter_luid.LowPart; +format::DxgiAdapterDesc* MarkActiveAdapter(LUID parent_adapter_luid, graphics::dx12::ActiveAdapterMap& adapters) +{ + format::DxgiAdapterDesc* active_adapter_desc = nullptr; - // Mark an adapter as active - for (auto& adapter : adapters) + const int64_t packed_luid = (parent_adapter_luid.HighPart << 31) | parent_adapter_luid.LowPart; + + // Mark an adapter as active + for (auto& adapter : adapters) + { + if (adapter.first == packed_luid) { - if (adapter.first == packed_luid) + // Only return adapter desc pointer if it hasn't already been seen + if (adapter.second.active == false) { - // Only return adapter desc pointer if it hasn't already been seen - if (adapter.second.active == false) - { - active_adapter_desc = &adapter.second.internal_desc; - } + active_adapter_desc = &adapter.second.internal_desc; + } - adapter.second.active = true; + adapter.second.active = true; - break; - } + break; } } @@ -1295,6 +1440,570 @@ void RobustGetCopyableFootprint(ID3D12Device* device, } } +bool IsFormatCompressed(DXGI_FORMAT format) +{ + switch (format) + { + case DXGI_FORMAT_BC1_TYPELESS: + case DXGI_FORMAT_BC1_UNORM: + case DXGI_FORMAT_BC1_UNORM_SRGB: + case DXGI_FORMAT_BC2_TYPELESS: + case DXGI_FORMAT_BC2_UNORM: + case DXGI_FORMAT_BC2_UNORM_SRGB: + case DXGI_FORMAT_BC3_TYPELESS: + case DXGI_FORMAT_BC3_UNORM: + case DXGI_FORMAT_BC3_UNORM_SRGB: + case DXGI_FORMAT_BC4_TYPELESS: + case DXGI_FORMAT_BC4_UNORM: + case DXGI_FORMAT_BC4_SNORM: + case DXGI_FORMAT_BC5_TYPELESS: + case DXGI_FORMAT_BC5_UNORM: + case DXGI_FORMAT_BC5_SNORM: + case DXGI_FORMAT_BC6H_TYPELESS: + case DXGI_FORMAT_BC6H_UF16: + case DXGI_FORMAT_BC6H_SF16: + case DXGI_FORMAT_BC7_TYPELESS: + case DXGI_FORMAT_BC7_UNORM: + case DXGI_FORMAT_BC7_UNORM_SRGB: + return true; + } + + return false; +} + +uint64_t GetCompressedSubresourcePixelByteSize(DXGI_FORMAT format) +{ + auto size = FindCompressedSubresourcePixelByteSize(format); + + if (size == 0) + { + GFXRECON_LOG_ERROR("Unsupported format: %d", format); + } + + return size; +} + +uint64_t GetPixelByteSize(DXGI_FORMAT format) +{ + auto size = graphics::dx12::FindSubresourcePixelByteSize(format); + + if (size == 0) + { + // Check for BC format. + size = FindCompressedSubresourcePixelByteSize(format); + + if ((size == 0) && (format == DXGI_FORMAT_R1_UNORM)) + { + size = 1; + } + } + + if (size == 0) + { + GFXRECON_LOG_ERROR("Unsupported format: %d", format); + } + + return size; +} + +uint32_t GetNumMipLevels(uint32_t mip_levels, uint32_t width, uint32_t height, uint32_t depth) +{ + if (mip_levels != 0) + { + return mip_levels; + } + + return (static_cast(floor(log2(std::max(width, std::max(height, depth))))) + 1u); +} + +uint32_t GetNumSubresources(const D3D11_TEXTURE1D_DESC* desc) +{ + GFXRECON_ASSERT(desc != nullptr); + return GetNumMipLevels(desc->MipLevels, desc->Width) * desc->ArraySize; +} + +uint32_t GetNumSubresources(const D3D11_TEXTURE2D_DESC* desc) +{ + GFXRECON_ASSERT(desc != nullptr); + return GetNumMipLevels(desc->MipLevels, desc->Width, desc->Height) * desc->ArraySize; +} + +uint32_t GetNumSubresources(const D3D11_TEXTURE3D_DESC* desc) +{ + GFXRECON_ASSERT(desc != nullptr); + return GetNumMipLevels(desc->MipLevels, desc->Width, desc->Height, desc->Depth); +} + +uint32_t GetNumSubresources(const D3D11_TEXTURE2D_DESC1* desc) +{ + GFXRECON_ASSERT(desc != nullptr); + return GetNumMipLevels(desc->MipLevels, desc->Width, desc->Height) * desc->ArraySize; +} + +uint32_t GetNumSubresources(const D3D11_TEXTURE3D_DESC1* desc) +{ + GFXRECON_ASSERT(desc != nullptr); + return GetNumMipLevels(desc->MipLevels, desc->Width, desc->Height, desc->Depth); +} + +uint32_t GetSubresourceDimension(uint32_t dimension, uint32_t mip_levels, uint32_t subresource) +{ + auto mip_level = subresource % mip_levels; + return std::max(dimension >> mip_level, 1u); +} + +uint64_t GetSubresourceSize(const D3D11_TEXTURE1D_DESC* desc, const D3D11_SUBRESOURCE_DATA* data, uint32_t subresource) +{ + GFXRECON_UNREFERENCED_PARAMETER(data); + GFXRECON_ASSERT(desc != nullptr); + return GetSubresourceSizeTex1D( + desc->Format, GetNumMipLevels(desc->MipLevels, desc->Width), desc->MipLevels, subresource); +} + +uint64_t GetSubresourceSize(const D3D11_TEXTURE2D_DESC* desc, const D3D11_SUBRESOURCE_DATA* data, uint32_t subresource) +{ + GFXRECON_ASSERT(data != nullptr); + GFXRECON_ASSERT(desc != nullptr); + return GetSubresourceSizeTex2D(desc->Format, + desc->Height, + GetNumMipLevels(desc->MipLevels, desc->Width, desc->Height), + data->SysMemPitch, + subresource); +} + +uint64_t GetSubresourceSize(const D3D11_TEXTURE3D_DESC* desc, const D3D11_SUBRESOURCE_DATA* data, uint32_t subresource) +{ + GFXRECON_ASSERT(data != nullptr); + GFXRECON_ASSERT(desc != nullptr); + return GetSubresourceSizeTex3D(desc->Depth, + GetNumMipLevels(desc->MipLevels, desc->Width, desc->Height, desc->Depth), + data->SysMemSlicePitch, + subresource); +} + +uint64_t GetSubresourceSize(const D3D11_TEXTURE2D_DESC1* desc, const D3D11_SUBRESOURCE_DATA* data, uint32_t subresource) +{ + GFXRECON_ASSERT(data != nullptr); + GFXRECON_ASSERT(desc != nullptr); + return GetSubresourceSizeTex2D(desc->Format, + desc->Height, + GetNumMipLevels(desc->MipLevels, desc->Width, desc->Height), + data->SysMemPitch, + subresource); +} + +uint64_t GetSubresourceSize(const D3D11_TEXTURE3D_DESC1* desc, const D3D11_SUBRESOURCE_DATA* data, uint32_t subresource) +{ + GFXRECON_ASSERT(data != nullptr); + GFXRECON_ASSERT(desc != nullptr); + return GetSubresourceSizeTex3D(desc->Depth, + GetNumMipLevels(desc->MipLevels, desc->Width, desc->Height, desc->Depth), + data->SysMemSlicePitch, + subresource); +} + +uint64_t GetSubresourceSize(D3D11_RESOURCE_DIMENSION type, + DXGI_FORMAT format, + uint32_t width, + uint32_t height, + uint32_t depth, + uint32_t mip_levels, + uint32_t row_pitch, + uint32_t depth_pitch, + uint32_t subresource) +{ + auto data_size = 0ull; + + switch (type) + { + case D3D12_RESOURCE_DIMENSION_BUFFER: + data_size = width; + break; + case D3D12_RESOURCE_DIMENSION_TEXTURE1D: + data_size = GetSubresourceSizeTex1D(format, width, mip_levels, subresource); + break; + case D3D12_RESOURCE_DIMENSION_TEXTURE2D: + data_size = GetSubresourceSizeTex2D(format, height, mip_levels, row_pitch, subresource); + break; + case D3D12_RESOURCE_DIMENSION_TEXTURE3D: + data_size = GetSubresourceSizeTex3D(depth, mip_levels, depth_pitch, subresource); + break; + case D3D12_RESOURCE_DIMENSION_UNKNOWN: + GFXRECON_LOG_ERROR("Detected resource with D3D11_RESOURCE_DIMENSION_UNKNOWN dimension"); + break; + default: + GFXRECON_LOG_DEBUG("Unrecognized D3D11 resource dimension"); + break; + } + + return data_size; +} + +uint64_t GetSubresourceSizeTex1D(DXGI_FORMAT format, uint32_t width, uint32_t mip_levels, uint32_t subresource) +{ + auto mip_level = subresource % mip_levels; + auto mip_width = std::max(width >> mip_level, 1u); + + if (IsFormatCompressed(format)) + { + mip_width = (mip_width + 3) / 4; + } + + return static_cast(mip_width) * GetPixelByteSize(format); +} + +uint64_t GetSubresourceSizeTex2D( + DXGI_FORMAT format, uint32_t height, uint32_t mip_levels, uint32_t row_pitch, uint32_t subresource) +{ + + auto mip_level = subresource % mip_levels; + auto mip_height = std::max(height >> mip_level, 1u); + + if (IsFormatCompressed(format)) + { + mip_height = (mip_height + 3) / 4; + } + + return static_cast(mip_height) * row_pitch; +} + +uint64_t GetSubresourceSizeTex3D(uint32_t depth, uint32_t mip_levels, uint32_t depth_pitch, uint32_t subresource) +{ + auto mip_level = subresource % mip_levels; + auto mip_depth = std::max(depth >> mip_level, 1u); + + return static_cast(mip_depth) * depth_pitch; +} + +uint64_t GetSubresourceWriteDataSize(D3D11_RESOURCE_DIMENSION dst_type, + DXGI_FORMAT dst_format, + uint32_t dst_width, + uint32_t dst_height, + uint32_t dst_depth, + uint32_t dst_mip_levels, + uint32_t dst_subresource, + const D3D11_BOX* dst_box, + uint32_t src_row_pitch, + uint32_t src_depth_pitch) +{ + auto data_size = 0ull; + auto empty_box = false; + + if (dst_box == nullptr) + { + // If pDstBox == nullptr, the data is written to the destination subresource with no offset + // Quote: A pointer to a box that defines the portion of the destination subresource to copy + // the resource data into. If NULL, the data is written to the destination subresource + // with no offset. + // Source: + // https://docs.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12resource-writetosubresource + + switch (dst_type) + { + case D3D12_RESOURCE_DIMENSION_BUFFER: + data_size = dst_width; + break; + case D3D12_RESOURCE_DIMENSION_TEXTURE1D: + data_size = GetSubresourceSizeTex1D(dst_format, dst_width, dst_mip_levels, dst_subresource); + break; + case D3D12_RESOURCE_DIMENSION_TEXTURE2D: + data_size = + GetSubresourceSizeTex2D(dst_format, dst_height, dst_mip_levels, src_row_pitch, dst_subresource); + break; + case D3D12_RESOURCE_DIMENSION_TEXTURE3D: + data_size = GetSubresourceSizeTex3D(dst_depth, dst_mip_levels, src_depth_pitch, dst_subresource); + break; + case D3D12_RESOURCE_DIMENSION_UNKNOWN: + GFXRECON_LOG_ERROR("Detected resource with D3D11_RESOURCE_DIMENSION_UNKNOWN dimension"); + break; + default: + GFXRECON_LOG_DEBUG("Unrecognized D3D11 resource dimension"); + break; + } + } + else + { + if ((dst_box->left >= dst_box->right) || (dst_box->front >= dst_box->back) || (dst_box->top >= dst_box->bottom)) + { + empty_box = true; + } + + // When the box is empty, UpdateSubresource call doesn't perform any operation + // Quote: An empty box results in a no-op. A box is empty if the top value is greater than or equal to + // the bottom value, or the left value is greater than or equal to the right value, or the front + // value is greater than or equal to the back value. When the box is empty, this method doesn't + // perform any operation. + // Source: + // https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-updatesubresource + if (!empty_box) + { + auto box_width = dst_box->right - dst_box->left; + + switch (dst_type) + { + case D3D12_RESOURCE_DIMENSION_BUFFER: + data_size = static_cast(box_width); + break; + case D3D12_RESOURCE_DIMENSION_TEXTURE1D: + { + if (IsFormatCompressed(dst_format)) + { + box_width = (box_width + 3) / 4; + } + + data_size = static_cast(box_width) * GetPixelByteSize(dst_format); + break; + } + case D3D12_RESOURCE_DIMENSION_TEXTURE2D: + { + auto box_height = dst_box->bottom - dst_box->top; + + if (IsFormatCompressed(dst_format)) + { + box_width = (box_width + 3) / 4; + box_height = (box_height + 3) / 4; + } + + data_size = static_cast(box_width) * static_cast(box_height) * + GetPixelByteSize(dst_format); + break; + } + case D3D12_RESOURCE_DIMENSION_TEXTURE3D: + { + auto box_height = dst_box->bottom - dst_box->top; + auto box_depth = dst_box->back - dst_box->front; + + if (IsFormatCompressed(dst_format)) + { + box_width = (box_width + 3) / 4; + box_height = (box_height + 3) / 4; + } + + data_size = static_cast(box_width) * static_cast(box_height) * + static_cast(box_depth) * GetPixelByteSize(dst_format); + break; + } + case D3D12_RESOURCE_DIMENSION_UNKNOWN: + GFXRECON_LOG_ERROR("Detected resource with D3D12_RESOURCE_DIMENSION_UNKNOWN dimension"); + break; + default: + GFXRECON_LOG_ERROR("Detected invalid resource dimensions"); + break; + } + } + } + + return data_size; +} + +bool NeedUpdateSubresourceAdjustment(bool context_needs_adjustment, const D3D11_BOX* dst_box) +{ + return (context_needs_adjustment && (dst_box != nullptr) && + (dst_box->left != 0 || dst_box->top != 0 || dst_box->front != 0)); +} + +uint64_t GetUpdateSubresourceAdjustmentOffset(D3D11_RESOURCE_DIMENSION dst_type, + DXGI_FORMAT dst_format, + const D3D11_BOX* dst_box, + uint32_t src_row_pitch, + uint32_t src_depth_pitch) +{ + // The use of UpdateSubresource from a deferred context requires an adjustment to the pSrcData start address value, + // which must be inverted prior to encoding so that the correct data is written to the file. Note that the + // adjustment/workaround is not required for UpdateSubresource1. + GFXRECON_ASSERT(dst_box != nullptr); + + auto left = static_cast(dst_box->left); + + // Skip pixel size calculations for buffers. + if (dst_type == D3D11_RESOURCE_DIMENSION_BUFFER) + { + return left; + } + + auto top = static_cast(dst_box->top); + auto front = static_cast(dst_box->front); + + if (IsFormatCompressed(dst_format)) + { + left = (left + 3) / 4; + top = (top + 3) / 4; + } + + auto adjusted_offset = 0ull; + + switch (dst_type) + { + case D3D12_RESOURCE_DIMENSION_TEXTURE1D: + adjusted_offset = left * GetPixelByteSize(dst_format); + break; + case D3D12_RESOURCE_DIMENSION_TEXTURE2D: + adjusted_offset = (top * src_row_pitch) + (left * GetPixelByteSize(dst_format)); + break; + case D3D12_RESOURCE_DIMENSION_TEXTURE3D: + adjusted_offset = (front * src_depth_pitch) + (top * src_row_pitch) + (left * GetPixelByteSize(dst_format)); + break; + case D3D12_RESOURCE_DIMENSION_UNKNOWN: + GFXRECON_LOG_ERROR("Detected resource with D3D12_RESOURCE_DIMENSION_UNKNOWN dimension"); + break; + default: + GFXRECON_ASSERT(dst_type != D3D12_RESOURCE_DIMENSION_BUFFER); + GFXRECON_LOG_ERROR("Detected invalid resource dimensions"); + break; + } + + return adjusted_offset; +} + +void CopyAlignedTexture1D( + const uint8_t* src, uint8_t* dst, uint32_t src_row_pitch, uint32_t dst_row_pitch, size_t offset, size_t size) +{ + uint32_t copy_width = std::min(src_row_pitch, dst_row_pitch); + + // The copy offset would only be less than the copy width if the captured data was only from the padding at the + // end of the row and the replay row pitch was smaller than the capture row pitch. + if (offset < dst_row_pitch) + { + // If the data only represents a partial single row, determined by + // copy_width > first_slice_size, limit the copy size to the remaining data size. + auto copy_row_size = std::min(static_cast(copy_width - offset), size); + dst += offset; + util::platform::MemoryCopy(dst, copy_row_size, src, copy_row_size); + } +} + +void CopyAlignedTexture2D( + const uint8_t* src, uint8_t* dst, uint32_t src_row_pitch, uint32_t dst_row_pitch, size_t offset, size_t size) +{ + uint32_t copy_width = std::min(src_row_pitch, dst_row_pitch); + + auto current_size = size; + auto first_row = static_cast(offset / src_row_pitch); + auto first_row_offset = static_cast(offset % src_row_pitch); + + dst += first_row * dst_row_pitch; + + if (first_row_offset != 0) + { + // The copy offset would only be less than the copy width if the captured data was only from the padding at the + // end of the row and the replay row pitch was smaller than the capture row pitch. + if (first_row_offset < dst_row_pitch) + { + // Copy the first partial row. If the data only represents a partial single row, determined by + // copy_width - first_row_offset > current_size, limit the copy size to the remaining data size. + auto copy_row_size = std::min(static_cast(copy_width - first_row_offset), current_size); + dst += first_row_offset; + util::platform::MemoryCopy(dst, copy_row_size, src, copy_row_size); + + // Advance data pointer to the start of the next row. + dst += dst_row_pitch - first_row_offset; + } + else + { + dst += dst_row_pitch; + } + + // Adjust the current data size based on the capture width of the current row, or the remaining data size if all + // of the data fits into a partial first row. + auto first_row_size = src_row_pitch - first_row_offset; + current_size -= std::min(static_cast(first_row_size), current_size); + + // Advance data pointer to the start of the next row. + src += first_row_size; + } + + // Compute the total number of complete rows remining for the resource and determine if the + // data contains a final partial row. + if (current_size != 0) + { + auto total_rows = static_cast(current_size / src_row_pitch); + auto remaining_row_size = static_cast(current_size % src_row_pitch); + + // Process complete rows. + for (uint32_t j = 0; j < total_rows; ++j) + { + util::platform::MemoryCopy(dst, copy_width, src, copy_width); + + src += src_row_pitch; + dst += dst_row_pitch; + } + + // Process final partial row. + if (remaining_row_size != 0) + { + auto copy_row_size = std::min(remaining_row_size, copy_width); + util::platform::MemoryCopy(dst, copy_row_size, src, copy_row_size); + } + } +} + +void CopyAlignedTexture3D(const uint8_t* src, + uint8_t* dst, + uint32_t src_row_pitch, + uint32_t dst_row_pitch, + uint32_t src_depth_pitch, + uint32_t dst_depth_pitch, + size_t offset, + size_t size) +{ + uint32_t copy_depth = std::min(src_depth_pitch, dst_depth_pitch); + + auto current_size = size; + auto first_slice = static_cast(offset / src_depth_pitch); + auto first_slice_offset = static_cast(offset % src_depth_pitch); + + dst += first_slice * dst_depth_pitch; + + if (first_slice_offset != 0) + { + // The copy offset would only be less than the copy width if the captured data was only from the padding at the + // end of the slice and the replay depth pitch was smaller than the capture depth pitch. + if (first_slice_offset < dst_depth_pitch) + { + // Copy the first partial slice. If the data only represents a partial single slice, determined by + // first_slice_size > current_size, limit the copy size to the remaining data size. + CopyAlignedTexture2D(src, + dst, + src_row_pitch, + dst_row_pitch, + first_slice_offset, + std::min(static_cast(copy_depth - first_slice_offset), current_size)); + } + + // Adjust the current data size based on the capture depth of the current slice, or the remaining data size if + // all of the data fits into a partial first slice. + auto first_slice_size = src_depth_pitch - first_slice_offset; + current_size -= std::min(static_cast(first_slice_size), current_size); + + // Advance data pointers to the start of the next slice. + src += first_slice_size; + dst += dst_depth_pitch; + } + + // Compute the total number of complete rows remining for the resource and determine if the + // data contains a final partial row. + if (current_size != 0) + { + auto total_slices = static_cast(current_size / src_depth_pitch); + auto remaining_slice_size = static_cast(current_size % src_depth_pitch); + + // Process complete slices. + for (uint32_t j = 0; j < total_slices; ++j) + { + CopyAlignedTexture2D(src, dst, src_row_pitch, dst_row_pitch, 0, copy_depth); + + src += src_depth_pitch; + dst += dst_depth_pitch; + } + + // Process final partial slice. + if (remaining_slice_size != 0) + { + CopyAlignedTexture2D(src, dst, src_row_pitch, dst_row_pitch, 0, std::min(remaining_slice_size, copy_depth)); + } + } +} + GFXRECON_END_NAMESPACE(dx12) GFXRECON_END_NAMESPACE(graphics) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/graphics/dx12_util.h b/framework/graphics/dx12_util.h index 0aaae13e35..1542230a4a 100644 --- a/framework/graphics/dx12_util.h +++ b/framework/graphics/dx12_util.h @@ -1,6 +1,7 @@ /* ** Copyright (c) 2021 LunarG, Inc. ** Copyright (c) 2021-2023 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -28,20 +29,30 @@ #include "util/logging.h" #include "util/options.h" #include "util/platform.h" -#include "graphics/dx12_image_renderer.h" #include "format/format.h" #include +#include +#include #include #include -#include -#include #include +#include +#include GFXRECON_BEGIN_NAMESPACE(gfxrecon) GFXRECON_BEGIN_NAMESPACE(graphics) + +class DX11ImageRenderer; +class DX12ImageRenderer; + GFXRECON_BEGIN_NAMESPACE(dx12) +typedef _com_ptr_t<_com_IIID> IDXGIAdapterComPtr; +typedef _com_ptr_t<_com_IIID> IDXGIDeviceComPtr; +typedef _com_ptr_t<_com_IIID> IDXGIFactoryComPtr; +typedef _com_ptr_t<_com_IIID> IDXGIFactory1ComPtr; +typedef _com_ptr_t<_com_IIID> IDXGISwapChainComPtr; typedef _com_ptr_t<_com_IIID> IDXGISwapChain3ComPtr; typedef _com_ptr_t<_com_IIID> ID3D12DescriptorHeapComPtr; @@ -69,6 +80,11 @@ typedef _com_ptr_t< ID3D12VersionedRootSignatureDeserializerComPtr; typedef _com_ptr_t<_com_IIID> ID3D12ObjectComPtr; +typedef _com_ptr_t<_com_IIID> ID3D11DeviceComPtr; +typedef _com_ptr_t<_com_IIID> ID3D11DeviceChildComPtr; +typedef _com_ptr_t<_com_IIID> ID3D11DeviceContextComPtr; +typedef _com_ptr_t<_com_IIID> ID3D11Texture2DComPtr; + struct ActiveAdapterInfo { format::DxgiAdapterDesc internal_desc; @@ -111,6 +127,13 @@ void TakeScreenshot(std::unique_ptr& imag const std::string& filename_prefix, gfxrecon::util::ScreenshotFormat screenshot_format); +void TakeScreenshot(std::unique_ptr& image_renderer, + ID3D11Device* device, + IDXGISwapChain* swapchain, + uint32_t frame_num, + const std::string& filename_prefix, + gfxrecon::util::ScreenshotFormat screenshot_format); + // Maps a given sub resource and returns a pointer to the mapped region in data_ptr. HRESULT MapSubresource(ID3D12Resource* resource, UINT subresource, @@ -190,12 +213,22 @@ uint64_t GetOneRowSizeByDXGIFormat(ID3D12Resource* resource, uint64_t GetSubresourceWriteDataSize( ID3D12Resource* resource, UINT dst_subresource, const D3D12_BOX* dst_box, UINT src_row_pitch, UINT src_depth_pitch); -void TrackAdapters(HRESULT result, void** ppfactory, graphics::dx12::ActiveAdapterMap& adapters); +void TrackAdapters(IDXGIFactory* factory, graphics::dx12::ActiveAdapterMap& adapters); + +void TrackAdapters(IDXGIFactory1* factory, graphics::dx12::ActiveAdapterMap& adapters); void RemoveDeactivatedAdapters(graphics::dx12::ActiveAdapterMap& adapters); +IDXGIAdapterComPtr GetAdapter(ID3D11Device* device); + +LUID GetAdapterLuid(ID3D11Device* device); + +format::DxgiAdapterDesc* MarkActiveAdapter(ID3D11Device* device, graphics::dx12::ActiveAdapterMap& adapters); + format::DxgiAdapterDesc* MarkActiveAdapter(ID3D12Device* device, graphics::dx12::ActiveAdapterMap& adapters); +format::DxgiAdapterDesc* MarkActiveAdapter(LUID parent_adapter_luid, graphics::dx12::ActiveAdapterMap& adapters); + // Query adapter and index by LUID bool GetAdapterAndIndexbyLUID(LUID luid, IDXGIAdapter*& adapter_ptr, @@ -279,6 +312,89 @@ void RobustGetCopyableFootprint(ID3D12Device* device, UINT64* pRowSizeInBytes, UINT64* pTotalBytes); +bool IsFormatCompressed(DXGI_FORMAT format); + +uint64_t GetCompressedSubresourcePixelByteSize(DXGI_FORMAT format); + +uint64_t GetPixelByteSize(DXGI_FORMAT format); + +uint32_t GetNumMipLevels(uint32_t mip_levels, uint32_t width, uint32_t height = 0, uint32_t depth = 0); + +uint32_t GetNumSubresources(const D3D11_TEXTURE1D_DESC* desc); + +uint32_t GetNumSubresources(const D3D11_TEXTURE2D_DESC* desc); + +uint32_t GetNumSubresources(const D3D11_TEXTURE3D_DESC* desc); + +uint32_t GetNumSubresources(const D3D11_TEXTURE2D_DESC1* desc); + +uint32_t GetNumSubresources(const D3D11_TEXTURE3D_DESC1* desc); + +uint32_t GetSubresourceDimension(uint32_t dimension, uint32_t mip_levels, uint32_t subresource); + +uint64_t GetSubresourceSize(const D3D11_TEXTURE1D_DESC* desc, const D3D11_SUBRESOURCE_DATA* data, uint32_t subresource); + +uint64_t GetSubresourceSize(const D3D11_TEXTURE2D_DESC* desc, const D3D11_SUBRESOURCE_DATA* data, uint32_t subresource); + +uint64_t GetSubresourceSize(const D3D11_TEXTURE3D_DESC* desc, const D3D11_SUBRESOURCE_DATA* data, uint32_t subresource); + +uint64_t +GetSubresourceSize(const D3D11_TEXTURE2D_DESC1* desc, const D3D11_SUBRESOURCE_DATA* data, uint32_t subresource); + +uint64_t +GetSubresourceSize(const D3D11_TEXTURE3D_DESC1* desc, const D3D11_SUBRESOURCE_DATA* data, uint32_t subresource); + +uint64_t GetSubresourceSize(D3D11_RESOURCE_DIMENSION type, + DXGI_FORMAT format, + uint32_t width, + uint32_t height, + uint32_t depth, + uint32_t mip_levels, + uint32_t row_pitch, + uint32_t depth_pitch, + uint32_t subresource); + +uint64_t GetSubresourceSizeTex1D(DXGI_FORMAT format, uint32_t width, uint32_t mip_levels, uint32_t subresource); + +uint64_t GetSubresourceSizeTex2D( + DXGI_FORMAT format, uint32_t height, uint32_t mip_levels, uint32_t row_pitch, uint32_t subresource); + +uint64_t GetSubresourceSizeTex3D(uint32_t depth, uint32_t mip_levels, uint32_t depth_pitch, uint32_t subresource); + +uint64_t GetSubresourceWriteDataSize(D3D11_RESOURCE_DIMENSION dst_type, + DXGI_FORMAT dst_format, + uint32_t dst_width, + uint32_t dst_height, + uint32_t dst_depth, + uint32_t dst_mip_levels, + uint32_t dst_subresource, + const D3D11_BOX* dst_box, + uint32_t src_row_pitch, + uint32_t src_depth_pitch); + +bool NeedUpdateSubresourceAdjustment(bool context_needs_adjustment, const D3D11_BOX* dst_box); + +uint64_t GetUpdateSubresourceAdjustmentOffset(D3D11_RESOURCE_DIMENSION dst_type, + DXGI_FORMAT dst_format, + const D3D11_BOX* dst_box, + uint32_t src_row_pitch, + uint32_t src_depth_pitch); + +void CopyAlignedTexture1D( + const uint8_t* src, uint8_t* dst, uint32_t src_row_pitch, uint32_t dst_row_pitch, size_t offset, size_t size); + +void CopyAlignedTexture2D( + const uint8_t* src, uint8_t* dst, uint32_t src_row_pitch, uint32_t dst_row_pitch, size_t offset, size_t size); + +void CopyAlignedTexture3D(const uint8_t* src, + uint8_t* dst, + uint32_t src_row_pitch, + uint32_t dst_row_pitch, + uint32_t src_depth_pitch, + uint32_t dst_depth_pitch, + size_t offset, + size_t size); + GFXRECON_END_NAMESPACE(dx12) GFXRECON_END_NAMESPACE(graphics) GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/graphics/dx_image_renderer.cpp b/framework/graphics/dx_image_renderer.cpp new file mode 100644 index 0000000000..c33d494739 --- /dev/null +++ b/framework/graphics/dx_image_renderer.cpp @@ -0,0 +1,138 @@ +/* +** Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and associated documentation files (the "Software"), +** to deal in the Software without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Software, and to permit persons to whom the +** Software is furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +*/ + +#include "graphics/dx_image_renderer.h" + +#include "util/logging.h" + +GFXRECON_BEGIN_NAMESPACE(gfxrecon) +GFXRECON_BEGIN_NAMESPACE(graphics) + +void DXImageRenderer::ConvertR8G8B8A8ToB8G8R8A8( + uint8_t* dst, const uint8_t* src, uint32_t width, uint32_t height, uint32_t pitch) +{ + const uint32_t* src_pixel; + uint32_t* dst_pixel; + uint32_t r8, g8, b8, a8, b8g8r8a8; + for (UINT j = 0; j < height; j++) + { + for (UINT i = 0; i < width; i++) + { + auto offset = i * 4 + j * pitch; + src_pixel = reinterpret_cast(src + offset); + dst_pixel = reinterpret_cast(dst + offset); + + r8 = ((*src_pixel >> 0U) & 0xFFU); + g8 = ((*src_pixel >> 8U) & 0xFFU); + b8 = ((*src_pixel >> 16U) & 0xFFU); + a8 = ((*src_pixel >> 24U) & 0xFFU); + b8g8r8a8 = + ((b8 << 0U) & 0xFFU) | ((g8 << 8U) & 0xFF00U) | ((r8 << 16U) & 0xFF0000U) | ((a8 << 24U) & 0xFF000000); + *dst_pixel = b8g8r8a8; + } + } +} + +void DXImageRenderer::ConvertR10G10B10A2ToB8G8R8A8( + uint8_t* dst, const uint8_t* src, uint32_t width, uint32_t height, uint32_t pitch) +{ + GFXRECON_LOG_INFO_ONCE("Converting image data form R10G10B10A2 to B8G8R8A8. Image RGB data will be truncated to 8 " + "bits and alpha data will be set to 0xFF."); + + const uint32_t* src_pixel; + uint32_t* dst_pixel; + uint32_t r16, g16, b16, a16, b8g8r8a8; + for (UINT j = 0; j < height; j++) + { + for (UINT i = 0; i < width; i++) + { + auto offset = i * 4 + j * pitch; + src_pixel = reinterpret_cast(src + offset); + dst_pixel = reinterpret_cast(dst + offset); + + r16 = ((*src_pixel >> 0U) & 0x3FFU) << 6U; + g16 = ((*src_pixel >> 10U) & 0x3FFU) << 6U; + b16 = ((*src_pixel >> 20U) & 0x3FFU) << 6U; + + // Ignore 2-bit alpha, generate opaque image data. + a16 = 0xFFFFU; + + // This truncates 10bit RGB channels to 8 bits. + b8g8r8a8 = ((b16 >> 8U) << 0U) | ((g16 >> 8U) << 8U) | ((r16 >> 8U) << 16U) | ((a16 >> 8U) << 24U); + *dst_pixel = b8g8r8a8; + } + } +} + +//----------------------------------------------------------------------------- +/// Constructor. +//----------------------------------------------------------------------------- +DXImageRenderer::DXImageRenderer() {} + +//----------------------------------------------------------------------------- +/// Destructor. +//----------------------------------------------------------------------------- +DXImageRenderer::~DXImageRenderer() {} + +bool DXImageRenderer::CopyImageData(uint8_t* dst, + const uint8_t* src, + size_t total_bytes, + uint32_t width, + uint32_t height, + uint32_t pitch, + DXGI_FORMAT format, + bool convert_to_bgra) +{ + bool is_bgr8 = B8G8R8.find(format) != B8G8R8.end(); + bool is_rgb8 = R8G8B8A8.find(format) != R8G8B8A8.end(); + bool is_r10g10b10a2 = R10G10B10A2.find(format) != R10G10B10A2.end(); + + if (!(is_bgr8 || is_rgb8 || is_r10g10b10a2)) + { + return false; + } + + bool swap_red_blue = (convert_to_bgra && is_rgb8) || (!convert_to_bgra && is_bgr8); + + if (swap_red_blue) + { + ConvertR8G8B8A8ToB8G8R8A8(dst, src, width, height, pitch); + } + else if (is_r10g10b10a2) + { + ConvertR10G10B10A2ToB8G8R8A8(dst, src, width, height, pitch); + if (!convert_to_bgra) + { + ConvertR8G8B8A8ToB8G8R8A8(dst, src, width, height, pitch); + } + } + else + { + memcpy(dst, src, total_bytes); + } + + return true; +} + +GFXRECON_END_NAMESPACE(graphics) +GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/graphics/dx_image_renderer.h b/framework/graphics/dx_image_renderer.h new file mode 100644 index 0000000000..67a1d6485e --- /dev/null +++ b/framework/graphics/dx_image_renderer.h @@ -0,0 +1,112 @@ +/* +** Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and associated documentation files (the "Software"), +** to deal in the Software without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Software, and to permit persons to whom the +** Software is furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +*/ + +#ifndef GFXRECON_DECODE_DX_IMAGE_RENDERER_H +#define GFXRECON_DECODE_DX_IMAGE_RENDERER_H + +#include "util/defines.h" + +#include + +#include +#include +#include + +GFXRECON_BEGIN_NAMESPACE(gfxrecon) +GFXRECON_BEGIN_NAMESPACE(graphics) + +static const std::set B8G8R8 = { DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_FORMAT_B8G8R8X8_UNORM, + DXGI_FORMAT_B8G8R8A8_TYPELESS, DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, + DXGI_FORMAT_B8G8R8X8_TYPELESS, DXGI_FORMAT_B8G8R8X8_UNORM_SRGB }; + +static const std::set R8G8B8A8 = { DXGI_FORMAT_R8G8B8A8_TYPELESS, DXGI_FORMAT_R8G8B8A8_TYPELESS, + DXGI_FORMAT_R8G8B8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, + DXGI_FORMAT_R8G8B8A8_UINT, DXGI_FORMAT_R8G8B8A8_SNORM, + DXGI_FORMAT_R8G8B8A8_SINT }; + +static const std::set R10G10B10A2 = { DXGI_FORMAT_R10G10B10A2_TYPELESS, + DXGI_FORMAT_R10G10B10A2_UNORM, + DXGI_FORMAT_R10G10B10A2_UINT }; + +/// Bytes per pixel definition +constexpr uint32_t BytesPerPixel = 4; + +//----------------------------------------------------------------------------- +/// A structure of data that data we'll upload to a constant buffer. +//----------------------------------------------------------------------------- +struct ConstantBuffer +{ + uint32_t rt_width; ///< The width of the render target. + uint32_t flip_x; ///< Responsible for flipping the image horizontally. + uint32_t flip_y; ///< Responsible for flipping the image vertically. +}; + +struct CpuImage +{ + std::vector data; ///< pointer to the image data + uint32_t pitch; ///< pitch of the image + uint32_t width; ///< width of the image + uint32_t height; ///< height of the image +}; + +//----------------------------------------------------------------------------- +/// An Image Renderer base class providing common functionality to capture +/// DX11 and DX12 Render Targets. +//----------------------------------------------------------------------------- +class DXImageRenderer +{ + public: + //----------------------------------------------------------------------------- + /// Destructor. + //----------------------------------------------------------------------------- + virtual ~DXImageRenderer(); + + protected: + static void + ConvertR8G8B8A8ToB8G8R8A8(uint8_t* dst, const uint8_t* src, uint32_t width, uint32_t height, uint32_t pitch); + + static void + ConvertR10G10B10A2ToB8G8R8A8(uint8_t* dst, const uint8_t* src, uint32_t width, uint32_t height, uint32_t pitch); + + //----------------------------------------------------------------------------- + /// Constructor. + //----------------------------------------------------------------------------- + DXImageRenderer(); + + bool CopyImageData(uint8_t* dst, + const uint8_t* src, + size_t total_bytes, + uint32_t width, + uint32_t height, + uint32_t pitch, + DXGI_FORMAT format, + bool convert_to_bgra); + + private: + std::list issued_warning_list_; +}; + +GFXRECON_END_NAMESPACE(graphics) +GFXRECON_END_NAMESPACE(gfxrecon) + +#endif // GFXRECON_DECODE_DX_IMAGE_RENDERER_H diff --git a/framework/util/CMakeLists.txt b/framework/util/CMakeLists.txt index c0dd4c634f..8851972b6e 100644 --- a/framework/util/CMakeLists.txt +++ b/framework/util/CMakeLists.txt @@ -115,6 +115,8 @@ target_sources(gfxrecon_util $<$:${CMAKE_CURRENT_LIST_DIR}/wayland_loader.h> $<$:${CMAKE_CURRENT_LIST_DIR}/wayland_loader.cpp> $<$:${CMAKE_SOURCE_DIR}/framework/generated/generated_wayland_xdg_shell.h> + $<$:${CMAKE_CURRENT_LIST_DIR}/write_watch_tracker.h> + $<$:${CMAKE_CURRENT_LIST_DIR}/write_watch_tracker.cpp> ) @@ -214,6 +216,7 @@ if (${RUN_TESTS}) target_link_libraries(gfxrecon_util_test PRIVATE gfxrecon_util + $<$:d3d11.lib> $<$:d3d12.lib> $<$:dxgi.lib>) if (MSVC) diff --git a/framework/util/page_guard_manager.cpp b/framework/util/page_guard_manager.cpp index c65a158660..9c41b6bf4d 100644 --- a/framework/util/page_guard_manager.cpp +++ b/framework/util/page_guard_manager.cpp @@ -2,6 +2,7 @@ ** Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved. ** Copyright (c) 2015-2023 Valve Corporation ** Copyright (c) 2015-2023 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -736,9 +737,7 @@ void PageGuardManager::LoadActiveWriteStates(MemoryInfo* memory_info) #endif } -void PageGuardManager::ProcessEntry(uint64_t memory_id, - MemoryInfo* memory_info, - const ModifiedMemoryFunc& handle_modified) +void PageGuardManager::ProcessEntry(MemoryInfo* memory_info, const ModifiedMemoryFunc& handle_modified) { assert(memory_info != nullptr); assert(memory_info->is_modified); @@ -790,19 +789,18 @@ void PageGuardManager::ProcessEntry(uint64_t memory_id, { active_range = false; - ProcessActiveRange(memory_id, memory_info, start_index, i, handle_modified); + ProcessActiveRange(memory_info, start_index, i, handle_modified); } } } if (active_range) { - ProcessActiveRange(memory_id, memory_info, start_index, memory_info->total_pages, handle_modified); + ProcessActiveRange(memory_info, start_index, memory_info->total_pages, handle_modified); } } -void PageGuardManager::ProcessActiveRange(uint64_t memory_id, - MemoryInfo* memory_info, +void PageGuardManager::ProcessActiveRange(MemoryInfo* memory_info, size_t start_index, size_t end_index, const ModifiedMemoryFunc& handle_modified) @@ -855,7 +853,7 @@ void PageGuardManager::ProcessActiveRange(uint64_t memory_id, // The shadow memory address, page offset, and range values to be provided to the callback, which will process // the memory range. - handle_modified(memory_id, memory_info->shadow_memory, page_offset, page_range); + handle_modified(memory_info->memory_id, memory_info->shadow_memory, page_offset, page_range); if (kMProtectMode == protection_mode_) { @@ -896,17 +894,17 @@ void PageGuardManager::ProcessActiveRange(uint64_t memory_id, // The mapped memory address, page offset, and range values to be provided to the callback, which will process // the memory range. - handle_modified(memory_id, memory_info->mapped_memory, page_offset, page_range); + handle_modified(memory_info->memory_id, memory_info->mapped_memory, page_offset, page_range); } } -bool PageGuardManager::GetTrackedMemory(uint64_t memory_id, void** memory) +bool PageGuardManager::GetTrackedMemory(uint64_t tracker_key, void** memory) { assert(memory != nullptr); std::lock_guard lock(tracked_memory_lock_); - auto entry = memory_info_.find(memory_id); + auto entry = memory_info_.find(tracker_key); if (entry != memory_info_.end()) { if (entry->second.shadow_memory != nullptr) @@ -924,7 +922,8 @@ bool PageGuardManager::GetTrackedMemory(uint64_t memory_id, void** memory) return false; } -void* PageGuardManager::AddTrackedMemory(uint64_t memory_id, +void* PageGuardManager::AddTrackedMemory(uint64_t tracker_key, + uint64_t memory_id, void* mapped_memory, size_t mapped_offset, size_t mapped_range, @@ -1104,12 +1103,13 @@ void* PageGuardManager::AddTrackedMemory(uint64_t memory_id, if (success) { - assert(memory_info_.find(memory_id) == memory_info_.end()); + GFXRECON_ASSERT(memory_info_.find(tracker_key) == memory_info_.end()); auto entry = memory_info_.emplace(std::piecewise_construct, - std::forward_as_tuple(memory_id), - std::forward_as_tuple(mapped_memory, + std::forward_as_tuple(tracker_key), + std::forward_as_tuple(memory_id, + mapped_memory, mapped_range, shadow_memory, shadow_size, @@ -1177,11 +1177,11 @@ void PageGuardManager::ReleaseTrackedMemory(const MemoryInfo* memory_info) } } -void PageGuardManager::RemoveTrackedMemory(uint64_t memory_id) +void PageGuardManager::RemoveTrackedMemory(uint64_t tracker_key) { std::lock_guard lock(tracked_memory_lock_); - auto entry = memory_info_.find(memory_id); + auto entry = memory_info_.find(tracker_key); if (entry != memory_info_.end()) { ReleaseTrackedMemory(&entry->second); @@ -1190,6 +1190,31 @@ void PageGuardManager::RemoveTrackedMemory(uint64_t memory_id) } } +bool PageGuardManager::UpdateTrackedMemory(uint64_t tracker_key, + uint64_t memory_id, + void* mapped_memory, + void** shadow_memory) +{ + std::lock_guard lock(tracked_memory_lock_); + + auto entry = memory_info_.find(tracker_key); + if (entry != memory_info_.end()) + { + MemoryInfo& memory_info = entry->second; + memory_info.memory_id = memory_id; + memory_info.mapped_memory = mapped_memory; + + if ((shadow_memory != nullptr) && (entry->second.shadow_memory != nullptr)) + { + (*shadow_memory) = entry->second.shadow_memory; + } + + return true; + } + + return false; +} + uintptr_t PageGuardManager::AllocatePersistentShadowMemory(size_t size) { ShadowMemoryInfo* info = nullptr; @@ -1218,11 +1243,11 @@ void PageGuardManager::FreePersistentShadowMemory(uintptr_t shadow_memory_handle } } -void PageGuardManager::ProcessMemoryEntry(uint64_t memory_id, const ModifiedMemoryFunc& handle_modified) +void PageGuardManager::ProcessMemoryEntry(uint64_t tracker_key, const ModifiedMemoryFunc& handle_modified) { std::lock_guard lock(tracked_memory_lock_); - auto entry = memory_info_.find(memory_id); + auto entry = memory_info_.find(tracker_key); uint32_t n_threads_to_wait = 0; if (protection_mode_ == kUserFaultFdMode) @@ -1243,7 +1268,7 @@ void PageGuardManager::ProcessMemoryEntry(uint64_t memory_id, const ModifiedMemo if (memory_info->is_modified) { - ProcessEntry(entry->first, memory_info, handle_modified); + ProcessEntry(memory_info, handle_modified); } } @@ -1277,7 +1302,7 @@ void PageGuardManager::ProcessMemoryEntries(const ModifiedMemoryFunc& handle_mod if (memory_info->is_modified) { - ProcessEntry(entry->first, memory_info, handle_modified); + ProcessEntry(memory_info, handle_modified); } } diff --git a/framework/util/page_guard_manager.h b/framework/util/page_guard_manager.h index 3c543416fb..dbc8b296a2 100644 --- a/framework/util/page_guard_manager.h +++ b/framework/util/page_guard_manager.h @@ -2,6 +2,7 @@ ** Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved. ** Copyright (c) 2015-2020 Valve Corporation ** Copyright (c) 2015-2020 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -98,7 +99,7 @@ class PageGuardManager bool UseSeparateRead() const { return enable_separate_read_; } - bool GetTrackedMemory(uint64_t memory_id, void** memory); + bool GetTrackedMemory(uint64_t tracker_key, void** memory); // The use_write_watch parameter is ignored on all platforms except Windows, and is ignored on Windows if // shadow_memory is true. @@ -112,7 +113,8 @@ class PageGuardManager // allocation will be created. Unless copy-on-map is disabled, the content of the mapped_range portion of // mapped_memory will be copied to the shadow allocation. The shadow allocation will be freed by // RemoveTrackedMemory. - void* AddTrackedMemory(uint64_t memory_id, + void* AddTrackedMemory(uint64_t tracker_key, + uint64_t memory_id, void* mapped_memory, size_t mapped_offset, size_t mapped_range, @@ -120,9 +122,33 @@ class PageGuardManager bool use_shadow_memory, bool use_write_watch); - void RemoveTrackedMemory(uint64_t memory_id); + // Convenience function for APIs that do not require separate tracked memory key and memory ID values. + void* AddTrackedMemory(uint64_t memory_id, + void* mapped_memory, + size_t mapped_offset, + size_t mapped_range, + uintptr_t shadow_memory_handle, + bool use_shadow_memory, + bool use_write_watch) + { + return AddTrackedMemory(memory_id, + memory_id, + mapped_memory, + mapped_offset, + mapped_range, + shadow_memory_handle, + use_shadow_memory, + use_write_watch); + } + + void RemoveTrackedMemory(uint64_t tracker_key); + + // Replace the memory ID and memory allocation for the specified entry, optionally retrieving the pointer to the + // shadow memory. Primarily intended for updating mapped memory info associated with persistent shadow memory + // allocations. + bool UpdateTrackedMemory(uint64_t tracker_key, uint64_t memory_id, void* mapped_memory, void** shadow_memory); - void ProcessMemoryEntry(uint64_t memory_id, const ModifiedMemoryFunc& handle_modified); + void ProcessMemoryEntry(uint64_t tracker_key, const ModifiedMemoryFunc& handle_modified); void ProcessMemoryEntries(const ModifiedMemoryFunc& handle_modified); @@ -161,7 +187,8 @@ class PageGuardManager private: struct MemoryInfo { - MemoryInfo(void* mm, + MemoryInfo(uint64_t mi, + void* mm, size_t mr, void* sm, size_t sr, @@ -174,9 +201,9 @@ class PageGuardManager bool ww, bool os) : status_tracker(tp), - mapped_memory(mm), mapped_range(mr), shadow_memory(sm), shadow_range(sr), aligned_address(aa), - aligned_offset(ao), total_pages(tp), last_segment_size(lss), start_address(sa), end_address(ea), - use_write_watch(ww), is_modified(false), own_shadow_memory(os) + memory_id(mi), mapped_memory(mm), mapped_range(mr), shadow_memory(sm), shadow_range(sr), + aligned_address(aa), aligned_offset(ao), total_pages(tp), last_segment_size(lss), start_address(sa), + end_address(ea), use_write_watch(ww), is_modified(false), own_shadow_memory(os) { #if defined(WIN32) if (shadow_memory == nullptr) @@ -188,10 +215,11 @@ class PageGuardManager PageStatusTracker status_tracker; - void* mapped_memory; // Pointer to mapped memory to be tracked. - size_t mapped_range; // Size of the mapped memory range. - void* shadow_memory; // Shadow memory for mapped memory types that cannot be tracked by guard pages. - size_t shadow_range; // Size of the shadow memory allocation, which is the mapped memory size adjusted to be a + uint64_t memory_id; // ID of the mapped memory to be tracked. + void* mapped_memory; // Pointer to mapped memory to be tracked. + size_t mapped_range; // Size of the mapped memory range. + void* shadow_memory; // Shadow memory for mapped memory types that cannot be tracked by guard pages. + size_t shadow_range; // Size of the shadow memory allocation, which is the mapped memory size adjusted to be a // multiple of system page size. void* aligned_address; // Mapped memory pointer aligned to start of page when shadow memory is disabled, or // shadow memory pointer when enabled. @@ -239,9 +267,8 @@ class PageGuardManager bool FindMemory(void* address, MemoryInfo** watched_memory_info); bool SetMemoryProtection(void* protect_address, size_t protect_size, uint32_t protect_mask); void LoadActiveWriteStates(MemoryInfo* memory_info); - void ProcessEntry(uint64_t memory_id, MemoryInfo* memory_info, const ModifiedMemoryFunc& handle_modified); - void ProcessActiveRange(uint64_t memory_id, - MemoryInfo* memory_info, + void ProcessEntry(MemoryInfo* memory_info, const ModifiedMemoryFunc& handle_modified); + void ProcessActiveRange(MemoryInfo* memory_info, size_t start_index, size_t end_index, const ModifiedMemoryFunc& handle_modified); diff --git a/framework/util/write_watch_tracker.cpp b/framework/util/write_watch_tracker.cpp new file mode 100644 index 0000000000..e0b7dc8248 --- /dev/null +++ b/framework/util/write_watch_tracker.cpp @@ -0,0 +1,428 @@ +/* +** Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2015-2020 Valve Corporation +** Copyright (c) 2015-2020 LunarG, Inc. +** Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and associated documentation files (the "Software"), +** to deal in the Software without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Software, and to permit persons to whom the +** Software is furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +*/ + +#include "util/write_watch_tracker.h" + +#include "util/logging.h" +#include "util/platform.h" + +#include +#include +#include + +GFXRECON_BEGIN_NAMESPACE(gfxrecon) +GFXRECON_BEGIN_NAMESPACE(util) + +WriteWatchTracker::WriteWatchTracker() : + system_page_size_(util::platform::GetSystemPageSize()), system_page_pot_shift_(GetSystemPagePotShift()) +{} + +WriteWatchTracker::~WriteWatchTracker() {} + +size_t WriteWatchTracker::GetSystemPagePotShift() const +{ + size_t pot_shift = 0; + size_t page_size = util::platform::GetSystemPageSize(); + + if (page_size != 0) + { + assert((page_size & (page_size - 1)) == 0); + while (page_size != 1) + { + page_size >>= 1; + ++pot_shift; + } + } + + return pot_shift; +} + +size_t WriteWatchTracker::GetAlignedSize(size_t size) const +{ + return util::platform::GetAlignedSize(size, system_page_size_); +} + +void* WriteWatchTracker::AllocateMemory(size_t aligned_size) +{ + assert(aligned_size > 0); + + if (aligned_size > 0) + { + // Always enable write watch. + void* memory = util::platform::AllocateRawMemory(aligned_size, true); + + if (memory == nullptr) + { + GFXRECON_LOG_ERROR("WriteWatchTracker failed to allocate memory with size = %" PRIuPTR + " with error code: %u", + aligned_size, + util::platform::GetSystemLastErrorCode()); + } + + return memory; + } + else + { + GFXRECON_LOG_ERROR("WriteWatchTracker::AllocateMemory(): aligned_size must be greater than 0."); + + return nullptr; + } +} + +void WriteWatchTracker::FreeMemory(void* memory, size_t aligned_size) +{ + assert(memory != nullptr); + + util::platform::FreeRawMemory(memory, aligned_size); +} + +size_t WriteWatchTracker::GetMemorySegmentSize(const MemoryInfo* memory_info, size_t page_index) const +{ + assert(memory_info != nullptr); + assert(page_index < memory_info->total_pages); + + // If this is the last segment of the tracked memory, we want to know if it is a full page or a partial page. + return ((page_index + 1) < memory_info->total_pages) ? system_page_size_ : memory_info->last_segment_size; +} + +void WriteWatchTracker::MemoryCopy(void* destination, const void* source, size_t size) +{ + util::platform::MemoryCopy(destination, size, source, size); +} + +void WriteWatchTracker::LoadActiveWriteStates(MemoryInfo* memory_info) +{ + assert((memory_info != nullptr) && (memory_info->shadow_memory != nullptr)); + + auto modified_addresses = memory_info->modified_addresses.get(); + ULONG_PTR modified_count = memory_info->total_pages; + DWORD granularity = 0; + + if (GetWriteWatch(WRITE_WATCH_FLAG_RESET, + memory_info->shadow_memory, + memory_info->shadow_range, + modified_addresses, + &modified_count, + &granularity) == 0) + { + if (modified_count > 0) + { + memory_info->is_modified = true; + + for (ULONG_PTR i = 0; i < modified_count; ++i) + { + // Get offset from the page-aligned start address of the shadow memory to the address of the modified + // page. + size_t start_offset = + static_cast(modified_addresses[i]) - static_cast(memory_info->shadow_memory); + size_t page_index = start_offset >> system_page_pot_shift_; + + memory_info->status_tracker.SetActiveWriteBlock(page_index, true); + } + } + } + else + { + GFXRECON_LOG_ERROR("WriteWatchTracker failed to retrieve write-modified pages for memory region [start address " + "= %p, size = %" PRIuPTR "] (GetWriteWatch() produced error code %u)", + memory_info->mapped_memory, + memory_info->mapped_range, + GetLastError()); + } +} + +void WriteWatchTracker::ProcessEntry(MemoryInfo* memory_info, const ModifiedMemoryFunc& handle_modified) +{ + assert(memory_info != nullptr); + + bool active_range = false; + size_t start_index = 0; + + memory_info->is_modified = false; + + for (size_t i = 0; i < memory_info->total_pages; ++i) + { + // Concatenate dirty pages to handle as large a range as possible with a single modified memory handler + // invocation. + if (memory_info->status_tracker.IsActiveWriteBlock(i)) + { + memory_info->status_tracker.SetActiveWriteBlock(i, false); + memory_info->status_tracker.SetActiveReadBlock(i, false); + + if (!active_range) + { + active_range = true; + start_index = i; + } + } + else + { + // If the previous pages were modified by a write operation, process the modified range now. + if (active_range) + { + active_range = false; + + ProcessActiveRange(memory_info, start_index, i, handle_modified); + } + } + } + + if (active_range) + { + ProcessActiveRange(memory_info, start_index, memory_info->total_pages, handle_modified); + } +} + +void WriteWatchTracker::ProcessActiveRange(MemoryInfo* memory_info, + size_t start_index, + size_t end_index, + const ModifiedMemoryFunc& handle_modified) +{ + assert((memory_info != nullptr) && (memory_info->shadow_memory != nullptr)); + assert(end_index > start_index); + + size_t page_count = end_index - start_index; + size_t page_offset = start_index << system_page_pot_shift_; + size_t page_range = page_count << system_page_pot_shift_; + + if (end_index == memory_info->total_pages) + { + // Adjust range for memory ranges that end with a partial page. + page_range -= system_page_size_ - memory_info->last_segment_size; + } + + void* source_address = static_cast(memory_info->shadow_memory) + page_offset; + void* destination_address = static_cast(memory_info->mapped_memory) + page_offset; + MemoryCopy(destination_address, source_address, page_range); + + // The mapped memory address, page offset, and range values to be provided to the callback, which will process + // the memory range. + handle_modified(memory_info->memory_id, memory_info->shadow_memory, page_offset, page_range); +} + +bool WriteWatchTracker::GetTrackedMemory(uint64_t tracker_key, void** memory) +{ + assert(memory != nullptr); + + std::lock_guard lock(tracked_memory_lock_); + + auto entry = memory_info_.find(tracker_key); + if (entry != memory_info_.end()) + { + if (entry->second.shadow_memory != nullptr) + { + (*memory) = entry->second.shadow_memory; + } + else + { + (*memory) = entry->second.mapped_memory; + } + + return true; + } + + return false; +} + +void* WriteWatchTracker::AddTrackedMemory( + uint64_t tracker_key, uint64_t memory_id, void* mapped_memory, size_t mapped_range, uintptr_t shadow_memory_handle) +{ + void* shadow_memory = nullptr; + size_t shadow_size = 0; + ShadowMemoryInfo* shadow_memory_info = nullptr; + + if (shadow_memory_handle != kNullShadowHandle) + { + shadow_memory_info = reinterpret_cast(shadow_memory_handle); + + assert(shadow_memory_info->memory != nullptr); + + // Set the shadow memory pointer to the start of the mapped range. + shadow_memory = static_cast(shadow_memory_info->memory); + shadow_size = mapped_range; + } + else + { + shadow_size = GetAlignedSize(mapped_range); + shadow_memory = AllocateMemory(shadow_size); + } + + if (shadow_memory != nullptr) + { + void* aligned_address = shadow_memory; + size_t guard_range = mapped_range; + size_t total_pages = guard_range >> system_page_pot_shift_; + size_t last_segment_size = guard_range & (system_page_size_ - 1); // guard_range % system_page_size_ + + if (last_segment_size != 0) + { + ++total_pages; + } + else + { + last_segment_size = system_page_size_; + } + + std::lock_guard lock(tracked_memory_lock_); + + GFXRECON_ASSERT(memory_info_.find(tracker_key) == memory_info_.end()); + + auto entry = memory_info_.emplace(std::piecewise_construct, + std::forward_as_tuple(tracker_key), + std::forward_as_tuple(memory_id, + mapped_memory, + mapped_range, + shadow_memory, + shadow_size, + total_pages, + last_segment_size, + shadow_memory_handle == kNullShadowHandle)); + + if (!entry.second) + { + // For persistent memory, We don't free the shadow allocation now, expecting it to be freed later + // when the mapped memory object is freed, but will not return a pointer to the shadow memory to the + // caller. + if (shadow_memory_handle == kNullShadowHandle) + { + FreeMemory(shadow_memory, shadow_size); + } + + shadow_memory = nullptr; + } + } + + return (shadow_memory != nullptr) ? shadow_memory : mapped_memory; +} + +void WriteWatchTracker::RemoveTrackedMemory(uint64_t memory_id) +{ + std::lock_guard lock(tracked_memory_lock_); + + auto entry = memory_info_.find(memory_id); + if (entry != memory_info_.end()) + { + const MemoryInfo& memory_info = entry->second; + + if ((memory_info.shadow_memory != nullptr) && memory_info.own_shadow_memory) + { + FreeMemory(memory_info.shadow_memory, memory_info.shadow_range); + } + + memory_info_.erase(entry); + } +} + +bool WriteWatchTracker::UpdateTrackedMemory(uint64_t tracker_key, + uint64_t memory_id, + void* mapped_memory, + void** shadow_memory) +{ + std::lock_guard lock(tracked_memory_lock_); + + auto entry = memory_info_.find(tracker_key); + if (entry != memory_info_.end()) + { + MemoryInfo& memory_info = entry->second; + memory_info.memory_id = memory_id; + memory_info.mapped_memory = mapped_memory; + + if ((shadow_memory != nullptr) && (entry->second.shadow_memory != nullptr)) + { + (*shadow_memory) = entry->second.shadow_memory; + } + + return true; + } + + return false; +} + +uintptr_t WriteWatchTracker::AllocatePersistentShadowMemory(size_t size) +{ + ShadowMemoryInfo* info = nullptr; + size_t shadow_size = GetAlignedSize(size); + void* shadow_memory = AllocateMemory(shadow_size); + + if (shadow_memory != nullptr) + { + size_t total_shadow_pages = shadow_size >> system_page_pot_shift_; + size_t last_shadow_segment_size = size & (system_page_size_ - 1); // allocation_size % system_page_size_ + + info = new ShadowMemoryInfo(shadow_memory, shadow_size, total_shadow_pages, last_shadow_segment_size); + } + + return reinterpret_cast(info); +} + +void WriteWatchTracker::FreePersistentShadowMemory(uintptr_t shadow_memory_handle) +{ + auto info = reinterpret_cast(shadow_memory_handle); + + if (info != nullptr) + { + FreeMemory(info->memory, info->size); + delete info; + } +} + +void WriteWatchTracker::ProcessMemoryEntry(uint64_t tracker_key, const ModifiedMemoryFunc& handle_modified) +{ + std::lock_guard lock(tracked_memory_lock_); + + auto entry = memory_info_.find(tracker_key); + + if (entry != memory_info_.end()) + { + auto memory_info = &entry->second; + + LoadActiveWriteStates(memory_info); + + if (memory_info->is_modified) + { + ProcessEntry(memory_info, handle_modified); + } + } +} + +void WriteWatchTracker::ProcessMemoryEntries(const ModifiedMemoryFunc& handle_modified) +{ + std::lock_guard lock(tracked_memory_lock_); + + for (auto entry = memory_info_.begin(); entry != memory_info_.end(); ++entry) + { + auto memory_info = &entry->second; + + LoadActiveWriteStates(memory_info); + + if (memory_info->is_modified) + { + ProcessEntry(memory_info, handle_modified); + } + } +} + +GFXRECON_END_NAMESPACE(util) +GFXRECON_END_NAMESPACE(gfxrecon) diff --git a/framework/util/write_watch_tracker.h b/framework/util/write_watch_tracker.h new file mode 100644 index 0000000000..20f0ad6878 --- /dev/null +++ b/framework/util/write_watch_tracker.h @@ -0,0 +1,160 @@ +/* +** Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2015-2020 Valve Corporation +** Copyright (c) 2015-2020 LunarG, Inc. +** Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and associated documentation files (the "Software"), +** to deal in the Software without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Software, and to permit persons to whom the +** Software is furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +*/ + +#ifndef GFXRECON_UTIL_WRITE_WATCH_TRACKER_H +#define GFXRECON_UTIL_WRITE_WATCH_TRACKER_H + +#include "util/defines.h" +#include "util/platform.h" +#include "util/page_status_tracker.h" + +#include +#include +#include +#include +#include +#include +#include + +GFXRECON_BEGIN_NAMESPACE(gfxrecon) +GFXRECON_BEGIN_NAMESPACE(util) + +class WriteWatchTracker +{ + public: + static const uintptr_t kNullShadowHandle = 0; + + public: + // Callback for processing modified memory. The function parameters are the ID of the modified memory object, + // a pointer to the start of the modified memory range, the offset from the initial mapped memory pointer to + // the modified range pointer, and the size of the modified range. + typedef std::function ModifiedMemoryFunc; + + public: + WriteWatchTracker(); + + ~WriteWatchTracker(); + + bool GetTrackedMemory(uint64_t tracker_key, void** memory); + + void* AddTrackedMemory(uint64_t tracker_key, + uint64_t memory_id, + void* mapped_memory, + size_t mapped_range, + uintptr_t shadow_memory_handle); + + void RemoveTrackedMemory(uint64_t memory_id); + + // Replace the memory ID and memory allocation for the specified entry, optionally retrieving the pointer to the + // shadow memory. Primarily intended for updating mapped memory info associated with persistent shadow memory + // allocations. + bool UpdateTrackedMemory(uint64_t tracker_key, uint64_t memory_id, void* mapped_memory, void** shadow_memory); + + void ProcessMemoryEntry(uint64_t tracker_key, const ModifiedMemoryFunc& handle_modified); + + void ProcessMemoryEntries(const ModifiedMemoryFunc& handle_modified); + + size_t GetAlignedSize(size_t size) const; + + void* AllocateMemory(size_t aligned_size); + + void FreeMemory(void* pMemory, size_t aligned_size); + + uintptr_t AllocatePersistentShadowMemory(size_t size); + + void FreePersistentShadowMemory(uintptr_t shadow_memory_handle); + + private: + struct MemoryInfo + { + MemoryInfo(uint64_t mi, void* mm, size_t mr, void* sm, size_t sr, size_t tp, size_t lss, bool os) : + status_tracker(tp), memory_id(mi), mapped_memory(mm), mapped_range(mr), shadow_memory(sm), shadow_range(sr), + total_pages(tp), last_segment_size(lss), is_modified(false), own_shadow_memory(os) + { + modified_addresses = std::make_unique(total_pages); + } + + PageStatusTracker status_tracker; + + uint64_t memory_id; // ID of the mapped memory to be tracked. + void* mapped_memory; // Pointer to mapped memory to be tracked. + size_t mapped_range; // Size of the mapped memory range. + void* shadow_memory; // Shadow memory for mapped memory types that cannot be tracked by guard pages. + size_t shadow_range; // Size of the shadow memory allocation, which is the mapped memory size adjusted to be a + // multiple of system page size. + size_t total_pages; // Total number of pages contained by the mapped memory. + size_t last_segment_size; // Size of the last segment of the mapped memory, which may not be a full page. + bool is_modified; + bool own_shadow_memory; + + std::unique_ptr modified_addresses; // Memory for retrieving modified pages with GetWriteWatch. + }; + + struct ShadowMemoryInfo + { + ShadowMemoryInfo(void* sm, size_t ss, size_t tp, size_t lss) : + memory(sm), size(ss), total_pages(tp), last_segment_size(lss) + {} + + void* memory; // Pointer to the shadow memory. + size_t size; // Page-aligned size of the shadow memory. + size_t total_pages; // Total number of pages in the shadow memory. + size_t last_segment_size; // Size of the last segment of the mapped memory. + }; + + typedef std::unordered_map MemoryInfoMap; + + private: + size_t GetSystemPagePotShift() const; + size_t GetMemorySegmentSize(const MemoryInfo* memory_info, size_t page_index) const; + void MemoryCopy(void* destination, const void* source, size_t size); + void LoadActiveWriteStates(MemoryInfo* memory_info); + void ProcessEntry(MemoryInfo* memory_info, const ModifiedMemoryFunc& handle_modified); + void ProcessActiveRange(MemoryInfo* memory_info, + size_t start_index, + size_t end_index, + const ModifiedMemoryFunc& handle_modified); + + size_t GetOffsetFromPageStart(void* address) const + { + return reinterpret_cast(address) & (system_page_size_ - 1); + } + + void* AlignToPageStart(void* address) const + { + return static_cast(address) - GetOffsetFromPageStart(address); + } + + private: + MemoryInfoMap memory_info_; + const size_t system_page_size_; + const size_t system_page_pot_shift_; + std::mutex tracked_memory_lock_; +}; + +GFXRECON_END_NAMESPACE(util) +GFXRECON_END_NAMESPACE(gfxrecon) + +#endif // GFXRECON_UTIL_WRITE_WATCH_TRACKER_H diff --git a/layer/CMakeLists.txt b/layer/CMakeLists.txt index 856b72f387..591502b994 100644 --- a/layer/CMakeLists.txt +++ b/layer/CMakeLists.txt @@ -33,6 +33,7 @@ if (D3D12_SUPPORT) endif() add_subdirectory(d3d12_capture) add_subdirectory(d3d12) + add_subdirectory(d3d11) add_subdirectory(dxgi) if (${BUILD_LAUNCHER_AND_INTERCEPTOR}) add_subdirectory(gfxrecon_interceptor) diff --git a/layer/d3d11/CMakeLists.txt b/layer/d3d11/CMakeLists.txt new file mode 100644 index 0000000000..9247bdfb24 --- /dev/null +++ b/layer/d3d11/CMakeLists.txt @@ -0,0 +1,54 @@ +############################################################################### +# Copyright (c) 2018-2020 LunarG, Inc. +# Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# Author: LunarG Team +# Author: AMD Developer Tools Team +# Description: CMake script for layer d3d12 target +############################################################################### + +# CMake adds gdi32.lib to the linker input by default. For 32-bit builds, there +# is a conflict between some D3DKMT exports from gdi32.lib and the d3d11_ms.lib, +# requiring that gdi32.lib to be removed from the link command. +string(REPLACE "gdi32.lib" "" CMAKE_CXX_STANDARD_LIBRARIES ${CMAKE_CXX_STANDARD_LIBRARIES}) + +set(LINK_D3D11_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/$/d3d11_ms.lib) + +add_library(d3d11 SHARED "") +target_sources(d3d11 PRIVATE + ${CMAKE_CURRENT_LIST_DIR}/dll_main.cpp + ${CMAKE_CURRENT_LIST_DIR}/hook_d3d11.h + ${CMAKE_CURRENT_LIST_DIR}/hook_d3d11.cpp + ${CMAKE_CURRENT_LIST_DIR}/d3d11.def) + +target_include_directories(d3d11 + PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}) + +target_link_libraries(d3d11 gfxrecon_encode gfxrecon_util ${LINK_D3D11_OUTPUT}) +common_build_directives(d3d11) +add_custom_command(TARGET d3d11 PRE_BUILD + COMMAND lib /def:${CMAKE_CURRENT_LIST_DIR}/d3d11_ms.def /out:${LINK_D3D11_OUTPUT} /machine:${LINK_ARCH} + DEPENDS ${CMAKE_CURRENT_LIST_DIR}/d3d11_ms.def) + +install(FILES $/d3d11.dll DESTINATION ${CMAKE_INSTALL_BINDIR}/d3d12_capture) diff --git a/layer/d3d11/d3d11.def b/layer/d3d11/d3d11.def new file mode 100644 index 0000000000..a3bd965432 --- /dev/null +++ b/layer/d3d11/d3d11.def @@ -0,0 +1,53 @@ +LIBRARY d3d11 +EXPORTS +CreateDirect3D11DeviceFromDXGIDevice=d3d11_ms.CreateDirect3D11DeviceFromDXGIDevice @16 +CreateDirect3D11SurfaceFromDXGISurface=d3d11_ms.CreateDirect3D11SurfaceFromDXGISurface @17 +D3D11CoreCreateDevice=d3d11_ms.D3D11CoreCreateDevice @18 +D3D11CoreCreateLayeredDevice=d3d11_ms.D3D11CoreCreateLayeredDevice @19 +D3D11CoreGetLayeredDeviceSize=d3d11_ms.D3D11CoreGetLayeredDeviceSize @20 +D3D11CoreRegisterLayers=d3d11_ms.D3D11CoreRegisterLayers @21 +D3D11CreateDevice=gfxrecon_D3D11CreateDevice @22 +D3D11CreateDeviceAndSwapChain=gfxrecon_D3D11CreateDeviceAndSwapChain @23 +D3D11CreateDeviceForD3D12=d3d11_ms.D3D11CreateDeviceForD3D12 @1 +D3D11On12CreateDevice=gfxrecon_D3D11On12CreateDevice @24 +D3DKMTCloseAdapter=d3d11_ms.D3DKMTCloseAdapter @2 +D3DKMTCreateAllocation=d3d11_ms.D3DKMTCreateAllocation @25 +D3DKMTCreateContext=d3d11_ms.D3DKMTCreateContext @26 +D3DKMTCreateDevice=d3d11_ms.D3DKMTCreateDevice @27 +D3DKMTCreateSynchronizationObject=d3d11_ms.D3DKMTCreateSynchronizationObject @28 +D3DKMTDestroyAllocation=d3d11_ms.D3DKMTDestroyAllocation @3 +D3DKMTDestroyContext=d3d11_ms.D3DKMTDestroyContext @4 +D3DKMTDestroyDevice=d3d11_ms.D3DKMTDestroyDevice @5 +D3DKMTDestroySynchronizationObject=d3d11_ms.D3DKMTDestroySynchronizationObject @6 +D3DKMTEscape=d3d11_ms.D3DKMTEscape @29 +D3DKMTGetContextSchedulingPriority=d3d11_ms.D3DKMTGetContextSchedulingPriority @30 +D3DKMTGetDeviceState=d3d11_ms.D3DKMTGetDeviceState @31 +D3DKMTGetDisplayModeList=d3d11_ms.D3DKMTGetDisplayModeList @32 +D3DKMTGetMultisampleMethodList=d3d11_ms.D3DKMTGetMultisampleMethodList @33 +D3DKMTGetRuntimeData=d3d11_ms.D3DKMTGetRuntimeData @34 +D3DKMTGetSharedPrimaryHandle=d3d11_ms.D3DKMTGetSharedPrimaryHandle @35 +D3DKMTLock=d3d11_ms.D3DKMTLock @36 +D3DKMTOpenAdapterFromHdc=d3d11_ms.D3DKMTOpenAdapterFromHdc @37 +D3DKMTOpenResource=d3d11_ms.D3DKMTOpenResource @38 +D3DKMTPresent=d3d11_ms.D3DKMTPresent @7 +D3DKMTQueryAdapterInfo=d3d11_ms.D3DKMTQueryAdapterInfo @8 +D3DKMTQueryAllocationResidency=d3d11_ms.D3DKMTQueryAllocationResidency @39 +D3DKMTQueryResourceInfo=d3d11_ms.D3DKMTQueryResourceInfo @40 +D3DKMTRender=d3d11_ms.D3DKMTRender @41 +D3DKMTSetAllocationPriority=d3d11_ms.D3DKMTSetAllocationPriority @42 +D3DKMTSetContextSchedulingPriority=d3d11_ms.D3DKMTSetContextSchedulingPriority @43 +D3DKMTSetDisplayMode=d3d11_ms.D3DKMTSetDisplayMode @44 +D3DKMTSetDisplayPrivateDriverFormat=d3d11_ms.D3DKMTSetDisplayPrivateDriverFormat @9 +D3DKMTSetGammaRamp=d3d11_ms.D3DKMTSetGammaRamp @45 +D3DKMTSetVidPnSourceOwner=d3d11_ms.D3DKMTSetVidPnSourceOwner @46 +D3DKMTSignalSynchronizationObject=d3d11_ms.D3DKMTSignalSynchronizationObject @10 +D3DKMTUnlock=d3d11_ms.D3DKMTUnlock @11 +D3DKMTWaitForSynchronizationObject=d3d11_ms.D3DKMTWaitForSynchronizationObject @12 +D3DKMTWaitForVerticalBlankEvent=d3d11_ms.D3DKMTWaitForVerticalBlankEvent @47 +D3DPerformance_BeginEvent=d3d11_ms.D3DPerformance_BeginEvent @48 +D3DPerformance_EndEvent=d3d11_ms.D3DPerformance_EndEvent @49 +D3DPerformance_GetStatus=d3d11_ms.D3DPerformance_GetStatus @50 +D3DPerformance_SetMarker=d3d11_ms.D3DPerformance_SetMarker @51 +EnableFeatureLevelUpgrade=d3d11_ms.EnableFeatureLevelUpgrade @13 +OpenAdapter10=d3d11_ms.OpenAdapter10 @14 +OpenAdapter10_2=d3d11_ms.OpenAdapter10_2 @15 diff --git a/layer/d3d11/d3d11_ms.def b/layer/d3d11/d3d11_ms.def new file mode 100644 index 0000000000..0d9314187f --- /dev/null +++ b/layer/d3d11/d3d11_ms.def @@ -0,0 +1,53 @@ +LIBRARY d3d12_ms +EXPORTS +CreateDirect3D11DeviceFromDXGIDevice @16 +CreateDirect3D11SurfaceFromDXGISurface @17 +D3D11CoreCreateDevice @18 +D3D11CoreCreateLayeredDevice @19 +D3D11CoreGetLayeredDeviceSize @20 +D3D11CoreRegisterLayers @21 +D3D11CreateDevice @22 +D3D11CreateDeviceAndSwapChain @23 +D3D11CreateDeviceForD3D12 @1 +D3D11On12CreateDevice @24 +D3DKMTCloseAdapter @2 +D3DKMTCreateAllocation @25 +D3DKMTCreateContext @26 +D3DKMTCreateDevice @27 +D3DKMTCreateSynchronizationObject @28 +D3DKMTDestroyAllocation @3 +D3DKMTDestroyContext @4 +D3DKMTDestroyDevice @5 +D3DKMTDestroySynchronizationObject @6 +D3DKMTEscape @29 +D3DKMTGetContextSchedulingPriority @30 +D3DKMTGetDeviceState @31 +D3DKMTGetDisplayModeList @32 +D3DKMTGetMultisampleMethodList @33 +D3DKMTGetRuntimeData @34 +D3DKMTGetSharedPrimaryHandle @35 +D3DKMTLock @36 +D3DKMTOpenAdapterFromHdc @37 +D3DKMTOpenResource @38 +D3DKMTPresent @7 +D3DKMTQueryAdapterInfo @8 +D3DKMTQueryAllocationResidency @39 +D3DKMTQueryResourceInfo @40 +D3DKMTRender @41 +D3DKMTSetAllocationPriority @42 +D3DKMTSetContextSchedulingPriority @43 +D3DKMTSetDisplayMode @44 +D3DKMTSetDisplayPrivateDriverFormat @9 +D3DKMTSetGammaRamp @45 +D3DKMTSetVidPnSourceOwner @46 +D3DKMTSignalSynchronizationObject @10 +D3DKMTUnlock @11 +D3DKMTWaitForSynchronizationObject @12 +D3DKMTWaitForVerticalBlankEvent @47 +D3DPerformance_BeginEvent @48 +D3DPerformance_EndEvent @49 +D3DPerformance_GetStatus @50 +D3DPerformance_SetMarker @51 +EnableFeatureLevelUpgrade @13 +OpenAdapter10 @14 +OpenAdapter10_2 @15 diff --git a/layer/d3d11/dll_main.cpp b/layer/d3d11/dll_main.cpp new file mode 100644 index 0000000000..3b622bb08c --- /dev/null +++ b/layer/d3d11/dll_main.cpp @@ -0,0 +1,213 @@ +/* +** Copyright (c) 2020 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and associated documentation files (the "Software"), +** to deal in the Software without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Software, and to permit persons to whom the +** Software is furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +*/ + +#include "encode/d3d11_dispatch_table.h" +#include "encode/dx12_dll_initializer.h" +#include "util/defines.h" +#include "util/file_path.h" +#include "util/platform.h" +#include "hook_d3d11.h" + +#include +#include +#include +#include +#include + +const char kSystemDllName[] = "d3d11.dll"; +const char kSystemDllNameRenamed[] = "d3d11_ms.dll"; +const char kCaptureDllName[] = "d3d12_capture.dll"; +const char kCaptureDllInitProcName[] = "InitializeD3D11Capture"; +const char kCaptureDllDestroyProcName[] = "ReleaseD3D11Capture"; + +static HINSTANCE dll_instance; +static gfxrecon::encode::DxDllInitializer dll_initializer; + +inline const gfxrecon::encode::D3D11DispatchTable& GetDispatchTable() +{ + return dll_initializer.GetDispatchTable(); +} + +GFXRECON_BEGIN_NAMESPACE(gfxrecon) + +static void LoadD3D11CaptureProcs(HMODULE system_dll, encode::D3D11DispatchTable* dispatch_table) +{ + if (system_dll != nullptr && dispatch_table != nullptr) + { + dispatch_table->D3D11CreateDevice = + reinterpret_cast(GetProcAddress(system_dll, "D3D11CreateDevice")); + dispatch_table->D3D11CreateDeviceAndSwapChain = reinterpret_cast( + GetProcAddress(system_dll, "D3D11CreateDeviceAndSwapChain")); + dispatch_table->D3D11On12CreateDevice = + reinterpret_cast(GetProcAddress(system_dll, "D3D11On12CreateDevice")); + } +} + +static bool Initialize() +{ + static bool initialized = false; + static std::mutex initialization_mutex; + + // Check `initialized` before locking to avoid locking unnecessarily. + if (initialized == false) + { + std::unique_lock initialization_lock(initialization_mutex); + if (initialized == false) + { + std::string module_path = + gfxrecon::encode::SetupCaptureModule(dll_instance, kSystemDllName, kSystemDllNameRenamed, nullptr); + + initialized = dll_initializer.Initialize( + module_path.c_str(), kCaptureDllName, kCaptureDllInitProcName, LoadD3D11CaptureProcs); + } + } + + return initialized; +} + +static void Destroy() +{ + dll_initializer.Destroy(kCaptureDllDestroyProcName); +} + +GFXRECON_END_NAMESPACE(gfxrecon) + +extern "C" __declspec(dllexport) void UpdateHooks() +{ + static bool hooked = false; + + if (hooked == false) + { + Hook_D3D11::HookInterceptor(dll_initializer.IsCaptureEnabled()); + hooked = true; + } +} + +EXTERN_C HRESULT WINAPI gfxrecon_D3D11CreateDevice(IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + ID3D11Device** ppDevice, + D3D_FEATURE_LEVEL* pFeatureLevel, + ID3D11DeviceContext** ppImmediateContext) +{ + if (gfxrecon::Initialize()) + { + return GetDispatchTable().D3D11CreateDevice(pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + ppDevice, + pFeatureLevel, + ppImmediateContext); + } + + return E_FAIL; +} + +EXTERN_C HRESULT WINAPI gfxrecon_D3D11CreateDeviceAndSwapChain(IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, + IDXGISwapChain** ppSwapChain, + ID3D11Device** ppDevice, + D3D_FEATURE_LEVEL* pFeatureLevel, + ID3D11DeviceContext** ppImmediateContext) +{ + if (gfxrecon::Initialize()) + { + return GetDispatchTable().D3D11CreateDeviceAndSwapChain(pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + pSwapChainDesc, + ppSwapChain, + ppDevice, + pFeatureLevel, + ppImmediateContext); + } + + return E_FAIL; +} + +EXTERN_C HRESULT WINAPI gfxrecon_D3D11On12CreateDevice(IUnknown* pDevice, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + IUnknown* const* ppCommandQueues, + UINT NumQueues, + UINT NodeMask, + ID3D11Device** ppDevice, + ID3D11DeviceContext** ppImmediateContext, + D3D_FEATURE_LEVEL* pChosenFeatureLevel) +{ + if (gfxrecon::Initialize()) + { + return GetDispatchTable().D3D11On12CreateDevice(pDevice, + Flags, + pFeatureLevels, + FeatureLevels, + ppCommandQueues, + NumQueues, + NodeMask, + ppDevice, + ppImmediateContext, + pChosenFeatureLevel); + } + + return E_FAIL; +} + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + dll_instance = hinstDLL; + break; + case DLL_PROCESS_DETACH: + // Only cleanup if the process is not exiting. + if (lpvReserved == nullptr) + { + gfxrecon::Destroy(); + } + break; + default: + break; + } + + return TRUE; +} diff --git a/layer/d3d11/hook_d3d11.cpp b/layer/d3d11/hook_d3d11.cpp new file mode 100644 index 0000000000..a6423822c2 --- /dev/null +++ b/layer/d3d11/hook_d3d11.cpp @@ -0,0 +1,294 @@ +/* +** Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and associated documentation files (the "Software"), +** to deal in the Software without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Software, and to permit persons to whom the +** Software is furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +*/ + +#include "hook_d3d11.h" + +#include "util/file_path.h" + +// Static data required for hook management +static D3d11HookInfo hook_info_ = {}; + +HRESULT WINAPI Mine_D3D11CreateDevice(IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + ID3D11Device** ppDevice, + D3D_FEATURE_LEVEL* pFeatureLevel, + ID3D11DeviceContext** ppImmediateContext) +{ + HRESULT result = S_FALSE; + + result = hook_info_.dispatch_table.D3D11CreateDevice(pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + ppDevice, + pFeatureLevel, + ppImmediateContext); + + return result; +} + +HRESULT WINAPI Mine_D3D11CreateDeviceAndSwapChain(IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, + IDXGISwapChain** ppSwapChain, + ID3D11Device** ppDevice, + D3D_FEATURE_LEVEL* pFeatureLevel, + ID3D11DeviceContext** ppImmediateContext) +{ + HRESULT result = S_FALSE; + + result = hook_info_.dispatch_table.D3D11CreateDeviceAndSwapChain(pAdapter, + DriverType, + Software, + Flags, + pFeatureLevels, + FeatureLevels, + SDKVersion, + pSwapChainDesc, + ppSwapChain, + ppDevice, + pFeatureLevel, + ppImmediateContext); + + return result; +} + +HRESULT WINAPI Mine_D3D11On12CreateDevice(IUnknown* pDevice, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + IUnknown* const* ppCommandQueues, + UINT NumQueues, + UINT NodeMask, + ID3D11Device** ppDevice, + ID3D11DeviceContext** ppImmediateContext, + D3D_FEATURE_LEVEL* pChosenFeatureLevel) +{ + HRESULT result = S_FALSE; + + result = hook_info_.dispatch_table.D3D11On12CreateDevice(pDevice, + Flags, + pFeatureLevels, + FeatureLevels, + ppCommandQueues, + NumQueues, + NodeMask, + ppDevice, + ppImmediateContext, + pChosenFeatureLevel); + + return result; +} + +//---------------------------------------------------------------------------- +/// Fill in a dispatch table with function addresses obtained from d3d11.dll +/// +/// \param d3d11_table Output dispatch table. +/// +/// \return True if successful, false otherwise. +//---------------------------------------------------------------------------- +bool GetD3d11DispatchTable(gfxrecon::encode::D3D11DispatchTable& d3d11_table) +{ + std::string library_base_path = ""; + + bool success = gfxrecon::util::filepath::GetWindowsSystemLibrariesPath(library_base_path); + + if (success == true) + { + std::string library_path = library_base_path + "\\d3d11.dll"; + + hook_info_.d3d11_dll = LoadLibraryA(library_path.c_str()); + + if (hook_info_.d3d11_dll != nullptr) + { + d3d11_table.D3D11CreateDevice = + reinterpret_cast(GetProcAddress(hook_info_.d3d11_dll, "D3D11CreateDevice")); + + d3d11_table.D3D11CreateDeviceAndSwapChain = reinterpret_cast( + GetProcAddress(hook_info_.d3d11_dll, "D3D11CreateDeviceAndSwapChain")); + + d3d11_table.D3D11On12CreateDevice = reinterpret_cast( + GetProcAddress(hook_info_.d3d11_dll, "D3D11On12CreateDevice")); + + success = true; + } + } + + return success; +} + +//---------------------------------------------------------------------------- +/// Given a d3d11 dispatch table, perform hooking and write out the final +/// dispatch table that will be called by intercepted entry points. +/// +/// \param d3d11_table Incoming dispatch table with entry function addresses +/// in d3d11. +/// +/// \param gpu_table Outgoing dispatch table with hooked entry points that +/// will either go to the GPU or capture layer. +/// +/// \return True if successful, false otherwise. +//---------------------------------------------------------------------------- +bool GetD3d11DispatchTableHooked(gfxrecon::encode::D3D11DispatchTable d3d11_table, + gfxrecon::encode::D3D11DispatchTable& gpu_table) +{ + bool success = false; + + Hook_D3D11* pInterceptor = Hook_D3D11::GetInterceptor(); + + if (pInterceptor != nullptr) + { + bool attach_success = false; + + if (d3d11_table.D3D11CreateDevice != nullptr) + { + pInterceptor->hook_D3D11CreateDevice_.SetHooks(d3d11_table.D3D11CreateDevice, Mine_D3D11CreateDevice); + attach_success = pInterceptor->hook_D3D11CreateDevice_.Attach(); + + gpu_table.D3D11CreateDevice = pInterceptor->hook_D3D11CreateDevice_.real_hook_; + } + + if (d3d11_table.D3D11CreateDeviceAndSwapChain != nullptr) + { + pInterceptor->hook_D3D11CreateDeviceAndSwapChain_.SetHooks(d3d11_table.D3D11CreateDeviceAndSwapChain, + Mine_D3D11CreateDeviceAndSwapChain); + attach_success = pInterceptor->hook_D3D11CreateDeviceAndSwapChain_.Attach(); + + gpu_table.D3D11CreateDeviceAndSwapChain = pInterceptor->hook_D3D11CreateDeviceAndSwapChain_.real_hook_; + } + + if (d3d11_table.D3D11On12CreateDevice != nullptr) + { + pInterceptor->hook_D3D11On12CreateDevice_.SetHooks(d3d11_table.D3D11On12CreateDevice, + Mine_D3D11On12CreateDevice); + attach_success = pInterceptor->hook_D3D11On12CreateDevice_.Attach(); + + gpu_table.D3D11On12CreateDevice = pInterceptor->hook_D3D11On12CreateDevice_.real_hook_; + } + + success = true; + } + + return success; +} + +//----------------------------------------------------------------------------- +/// Get unique instance of Hook_D3D11 +/// +/// \return Pointer to instance of Hook_D3D11 +//----------------------------------------------------------------------------- +Hook_D3D11* Hook_D3D11::GetInterceptor() +{ + if (hook_info_.interceptor == nullptr) + { + hook_info_.interceptor = new Hook_D3D11(); + } + + return hook_info_.interceptor; +} + +//----------------------------------------------------------------------------- +/// Attach API entry points for hooking. +/// +/// \param capture Whether capture is enabled +/// +/// \return True if entry points were successfully hooked. +//----------------------------------------------------------------------------- +bool Hook_D3D11::HookInterceptor(bool capture) +{ + bool success = false; + + Hook_D3D11* pInterceptor = GetInterceptor(); + + if (pInterceptor != nullptr) + { + gfxrecon::encode::D3D11DispatchTable dispatch_table_d3d11 = {}; + + success = GetD3d11DispatchTable(dispatch_table_d3d11); + + if (success == true) + { + success = GetD3d11DispatchTableHooked(dispatch_table_d3d11, hook_info_.dispatch_table); + + if (success == true) + { + if (capture == true) + { + if (hook_info_.capture_dll == nullptr) + { + hook_info_.capture_dll = gfxrecon::util::platform::OpenLibrary(GFXR_D3D12_CAPTURE_PATH); + + if (hook_info_.capture_dll != nullptr) + { + auto init_func = reinterpret_cast( + GetProcAddress(hook_info_.capture_dll, "InitializeD3D11Capture")); + + if (init_func != nullptr) + { + init_func(&hook_info_.dispatch_table); + } + } + } + } + } + } + } + + return success; +} + +//----------------------------------------------------------------------------- +/// Detach all hooked API entry points. +/// +/// \return True if entry points were successfully detached. +//----------------------------------------------------------------------------- +bool Hook_D3D11::UnhookInterceptor() +{ + bool success = false; + + Hook_D3D11* pInterceptor = GetInterceptor(); + + if (pInterceptor != nullptr) + { + pInterceptor->hook_D3D11CreateDevice_.Detach(); + pInterceptor->hook_D3D11CreateDeviceAndSwapChain_.Detach(); + pInterceptor->hook_D3D11On12CreateDevice_.Detach(); + + success = true; + } + + return success; +} diff --git a/layer/d3d11/hook_d3d11.h b/layer/d3d11/hook_d3d11.h new file mode 100644 index 0000000000..91fff5a30e --- /dev/null +++ b/layer/d3d11/hook_d3d11.h @@ -0,0 +1,101 @@ +/* +** Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and associated documentation files (the "Software"), +** to deal in the Software without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Software, and to permit persons to whom the +** Software is furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Software. +** +** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +** DEALINGS IN THE SOFTWARE. +*/ + +#ifndef GFXRECON_HOOK_D3D11_H +#define GFXRECON_HOOK_D3D11_H + +#include "encode/d3d11_dispatch_table.h" + +#include "util/interception/real_and_mine_hook.h" + +#include +#include +#include + +class Hook_D3D11; + +// Helper struct that holds data required for hook management +struct D3d11HookInfo +{ + // GFXR DLL with capture implementation, which is only loaded when capture is enabled + HMODULE capture_dll = nullptr; + + // System DLL providing the D3D11 API calls to wrap + HMODULE d3d11_dll = nullptr; + + // Dispatch table pointing either at the GPU or capture layer + gfxrecon::encode::D3D11DispatchTable dispatch_table = {}; + + // Interceptor class in charge of hooking + Hook_D3D11* interceptor = nullptr; +}; + +//----------------------------------------------------------------------------- +/// typedef function pointers +//----------------------------------------------------------------------------- +typedef HRESULT(WINAPI* PFN_D3D11_CREATE_DEVICE)(IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + ID3D11Device** ppDevice, + D3D_FEATURE_LEVEL* pFeatureLevel, + ID3D11DeviceContext** ppImmediateContext); + +typedef HRESULT(WINAPI* PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN)(IDXGIAdapter* pAdapter, + D3D_DRIVER_TYPE DriverType, + HMODULE Software, + UINT Flags, + const D3D_FEATURE_LEVEL* pFeatureLevels, + UINT FeatureLevels, + UINT SDKVersion, + const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc, + IDXGISwapChain** ppSwapChain, + ID3D11Device** ppDevice, + D3D_FEATURE_LEVEL* pFeatureLevel, + ID3D11DeviceContext** ppImmediateContext); + +//----------------------------------------------------------------------------- +/// This class is responsible for hooking D3D11 module entry points. It contains +/// a "Mine" implementation for each hooked function. +//----------------------------------------------------------------------------- +class Hook_D3D11 +{ + public: + static Hook_D3D11* GetInterceptor(); + + Hook_D3D11() {} + virtual ~Hook_D3D11() {} + + static bool HookInterceptor(bool capture); + static bool UnhookInterceptor(); + + gfxrecon::util::interception::RealAndMineHook hook_D3D11CreateDevice_; + gfxrecon::util::interception::RealAndMineHook + hook_D3D11CreateDeviceAndSwapChain_; + gfxrecon::util::interception::RealAndMineHook hook_D3D11On12CreateDevice_; +}; + +#endif // GFXRECON_HOOK_D3D11_H diff --git a/layer/d3d12/dll_main.cpp b/layer/d3d12/dll_main.cpp index 2db8acf827..e074e9a5a0 100644 --- a/layer/d3d12/dll_main.cpp +++ b/layer/d3d12/dll_main.cpp @@ -1,5 +1,6 @@ /* ** Copyright (c) 2020 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -38,7 +39,9 @@ const char kSystemDllNameRenamed[] = "d3d12_ms.dll"; const char kCaptureDllName[] = "d3d12_capture.dll"; const char kCaptureDllInitProcName[] = "InitializeD3D12Capture"; const char kCaptureDllDestroyProcName[] = "ReleaseD3D12Capture"; +const char kDx12RedistRuntime[] = "D3D12Core.dll"; +static HINSTANCE dll_instance; static gfxrecon::encode::DxDllInitializer dll_initializer; inline const gfxrecon::encode::D3D12DispatchTable& GetDispatchTable() @@ -85,7 +88,8 @@ static bool Initialize() std::unique_lock initialization_lock(initialization_mutex); if (initialized == false) { - std::string module_path = gfxrecon::encode::SetupCaptureModule(kSystemDllName, kSystemDllNameRenamed); + std::string module_path = gfxrecon::encode::SetupCaptureModule( + dll_instance, kSystemDllName, kSystemDllNameRenamed, kDx12RedistRuntime); initialized = dll_initializer.Initialize( module_path.c_str(), kCaptureDllName, kCaptureDllInitProcName, LoadD3D12CaptureProcs); @@ -217,6 +221,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { switch (fdwReason) { + case DLL_PROCESS_ATTACH: + dll_instance = hinstDLL; + break; case DLL_PROCESS_DETACH: // Only cleanup if the process is not exiting. if (lpvReserved == nullptr) diff --git a/layer/d3d12_capture/d3d12_capture.def b/layer/d3d12_capture/d3d12_capture.def index 46f78b2d67..7adbf4eea9 100644 --- a/layer/d3d12_capture/d3d12_capture.def +++ b/layer/d3d12_capture/d3d12_capture.def @@ -3,6 +3,8 @@ EXPORTS InitializeDxgiCapture InitializeD3D12Capture InitializeAgsCapture +InitializeD3D11Capture ReleaseDxgiCapture ReleaseD3D12Capture ReleaseAgsCapture +ReleaseD3D11Capture diff --git a/layer/d3d12_capture/dll_main.cpp b/layer/d3d12_capture/dll_main.cpp index d1768f1919..1b44dcabcc 100644 --- a/layer/d3d12_capture/dll_main.cpp +++ b/layer/d3d12_capture/dll_main.cpp @@ -1,6 +1,7 @@ /* ** Copyright (c) 2020 LunarG, Inc. ** Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -29,6 +30,7 @@ #endif // GFXRECON_AGS_SUPPORT #include "encode/d3d12_capture_manager.h" #include "encode/d3d12_dispatch_table.h" +#include "encode/d3d11_dispatch_table.h" #include "encode/dxgi_dispatch_table.h" #include "generated/generated_dx12_wrappers.h" @@ -111,7 +113,6 @@ EXTERN_C bool InitializeAgsCapture(gfxrecon::encode::AgsDispatchTable* table) return true; } - return false; } #else @@ -121,6 +122,26 @@ EXTERN_C bool InitializeAgsCapture() } #endif // GFXRECON_AGS_SUPPORT +EXTERN_C bool InitializeD3D11Capture(gfxrecon::encode::D3D11DispatchTable* table) +{ + if (gfxrecon::encode::D3D12CaptureManager::CreateInstance()) + { + // Store the real D3D11 functions with the capture manager. The wrapper functions will retrieve the real + // functions from the capture manager. + auto manager = gfxrecon::encode::D3D12CaptureManager::Get(); + manager->InitD3D11DispatchTable(*table); + + // Update the dispatch table with the wrapper functions. + table->D3D11CreateDevice = gfxrecon::encode::D3D11CreateDevice; + table->D3D11CreateDeviceAndSwapChain = gfxrecon::encode::D3D11CreateDeviceAndSwapChain; + table->D3D11On12CreateDevice = gfxrecon::encode::D3D11On12CreateDevice; + + return true; + } + + return false; +} + EXTERN_C void WINAPI ReleaseDxgiCapture(gfxrecon::encode::DxgiDispatchTable*) { gfxrecon::encode::D3D12CaptureManager::DestroyInstance(); @@ -138,6 +159,10 @@ EXTERN_C void WINAPI ReleaseAgsCapture(gfxrecon::encode::AgsDispatchTable*) #endif // GFXRECON_AGS_SUPPORT } +EXTERN_C void WINAPI ReleaseD3D11Capture(gfxrecon::encode::D3D11DispatchTable*) +{ + gfxrecon::encode::D3D12CaptureManager::DestroyInstance(); +} BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { diff --git a/layer/dxgi/dll_main.cpp b/layer/dxgi/dll_main.cpp index 70f6e076c7..ec46e2aa6d 100644 --- a/layer/dxgi/dll_main.cpp +++ b/layer/dxgi/dll_main.cpp @@ -1,5 +1,6 @@ /* ** Copyright (c) 2020 LunarG, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -39,6 +40,7 @@ const char kCaptureDllName[] = "d3d12_capture.dll"; const char kCaptureDllInitProcName[] = "InitializeDxgiCapture"; const char kCaptureDllDestroyProcName[] = "ReleaseDxgiCapture"; +static HINSTANCE dll_instance; static gfxrecon::encode::DxDllInitializer dll_initializer; inline const gfxrecon::encode::DxgiDispatchTable& GetDispatchTable() @@ -77,7 +79,8 @@ static bool Initialize() std::unique_lock initialization_lock(initialization_mutex); if (initialized == false) { - std::string module_path = gfxrecon::encode::SetupCaptureModule(kSystemDllName, kSystemDllNameRenamed); + std::string module_path = + gfxrecon::encode::SetupCaptureModule(dll_instance, kSystemDllName, kSystemDllNameRenamed, nullptr); initialized = dll_initializer.Initialize( module_path.c_str(), kCaptureDllName, kCaptureDllInitProcName, LoadDxgiCaptureProcs); @@ -159,6 +162,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { switch (fdwReason) { + case DLL_PROCESS_ATTACH: + dll_instance = hinstDLL; + break; case DLL_PROCESS_DETACH: // Only cleanup if the process is not exiting. if (lpvReserved == nullptr) diff --git a/tools/convert/main.cpp b/tools/convert/main.cpp index b7528d0836..4359137dbf 100644 --- a/tools/convert/main.cpp +++ b/tools/convert/main.cpp @@ -2,6 +2,7 @@ ** Copyright (c) 2018-2023 Valve Corporation ** Copyright (c) 2018-2023 LunarG, Inc. ** Copyright (c) 2020 Advanced Micro Devices, Inc. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -176,9 +177,10 @@ int main(int argc, const char** argv) gfxrecon::decode::FileProcessor file_processor; #ifndef D3D12_SUPPORT + bool detected_d3d11 = false; bool detected_d3d12 = false; bool detected_vulkan = false; - gfxrecon::decode::DetectAPIs(input_filename, detected_d3d12, detected_vulkan); + gfxrecon::decode::DetectAPIs(input_filename, detected_d3d11, detected_d3d12, detected_vulkan); if (!detected_vulkan) { diff --git a/tools/info/main.cpp b/tools/info/main.cpp index 0110c80be3..7ca42b2f12 100644 --- a/tools/info/main.cpp +++ b/tools/info/main.cpp @@ -1,6 +1,7 @@ /* ** Copyright (c) 2020-2024 LunarG, Inc. ** Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -71,6 +72,9 @@ const char kOptions[] = "-h|--help,--version,--no-debug-popup,--exe-info-only,-- const char kUnrecognizedFormatString[] = ""; +const char kD3D11Name[] = "D3D11"; +const char kD3D12Name[] = "D3D12"; + const int kDefaultIndent = 12; struct AnnotationInfo @@ -293,7 +297,6 @@ void PrintAnnotations(uint32_t annotation_count, // If the capture file had target annotations, display them in an info block if (!all_annotation_infos.empty()) { - GFXRECON_WRITE_CONSOLE(""); GFXRECON_WRITE_CONSOLE("Annotations:"); for (const auto& annotation_info : all_annotation_infos) @@ -357,126 +360,105 @@ void GatherAndPrintExeInfo(const std::string& input_filename) } } +void PrintApiAgnosticStats(const ApiAgnosticStats& api_agnostic_stats) +{ + GFXRECON_WRITE_CONSOLE(""); + GFXRECON_WRITE_CONSOLE("File info:"); + + // Compression type. + std::string compression_type_name = gfxrecon::format::GetCompressionTypeName(api_agnostic_stats.compression_type); + if (!compression_type_name.empty()) + { + GFXRECON_WRITE_CONSOLE("\tCompression format: %s", compression_type_name.c_str()); + } + else + { + GFXRECON_WRITE_CONSOLE("\tCompression format: %s", kUnrecognizedFormatString); + } +} + void PrintVulkanStats(const gfxrecon::decode::VulkanStatsConsumer& vulkan_stats_consumer, const gfxrecon::decode::FileProcessor& file_processor, const ApiAgnosticStats& api_agnostic_stats, const AnnotationRecorder& annotation_recoder) { - if (api_agnostic_stats.error_state == gfxrecon::decode::FileProcessor::kErrorNone) - { - GFXRECON_WRITE_CONSOLE(""); - GFXRECON_WRITE_CONSOLE("File info:"); - gfxrecon::format::CompressionType compression_type = gfxrecon::format::CompressionType::kNone; + // Frame counts. + uint32_t trim_start_frame = vulkan_stats_consumer.GetTrimmedStartFrame(); + uint32_t frame_count = file_processor.GetCurrentFrameNumber(); - auto file_options = file_processor.GetFileOptions(); - for (const auto& option : file_options) - { - if (option.key == gfxrecon::format::FileOption::kCompressionType) - { - compression_type = static_cast(option.value); - } - } - - // Compression type. - std::string compression_type_name = gfxrecon::format::GetCompressionTypeName(compression_type); - if (!compression_type_name.empty()) - { - GFXRECON_WRITE_CONSOLE("\tCompression format: %s", compression_type_name.c_str()); - } - else - { - GFXRECON_WRITE_CONSOLE("\tCompression format: %s", kUnrecognizedFormatString); - } - - // Frame counts. - uint32_t trim_start_frame = vulkan_stats_consumer.GetTrimmedStartFrame(); - uint32_t frame_count = file_processor.GetCurrentFrameNumber(); + if (trim_start_frame == 0) + { + // Not a trimmed file. + GFXRECON_WRITE_CONSOLE("\tTotal frames: %u", frame_count); + } + else + { + // Include the frame range for trimmed files. + GFXRECON_WRITE_CONSOLE("\tTotal frames: %u (trimmed frame range %u-%u)", + frame_count, + trim_start_frame, + trim_start_frame + frame_count - 1); + } - if (trim_start_frame == 0) - { - // Not a trimmed file. - GFXRECON_WRITE_CONSOLE("\tTotal frames: %u", frame_count); - } - else - { - // Include the frame range for trimmed files. - GFXRECON_WRITE_CONSOLE("\tTotal frames: %u (trimmed frame range %u-%u)", - frame_count, - trim_start_frame, - trim_start_frame + frame_count - 1); - } + // Application info. + uint32_t api_version = vulkan_stats_consumer.GetApiVersion(); + GFXRECON_WRITE_CONSOLE("\nVulkan application info:"); + GFXRECON_WRITE_CONSOLE("\tApplication name: %s", vulkan_stats_consumer.GetAppName().c_str()); + GFXRECON_WRITE_CONSOLE("\tApplication version: %u", vulkan_stats_consumer.GetAppVersion()); + GFXRECON_WRITE_CONSOLE("\tEngine name: %s", vulkan_stats_consumer.GetEngineName().c_str()); + GFXRECON_WRITE_CONSOLE("\tEngine version: %u", vulkan_stats_consumer.GetEngineVersion()); + GFXRECON_WRITE_CONSOLE("\tTarget API version: %u (%s)", api_version, GetVersionString(api_version).c_str()); - // Application info. - uint32_t api_version = vulkan_stats_consumer.GetApiVersion(); - GFXRECON_WRITE_CONSOLE("\nVulkan application info:"); - GFXRECON_WRITE_CONSOLE("\tApplication name: %s", vulkan_stats_consumer.GetAppName().c_str()); - GFXRECON_WRITE_CONSOLE("\tApplication version: %u", vulkan_stats_consumer.GetAppVersion()); - GFXRECON_WRITE_CONSOLE("\tEngine name: %s", vulkan_stats_consumer.GetEngineName().c_str()); - GFXRECON_WRITE_CONSOLE("\tEngine version: %u", vulkan_stats_consumer.GetEngineVersion()); - GFXRECON_WRITE_CONSOLE("\tTarget API version: %u (%s)", api_version, GetVersionString(api_version).c_str()); - - // Properties for physical devices used to create logical devices. - std::vector used_device_properties; - auto used_devices = vulkan_stats_consumer.GetInstantiatedDevices(); - for (auto entry : used_devices) + // Properties for physical devices used to create logical devices. + std::vector used_device_properties; + auto used_devices = vulkan_stats_consumer.GetInstantiatedDevices(); + for (auto entry : used_devices) + { + auto properties = vulkan_stats_consumer.GetDeviceProperties(entry); + if (properties != nullptr) { - auto properties = vulkan_stats_consumer.GetDeviceProperties(entry); - if (properties != nullptr) - { - used_device_properties.push_back(properties); - } + used_device_properties.push_back(properties); } + } - // Don't print anything if no queries were made for VkPhysicalDeviceProperties. - if (!used_device_properties.empty()) + // Don't print anything if no queries were made for VkPhysicalDeviceProperties. + if (!used_device_properties.empty()) + { + for (auto entry : used_device_properties) { - for (auto entry : used_device_properties) - { - GFXRECON_WRITE_CONSOLE("\nVulkan physical device info:"); - GFXRECON_WRITE_CONSOLE("\tDevice name: %s", entry->deviceName); - GFXRECON_WRITE_CONSOLE("\tDevice ID: 0x%x", entry->deviceID); - GFXRECON_WRITE_CONSOLE("\tVendor ID: 0x%x", entry->vendorID); - GFXRECON_WRITE_CONSOLE("\tDriver version: %u (0x%x)", entry->driverVersion, entry->driverVersion); - GFXRECON_WRITE_CONSOLE( - "\tAPI version: %u (%s)", entry->apiVersion, GetVersionString(entry->apiVersion).c_str()); - } + GFXRECON_WRITE_CONSOLE("\nVulkan physical device info:"); + GFXRECON_WRITE_CONSOLE("\tDevice name: %s", entry->deviceName); + GFXRECON_WRITE_CONSOLE("\tDevice ID: 0x%x", entry->deviceID); + GFXRECON_WRITE_CONSOLE("\tVendor ID: 0x%x", entry->vendorID); + GFXRECON_WRITE_CONSOLE("\tDriver version: %u (0x%x)", entry->driverVersion, entry->driverVersion); + GFXRECON_WRITE_CONSOLE( + "\tAPI version: %u (%s)", entry->apiVersion, GetVersionString(entry->apiVersion).c_str()); } + } - auto alocation_count = vulkan_stats_consumer.GetAllocationCount(); - GFXRECON_WRITE_CONSOLE("\nVulkan device memory allocation info:"); - GFXRECON_WRITE_CONSOLE("\tTotal allocations: %" PRIu64, alocation_count); + auto alocation_count = vulkan_stats_consumer.GetAllocationCount(); + GFXRECON_WRITE_CONSOLE("\nVulkan device memory allocation info:"); + GFXRECON_WRITE_CONSOLE("\tTotal allocations: %" PRIu64, alocation_count); - if (alocation_count > 0) - { - GFXRECON_WRITE_CONSOLE("\tMin allocation size: %" PRIu64, vulkan_stats_consumer.GetMinAllocationSize()); - GFXRECON_WRITE_CONSOLE("\tMax allocation size: %" PRIu64, vulkan_stats_consumer.GetMaxAllocationSize()); - } + if (alocation_count > 0) + { + GFXRECON_WRITE_CONSOLE("\tMin allocation size: %" PRIu64, vulkan_stats_consumer.GetMinAllocationSize()); + GFXRECON_WRITE_CONSOLE("\tMax allocation size: %" PRIu64, vulkan_stats_consumer.GetMaxAllocationSize()); + } - GFXRECON_WRITE_CONSOLE("\nVulkan pipeline info:"); - GFXRECON_WRITE_CONSOLE("\tTotal graphics pipelines: %" PRIu64, - vulkan_stats_consumer.GetGraphicsPipelineCount()); - GFXRECON_WRITE_CONSOLE("\tTotal compute pipelines: %" PRIu64, vulkan_stats_consumer.GetComputePipelineCount()); + GFXRECON_WRITE_CONSOLE("\nVulkan pipeline info:"); + GFXRECON_WRITE_CONSOLE("\tTotal graphics pipelines: %" PRIu64, vulkan_stats_consumer.GetGraphicsPipelineCount()); + GFXRECON_WRITE_CONSOLE("\tTotal compute pipelines: %" PRIu64, vulkan_stats_consumer.GetComputePipelineCount()); - // TODO: This is the number of recorded draw calls, which will not reflect the number of draw calls - // executed when recorded once to a command buffer that is submitted/replayed more than once. - // GFXRECON_WRITE_CONSOLE("\nDraw/dispatch call info:"); - // GFXRECON_WRITE_CONSOLE("\tTotal draw calls: %" PRIu64, stats_consumer.GetDrawCount()); - // GFXRECON_WRITE_CONSOLE("\tTotal dispatch calls: %" PRIu64, stats_consumer.GetDispatchCount()); + // TODO: This is the number of recorded draw calls, which will not reflect the number of draw calls + // executed when recorded once to a command buffer that is submitted/replayed more than once. + // GFXRECON_WRITE_CONSOLE("\nDraw/dispatch call info:"); + // GFXRECON_WRITE_CONSOLE("\tTotal draw calls: %" PRIu64, stats_consumer.GetDrawCount()); + // GFXRECON_WRITE_CONSOLE("\tTotal dispatch calls: %" PRIu64, stats_consumer.GetDispatchCount()); - if (file_processor.GetCurrentFrameNumber() == 0) - { - GFXRECON_WRITE_CONSOLE("\nFile did not contain any frames"); - } - } - else if (api_agnostic_stats.error_state != gfxrecon::decode::FileProcessor::kErrorNone) - { - GFXRECON_WRITE_CONSOLE("A failure has occurred during file processing"); - gfxrecon::util::Log::Release(); - exit(-1); - } - else + if (file_processor.GetCurrentFrameNumber() == 0) { - GFXRECON_WRITE_CONSOLE("File did not contain any frames"); + GFXRECON_WRITE_CONSOLE("\nFile did not contain any frames"); } } @@ -506,9 +488,11 @@ void PrintDx12RuntimeInfo(gfxrecon::decode::Dx12StatsConsumer& dx12_consumer) GFXRECON_WRITE_CONSOLE(""); } -void PrintDx12AdapterInfo(gfxrecon::decode::Dx12StatsConsumer& dx12_consumer) +void PrintDxAdapterInfo(gfxrecon::decode::Dx12StatsConsumer& dx12_consumer, const char* api_name) { - GFXRECON_WRITE_CONSOLE("D3D12 adapter info:"); + GFXRECON_ASSERT(api_name != nullptr); + + GFXRECON_WRITE_CONSOLE("%s adapter info:", api_name); const std::vector adapters = dx12_consumer.GetAdapters(); if (adapters.empty() == false) @@ -560,9 +544,9 @@ void PrintDx12AdapterInfo(gfxrecon::decode::Dx12StatsConsumer& dx12_consumer) } } -void PrintDx12SwapchainInfo(gfxrecon::decode::Dx12StatsConsumer& dx12_consumer) +void PrintDxgiSwapchainInfo(gfxrecon::decode::Dx12StatsConsumer& dx12_consumer) { - GFXRECON_WRITE_CONSOLE("D3D12 swapchain info:"); + GFXRECON_WRITE_CONSOLE("DXGI swapchain info:"); if (dx12_consumer.FoundSwapchainInfo()) { @@ -610,87 +594,90 @@ void PrintDxrEiInfo(gfxrecon::decode::Dx12StatsConsumer& dx12_consumer) { GFXRECON_WRITE_CONSOLE("D3D12 DXR/EI optimized: no"); } + + GFXRECON_WRITE_CONSOLE(""); } } -void PrintD3D12Stats(gfxrecon::decode::Dx12StatsConsumer& dx12_consumer, +void PrintD3D11Stats(gfxrecon::decode::Dx12StatsConsumer& dx12_consumer, const ApiAgnosticStats& api_agnostic_stats, - gfxrecon::decode::InfoConsumer& info_consumer, - const AnnotationRecorder& annotation_recoder) + gfxrecon::decode::InfoConsumer& info_consumer) { - if (api_agnostic_stats.error_state == gfxrecon::decode::FileProcessor::kErrorNone) + if (api_agnostic_stats.trim_start_frame == 0) { - GFXRECON_WRITE_CONSOLE(""); - GFXRECON_WRITE_CONSOLE("File info:"); - - // Compression type. - std::string compression_type_name = - gfxrecon::format::GetCompressionTypeName(api_agnostic_stats.compression_type); - if (!compression_type_name.empty()) - { - GFXRECON_WRITE_CONSOLE("\tCompression format: %s", compression_type_name.c_str()); - } - else - { - GFXRECON_WRITE_CONSOLE("\tCompression format: %s", kUnrecognizedFormatString); - } - - if (api_agnostic_stats.trim_start_frame == 0) - { - // Not a trimmed file. - GFXRECON_WRITE_CONSOLE("\tTotal frames: %u", api_agnostic_stats.frame_count); - } - else - { - GFXRECON_WRITE_CONSOLE("\tBlank frames: %u", dx12_consumer.GetDummyFrameCount()); - GFXRECON_WRITE_CONSOLE("\tCaptured frames: %u", api_agnostic_stats.frame_count); - GFXRECON_WRITE_CONSOLE("\tTotal frames: %u", - dx12_consumer.GetDummyFrameCount() + api_agnostic_stats.frame_count); - - GFXRECON_WRITE_CONSOLE("\tApplication frame range: %u-%u", - api_agnostic_stats.trim_start_frame, - api_agnostic_stats.trim_start_frame + api_agnostic_stats.frame_count - 1); - } - - if (dx12_consumer.GetDXGITestPresentCount() > 0 && api_agnostic_stats.uses_frame_markers == false) - { - GFXRECON_WRITE_CONSOLE("\tTest present count: %u", dx12_consumer.GetDXGITestPresentCount()); - } + // Not a trimmed file. + GFXRECON_WRITE_CONSOLE("\tTotal frames: %u", api_agnostic_stats.frame_count); + } + else + { + GFXRECON_WRITE_CONSOLE("\tBlank frames: %u", dx12_consumer.GetDummyFrameCount()); + GFXRECON_WRITE_CONSOLE("\tCaptured frames: %u", api_agnostic_stats.frame_count); + GFXRECON_WRITE_CONSOLE("\tTotal frames: %u", + dx12_consumer.GetDummyFrameCount() + api_agnostic_stats.frame_count); - PrintDriverInfo(info_consumer); + GFXRECON_WRITE_CONSOLE("\tApplication frame range: %u-%u", + api_agnostic_stats.trim_start_frame, + api_agnostic_stats.trim_start_frame + api_agnostic_stats.frame_count - 1); + } - PrintDx12RuntimeInfo(dx12_consumer); + if (dx12_consumer.GetDXGITestPresentCount() > 0 && api_agnostic_stats.uses_frame_markers == false) + { + GFXRECON_WRITE_CONSOLE("\tTest present count: %u", dx12_consumer.GetDXGITestPresentCount()); + } - PrintDx12AdapterInfo(dx12_consumer); + PrintDriverInfo(info_consumer); - PrintDx12SwapchainInfo(dx12_consumer); + PrintDxAdapterInfo(dx12_consumer, kD3D11Name); +} - PrintDxrEiInfo(dx12_consumer); - } - else if (api_agnostic_stats.error_state != gfxrecon::decode::FileProcessor::kErrorNone) +void PrintD3D12Stats(gfxrecon::decode::Dx12StatsConsumer& dx12_consumer, + const ApiAgnosticStats& api_agnostic_stats, + gfxrecon::decode::InfoConsumer& info_consumer, + const AnnotationRecorder& annotation_recoder) +{ + if (api_agnostic_stats.trim_start_frame == 0) { - GFXRECON_WRITE_CONSOLE("A failure has occurred during file processing"); - gfxrecon::util::Log::Release(); - exit(-1); + // Not a trimmed file. + GFXRECON_WRITE_CONSOLE("\tTotal frames: %u", api_agnostic_stats.frame_count); } else { - GFXRECON_WRITE_CONSOLE("File did not contain any frames"); + GFXRECON_WRITE_CONSOLE("\tBlank frames: %u", dx12_consumer.GetDummyFrameCount()); + GFXRECON_WRITE_CONSOLE("\tCaptured frames: %u", api_agnostic_stats.frame_count); + GFXRECON_WRITE_CONSOLE("\tTotal frames: %u", + dx12_consumer.GetDummyFrameCount() + api_agnostic_stats.frame_count); + + GFXRECON_WRITE_CONSOLE("\tApplication frame range: %u-%u", + api_agnostic_stats.trim_start_frame, + api_agnostic_stats.trim_start_frame + api_agnostic_stats.frame_count - 1); + } + + if (dx12_consumer.GetDXGITestPresentCount() > 0 && api_agnostic_stats.uses_frame_markers == false) + { + GFXRECON_WRITE_CONSOLE("\tTest present count: %u", dx12_consumer.GetDXGITestPresentCount()); } + + PrintDriverInfo(info_consumer); + + PrintDx12RuntimeInfo(dx12_consumer); + + PrintDxAdapterInfo(dx12_consumer, kD3D12Name); + + PrintDxrEiInfo(dx12_consumer); } static bool CheckOptionEnumGpuIndices(const char* exe_name, const gfxrecon::util::ArgumentParser& arg_parser) { if (arg_parser.IsOptionSet(kEnumGpuIndices)) { - IDXGIFactory1* factory1 = nullptr; + gfxrecon::graphics::dx12::IDXGIFactory1ComPtr factory1; - HRESULT result = CreateDXGIFactory1(IID_IDXGIFactory1, reinterpret_cast(&factory1)); + HRESULT result = CreateDXGIFactory1(IID_PPV_ARGS(&factory1)); if (SUCCEEDED(result)) { gfxrecon::graphics::dx12::ActiveAdapterMap adapters{}; - gfxrecon::graphics::dx12::TrackAdapters(result, reinterpret_cast(&factory1), adapters); + gfxrecon::graphics::dx12::TrackAdapters(factory1, adapters); GFXRECON_WRITE_CONSOLE("GPU index\tGPU name"); for (size_t index = 0; index < adapters.size(); ++index) @@ -708,7 +695,6 @@ static bool CheckOptionEnumGpuIndices(const char* exe_name, const gfxrecon::util } } } - factory1->Release(); } else { @@ -794,47 +780,72 @@ void GatherAndPrintAllInfo(const std::string& input_filename) ApiAgnosticStats api_agnostic_stats = {}; GatherApiAgnosticStats(api_agnostic_stats, file_processor, stat_consumer); - std::vector target_annotations = { - { "GFXR version", gfxrecon::format::kOperationAnnotationGfxreconstructVersion }, - { "Capture timestamp", gfxrecon::format::kOperationAnnotationTimestamp } - }; + if (api_agnostic_stats.error_state == gfxrecon::decode::FileProcessor::kErrorNone) + { + std::vector target_annotations = { + { "GFXR version", gfxrecon::format::kOperationAnnotationGfxreconstructVersion }, + { "Capture timestamp", gfxrecon::format::kOperationAnnotationTimestamp } + }; - // If no APIs were detected, print stats for all APIs. - bool print_all_apis = !vulkan_detection_consumer.WasVulkanAPIDetected(); + // If no APIs were detected, print stats for all APIs. + bool print_all_apis = !vulkan_detection_consumer.WasVulkanAPIDetected(); #if defined(D3D12_SUPPORT) - print_all_apis = print_all_apis && !dx12_detection_consumer.WasD3D12APIDetected(); + print_all_apis = print_all_apis && !dx12_detection_consumer.WasD3D12APIDetected(); #endif - if (print_all_apis) - { - GFXRECON_WRITE_CONSOLE("Unable to detect capture file API(s). Writing all stats."); - GFXRECON_WRITE_CONSOLE(""); - } + if (print_all_apis) + { + GFXRECON_WRITE_CONSOLE("Unable to detect capture file API(s). Writing all stats."); + GFXRECON_WRITE_CONSOLE(""); + } - PrintExeInfo(info_consumer); + PrintExeInfo(info_consumer); + PrintApiAgnosticStats(api_agnostic_stats); - if (vulkan_detection_consumer.WasVulkanAPIDetected() || print_all_apis) - { - PrintVulkanStats(vulkan_stats_consumer, file_processor, api_agnostic_stats, annotation_recorder); - - // Add annotations relevant to Vulkan - target_annotations.push_back({ "Vulkan version", gfxrecon::format::kOperationAnnotationVulkanVersion }); - target_annotations.push_back( - { "Default replay options", gfxrecon::format::kAnnotationLabelReplayOptions }); - target_annotations.push_back( - { "Non-default capture options", gfxrecon::format::kOperationAnnotationCaptureParameters }); - } + if (vulkan_detection_consumer.WasVulkanAPIDetected() || print_all_apis) + { + PrintVulkanStats(vulkan_stats_consumer, file_processor, api_agnostic_stats, annotation_recorder); + + // Add annotations relevant to Vulkan + target_annotations.push_back( + { "Vulkan version", gfxrecon::format::kOperationAnnotationVulkanVersion }); + target_annotations.push_back( + { "Default replay options", gfxrecon::format::kAnnotationLabelReplayOptions }); + target_annotations.push_back( + { "Non-default capture options", gfxrecon::format::kOperationAnnotationCaptureParameters }); + } #if defined(D3D12_SUPPORT) - if (dx12_detection_consumer.WasD3D12APIDetected() || print_all_apis) - { - PrintD3D12Stats(dx12_consumer, api_agnostic_stats, info_consumer, annotation_recorder); - } + if (dx12_detection_consumer.WasD3D11APIDetected()) + { + PrintD3D11Stats(dx12_consumer, api_agnostic_stats, info_consumer); + } + + if (dx12_detection_consumer.WasD3D12APIDetected() || print_all_apis) + { + PrintD3D12Stats(dx12_consumer, api_agnostic_stats, info_consumer, annotation_recorder); + } + + if (dx12_detection_consumer.WasD3D11APIDetected() || dx12_detection_consumer.WasD3D12APIDetected()) + { + PrintDxgiSwapchainInfo(dx12_consumer); + } #endif - PrintAnnotations(annotation_recorder.GetAnnotationCount(), - annotation_recorder.GetOperationAnnotationDatas(), - target_annotations); + PrintAnnotations(annotation_recorder.GetAnnotationCount(), + annotation_recorder.GetOperationAnnotationDatas(), + target_annotations); + } + else if (api_agnostic_stats.error_state != gfxrecon::decode::FileProcessor::kErrorNone) + { + GFXRECON_WRITE_CONSOLE("A failure has occurred during file processing"); + gfxrecon::util::Log::Release(); + exit(-1); + } + else + { + GFXRECON_WRITE_CONSOLE("File did not contain any frames"); + } } else { diff --git a/tools/optimize/CMakeLists.txt b/tools/optimize/CMakeLists.txt index b877666e9e..4f384f346b 100644 --- a/tools/optimize/CMakeLists.txt +++ b/tools/optimize/CMakeLists.txt @@ -64,6 +64,7 @@ target_link_libraries(gfxrecon-optimize gfxrecon_format gfxrecon_util platform_specific + $<$:d3d11.lib> $<$:d3d12.lib> $<$:dxgi.lib>) diff --git a/tools/optimize/main.cpp b/tools/optimize/main.cpp index ec2e226dbd..c5e5af96e1 100644 --- a/tools/optimize/main.cpp +++ b/tools/optimize/main.cpp @@ -1,6 +1,7 @@ /* ** Copyright (c) 2020 LunarG, Inc. ** Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and associated documentation files (the "Software"), @@ -270,14 +271,15 @@ int main(int argc, const char** argv) // Automatic mode. User specified no options. if ((dx12_options.optimize_resource_values == false) && (dx12_options.remove_redundant_psos == false)) { + bool detected_d3d11 = false; bool detected_d3d12 = false; bool detected_vulkan = false; - gfxrecon::decode::DetectAPIs(input_filename, detected_d3d12, detected_vulkan); + gfxrecon::decode::DetectAPIs(input_filename, detected_d3d11, detected_d3d12, detected_vulkan); - if ((!detected_d3d12) && (!detected_vulkan)) + if ((!detected_d3d11) && (!detected_d3d12) && (!detected_vulkan)) { // Detect with no block limit - gfxrecon::decode::DetectAPIs(input_filename, detected_d3d12, detected_vulkan, true); + gfxrecon::decode::DetectAPIs(input_filename, detected_d3d11, detected_d3d12, detected_vulkan, true); } if (detected_d3d12) @@ -286,6 +288,11 @@ int main(int argc, const char** argv) dx12_options.remove_redundant_psos = true; RunDx12Optimizations(input_filename, output_filename, dx12_options); } + else if (detected_d3d11) + { + // TODO: redundant resource removal when D3D11 trimming is supported. + GFXRECON_LOG_INFO("D3D11 redundant resource removal is not currently implemented."); + } else if (detected_vulkan) { VkRemoveRedundantResources(input_filename, output_filename); diff --git a/tools/replay/CMakeLists.txt b/tools/replay/CMakeLists.txt index 0ea8b924b6..c7f4f0297c 100644 --- a/tools/replay/CMakeLists.txt +++ b/tools/replay/CMakeLists.txt @@ -47,6 +47,7 @@ target_link_libraries(gfxrecon-replay gfxrecon_format gfxrecon_util platform_specific + $<$:d3d11.lib> $<$:d3d12.lib> $<$:dxgi.lib>)