Add renderer backpack scene integration test
This commit is contained in:
@@ -155,7 +155,7 @@ void D3D12Device::Shutdown() {
|
||||
bool D3D12Device::CreateDXGIFactory(bool enableDebugLayer) {
|
||||
UINT dxgiFactoryFlags = 0;
|
||||
|
||||
if (enableDebugLayer) {
|
||||
if (enableDebugLayer) {
|
||||
ID3D12Debug* debugController = nullptr;
|
||||
if (SUCCEEDED(D3D12GetDebugInterface(IID_PPV_ARGS(&debugController)))) {
|
||||
debugController->EnableDebugLayer();
|
||||
@@ -342,7 +342,15 @@ RHITexture* D3D12Device::CreateTexture(const TextureDesc& desc) {
|
||||
}
|
||||
|
||||
d3d12Desc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
|
||||
if (texture->Initialize(m_device.Get(), d3d12Desc)) {
|
||||
const bool isDepthFormat = format == Format::D24_UNorm_S8_UInt ||
|
||||
format == Format::D32_Float ||
|
||||
format == Format::D16_UNorm;
|
||||
const D3D12_RESOURCE_STATES initialState =
|
||||
isDepthFormat ? D3D12_RESOURCE_STATE_DEPTH_WRITE : D3D12_RESOURCE_STATE_COMMON;
|
||||
if (texture->Initialize(m_device.Get(), d3d12Desc, initialState)) {
|
||||
if (isDepthFormat) {
|
||||
texture->SetState(ResourceStates::DepthWrite);
|
||||
}
|
||||
return texture;
|
||||
}
|
||||
delete texture;
|
||||
|
||||
Reference in New Issue
Block a user