Skip to content

Commit

Permalink
Fix root signature highest version for vkd3d-proton
Browse files Browse the repository at this point in the history
  • Loading branch information
StarsX committed May 4, 2023
1 parent c073527 commit 4105d76
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion XUSG/Core/XUSG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ uint8_t XUSG::CalculateMipLevels(uint64_t width, uint32_t height, uint32_t depth
return CalculateMipLevels(static_cast<uint32_t>(width), height, depth);
}

uint32_t XUSG::CalculateSubresource(uint8_t mipSlice, uint8_t numMips, uint32_t arraySlice, uint32_t arraySize, uint8_t planeSlice)
uint32_t XUSG::CalcSubresource(uint8_t mipSlice, uint8_t numMips, uint32_t arraySlice, uint32_t arraySize, uint8_t planeSlice)
{
return mipSlice + arraySlice * numMips + planeSlice * numMips * arraySize;
}
2 changes: 1 addition & 1 deletion XUSG/Core/XUSG.h
Original file line number Diff line number Diff line change
Expand Up @@ -2317,5 +2317,5 @@ namespace XUSG
XUSG_INTERFACE uint8_t Log2(uint32_t value);
XUSG_INTERFACE uint8_t CalculateMipLevels(uint32_t width, uint32_t height, uint32_t depth = 1);
XUSG_INTERFACE uint8_t CalculateMipLevels(uint64_t width, uint32_t height, uint32_t depth = 1);
XUSG_INTERFACE uint32_t CalculateSubresource(uint8_t mipSlice, uint8_t numMips, uint32_t arraySlice, uint32_t arraySize, uint8_t planeSlice);
XUSG_INTERFACE uint32_t CalcSubresource(uint8_t mipSlice, uint8_t numMips, uint32_t arraySlice, uint32_t arraySize, uint8_t planeSlice);
}
3 changes: 2 additions & 1 deletion XUSG/Core/XUSGPipelineLayout_DX12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ D3D_ROOT_SIGNATURE_VERSION PipelineLayoutLib_DX12::GetRootSignatureHighestVersio
{
D3D12_FEATURE_DATA_ROOT_SIGNATURE featureData = {};

if (FAILED(m_device->CheckFeatureSupport(D3D12_FEATURE_ROOT_SIGNATURE, &featureData, sizeof(featureData))))
if (FAILED(m_device->CheckFeatureSupport(D3D12_FEATURE_ROOT_SIGNATURE,
&featureData, sizeof(featureData))) || !featureData.HighestVersion)
return D3D_ROOT_SIGNATURE_VERSION_1_0;

// This is the highest version the sample supports. If CheckFeatureSupport succeeds, the HighestVersion returned will not be greater than this.
Expand Down

0 comments on commit 4105d76

Please sign in to comment.