This commit is contained in:
Бранимир Караџић
2020-11-01 21:28:42 -08:00
parent 3a297ed3c0
commit 925cee63c0
2 changed files with 8 additions and 8 deletions

View File

@@ -2407,7 +2407,7 @@ namespace bgfx
void setIndexBuffer(IndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices)
{
BX_ASSERT(UINT8_MAX != m_draw.m_streamMask, "");
BX_ASSERT(UINT8_MAX != m_draw.m_streamMask, "bgfx::setVertexCount was already called for this draw call.");
m_draw.m_startIndex = _firstIndex;
m_draw.m_numIndices = _numIndices;
m_draw.m_indexBuffer = _handle;
@@ -2415,7 +2415,7 @@ namespace bgfx
void setIndexBuffer(const DynamicIndexBuffer& _dib, uint32_t _firstIndex, uint32_t _numIndices)
{
BX_ASSERT(UINT8_MAX != m_draw.m_streamMask, "");
BX_ASSERT(UINT8_MAX != m_draw.m_streamMask, "bgfx::setVertexCount was already called for this draw call.");
const uint32_t indexSize = 0 == (_dib.m_flags & BGFX_BUFFER_INDEX32) ? 2 : 4;
m_draw.m_startIndex = _dib.m_startIndex + _firstIndex;
m_draw.m_numIndices = bx::min(_numIndices, _dib.m_size/indexSize);
@@ -2424,7 +2424,7 @@ namespace bgfx
void setIndexBuffer(const TransientIndexBuffer* _tib, uint32_t _firstIndex, uint32_t _numIndices)
{
BX_ASSERT(UINT8_MAX != m_draw.m_streamMask, "");
BX_ASSERT(UINT8_MAX != m_draw.m_streamMask, "bgfx::setVertexCount was already called for this draw call.");
const uint32_t numIndices = bx::min(_numIndices, _tib->size/2);
m_draw.m_indexBuffer = _tib->handle;
m_draw.m_startIndex = _tib->startIndex + _firstIndex;
@@ -2440,7 +2440,7 @@ namespace bgfx
, VertexLayoutHandle _layoutHandle
)
{
BX_ASSERT(UINT8_MAX != m_draw.m_streamMask, "");
BX_ASSERT(UINT8_MAX != m_draw.m_streamMask, "bgfx::setVertexCount was already called for this draw call.");
BX_ASSERT(_stream < BGFX_CONFIG_MAX_VERTEX_STREAMS, "Invalid stream %d (max %d).", _stream, BGFX_CONFIG_MAX_VERTEX_STREAMS);
if (m_draw.setStreamBit(_stream, _handle) )
{
@@ -2460,7 +2460,7 @@ namespace bgfx
, VertexLayoutHandle _layoutHandle
)
{
BX_ASSERT(UINT8_MAX != m_draw.m_streamMask, "");
BX_ASSERT(UINT8_MAX != m_draw.m_streamMask, "bgfx::setVertexCount was already called for this draw call.");
BX_ASSERT(_stream < BGFX_CONFIG_MAX_VERTEX_STREAMS, "Invalid stream %d (max %d).", _stream, BGFX_CONFIG_MAX_VERTEX_STREAMS);
if (m_draw.setStreamBit(_stream, _dvb.m_handle) )
{
@@ -2482,7 +2482,7 @@ namespace bgfx
, VertexLayoutHandle _layoutHandle
)
{
BX_ASSERT(UINT8_MAX != m_draw.m_streamMask, "");
BX_ASSERT(UINT8_MAX != m_draw.m_streamMask, "bgfx::setVertexCount was already called for this draw call.");
BX_ASSERT(_stream < BGFX_CONFIG_MAX_VERTEX_STREAMS, "Invalid stream %d (max %d).", _stream, BGFX_CONFIG_MAX_VERTEX_STREAMS);
if (m_draw.setStreamBit(_stream, _tvb->handle) )
{

View File

@@ -6943,8 +6943,6 @@ VK_DESTROY
, uint8_t(draw.m_instanceDataStride/16)
);
uint16_t scissor = draw.m_scissor;
if (pipeline != currentPipeline
|| 0 != changedStencil)
{
@@ -6975,6 +6973,8 @@ VK_DESTROY
// m_commandList->IASetPrimitiveTopology(prim.m_topology);
}
const uint16_t scissor = draw.m_scissor;
if (currentState.m_scissor != scissor)
{
currentState.m_scissor = scissor;