Cleanup.
This commit is contained in:
Родитель
4f27ffe047
Коммит
a1c39c7190
|
@ -133,7 +133,7 @@ void setViewClearMask(uint32_t _viewMask, uint8_t _flags, uint32_t _rgba, float
|
|||
{
|
||||
for (uint32_t view = 0, viewMask = _viewMask; 0 != viewMask; viewMask >>= 1, view += 1 )
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(viewMask);
|
||||
const uint32_t ntz = bx::uint32_cnttz(viewMask);
|
||||
viewMask >>= ntz;
|
||||
view += ntz;
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ void setViewClearMask(uint32_t _viewMask, uint8_t _flags, uint32_t _rgba, float
|
|||
{
|
||||
for (uint32_t view = 0, viewMask = _viewMask; 0 != viewMask; viewMask >>= 1, view += 1 )
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(viewMask);
|
||||
const uint32_t ntz = bx::uint32_cnttz(viewMask);
|
||||
viewMask >>= ntz;
|
||||
view += ntz;
|
||||
|
||||
|
|
|
@ -1237,7 +1237,7 @@ namespace bgfx
|
|||
; streamMask >>= 1, idx += 1
|
||||
)
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
streamMask >>= ntz;
|
||||
idx += ntz;
|
||||
numVertices = bx::min(numVertices, m_numVertices[idx]);
|
||||
|
|
|
@ -462,7 +462,7 @@ namespace bgfx
|
|||
; streamMask >>= 1, idx += 1
|
||||
)
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
streamMask >>= ntz;
|
||||
idx += ntz;
|
||||
|
||||
|
|
|
@ -5886,7 +5886,7 @@ namespace bgfx { namespace d3d11
|
|||
; streamMask >>= 1, idx += 1, ++numStreams
|
||||
)
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
streamMask >>= ntz;
|
||||
idx += ntz;
|
||||
|
||||
|
|
|
@ -3957,9 +3957,9 @@ namespace bgfx { namespace d3d12
|
|||
; streamMask >>= 1, idx += 1, ++numStreams
|
||||
)
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
streamMask >>= ntz;
|
||||
idx += ntz;
|
||||
idx += ntz;
|
||||
|
||||
const Stream& stream = _draw.m_stream[idx];
|
||||
|
||||
|
@ -6261,9 +6261,9 @@ namespace bgfx { namespace d3d12
|
|||
; streamMask >>= 1, idx += 1, ++numStreams
|
||||
)
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
streamMask >>= ntz;
|
||||
idx += ntz;
|
||||
idx += ntz;
|
||||
|
||||
currentState.m_stream[idx].m_decl = draw.m_stream[idx].m_decl;
|
||||
currentState.m_stream[idx].m_handle = draw.m_stream[idx].m_handle;
|
||||
|
|
|
@ -3125,7 +3125,7 @@ namespace bgfx { namespace d3d9
|
|||
void TextureD3D9::commit(uint8_t _stage, uint32_t _flags, const float _palette[][4])
|
||||
{
|
||||
const uint64_t flags = (m_flags & BGFX_TEXTURE_SRGB)
|
||||
| (0 == (BGFX_SAMPLER_INTERNAL_DEFAULT & _flags) ? _flags : uint32_t(m_flags) )
|
||||
| (0 == (BGFX_SAMPLER_INTERNAL_DEFAULT & _flags) ? _flags : uint32_t(m_flags) )
|
||||
;
|
||||
uint32_t index = (flags & BGFX_SAMPLER_BORDER_COLOR_MASK) >> BGFX_SAMPLER_BORDER_COLOR_SHIFT;
|
||||
s_renderD3D9->setSamplerState(_stage, flags, _palette[index]);
|
||||
|
@ -4232,8 +4232,8 @@ namespace bgfx { namespace d3d9
|
|||
; 0 != streamMask
|
||||
; streamMask >>= 1, idx += 1, ++numStreams
|
||||
)
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
streamMask >>= ntz;
|
||||
idx += ntz;
|
||||
|
||||
|
|
|
@ -7117,8 +7117,8 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
|
|||
; 0 != streamMask
|
||||
; streamMask >>= 1, idx += 1
|
||||
)
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
streamMask >>= ntz;
|
||||
idx += ntz;
|
||||
|
||||
|
@ -7146,7 +7146,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
|
|||
; streamMask >>= 1, idx += 1
|
||||
)
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
streamMask >>= ntz;
|
||||
idx += ntz;
|
||||
|
||||
|
@ -7179,8 +7179,8 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
|
|||
; 0 != streamMask
|
||||
; streamMask >>= 1, idx += 1
|
||||
)
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
streamMask >>= ntz;
|
||||
idx += ntz;
|
||||
|
||||
|
@ -7209,8 +7209,8 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
|
|||
; 0 != streamMask
|
||||
; streamMask >>= 1, idx += 1
|
||||
)
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
streamMask >>= ntz;
|
||||
idx += ntz;
|
||||
|
||||
|
@ -7244,7 +7244,7 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
|
|||
; streamMask >>= 1, idx += 1
|
||||
)
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
streamMask >>= ntz;
|
||||
idx += ntz;
|
||||
|
||||
|
|
|
@ -499,12 +499,12 @@ namespace bgfx { namespace mtl
|
|||
}
|
||||
|
||||
g_caps.limits.maxFBAttachments = uint8_t(bx::uint32_min(m_device.supportsFeatureSet( (MTLFeatureSet)1 /* MTLFeatureSet_iOS_GPUFamily2_v1 */) ? 8 : 4, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) );
|
||||
|
||||
|
||||
if ( m_device.supportsFeatureSet( (MTLFeatureSet)4 /* MTLFeatureSet_iOS_GPUFamily3_v1 */ ))
|
||||
{
|
||||
g_caps.supported |= BGFX_CAPS_DRAW_INDIRECT;
|
||||
}
|
||||
|
||||
|
||||
if ( m_device.supportsFeatureSet( (MTLFeatureSet)11 /* MTLFeatureSet_iOS_GPUFamily4_v1 */ ))
|
||||
{
|
||||
g_caps.supported |= BGFX_CAPS_TEXTURE_CUBE_ARRAY;
|
||||
|
@ -515,7 +515,7 @@ namespace bgfx { namespace mtl
|
|||
g_caps.limits.maxTextureSize = 16384;
|
||||
g_caps.limits.maxFBAttachments = 8;
|
||||
g_caps.supported |= BGFX_CAPS_TEXTURE_CUBE_ARRAY;
|
||||
|
||||
|
||||
if ( m_device.supportsFeatureSet( (MTLFeatureSet)10001 /* MTLFeatureSet_macOS_GPUFamily1_v2 */ ))
|
||||
{
|
||||
g_caps.supported |= BGFX_CAPS_DRAW_INDIRECT;
|
||||
|
@ -3017,7 +3017,7 @@ namespace bgfx { namespace mtl
|
|||
m_metalLayer.device = s_renderMtl->m_device;
|
||||
m_metalLayer.pixelFormat = MTLPixelFormatBGRA8Unorm;
|
||||
m_metalLayer.magnificationFilter = kCAFilterNearest;
|
||||
|
||||
|
||||
retain(m_metalLayer);
|
||||
}
|
||||
|
||||
|
@ -3106,7 +3106,7 @@ namespace bgfx { namespace mtl
|
|||
murmur.add( (uint32_t)sampleCount);
|
||||
_frameBuffer.m_pixelFormatHash = murmur.end();
|
||||
}
|
||||
|
||||
|
||||
id <MTLTexture> SwapChainMtl::currentDrawableTexture()
|
||||
{
|
||||
if (NULL == m_drawableTexture)
|
||||
|
@ -3129,7 +3129,7 @@ namespace bgfx { namespace mtl
|
|||
desc.mipmapLevelCount = 1;
|
||||
desc.sampleCount = 1;
|
||||
desc.arrayLength = 1;
|
||||
|
||||
|
||||
if (s_renderMtl->m_iOS9Runtime
|
||||
|| s_renderMtl->m_macOS11Runtime)
|
||||
{
|
||||
|
@ -3138,10 +3138,10 @@ namespace bgfx { namespace mtl
|
|||
? (MTLStorageMode)0 // MTLStorageModeShared
|
||||
: (MTLStorageMode)1 // MTLStorageModeManaged
|
||||
;
|
||||
|
||||
|
||||
desc.usage = MTLTextureUsageRenderTarget;
|
||||
}
|
||||
|
||||
|
||||
m_drawableTexture = s_renderMtl->m_device.newTextureWithDescriptor(desc);
|
||||
}
|
||||
}
|
||||
|
@ -4203,7 +4203,7 @@ namespace bgfx { namespace mtl
|
|||
; 0 != streamMask
|
||||
; streamMask >>= 1, idx += 1, ++numStreams
|
||||
)
|
||||
{
|
||||
{
|
||||
const uint32_t ntz = bx::uint32_cnttz(streamMask);
|
||||
streamMask >>= ntz;
|
||||
idx += ntz;
|
||||
|
|
Загрузка…
Ссылка в новой задаче