diff --git a/examples/08-update/update.cpp b/examples/08-update/update.cpp index 789b2a038..0b8f65e4b 100644 --- a/examples/08-update/update.cpp +++ b/examples/08-update/update.cpp @@ -189,17 +189,17 @@ public: } } - if (0 != (BGFX_CAPS_FORMAT_TEXTURE_2D & caps->formats[bgfx::TextureFormat::R8]) ) + if (0 != (BGFX_CAPS_FORMAT_TEXTURE_3D & caps->formats[bgfx::TextureFormat::R8]) ) { m_textures3d[m_numTextures3d++] = bgfx::createTexture3D(32, 32, 32, false, bgfx::TextureFormat::R8, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem8); } - if (0 != (BGFX_CAPS_FORMAT_TEXTURE_2D & caps->formats[bgfx::TextureFormat::R16F]) ) + if (0 != (BGFX_CAPS_FORMAT_TEXTURE_3D & caps->formats[bgfx::TextureFormat::R16F]) ) { m_textures3d[m_numTextures3d++] = bgfx::createTexture3D(32, 32, 32, false, bgfx::TextureFormat::R16F, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem16f); } - if (0 != (BGFX_CAPS_FORMAT_TEXTURE_2D & caps->formats[bgfx::TextureFormat::R32F]) ) + if (0 != (BGFX_CAPS_FORMAT_TEXTURE_3D & caps->formats[bgfx::TextureFormat::R32F]) ) { m_textures3d[m_numTextures3d++] = bgfx::createTexture3D(32, 32, 32, false, bgfx::TextureFormat::R32F, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem32f); } diff --git a/src/renderer_d3d12.cpp b/src/renderer_d3d12.cpp index 31fc2efed..31557ae14 100644 --- a/src/renderer_d3d12.cpp +++ b/src/renderer_d3d12.cpp @@ -4376,6 +4376,7 @@ data.NumQualityLevels = 0; bimg::imageCopy(temp , mip.m_height/blockInfo.blockHeight , (mip.m_width /blockInfo.blockWidth )*mip.m_blockSize + , depth , mip.m_data , pitch ); @@ -4395,6 +4396,7 @@ data.NumQualityLevels = 0; bimg::imageCopy(temp , mip.m_height , mip.m_width*mip.m_bpp/8 + , depth , mip.m_data , pitch ); diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index f3446dee6..54cc6a32c 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -5297,7 +5297,7 @@ namespace bgfx { namespace gl if (!unpackRowLength) { - bimg::imageCopy(temp, width, height, bpp, srcpitch, data); + bimg::imageCopy(temp, width, height, 1, bpp, srcpitch, data); data = temp; } @@ -5328,7 +5328,7 @@ namespace bgfx { namespace gl if (!unpackRowLength && !convert) { - bimg::imageCopy(temp, width, height, bpp, srcpitch, data); + bimg::imageCopy(temp, width, height, 1, bpp, srcpitch, data); data = temp; }