diff options
author | 2016-08-06 14:20:16 +0200 | |
---|---|---|
committer | 2016-08-06 14:20:16 +0200 | |
commit | 3917850b6197950e5671f4d3b9cb0b9c921b798d (patch) | |
tree | 503b9690868a7c238ba10d73b5c6bece7ca8c338 /3rdparty/bgfx/src/renderer_d3d12.cpp | |
parent | 057474989c1a92e9e935dbc8cb9d233ba3a4ea3a (diff) |
Update BX and BGFX (nw)
Diffstat (limited to '3rdparty/bgfx/src/renderer_d3d12.cpp')
-rw-r--r-- | 3rdparty/bgfx/src/renderer_d3d12.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/3rdparty/bgfx/src/renderer_d3d12.cpp b/3rdparty/bgfx/src/renderer_d3d12.cpp index 3a35feacd04..5624dc5dc58 100644 --- a/3rdparty/bgfx/src/renderer_d3d12.cpp +++ b/3rdparty/bgfx/src/renderer_d3d12.cpp @@ -1014,7 +1014,7 @@ namespace bgfx { namespace d3d12 for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) { - uint8_t support = BGFX_CAPS_FORMAT_TEXTURE_NONE; + uint16_t support = BGFX_CAPS_FORMAT_TEXTURE_NONE; const DXGI_FORMAT fmt = isDepth(TextureFormat::Enum(ii) ) ? s_textureFormat[ii].m_fmtDsv @@ -1464,7 +1464,7 @@ namespace bgfx { namespace d3d12 DX_RELEASE(readback, 0); } - void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE + void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips) BX_OVERRIDE { TextureD3D12& texture = m_textures[_handle.idx]; @@ -1480,7 +1480,7 @@ namespace bgfx { namespace d3d12 tc.m_height = _height; tc.m_sides = 0; tc.m_depth = 0; - tc.m_numMips = 1; + tc.m_numMips = _numMips; tc.m_format = TextureFormat::Enum(texture.m_requestedFormat); tc.m_cubeMap = false; tc.m_mem = NULL; @@ -5413,12 +5413,14 @@ data.NumQualityLevels = 0; m_gpuTimer.end(m_commandList); - while (m_gpuTimer.get() ) + do { double toGpuMs = 1000.0 / double(m_gpuTimer.m_frequency); elapsedGpuMs = m_gpuTimer.m_elapsed * toGpuMs; maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; } + while (m_gpuTimer.get() ); + maxGpuLatency = bx::uint32_imax(maxGpuLatency, m_gpuTimer.m_control.available()-1); const int64_t timerFreq = bx::getHPFrequency(); |