bevyengine / bevyengine/bevy

Ensure Bevy's rendering byte usage is little-endian

Open
#15,701 6 comments 0 reactions 0 assignees View on GitHub
A-Rendering C-Bug C-Code-Quality D-Domain-Agnostic D-Straightforward S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

I got the following response from a wgpu maintainer on Discord:

> fwiw wasm is defined to be little endian, so if you're in the browser it's the browsers job to ensure everything looks like the world is little endian. Furthermore wgsl requires everything to be little-endian. But for all your native host code all bets are off, if you're on BE system it is indeed your job to handle that

The way I interpret that is that I was originally right and it is indeed our responsibility to provide data to wgpu as little endian, not native endian. So `le_bytes` it is, then.

In this case, it might be nice to make a follow-up PR to fix any remaining uses of `ne_bytes` in Bevy.

_Originally posted by @inodentry in https://github.com/bevyengine/bevy/issues/10392#issuecomment-2396819418_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.