* Add 'frameNumber' to Frame struct
Previously, the frame number returned from bgfx::frame() was tracked separately in the Context. Now,
we store that information in the Frame. This will allow us to attach the frame number to ViewStats.
* Add frame number to ViewStats
When ViewStats are enabled, we tag each timer query with the current frame number, then include
that information in the final results. In this way, clients can correlate specific work that they
submitted to specific GPU timing information.
NOTE: Some backends not implemented, yet. They will always have 0 for frame number.
The ones which are implemented are:
* OpenGL
* Vulkan
* D3D 9,11,12
* Noop
* Add indirect draw with indirect count (BGFX_CAPS_DRAW_INDIRECT_COUNT)
* Update bindings
* VK: Add support for BGFX_CAPS_DRAW_INDIRECT_COUNT
* D3D12: Add support for BGFX_CAPS_DRAW_INDIRECT_COUNT
* GL: Add support for BGFX_CAPS_DRAW_INDIRECT_COUNT
* 48-drawindirect: Use BGFX_CAPS_DRAW_INDIRECT_COUNT if available
* 48-drawindirect: Update shaders
* opengl: Implement texture swizzle mapping
* imageformats: Fix compilation on android
Android GLES does not have a definition for GL_BGR: Swizzle instead.
d3d9: Do software conversion to take advantage of B5G6R5.
d3d11: Do software conversion to take advantage of B5G6R5.
gl: Set internal representation to swap R and B.
metal: Swizzle R and B and remove software conversion.
* texture format info: Invert R and B in RGBA4
d3d9: Revert 06c08adc9e to force software
conversion because the format doesn't exist
d3d11: Force software conversion because the format doesn't exist
gl: Revert 3e3e655262 to swizzle R and B
mtl: Swizzle channels
* metal: Remove explicit conversion of RGBA4 and RGB5A1 in osx
* metal: Set alpha bit to correct end of short
d3d9: Revert 76db2ed38d to force software
conversion and use the format that does exist
d3d11: Force software conversion because the format doesn't exist
gl: Revert b36aa71403 to swizzle R and B
mtl: Swizzle R and B
I noticed that this 0363560934
broke b5e7a4cccd/examples/16-shadowmaps/shadowmaps.cpp (L1750)
which shouldn't be the case. The validation was meant for only multisample flags.
my boolean logic assumes that it must be BGFX_TEXTURE_RT in the flag or BGFX_TEXTURE_RT_MSAA_XX in the flag.
* D3D12: Fix ResolveSubresource texture format parameter
For depth textures this always returned the TYPELESS one, but instead it should have passed the FLOAT.
* D3D11: Fix ResolveSubresource texture format parameter
For depth textures this always returned the TYPELESS one, but instead it should have passed the FLOAT.