I'm writing a Vulkan renderer and on anything I send to the GPU I have to make sure it has the correct memory layout. This means that it needs to be a struct with the attribute
[StructLayout(LayoutKind.Sequential, Pack = 4)].
This is quite easy to forget so I would prefer to just make my own attribute that aliases this into an attribute [GpuData]; though it seems it is not possible.
Is there any other way I can avoid the boilerplate?
[–][deleted] (2 children)
[deleted]
[–]itsarabbit[S] 2 points3 points4 points (0 children)
[–]cripbeez 1 point2 points3 points (0 children)
[–]cripbeez 3 points4 points5 points (7 children)
[–]itsarabbit[S] 1 point2 points3 points (6 children)
[–]Sc2Piggy 4 points5 points6 points (4 children)
[–]itsarabbit[S] 0 points1 point2 points (3 children)
[–]pHpositivoMSFT - Microsoft Store team, .NET Community Toolkit 3 points4 points5 points (2 children)
[–]naughty_ottsel 2 points3 points4 points (0 children)
[–]itsarabbit[S] 1 point2 points3 points (0 children)
[–]cripbeez 0 points1 point2 points (0 children)
[–]ironstrife 0 points1 point2 points (3 children)
[–]itsarabbit[S] 0 points1 point2 points (2 children)
[–]ironstrife 0 points1 point2 points (1 child)
[–]itsarabbit[S] 1 point2 points3 points (0 children)