Posts

Showing posts from November, 2017

VK9 - Status Report - Nov

This month progress has continued on shader support. One of the bigger updates since the last post is support for shader constants. In the end I used specialization constants to achieve this. They line up with the features and constraints of shader constants better than uniform buffers or push constants. For example in the documentation the stated purpose of boolean and integer shader constants is branching. Using specialization constants for those cases means that when the SPIR-V is compiled by the driver unused code paths can be optimized away. The obvious drawback is that creating a new pipeline is expensive and shader constants are also used for things like transformation matrices in D3D9. I'll need to do some testing with real games to properly optimize this piece but my intended solution is to determine frequently updated ranges and use push constants for those instead.

In addition to several small enhancements I've also added OpName instructions to the SPIR-V to make it…