Skip to content

Commit

Permalink
update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
pluiedev committed Feb 17, 2023
1 parent 93fedaf commit 618834b
Show file tree
Hide file tree
Showing 10 changed files with 790 additions and 393 deletions.
208 changes: 208 additions & 0 deletions tests/out/analysis/access.info.ron
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@
(
bits: 70,
),
(
bits: 215,
),
(
bits: 70,
),
],
functions: [
(
Expand Down Expand Up @@ -3588,6 +3594,125 @@
],
sampling: [],
),
(
flags: (
bits: 63,
),
available_stages: (
bits: 7,
),
uniformity: (
non_uniform_result: None,
requirements: (
bits: 0,
),
),
may_kill: false,
sampling_set: [],
global_uses: [
(
bits: 0,
),
(
bits: 0,
),
(
bits: 0,
),
(
bits: 0,
),
(
bits: 0,
),
(
bits: 0,
),
],
expressions: [
(
uniformity: (
non_uniform_result: Some(1),
requirements: (
bits: 0,
),
),
ref_count: 1,
assignable_global: None,
ty: Handle(33),
),
(
uniformity: (
non_uniform_result: None,
requirements: (
bits: 0,
),
),
ref_count: 1,
assignable_global: None,
ty: Value(Scalar(
kind: Float,
width: 4,
)),
),
(
uniformity: (
non_uniform_result: None,
requirements: (
bits: 0,
),
),
ref_count: 1,
assignable_global: None,
ty: Value(Vector(
size: Quad,
kind: Float,
width: 4,
)),
),
(
uniformity: (
non_uniform_result: None,
requirements: (
bits: 0,
),
),
ref_count: 1,
assignable_global: None,
ty: Value(Scalar(
kind: Float,
width: 4,
)),
),
(
uniformity: (
non_uniform_result: None,
requirements: (
bits: 0,
),
),
ref_count: 1,
assignable_global: None,
ty: Value(Vector(
size: Quad,
kind: Float,
width: 4,
)),
),
(
uniformity: (
non_uniform_result: None,
requirements: (
bits: 0,
),
),
ref_count: 1,
assignable_global: None,
ty: Handle(32),
),
],
sampling: [],
),
],
entry_points: [
(
Expand Down Expand Up @@ -5661,6 +5786,89 @@
),
],
expressions: [
(
uniformity: (
non_uniform_result: None,
requirements: (
bits: 0,
),
),
ref_count: 1,
assignable_global: None,
ty: Value(Scalar(
kind: Float,
width: 4,
)),
),
(
uniformity: (
non_uniform_result: None,
requirements: (
bits: 0,
),
),
ref_count: 1,
assignable_global: None,
ty: Value(Vector(
size: Quad,
kind: Float,
width: 4,
)),
),
(
uniformity: (
non_uniform_result: None,
requirements: (
bits: 0,
),
),
ref_count: 1,
assignable_global: None,
ty: Value(Scalar(
kind: Float,
width: 4,
)),
),
(
uniformity: (
non_uniform_result: None,
requirements: (
bits: 0,
),
),
ref_count: 1,
assignable_global: None,
ty: Value(Vector(
size: Quad,
kind: Float,
width: 4,
)),
),
(
uniformity: (
non_uniform_result: None,
requirements: (
bits: 0,
),
),
ref_count: 1,
assignable_global: None,
ty: Handle(32),
),
(
uniformity: (
non_uniform_result: Some(6),
requirements: (
bits: 0,
),
),
ref_count: 2,
assignable_global: None,
ty: Value(Pointer(
base: 32,
space: Function,
)),
),
(
uniformity: (
non_uniform_result: None,
Expand Down
1 change: 1 addition & 0 deletions tests/out/glsl/access.assign_through_ptr.Compute.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ void main() {
assign_array_through_ptr_fn(arr);
return;
}

5 changes: 5 additions & 0 deletions tests/out/glsl/access.atomics.Compute.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ void assign_through_ptr_fn(inout uint p) {
return;
}

void assign_array_through_ptr_fn(inout vec4 foo_2[2]) {
foo_2 = vec4[2](vec4(1.0), vec4(2.0));
return;
}

void main() {
int tmp = 0;
int value = _group_0_binding_0_cs.atom;
Expand Down
5 changes: 5 additions & 0 deletions tests/out/glsl/access.foo_frag.Fragment.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ void assign_through_ptr_fn(inout uint p) {
return;
}

void assign_array_through_ptr_fn(inout vec4 foo_2[2]) {
foo_2 = vec4[2](vec4(1.0), vec4(2.0));
return;
}

void main() {
_group_0_binding_0_fs._matrix[1][2] = 1.0;
_group_0_binding_0_fs._matrix = mat4x3(vec3(0.0), vec3(1.0), vec3(2.0), vec3(3.0));
Expand Down
7 changes: 6 additions & 1 deletion tests/out/glsl/access.foo_vert.Vertex.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ void assign_through_ptr_fn(inout uint p) {
return;
}

void assign_array_through_ptr_fn(inout vec4 foo_2[2]) {
foo_2 = vec4[2](vec4(1.0), vec4(2.0));
return;
}

void main() {
uint vi = uint(gl_VertexID);
float foo = 0.0;
Expand All @@ -131,7 +136,7 @@ void main() {
test_matrix_within_struct_accesses();
test_matrix_within_array_within_struct_accesses();
mat4x3 _matrix = _group_0_binding_0_vs._matrix;
uvec2 arr[2] = _group_0_binding_0_vs.arr;
uvec2 arr_1[2] = _group_0_binding_0_vs.arr;
float b = _group_0_binding_0_vs._matrix[3][0];
int a_1 = _group_0_binding_0_vs.data[(uint(_group_0_binding_0_vs.data.length()) - 2u)].value;
ivec2 c = _group_0_binding_2_vs;
Expand Down
18 changes: 17 additions & 1 deletion tests/out/hlsl/access.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,18 @@ void assign_through_ptr_fn(inout uint p)
return;
}

typedef float4 ret_Constructarray2_float4_[2];
ret_Constructarray2_float4_ Constructarray2_float4_(float4 arg0, float4 arg1) {
float4 ret[2] = { arg0, arg1 };
return ret;
}

void assign_array_through_ptr_fn(inout float4 foo_2)
{
foo_2 = Constructarray2_float4_((1.0).xxxx, (2.0).xxxx);
return;
}

uint NagaBufferLengthRW(RWByteAddressBuffer buffer)
{
uint ret;
Expand All @@ -261,7 +273,7 @@ float4 foo_vert(uint vi : SV_VertexID) : SV_Position
test_matrix_within_struct_accesses();
test_matrix_within_array_within_struct_accesses();
float4x3 _matrix = float4x3(asfloat(bar.Load3(0+0)), asfloat(bar.Load3(0+16)), asfloat(bar.Load3(0+32)), asfloat(bar.Load3(0+48)));
uint2 arr[2] = {asuint(bar.Load2(144+0)), asuint(bar.Load2(144+8))};
uint2 arr_1[2] = {asuint(bar.Load2(144+0)), asuint(bar.Load2(144+8))};
float b = asfloat(bar.Load(0+48+0));
int a_1 = asint(bar.Load(0+(((NagaBufferLengthRW(bar) - 160) / 8) - 2u)*8+160));
int2 c = asint(qux.Load2(0));
Expand Down Expand Up @@ -332,6 +344,10 @@ void assign_through_ptr(uint3 __global_invocation_id : SV_DispatchThreadID)
val = (uint)0;
}
GroupMemoryBarrierWithGroupSync();
float4 arr[2] = (float4[2])0;

arr = Constructarray2_float4_((6.0).xxxx, (7.0).xxxx);
assign_through_ptr_fn(val);
assign_array_through_ptr_fn(arr);
return;
}
Loading

0 comments on commit 618834b

Please sign in to comment.