D3D12: Fixed 3D texture upload.
This commit is contained in:
Родитель
96fedd11b0
Коммит
ecad7173d0
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче