glsl - Push constant limit in geometry shader? -


i have geometry shader following push constant block:

layout(push_constant) uniform instance {     mat4 vp;     vec3 poscam;     float radius;     float curvature; } u_instance; 

the push constants defined in pipeline layout this:

uint32_t offset = 0; uint32_t size = 21 *sizeof(float); vk::pushconstantrange range {vk::shaderstageflagbits::egeometry,offset,size}; 

however, vulkan validation layers throw error:

push constant range covering variable starting @ offset 0 not accessible stage vk_shader_stage_geometry_bit 

what 'not accessible' mean here? why wouldn't accessible? if move push constants different stage (e.g. fragment or vertex shader), no error occurs.

additionally, error on nvidia geforce gtx 650 ti. i've tried on amd card, worked fine.

is there kind of limitation on push constants geometry shaders? i've checked limitations nvidia gpu, total max push constant size 256 bytes, , geometry shaders supported. can't find in vulkan specification either.

can please add more code (or upload somewhere)? tested push constant block on gtx 980 validation layers compiled source , don't validation warnings.

additionally, error on nvidia geforce gtx 650 ti. i've tried on amd card, worked fine.

that's odd, validation messages not generated drivers , such should not differ between implementations (unless it's validation related device limits).

is there kind of limitation on push constants geometry shaders? i've checked limitations nvidia gpu, total max push constant size 256 bytes, , geometry shaders supported. can't find in vulkan specification either.

there no push constant limit specific geometry shader. if exceed push constant size limit validation layers throw error.

i think std430 packing rules (or 14.5.4. offset , stride assignment of vulkan spec) can mess sizes. e.g. vec3 laid out vec4 (so maybe 22*sizeof(float)? - sorry not confident in myself).

not sure if packing problem here, should work without validation layer message. if stride problem validation layers should still not trigger if start offset 0.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -