summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/src/renderer_d3d12.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/src/renderer_d3d12.cpp')
-rw-r--r--3rdparty/bgfx/src/renderer_d3d12.cpp10
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();