mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Metal: Occlusion query WIP.
This commit is contained in:
parent
422fcf6052
commit
653bbea439
2 changed files with 790 additions and 701 deletions
|
@ -712,6 +712,29 @@ namespace bgfx { namespace mtl
|
|||
uint8_t m_num; // number of color handles
|
||||
};
|
||||
|
||||
struct OcclusionQueryMTL
|
||||
{
|
||||
OcclusionQueryMTL()
|
||||
: m_control(BX_COUNTOF(m_query) )
|
||||
{
|
||||
}
|
||||
|
||||
void postReset();
|
||||
void preReset();
|
||||
void begin(RenderCommandEncoder& _rce, Frame* _render, OcclusionQueryHandle _handle);
|
||||
void end(RenderCommandEncoder& _rce);
|
||||
void resolve(Frame* _render, bool _wait = false);
|
||||
|
||||
struct Query
|
||||
{
|
||||
OcclusionQueryHandle m_handle;
|
||||
};
|
||||
|
||||
Buffer m_buffer;
|
||||
Query m_query[BGFX_CONFIG_MAX_OCCUSION_QUERIES];
|
||||
bx::RingBufferControl m_control;
|
||||
};
|
||||
|
||||
} /* namespace metal */ } // namespace bgfx
|
||||
|
||||
#endif // BGFX_CONFIG_RENDERER_METAL
|
||||
|
|
1468
src/renderer_mtl.mm
1468
src/renderer_mtl.mm
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue