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.
Changes:
* Move the project generation command in prepare step to run in host ubuntu-22.0 os.
* Add EMSCRIPTEN explicitly in both prepare and build step.
* Run make command with respect to root bgfx workspace directory.
This fixes the following warnings with clang based toolchain
warning: unknown warning option '-Wno-logical-op'; did you mean '-Wno-long-long'? [-Wunknown-warning-option]
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option]
* 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