mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-02-26 16:44:00 -05:00
Fixing warnings about locals shadowing others of the same name. At least one of these was an actual bug.
This commit is contained in:
parent
8af790201f
commit
3c04ad2d4c
2 changed files with 15 additions and 16 deletions
12
src/bgfx_p.h
12
src/bgfx_p.h
|
@ -1072,7 +1072,7 @@ namespace bgfx
|
||||||
{
|
{
|
||||||
Image,
|
Image,
|
||||||
Buffer,
|
Buffer,
|
||||||
|
|
||||||
Count
|
Count
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2543,12 +2543,12 @@ namespace bgfx
|
||||||
memset(ref.un.m_th, 0xff, sizeof(ref.un.m_th) );
|
memset(ref.un.m_th, 0xff, sizeof(ref.un.m_th) );
|
||||||
for (uint32_t ii = 0; ii < _num; ++ii)
|
for (uint32_t ii = 0; ii < _num; ++ii)
|
||||||
{
|
{
|
||||||
TextureHandle handle = _handles[ii];
|
TextureHandle texHandle = _handles[ii];
|
||||||
|
|
||||||
cmdbuf.write(handle);
|
cmdbuf.write(texHandle);
|
||||||
|
|
||||||
ref.un.m_th[ii] = handle;
|
ref.un.m_th[ii] = texHandle;
|
||||||
textureIncRef(handle);
|
textureIncRef(texHandle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3034,7 +3034,7 @@ namespace bgfx
|
||||||
int16_t m_refCount;
|
int16_t m_refCount;
|
||||||
uint16_t m_num;
|
uint16_t m_num;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ProgramRef
|
struct ProgramRef
|
||||||
{
|
{
|
||||||
ShaderHandle m_vsh;
|
ShaderHandle m_vsh;
|
||||||
|
|
|
@ -1061,7 +1061,7 @@ RENDERDOC_IMPORT
|
||||||
desc.Usage = D3D11_USAGE_DEFAULT;
|
desc.Usage = D3D11_USAGE_DEFAULT;
|
||||||
desc.CPUAccessFlags = 0;
|
desc.CPUAccessFlags = 0;
|
||||||
ID3D11Texture2D* resolve;
|
ID3D11Texture2D* resolve;
|
||||||
HRESULT hr = m_device->CreateTexture2D(&desc, NULL, &resolve);
|
hr = m_device->CreateTexture2D(&desc, NULL, &resolve);
|
||||||
if (SUCCEEDED(hr) )
|
if (SUCCEEDED(hr) )
|
||||||
{
|
{
|
||||||
m_deviceCtx->ResolveSubresource(resolve, 0, backBuffer, 0, desc.Format);
|
m_deviceCtx->ResolveSubresource(resolve, 0, backBuffer, 0, desc.Format);
|
||||||
|
@ -1639,17 +1639,17 @@ RENDERDOC_IMPORT
|
||||||
drt = &desc.RenderTarget[ii];
|
drt = &desc.RenderTarget[ii];
|
||||||
drt->BlendEnable = 0 != (rgba&0x7ff);
|
drt->BlendEnable = 0 != (rgba&0x7ff);
|
||||||
|
|
||||||
const uint32_t src = (rgba )&0xf;
|
const uint32_t src = (rgba )&0xf;
|
||||||
const uint32_t dst = (rgba>>4)&0xf;
|
const uint32_t dst = (rgba>>4)&0xf;
|
||||||
const uint32_t equation = (rgba>>8)&0x7;
|
const uint32_t equationIndex = (rgba>>8)&0x7;
|
||||||
|
|
||||||
drt->SrcBlend = s_blendFactor[src][0];
|
drt->SrcBlend = s_blendFactor[src][0];
|
||||||
drt->DestBlend = s_blendFactor[dst][0];
|
drt->DestBlend = s_blendFactor[dst][0];
|
||||||
drt->BlendOp = s_blendEquation[equation];
|
drt->BlendOp = s_blendEquation[equationIndex];
|
||||||
|
|
||||||
drt->SrcBlendAlpha = s_blendFactor[src][1];
|
drt->SrcBlendAlpha = s_blendFactor[src][1];
|
||||||
drt->DestBlendAlpha = s_blendFactor[dst][1];
|
drt->DestBlendAlpha = s_blendFactor[dst][1];
|
||||||
drt->BlendOpAlpha = s_blendEquation[equation];
|
drt->BlendOpAlpha = s_blendEquation[equationIndex];
|
||||||
|
|
||||||
drt->RenderTargetWriteMask = writeMask;
|
drt->RenderTargetWriteMask = writeMask;
|
||||||
}
|
}
|
||||||
|
@ -2848,7 +2848,7 @@ RENDERDOC_IMPORT
|
||||||
|
|
||||||
if (convert)
|
if (convert)
|
||||||
{
|
{
|
||||||
uint8_t* temp = (uint8_t*)BX_ALLOC(g_allocator, rectpitch*_rect.m_height);
|
temp = (uint8_t*)BX_ALLOC(g_allocator, rectpitch*_rect.m_height);
|
||||||
imageDecodeToBgra8(temp, data, _rect.m_width, _rect.m_height, srcpitch, m_requestedFormat);
|
imageDecodeToBgra8(temp, data, _rect.m_width, _rect.m_height, srcpitch, m_requestedFormat);
|
||||||
data = temp;
|
data = temp;
|
||||||
}
|
}
|
||||||
|
@ -3110,8 +3110,8 @@ RENDERDOC_IMPORT
|
||||||
FrameBufferHandle fbh = BGFX_INVALID_HANDLE;
|
FrameBufferHandle fbh = BGFX_INVALID_HANDLE;
|
||||||
float alphaRef = 0.0f;
|
float alphaRef = 0.0f;
|
||||||
|
|
||||||
const uint64_t pt = _render->m_debug&BGFX_DEBUG_WIREFRAME ? BGFX_STATE_PT_LINES : 0;
|
const uint64_t primType = _render->m_debug&BGFX_DEBUG_WIREFRAME ? BGFX_STATE_PT_LINES : 0;
|
||||||
uint8_t primIndex = uint8_t(pt>>BGFX_STATE_PT_SHIFT);
|
uint8_t primIndex = uint8_t(primType>>BGFX_STATE_PT_SHIFT);
|
||||||
PrimInfo prim = s_primInfo[primIndex];
|
PrimInfo prim = s_primInfo[primIndex];
|
||||||
deviceCtx->IASetPrimitiveTopology(prim.m_type);
|
deviceCtx->IASetPrimitiveTopology(prim.m_type);
|
||||||
|
|
||||||
|
@ -3360,7 +3360,6 @@ RENDERDOC_IMPORT
|
||||||
currentState.m_flags = newFlags;
|
currentState.m_flags = newFlags;
|
||||||
currentState.m_stencil = newStencil;
|
currentState.m_stencil = newStencil;
|
||||||
|
|
||||||
uint64_t newFlags = renderItem.draw.m_flags;
|
|
||||||
setBlendState(newFlags);
|
setBlendState(newFlags);
|
||||||
setDepthStencilState(newFlags, packStencil(BGFX_STENCIL_DEFAULT, BGFX_STENCIL_DEFAULT) );
|
setDepthStencilState(newFlags, packStencil(BGFX_STENCIL_DEFAULT, BGFX_STENCIL_DEFAULT) );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue