wgpu/naga/tests/out/hlsl/padding.hlsl
Jim Blandy 92287c30b5 [naga hlsl-out] Use Baked for baked expressions.
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.
2024-06-21 09:56:40 +02:00

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);
}