Fixed texture mip mismatch.

This commit is contained in:
Бранимир Караџић 2019-01-30 17:43:28 -08:00
parent 04ff0b9ef5
commit 9054588331
5 changed files with 5 additions and 0 deletions

View File

@ -4109,6 +4109,7 @@ namespace bgfx { namespace d3d11
, imageContainer.m_numLayers
, imageContainer.m_format
);
ti.numMips = bx::min<uint8_t>(imageContainer.m_numMips-startLod, ti.numMips);
m_flags = _flags;
m_width = ti.width;

View File

@ -4592,6 +4592,7 @@ namespace bgfx { namespace d3d12
, imageContainer.m_numLayers
, imageContainer.m_format
);
ti.numMips = bx::min<uint8_t>(imageContainer.m_numMips-startLod, ti.numMips);
m_flags = _flags;
m_width = ti.width;

View File

@ -2920,6 +2920,7 @@ namespace bgfx { namespace d3d9
, imageContainer.m_numLayers
, imageContainer.m_format
);
ti.numMips = bx::min<uint8_t>(imageContainer.m_numMips-startLod, ti.numMips);
m_flags = _flags;
m_width = ti.width;

View File

@ -4734,6 +4734,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
, imageContainer.m_numLayers
, imageContainer.m_format
);
ti.numMips = bx::min<uint8_t>(imageContainer.m_numMips-startLod, ti.numMips);
m_requestedFormat = uint8_t(imageContainer.m_format);
m_textureFormat = uint8_t(getViableTextureFormat(imageContainer) );

View File

@ -2591,6 +2591,7 @@ namespace bgfx { namespace mtl
, imageContainer.m_numLayers
, imageContainer.m_format
);
ti.numMips = bx::min<uint8_t>(imageContainer.m_numMips-startLod, ti.numMips);
m_flags = _flags;
m_width = ti.width;