Shader model 6.8 added two new semantics to refer to the base instance and vertex index of a draw call within a vertex shader. #2907 explicitly mentions that they are semanitcally equal to the SPIR-V builtin variables BaseVertex and BaseInstance. As a result I was a bit surprised that they are currently not mapped automatically to those when compiling to SPIR-V. Instead attempting to compile a shader produces the error semantic SV_StartInstanceLocation unimplemented. To fix this, I manually have to specify the [[vk::builtin("BaseInstance")]] attribute, which then produces a warning if I attempt to compile the shader for DXIL.
Hi!
Thanks for the feedback! I added this in our SM6.8 task list.
Right now our team is a bit short of staff so I cannot give a time estimate, but we'll get to that eventually. 😊
Description
Shader model 6.8 added two new semantics to refer to the base instance and vertex index of a draw call within a vertex shader. #2907 explicitly mentions that they are semanitcally equal to the SPIR-V builtin variables
BaseVertex
andBaseInstance
. As a result I was a bit surprised that they are currently not mapped automatically to those when compiling to SPIR-V. Instead attempting to compile a shader produces the errorsemantic SV_StartInstanceLocation unimplemented
. To fix this, I manually have to specify the[[vk::builtin("BaseInstance")]]
attribute, which then produces a warning if I attempt to compile the shader for DXIL.Steps to Reproduce
https://godbolt.org/z/xP5Mzev9P
Actual Behavior
As the semanitcs are equal, I would expect them to be mapped automatically to their SPIR-V builtin counterparts, without the explicit attribute.
Environment