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

PhysicalDeviceFeatures2Builder::push_next()? #325

Closed
cheako opened this issue Sep 23, 2020 · 4 comments
Closed

PhysicalDeviceFeatures2Builder::push_next()? #325

cheako opened this issue Sep 23, 2020 · 4 comments

Comments

@cheako
Copy link

cheako commented Sep 23, 2020

I'm trying to get_physical_device_features2() for PhysicalDeviceDescriptorIndexingFeatures.
Edit: maybe VkPhysicalDeviceVulkan12Features? Same issue.

@filnet
Copy link
Contributor

filnet commented Sep 23, 2020

relates to #305

@cheako
Copy link
Author

cheako commented Sep 23, 2020

Thinking about it, I don't know what cause PhysicalDeviceFeatures2 to ever be used as a branch. It can be, but it's main usage would be for get_physical_device_features2(). Afterwards DeviceCreateInfo.p_enabled_features == PhysicalDeviceFeatures2.features, so there is currently no reason to have PhysicalDeviceFeatures2 be a branch of DeviceCreateInfo.

@aclysma
Copy link

aclysma commented Nov 28, 2020

I just hit this issue too. I think this is a functional workaround?

        let mut descriptor_indexing_features = ash::vk::PhysicalDeviceDescriptorIndexingFeaturesEXT::default();
        let mut features_v2 = vk::PhysicalDeviceFeatures2::default();

        unsafe {
            features_v2.p_next = &mut descriptor_indexing_features as *mut _ as *mut std::ffi::c_void;
            instance.get_physical_device_features2(device, &mut features_v2)
        };

@MarijnS95
Copy link
Collaborator

This function is now available since #305 (in Ash release 0.33) where we finally cleaned up how structextends is handled. Any struct that is mentioned one or more times in a structextends gets a trait ExtendsXXX and fn push_next(), and that trait is implemented for the struct mentioning it in structextends. And it is removed from all structs that are never extended according to vk.xml, getting rid of unnecessary bloat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants