mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-19 13:32:59 +01:00
Ignore sRGB from image container, use only flag passed.
This commit is contained in:
@@ -4532,7 +4532,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
const bool writeOnly = 0 != (m_flags&(BGFX_TEXTURE_RT_WRITE_ONLY|BGFX_TEXTURE_READ_BACK) );
|
||||
const bool computeWrite = 0 != (m_flags&BGFX_TEXTURE_COMPUTE_WRITE);
|
||||
const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK);
|
||||
const bool srgb = 0 != (m_flags&BGFX_TEXTURE_SRGB) || imageContainer.m_srgb;
|
||||
const bool srgb = 0 != (m_flags&BGFX_TEXTURE_SRGB);
|
||||
const bool blit = 0 != (m_flags&BGFX_TEXTURE_BLIT_DST);
|
||||
const bool readBack = 0 != (m_flags&BGFX_TEXTURE_READ_BACK);
|
||||
const uint32_t msaaQuality = bx::uint32_satsub( (m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT, 1);
|
||||
|
||||
@@ -2933,11 +2933,6 @@ namespace bgfx { namespace d3d9
|
||||
createTexture(textureWidth, textureHeight, numMips);
|
||||
}
|
||||
|
||||
if (imageContainer.m_srgb)
|
||||
{
|
||||
m_flags |= BGFX_TEXTURE_SRGB;
|
||||
}
|
||||
|
||||
BX_TRACE("Texture %3d: %s (requested: %s), %dx%d%s%s."
|
||||
, this - s_renderD3D9->m_textures
|
||||
, getName( (TextureFormat::Enum)m_textureFormat)
|
||||
|
||||
@@ -2503,21 +2503,21 @@ namespace bgfx { namespace mtl
|
||||
const bool writeOnly = 0 != (_flags&BGFX_TEXTURE_RT_WRITE_ONLY);
|
||||
const bool computeWrite = 0 != (_flags&BGFX_TEXTURE_COMPUTE_WRITE);
|
||||
const bool renderTarget = 0 != (_flags&BGFX_TEXTURE_RT_MASK);
|
||||
const bool srgb = 0 != (_flags&BGFX_TEXTURE_SRGB) || imageContainer.m_srgb;
|
||||
const bool srgb = 0 != (_flags&BGFX_TEXTURE_SRGB);
|
||||
|
||||
BX_TRACE("Texture %3d: %s (requested: %s), layers %d, %dx%d%s RT[%c], WO[%c], CW[%c], sRGB[%c]"
|
||||
, this - s_renderMtl->m_textures
|
||||
, getName( (TextureFormat::Enum)m_textureFormat)
|
||||
, getName( (TextureFormat::Enum)m_requestedFormat)
|
||||
, numLayers
|
||||
, textureWidth
|
||||
, textureHeight
|
||||
, imageContainer.m_cubeMap ? "x6" : ""
|
||||
, renderTarget ? 'x' : '.'
|
||||
, writeOnly ? 'x' : '.'
|
||||
, computeWrite ? 'x' : '.'
|
||||
, srgb ? 'x' : '.'
|
||||
);
|
||||
, this - s_renderMtl->m_textures
|
||||
, getName( (TextureFormat::Enum)m_textureFormat)
|
||||
, getName( (TextureFormat::Enum)m_requestedFormat)
|
||||
, numLayers
|
||||
, textureWidth
|
||||
, textureHeight
|
||||
, imageContainer.m_cubeMap ? "x6" : ""
|
||||
, renderTarget ? 'x' : '.'
|
||||
, writeOnly ? 'x' : '.'
|
||||
, computeWrite ? 'x' : '.'
|
||||
, srgb ? 'x' : '.'
|
||||
);
|
||||
|
||||
const uint32_t msaaQuality = bx::uint32_satsub( (_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT, 1);
|
||||
int sampleCount = s_msaa[msaaQuality];
|
||||
|
||||
Reference in New Issue
Block a user