SharpVk icon indicating copy to clipboard operation
SharpVk copied to clipboard

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

Open Y-Less opened this issue 6 years ago • 5 comments

It generates:

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

Instead of:

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

Y-Less avatar Jun 19 '19 10:06 Y-Less

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

FacticiusVir avatar Jun 19 '19 17:06 FacticiusVir

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.

Y-Less avatar Jun 19 '19 19:06 Y-Less

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.

FacticiusVir avatar Jun 20 '19 05:06 FacticiusVir

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.

Y-Less avatar Jun 20 '19 13:06 Y-Less

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.

FacticiusVir avatar Jun 20 '19 14:06 FacticiusVir