Skip to content

Instantly share code, notes, and snippets.

void readTexture(TextureHandle _handle, void* _data, uint8_t _mip) override
{
const TextureMtl& texture = m_textures[_handle.idx];
#if BX_PLATFORM_OSX
BlitCommandEncoder bce = s_renderMtl->getBlitCommandEncoder();
bce.synchronizeTexture(texture.m_ptr, 0, _mip);
endEncoding();
#endif // BX_PLATFORM_OSX
2019-08-11 13:28:40.661225+0200 examplesDebug[11881:276989] [DYMTLInitPlatform] platform initialization successful
2019-08-11 13:28:41.656750+0200 examplesDebug[11881:277026] /Users/attilaz/Documents/githubnew/bgfx/src/bgfx.cpp (3363): BGFX bgfx platform data like window handle or backbuffer is not set, creating headless device.
2019-08-11 13:28:41.656930+0200 examplesDebug[11881:277026] /Users/attilaz/Documents/githubnew/bgfx/src/bgfx.cpp (3394): BGFX Init...
2019-08-11 13:28:41.660797+0200 examplesDebug[11881:277026] /Users/attilaz/Documents/githubnew/bgfx/src/bgfx.cpp (1783): BGFX Application called bgfx::renderFrame directly, not creating render thread.
2019-08-11 13:28:41.660968+0200 examplesDebug[11881:277026] /Users/attilaz/Documents/githubnew/bgfx/src/bgfx.cpp (1799): BGFX Running in multi-threaded mode
2019-08-11 13:28:41.940267+0200 examplesDebug[11881:276833] Metal GPU Frame Capture Enabled
TextureDescriptor desc = s_renderMtl->m_textureDescriptor;
desc.textureType = _depth > 1 ? MTLTextureType3D : MTLTextureType2D;
desc.pixelFormat = m_ptr.pixelFormat();
desc.width = _rect.m_width;
desc.height = _rect.m_height;
desc.depth = _depth;
desc.mipmapLevelCount = 1;
desc.sampleCount = 1;
desc.arrayLength = 1;
@attilaz
attilaz / gist:eb629b22346d2d2e3652b965887da215
Last active February 10, 2020 22:16
simd function name changes
# for shuffle should we somehow show that it is handled as 32bitx4
# if we want shuffling with 16bit and 8 bit values...
void simd_shuf_xyAB(Ty _a, Ty _b); -> simd_shuf_v32x4_xyAB ???
void simd_shuf_ABxy(Ty _a, Ty _b);
void simd_shuf_CDzw(Ty _a, Ty _b);
void simd_shuf_zwCD(Ty _a, Ty _b);
void simd_shuf_xAyB(Ty _a, Ty _b);
void simd_shuf_AxBy(Ty _a, Ty _b);
void simd_shuf_zCwD(Ty _a, Ty _b);
void simd_shuf_CzDw(Ty _a, Ty _b);
void flip() override
{
if (NULL == m_commandBuffer)
{
return;
}
//for (uint32_t ii = 0, num = m_numWindows; ii < num; ++ii)
if (m_numWindows > 0)
{