FacticiusVir / SharpVk

C# Bindings for the Vulkan API & SPIR-V
MIT License
147 stars 18 forks source link

`assignAction.LengthExpression` in `marshalFrom` missing pointer. #48

Open Y-Less opened 5 years ago

Y-Less commented 5 years ago

It generates:

var fieldPointer = new SharpVk.Multivendor.DebugUtilsLabel[(uint)(QueueLabelCount)];

Instead of:

var fieldPointer = new SharpVk.Multivendor.DebugUtilsLabel[(uint)(pointer->QueueLabelCount)];
FacticiusVir commented 5 years ago

Where is this line generated? Is this for the newer patches?

Y-Less commented 5 years ago

It isn't currently generated anywhere, but that's the result of disabling the EndsWidth("Info") checks on marshaling generation. I don't know if that should be considered a bug or not, since it isn't encountered in normal code, but isn't (or shouldn't be) a result of that change.

FacticiusVir commented 5 years ago

Okay, I think I understand a little better having looked through the "...Info" issue - I'll come back to this once I've resolved that.

Y-Less commented 5 years ago

From my reading of the spec, even as of 1.1.111 the DebugUtils callback is still the only one where an object is passed back, rather than just PODs. Thus you could really solve two or three issues at once by putting the demarshalling code for those objects (which I already wrote and posted in #49) in the .partial file, since those are hand-coded. I know that's not the "correct" solution, but does solve several at once until a time when the spec necessitates solving it further (and who knows when/if that will be).

I could make a pull request if you like.

FacticiusVir commented 5 years ago

Thanks for the offer! I'm going to have a dig and see if I can tidy up some of the generator logic to start with, as I need to catch up with the current patch in any case.