Fixed validation errors with Creators Update
This commit is contained in:
Родитель
d63b144be2
Коммит
cf4a2d49ac
|
@ -319,6 +319,11 @@ void NormalMapEffect::Impl::Apply(_In_ ID3D12GraphicsCommandList* commandList)
|
|||
}
|
||||
commandList->SetGraphicsRootDescriptorTable(RootParameterIndex::TextureSpecularSRV, specular);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set unused texture slot to void validation warning on Tier 1 hardware
|
||||
commandList->SetGraphicsRootDescriptorTable(RootParameterIndex::TextureSpecularSRV, texture);
|
||||
}
|
||||
|
||||
// Set constants
|
||||
commandList->SetGraphicsRootConstantBufferView(RootParameterIndex::ConstantBuffer, GetConstantBufferGpuAddress());
|
||||
|
|
|
@ -682,7 +682,7 @@ private:
|
|||
|
||||
// Create a BGRA alias
|
||||
auto aliasDesc = resourceDesc;
|
||||
aliasDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
|
||||
aliasDesc.Format = (resourceDesc.Format == DXGI_FORMAT_B8G8R8X8_UNORM || resourceDesc.Format == DXGI_FORMAT_B8G8R8X8_UNORM_SRGB) ? DXGI_FORMAT_B8G8R8X8_UNORM : DXGI_FORMAT_B8G8R8A8_UNORM;
|
||||
|
||||
ComPtr<ID3D12Resource> aliasCopy;
|
||||
ThrowIfFailed(mDevice->CreatePlacedResource(
|
||||
|
|
Загрузка…
Ссылка в новой задаче