mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 00:17:03 +00:00
tint->dawn: Shuffle source tree in preperation of merging repos
docs/ -> docs/tint/ fuzzers/ -> src/tint/fuzzers/ samples/ -> src/tint/cmd/ src/ -> src/tint/ test/ -> test/tint/ BUG=tint:1418,tint:1433 Change-Id: Id2aa79f989aef3245b80ef4aa37a27ff16cd700b Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/80482 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
committed by
Tint LUCI CQ
parent
38f1e9c75c
commit
dbc13af287
@@ -0,0 +1,100 @@
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %_GLF_color
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpSource ESSL 310
|
||||
OpName %main "main"
|
||||
OpName %i "i"
|
||||
OpName %buf0 "buf0"
|
||||
OpMemberName %buf0 0 "_GLF_uniform_int_values"
|
||||
OpName %_ ""
|
||||
OpName %v "v"
|
||||
OpName %_GLF_color "_GLF_color"
|
||||
OpDecorate %_arr_int_uint_3 ArrayStride 16
|
||||
OpMemberDecorate %buf0 0 Offset 0
|
||||
OpDecorate %buf0 Block
|
||||
OpDecorate %_ DescriptorSet 0
|
||||
OpDecorate %_ Binding 0
|
||||
OpDecorate %_GLF_color Location 0
|
||||
%void = OpTypeVoid
|
||||
%10 = OpTypeFunction %void
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%_arr_int_uint_3 = OpTypeArray %int %uint_3
|
||||
%buf0 = OpTypeStruct %_arr_int_uint_3
|
||||
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
|
||||
%_ = OpVariable %_ptr_Uniform_buf0 Uniform
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_1 = OpConstant %int 1
|
||||
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
||||
%int_2 = OpConstant %int 2
|
||||
%bool = OpTypeBool
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%uint_100 = OpConstant %uint 100
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%_GLF_color = OpVariable %_ptr_Output_v4float Output
|
||||
%main = OpFunction %void None %10
|
||||
%28 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_int Function
|
||||
%v = OpVariable %_ptr_Function_v4float Function
|
||||
%29 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%30 = OpLoad %int %29
|
||||
OpStore %i %30
|
||||
OpBranch %31
|
||||
%31 = OpLabel
|
||||
OpLoopMerge %32 %33 None
|
||||
OpBranch %34
|
||||
%34 = OpLabel
|
||||
%35 = OpLoad %int %i
|
||||
%36 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_2
|
||||
%37 = OpLoad %int %36
|
||||
%38 = OpSLessThan %bool %35 %37
|
||||
OpBranchConditional %38 %39 %32
|
||||
%39 = OpLabel
|
||||
%40 = OpExtInst %v4float %1 UnpackUnorm4x8 %uint_100
|
||||
OpStore %v %40
|
||||
%41 = OpAccessChain %_ptr_Function_float %v %uint_0
|
||||
%42 = OpLoad %float %41
|
||||
%43 = OpConvertFToS %int %42
|
||||
%44 = OpLoad %int %i
|
||||
%45 = OpSGreaterThan %bool %43 %44
|
||||
OpSelectionMerge %46 None
|
||||
OpBranchConditional %45 %47 %46
|
||||
%47 = OpLabel
|
||||
%48 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%49 = OpLoad %int %48
|
||||
%50 = OpConvertSToF %float %49
|
||||
%51 = OpCompositeConstruct %v4float %50 %50 %50 %50
|
||||
OpStore %_GLF_color %51
|
||||
OpReturn
|
||||
%46 = OpLabel
|
||||
OpBranch %33
|
||||
%33 = OpLabel
|
||||
%52 = OpLoad %int %i
|
||||
%53 = OpIAdd %int %52 %int_1
|
||||
OpStore %i %53
|
||||
OpBranch %31
|
||||
%32 = OpLabel
|
||||
%54 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
|
||||
%55 = OpLoad %int %54
|
||||
%56 = OpConvertSToF %float %55
|
||||
%57 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%58 = OpLoad %int %57
|
||||
%59 = OpConvertSToF %float %58
|
||||
%60 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_1
|
||||
%61 = OpLoad %int %60
|
||||
%62 = OpConvertSToF %float %61
|
||||
%63 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %int_0
|
||||
%64 = OpLoad %int %63
|
||||
%65 = OpConvertSToF %float %64
|
||||
%66 = OpCompositeConstruct %v4float %56 %59 %62 %65
|
||||
OpStore %_GLF_color %66
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -0,0 +1,80 @@
|
||||
SKIP: FAILED
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
vec4 tint_unpack4x8unorm(uint param_0) {
|
||||
uint j = param_0;
|
||||
uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24);
|
||||
return float4(i) / 255.0;
|
||||
}
|
||||
|
||||
|
||||
layout(location = 0) out vec4 x_GLF_color_1_1;
|
||||
struct strided_arr {
|
||||
int el;
|
||||
};
|
||||
|
||||
struct buf0 {
|
||||
strided_arr x_GLF_uniform_int_values[3];
|
||||
};
|
||||
|
||||
layout(binding = 0) uniform buf0_1 {
|
||||
strided_arr x_GLF_uniform_int_values[3];
|
||||
} x_6;
|
||||
|
||||
vec4 x_GLF_color = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
void main_1() {
|
||||
int i = 0;
|
||||
vec4 v = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
int x_30 = x_6.x_GLF_uniform_int_values[1].el;
|
||||
i = x_30;
|
||||
while (true) {
|
||||
int x_35 = i;
|
||||
int x_37 = x_6.x_GLF_uniform_int_values[2].el;
|
||||
if ((x_35 < x_37)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
v = tint_unpack4x8unorm(100u);
|
||||
float x_42 = v.x;
|
||||
if ((int(x_42) > i)) {
|
||||
int x_49 = x_6.x_GLF_uniform_int_values[1].el;
|
||||
float x_50 = float(x_49);
|
||||
x_GLF_color = vec4(x_50, x_50, x_50, x_50);
|
||||
return;
|
||||
}
|
||||
{
|
||||
i = (i + 1);
|
||||
}
|
||||
}
|
||||
int x_55 = x_6.x_GLF_uniform_int_values[0].el;
|
||||
int x_58 = x_6.x_GLF_uniform_int_values[1].el;
|
||||
int x_61 = x_6.x_GLF_uniform_int_values[1].el;
|
||||
int x_64 = x_6.x_GLF_uniform_int_values[0].el;
|
||||
x_GLF_color = vec4(float(x_55), float(x_58), float(x_61), float(x_64));
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
vec4 x_GLF_color_1;
|
||||
};
|
||||
|
||||
main_out tint_symbol() {
|
||||
main_1();
|
||||
main_out tint_symbol_1 = main_out(x_GLF_color);
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void main() {
|
||||
main_out inner_result = tint_symbol();
|
||||
x_GLF_color_1_1 = inner_result.x_GLF_color_1;
|
||||
return;
|
||||
}
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:6: 'uint4' : undeclared identifier
|
||||
ERROR: 0:6: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
type Arr = @stride(16) array<i32, 3>;
|
||||
|
||||
struct buf0 {
|
||||
x_GLF_uniform_int_values : Arr;
|
||||
};
|
||||
|
||||
@group(0) @binding(0) var<uniform> x_6 : buf0;
|
||||
|
||||
var<private> x_GLF_color : vec4<f32>;
|
||||
|
||||
fn main_1() {
|
||||
var i : i32;
|
||||
var v : vec4<f32>;
|
||||
let x_30 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
i = x_30;
|
||||
loop {
|
||||
let x_35 : i32 = i;
|
||||
let x_37 : i32 = x_6.x_GLF_uniform_int_values[2];
|
||||
if ((x_35 < x_37)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
v = unpack4x8unorm(100u);
|
||||
let x_42 : f32 = v.x;
|
||||
let x_44 : i32 = i;
|
||||
if ((i32(x_42) > x_44)) {
|
||||
let x_49 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
let x_50 : f32 = f32(x_49);
|
||||
x_GLF_color = vec4<f32>(x_50, x_50, x_50, x_50);
|
||||
return;
|
||||
}
|
||||
|
||||
continuing {
|
||||
let x_52 : i32 = i;
|
||||
i = (x_52 + 1);
|
||||
}
|
||||
}
|
||||
let x_55 : i32 = x_6.x_GLF_uniform_int_values[0];
|
||||
let x_58 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
let x_61 : i32 = x_6.x_GLF_uniform_int_values[1];
|
||||
let x_64 : i32 = x_6.x_GLF_uniform_int_values[0];
|
||||
x_GLF_color = vec4<f32>(f32(x_55), f32(x_58), f32(x_61), f32(x_64));
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
@location(0)
|
||||
x_GLF_color_1 : vec4<f32>;
|
||||
};
|
||||
|
||||
@stage(fragment)
|
||||
fn main() -> main_out {
|
||||
main_1();
|
||||
return main_out(x_GLF_color);
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
SKIP: FAILED
|
||||
|
||||
vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl:1:13 warning: use of deprecated language feature: the @stride attribute is deprecated; use a larger type if necessary
|
||||
type Arr = @stride(16) array<i32, 3>;
|
||||
^^^^^^
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
vec4 tint_unpack4x8unorm(uint param_0) {
|
||||
uint j = param_0;
|
||||
uint4 i = uint4(j & 0xff, (j >> 8) & 0xff, (j >> 16) & 0xff, j >> 24);
|
||||
return float4(i) / 255.0;
|
||||
}
|
||||
|
||||
|
||||
layout(location = 0) out vec4 x_GLF_color_1_1;
|
||||
struct tint_padded_array_element {
|
||||
int el;
|
||||
};
|
||||
|
||||
struct buf0 {
|
||||
tint_padded_array_element x_GLF_uniform_int_values[3];
|
||||
};
|
||||
|
||||
layout(binding = 0) uniform buf0_1 {
|
||||
tint_padded_array_element x_GLF_uniform_int_values[3];
|
||||
} x_6;
|
||||
|
||||
vec4 x_GLF_color = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
void main_1() {
|
||||
int i = 0;
|
||||
vec4 v = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
int x_30 = x_6.x_GLF_uniform_int_values[1].el;
|
||||
i = x_30;
|
||||
while (true) {
|
||||
int x_35 = i;
|
||||
int x_37 = x_6.x_GLF_uniform_int_values[2].el;
|
||||
if ((x_35 < x_37)) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
v = tint_unpack4x8unorm(100u);
|
||||
float x_42 = v.x;
|
||||
if ((int(x_42) > i)) {
|
||||
int x_49 = x_6.x_GLF_uniform_int_values[1].el;
|
||||
float x_50 = float(x_49);
|
||||
x_GLF_color = vec4(x_50, x_50, x_50, x_50);
|
||||
return;
|
||||
}
|
||||
{
|
||||
i = (i + 1);
|
||||
}
|
||||
}
|
||||
int x_55 = x_6.x_GLF_uniform_int_values[0].el;
|
||||
int x_58 = x_6.x_GLF_uniform_int_values[1].el;
|
||||
int x_61 = x_6.x_GLF_uniform_int_values[1].el;
|
||||
int x_64 = x_6.x_GLF_uniform_int_values[0].el;
|
||||
x_GLF_color = vec4(float(x_55), float(x_58), float(x_61), float(x_64));
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
vec4 x_GLF_color_1;
|
||||
};
|
||||
|
||||
main_out tint_symbol() {
|
||||
main_1();
|
||||
main_out tint_symbol_1 = main_out(x_GLF_color);
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void main() {
|
||||
main_out inner_result = tint_symbol();
|
||||
x_GLF_color_1_1 = inner_result.x_GLF_color_1;
|
||||
return;
|
||||
}
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:6: 'uint4' : undeclared identifier
|
||||
ERROR: 0:6: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user