I have a geometry shader with the following push constant block:
layout(push_constant) uniform Instance {
mat4 VP;
vec3 posCam;
float radius;
float curvature;
} u_instance;
The push constants are defined in the pipeline layout like this:
uint32_t offset = 0;
uint32_t size = 21 *sizeof(float);
vk::PushConstantRange range {vk::ShaderStageFlagBits::eGeometry,offset,size};
However, the Vulkan validation layers throw this error:
Push constant range covering variable starting at offset 0 not accessible from stage VK_SHADER_STAGE_GEOMETRY_BIT
What does 'not accessible' mean here? Why wouldn't they be accessible? If I move the push constants to a different stage (e.g. fragment or vertex shader), no error occurs.
Additionally, I only get this error on a Nvidia GeForce GTX 650 Ti. I've also tried it on an AMD card, which worked fine.
Is there some kind of limitation on push constants for geometry shaders? I've checked the limitations for my Nvidia GPU, the total max push constant size is 256 bytes, and geometry shaders are supported. I also can't find anything in the Vulkan specification either.