Skip to content

Commit

Permalink
Layout Test
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald committed Feb 8, 2025
1 parent 556a3c4 commit 7a0660c
Show file tree
Hide file tree
Showing 5 changed files with 593 additions and 553 deletions.
4 changes: 4 additions & 0 deletions naga/tests/in/f16.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ struct StorageCompatible {
val_f16_array_2: array<f16, 2>,
}

struct LayoutTest {
scalar1: f16, scalar2: f16, v3: vec3<f16>, tuck_in: f16, scalar4: f16, larger: u32
}

@group(0) @binding(0)
var<uniform> input_uniform: UniformCompatible;

Expand Down
10 changes: 10 additions & 0 deletions naga/tests/out/hlsl/f16.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ struct StorageCompatible {
half val_f16_array_2_1[2];
};

struct LayoutTest {
half scalar1_;
half scalar2_;
int _pad2_0;
half3 v3_;
half tuck_in;
half scalar4_;
uint larger;
};

static const half constant_variable = 15.203125h;

static half private_variable = 1.0h;
Expand Down
10 changes: 10 additions & 0 deletions naga/tests/out/msl/f16.msl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ struct StorageCompatible {
type_16 val_f16_array_2_;
type_16 val_f16_array_2_1;
};
struct LayoutTest {
half scalar1_;
half scalar2_;
char _pad2[4];
metal::half3 v3_;
half tuck_in;
half scalar4_;
char _pad5[2];
uint larger;
};
constant half constant_variable = 15.203125h;

half f16_function(
Expand Down
Loading

0 comments on commit 7a0660c

Please sign in to comment.