rust-gpu icon indicating copy to clipboard operation
rust-gpu copied to clipboard

Improve the calculation of location sizes for arrays and structs (revives #513)

Open expenses opened this issue 3 years ago • 4 comments

See PR https://github.com/EmbarkStudios/rust-gpu/pull/513 that @Arc-blroth opened.

This PR builds on top of that to support structs and 3 or 4 component 64-bit scalar type vectors (see https://github.com/EmbarkStudios/rust-gpu/pull/513#pullrequestreview-628664056).

expenses avatar Nov 14 '21 12:11 expenses

~~I haven't been able to test this with matrices yet as rust-gpu treats the glam Mat3s etc. as structs.~~

expenses avatar Nov 14 '21 12:11 expenses

So I still get validation and perf warning for the specific use case I wanted this for, but I can't do anything about that :P

UNASSIGNED-CoreValidation-Shader-InterfaceTypeMismatch(ERROR / SPEC): msgNum: -1227934722 - Validation Error: [ UNASSIGNED-CoreValidation-Shader-InterfaceTypeMismatch ] Object 0: handle = 0xead9370000000008, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0xb6cf33fe | Attribute type of 'VK_FORMAT_R32G32B32_SFLOAT' at location 5 does not match vertex shader input type of 'ptr to input struct of (struct of (vec3 of float32, vec3 of float32, vec3 of float32))' Objects: 1 [0] 0xead9370000000008, type: 15, name: NULL

UNASSIGNED-CoreValidation-Shader-OutputNotConsumed(WARN / PERF): msgNum: 101294395 - Validation Performance Warning: [ UNASSIGNED-CoreValidation-Shader-OutputNotConsumed ] Object 0: handle = 0xead9370000000008, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x609a13b | Vertex attribute at location 6 not consumed by vertex shader Objects: 1 [0] 0xead9370000000008, type: 15, name: NULL

UNASSIGNED-CoreValidation-Shader-OutputNotConsumed(WARN / PERF): msgNum: 101294395 - Validation Performance Warning: [ UNASSIGNED-CoreValidation-Shader-OutputNotConsumed ] Object 0: handle = 0xead9370000000008, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x609a13b | Vertex attribute at location 7 not consumed by vertex shader Objects: 1 [0] 0xead9370000000008, type: 15, name: NULL

expenses avatar Nov 14 '21 13:11 expenses

Totally forgot about this - I need to check whether it's still needed.

expenses avatar Apr 24 '22 13:04 expenses

Totally forgot about this - I need to check whether it's still needed.

Ah, didn't see this when I set the labels, I'll flip them.

eddyb avatar May 27 '22 17:05 eddyb