Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Found wrong Structure against sbyte* in VkPhysicalDeviceProperties #65

Open
DeafMan1983 opened this issue Jul 14, 2024 · 1 comment
Open
Labels
bug An issue for something that does not behave as expected. untriaged An issue that has not been triaged by the repo maintainers.

Comments

@DeafMan1983
Copy link

Description (optional)

deviceName has wrong type but it was original for sbyte*
because It happens if I follow step to step with Vulkan + WinAPI click here

This section should contain an expanded description of the bug, if the title is
not sufficient.
Because it has wrong structure / type and I cannot pass to sbyte* explict

Reproduction Steps

This section should contain an ordered list of steps that can be used to
reproduce the bug. Ideally, you would include as much information about your
environment as possible to help use in determining the best fix for the issue.

How do I replace with sbyte*?

Expected Behavior

I have tried ... No success....
image

Actual Behavior

I think we need to replace VkPhysicalDeviceProperties_deviceName_e__fixedBuffer with sbyte*

Thank you!

@DeafMan1983 DeafMan1983 added bug An issue for something that does not behave as expected. untriaged An issue that has not been triaged by the repo maintainers. labels Jul 14, 2024
@tannergooding
Copy link
Member

It is not an sbyte* and has never been an sbyte*, it is an inline array of type sbyte which exactly matches the underlying Vulkan type definition. Previously it was using the legacy fixed sbyte deviceName[256] syntax and has since switched to explicitly using [InlineArray(256)] which is new in .NET 8.

You can simply get a span to the backing data, such as via:

Span<sbyte> deviceName = physicalProperties.deviceName;

You can then pin and do other manipulations as appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue for something that does not behave as expected. untriaged An issue that has not been triaged by the repo maintainers.
Projects
None yet
Development

No branches or pull requests

2 participants