Cleanup.
This commit is contained in:
parent
498c34273b
commit
02e67ff404
@ -2114,7 +2114,7 @@ public static class bgfx
|
||||
public uint32 reset;
|
||||
public uint8 numBackBuffers;
|
||||
public uint8 maxFrameLatency;
|
||||
public uint8 scaleDebug;
|
||||
public uint8 debugTextScale;
|
||||
}
|
||||
|
||||
[CRepr]
|
||||
|
@ -2093,7 +2093,7 @@ public static partial class bgfx
|
||||
public uint reset;
|
||||
public byte numBackBuffers;
|
||||
public byte maxFrameLatency;
|
||||
public byte scaleDebug;
|
||||
public byte debugTextScale;
|
||||
}
|
||||
|
||||
public unsafe struct Init
|
||||
|
@ -18,7 +18,7 @@ enum expandEnum(EnumType, string fqnEnumType = EnumType.stringof) = (){
|
||||
|
||||
extern(C) @nogc nothrow:
|
||||
|
||||
enum uint BGFX_API_VERSION = 119;
|
||||
enum uint BGFX_API_VERSION = 120;
|
||||
|
||||
alias bgfx_view_id_t = ushort;
|
||||
|
||||
@ -886,7 +886,7 @@ struct bgfx_resolution_t
|
||||
uint reset; /// Reset parameters.
|
||||
ubyte numBackBuffers; /// Number of back buffers.
|
||||
ubyte maxFrameLatency; /// Maximum frame latency.
|
||||
ubyte scaleDebug; /// Scale factor for debug view.
|
||||
ubyte debugTextScale; /// Scale factor for debug text.
|
||||
}
|
||||
|
||||
/// Configurable runtime limits parameters.
|
||||
|
@ -1338,7 +1338,7 @@ pub const Caps = extern struct {
|
||||
reset: u32,
|
||||
numBackBuffers: u8,
|
||||
maxFrameLatency: u8,
|
||||
scaleDebug: u8,
|
||||
debugTextScale: u8,
|
||||
};
|
||||
|
||||
pub const Init = extern struct {
|
||||
|
@ -647,7 +647,7 @@ namespace bgfx
|
||||
uint32_t reset; //!< Reset parameters.
|
||||
uint8_t numBackBuffers; //!< Number of back buffers.
|
||||
uint8_t maxFrameLatency; //!< Maximum frame latency.
|
||||
uint8_t scaleDebug; //!< Scale factor for debug view.
|
||||
uint8_t debugTextScale; //!< Scale factor for debug text.
|
||||
};
|
||||
|
||||
/// Initialization parameters used by `bgfx::init`.
|
||||
|
@ -639,7 +639,7 @@ typedef struct bgfx_resolution_s
|
||||
uint32_t reset; /** Reset parameters. */
|
||||
uint8_t numBackBuffers; /** Number of back buffers. */
|
||||
uint8_t maxFrameLatency; /** Maximum frame latency. */
|
||||
uint8_t scaleDebug; /** Scale factor for debug view. */
|
||||
uint8_t debugTextScale; /** Scale factor for debug text. */
|
||||
|
||||
} bgfx_resolution_t;
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#ifndef BGFX_DEFINES_H_HEADER_GUARD
|
||||
#define BGFX_DEFINES_H_HEADER_GUARD
|
||||
|
||||
#define BGFX_API_VERSION UINT32_C(119)
|
||||
#define BGFX_API_VERSION UINT32_C(120)
|
||||
|
||||
/**
|
||||
* Color RGB/alpha/depth write. When it's not specified write will be disabled.
|
||||
|
@ -1,7 +1,7 @@
|
||||
-- vim: syntax=lua
|
||||
-- bgfx interface
|
||||
|
||||
version(119)
|
||||
version(120)
|
||||
|
||||
typedef "bool"
|
||||
typedef "char"
|
||||
@ -791,7 +791,7 @@ struct.Resolution { ctor }
|
||||
.reset "uint32_t" --- Reset parameters.
|
||||
.numBackBuffers "uint8_t" --- Number of back buffers.
|
||||
.maxFrameLatency "uint8_t" --- Maximum frame latency.
|
||||
.scaleDebug "uint8_t" --- Scale factor for debug view.
|
||||
.debugTextScale "uint8_t" --- Scale factor for debug text.
|
||||
|
||||
--- Configurable runtime limits parameters.
|
||||
struct.Limits { namespace = "Init" }
|
||||
|
@ -1895,7 +1895,7 @@ namespace bgfx
|
||||
m_init.resolution.reset &= ~BGFX_RESET_INTERNAL_FORCE;
|
||||
m_init.resolution.numBackBuffers = bx::clamp<uint8_t>(_init.resolution.numBackBuffers, 2, BGFX_CONFIG_MAX_BACK_BUFFERS);
|
||||
m_init.resolution.maxFrameLatency = bx::min<uint8_t>(_init.resolution.maxFrameLatency, BGFX_CONFIG_MAX_FRAME_LATENCY);
|
||||
m_init.resolution.scaleDebug = bx::clamp<uint8_t>(_init.resolution.scaleDebug, 1, BGFX_CONFIG_MAX_SCALE_DEBUG);
|
||||
m_init.resolution.debugTextScale = bx::clamp<uint8_t>(_init.resolution.debugTextScale, 1, BGFX_CONFIG_DEBUG_TEXT_MAX_SCALE);
|
||||
dump(m_init.resolution);
|
||||
|
||||
if (true
|
||||
@ -2032,7 +2032,7 @@ namespace bgfx
|
||||
|
||||
dumpCaps();
|
||||
|
||||
m_textVideoMemBlitter.init(m_init.resolution.scaleDebug);
|
||||
m_textVideoMemBlitter.init(m_init.resolution.debugTextScale);
|
||||
m_clearQuad.init();
|
||||
|
||||
m_submit->m_transientVb = createTransientVertexBuffer(_init.limits.transientVbSize);
|
||||
@ -3436,7 +3436,7 @@ namespace bgfx
|
||||
, reset(BGFX_RESET_NONE)
|
||||
, numBackBuffers(2)
|
||||
, maxFrameLatency(0)
|
||||
, scaleDebug(0)
|
||||
, debugTextScale(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -3250,7 +3250,12 @@ namespace bgfx
|
||||
{
|
||||
BGFX_MUTEX_SCOPE(m_resourceApiLock);
|
||||
|
||||
m_submit->m_textVideoMem->resize(_small, (uint16_t)m_init.resolution.width / m_init.resolution.scaleDebug , (uint16_t)m_init.resolution.height / m_init.resolution.scaleDebug );
|
||||
const uint8_t debugTextScale = m_init.resolution.debugTextScale;
|
||||
m_submit->m_textVideoMem->resize(
|
||||
_small
|
||||
, (uint16_t)m_init.resolution.width / debugTextScale
|
||||
, (uint16_t)m_init.resolution.height / debugTextScale
|
||||
);
|
||||
m_submit->m_textVideoMem->clear(_attr);
|
||||
}
|
||||
|
||||
|
@ -195,6 +195,11 @@
|
||||
# define BGFX_CONFIG_USE_TINYSTL 1
|
||||
#endif // BGFX_CONFIG_USE_TINYSTL
|
||||
|
||||
/// Debug text maximum scale factor.
|
||||
#ifndef BGFX_CONFIG_DEBUG_TEXT_MAX_SCALE
|
||||
# define BGFX_CONFIG_DEBUG_TEXT_MAX_SCALE 4
|
||||
#endif // BGFX_CONFIG_DEBUG_TEXT_MAX_SCALE
|
||||
|
||||
/// Enable nVidia PerfHUD integration.
|
||||
#ifndef BGFX_CONFIG_DEBUG_PERFHUD
|
||||
# define BGFX_CONFIG_DEBUG_PERFHUD 0
|
||||
@ -381,10 +386,6 @@ BX_STATIC_ASSERT(bx::isPowerOf2(BGFX_CONFIG_MAX_VIEWS), "BGFX_CONFIG_MAX_VIEWS m
|
||||
# define BGFX_CONFIG_MAX_FRAME_LATENCY 3
|
||||
#endif // BGFX_CONFIG_MAX_FRAME_LATENCY
|
||||
|
||||
#ifndef BGFX_CONFIG_MAX_SCALE_DEBUG
|
||||
# define BGFX_CONFIG_MAX_SCALE_DEBUG 4
|
||||
#endif // BGFX_CONFIG_MAX_SCALE_DEBUG
|
||||
|
||||
#ifndef BGFX_CONFIG_PREFER_DISCRETE_GPU
|
||||
// On laptops with integrated and discrete GPU, prefer selection of discrete GPU.
|
||||
// nVidia and AMD, on Windows only.
|
||||
|
@ -9,5 +9,5 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define BGFX_REV_NUMBER 8489
|
||||
#define BGFX_REV_SHA1 "121f9dbfb85ccf143d7aa935b8b7b3a44acddb96"
|
||||
#define BGFX_REV_NUMBER 8495
|
||||
#define BGFX_REV_SHA1 "498c34273b59b957504c82fe396595a75dcfb3b0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user