Igalia / vkrunner

A shader script tester for Vulkan. Moved to https://gitlab.freedesktop.org/mesa/vkrunner
Other
43 stars 14 forks source link

Allow probing multiple values of an SSBO with a single command #31

Closed bpeel closed 6 years ago

bpeel commented 6 years ago

For example you can now probe vec2[2] with a command like:

probe ssbo vec2 3 32 == 1 1 2 3
jaebaek commented 6 years ago

This looks good to me.

I have one question about the buffer layer. Based on Vulkan spec for layout, I think we can allow both std140 layout and std430 layout.

If it is true, adding std430 layout to README.md would be more clear for users. If I am wrong, could please explain why std430 layout does not work?

bpeel commented 6 years ago

Thanks for looking at the branch.

As far as I understand, Vulkan supports both std140 and std430 as well as completely custom layouts with arbitrary array and matrix strides for each member of the struct. std430 would work but VkRunner needs to know which one was chosen in order to calculate the offset between each member of the array. It doesn’t currently have any way for the script to inform it of the layout so VkRunner just assumes std140 throughout. This is already the case for the ssbo subdata command which has a similar problem.

We should probably add a way to tell VkRunner about the array and matrix strides and the choice of row/col major. However I think this is a separate issue and we should apply the same idea to the ssbo subdata command.

jaebaek commented 6 years ago

Ok, let's revisit this issue when we have a use case. This looks good to me. Thanks.