Skip to content

Commit

Permalink
Request one dummy sampler if descriptor count is 0
Browse files Browse the repository at this point in the history
Fixes #14
  • Loading branch information
zakarumych committed May 17, 2021
1 parent 8b07ee9 commit f536a97
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions erupt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ impl DescriptorDevice<vk1_0::DescriptorSetLayout, vk1_0::DescriptorPool, vk1_0::
len += 1;
}

if len == 0 {
array[len]._type = vk1_0::DescriptorType::SAMPLER;
array[0].descriptor_count = 1;
len = 1;
}

if descriptor_count.inline_uniform_block_bytes != 0 {
panic!("Inline uniform blocks are not supported");
}
Expand Down
6 changes: 6 additions & 0 deletions gfx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ where
len += 1;
}

if len == 0 {
array[0].ty = DescriptorType::Sampler;
array[0].count = 1;
len = 1;
}

if descriptor_count.acceleration_structure != 0 {
panic!("Acceleration structures are not supported");
}
Expand Down

0 comments on commit f536a97

Please sign in to comment.