KhronosGroup / glslang

Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Other
2.98k stars 823 forks source link

Feature request: Add functions to retrieve attribute information from programs #154

Open chaoticbob opened 8 years ago

chaoticbob commented 8 years ago

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.

tksuoran commented 7 years ago

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.

mittpat commented 5 years ago

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 `

arcady-lunarg commented 1 year ago

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