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

WriteDescriptorSet should allow null for p_image_info #149

Open
kiffpuppygames opened this issue Jul 7, 2024 · 2 comments
Open

WriteDescriptorSet should allow null for p_image_info #149

kiffpuppygames opened this issue Jul 7, 2024 · 2 comments

Comments

@kiffpuppygames
Copy link

kiffpuppygames commented Jul 7, 2024

Passing a null value to WriteDescriptorSet.p_image_info should be allowed when the VK_EXT_descriptor_indexing extrension is enabled. (Unless I'm missing something)

pub const DEVICE_EXTENSIONS = [_][*:0]const u8{ vk.extensions.khr_swapchain.name, vk.extensions.ext_descriptor_indexing.name };

// ......

var create_info = vk.DeviceCreateInfo
{
.flags = .{},
.queue_create_info_count = queue_create_info.len,
.p_queue_create_infos = &queue_create_info,
.enabled_layer_count = 0,
.pp_enabled_layer_names = undefined,
.enabled_extension_count = renderer.DEVICE_EXTENSIONS.len,
.pp_enabled_extension_names = &renderer.DEVICE_EXTENSIONS,
.p_enabled_features = null,
};

// ......

const write_descriptor_set = vk.WriteDescriptorSet {
.dst_set = descriptor_sets[0],
.dst_binding = 0,
.descriptor_count = 1,
.descriptor_type = vk.DescriptorType.uniform_buffer,
.dst_array_element = 0,
.p_image_info = null, //ERROR HERE:
.p_buffer_info = &buffer_infos };

@Snektron
Copy link
Owner

Snektron commented Jul 7, 2024

The original intention was to put undefined here, and that should work for now. Perhaps these types of pointers should be replaced by optionals though, yes.

@kiffpuppygames
Copy link
Author

Kewl, thanks very much for the info!

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

2 participants