* Fix D3D12 debug crash due to validation layers SDK bug
* Change LONG to FARPROC to be technically correct
* Make requested changes:
Move windows version checking to function in bgfx.cpp
Change windowsVersionIs to also use this technique
Use bgfx code style
Specify dwOSVersionInfoSize prior to calling rtlGetVersion
* Merge both functions into one
Use bx::dlsym instead of GetProcAddress directly
Fix major & minor comparison logic
* Fix win10 version comment
* Revert rendererCreate check back to Win 0x0602
* Clean up logic as per suggestion
* Fix D3D12 VBV reading size
When `stream.m_startVertex` is not 0 we target a position past the start of the buffer, so `BufferLocation + SizeInBytes` will be past the end of the buffer, which the debug layer will complaining about.
With this fix we're only creating a view for the part of the buffer we actually need to access.
* Reordered buffer size calculation.
---------
Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
* Add support for remaining unsupported ASTC formats
Add new ASTC formats into pixelformats example and ninja scripts
Rebuild ASTC textures
* Update idl and generate
Move comma in pixelformats
Co-authored-by: Raziel Alphadios <raziely@gmail.com>
Suppose this is the draw call sequence in a frame:
- triangle strip
- touch (required to apply stencil changes for example)
- triangle list
Touch masks the change (as it's triangle list by default) by setting
changedFlags, but not primIndex. When the triangle list is processed,
the STATE_PT is already set to triangle list, so the test for
changedFlags is skipped and primIndex stays with triangle strip.
The fix detects the change in the STATE_PT and updates primIndex.
* 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
* 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.