Merge branch 'master' of github.com:bkaradzic/bgfx

This commit is contained in:
Branimir Karadžić 2017-10-11 23:33:51 -07:00
commit f4ebf7dd54
3 changed files with 21 additions and 15 deletions

View File

@ -788,14 +788,14 @@ namespace bgfx
///
struct Stats
{
int64_t cpuTimeFrame; //!< CPU time between two `bgfx::frame` calls.
int64_t cpuTimeBegin; //!< Render thread CPU submit begin time.
int64_t cpuTimeEnd; //!< Render thread CPU submit end time.
int64_t cpuTimerFreq; //!< CPU timer frequency.
int64_t cpuTimeFrame; //!< CPU time between two `bgfx::frame` calls.
int64_t cpuTimeBegin; //!< Render thread CPU submit begin time.
int64_t cpuTimeEnd; //!< Render thread CPU submit end time.
int64_t cpuTimerFreq; //!< CPU timer frequency.
int64_t gpuTimeBegin; //!< GPU frame begin time.
int64_t gpuTimeEnd; //!< GPU frame end time.
int64_t gpuTimerFreq; //!< GPU timer frequency.
int64_t gpuTimeBegin; //!< GPU frame begin time.
int64_t gpuTimeEnd; //!< GPU frame end time.
int64_t gpuTimerFreq; //!< GPU timer frequency.
int64_t waitRender; //!< Time spent waiting for render backend thread to finish issuing
//! draw commands to underlying graphics API.
@ -805,8 +805,8 @@ namespace bgfx
uint32_t numCompute; //!< Number of compute calls submitted.
uint32_t maxGpuLatency; //!< GPU driver latency.
int64_t gpuMemoryMax; //!< Maximum available GPU memory.
int64_t gpuMemoryUsed; //!< Available GPU memory.
int64_t gpuMemoryMax; //!< Maximum available GPU memory for application.
int64_t gpuMemoryUsed; //!< Amount of GPU memory used.
uint16_t width; //!< Backbuffer width in pixels.
uint16_t height; //!< Backbuffer height in pixels.

View File

@ -472,7 +472,13 @@ namespace bgfx
if (_type == esd->type
&& 1 < esd->size)
{
return createShader(makeRef(esd->data, esd->size) );
ShaderHandle handle = createShader(makeRef(esd->data, esd->size) );
if (isValid(handle) )
{
setName(handle, _name);
}
return handle;
}
}
}

View File

@ -139,11 +139,6 @@ namespace bgfx
#if BGFX_CONFIG_USE_TINYSTL
namespace bgfx
{
inline bool isValid(const VertexDecl& _decl)
{
return 0 != _decl.m_stride;
}
struct TinyStlAllocator
{
static void* static_allocate(size_t _bytes);
@ -275,6 +270,11 @@ namespace bgfx
return handle;
}
inline bool isValid(const VertexDecl& _decl)
{
return 0 != _decl.m_stride;
}
struct Clear
{
uint8_t m_index[8];