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

Fix for instance culling on Intel GPUs #1

Conversation

creijon
Copy link

@creijon creijon commented Sep 21, 2022

Description of Change(s)

The fix for drawingCoord needs the strides to be a multiple of 32 bytes, but the existing code rounded to 4 uint32_t's, which is 16 bytes. This was working correctly for non-culled drawing because the drawCoords were a multiple of 16 and 32 bytes. But instanced culling threw this off and needed to be padded more.

I also moved things around a little to make it cleaner, but this is purely subjective and optional to the fix.

Fixes Issue(s)

  • Culling of instanced models on Intel GPUs.
  • I have submitted a signed Contributor License Agreement

@slingthor
Copy link
Owner

Cool! This looks a lot cleaner and thanks for solving and spotting the need for the extra padding - the fix original fix was a bit of a guess into the air as the correct / expected behaviour is sort of undefined, it now seems to cover all the cases!

Will run it through the test runner for safety, but expecting it to be sound!

@creijon creijon closed this Sep 22, 2022
@creijon creijon reopened this Sep 22, 2022
@slingthor
Copy link
Owner

Cool! All tests passed as expected! Thanks again for the good improvement!

@slingthor slingthor merged commit cde066d into slingthor:intel_enablement_3 Sep 23, 2022
@creijon creijon deleted the jon/dev/intel_instanced_culling_fix branch September 23, 2022 20:06
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 this pull request may close these issues.

3 participants