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

Fail to pass the AccelerationStructure validation #2312

Closed
atynagano opened this issue Aug 26, 2023 · 3 comments · Fixed by #2313
Closed

Fail to pass the AccelerationStructure validation #2312

atynagano opened this issue Aug 26, 2023 · 3 comments · Fixed by #2313

Comments

@atynagano
Copy link

Template

If you dont understand something just leave it.
If you can provide more detailed information than the template allows for, please ignore the template and present all of your findings.

  • Version of vulkano: c74eedb
  • OS: TODO
  • GPU (the selected PhysicalDevice): TODO
  • GPU Driver: TODO
  • Upload of a reasonably minimal complete main.rs file that demonstrates the issue: TODO

Issue

let smallest_component_bits = vertex_format
.components()
.into_iter()
.filter(|&c| c != 0)
.min()
.unwrap() as u32;
let smallest_component_bytes = (smallest_component_bits + 7) & !7;
if vertex_stride % smallest_component_bytes != 0 {
return Err(Box::new(ValidationError {
problem: "`vertex_stride` is not a multiple of the byte size of the \
smallest component of `vertex_format`"
.into(),
vuids: &["VUID-VkAccelerationStructureGeometryTrianglesDataKHR-vertexStride-03735"],
..Default::default()
}));
}

Actually I don't fully understand the code, but I think this should be

let smallest_component_bytes = ((smallest_component_bits + 7) & !7) / 8;

because this perform bits-to-bytes conversion?

@Rua
Copy link
Contributor

Rua commented Aug 26, 2023

Oh yeah. Oops :D

@Rua
Copy link
Contributor

Rua commented Aug 26, 2023

I'm sorry that you keep running into problems. This code is still untested (you're the first one who tries to use it, that we know of), and these bug reports are invaluable for us. Thank you!

@marc0246
Copy link
Contributor

Indeed, thank you so much for taking the time! :D

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

Successfully merging a pull request may close this issue.

3 participants