MCPcopy Create free account
hub / github.com/crownengine/crown / create

Method create

3rdparty/bgfx/src/renderer_d3d12.cpp:3807–3830  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3805 }
3806
3807 void ScratchBufferD3D12::create(uint32_t _size, uint32_t _maxDescriptors)
3808 {
3809 m_size = _size;
3810
3811 ID3D12Device* device = s_renderD3D12->m_device;
3812 m_incrementSize = device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);
3813
3814 D3D12_DESCRIPTOR_HEAP_DESC desc;
3815 desc.NumDescriptors = _maxDescriptors;
3816 desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV;
3817 desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE;
3818 desc.NodeMask = 1;
3819 DX_CHECK(device->CreateDescriptorHeap(&desc
3820 , IID_ID3D12DescriptorHeap
3821 , (void**)&m_heap
3822 ) );
3823
3824 m_upload = createCommittedResource(device, HeapProperty::Upload, desc.NumDescriptors * 1024);
3825 m_gpuVA = m_upload->GetGPUVirtualAddress();
3826 D3D12_RANGE readRange = { 0, 0 };
3827 m_upload->Map(0, &readRange, (void**)&m_data);
3828
3829 reset(m_gpuHandle);
3830 }
3831
3832 void ScratchBufferD3D12::destroy()
3833 {

Callers 10

initMethod · 0.45
createIndexBufferMethod · 0.45
createVertexBufferMethod · 0.45
createShaderMethod · 0.45
createProgramMethod · 0.45
createTextureMethod · 0.45
resizeTextureMethod · 0.45
createFrameBufferMethod · 0.45

Calls 15

createCommittedResourceFunction · 0.85
getCPUHandleHeapStartFunction · 0.85
getGPUHandleHeapStartFunction · 0.85
allocFunction · 0.85
isShaderTypeFunction · 0.85
isShaderVerLessFunction · 0.85
getShaderTypeNameFunction · 0.85
skipFunction · 0.85
memSetFunction · 0.85
idToAttribFunction · 0.85
imageGetSizeFunction · 0.85

Tested by

no test coverage detected