From f9e6f05d145f64976f8d1b9b9ef26e87879aec1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 8 Mar 2016 18:56:38 -0800 Subject: [PATCH] Cleanup. --- src/renderer_d3d12.cpp | 6 +++--- src/renderer_d3d12.h | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/renderer_d3d12.cpp b/src/renderer_d3d12.cpp index d1475c652..ac7f95f2f 100644 --- a/src/renderer_d3d12.cpp +++ b/src/renderer_d3d12.cpp @@ -1857,7 +1857,7 @@ data.NumQualityLevels = 0; void commitShaderConstants(uint16_t _programIdx, D3D12_GPU_VIRTUAL_ADDRESS& _gpuAddress) { - ProgramD3D12& program = m_program[_programIdx]; + const ProgramD3D12& program = m_program[_programIdx]; uint32_t total = bx::strideAlign(0 + program.m_vsh->m_size + (NULL != program.m_fsh ? program.m_fsh->m_size : 0) @@ -2774,12 +2774,12 @@ data.NumQualityLevels = 0; DX_RELEASE(m_heap, 0); } - void ScratchBufferD3D12::reset(D3D12_GPU_DESCRIPTOR_HANDLE& gpuHandle) + void ScratchBufferD3D12::reset(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle) { m_pos = 0; m_cpuHandle = m_heap->GetCPUDescriptorHandleForHeapStart(); m_gpuHandle = m_heap->GetGPUDescriptorHandleForHeapStart(); - gpuHandle = m_gpuHandle; + _gpuHandle = m_gpuHandle; } void* ScratchBufferD3D12::allocCbv(D3D12_GPU_VIRTUAL_ADDRESS& _gpuAddress, uint32_t _size) diff --git a/src/renderer_d3d12.h b/src/renderer_d3d12.h index e78e0c52b..e4eb6da30 100644 --- a/src/renderer_d3d12.h +++ b/src/renderer_d3d12.h @@ -78,15 +78,15 @@ namespace bgfx { namespace d3d12 void create(uint32_t _size, uint32_t _maxDescriptors); void destroy(); - void reset(D3D12_GPU_DESCRIPTOR_HANDLE& gpuHandle); + void reset(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle); - void* allocCbv(D3D12_GPU_VIRTUAL_ADDRESS& gpuAddress, uint32_t _size); + void* allocCbv(D3D12_GPU_VIRTUAL_ADDRESS& _gpuAddress, uint32_t _size); - void allocSrv(D3D12_GPU_DESCRIPTOR_HANDLE& gpuHandle, struct TextureD3D12& _texture, uint8_t _mip = 0); - void allocSrv(D3D12_GPU_DESCRIPTOR_HANDLE& gpuHandle, struct BufferD3D12& _buffer); + void allocSrv(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle, struct TextureD3D12& _texture, uint8_t _mip = 0); + void allocSrv(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle, struct BufferD3D12& _buffer); - void allocUav(D3D12_GPU_DESCRIPTOR_HANDLE& gpuHandle, struct TextureD3D12& _texture, uint8_t _mip = 0); - void allocUav(D3D12_GPU_DESCRIPTOR_HANDLE& gpuHandle, struct BufferD3D12& _buffer); + void allocUav(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle, struct TextureD3D12& _texture, uint8_t _mip = 0); + void allocUav(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle, struct BufferD3D12& _buffer); ID3D12DescriptorHeap* getHeap() {