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

[Merged by Bors] - Add support for IndexFormat::Uint16 #2990

Conversation

mrk-its
Copy link
Member

@mrk-its mrk-its commented Oct 18, 2021

Objective

while testing wgpu/WebGL on mobile GPU I've noticed bevy always forces vertex index format to 32bit (and ignores mesh settings).

Solution

the solution is to pass proper vertex index format in GpuIndexInfo to render_pass

@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Needs-Review labels Oct 18, 2021
@mockersf
Copy link
Member

Would this need to be done at other place, like

pass.set_index_buffer(index_info.buffer.slice(..), 0, IndexFormat::Uint32);
?

@mrk-its
Copy link
Member Author

mrk-its commented Oct 18, 2021

Would this need to be done at other place, like

pass.set_index_buffer(index_info.buffer.slice(..), 0, IndexFormat::Uint32);

Good point, fixed.

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review labels Oct 18, 2021
@cart cart force-pushed the 16_bit_vertex_index_format branch from f917756 to ba8835a Compare October 28, 2021 22:52
@cart
Copy link
Member

cart commented Oct 28, 2021

just rebased / resolved conflicts. this looks good to me!

@cart
Copy link
Member

cart commented Oct 28, 2021

bors r+

bors bot pushed a commit that referenced this pull request Oct 28, 2021
# Objective

while testing wgpu/WebGL on mobile GPU I've noticed bevy always forces vertex index format to 32bit (and ignores mesh settings). 

## Solution

the solution is to pass proper vertex index format in GpuIndexInfo to render_pass
@bors
Copy link
Contributor

bors bot commented Oct 28, 2021

@bors bors bot changed the title Add support for IndexFormat::Uint16 [Merged by Bors] - Add support for IndexFormat::Uint16 Oct 28, 2021
@bors bors bot closed this Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants