mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 14:55:05 +00:00
92287c30b5
Make the HLSL backend more like other backends by using `back::Baked` to generate names for baked expression identifiers. This removes the final uses of `Handle::index` from the HLSL backend. This is separated out from the previous commit because it changes lots of snapshot tests, whereas the previous commit has no effect on Naga's output.
43 lines
728 B
HLSL
43 lines
728 B
HLSL
struct S {
|
|
float3 a;
|
|
int _end_pad_0;
|
|
};
|
|
|
|
struct Test {
|
|
S a;
|
|
float b;
|
|
int _end_pad_0;
|
|
int _end_pad_1;
|
|
int _end_pad_2;
|
|
};
|
|
|
|
struct Test2_ {
|
|
float3 a[2];
|
|
int _pad1_0;
|
|
float b;
|
|
int _end_pad_0;
|
|
int _end_pad_1;
|
|
int _end_pad_2;
|
|
};
|
|
|
|
struct Test3_ {
|
|
row_major float4x3 a;
|
|
int _pad1_0;
|
|
float b;
|
|
int _end_pad_0;
|
|
int _end_pad_1;
|
|
int _end_pad_2;
|
|
};
|
|
|
|
cbuffer input1_ : register(b0) { Test input1_; }
|
|
cbuffer input2_ : register(b1) { Test2_ input2_; }
|
|
cbuffer input3_ : register(b2) { Test3_ input3_; }
|
|
|
|
float4 vertex() : SV_Position
|
|
{
|
|
float _e4 = input1_.b;
|
|
float _e8 = input2_.b;
|
|
float _e12 = input3_.b;
|
|
return ((((1.0).xxxx * _e4) * _e8) * _e12);
|
|
}
|