Closed NicolBolas closed 6 years ago
I propose replacing the current error:
INVALID_VALUE is generated if <pEntryPoint> does not name a valid
entry point for <shader>.
with the following:
INVALID_VALUE is generated if <pEntryPoint> does not match the
<Name> of any OpEntryPoint declaration in the SPIR-V module
associated with <shader>.
INVALID_OPERATION is generated if the <Execution Mode> of the
OpEntryPoint indicated by <pEntryPoint> does not match the type
of <shader>.
OpenGL|ES meeting approved. @dgkoch to create ARB extension PR and @oddhack to incorporate that change into core spec.
PR for extension doc: https://github.com/KhronosGroup/OpenGL-Registry/pull/129
Also filed CTS issue to make sure test for new error is added: https://gitlab.khronos.org/Tracker/vk-gl-cts/issues/852
Extension PR was merged. Assigning to @oddhack to incorporate the same change into the next GL 4.6 spec update.
This will be fixed in the next GL 4.6 spec update, coming soon.
When you create a shader object, it is passed the shader stage that it works with. But SPIR-V entry points serve the same function: each entry point specifies which shader stage it works with.
So, what happens if there is a mismatch when specializing a shader? That's not explicitly a failure mode of
glSpecializeShader
; it only says that the entry point must be "valid".