@@ -146,7 +146,7 @@ D3D12DebugManager::D3D12DebugManager(WrappedID3D12Device *wrapper)
146146 desc.NumDescriptors = rtvCount;
147147 desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV;
148148
149- RDCCOMPILE_ASSERT (LAST_WIN_RTV < rtvCount, " Increase size of RTV heap" );
149+ RDCCOMPILE_ASSERT (MAX_RTV_SLOT < rtvCount, " Increase size of RTV heap" );
150150
151151 hr = m_pDevice->CreateDescriptorHeap (&desc, __uuidof (ID3D12DescriptorHeap), (void **)&rtvHeap);
152152 m_pDevice->InternalRef ();
@@ -163,7 +163,7 @@ D3D12DebugManager::D3D12DebugManager(WrappedID3D12Device *wrapper)
163163 desc.NumDescriptors = dsvCount;
164164 desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_DSV;
165165
166- RDCCOMPILE_ASSERT (LAST_WIN_DSV < dsvCount, " Increase size of DSV heap" );
166+ RDCCOMPILE_ASSERT (MAX_DSV_SLOT < dsvCount, " Increase size of DSV heap" );
167167
168168 hr = m_pDevice->CreateDescriptorHeap (&desc, __uuidof (ID3D12DescriptorHeap), (void **)&dsvHeap);
169169 m_pDevice->InternalRef ();
@@ -175,10 +175,12 @@ D3D12DebugManager::D3D12DebugManager(WrappedID3D12Device *wrapper)
175175
176176 rm->SetInternalResource (dsvHeap);
177177
178- desc.NumDescriptors = 4096 ;
178+ const uint32_t srvCount = 4096 ;
179+
180+ desc.NumDescriptors = srvCount;
179181 desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV;
180182
181- RDCCOMPILE_ASSERT (MAX_SRV_SLOT < 4096 , " Increase size of CBV/SRV/UAV heap" );
183+ RDCCOMPILE_ASSERT (MAX_SRV_SLOT < srvCount , " Increase size of CBV/SRV/UAV heap" );
182184
183185 hr = m_pDevice->CreateDescriptorHeap (&desc, __uuidof (ID3D12DescriptorHeap), (void **)&uavClearHeap);
184186 m_pDevice->InternalRef ();
@@ -203,9 +205,13 @@ D3D12DebugManager::D3D12DebugManager(WrappedID3D12Device *wrapper)
203205
204206 rm->SetInternalResource (cbvsrvuavHeap);
205207
206- desc.NumDescriptors = 16 ;
208+ const uint32_t samplerCount = 300 ;
209+
210+ desc.NumDescriptors = samplerCount;
207211 desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER;
208212
213+ RDCCOMPILE_ASSERT (MAX_SAMPLER_SLOT < samplerCount, " Increase size of sampler heap" );
214+
209215 hr = m_pDevice->CreateDescriptorHeap (&desc, __uuidof (ID3D12DescriptorHeap), (void **)&samplerHeap);
210216 m_pDevice->InternalRef ();
211217
0 commit comments