glslang icon indicating copy to clipboard operation
glslang copied to clipboard

Feature request: Add functions to retrieve attribute information from programs

Open chaoticbob opened this issue 9 years ago • 3 comments

Current reflection API is great and is already quite useful. having the ability to query for attribute information such as location, in/out, and type could greatly aid in the porting process from OpenGL to Vulkan. Especially for tools and middleware that parse this information at run-time. Thanks.

chaoticbob avatar Feb 02 '16 03:02 chaoticbob

Running glslangvalidator with -V -q shows little useful information on attributes:

a_position: offset 0, type 8b51, size 0, index 0, binding -1
a_normal: offset 0, type 8b51, size 0, index 0, binding -1

Being able to get attribute location and dimension information would be very nice to have indeed.

tksuoran avatar Jan 02 '17 08:01 tksuoran

Same thing here, I was really surprised that this didn't work... great tool otherwise...

` Vertex attribute reflection:

vertexNormal: offset 0, type 8b51, size 0, index 0, binding -1, stages 0 vertexTexcoord: offset 0, type 8b50, size 0, index 0, binding -1, stages 0 vertexTangent: offset 0, type 8b51, size 0, index 0, binding -1, stages 0 vertexBitangent: offset 0, type 8b51, size 0, index 0, binding -1, stages 0 vertexPosition: offset 0, type 8b51, size 0, index 0, binding -1, stages 0 `

mittpat avatar Nov 21 '18 03:11 mittpat

@chaoticbob is this still needed or is the equivalent functionality available through spirv-reflect?

arcady-lunarg avatar Jul 13 '23 20:07 arcady-lunarg