mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
Escape non-ASCII identifier characters with `write!(…, "u{:04x}", …)`,
surrounding with `_` as appropriate. This solves (1) a debugging issue
where stripped characters would otherwise be invisible, and (2) failure
to re-validate that stripped identifiers didn't start with an ASCII
digit.
I've confirmed that this fixes [bug
1978197](https://bugzilla.mozilla.org/show_bug.cgi?id=1978197) on the
Firefox side.
16 lines
241 B
HLSL
16 lines
241 B
HLSL
ByteAddressBuffer asdf : register(t0);
|
|
|
|
float compute()
|
|
{
|
|
float _e1 = asfloat(asdf.Load(0));
|
|
float u03b8_2_ = (_e1 + 9001.0);
|
|
return u03b8_2_;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void main()
|
|
{
|
|
const float _e0 = compute();
|
|
return;
|
|
}
|