PR feedback

This commit is contained in:
Cedric Guillemet 2020-03-16 11:03:17 +01:00 committed by Бранимир Караџић
parent c49db61702
commit dbb83d2525
5 changed files with 7 additions and 7 deletions

View File

@ -10,7 +10,7 @@ public import core.stdc.stdarg : va_list;
extern(C) @nogc nothrow:
enum uint BGFX_API_VERSION = 103;
enum uint BGFX_API_VERSION = 104;
alias bgfx_view_id_t = ushort;

View File

@ -592,7 +592,7 @@ void Mesh::submit(bgfx::ViewId _id, bgfx::ProgramHandle _program, const float* _
bgfx::setIndexBuffer(group.m_ibh);
bgfx::setVertexBuffer(0, group.m_vbh);
bgfx::submit(_id, _program, 0, (it == itEnd-1)?BGFX_DISCARD_ALL:BGFX_DISCARD_NONE);
bgfx::submit(_id, _program, 0, (it == itEnd-1) ? (BGFX_DISCARD_INDEX_BUFFER | BGFX_DISCARD_VERTEX_STREAMS | BGFX_DISCARD_STATE) : BGFX_DISCARD_NONE);
}
}
@ -623,7 +623,7 @@ void Mesh::submit(const MeshState*const* _state, uint8_t _numPasses, const float
bgfx::setIndexBuffer(group.m_ibh);
bgfx::setVertexBuffer(0, group.m_vbh);
bgfx::submit(state.m_viewId, state.m_program, 0, (it == itEnd - 1) ? BGFX_DISCARD_ALL : BGFX_DISCARD_NONE);
bgfx::submit(state.m_viewId, state.m_program, 0, (it == itEnd - 1) ? (BGFX_DISCARD_INDEX_BUFFER | BGFX_DISCARD_VERTEX_STREAMS | BGFX_DISCARD_STATE) : BGFX_DISCARD_NONE);
}
}
}

View File

@ -15,7 +15,7 @@
#ifndef BGFX_DEFINES_H_HEADER_GUARD
#define BGFX_DEFINES_H_HEADER_GUARD
#define BGFX_API_VERSION UINT32_C(103)
#define BGFX_API_VERSION UINT32_C(104)
/**
* Color RGB/alpha/depth write. When it's not specified write will be disabled.

View File

@ -1,7 +1,7 @@
-- vim: syntax=lua
-- bgfx interface
version(103)
version(104)
typedef "bool"
typedef "char"

View File

@ -1194,7 +1194,7 @@ namespace bgfx
void EncoderImpl::submit(ViewId _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, uint32_t _depth, uint8_t _flags)
{
if (BX_ENABLED(BGFX_CONFIG_DEBUG_UNIFORM)
&& (_flags == BGFX_DISCARD_ALL))
&& (_flags & BGFX_DISCARD_STATE))
{
m_uniformSet.clear();
}
@ -1293,7 +1293,7 @@ namespace bgfx
m_draw.clear(_flags);
m_bind.clear(_flags);
if (_flags == BGFX_DISCARD_ALL)
if (_flags & BGFX_DISCARD_STATE)
{
m_uniformBegin = m_uniformEnd;
}