mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-19 18:33:30 +00:00
Refactor namer scheme, fix trailing digits (#1510)
This commit is contained in:
parent
098e4af52f
commit
8bc3aa824b
@ -2,6 +2,7 @@ use crate::{arena::Handle, FastHashMap, FastHashSet};
|
||||
use std::borrow::Cow;
|
||||
|
||||
pub type EntryPointIndex = u16;
|
||||
const SEPARATOR: char = '_';
|
||||
|
||||
#[derive(Debug, Eq, Hash, PartialEq)]
|
||||
pub enum NameKey {
|
||||
@ -30,23 +31,35 @@ pub struct Namer {
|
||||
impl Namer {
|
||||
/// Return a form of `string` suitable for use as the base of an identifier.
|
||||
///
|
||||
/// Retain only alphanumeric and `_` characters. Drop leading digits. Avoid
|
||||
/// prefixes in [`Namer::reserved_prefixes`].
|
||||
/// - Drop leading digits.
|
||||
/// - Retain only alphanumeric and `_` characters.
|
||||
/// - Avoid prefixes in [`Namer::reserved_prefixes`].
|
||||
///
|
||||
/// The return value is a valid identifier prefix in all of Naga's output languages,
|
||||
/// and it never ends with a `SEPARATOR` character.
|
||||
/// It is used as a key into the unique table.
|
||||
fn sanitize<'s>(&self, string: &'s str) -> Cow<'s, str> {
|
||||
let string = string.trim_start_matches(|c: char| c.is_numeric() || c == '_');
|
||||
let string = string
|
||||
.trim_start_matches(|c: char| c.is_numeric())
|
||||
.trim_end_matches(SEPARATOR);
|
||||
|
||||
let base = if string
|
||||
.chars()
|
||||
.all(|c: char| c.is_ascii_alphanumeric() || c == '_')
|
||||
let base = if !string.is_empty()
|
||||
&& string
|
||||
.chars()
|
||||
.all(|c: char| c.is_ascii_alphanumeric() || c == '_')
|
||||
{
|
||||
Cow::Borrowed(string)
|
||||
} else {
|
||||
Cow::Owned(
|
||||
string
|
||||
.chars()
|
||||
.filter(|&c| c.is_ascii_alphanumeric() || c == '_')
|
||||
.collect::<String>(),
|
||||
)
|
||||
let mut filtered = string
|
||||
.chars()
|
||||
.filter(|&c| c.is_ascii_alphanumeric() || c == '_')
|
||||
.collect::<String>();
|
||||
let stripped_len = filtered.trim_end_matches(SEPARATOR).len();
|
||||
filtered.truncate(stripped_len);
|
||||
if filtered.is_empty() {
|
||||
filtered.push_str("unnamed");
|
||||
}
|
||||
Cow::Owned(filtered)
|
||||
};
|
||||
|
||||
for prefix in &self.reserved_prefixes {
|
||||
@ -69,14 +82,10 @@ impl Namer {
|
||||
/// Guarantee uniqueness by applying a numeric suffix when necessary. If `label_raw`
|
||||
/// itself ends with digits, separate them from the suffix with an underscore.
|
||||
pub fn call(&mut self, label_raw: &str) -> String {
|
||||
use std::fmt::Write; // for write!-ing to Strings
|
||||
use std::fmt::Write as _; // for write!-ing to Strings
|
||||
|
||||
let base = self.sanitize(label_raw);
|
||||
let separator = if base.ends_with(char::is_numeric) {
|
||||
"_"
|
||||
} else {
|
||||
""
|
||||
};
|
||||
debug_assert!(!base.is_empty() && !base.ends_with(SEPARATOR));
|
||||
|
||||
// This would seem to be a natural place to use `HashMap::entry`. However, `entry`
|
||||
// requires an owned key, and we'd like to avoid heap-allocating strings we're
|
||||
@ -88,28 +97,18 @@ impl Namer {
|
||||
*count += 1;
|
||||
// Add the suffix. This may fit in base's existing allocation.
|
||||
let mut suffixed = base.into_owned();
|
||||
write!(&mut suffixed, "{}{}", separator, *count).unwrap();
|
||||
write!(&mut suffixed, "{}{}", SEPARATOR, *count).unwrap();
|
||||
suffixed
|
||||
}
|
||||
None => {
|
||||
let mut count = 0;
|
||||
let mut suffixed = Cow::Borrowed(base.as_ref());
|
||||
while self.keywords.contains(suffixed.as_ref()) {
|
||||
count += 1;
|
||||
// Try to reuse suffixed's allocation.
|
||||
let mut buf = suffixed.into_owned();
|
||||
buf.clear();
|
||||
write!(&mut buf, "{}{}{}", base, separator, count).unwrap();
|
||||
suffixed = Cow::Owned(buf);
|
||||
let mut suffixed = base.to_string();
|
||||
if base.ends_with(char::is_numeric) || self.keywords.contains(base.as_ref()) {
|
||||
suffixed.push(SEPARATOR);
|
||||
}
|
||||
// Produce our return value, which must be an owned string. This allocates
|
||||
// only if we haven't already done so earlier.
|
||||
let suffixed = suffixed.into_owned();
|
||||
|
||||
debug_assert!(!self.keywords.contains(&suffixed));
|
||||
// `self.unique` wants to own its keys. This allocates only if we haven't
|
||||
// already done so earlier.
|
||||
self.unique.insert(base.into_owned(), count);
|
||||
|
||||
self.unique.insert(base.into_owned(), 0);
|
||||
suffixed
|
||||
}
|
||||
}
|
||||
@ -117,13 +116,7 @@ impl Namer {
|
||||
|
||||
pub fn call_or(&mut self, label: &Option<String>, fallback: &str) -> String {
|
||||
self.call(match *label {
|
||||
Some(ref name) => {
|
||||
if name.trim().is_empty() {
|
||||
fallback
|
||||
} else {
|
||||
name
|
||||
}
|
||||
}
|
||||
Some(ref name) => name,
|
||||
None => fallback,
|
||||
})
|
||||
}
|
||||
@ -258,3 +251,11 @@ impl Namer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test() {
|
||||
let mut namer = Namer::default();
|
||||
assert_eq!(namer.call("x"), "x");
|
||||
assert_eq!(namer.call("x"), "x_1");
|
||||
assert_eq!(namer.call("x1"), "x1_");
|
||||
}
|
||||
|
@ -13,8 +13,8 @@ layout(std430) buffer Bar_block_0Cs {
|
||||
} _group_0_binding_0;
|
||||
|
||||
|
||||
float read_from_private(inout float foo2) {
|
||||
float _e2 = foo2;
|
||||
float read_from_private(inout float foo_2) {
|
||||
float _e2 = foo_2;
|
||||
return _e2;
|
||||
}
|
||||
|
||||
|
@ -11,22 +11,22 @@ layout(std430) buffer Bar_block_0Vs {
|
||||
} _group_0_binding_0;
|
||||
|
||||
|
||||
float read_from_private(inout float foo2) {
|
||||
float _e2 = foo2;
|
||||
float read_from_private(inout float foo_2) {
|
||||
float _e2 = foo_2;
|
||||
return _e2;
|
||||
}
|
||||
|
||||
void main() {
|
||||
uint vi = uint(gl_VertexID);
|
||||
float foo1 = 0.0;
|
||||
float foo_1 = 0.0;
|
||||
int c[5];
|
||||
float baz = foo1;
|
||||
foo1 = 1.0;
|
||||
float baz = foo_1;
|
||||
foo_1 = 1.0;
|
||||
mat4x4 matrix = _group_0_binding_0.matrix;
|
||||
uvec2 arr[2] = _group_0_binding_0.arr;
|
||||
float b = _group_0_binding_0.matrix[3][0];
|
||||
int a = _group_0_binding_0.data[(uint(_group_0_binding_0.data.length()) - 2u)];
|
||||
float _e25 = read_from_private(foo1);
|
||||
float _e25 = read_from_private(foo_1);
|
||||
_group_0_binding_0.matrix[1][2] = 1.0;
|
||||
_group_0_binding_0.matrix = mat4x4(vec4(0.0), vec4(1.0), vec4(2.0), vec4(3.0));
|
||||
_group_0_binding_0.arr = uvec2[2](uvec2(0u), uvec2(1u));
|
||||
|
@ -8,83 +8,83 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
void main() {
|
||||
int i = 0;
|
||||
ivec2 i2 = ivec2(0, 0);
|
||||
ivec3 i3 = ivec3(0, 0, 0);
|
||||
ivec4 i4 = ivec4(0, 0, 0, 0);
|
||||
ivec2 i2_ = ivec2(0, 0);
|
||||
ivec3 i3_ = ivec3(0, 0, 0);
|
||||
ivec4 i4_ = ivec4(0, 0, 0, 0);
|
||||
uint u = 0u;
|
||||
uvec2 u2 = uvec2(0u, 0u);
|
||||
uvec3 u3 = uvec3(0u, 0u, 0u);
|
||||
uvec4 u4 = uvec4(0u, 0u, 0u, 0u);
|
||||
vec2 f2 = vec2(0.0, 0.0);
|
||||
vec4 f4 = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
i2 = ivec2(0);
|
||||
i3 = ivec3(0);
|
||||
i4 = ivec4(0);
|
||||
u2 = uvec2(0u);
|
||||
u3 = uvec3(0u);
|
||||
u4 = uvec4(0u);
|
||||
f2 = vec2(0.0);
|
||||
f4 = vec4(0.0);
|
||||
vec4 _e28 = f4;
|
||||
uvec2 u2_ = uvec2(0u, 0u);
|
||||
uvec3 u3_ = uvec3(0u, 0u, 0u);
|
||||
uvec4 u4_ = uvec4(0u, 0u, 0u, 0u);
|
||||
vec2 f2_ = vec2(0.0, 0.0);
|
||||
vec4 f4_ = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
i2_ = ivec2(0);
|
||||
i3_ = ivec3(0);
|
||||
i4_ = ivec4(0);
|
||||
u2_ = uvec2(0u);
|
||||
u3_ = uvec3(0u);
|
||||
u4_ = uvec4(0u);
|
||||
f2_ = vec2(0.0);
|
||||
f4_ = vec4(0.0);
|
||||
vec4 _e28 = f4_;
|
||||
u = packSnorm4x8(_e28);
|
||||
vec4 _e30 = f4;
|
||||
vec4 _e30 = f4_;
|
||||
u = packUnorm4x8(_e30);
|
||||
vec2 _e32 = f2;
|
||||
vec2 _e32 = f2_;
|
||||
u = packSnorm2x16(_e32);
|
||||
vec2 _e34 = f2;
|
||||
vec2 _e34 = f2_;
|
||||
u = packUnorm2x16(_e34);
|
||||
vec2 _e36 = f2;
|
||||
vec2 _e36 = f2_;
|
||||
u = packHalf2x16(_e36);
|
||||
uint _e38 = u;
|
||||
f4 = unpackSnorm4x8(_e38);
|
||||
f4_ = unpackSnorm4x8(_e38);
|
||||
uint _e40 = u;
|
||||
f4 = unpackUnorm4x8(_e40);
|
||||
f4_ = unpackUnorm4x8(_e40);
|
||||
uint _e42 = u;
|
||||
f2 = unpackSnorm2x16(_e42);
|
||||
f2_ = unpackSnorm2x16(_e42);
|
||||
uint _e44 = u;
|
||||
f2 = unpackUnorm2x16(_e44);
|
||||
f2_ = unpackUnorm2x16(_e44);
|
||||
uint _e46 = u;
|
||||
f2 = unpackHalf2x16(_e46);
|
||||
f2_ = unpackHalf2x16(_e46);
|
||||
int _e48 = i;
|
||||
int _e49 = i;
|
||||
i = bitfieldInsert(_e48, _e49, int(5u), int(10u));
|
||||
ivec2 _e53 = i2;
|
||||
ivec2 _e54 = i2;
|
||||
i2 = bitfieldInsert(_e53, _e54, int(5u), int(10u));
|
||||
ivec3 _e58 = i3;
|
||||
ivec3 _e59 = i3;
|
||||
i3 = bitfieldInsert(_e58, _e59, int(5u), int(10u));
|
||||
ivec4 _e63 = i4;
|
||||
ivec4 _e64 = i4;
|
||||
i4 = bitfieldInsert(_e63, _e64, int(5u), int(10u));
|
||||
ivec2 _e53 = i2_;
|
||||
ivec2 _e54 = i2_;
|
||||
i2_ = bitfieldInsert(_e53, _e54, int(5u), int(10u));
|
||||
ivec3 _e58 = i3_;
|
||||
ivec3 _e59 = i3_;
|
||||
i3_ = bitfieldInsert(_e58, _e59, int(5u), int(10u));
|
||||
ivec4 _e63 = i4_;
|
||||
ivec4 _e64 = i4_;
|
||||
i4_ = bitfieldInsert(_e63, _e64, int(5u), int(10u));
|
||||
uint _e68 = u;
|
||||
uint _e69 = u;
|
||||
u = bitfieldInsert(_e68, _e69, int(5u), int(10u));
|
||||
uvec2 _e73 = u2;
|
||||
uvec2 _e74 = u2;
|
||||
u2 = bitfieldInsert(_e73, _e74, int(5u), int(10u));
|
||||
uvec3 _e78 = u3;
|
||||
uvec3 _e79 = u3;
|
||||
u3 = bitfieldInsert(_e78, _e79, int(5u), int(10u));
|
||||
uvec4 _e83 = u4;
|
||||
uvec4 _e84 = u4;
|
||||
u4 = bitfieldInsert(_e83, _e84, int(5u), int(10u));
|
||||
uvec2 _e73 = u2_;
|
||||
uvec2 _e74 = u2_;
|
||||
u2_ = bitfieldInsert(_e73, _e74, int(5u), int(10u));
|
||||
uvec3 _e78 = u3_;
|
||||
uvec3 _e79 = u3_;
|
||||
u3_ = bitfieldInsert(_e78, _e79, int(5u), int(10u));
|
||||
uvec4 _e83 = u4_;
|
||||
uvec4 _e84 = u4_;
|
||||
u4_ = bitfieldInsert(_e83, _e84, int(5u), int(10u));
|
||||
int _e88 = i;
|
||||
i = bitfieldExtract(_e88, int(5u), int(10u));
|
||||
ivec2 _e92 = i2;
|
||||
i2 = bitfieldExtract(_e92, int(5u), int(10u));
|
||||
ivec3 _e96 = i3;
|
||||
i3 = bitfieldExtract(_e96, int(5u), int(10u));
|
||||
ivec4 _e100 = i4;
|
||||
i4 = bitfieldExtract(_e100, int(5u), int(10u));
|
||||
ivec2 _e92 = i2_;
|
||||
i2_ = bitfieldExtract(_e92, int(5u), int(10u));
|
||||
ivec3 _e96 = i3_;
|
||||
i3_ = bitfieldExtract(_e96, int(5u), int(10u));
|
||||
ivec4 _e100 = i4_;
|
||||
i4_ = bitfieldExtract(_e100, int(5u), int(10u));
|
||||
uint _e104 = u;
|
||||
u = bitfieldExtract(_e104, int(5u), int(10u));
|
||||
uvec2 _e108 = u2;
|
||||
u2 = bitfieldExtract(_e108, int(5u), int(10u));
|
||||
uvec3 _e112 = u3;
|
||||
u3 = bitfieldExtract(_e112, int(5u), int(10u));
|
||||
uvec4 _e116 = u4;
|
||||
u4 = bitfieldExtract(_e116, int(5u), int(10u));
|
||||
uvec2 _e108 = u2_;
|
||||
u2_ = bitfieldExtract(_e108, int(5u), int(10u));
|
||||
uvec3 _e112 = u3_;
|
||||
u3_ = bitfieldExtract(_e112, int(5u), int(10u));
|
||||
uvec4 _e116 = u4_;
|
||||
u4_ = bitfieldExtract(_e116, int(5u), int(10u));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -21,11 +21,11 @@ void main() {
|
||||
uvec3 local_id = gl_LocalInvocationID;
|
||||
ivec2 dim = imageSize(_group_0_binding_1).xy;
|
||||
ivec2 itc = ((dim * ivec2(local_id.xy)) % ivec2(10, 20));
|
||||
uvec4 value1 = texelFetch(_group_0_binding_0, itc, int(local_id.z));
|
||||
uvec4 value2 = texelFetch(_group_0_binding_3, itc, int(local_id.z));
|
||||
uvec4 value4 = imageLoad(_group_0_binding_1, itc);
|
||||
uvec4 value5 = texelFetch(_group_0_binding_5, ivec3(itc, int(local_id.z)), (int(local_id.z) + 1));
|
||||
imageStore(_group_0_binding_2, ivec2(itc.x, 0.0), (((value1 + value2) + value4) + value5));
|
||||
uvec4 value1_ = texelFetch(_group_0_binding_0, itc, int(local_id.z));
|
||||
uvec4 value2_ = texelFetch(_group_0_binding_3, itc, int(local_id.z));
|
||||
uvec4 value4_ = imageLoad(_group_0_binding_1, itc);
|
||||
uvec4 value5_ = texelFetch(_group_0_binding_5, ivec3(itc, int(local_id.z)), (int(local_id.z) + 1));
|
||||
imageStore(_group_0_binding_2, ivec2(itc.x, 0.0), (((value1_ + value2_) + value4_) + value5_));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#version 400 core
|
||||
struct FragmentInput {
|
||||
vec4 position;
|
||||
uint flat1;
|
||||
uint flat_;
|
||||
float linear;
|
||||
vec2 linear_centroid;
|
||||
vec3 linear_sample;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#version 400 core
|
||||
struct FragmentInput {
|
||||
vec4 position;
|
||||
uint flat1;
|
||||
uint flat_;
|
||||
float linear;
|
||||
vec2 linear_centroid;
|
||||
vec3 linear_sample;
|
||||
@ -19,18 +19,18 @@ smooth centroid out float _vs2fs_location5;
|
||||
smooth sample out float _vs2fs_location6;
|
||||
|
||||
void main() {
|
||||
FragmentInput out1;
|
||||
out1.position = vec4(2.0, 4.0, 5.0, 6.0);
|
||||
out1.flat1 = 8u;
|
||||
out1.linear = 27.0;
|
||||
out1.linear_centroid = vec2(64.0, 125.0);
|
||||
out1.linear_sample = vec3(216.0, 343.0, 512.0);
|
||||
out1.perspective = vec4(729.0, 1000.0, 1331.0, 1728.0);
|
||||
out1.perspective_centroid = 2197.0;
|
||||
out1.perspective_sample = 2744.0;
|
||||
FragmentInput _e30 = out1;
|
||||
FragmentInput out_;
|
||||
out_.position = vec4(2.0, 4.0, 5.0, 6.0);
|
||||
out_.flat_ = 8u;
|
||||
out_.linear = 27.0;
|
||||
out_.linear_centroid = vec2(64.0, 125.0);
|
||||
out_.linear_sample = vec3(216.0, 343.0, 512.0);
|
||||
out_.perspective = vec4(729.0, 1000.0, 1331.0, 1728.0);
|
||||
out_.perspective_centroid = 2197.0;
|
||||
out_.perspective_sample = 2744.0;
|
||||
FragmentInput _e30 = out_;
|
||||
gl_Position = _e30.position;
|
||||
_vs2fs_location0 = _e30.flat1;
|
||||
_vs2fs_location0 = _e30.flat_;
|
||||
_vs2fs_location1 = _e30.linear;
|
||||
_vs2fs_location2 = _e30.linear_centroid;
|
||||
_vs2fs_location3 = _e30.linear_sample;
|
||||
|
@ -12,15 +12,15 @@ struct Foo {
|
||||
|
||||
|
||||
vec4 builtins() {
|
||||
int s1 = (true ? 1 : 0);
|
||||
vec4 s2 = (true ? vec4(1.0, 1.0, 1.0, 1.0) : vec4(0.0, 0.0, 0.0, 0.0));
|
||||
vec4 s3 = mix(vec4(1.0, 1.0, 1.0, 1.0), vec4(0.0, 0.0, 0.0, 0.0), bvec4(false, false, false, false));
|
||||
vec4 m1 = mix(vec4(0.0, 0.0, 0.0, 0.0), vec4(1.0, 1.0, 1.0, 1.0), vec4(0.5, 0.5, 0.5, 0.5));
|
||||
vec4 m2 = mix(vec4(0.0, 0.0, 0.0, 0.0), vec4(1.0, 1.0, 1.0, 1.0), 0.10000000149011612);
|
||||
float b1 = intBitsToFloat(ivec4(1, 1, 1, 1).x);
|
||||
vec4 b2 = intBitsToFloat(ivec4(1, 1, 1, 1));
|
||||
int s1_ = (true ? 1 : 0);
|
||||
vec4 s2_ = (true ? vec4(1.0, 1.0, 1.0, 1.0) : vec4(0.0, 0.0, 0.0, 0.0));
|
||||
vec4 s3_ = mix(vec4(1.0, 1.0, 1.0, 1.0), vec4(0.0, 0.0, 0.0, 0.0), bvec4(false, false, false, false));
|
||||
vec4 m1_ = mix(vec4(0.0, 0.0, 0.0, 0.0), vec4(1.0, 1.0, 1.0, 1.0), vec4(0.5, 0.5, 0.5, 0.5));
|
||||
vec4 m2_ = mix(vec4(0.0, 0.0, 0.0, 0.0), vec4(1.0, 1.0, 1.0, 1.0), 0.10000000149011612);
|
||||
float b1_ = intBitsToFloat(ivec4(1, 1, 1, 1).x);
|
||||
vec4 b2_ = intBitsToFloat(ivec4(1, 1, 1, 1));
|
||||
ivec4 v_i32_zero = ivec4(vec4(0.0, 0.0, 0.0, 0.0));
|
||||
return (((((vec4((ivec4(s1) + v_i32_zero)) + s2) + m1) + m2) + vec4(b1)) + b2);
|
||||
return (((((vec4((ivec4(s1_) + v_i32_zero)) + s2_) + m1_) + m2_) + vec4(b1_)) + b2_);
|
||||
}
|
||||
|
||||
vec4 splat() {
|
||||
@ -50,8 +50,8 @@ float constructors() {
|
||||
}
|
||||
|
||||
void modulo() {
|
||||
int a1 = (1 % 1);
|
||||
float b1 = (1.0 - 1.0 * trunc(1.0 / 1.0));
|
||||
int a_1 = (1 % 1);
|
||||
float b_1 = (1.0 - 1.0 * trunc(1.0 / 1.0));
|
||||
ivec3 c = (ivec3(1) % ivec3(1));
|
||||
vec3 d = (vec3(1.0) - vec3(1.0) * trunc(vec3(1.0) / vec3(1.0)));
|
||||
}
|
||||
|
@ -3,14 +3,14 @@
|
||||
precision highp float;
|
||||
precision highp int;
|
||||
|
||||
struct type9 {
|
||||
struct type_9 {
|
||||
vec2 member;
|
||||
vec4 gen_gl_Position;
|
||||
};
|
||||
|
||||
vec2 v_uv = vec2(0.0, 0.0);
|
||||
|
||||
vec2 a_uv1 = vec2(0.0, 0.0);
|
||||
vec2 a_uv_1 = vec2(0.0, 0.0);
|
||||
|
||||
struct gen_gl_PerVertex_block_0Vs {
|
||||
vec4 gen_gl_Position;
|
||||
@ -19,16 +19,16 @@ struct gen_gl_PerVertex_block_0Vs {
|
||||
float gen_gl_CullDistance[1];
|
||||
} perVertexStruct;
|
||||
|
||||
vec2 a_pos1 = vec2(0.0, 0.0);
|
||||
vec2 a_pos_1 = vec2(0.0, 0.0);
|
||||
|
||||
layout(location = 1) in vec2 _p2vs_location1;
|
||||
layout(location = 0) in vec2 _p2vs_location0;
|
||||
layout(location = 0) smooth out vec2 _vs2fs_location0;
|
||||
|
||||
void main2() {
|
||||
vec2 _e12 = a_uv1;
|
||||
void main_1() {
|
||||
vec2 _e12 = a_uv_1;
|
||||
v_uv = _e12;
|
||||
vec2 _e13 = a_pos1;
|
||||
vec2 _e13 = a_pos_1;
|
||||
perVertexStruct.gen_gl_Position = vec4(_e13.x, _e13.y, 0.0, 1.0);
|
||||
return;
|
||||
}
|
||||
@ -36,12 +36,12 @@ void main2() {
|
||||
void main() {
|
||||
vec2 a_uv = _p2vs_location1;
|
||||
vec2 a_pos = _p2vs_location0;
|
||||
a_uv1 = a_uv;
|
||||
a_pos1 = a_pos;
|
||||
main2();
|
||||
a_uv_1 = a_uv;
|
||||
a_pos_1 = a_pos;
|
||||
main_1();
|
||||
vec2 _e7 = v_uv;
|
||||
vec4 _e8 = perVertexStruct.gen_gl_Position;
|
||||
type9 _tmp_return = type9(_e7, _e8);
|
||||
type_9 _tmp_return = type_9(_e7, _e8);
|
||||
_vs2fs_location0 = _tmp_return.member;
|
||||
gl_Position = _tmp_return.gen_gl_Position;
|
||||
gl_Position.yz = vec2(-gl_Position.y, gl_Position.z * 2.0 - gl_Position.w);
|
||||
|
@ -14,8 +14,8 @@ smooth in vec2 _vs2fs_location0;
|
||||
layout(location = 0) out vec4 _fs2p_location0;
|
||||
|
||||
void main() {
|
||||
vec2 uv1 = _vs2fs_location0;
|
||||
vec4 color = texture(_group_0_binding_0, vec2(uv1));
|
||||
vec2 uv_1 = _vs2fs_location0;
|
||||
vec4 color = texture(_group_0_binding_0, vec2(uv_1));
|
||||
if ((color.w == 0.0)) {
|
||||
discard;
|
||||
}
|
||||
|
@ -14,8 +14,8 @@ layout(location = 0) smooth in vec3 _vs2fs_location0;
|
||||
layout(location = 0) out vec4 _fs2p_location0;
|
||||
|
||||
void main() {
|
||||
VertexOutput in1 = VertexOutput(gl_FragCoord, _vs2fs_location0);
|
||||
vec4 _e5 = texture(_group_0_binding_1, vec3(in1.uv));
|
||||
VertexOutput in_ = VertexOutput(gl_FragCoord, _vs2fs_location0);
|
||||
vec4 _e5 = texture(_group_0_binding_1, vec3(in_.uv));
|
||||
_fs2p_location0 = _e5;
|
||||
return;
|
||||
}
|
||||
|
@ -17,12 +17,12 @@ layout(location = 0) smooth out vec3 _vs2fs_location0;
|
||||
|
||||
void main() {
|
||||
uint vertex_index = uint(gl_VertexID);
|
||||
int tmp1 = 0;
|
||||
int tmp2 = 0;
|
||||
tmp1 = (int(vertex_index) / 2);
|
||||
tmp2 = (int(vertex_index) & 1);
|
||||
int _e10 = tmp1;
|
||||
int _e16 = tmp2;
|
||||
int tmp1_ = 0;
|
||||
int tmp2_ = 0;
|
||||
tmp1_ = (int(vertex_index) / 2);
|
||||
tmp2_ = (int(vertex_index) & 1);
|
||||
int _e10 = tmp1_;
|
||||
int _e16 = tmp2_;
|
||||
vec4 pos = vec4(((float(_e10) * 4.0) - 1.0), ((float(_e16) * 4.0) - 1.0), 0.0, 1.0);
|
||||
vec4 _e27 = _group_0_binding_0.view[0];
|
||||
vec4 _e31 = _group_0_binding_0.view[1];
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
RWByteAddressBuffer bar : register(u0);
|
||||
|
||||
float read_from_private(inout float foo2)
|
||||
float read_from_private(inout float foo_2)
|
||||
{
|
||||
float _expr2 = foo2;
|
||||
float _expr2 = foo_2;
|
||||
return _expr2;
|
||||
}
|
||||
|
||||
@ -16,16 +16,16 @@ uint NagaBufferLengthRW(RWByteAddressBuffer buffer)
|
||||
|
||||
float4 foo(uint vi : SV_VertexID) : SV_Position
|
||||
{
|
||||
float foo1 = 0.0;
|
||||
float foo_1 = 0.0;
|
||||
int c[5] = {(int)0,(int)0,(int)0,(int)0,(int)0};
|
||||
|
||||
float baz = foo1;
|
||||
foo1 = 1.0;
|
||||
float4x4 matrix1 = float4x4(asfloat(bar.Load4(0+0)), asfloat(bar.Load4(0+16)), asfloat(bar.Load4(0+32)), asfloat(bar.Load4(0+48)));
|
||||
float baz = foo_1;
|
||||
foo_1 = 1.0;
|
||||
float4x4 matrix_ = float4x4(asfloat(bar.Load4(0+0)), asfloat(bar.Load4(0+16)), asfloat(bar.Load4(0+32)), asfloat(bar.Load4(0+48)));
|
||||
uint2 arr[2] = {asuint(bar.Load2(72+0)), asuint(bar.Load2(72+8))};
|
||||
float b = asfloat(bar.Load(0+48+0));
|
||||
int a = asint(bar.Load((((NagaBufferLengthRW(bar) - 88) / 8) - 2u)*8+88));
|
||||
const float _e25 = read_from_private(foo1);
|
||||
const float _e25 = read_from_private(foo_1);
|
||||
bar.Store(8+16+0, asuint(1.0));
|
||||
{
|
||||
float4x4 _value2 = float4x4(float4(0.0.xxxx), float4(1.0.xxxx), float4(2.0.xxxx), float4(3.0.xxxx));
|
||||
@ -46,7 +46,7 @@ float4 foo(uint vi : SV_VertexID) : SV_Position
|
||||
}
|
||||
c[(vi + 1u)] = 42;
|
||||
int value = c[vi];
|
||||
return mul(float4(int4(value.xxxx)), matrix1);
|
||||
return mul(float4(int4(value.xxxx)), matrix_);
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
@ -54,7 +54,7 @@ void atomics()
|
||||
{
|
||||
int tmp = (int)0;
|
||||
|
||||
int value1 = asint(bar.Load(64));
|
||||
int value_1 = asint(bar.Load(64));
|
||||
int _e6; bar.InterlockedAdd(64, 5, _e6);
|
||||
tmp = _e6;
|
||||
int _e9; bar.InterlockedAdd(64, -5, _e9);
|
||||
@ -71,6 +71,6 @@ void atomics()
|
||||
tmp = _e24;
|
||||
int _e27; bar.InterlockedExchange(64, 5, _e27);
|
||||
tmp = _e27;
|
||||
bar.Store(64, asuint(value1));
|
||||
bar.Store(64, asuint(value_1));
|
||||
return;
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
|
||||
struct type1 {
|
||||
struct type_1 {
|
||||
int member;
|
||||
};
|
||||
|
||||
RWByteAddressBuffer global : register(u0);
|
||||
RWByteAddressBuffer unnamed : register(u0);
|
||||
|
||||
void function()
|
||||
{
|
||||
int _expr8 = asint(global.Load(0));
|
||||
global.Store(0, asuint((_expr8 + 1)));
|
||||
int _expr8 = asint(unnamed.Load(0));
|
||||
unnamed.Store(0, asuint((_expr8 + 1)));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -29,21 +29,21 @@ void main(uint3 local_id : SV_GroupThreadID)
|
||||
{
|
||||
int2 dim = NagaRWDimensions2D(image_storage_src);
|
||||
int2 itc = ((dim * int2(local_id.xy)) % int2(10, 20));
|
||||
uint4 value1 = image_mipmapped_src.Load(int3(itc, int(local_id.z)));
|
||||
uint4 value2 = image_multisampled_src.Load(itc, int(local_id.z));
|
||||
uint4 value4 = image_storage_src.Load(itc);
|
||||
uint4 value5 = image_array_src.Load(int4(itc, int(local_id.z), (int(local_id.z) + 1)));
|
||||
image_dst[itc.x] = (((value1 + value2) + value4) + value5);
|
||||
uint4 value1_ = image_mipmapped_src.Load(int3(itc, int(local_id.z)));
|
||||
uint4 value2_ = image_multisampled_src.Load(itc, int(local_id.z));
|
||||
uint4 value4_ = image_storage_src.Load(itc);
|
||||
uint4 value5_ = image_array_src.Load(int4(itc, int(local_id.z), (int(local_id.z) + 1)));
|
||||
image_dst[itc.x] = (((value1_ + value2_) + value4_) + value5_);
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(16, 1, 1)]
|
||||
void depth_load(uint3 local_id1 : SV_GroupThreadID)
|
||||
void depth_load(uint3 local_id_1 : SV_GroupThreadID)
|
||||
{
|
||||
int2 dim1 = NagaRWDimensions2D(image_storage_src);
|
||||
int2 itc1 = ((dim1 * int2(local_id1.xy)) % int2(10, 20));
|
||||
float val = image_depth_multisampled_src.Load(itc1, int(local_id1.z)).x;
|
||||
image_dst[itc1.x] = uint4(uint(val).xxxx);
|
||||
int2 dim_1 = NagaRWDimensions2D(image_storage_src);
|
||||
int2 itc_1 = ((dim_1 * int2(local_id_1.xy)) % int2(10, 20));
|
||||
float val = image_depth_multisampled_src.Load(itc_1, int(local_id_1.z)).x;
|
||||
image_dst[itc_1.x] = uint4(uint(val).xxxx);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -207,11 +207,11 @@ float4 levels_queries() : SV_Position
|
||||
int num_layers_cube = NagaNumLayersCubeArray(image_cube_array);
|
||||
int num_levels_3d = NagaNumLevels3D(image_3d);
|
||||
int num_samples_aa = NagaMSNumSamples2D(image_aa);
|
||||
int sum1 = (((((((num_layers_2d + num_layers_cube) + num_samples_aa) + num_levels_2d) + num_levels_2d_array) + num_levels_3d) + num_levels_cube) + num_levels_cube_array);
|
||||
return float4(float(sum1).xxxx);
|
||||
int sum_1 = (((((((num_layers_2d + num_layers_cube) + num_samples_aa) + num_levels_2d) + num_levels_2d_array) + num_levels_3d) + num_levels_cube) + num_levels_cube_array);
|
||||
return float4(float(sum_1).xxxx);
|
||||
}
|
||||
|
||||
float4 sample1() : SV_Target0
|
||||
float4 sample_() : SV_Target0
|
||||
{
|
||||
float2 tc = float2(0.5.xx);
|
||||
float4 s1d = image_1d.Sample(sampler_reg, tc.x);
|
||||
@ -224,8 +224,8 @@ float4 sample1() : SV_Target0
|
||||
|
||||
float sample_comparison() : SV_Target0
|
||||
{
|
||||
float2 tc1 = float2(0.5.xx);
|
||||
float s2d_depth = image_2d_depth.SampleCmp(sampler_cmp, tc1, 0.5);
|
||||
float s2d_depth_level = image_2d_depth.SampleCmpLevelZero(sampler_cmp, tc1, 0.5);
|
||||
float2 tc_1 = float2(0.5.xx);
|
||||
float s2d_depth = image_2d_depth.SampleCmp(sampler_cmp, tc_1, 0.5);
|
||||
float s2d_depth_level = image_2d_depth.SampleCmpLevelZero(sampler_cmp, tc_1, 0.5);
|
||||
return (s2d_depth + s2d_depth_level);
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
vertex=(queries:vs_5_1 levels_queries:vs_5_1 )
|
||||
fragment=(sample1:ps_5_1 sample_comparison:ps_5_1 )
|
||||
fragment=(sample_:ps_5_1 sample_comparison:ps_5_1 )
|
||||
compute=(main:cs_5_1 depth_load:cs_5_1 )
|
||||
|
@ -24,11 +24,11 @@ struct VertexOutput_vertex {
|
||||
};
|
||||
|
||||
struct FragmentInput_fragment {
|
||||
float varying1 : LOC1;
|
||||
float4 position1 : SV_Position;
|
||||
bool front_facing1 : SV_IsFrontFace;
|
||||
uint sample_index1 : SV_SampleIndex;
|
||||
uint sample_mask1 : SV_Coverage;
|
||||
float varying_1 : LOC1;
|
||||
float4 position_1 : SV_Position;
|
||||
bool front_facing_1 : SV_IsFrontFace;
|
||||
uint sample_index_1 : SV_SampleIndex;
|
||||
uint sample_mask_1 : SV_Coverage;
|
||||
};
|
||||
|
||||
VertexOutput ConstructVertexOutput(float4 arg0, float arg1) {
|
||||
@ -42,8 +42,8 @@ VertexOutput_vertex vertex(uint vertex_index : SV_VertexID, uint instance_index
|
||||
{
|
||||
uint tmp = (((_NagaConstants.base_vertex + vertex_index) + (_NagaConstants.base_instance + instance_index)) + color);
|
||||
const VertexOutput vertexoutput = ConstructVertexOutput(float4(1.0.xxxx), float(tmp));
|
||||
const VertexOutput_vertex vertexoutput1 = { vertexoutput.varying, vertexoutput.position };
|
||||
return vertexoutput1;
|
||||
const VertexOutput_vertex vertexoutput_1 = { vertexoutput.varying, vertexoutput.position };
|
||||
return vertexoutput_1;
|
||||
}
|
||||
|
||||
FragmentOutput ConstructFragmentOutput(float arg0, uint arg1, float arg2) {
|
||||
@ -56,13 +56,13 @@ FragmentOutput ConstructFragmentOutput(float arg0, uint arg1, float arg2) {
|
||||
|
||||
FragmentOutput fragment(FragmentInput_fragment fragmentinput_fragment)
|
||||
{
|
||||
VertexOutput in1 = { fragmentinput_fragment.position1, fragmentinput_fragment.varying1 };
|
||||
bool front_facing = fragmentinput_fragment.front_facing1;
|
||||
uint sample_index = fragmentinput_fragment.sample_index1;
|
||||
uint sample_mask = fragmentinput_fragment.sample_mask1;
|
||||
VertexOutput in_ = { fragmentinput_fragment.position_1, fragmentinput_fragment.varying_1 };
|
||||
bool front_facing = fragmentinput_fragment.front_facing_1;
|
||||
uint sample_index = fragmentinput_fragment.sample_index_1;
|
||||
uint sample_mask = fragmentinput_fragment.sample_mask_1;
|
||||
uint mask = (sample_mask & (1u << sample_index));
|
||||
float color1 = (front_facing ? 1.0 : 0.0);
|
||||
const FragmentOutput fragmentoutput = ConstructFragmentOutput(in1.varying, mask, color1);
|
||||
float color_1 = (front_facing ? 1.0 : 0.0);
|
||||
const FragmentOutput fragmentoutput = ConstructFragmentOutput(in_.varying, mask, color_1);
|
||||
return fragmentoutput;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
struct FragmentInput {
|
||||
float4 position : SV_Position;
|
||||
nointerpolation uint flat : LOC0;
|
||||
noperspective float linear1 : LOC1;
|
||||
noperspective float linear_ : LOC1;
|
||||
noperspective centroid float2 linear_centroid : LOC2;
|
||||
noperspective sample float3 linear_sample : LOC3;
|
||||
linear float4 perspective : LOC4;
|
||||
@ -12,7 +12,7 @@ struct FragmentInput {
|
||||
|
||||
struct VertexOutput_main {
|
||||
uint flat : LOC0;
|
||||
float linear1 : LOC1;
|
||||
float linear_ : LOC1;
|
||||
float2 linear_centroid : LOC2;
|
||||
float3 linear_sample : LOC3;
|
||||
float4 perspective : LOC4;
|
||||
@ -22,36 +22,36 @@ struct VertexOutput_main {
|
||||
};
|
||||
|
||||
struct FragmentInput_main {
|
||||
uint flat1 : LOC0;
|
||||
float linear2 : LOC1;
|
||||
float2 linear_centroid1 : LOC2;
|
||||
float3 linear_sample1 : LOC3;
|
||||
float4 perspective1 : LOC4;
|
||||
float perspective_centroid1 : LOC5;
|
||||
float perspective_sample1 : LOC6;
|
||||
float4 position1 : SV_Position;
|
||||
uint flat_1 : LOC0;
|
||||
float linear_1 : LOC1;
|
||||
float2 linear_centroid_1 : LOC2;
|
||||
float3 linear_sample_1 : LOC3;
|
||||
float4 perspective_1 : LOC4;
|
||||
float perspective_centroid_1 : LOC5;
|
||||
float perspective_sample_1 : LOC6;
|
||||
float4 position_1 : SV_Position;
|
||||
};
|
||||
|
||||
VertexOutput_main main()
|
||||
{
|
||||
FragmentInput out1 = (FragmentInput)0;
|
||||
FragmentInput out_ = (FragmentInput)0;
|
||||
|
||||
out1.position = float4(2.0, 4.0, 5.0, 6.0);
|
||||
out1.flat = 8u;
|
||||
out1.linear1 = 27.0;
|
||||
out1.linear_centroid = float2(64.0, 125.0);
|
||||
out1.linear_sample = float3(216.0, 343.0, 512.0);
|
||||
out1.perspective = float4(729.0, 1000.0, 1331.0, 1728.0);
|
||||
out1.perspective_centroid = 2197.0;
|
||||
out1.perspective_sample = 2744.0;
|
||||
FragmentInput _expr30 = out1;
|
||||
out_.position = float4(2.0, 4.0, 5.0, 6.0);
|
||||
out_.flat = 8u;
|
||||
out_.linear_ = 27.0;
|
||||
out_.linear_centroid = float2(64.0, 125.0);
|
||||
out_.linear_sample = float3(216.0, 343.0, 512.0);
|
||||
out_.perspective = float4(729.0, 1000.0, 1331.0, 1728.0);
|
||||
out_.perspective_centroid = 2197.0;
|
||||
out_.perspective_sample = 2744.0;
|
||||
FragmentInput _expr30 = out_;
|
||||
const FragmentInput fragmentinput = _expr30;
|
||||
const VertexOutput_main fragmentinput1 = { fragmentinput.flat, fragmentinput.linear1, fragmentinput.linear_centroid, fragmentinput.linear_sample, fragmentinput.perspective, fragmentinput.perspective_centroid, fragmentinput.perspective_sample, fragmentinput.position };
|
||||
return fragmentinput1;
|
||||
const VertexOutput_main fragmentinput_1 = { fragmentinput.flat, fragmentinput.linear_, fragmentinput.linear_centroid, fragmentinput.linear_sample, fragmentinput.perspective, fragmentinput.perspective_centroid, fragmentinput.perspective_sample, fragmentinput.position };
|
||||
return fragmentinput_1;
|
||||
}
|
||||
|
||||
void main1(FragmentInput_main fragmentinput_main)
|
||||
void main_1(FragmentInput_main fragmentinput_main)
|
||||
{
|
||||
FragmentInput val = { fragmentinput_main.position1, fragmentinput_main.flat1, fragmentinput_main.linear2, fragmentinput_main.linear_centroid1, fragmentinput_main.linear_sample1, fragmentinput_main.perspective1, fragmentinput_main.perspective_centroid1, fragmentinput_main.perspective_sample1 };
|
||||
FragmentInput val = { fragmentinput_main.position_1, fragmentinput_main.flat_1, fragmentinput_main.linear_1, fragmentinput_main.linear_centroid_1, fragmentinput_main.linear_sample_1, fragmentinput_main.perspective_1, fragmentinput_main.perspective_centroid_1, fragmentinput_main.perspective_sample_1 };
|
||||
return;
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
vertex=(main:vs_5_1 )
|
||||
fragment=(main1:ps_5_1 )
|
||||
fragment=(main_1:ps_5_1 )
|
||||
compute=()
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
static float a = (float)0;
|
||||
|
||||
void main1()
|
||||
void main_1()
|
||||
{
|
||||
float b = (float)0;
|
||||
float c = (float)0;
|
||||
@ -18,5 +18,5 @@ void main1()
|
||||
|
||||
void main()
|
||||
{
|
||||
main1();
|
||||
main_1();
|
||||
}
|
||||
|
@ -10,15 +10,15 @@ struct Foo {
|
||||
|
||||
float4 builtins()
|
||||
{
|
||||
int s1 = (true ? 1 : 0);
|
||||
float4 s2 = (true ? float4(1.0, 1.0, 1.0, 1.0) : float4(0.0, 0.0, 0.0, 0.0));
|
||||
float4 s3 = (bool4(false, false, false, false) ? float4(0.0, 0.0, 0.0, 0.0) : float4(1.0, 1.0, 1.0, 1.0));
|
||||
float4 m1 = lerp(float4(0.0, 0.0, 0.0, 0.0), float4(1.0, 1.0, 1.0, 1.0), float4(0.5, 0.5, 0.5, 0.5));
|
||||
float4 m2 = lerp(float4(0.0, 0.0, 0.0, 0.0), float4(1.0, 1.0, 1.0, 1.0), 0.10000000149011612);
|
||||
float b1 = float(int4(1, 1, 1, 1).x);
|
||||
float4 b2 = float4(int4(1, 1, 1, 1));
|
||||
int s1_ = (true ? 1 : 0);
|
||||
float4 s2_ = (true ? float4(1.0, 1.0, 1.0, 1.0) : float4(0.0, 0.0, 0.0, 0.0));
|
||||
float4 s3_ = (bool4(false, false, false, false) ? float4(0.0, 0.0, 0.0, 0.0) : float4(1.0, 1.0, 1.0, 1.0));
|
||||
float4 m1_ = lerp(float4(0.0, 0.0, 0.0, 0.0), float4(1.0, 1.0, 1.0, 1.0), float4(0.5, 0.5, 0.5, 0.5));
|
||||
float4 m2_ = lerp(float4(0.0, 0.0, 0.0, 0.0), float4(1.0, 1.0, 1.0, 1.0), 0.10000000149011612);
|
||||
float b1_ = float(int4(1, 1, 1, 1).x);
|
||||
float4 b2_ = float4(int4(1, 1, 1, 1));
|
||||
int4 v_i32_zero = int4(float4(0.0, 0.0, 0.0, 0.0));
|
||||
return (((((float4((int4(s1.xxxx) + v_i32_zero)) + s2) + m1) + m2) + float4(b1.xxxx)) + b2);
|
||||
return (((((float4((int4(s1_.xxxx) + v_i32_zero)) + s2_) + m1_) + m2_) + float4(b1_.xxxx)) + b2_);
|
||||
}
|
||||
|
||||
float4 splat()
|
||||
@ -61,8 +61,8 @@ float constructors()
|
||||
|
||||
void modulo()
|
||||
{
|
||||
int a1 = (1 % 1);
|
||||
float b1 = (1.0 % 1.0);
|
||||
int a_1 = (1 % 1);
|
||||
float b_1 = (1.0 % 1.0);
|
||||
int3 c = (int3(1.xxx) % int3(1.xxx));
|
||||
float3 d = (float3(1.0.xxx) % float3(1.0.xxx));
|
||||
}
|
||||
|
@ -6,32 +6,32 @@ struct gl_PerVertex {
|
||||
float gl_CullDistance[1] : SV_CullDistance;
|
||||
};
|
||||
|
||||
struct type9 {
|
||||
struct type_9 {
|
||||
linear float2 member : LOC0;
|
||||
float4 gl_Position : SV_Position;
|
||||
};
|
||||
|
||||
static float2 v_uv = (float2)0;
|
||||
static float2 a_uv1 = (float2)0;
|
||||
static float2 a_uv_1 = (float2)0;
|
||||
static gl_PerVertex perVertexStruct = { float4(0.0, 0.0, 0.0, 1.0), 1.0, { 0.0 }, { 0.0 } };
|
||||
static float2 a_pos1 = (float2)0;
|
||||
static float2 a_pos_1 = (float2)0;
|
||||
|
||||
struct VertexOutput_main {
|
||||
float2 member : LOC0;
|
||||
float4 gl_Position : SV_Position;
|
||||
};
|
||||
|
||||
void main1()
|
||||
void main_1()
|
||||
{
|
||||
float2 _expr12 = a_uv1;
|
||||
float2 _expr12 = a_uv_1;
|
||||
v_uv = _expr12;
|
||||
float2 _expr13 = a_pos1;
|
||||
float2 _expr13 = a_pos_1;
|
||||
perVertexStruct.gl_Position = float4(_expr13.x, _expr13.y, 0.0, 1.0);
|
||||
return;
|
||||
}
|
||||
|
||||
type9 Constructtype9(float2 arg0, float4 arg1) {
|
||||
type9 ret;
|
||||
type_9 Constructtype_9(float2 arg0, float4 arg1) {
|
||||
type_9 ret;
|
||||
ret.member = arg0;
|
||||
ret.gl_Position = arg1;
|
||||
return ret;
|
||||
@ -39,12 +39,12 @@ type9 Constructtype9(float2 arg0, float4 arg1) {
|
||||
|
||||
VertexOutput_main main(float2 a_uv : LOC1, float2 a_pos : LOC0)
|
||||
{
|
||||
a_uv1 = a_uv;
|
||||
a_pos1 = a_pos;
|
||||
main1();
|
||||
a_uv_1 = a_uv;
|
||||
a_pos_1 = a_pos;
|
||||
main_1();
|
||||
float2 _expr7 = v_uv;
|
||||
float4 _expr8 = perVertexStruct.gl_Position;
|
||||
const type9 type9 = Constructtype9(_expr7, _expr8);
|
||||
const VertexOutput_main type9_1 = { type9.member, type9.gl_Position };
|
||||
return type9_1;
|
||||
const type_9 type_9_ = Constructtype_9(_expr7, _expr8);
|
||||
const VertexOutput_main type_9_1 = { type_9_.member, type_9_.gl_Position };
|
||||
return type_9_1;
|
||||
}
|
||||
|
@ -9,12 +9,12 @@ Texture2D<float4> u_texture : register(t0);
|
||||
SamplerState u_sampler : register(s1);
|
||||
|
||||
struct VertexOutput_main {
|
||||
float2 uv2 : LOC0;
|
||||
float2 uv_2 : LOC0;
|
||||
float4 position : SV_Position;
|
||||
};
|
||||
|
||||
struct FragmentInput_main {
|
||||
float2 uv3 : LOC0;
|
||||
float2 uv_3 : LOC0;
|
||||
};
|
||||
|
||||
VertexOutput ConstructVertexOutput(float2 arg0, float4 arg1) {
|
||||
@ -27,14 +27,14 @@ VertexOutput ConstructVertexOutput(float2 arg0, float4 arg1) {
|
||||
VertexOutput_main main(float2 pos : LOC0, float2 uv : LOC1)
|
||||
{
|
||||
const VertexOutput vertexoutput = ConstructVertexOutput(uv, float4((c_scale * pos), 0.0, 1.0));
|
||||
const VertexOutput_main vertexoutput1 = { vertexoutput.uv, vertexoutput.position };
|
||||
return vertexoutput1;
|
||||
const VertexOutput_main vertexoutput_1 = { vertexoutput.uv, vertexoutput.position };
|
||||
return vertexoutput_1;
|
||||
}
|
||||
|
||||
float4 main1(FragmentInput_main fragmentinput_main) : SV_Target0
|
||||
float4 main_1(FragmentInput_main fragmentinput_main) : SV_Target0
|
||||
{
|
||||
float2 uv1 = fragmentinput_main.uv3;
|
||||
float4 color = u_texture.Sample(u_sampler, uv1);
|
||||
float2 uv_1 = fragmentinput_main.uv_3;
|
||||
float4 color = u_texture.Sample(u_sampler, uv_1);
|
||||
if ((color.w == 0.0)) {
|
||||
discard;
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
vertex=(main:vs_5_1 )
|
||||
fragment=(main1:ps_5_1 fs_extra:ps_5_1 )
|
||||
fragment=(main_1:ps_5_1 fs_extra:ps_5_1 )
|
||||
compute=()
|
||||
|
@ -17,8 +17,8 @@ Texture2DArray<float> t_shadow : register(t2);
|
||||
SamplerComparisonState sampler_shadow : register(s3);
|
||||
|
||||
struct FragmentInput_fs_main {
|
||||
float3 raw_normal1 : LOC0;
|
||||
float4 position1 : LOC1;
|
||||
float3 raw_normal_1 : LOC0;
|
||||
float4 position_1 : LOC1;
|
||||
};
|
||||
|
||||
float fetch_shadow(uint light_id, float4 homogeneous_coords)
|
||||
@ -34,8 +34,8 @@ float fetch_shadow(uint light_id, float4 homogeneous_coords)
|
||||
|
||||
float4 fs_main(FragmentInput_fs_main fragmentinput_fs_main) : SV_Target0
|
||||
{
|
||||
float3 raw_normal = fragmentinput_fs_main.raw_normal1;
|
||||
float4 position = fragmentinput_fs_main.position1;
|
||||
float3 raw_normal = fragmentinput_fs_main.raw_normal_1;
|
||||
float4 position = fragmentinput_fs_main.position_1;
|
||||
float3 color = float3(0.05000000074505806, 0.05000000074505806, 0.05000000074505806);
|
||||
uint i = 0u;
|
||||
|
||||
|
@ -25,8 +25,8 @@ struct VertexOutput_vs_main {
|
||||
};
|
||||
|
||||
struct FragmentInput_fs_main {
|
||||
float3 uv1 : LOC0;
|
||||
float4 position1 : SV_Position;
|
||||
float3 uv_1 : LOC0;
|
||||
float4 position_1 : SV_Position;
|
||||
};
|
||||
|
||||
VertexOutput ConstructVertexOutput(float4 arg0, float3 arg1) {
|
||||
@ -38,13 +38,13 @@ VertexOutput ConstructVertexOutput(float4 arg0, float3 arg1) {
|
||||
|
||||
VertexOutput_vs_main vs_main(uint vertex_index : SV_VertexID)
|
||||
{
|
||||
int tmp1 = (int)0;
|
||||
int tmp2 = (int)0;
|
||||
int tmp1_ = (int)0;
|
||||
int tmp2_ = (int)0;
|
||||
|
||||
tmp1 = (int((_NagaConstants.base_vertex + vertex_index)) / 2);
|
||||
tmp2 = (int((_NagaConstants.base_vertex + vertex_index)) & 1);
|
||||
int _expr10 = tmp1;
|
||||
int _expr16 = tmp2;
|
||||
tmp1_ = (int((_NagaConstants.base_vertex + vertex_index)) / 2);
|
||||
tmp2_ = (int((_NagaConstants.base_vertex + vertex_index)) & 1);
|
||||
int _expr10 = tmp1_;
|
||||
int _expr16 = tmp2_;
|
||||
float4 pos = float4(((float(_expr10) * 4.0) - 1.0), ((float(_expr16) * 4.0) - 1.0), 0.0, 1.0);
|
||||
float4 _expr27 = r_data.view[0];
|
||||
float4 _expr31 = r_data.view[1];
|
||||
@ -53,13 +53,13 @@ VertexOutput_vs_main vs_main(uint vertex_index : SV_VertexID)
|
||||
float4x4 _expr40 = r_data.proj_inv;
|
||||
float4 unprojected = mul(pos, _expr40);
|
||||
const VertexOutput vertexoutput = ConstructVertexOutput(pos, mul(unprojected.xyz, inv_model_view));
|
||||
const VertexOutput_vs_main vertexoutput1 = { vertexoutput.uv, vertexoutput.position };
|
||||
return vertexoutput1;
|
||||
const VertexOutput_vs_main vertexoutput_1 = { vertexoutput.uv, vertexoutput.position };
|
||||
return vertexoutput_1;
|
||||
}
|
||||
|
||||
float4 fs_main(FragmentInput_fs_main fragmentinput_fs_main) : SV_Target0
|
||||
{
|
||||
VertexOutput in1 = { fragmentinput_fs_main.position1, fragmentinput_fs_main.uv1 };
|
||||
float4 _expr5 = r_texture.Sample(r_sampler, in1.uv);
|
||||
VertexOutput in_ = { fragmentinput_fs_main.position_1, fragmentinput_fs_main.uv_1 };
|
||||
float4 _expr5 = r_texture.Sample(r_sampler, in_.uv);
|
||||
return _expr5;
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
|
||||
struct FragmentInput_derivatives {
|
||||
float4 foo1 : SV_Position;
|
||||
float4 foo_1 : SV_Position;
|
||||
};
|
||||
|
||||
float4 derivatives(FragmentInput_derivatives fragmentinput_derivatives) : SV_Target0
|
||||
{
|
||||
float4 foo = fragmentinput_derivatives.foo1;
|
||||
float4 foo = fragmentinput_derivatives.foo_1;
|
||||
float4 x = ddx(foo);
|
||||
float4 y = ddy(foo);
|
||||
float4 z = fwidth(foo);
|
||||
|
@ -6,25 +6,25 @@ struct _mslBufferSizes {
|
||||
metal::uint size0;
|
||||
};
|
||||
|
||||
struct type3 {
|
||||
struct type_3 {
|
||||
metal::uint2 inner[2];
|
||||
};
|
||||
typedef int type5[1];
|
||||
typedef int type_5[1];
|
||||
struct Bar {
|
||||
metal::float4x4 matrix;
|
||||
metal::atomic_int atom;
|
||||
char _pad2[4];
|
||||
type3 arr;
|
||||
type5 data;
|
||||
type_3 arr;
|
||||
type_5 data;
|
||||
};
|
||||
struct type11 {
|
||||
struct type_11 {
|
||||
int inner[5];
|
||||
};
|
||||
|
||||
float read_from_private(
|
||||
thread float& foo2
|
||||
thread float& foo_2
|
||||
) {
|
||||
float _e2 = foo2;
|
||||
float _e2 = foo_2;
|
||||
return _e2;
|
||||
}
|
||||
|
||||
@ -38,20 +38,20 @@ vertex fooOutput foo(
|
||||
, device Bar& bar [[buffer(0)]]
|
||||
, constant _mslBufferSizes& _buffer_sizes [[buffer(24)]]
|
||||
) {
|
||||
float foo1 = 0.0;
|
||||
type11 c;
|
||||
float baz = foo1;
|
||||
foo1 = 1.0;
|
||||
float foo_1 = 0.0;
|
||||
type_11 c;
|
||||
float baz = foo_1;
|
||||
foo_1 = 1.0;
|
||||
metal::float4x4 matrix = bar.matrix;
|
||||
type3 arr = bar.arr;
|
||||
type_3 arr = bar.arr;
|
||||
float b = bar.matrix[3].x;
|
||||
int a = bar.data[(1 + (_buffer_sizes.size0 - 88 - 4) / 8) - 2u];
|
||||
float _e25 = read_from_private(foo1);
|
||||
float _e25 = read_from_private(foo_1);
|
||||
bar.matrix[1].z = 1.0;
|
||||
bar.matrix = metal::float4x4(metal::float4(0.0), metal::float4(1.0), metal::float4(2.0), metal::float4(3.0));
|
||||
for(int _i=0; _i<2; ++_i) bar.arr.inner[_i] = type3 {metal::uint2(0u), metal::uint2(1u)}.inner[_i];
|
||||
for(int _i=0; _i<2; ++_i) bar.arr.inner[_i] = type_3 {metal::uint2(0u), metal::uint2(1u)}.inner[_i];
|
||||
bar.data[1] = 1;
|
||||
for(int _i=0; _i<5; ++_i) c.inner[_i] = type11 {a, static_cast<int>(b), 3, 4, 5}.inner[_i];
|
||||
for(int _i=0; _i<5; ++_i) c.inner[_i] = type_11 {a, static_cast<int>(b), 3, 4, 5}.inner[_i];
|
||||
c.inner[vi + 1u] = 42;
|
||||
int value = c.inner[vi];
|
||||
return fooOutput { matrix * static_cast<metal::float4>(metal::int4(value)) };
|
||||
@ -63,7 +63,7 @@ kernel void atomics(
|
||||
, constant _mslBufferSizes& _buffer_sizes [[buffer(24)]]
|
||||
) {
|
||||
int tmp;
|
||||
int value1 = metal::atomic_load_explicit(&bar.atom, metal::memory_order_relaxed);
|
||||
int value_1 = metal::atomic_load_explicit(&bar.atom, metal::memory_order_relaxed);
|
||||
int _e6 = metal::atomic_fetch_add_explicit(&bar.atom, 5, metal::memory_order_relaxed);
|
||||
tmp = _e6;
|
||||
int _e9 = metal::atomic_fetch_sub_explicit(&bar.atom, 5, metal::memory_order_relaxed);
|
||||
@ -80,6 +80,6 @@ kernel void atomics(
|
||||
tmp = _e24;
|
||||
int _e27 = metal::atomic_exchange_explicit(&bar.atom, 5, metal::memory_order_relaxed);
|
||||
tmp = _e27;
|
||||
metal::atomic_store_explicit(&bar.atom, value1, metal::memory_order_relaxed);
|
||||
metal::atomic_store_explicit(&bar.atom, value_1, metal::memory_order_relaxed);
|
||||
return;
|
||||
}
|
||||
|
@ -3,85 +3,85 @@
|
||||
#include <simd/simd.h>
|
||||
|
||||
|
||||
kernel void main1(
|
||||
kernel void main_(
|
||||
) {
|
||||
int i = 0;
|
||||
metal::int2 i2;
|
||||
metal::int3 i3;
|
||||
metal::int4 i4;
|
||||
metal::int2 i2_;
|
||||
metal::int3 i3_;
|
||||
metal::int4 i4_;
|
||||
metal::uint u = 0u;
|
||||
metal::uint2 u2;
|
||||
metal::uint3 u3;
|
||||
metal::uint4 u4;
|
||||
metal::float2 f2;
|
||||
metal::float4 f4;
|
||||
i2 = metal::int2(0);
|
||||
i3 = metal::int3(0);
|
||||
i4 = metal::int4(0);
|
||||
u2 = metal::uint2(0u);
|
||||
u3 = metal::uint3(0u);
|
||||
u4 = metal::uint4(0u);
|
||||
f2 = metal::float2(0.0);
|
||||
f4 = metal::float4(0.0);
|
||||
metal::float4 _e28 = f4;
|
||||
metal::uint2 u2_;
|
||||
metal::uint3 u3_;
|
||||
metal::uint4 u4_;
|
||||
metal::float2 f2_;
|
||||
metal::float4 f4_;
|
||||
i2_ = metal::int2(0);
|
||||
i3_ = metal::int3(0);
|
||||
i4_ = metal::int4(0);
|
||||
u2_ = metal::uint2(0u);
|
||||
u3_ = metal::uint3(0u);
|
||||
u4_ = metal::uint4(0u);
|
||||
f2_ = metal::float2(0.0);
|
||||
f4_ = metal::float4(0.0);
|
||||
metal::float4 _e28 = f4_;
|
||||
u = metal::pack_float_to_unorm4x8(_e28);
|
||||
metal::float4 _e30 = f4;
|
||||
metal::float4 _e30 = f4_;
|
||||
u = metal::pack_float_to_snorm4x8(_e30);
|
||||
metal::float2 _e32 = f2;
|
||||
metal::float2 _e32 = f2_;
|
||||
u = metal::pack_float_to_unorm2x16(_e32);
|
||||
metal::float2 _e34 = f2;
|
||||
metal::float2 _e34 = f2_;
|
||||
u = metal::pack_float_to_snorm2x16(_e34);
|
||||
metal::float2 _e36 = f2;
|
||||
metal::float2 _e36 = f2_;
|
||||
u = as_type<uint>(half2(_e36));
|
||||
metal::uint _e38 = u;
|
||||
f4 = metal::unpack_snorm4x8_to_float(_e38);
|
||||
f4_ = metal::unpack_snorm4x8_to_float(_e38);
|
||||
metal::uint _e40 = u;
|
||||
f4 = metal::unpack_unorm4x8_to_float(_e40);
|
||||
f4_ = metal::unpack_unorm4x8_to_float(_e40);
|
||||
metal::uint _e42 = u;
|
||||
f2 = metal::unpack_snorm2x16_to_float(_e42);
|
||||
f2_ = metal::unpack_snorm2x16_to_float(_e42);
|
||||
metal::uint _e44 = u;
|
||||
f2 = metal::unpack_unorm2x16_to_float(_e44);
|
||||
f2_ = metal::unpack_unorm2x16_to_float(_e44);
|
||||
metal::uint _e46 = u;
|
||||
f2 = float2(as_type<half2>(_e46));
|
||||
f2_ = float2(as_type<half2>(_e46));
|
||||
int _e48 = i;
|
||||
int _e49 = i;
|
||||
i = metal::insert_bits(_e48, _e49, 5u, 10u);
|
||||
metal::int2 _e53 = i2;
|
||||
metal::int2 _e54 = i2;
|
||||
i2 = metal::insert_bits(_e53, _e54, 5u, 10u);
|
||||
metal::int3 _e58 = i3;
|
||||
metal::int3 _e59 = i3;
|
||||
i3 = metal::insert_bits(_e58, _e59, 5u, 10u);
|
||||
metal::int4 _e63 = i4;
|
||||
metal::int4 _e64 = i4;
|
||||
i4 = metal::insert_bits(_e63, _e64, 5u, 10u);
|
||||
metal::int2 _e53 = i2_;
|
||||
metal::int2 _e54 = i2_;
|
||||
i2_ = metal::insert_bits(_e53, _e54, 5u, 10u);
|
||||
metal::int3 _e58 = i3_;
|
||||
metal::int3 _e59 = i3_;
|
||||
i3_ = metal::insert_bits(_e58, _e59, 5u, 10u);
|
||||
metal::int4 _e63 = i4_;
|
||||
metal::int4 _e64 = i4_;
|
||||
i4_ = metal::insert_bits(_e63, _e64, 5u, 10u);
|
||||
metal::uint _e68 = u;
|
||||
metal::uint _e69 = u;
|
||||
u = metal::insert_bits(_e68, _e69, 5u, 10u);
|
||||
metal::uint2 _e73 = u2;
|
||||
metal::uint2 _e74 = u2;
|
||||
u2 = metal::insert_bits(_e73, _e74, 5u, 10u);
|
||||
metal::uint3 _e78 = u3;
|
||||
metal::uint3 _e79 = u3;
|
||||
u3 = metal::insert_bits(_e78, _e79, 5u, 10u);
|
||||
metal::uint4 _e83 = u4;
|
||||
metal::uint4 _e84 = u4;
|
||||
u4 = metal::insert_bits(_e83, _e84, 5u, 10u);
|
||||
metal::uint2 _e73 = u2_;
|
||||
metal::uint2 _e74 = u2_;
|
||||
u2_ = metal::insert_bits(_e73, _e74, 5u, 10u);
|
||||
metal::uint3 _e78 = u3_;
|
||||
metal::uint3 _e79 = u3_;
|
||||
u3_ = metal::insert_bits(_e78, _e79, 5u, 10u);
|
||||
metal::uint4 _e83 = u4_;
|
||||
metal::uint4 _e84 = u4_;
|
||||
u4_ = metal::insert_bits(_e83, _e84, 5u, 10u);
|
||||
int _e88 = i;
|
||||
i = metal::extract_bits(_e88, 5u, 10u);
|
||||
metal::int2 _e92 = i2;
|
||||
i2 = metal::extract_bits(_e92, 5u, 10u);
|
||||
metal::int3 _e96 = i3;
|
||||
i3 = metal::extract_bits(_e96, 5u, 10u);
|
||||
metal::int4 _e100 = i4;
|
||||
i4 = metal::extract_bits(_e100, 5u, 10u);
|
||||
metal::int2 _e92 = i2_;
|
||||
i2_ = metal::extract_bits(_e92, 5u, 10u);
|
||||
metal::int3 _e96 = i3_;
|
||||
i3_ = metal::extract_bits(_e96, 5u, 10u);
|
||||
metal::int4 _e100 = i4_;
|
||||
i4_ = metal::extract_bits(_e100, 5u, 10u);
|
||||
metal::uint _e104 = u;
|
||||
u = metal::extract_bits(_e104, 5u, 10u);
|
||||
metal::uint2 _e108 = u2;
|
||||
u2 = metal::extract_bits(_e108, 5u, 10u);
|
||||
metal::uint3 _e112 = u3;
|
||||
u3 = metal::extract_bits(_e112, 5u, 10u);
|
||||
metal::uint4 _e116 = u4;
|
||||
u4 = metal::extract_bits(_e116, 5u, 10u);
|
||||
metal::uint2 _e108 = u2_;
|
||||
u2_ = metal::extract_bits(_e108, 5u, 10u);
|
||||
metal::uint3 _e112 = u3_;
|
||||
u3_ = metal::extract_bits(_e112, 5u, 10u);
|
||||
metal::uint4 _e116 = u4_;
|
||||
u4_ = metal::extract_bits(_e116, 5u, 10u);
|
||||
return;
|
||||
}
|
||||
|
@ -21,14 +21,14 @@ struct SimParams {
|
||||
float rule2Scale;
|
||||
float rule3Scale;
|
||||
};
|
||||
typedef Particle type3[1];
|
||||
typedef Particle type_3[1];
|
||||
struct Particles {
|
||||
type3 particles;
|
||||
type_3 particles;
|
||||
};
|
||||
|
||||
struct main1Input {
|
||||
struct main_Input {
|
||||
};
|
||||
kernel void main1(
|
||||
kernel void main_(
|
||||
metal::uint3 global_invocation_id [[thread_position_in_grid]]
|
||||
, constant SimParams& params [[buffer(0)]]
|
||||
, constant Particles& particlesSrc [[buffer(1)]]
|
||||
|
@ -6,9 +6,9 @@ struct _mslBufferSizes {
|
||||
metal::uint size0;
|
||||
};
|
||||
|
||||
typedef metal::uint type1[1];
|
||||
typedef metal::uint type_1[1];
|
||||
struct PrimeIndices {
|
||||
type1 data;
|
||||
type_1 data;
|
||||
};
|
||||
|
||||
metal::uint collatz_iterations(
|
||||
@ -37,9 +37,9 @@ metal::uint collatz_iterations(
|
||||
return _e24;
|
||||
}
|
||||
|
||||
struct main1Input {
|
||||
struct main_Input {
|
||||
};
|
||||
kernel void main1(
|
||||
kernel void main_(
|
||||
metal::uint3 global_id [[thread_position_in_grid]]
|
||||
, device PrimeIndices& v_indices [[user(fake0)]]
|
||||
) {
|
||||
|
@ -36,9 +36,9 @@ void loop_switch_continue(
|
||||
return;
|
||||
}
|
||||
|
||||
struct main1Input {
|
||||
struct main_Input {
|
||||
};
|
||||
kernel void main1(
|
||||
kernel void main_(
|
||||
metal::uint3 global_id [[thread_position_in_grid]]
|
||||
) {
|
||||
int pos;
|
||||
|
@ -2,20 +2,20 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
struct type1 {
|
||||
struct type_1 {
|
||||
int member;
|
||||
};
|
||||
|
||||
void function(
|
||||
device type1& global
|
||||
device type_1& unnamed
|
||||
) {
|
||||
int _e8 = global.member;
|
||||
global.member = _e8 + 1;
|
||||
int _e8 = unnamed.member;
|
||||
unnamed.member = _e8 + 1;
|
||||
return;
|
||||
}
|
||||
|
||||
kernel void main1(
|
||||
device type1& global [[user(fake0)]]
|
||||
kernel void main_(
|
||||
device type_1& unnamed [[user(fake0)]]
|
||||
) {
|
||||
function(global);
|
||||
function(unnamed);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <simd/simd.h>
|
||||
|
||||
|
||||
kernel void main1(
|
||||
kernel void main_(
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
@ -5,27 +5,27 @@
|
||||
struct PushConstants {
|
||||
metal::uint index;
|
||||
char _pad1[12];
|
||||
metal::float2 double1;
|
||||
metal::float2 double_;
|
||||
};
|
||||
struct FragmentIn {
|
||||
metal::float4 color;
|
||||
metal::uint primitive_index;
|
||||
};
|
||||
|
||||
struct main1Input {
|
||||
struct main_Input {
|
||||
metal::float4 color [[user(loc0), center_perspective]];
|
||||
};
|
||||
struct main1Output {
|
||||
struct main_Output {
|
||||
metal::float4 member [[color(0)]];
|
||||
};
|
||||
fragment main1Output main1(
|
||||
main1Input varyings [[stage_in]]
|
||||
fragment main_Output main_(
|
||||
main_Input varyings [[stage_in]]
|
||||
, metal::uint primitive_index [[primitive_id]]
|
||||
) {
|
||||
const FragmentIn in = { varyings.color, primitive_index };
|
||||
if ((in.primitive_index % 2u) == 0u) {
|
||||
return main1Output { in.color };
|
||||
return main_Output { in.color };
|
||||
} else {
|
||||
return main1Output { metal::float4(metal::float3(1.0) - in.color.xyz, in.color.w) };
|
||||
return main_Output { metal::float4(metal::float3(1.0) - in.color.xyz, in.color.w) };
|
||||
}
|
||||
}
|
||||
|
@ -3,12 +3,12 @@
|
||||
#include <simd/simd.h>
|
||||
|
||||
constexpr constant bool Foo = true;
|
||||
struct type2 {
|
||||
struct type_2 {
|
||||
float inner[10u];
|
||||
};
|
||||
|
||||
kernel void main1(
|
||||
threadgroup type2& wg
|
||||
kernel void main_(
|
||||
threadgroup type_2& wg
|
||||
, threadgroup metal::atomic_uint& at
|
||||
) {
|
||||
wg.inner[3] = 1.0;
|
||||
|
@ -2,11 +2,11 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
constant metal::int2 const_type8 = {3, 1};
|
||||
constant metal::int2 const_type_8_ = {3, 1};
|
||||
|
||||
struct main1Input {
|
||||
struct main_Input {
|
||||
};
|
||||
kernel void main1(
|
||||
kernel void main_(
|
||||
metal::uint3 local_id [[thread_position_in_threadgroup]]
|
||||
, metal::texture2d<uint, metal::access::sample> image_mipmapped_src [[user(fake0)]]
|
||||
, metal::texture2d_ms<uint, metal::access::read> image_multisampled_src [[user(fake0)]]
|
||||
@ -16,11 +16,11 @@ kernel void main1(
|
||||
) {
|
||||
metal::int2 dim = int2(image_storage_src.get_width(), image_storage_src.get_height());
|
||||
metal::int2 itc = (dim * static_cast<metal::int2>(local_id.xy)) % metal::int2(10, 20);
|
||||
metal::uint4 value1 = image_mipmapped_src.read(metal::uint2(itc), static_cast<int>(local_id.z));
|
||||
metal::uint4 value2 = image_multisampled_src.read(metal::uint2(itc), static_cast<int>(local_id.z));
|
||||
metal::uint4 value4 = image_storage_src.read(metal::uint2(itc));
|
||||
metal::uint4 value5 = image_array_src.read(metal::uint2(itc), static_cast<int>(local_id.z), static_cast<int>(local_id.z) + 1);
|
||||
image_dst.write(((value1 + value2) + value4) + value5, metal::uint(itc.x));
|
||||
metal::uint4 value1_ = image_mipmapped_src.read(metal::uint2(itc), static_cast<int>(local_id.z));
|
||||
metal::uint4 value2_ = image_multisampled_src.read(metal::uint2(itc), static_cast<int>(local_id.z));
|
||||
metal::uint4 value4_ = image_storage_src.read(metal::uint2(itc));
|
||||
metal::uint4 value5_ = image_array_src.read(metal::uint2(itc), static_cast<int>(local_id.z), static_cast<int>(local_id.z) + 1);
|
||||
image_dst.write(((value1_ + value2_) + value4_) + value5_, metal::uint(itc.x));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -28,21 +28,21 @@ kernel void main1(
|
||||
struct depth_loadInput {
|
||||
};
|
||||
kernel void depth_load(
|
||||
metal::uint3 local_id1 [[thread_position_in_threadgroup]]
|
||||
metal::uint3 local_id_1 [[thread_position_in_threadgroup]]
|
||||
, metal::depth2d_ms<float, metal::access::read> image_depth_multisampled_src [[user(fake0)]]
|
||||
, metal::texture2d<uint, metal::access::read> image_storage_src [[user(fake0)]]
|
||||
, metal::texture1d<uint, metal::access::write> image_dst [[user(fake0)]]
|
||||
) {
|
||||
metal::int2 dim1 = int2(image_storage_src.get_width(), image_storage_src.get_height());
|
||||
metal::int2 itc1 = (dim1 * static_cast<metal::int2>(local_id1.xy)) % metal::int2(10, 20);
|
||||
float val = image_depth_multisampled_src.read(metal::uint2(itc1), static_cast<int>(local_id1.z));
|
||||
image_dst.write(metal::uint4(static_cast<uint>(val)), metal::uint(itc1.x));
|
||||
metal::int2 dim_1 = int2(image_storage_src.get_width(), image_storage_src.get_height());
|
||||
metal::int2 itc_1 = (dim_1 * static_cast<metal::int2>(local_id_1.xy)) % metal::int2(10, 20);
|
||||
float val = image_depth_multisampled_src.read(metal::uint2(itc_1), static_cast<int>(local_id_1.z));
|
||||
image_dst.write(metal::uint4(static_cast<uint>(val)), metal::uint(itc_1.x));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
struct queriesOutput {
|
||||
metal::float4 member2 [[position]];
|
||||
metal::float4 member_2 [[position]];
|
||||
};
|
||||
vertex queriesOutput queries(
|
||||
metal::texture1d<float, metal::access::sample> image_1d [[user(fake0)]]
|
||||
@ -69,7 +69,7 @@ vertex queriesOutput queries(
|
||||
|
||||
|
||||
struct levels_queriesOutput {
|
||||
metal::float4 member3 [[position]];
|
||||
metal::float4 member_3 [[position]];
|
||||
};
|
||||
vertex levels_queriesOutput levels_queries(
|
||||
metal::texture2d<float, metal::access::sample> image_2d [[user(fake0)]]
|
||||
@ -87,13 +87,13 @@ vertex levels_queriesOutput levels_queries(
|
||||
int num_layers_cube = int(image_cube_array.get_array_size());
|
||||
int num_levels_3d = int(image_3d.get_num_mip_levels());
|
||||
int num_samples_aa = int(image_aa.get_num_samples());
|
||||
int sum1 = ((((((num_layers_2d + num_layers_cube) + num_samples_aa) + num_levels_2d) + num_levels_2d_array) + num_levels_3d) + num_levels_cube) + num_levels_cube_array;
|
||||
return levels_queriesOutput { metal::float4(static_cast<float>(sum1)) };
|
||||
int sum_1 = ((((((num_layers_2d + num_layers_cube) + num_samples_aa) + num_levels_2d) + num_levels_2d_array) + num_levels_3d) + num_levels_cube) + num_levels_cube_array;
|
||||
return levels_queriesOutput { metal::float4(static_cast<float>(sum_1)) };
|
||||
}
|
||||
|
||||
|
||||
struct sampleOutput {
|
||||
metal::float4 member4 [[color(0)]];
|
||||
metal::float4 member_4 [[color(0)]];
|
||||
};
|
||||
fragment sampleOutput sample(
|
||||
metal::texture1d<float, metal::access::sample> image_1d [[user(fake0)]]
|
||||
@ -103,22 +103,22 @@ fragment sampleOutput sample(
|
||||
metal::float2 tc = metal::float2(0.5);
|
||||
metal::float4 s1d = image_1d.sample(sampler_reg, tc.x);
|
||||
metal::float4 s2d = image_2d.sample(sampler_reg, tc);
|
||||
metal::float4 s2d_offset = image_2d.sample(sampler_reg, tc, const_type8);
|
||||
metal::float4 s2d_offset = image_2d.sample(sampler_reg, tc, const_type_8_);
|
||||
metal::float4 s2d_level = image_2d.sample(sampler_reg, tc, metal::level(2.299999952316284));
|
||||
metal::float4 s2d_level_offset = image_2d.sample(sampler_reg, tc, metal::level(2.299999952316284), const_type8);
|
||||
metal::float4 s2d_level_offset = image_2d.sample(sampler_reg, tc, metal::level(2.299999952316284), const_type_8_);
|
||||
return sampleOutput { (((s1d + s2d) + s2d_offset) + s2d_level) + s2d_level_offset };
|
||||
}
|
||||
|
||||
|
||||
struct sample_comparisonOutput {
|
||||
float member5 [[color(0)]];
|
||||
float member_5 [[color(0)]];
|
||||
};
|
||||
fragment sample_comparisonOutput sample_comparison(
|
||||
metal::sampler sampler_cmp [[user(fake0)]]
|
||||
, metal::depth2d<float, metal::access::sample> image_2d_depth [[user(fake0)]]
|
||||
) {
|
||||
metal::float2 tc1 = metal::float2(0.5);
|
||||
float s2d_depth = image_2d_depth.sample_compare(sampler_cmp, tc1, 0.5);
|
||||
float s2d_depth_level = image_2d_depth.sample_compare(sampler_cmp, tc1, 0.5);
|
||||
metal::float2 tc_1 = metal::float2(0.5);
|
||||
float s2d_depth = image_2d_depth.sample_compare(sampler_cmp, tc_1, 0.5);
|
||||
float s2d_depth_level = image_2d_depth.sample_compare(sampler_cmp, tc_1, 0.5);
|
||||
return sample_comparisonOutput { s2d_depth + s2d_depth_level };
|
||||
}
|
||||
|
@ -11,61 +11,61 @@ struct FragmentOutput {
|
||||
metal::uint sample_mask;
|
||||
float color;
|
||||
};
|
||||
struct type4 {
|
||||
struct type_4 {
|
||||
metal::uint inner[1];
|
||||
};
|
||||
|
||||
struct vertex1Input {
|
||||
struct vertex_Input {
|
||||
metal::uint color [[attribute(10)]];
|
||||
};
|
||||
struct vertex1Output {
|
||||
struct vertex_Output {
|
||||
metal::float4 position [[position]];
|
||||
float varying [[user(loc1), center_perspective]];
|
||||
};
|
||||
vertex vertex1Output vertex1(
|
||||
vertex1Input varyings [[stage_in]]
|
||||
vertex vertex_Output vertex_(
|
||||
vertex_Input varyings [[stage_in]]
|
||||
, metal::uint vertex_index [[vertex_id]]
|
||||
, metal::uint instance_index [[instance_id]]
|
||||
) {
|
||||
const auto color = varyings.color;
|
||||
metal::uint tmp = (vertex_index + instance_index) + color;
|
||||
const auto _tmp = VertexOutput {metal::float4(1.0), static_cast<float>(tmp)};
|
||||
return vertex1Output { _tmp.position, _tmp.varying };
|
||||
return vertex_Output { _tmp.position, _tmp.varying };
|
||||
}
|
||||
|
||||
|
||||
struct fragment1Input {
|
||||
struct fragment_Input {
|
||||
float varying [[user(loc1), center_perspective]];
|
||||
};
|
||||
struct fragment1Output {
|
||||
struct fragment_Output {
|
||||
float depth [[depth(any)]];
|
||||
metal::uint sample_mask [[sample_mask]];
|
||||
float color [[color(0)]];
|
||||
};
|
||||
fragment fragment1Output fragment1(
|
||||
fragment1Input varyings1 [[stage_in]]
|
||||
fragment fragment_Output fragment_(
|
||||
fragment_Input varyings_1 [[stage_in]]
|
||||
, metal::float4 position [[position]]
|
||||
, bool front_facing [[front_facing]]
|
||||
, metal::uint sample_index [[sample_id]]
|
||||
, metal::uint sample_mask [[sample_mask]]
|
||||
) {
|
||||
const VertexOutput in = { position, varyings1.varying };
|
||||
const VertexOutput in = { position, varyings_1.varying };
|
||||
metal::uint mask = sample_mask & (1u << sample_index);
|
||||
float color1 = front_facing ? 1.0 : 0.0;
|
||||
const auto _tmp = FragmentOutput {in.varying, mask, color1};
|
||||
return fragment1Output { _tmp.depth, _tmp.sample_mask, _tmp.color };
|
||||
float color_1 = front_facing ? 1.0 : 0.0;
|
||||
const auto _tmp = FragmentOutput {in.varying, mask, color_1};
|
||||
return fragment_Output { _tmp.depth, _tmp.sample_mask, _tmp.color };
|
||||
}
|
||||
|
||||
|
||||
struct compute1Input {
|
||||
struct compute_Input {
|
||||
};
|
||||
kernel void compute1(
|
||||
kernel void compute_(
|
||||
metal::uint3 global_id [[thread_position_in_grid]]
|
||||
, metal::uint3 local_id [[thread_position_in_threadgroup]]
|
||||
, metal::uint local_index [[thread_index_in_threadgroup]]
|
||||
, metal::uint3 wg_id [[threadgroup_position_in_grid]]
|
||||
, metal::uint3 num_wgs [[threadgroups_per_grid]]
|
||||
, threadgroup type4& output
|
||||
, threadgroup type_4& output
|
||||
) {
|
||||
output.inner[0] = (((global_id.x + local_id.x) + local_index) + wg_id.x) + num_wgs.x;
|
||||
return;
|
||||
|
@ -13,7 +13,7 @@ struct FragmentInput {
|
||||
float perspective_sample;
|
||||
};
|
||||
|
||||
struct main1Output {
|
||||
struct main_Output {
|
||||
metal::float4 position [[position]];
|
||||
metal::uint flat [[user(loc0), flat]];
|
||||
float linear [[user(loc1), center_no_perspective]];
|
||||
@ -23,7 +23,7 @@ struct main1Output {
|
||||
float perspective_centroid [[user(loc5), centroid_perspective]];
|
||||
float perspective_sample [[user(loc6), sample_perspective]];
|
||||
};
|
||||
vertex main1Output main1(
|
||||
vertex main_Output main_(
|
||||
) {
|
||||
FragmentInput out;
|
||||
out.position = metal::float4(2.0, 4.0, 5.0, 6.0);
|
||||
@ -36,11 +36,11 @@ vertex main1Output main1(
|
||||
out.perspective_sample = 2744.0;
|
||||
FragmentInput _e30 = out;
|
||||
const auto _tmp = _e30;
|
||||
return main1Output { _tmp.position, _tmp.flat, _tmp.linear, _tmp.linear_centroid, _tmp.linear_sample, _tmp.perspective, _tmp.perspective_centroid, _tmp.perspective_sample };
|
||||
return main_Output { _tmp.position, _tmp.flat, _tmp.linear, _tmp.linear_centroid, _tmp.linear_sample, _tmp.perspective, _tmp.perspective_centroid, _tmp.perspective_sample };
|
||||
}
|
||||
|
||||
|
||||
struct main2Input {
|
||||
struct main_1Input {
|
||||
metal::uint flat [[user(loc0), flat]];
|
||||
float linear [[user(loc1), center_no_perspective]];
|
||||
metal::float2 linear_centroid [[user(loc2), centroid_no_perspective]];
|
||||
@ -49,10 +49,10 @@ struct main2Input {
|
||||
float perspective_centroid [[user(loc5), centroid_perspective]];
|
||||
float perspective_sample [[user(loc6), sample_perspective]];
|
||||
};
|
||||
fragment void main2(
|
||||
main2Input varyings1 [[stage_in]]
|
||||
fragment void main_1(
|
||||
main_1Input varyings_1 [[stage_in]]
|
||||
, metal::float4 position [[position]]
|
||||
) {
|
||||
const FragmentInput val = { position, varyings1.flat, varyings1.linear, varyings1.linear_centroid, varyings1.linear_sample, varyings1.perspective, varyings1.perspective_centroid, varyings1.perspective_sample };
|
||||
const FragmentInput val = { position, varyings_1.flat, varyings_1.linear, varyings_1.linear_centroid, varyings_1.linear_sample, varyings_1.perspective, varyings_1.perspective_centroid, varyings_1.perspective_sample };
|
||||
return;
|
||||
}
|
||||
|
@ -13,15 +13,15 @@ constant metal::int4 v_i32_one = {1, 1, 1, 1};
|
||||
|
||||
metal::float4 builtins(
|
||||
) {
|
||||
int s1 = true ? 1 : 0;
|
||||
metal::float4 s2 = true ? v_f32_one : v_f32_zero;
|
||||
metal::float4 s3 = metal::select(v_f32_one, v_f32_zero, metal::bool4(false, false, false, false));
|
||||
metal::float4 m1 = metal::mix(v_f32_zero, v_f32_one, v_f32_half);
|
||||
metal::float4 m2 = metal::mix(v_f32_zero, v_f32_one, 0.10000000149011612);
|
||||
float b1 = as_type<float>(v_i32_one.x);
|
||||
metal::float4 b2 = as_type<metal::float4>(v_i32_one);
|
||||
int s1_ = true ? 1 : 0;
|
||||
metal::float4 s2_ = true ? v_f32_one : v_f32_zero;
|
||||
metal::float4 s3_ = metal::select(v_f32_one, v_f32_zero, metal::bool4(false, false, false, false));
|
||||
metal::float4 m1_ = metal::mix(v_f32_zero, v_f32_one, v_f32_half);
|
||||
metal::float4 m2_ = metal::mix(v_f32_zero, v_f32_one, 0.10000000149011612);
|
||||
float b1_ = as_type<float>(v_i32_one.x);
|
||||
metal::float4 b2_ = as_type<metal::float4>(v_i32_one);
|
||||
metal::int4 v_i32_zero = static_cast<metal::int4>(v_f32_zero);
|
||||
return ((((static_cast<metal::float4>(metal::int4(s1) + v_i32_zero) + s2) + m1) + m2) + metal::float4(b1)) + b2;
|
||||
return ((((static_cast<metal::float4>(metal::int4(s1_) + v_i32_zero) + s2_) + m1_) + m2_) + metal::float4(b1_)) + b2_;
|
||||
}
|
||||
|
||||
metal::float4 splat(
|
||||
@ -57,13 +57,13 @@ float constructors(
|
||||
|
||||
void modulo(
|
||||
) {
|
||||
int a1 = 1 % 1;
|
||||
float b1 = metal::fmod(1.0, 1.0);
|
||||
int a_1 = 1 % 1;
|
||||
float b_1 = metal::fmod(1.0, 1.0);
|
||||
metal::int3 c = metal::int3(1) % metal::int3(1);
|
||||
metal::float3 d = metal::fmod(metal::float3(1.0), metal::float3(1.0));
|
||||
}
|
||||
|
||||
kernel void main1(
|
||||
kernel void main_(
|
||||
) {
|
||||
metal::float4 _e4 = builtins();
|
||||
metal::float4 _e5 = splat();
|
||||
|
@ -2,58 +2,58 @@
|
||||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
struct type5 {
|
||||
struct type_5 {
|
||||
float inner[1u];
|
||||
};
|
||||
struct gl_PerVertex {
|
||||
metal::float4 gl_Position;
|
||||
float gl_PointSize;
|
||||
type5 gl_ClipDistance;
|
||||
type5 gl_CullDistance;
|
||||
type_5 gl_ClipDistance;
|
||||
type_5 gl_CullDistance;
|
||||
};
|
||||
struct type9 {
|
||||
struct type_9 {
|
||||
metal::float2 member;
|
||||
metal::float4 gl_Position;
|
||||
};
|
||||
constant metal::float4 const_type3 = {0.0, 0.0, 0.0, 1.0};
|
||||
constant type5 const_type5 = {0.0};
|
||||
constant gl_PerVertex const_gl_PerVertex = {const_type3, 1.0, const_type5, const_type5};
|
||||
constant metal::float4 const_type_3_ = {0.0, 0.0, 0.0, 1.0};
|
||||
constant type_5 const_type_5_ = {0.0};
|
||||
constant gl_PerVertex const_gl_PerVertex = {const_type_3_, 1.0, const_type_5_, const_type_5_};
|
||||
|
||||
void main2(
|
||||
void main_1(
|
||||
thread metal::float2& v_uv,
|
||||
thread metal::float2 const& a_uv1,
|
||||
thread metal::float2 const& a_uv_1,
|
||||
thread gl_PerVertex& perVertexStruct,
|
||||
thread metal::float2 const& a_pos1
|
||||
thread metal::float2 const& a_pos_1
|
||||
) {
|
||||
metal::float2 _e12 = a_uv1;
|
||||
metal::float2 _e12 = a_uv_1;
|
||||
v_uv = _e12;
|
||||
metal::float2 _e13 = a_pos1;
|
||||
metal::float2 _e13 = a_pos_1;
|
||||
perVertexStruct.gl_Position = metal::float4(_e13.x, _e13.y, 0.0, 1.0);
|
||||
return;
|
||||
}
|
||||
|
||||
struct main1Input {
|
||||
struct main_Input {
|
||||
metal::float2 a_uv [[attribute(1)]];
|
||||
metal::float2 a_pos [[attribute(0)]];
|
||||
};
|
||||
struct main1Output {
|
||||
struct main_Output {
|
||||
metal::float2 member [[user(loc0), center_perspective]];
|
||||
metal::float4 gl_Position [[position]];
|
||||
};
|
||||
vertex main1Output main1(
|
||||
main1Input varyings [[stage_in]]
|
||||
vertex main_Output main_(
|
||||
main_Input varyings [[stage_in]]
|
||||
) {
|
||||
metal::float2 v_uv = {};
|
||||
metal::float2 a_uv1 = {};
|
||||
metal::float2 a_uv_1 = {};
|
||||
gl_PerVertex perVertexStruct = const_gl_PerVertex;
|
||||
metal::float2 a_pos1 = {};
|
||||
metal::float2 a_pos_1 = {};
|
||||
const auto a_uv = varyings.a_uv;
|
||||
const auto a_pos = varyings.a_pos;
|
||||
a_uv1 = a_uv;
|
||||
a_pos1 = a_pos;
|
||||
main2(v_uv, a_uv1, perVertexStruct, a_pos1);
|
||||
a_uv_1 = a_uv;
|
||||
a_pos_1 = a_pos;
|
||||
main_1(v_uv, a_uv_1, perVertexStruct, a_pos_1);
|
||||
metal::float2 _e7 = v_uv;
|
||||
metal::float4 _e8 = perVertexStruct.gl_Position;
|
||||
const auto _tmp = type9 {_e7, _e8};
|
||||
return main1Output { _tmp.member, _tmp.gl_Position };
|
||||
const auto _tmp = type_9 {_e7, _e8};
|
||||
return main_Output { _tmp.member, _tmp.gl_Position };
|
||||
}
|
||||
|
@ -8,47 +8,47 @@ struct VertexOutput {
|
||||
metal::float4 position;
|
||||
};
|
||||
|
||||
struct main1Input {
|
||||
struct main_Input {
|
||||
metal::float2 pos [[attribute(0)]];
|
||||
metal::float2 uv [[attribute(1)]];
|
||||
};
|
||||
struct main1Output {
|
||||
struct main_Output {
|
||||
metal::float2 uv [[user(loc0), center_perspective]];
|
||||
metal::float4 position [[position]];
|
||||
};
|
||||
vertex main1Output main1(
|
||||
main1Input varyings [[stage_in]]
|
||||
vertex main_Output main_(
|
||||
main_Input varyings [[stage_in]]
|
||||
) {
|
||||
const auto pos = varyings.pos;
|
||||
const auto uv = varyings.uv;
|
||||
const auto _tmp = VertexOutput {uv, metal::float4(c_scale * pos, 0.0, 1.0)};
|
||||
return main1Output { _tmp.uv, _tmp.position };
|
||||
return main_Output { _tmp.uv, _tmp.position };
|
||||
}
|
||||
|
||||
|
||||
struct main2Input {
|
||||
metal::float2 uv1 [[user(loc0), center_perspective]];
|
||||
struct main_1Input {
|
||||
metal::float2 uv_1 [[user(loc0), center_perspective]];
|
||||
};
|
||||
struct main2Output {
|
||||
metal::float4 member1 [[color(0)]];
|
||||
struct main_1Output {
|
||||
metal::float4 member_1 [[color(0)]];
|
||||
};
|
||||
fragment main2Output main2(
|
||||
main2Input varyings1 [[stage_in]]
|
||||
fragment main_1Output main_1(
|
||||
main_1Input varyings_1 [[stage_in]]
|
||||
, metal::texture2d<float, metal::access::sample> u_texture [[user(fake0)]]
|
||||
, metal::sampler u_sampler [[user(fake0)]]
|
||||
) {
|
||||
const auto uv1 = varyings1.uv1;
|
||||
metal::float4 color = u_texture.sample(u_sampler, uv1);
|
||||
const auto uv_1 = varyings_1.uv_1;
|
||||
metal::float4 color = u_texture.sample(u_sampler, uv_1);
|
||||
if (color.w == 0.0) {
|
||||
metal::discard_fragment();
|
||||
}
|
||||
metal::float4 premultiplied = color.w * color;
|
||||
return main2Output { premultiplied };
|
||||
return main_1Output { premultiplied };
|
||||
}
|
||||
|
||||
|
||||
struct fs_extraOutput {
|
||||
metal::float4 member2 [[color(0)]];
|
||||
metal::float4 member_2 [[color(0)]];
|
||||
};
|
||||
fragment fs_extraOutput fs_extra(
|
||||
) {
|
||||
|
@ -15,9 +15,9 @@ struct Light {
|
||||
metal::float4 pos;
|
||||
metal::float4 color;
|
||||
};
|
||||
typedef Light type3[1];
|
||||
typedef Light type_3[1];
|
||||
struct Lights {
|
||||
type3 data;
|
||||
type_3 data;
|
||||
};
|
||||
constant metal::float3 c_ambient = {0.05000000074505806, 0.05000000074505806, 0.05000000074505806};
|
||||
|
||||
|
@ -21,12 +21,12 @@ vertex vs_mainOutput vs_main(
|
||||
metal::uint vertex_index [[vertex_id]]
|
||||
, constant Data& r_data [[buffer(0)]]
|
||||
) {
|
||||
int tmp1;
|
||||
int tmp2;
|
||||
tmp1 = static_cast<int>(vertex_index) / 2;
|
||||
tmp2 = static_cast<int>(vertex_index) & 1;
|
||||
int _e10 = tmp1;
|
||||
int _e16 = tmp2;
|
||||
int tmp1_;
|
||||
int tmp2_;
|
||||
tmp1_ = static_cast<int>(vertex_index) / 2;
|
||||
tmp2_ = static_cast<int>(vertex_index) & 1;
|
||||
int _e10 = tmp1_;
|
||||
int _e16 = tmp2_;
|
||||
metal::float4 pos = metal::float4((static_cast<float>(_e10) * 4.0) - 1.0, (static_cast<float>(_e16) * 4.0) - 1.0, 0.0, 1.0);
|
||||
metal::float4 _e27 = r_data.view[0];
|
||||
metal::float4 _e31 = r_data.view[1];
|
||||
@ -43,10 +43,10 @@ struct fs_mainInput {
|
||||
metal::float3 uv [[user(loc0), center_perspective]];
|
||||
};
|
||||
struct fs_mainOutput {
|
||||
metal::float4 member1 [[color(0)]];
|
||||
metal::float4 member_1 [[color(0)]];
|
||||
};
|
||||
fragment fs_mainOutput fs_main(
|
||||
fs_mainInput varyings1 [[stage_in]]
|
||||
fs_mainInput varyings_1 [[stage_in]]
|
||||
, metal::float4 position [[position]]
|
||||
, metal::texturecube<float, metal::access::sample> r_texture [[texture(0)]]
|
||||
) {
|
||||
@ -58,7 +58,7 @@ fragment fs_mainOutput fs_main(
|
||||
metal::min_filter::linear,
|
||||
metal::coord::normalized
|
||||
);
|
||||
const VertexOutput in = { position, varyings1.uv };
|
||||
const VertexOutput in = { position, varyings_1.uv };
|
||||
metal::float4 _e5 = r_texture.sample(r_sampler, in.uv);
|
||||
return fs_mainOutput { _e5 };
|
||||
}
|
||||
|
@ -11,13 +11,13 @@ metal::float4 test(
|
||||
return _e7;
|
||||
}
|
||||
|
||||
struct main1Output {
|
||||
struct main_Output {
|
||||
metal::float4 member [[color(0)]];
|
||||
};
|
||||
fragment main1Output main1(
|
||||
fragment main_Output main_(
|
||||
metal::texture2d<float, metal::access::sample> Texture [[user(fake0)]]
|
||||
, metal::sampler Sampler [[user(fake0)]]
|
||||
) {
|
||||
metal::float4 _e2 = test(Texture, Sampler);
|
||||
return main1Output { _e2 };
|
||||
return main_Output { _e2 };
|
||||
}
|
||||
|
@ -7,12 +7,12 @@ struct FragmentOutput {
|
||||
[[location(0)]] o_Target: vec4<f32>;
|
||||
};
|
||||
|
||||
var<private> v_Uv1: vec2<f32>;
|
||||
var<private> v_Uv_1: vec2<f32>;
|
||||
var<private> o_Target: vec4<f32>;
|
||||
[[group(1), binding(0)]]
|
||||
var<uniform> global: ColorMaterial_color;
|
||||
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var color: vec4<f32>;
|
||||
|
||||
let e4: vec4<f32> = global.Color;
|
||||
@ -24,8 +24,8 @@ fn main1() {
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main([[location(0)]] v_Uv: vec2<f32>) -> FragmentOutput {
|
||||
v_Uv1 = v_Uv;
|
||||
main1();
|
||||
v_Uv_1 = v_Uv;
|
||||
main_1();
|
||||
let e9: vec4<f32> = o_Target;
|
||||
return FragmentOutput(e9);
|
||||
}
|
||||
|
@ -18,28 +18,28 @@ struct VertexOutput {
|
||||
[[builtin(position)]] member: vec4<f32>;
|
||||
};
|
||||
|
||||
var<private> Vertex_Position1: vec3<f32>;
|
||||
var<private> Vertex_Normal1: vec3<f32>;
|
||||
var<private> Vertex_Uv1: vec2<f32>;
|
||||
var<private> Vertex_Position_1: vec3<f32>;
|
||||
var<private> Vertex_Normal_1: vec3<f32>;
|
||||
var<private> Vertex_Uv_1: vec2<f32>;
|
||||
var<private> v_Uv: vec2<f32>;
|
||||
[[group(0), binding(0)]]
|
||||
var<uniform> global: Camera;
|
||||
[[group(2), binding(0)]]
|
||||
var<uniform> global1: Transform;
|
||||
var<uniform> global_1: Transform;
|
||||
[[group(2), binding(1)]]
|
||||
var<uniform> global2: Sprite_size;
|
||||
var<uniform> global_2: Sprite_size;
|
||||
var<private> gl_Position: vec4<f32>;
|
||||
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var position: vec3<f32>;
|
||||
|
||||
let e10: vec2<f32> = Vertex_Uv1;
|
||||
let e10: vec2<f32> = Vertex_Uv_1;
|
||||
v_Uv = e10;
|
||||
let e11: vec3<f32> = Vertex_Position1;
|
||||
let e12: vec2<f32> = global2.size;
|
||||
let e11: vec3<f32> = Vertex_Position_1;
|
||||
let e12: vec2<f32> = global_2.size;
|
||||
position = (e11 * vec3<f32>(e12, 1.0));
|
||||
let e18: mat4x4<f32> = global.ViewProj;
|
||||
let e19: mat4x4<f32> = global1.Model;
|
||||
let e19: mat4x4<f32> = global_1.Model;
|
||||
let e21: vec3<f32> = position;
|
||||
gl_Position = ((e18 * e19) * vec4<f32>(e21, 1.0));
|
||||
return;
|
||||
@ -47,10 +47,10 @@ fn main1() {
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main([[location(0)]] Vertex_Position: vec3<f32>, [[location(1)]] Vertex_Normal: vec3<f32>, [[location(2)]] Vertex_Uv: vec2<f32>) -> VertexOutput {
|
||||
Vertex_Position1 = Vertex_Position;
|
||||
Vertex_Normal1 = Vertex_Normal;
|
||||
Vertex_Uv1 = Vertex_Uv;
|
||||
main1();
|
||||
Vertex_Position_1 = Vertex_Position;
|
||||
Vertex_Normal_1 = Vertex_Normal;
|
||||
Vertex_Uv_1 = Vertex_Uv;
|
||||
main_1();
|
||||
let e21: vec2<f32> = v_Uv;
|
||||
let e23: vec4<f32> = gl_Position;
|
||||
return VertexOutput(e21, e23);
|
||||
|
@ -15,29 +15,29 @@ struct VertexOutput {
|
||||
[[builtin(position)]] member: vec4<f32>;
|
||||
};
|
||||
|
||||
var<private> Vertex_Position1: vec3<f32>;
|
||||
var<private> Vertex_Normal1: vec3<f32>;
|
||||
var<private> Vertex_Uv1: vec2<f32>;
|
||||
var<private> Vertex_Position_1: vec3<f32>;
|
||||
var<private> Vertex_Normal_1: vec3<f32>;
|
||||
var<private> Vertex_Uv_1: vec2<f32>;
|
||||
var<private> v_Position: vec3<f32>;
|
||||
var<private> v_Normal: vec3<f32>;
|
||||
var<private> v_Uv: vec2<f32>;
|
||||
[[group(0), binding(0)]]
|
||||
var<uniform> global: Camera;
|
||||
[[group(2), binding(0)]]
|
||||
var<uniform> global1: Transform;
|
||||
var<uniform> global_1: Transform;
|
||||
var<private> gl_Position: vec4<f32>;
|
||||
|
||||
fn main1() {
|
||||
let e10: mat4x4<f32> = global1.Model;
|
||||
let e11: vec3<f32> = Vertex_Normal1;
|
||||
fn main_1() {
|
||||
let e10: mat4x4<f32> = global_1.Model;
|
||||
let e11: vec3<f32> = Vertex_Normal_1;
|
||||
v_Normal = (e10 * vec4<f32>(e11, 1.0)).xyz;
|
||||
let e16: mat4x4<f32> = global1.Model;
|
||||
let e24: vec3<f32> = Vertex_Normal1;
|
||||
let e16: mat4x4<f32> = global_1.Model;
|
||||
let e24: vec3<f32> = Vertex_Normal_1;
|
||||
v_Normal = (mat3x3<f32>(e16[0].xyz, e16[1].xyz, e16[2].xyz) * e24);
|
||||
let e26: mat4x4<f32> = global1.Model;
|
||||
let e27: vec3<f32> = Vertex_Position1;
|
||||
let e26: mat4x4<f32> = global_1.Model;
|
||||
let e27: vec3<f32> = Vertex_Position_1;
|
||||
v_Position = (e26 * vec4<f32>(e27, 1.0)).xyz;
|
||||
let e32: vec2<f32> = Vertex_Uv1;
|
||||
let e32: vec2<f32> = Vertex_Uv_1;
|
||||
v_Uv = e32;
|
||||
let e34: mat4x4<f32> = global.ViewProj;
|
||||
let e35: vec3<f32> = v_Position;
|
||||
@ -47,10 +47,10 @@ fn main1() {
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main([[location(0)]] Vertex_Position: vec3<f32>, [[location(1)]] Vertex_Normal: vec3<f32>, [[location(2)]] Vertex_Uv: vec2<f32>) -> VertexOutput {
|
||||
Vertex_Position1 = Vertex_Position;
|
||||
Vertex_Normal1 = Vertex_Normal;
|
||||
Vertex_Uv1 = Vertex_Uv;
|
||||
main1();
|
||||
Vertex_Position_1 = Vertex_Position;
|
||||
Vertex_Normal_1 = Vertex_Normal;
|
||||
Vertex_Uv_1 = Vertex_Uv;
|
||||
main_1();
|
||||
let e23: vec3<f32> = v_Position;
|
||||
let e25: vec3<f32> = v_Normal;
|
||||
let e27: vec2<f32> = v_Uv;
|
||||
|
@ -8,26 +8,26 @@ var<storage, read_write> global: PrimeIndices;
|
||||
var<private> gl_GlobalInvocationID: vec3<u32>;
|
||||
|
||||
fn collatz_iterations(n: u32) -> u32 {
|
||||
var n1: u32;
|
||||
var n_1: u32;
|
||||
var i: u32 = 0u;
|
||||
|
||||
n1 = n;
|
||||
n_1 = n;
|
||||
loop {
|
||||
let e7: u32 = n1;
|
||||
let e7: u32 = n_1;
|
||||
if (!((e7 != u32(1)))) {
|
||||
break;
|
||||
}
|
||||
{
|
||||
let e14: u32 = n1;
|
||||
let e14: u32 = n_1;
|
||||
if (((f32(e14) % f32(2)) == f32(0))) {
|
||||
{
|
||||
let e22: u32 = n1;
|
||||
n1 = (e22 / u32(2));
|
||||
let e22: u32 = n_1;
|
||||
n_1 = (e22 / u32(2));
|
||||
}
|
||||
} else {
|
||||
{
|
||||
let e27: u32 = n1;
|
||||
n1 = ((u32(3) * e27) + u32(1));
|
||||
let e27: u32 = n_1;
|
||||
n_1 = ((u32(3) * e27) + u32(1));
|
||||
}
|
||||
}
|
||||
let e33: u32 = i;
|
||||
@ -38,7 +38,7 @@ fn collatz_iterations(n: u32) -> u32 {
|
||||
return e36;
|
||||
}
|
||||
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var index: u32;
|
||||
|
||||
let e3: vec3<u32> = gl_GlobalInvocationID;
|
||||
@ -55,6 +55,6 @@ fn main1() {
|
||||
[[stage(compute), workgroup_size(1, 1, 1)]]
|
||||
fn main([[builtin(global_invocation_id)]] param: vec3<u32>) {
|
||||
gl_GlobalInvocationID = param;
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var a: f32 = 1.0;
|
||||
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var a: mat4x4<f32> = mat4x4<f32>(vec4<f32>(1.0, 0.0, 0.0, 0.0), vec4<f32>(0.0, 1.0, 0.0, 0.0), vec4<f32>(0.0, 0.0, 1.0, 0.0), vec4<f32>(0.0, 0.0, 0.0, 1.0));
|
||||
|
||||
let e1: f32 = f32(1);
|
||||
@ -6,6 +6,6 @@ fn main1() {
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -15,18 +15,18 @@ struct VertexOutput {
|
||||
|
||||
[[group(0), binding(0)]]
|
||||
var<uniform> global: Globals;
|
||||
var<push_constant> global1: VertexPushConstants;
|
||||
var<private> position1: vec2<f32>;
|
||||
var<private> color1: vec4<f32>;
|
||||
var<push_constant> global_1: VertexPushConstants;
|
||||
var<private> position_1: vec2<f32>;
|
||||
var<private> color_1: vec4<f32>;
|
||||
var<private> frag_color: vec4<f32>;
|
||||
var<private> gl_Position: vec4<f32>;
|
||||
|
||||
fn main1() {
|
||||
let e7: vec4<f32> = color1;
|
||||
fn main_1() {
|
||||
let e7: vec4<f32> = color_1;
|
||||
frag_color = e7;
|
||||
let e9: mat4x4<f32> = global.view_matrix;
|
||||
let e10: mat4x4<f32> = global1.world_matrix;
|
||||
let e12: vec2<f32> = position1;
|
||||
let e10: mat4x4<f32> = global_1.world_matrix;
|
||||
let e12: vec2<f32> = position_1;
|
||||
gl_Position = ((e9 * e10) * vec4<f32>(e12, 0.0, 1.0));
|
||||
let e18: vec4<f32> = gl_Position;
|
||||
let e20: vec4<f32> = gl_Position;
|
||||
@ -36,9 +36,9 @@ fn main1() {
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main([[location(0)]] position: vec2<f32>, [[location(1)]] color: vec4<f32>) -> VertexOutput {
|
||||
position1 = position;
|
||||
color1 = color;
|
||||
main1();
|
||||
position_1 = position;
|
||||
color_1 = color;
|
||||
main_1();
|
||||
let e15: vec4<f32> = frag_color;
|
||||
let e17: vec4<f32> = gl_Position;
|
||||
return VertexOutput(e15, e17);
|
||||
|
@ -5,12 +5,12 @@ struct PushConstants {
|
||||
|
||||
var<push_constant> c: PushConstants;
|
||||
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -1,68 +1,68 @@
|
||||
fn exact(a: f32) {
|
||||
var a1: f32;
|
||||
var a_1: f32;
|
||||
|
||||
a1 = a;
|
||||
a_1 = a;
|
||||
return;
|
||||
}
|
||||
|
||||
fn exact1(a2: i32) {
|
||||
var a3: i32;
|
||||
fn exact_1(a_2: i32) {
|
||||
var a_3: i32;
|
||||
|
||||
a3 = a2;
|
||||
a_3 = a_2;
|
||||
return;
|
||||
}
|
||||
|
||||
fn implicit(a4: f32) {
|
||||
var a5: f32;
|
||||
fn implicit(a_4: f32) {
|
||||
var a_5: f32;
|
||||
|
||||
a5 = a4;
|
||||
a_5 = a_4;
|
||||
return;
|
||||
}
|
||||
|
||||
fn implicit1(a6: i32) {
|
||||
var a7: i32;
|
||||
fn implicit_1(a_6: i32) {
|
||||
var a_7: i32;
|
||||
|
||||
a7 = a6;
|
||||
a_7 = a_6;
|
||||
return;
|
||||
}
|
||||
|
||||
fn implicit_dims(v: f32) {
|
||||
var v1: f32;
|
||||
var v_1: f32;
|
||||
|
||||
v1 = v;
|
||||
v_1 = v;
|
||||
return;
|
||||
}
|
||||
|
||||
fn implicit_dims1(v2: vec2<f32>) {
|
||||
var v3: vec2<f32>;
|
||||
fn implicit_dims_1(v_2: vec2<f32>) {
|
||||
var v_3: vec2<f32>;
|
||||
|
||||
v3 = v2;
|
||||
v_3 = v_2;
|
||||
return;
|
||||
}
|
||||
|
||||
fn implicit_dims2(v4: vec3<f32>) {
|
||||
var v5: vec3<f32>;
|
||||
fn implicit_dims_2(v_4: vec3<f32>) {
|
||||
var v_5: vec3<f32>;
|
||||
|
||||
v5 = v4;
|
||||
v_5 = v_4;
|
||||
return;
|
||||
}
|
||||
|
||||
fn implicit_dims3(v6: vec4<f32>) {
|
||||
var v7: vec4<f32>;
|
||||
fn implicit_dims_3(v_6: vec4<f32>) {
|
||||
var v_7: vec4<f32>;
|
||||
|
||||
v7 = v6;
|
||||
v_7 = v_6;
|
||||
return;
|
||||
}
|
||||
|
||||
fn main1() {
|
||||
exact1(1);
|
||||
fn main_1() {
|
||||
exact_1(1);
|
||||
implicit(f32(1u));
|
||||
implicit_dims2(vec3<f32>(vec3<i32>(1)));
|
||||
implicit_dims_2(vec3<f32>(vec3<i32>(1)));
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var a: vec4<f32> = vec4<f32>(1.0, 1.0, 1.0, 1.0);
|
||||
|
||||
a.x = 2.0;
|
||||
@ -7,6 +7,6 @@ fn main1() {
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
fn function1() -> f32 {
|
||||
fn function_() -> f32 {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var i: i32 = 0;
|
||||
|
||||
loop {
|
||||
@ -18,6 +18,6 @@ fn main1() {
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -9,24 +9,24 @@ struct Bar {
|
||||
[[group(0), binding(0)]]
|
||||
var<storage, read_write> bar: Bar;
|
||||
|
||||
fn read_from_private(foo2: ptr<function, f32>) -> f32 {
|
||||
let e2: f32 = (*foo2);
|
||||
fn read_from_private(foo_2: ptr<function, f32>) -> f32 {
|
||||
let e2: f32 = (*foo_2);
|
||||
return e2;
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn foo([[builtin(vertex_index)]] vi: u32) -> [[builtin(position)]] vec4<f32> {
|
||||
var foo1: f32 = 0.0;
|
||||
var foo_1: f32 = 0.0;
|
||||
var c: array<i32,5>;
|
||||
|
||||
let baz: f32 = foo1;
|
||||
foo1 = 1.0;
|
||||
let baz: f32 = foo_1;
|
||||
foo_1 = 1.0;
|
||||
let matrix: mat4x4<f32> = bar.matrix;
|
||||
let arr: array<vec2<u32>,2> = bar.arr;
|
||||
let b: f32 = bar.matrix[3][0];
|
||||
let a: i32 = bar.data[(arrayLength((&bar.data)) - 2u)];
|
||||
let pointer1: ptr<storage, i32, read_write> = (&bar.data[0]);
|
||||
let e25: f32 = read_from_private((&foo1));
|
||||
let pointer_: ptr<storage, i32, read_write> = (&bar.data[0]);
|
||||
let e25: f32 = read_from_private((&foo_1));
|
||||
bar.matrix[1][2] = 1.0;
|
||||
bar.matrix = mat4x4<f32>(vec4<f32>(0.0), vec4<f32>(1.0), vec4<f32>(2.0), vec4<f32>(3.0));
|
||||
bar.arr = array<vec2<u32>,2>(vec2<u32>(0u), vec2<u32>(1u));
|
||||
@ -41,7 +41,7 @@ fn foo([[builtin(vertex_index)]] vi: u32) -> [[builtin(position)]] vec4<f32> {
|
||||
fn atomics() {
|
||||
var tmp: i32;
|
||||
|
||||
let value1: i32 = atomicLoad((&bar.atom));
|
||||
let value_1: i32 = atomicLoad((&bar.atom));
|
||||
let e6: i32 = atomicAdd((&bar.atom), 5);
|
||||
tmp = e6;
|
||||
let e9: i32 = atomicSub((&bar.atom), 5);
|
||||
@ -58,6 +58,6 @@ fn atomics() {
|
||||
tmp = e24;
|
||||
let e27: i32 = atomicExchange((&bar.atom), 5);
|
||||
tmp = e27;
|
||||
atomicStore((&bar.atom), value1);
|
||||
atomicStore((&bar.atom), value_1);
|
||||
return;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -16,10 +16,10 @@ struct VertexOutput {
|
||||
[[builtin(position)]] member: vec4<f32>;
|
||||
};
|
||||
|
||||
var<private> Vertex_Position1: vec3<f32>;
|
||||
var<private> Vertex_Normal1: vec3<f32>;
|
||||
var<private> Vertex_Uv1: vec2<f32>;
|
||||
var<private> Vertex_Tangent1: vec4<f32>;
|
||||
var<private> Vertex_Position_1: vec3<f32>;
|
||||
var<private> Vertex_Normal_1: vec3<f32>;
|
||||
var<private> Vertex_Uv_1: vec2<f32>;
|
||||
var<private> Vertex_Tangent_1: vec4<f32>;
|
||||
var<private> v_WorldPosition: vec3<f32>;
|
||||
var<private> v_WorldNormal: vec3<f32>;
|
||||
var<private> v_Uv: vec2<f32>;
|
||||
@ -27,25 +27,25 @@ var<private> v_Uv: vec2<f32>;
|
||||
var<uniform> global: CameraViewProj;
|
||||
var<private> v_WorldTangent: vec4<f32>;
|
||||
[[group(2), binding(0)]]
|
||||
var<uniform> global1: Transform;
|
||||
var<uniform> global_1: Transform;
|
||||
var<private> gl_Position: vec4<f32>;
|
||||
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var world_position: vec4<f32>;
|
||||
|
||||
let e12: mat4x4<f32> = global1.Model;
|
||||
let e13: vec3<f32> = Vertex_Position1;
|
||||
let e12: mat4x4<f32> = global_1.Model;
|
||||
let e13: vec3<f32> = Vertex_Position_1;
|
||||
world_position = (e12 * vec4<f32>(e13, 1.0));
|
||||
let e18: vec4<f32> = world_position;
|
||||
v_WorldPosition = e18.xyz;
|
||||
let e20: mat4x4<f32> = global1.Model;
|
||||
let e28: vec3<f32> = Vertex_Normal1;
|
||||
let e20: mat4x4<f32> = global_1.Model;
|
||||
let e28: vec3<f32> = Vertex_Normal_1;
|
||||
v_WorldNormal = (mat3x3<f32>(e20[0].xyz, e20[1].xyz, e20[2].xyz) * e28);
|
||||
let e30: vec2<f32> = Vertex_Uv1;
|
||||
let e30: vec2<f32> = Vertex_Uv_1;
|
||||
v_Uv = e30;
|
||||
let e31: mat4x4<f32> = global1.Model;
|
||||
let e39: vec4<f32> = Vertex_Tangent1;
|
||||
let e42: vec4<f32> = Vertex_Tangent1;
|
||||
let e31: mat4x4<f32> = global_1.Model;
|
||||
let e39: vec4<f32> = Vertex_Tangent_1;
|
||||
let e42: vec4<f32> = Vertex_Tangent_1;
|
||||
v_WorldTangent = vec4<f32>((mat3x3<f32>(e31[0].xyz, e31[1].xyz, e31[2].xyz) * e39.xyz), e42.w);
|
||||
let e46: mat4x4<f32> = global.ViewProj;
|
||||
let e47: vec4<f32> = world_position;
|
||||
@ -55,11 +55,11 @@ fn main1() {
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main([[location(0)]] Vertex_Position: vec3<f32>, [[location(1)]] Vertex_Normal: vec3<f32>, [[location(2)]] Vertex_Uv: vec2<f32>, [[location(3)]] Vertex_Tangent: vec4<f32>) -> VertexOutput {
|
||||
Vertex_Position1 = Vertex_Position;
|
||||
Vertex_Normal1 = Vertex_Normal;
|
||||
Vertex_Uv1 = Vertex_Uv;
|
||||
Vertex_Tangent1 = Vertex_Tangent;
|
||||
main1();
|
||||
Vertex_Position_1 = Vertex_Position;
|
||||
Vertex_Normal_1 = Vertex_Normal;
|
||||
Vertex_Uv_1 = Vertex_Uv;
|
||||
Vertex_Tangent_1 = Vertex_Tangent;
|
||||
main_1();
|
||||
let e29: vec3<f32> = v_WorldPosition;
|
||||
let e31: vec3<f32> = v_WorldNormal;
|
||||
let e33: vec2<f32> = v_Uv;
|
||||
|
@ -1,83 +1,83 @@
|
||||
[[stage(compute), workgroup_size(1, 1, 1)]]
|
||||
fn main() {
|
||||
var i: i32 = 0;
|
||||
var i2: vec2<i32>;
|
||||
var i3: vec3<i32>;
|
||||
var i4: vec4<i32>;
|
||||
var i2_: vec2<i32>;
|
||||
var i3_: vec3<i32>;
|
||||
var i4_: vec4<i32>;
|
||||
var u: u32 = 0u;
|
||||
var u2: vec2<u32>;
|
||||
var u3: vec3<u32>;
|
||||
var u4: vec4<u32>;
|
||||
var f2: vec2<f32>;
|
||||
var f4: vec4<f32>;
|
||||
var u2_: vec2<u32>;
|
||||
var u3_: vec3<u32>;
|
||||
var u4_: vec4<u32>;
|
||||
var f2_: vec2<f32>;
|
||||
var f4_: vec4<f32>;
|
||||
|
||||
i2 = vec2<i32>(0);
|
||||
i3 = vec3<i32>(0);
|
||||
i4 = vec4<i32>(0);
|
||||
u2 = vec2<u32>(0u);
|
||||
u3 = vec3<u32>(0u);
|
||||
u4 = vec4<u32>(0u);
|
||||
f2 = vec2<f32>(0.0);
|
||||
f4 = vec4<f32>(0.0);
|
||||
let e28: vec4<f32> = f4;
|
||||
i2_ = vec2<i32>(0);
|
||||
i3_ = vec3<i32>(0);
|
||||
i4_ = vec4<i32>(0);
|
||||
u2_ = vec2<u32>(0u);
|
||||
u3_ = vec3<u32>(0u);
|
||||
u4_ = vec4<u32>(0u);
|
||||
f2_ = vec2<f32>(0.0);
|
||||
f4_ = vec4<f32>(0.0);
|
||||
let e28: vec4<f32> = f4_;
|
||||
u = pack4x8snorm(e28);
|
||||
let e30: vec4<f32> = f4;
|
||||
let e30: vec4<f32> = f4_;
|
||||
u = pack4x8unorm(e30);
|
||||
let e32: vec2<f32> = f2;
|
||||
let e32: vec2<f32> = f2_;
|
||||
u = pack2x16snorm(e32);
|
||||
let e34: vec2<f32> = f2;
|
||||
let e34: vec2<f32> = f2_;
|
||||
u = pack2x16unorm(e34);
|
||||
let e36: vec2<f32> = f2;
|
||||
let e36: vec2<f32> = f2_;
|
||||
u = pack2x16float(e36);
|
||||
let e38: u32 = u;
|
||||
f4 = unpack4x8snorm(e38);
|
||||
f4_ = unpack4x8snorm(e38);
|
||||
let e40: u32 = u;
|
||||
f4 = unpack4x8unorm(e40);
|
||||
f4_ = unpack4x8unorm(e40);
|
||||
let e42: u32 = u;
|
||||
f2 = unpack2x16snorm(e42);
|
||||
f2_ = unpack2x16snorm(e42);
|
||||
let e44: u32 = u;
|
||||
f2 = unpack2x16unorm(e44);
|
||||
f2_ = unpack2x16unorm(e44);
|
||||
let e46: u32 = u;
|
||||
f2 = unpack2x16float(e46);
|
||||
f2_ = unpack2x16float(e46);
|
||||
let e48: i32 = i;
|
||||
let e49: i32 = i;
|
||||
i = insertBits(e48, e49, 5u, 10u);
|
||||
let e53: vec2<i32> = i2;
|
||||
let e54: vec2<i32> = i2;
|
||||
i2 = insertBits(e53, e54, 5u, 10u);
|
||||
let e58: vec3<i32> = i3;
|
||||
let e59: vec3<i32> = i3;
|
||||
i3 = insertBits(e58, e59, 5u, 10u);
|
||||
let e63: vec4<i32> = i4;
|
||||
let e64: vec4<i32> = i4;
|
||||
i4 = insertBits(e63, e64, 5u, 10u);
|
||||
let e53: vec2<i32> = i2_;
|
||||
let e54: vec2<i32> = i2_;
|
||||
i2_ = insertBits(e53, e54, 5u, 10u);
|
||||
let e58: vec3<i32> = i3_;
|
||||
let e59: vec3<i32> = i3_;
|
||||
i3_ = insertBits(e58, e59, 5u, 10u);
|
||||
let e63: vec4<i32> = i4_;
|
||||
let e64: vec4<i32> = i4_;
|
||||
i4_ = insertBits(e63, e64, 5u, 10u);
|
||||
let e68: u32 = u;
|
||||
let e69: u32 = u;
|
||||
u = insertBits(e68, e69, 5u, 10u);
|
||||
let e73: vec2<u32> = u2;
|
||||
let e74: vec2<u32> = u2;
|
||||
u2 = insertBits(e73, e74, 5u, 10u);
|
||||
let e78: vec3<u32> = u3;
|
||||
let e79: vec3<u32> = u3;
|
||||
u3 = insertBits(e78, e79, 5u, 10u);
|
||||
let e83: vec4<u32> = u4;
|
||||
let e84: vec4<u32> = u4;
|
||||
u4 = insertBits(e83, e84, 5u, 10u);
|
||||
let e73: vec2<u32> = u2_;
|
||||
let e74: vec2<u32> = u2_;
|
||||
u2_ = insertBits(e73, e74, 5u, 10u);
|
||||
let e78: vec3<u32> = u3_;
|
||||
let e79: vec3<u32> = u3_;
|
||||
u3_ = insertBits(e78, e79, 5u, 10u);
|
||||
let e83: vec4<u32> = u4_;
|
||||
let e84: vec4<u32> = u4_;
|
||||
u4_ = insertBits(e83, e84, 5u, 10u);
|
||||
let e88: i32 = i;
|
||||
i = extractBits(e88, 5u, 10u);
|
||||
let e92: vec2<i32> = i2;
|
||||
i2 = extractBits(e92, 5u, 10u);
|
||||
let e96: vec3<i32> = i3;
|
||||
i3 = extractBits(e96, 5u, 10u);
|
||||
let e100: vec4<i32> = i4;
|
||||
i4 = extractBits(e100, 5u, 10u);
|
||||
let e92: vec2<i32> = i2_;
|
||||
i2_ = extractBits(e92, 5u, 10u);
|
||||
let e96: vec3<i32> = i3_;
|
||||
i3_ = extractBits(e96, 5u, 10u);
|
||||
let e100: vec4<i32> = i4_;
|
||||
i4_ = extractBits(e100, 5u, 10u);
|
||||
let e104: u32 = u;
|
||||
u = extractBits(e104, 5u, 10u);
|
||||
let e108: vec2<u32> = u2;
|
||||
u2 = extractBits(e108, 5u, 10u);
|
||||
let e112: vec3<u32> = u3;
|
||||
u3 = extractBits(e112, 5u, 10u);
|
||||
let e116: vec4<u32> = u4;
|
||||
u4 = extractBits(e116, 5u, 10u);
|
||||
let e108: vec2<u32> = u2_;
|
||||
u2_ = extractBits(e108, 5u, 10u);
|
||||
let e112: vec3<u32> = u3_;
|
||||
u3_ = extractBits(e112, 5u, 10u);
|
||||
let e116: vec4<u32> = u4_;
|
||||
u4_ = extractBits(e116, 5u, 10u);
|
||||
return;
|
||||
}
|
||||
|
@ -1,80 +1,80 @@
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var i: i32 = 0;
|
||||
var i2: vec2<i32> = vec2<i32>(0, 0);
|
||||
var i3: vec3<i32> = vec3<i32>(0, 0, 0);
|
||||
var i4: vec4<i32> = vec4<i32>(0, 0, 0, 0);
|
||||
var i2_: vec2<i32> = vec2<i32>(0, 0);
|
||||
var i3_: vec3<i32> = vec3<i32>(0, 0, 0);
|
||||
var i4_: vec4<i32> = vec4<i32>(0, 0, 0, 0);
|
||||
var u: u32 = 0u;
|
||||
var u2: vec2<u32> = vec2<u32>(0u, 0u);
|
||||
var u3: vec3<u32> = vec3<u32>(0u, 0u, 0u);
|
||||
var u4: vec4<u32> = vec4<u32>(0u, 0u, 0u, 0u);
|
||||
var f2: vec2<f32> = vec2<f32>(0.0, 0.0);
|
||||
var f4: vec4<f32> = vec4<f32>(0.0, 0.0, 0.0, 0.0);
|
||||
var u2_: vec2<u32> = vec2<u32>(0u, 0u);
|
||||
var u3_: vec3<u32> = vec3<u32>(0u, 0u, 0u);
|
||||
var u4_: vec4<u32> = vec4<u32>(0u, 0u, 0u, 0u);
|
||||
var f2_: vec2<f32> = vec2<f32>(0.0, 0.0);
|
||||
var f4_: vec4<f32> = vec4<f32>(0.0, 0.0, 0.0, 0.0);
|
||||
|
||||
let e33: vec4<f32> = f4;
|
||||
let e33: vec4<f32> = f4_;
|
||||
u = pack4x8snorm(e33);
|
||||
let e36: vec4<f32> = f4;
|
||||
let e36: vec4<f32> = f4_;
|
||||
u = pack4x8unorm(e36);
|
||||
let e39: vec2<f32> = f2;
|
||||
let e39: vec2<f32> = f2_;
|
||||
u = pack2x16unorm(e39);
|
||||
let e42: vec2<f32> = f2;
|
||||
let e42: vec2<f32> = f2_;
|
||||
u = pack2x16snorm(e42);
|
||||
let e45: vec2<f32> = f2;
|
||||
let e45: vec2<f32> = f2_;
|
||||
u = pack2x16float(e45);
|
||||
let e48: u32 = u;
|
||||
f4 = unpack4x8snorm(e48);
|
||||
f4_ = unpack4x8snorm(e48);
|
||||
let e51: u32 = u;
|
||||
f4 = unpack4x8unorm(e51);
|
||||
f4_ = unpack4x8unorm(e51);
|
||||
let e54: u32 = u;
|
||||
f2 = unpack2x16snorm(e54);
|
||||
f2_ = unpack2x16snorm(e54);
|
||||
let e57: u32 = u;
|
||||
f2 = unpack2x16unorm(e57);
|
||||
f2_ = unpack2x16unorm(e57);
|
||||
let e60: u32 = u;
|
||||
f2 = unpack2x16float(e60);
|
||||
f2_ = unpack2x16float(e60);
|
||||
let e66: i32 = i;
|
||||
let e67: i32 = i;
|
||||
i = insertBits(e66, e67, u32(5), u32(10));
|
||||
let e77: vec2<i32> = i2;
|
||||
let e78: vec2<i32> = i2;
|
||||
i2 = insertBits(e77, e78, u32(5), u32(10));
|
||||
let e88: vec3<i32> = i3;
|
||||
let e89: vec3<i32> = i3;
|
||||
i3 = insertBits(e88, e89, u32(5), u32(10));
|
||||
let e99: vec4<i32> = i4;
|
||||
let e100: vec4<i32> = i4;
|
||||
i4 = insertBits(e99, e100, u32(5), u32(10));
|
||||
let e77: vec2<i32> = i2_;
|
||||
let e78: vec2<i32> = i2_;
|
||||
i2_ = insertBits(e77, e78, u32(5), u32(10));
|
||||
let e88: vec3<i32> = i3_;
|
||||
let e89: vec3<i32> = i3_;
|
||||
i3_ = insertBits(e88, e89, u32(5), u32(10));
|
||||
let e99: vec4<i32> = i4_;
|
||||
let e100: vec4<i32> = i4_;
|
||||
i4_ = insertBits(e99, e100, u32(5), u32(10));
|
||||
let e110: u32 = u;
|
||||
let e111: u32 = u;
|
||||
u = insertBits(e110, e111, u32(5), u32(10));
|
||||
let e121: vec2<u32> = u2;
|
||||
let e122: vec2<u32> = u2;
|
||||
u2 = insertBits(e121, e122, u32(5), u32(10));
|
||||
let e132: vec3<u32> = u3;
|
||||
let e133: vec3<u32> = u3;
|
||||
u3 = insertBits(e132, e133, u32(5), u32(10));
|
||||
let e143: vec4<u32> = u4;
|
||||
let e144: vec4<u32> = u4;
|
||||
u4 = insertBits(e143, e144, u32(5), u32(10));
|
||||
let e121: vec2<u32> = u2_;
|
||||
let e122: vec2<u32> = u2_;
|
||||
u2_ = insertBits(e121, e122, u32(5), u32(10));
|
||||
let e132: vec3<u32> = u3_;
|
||||
let e133: vec3<u32> = u3_;
|
||||
u3_ = insertBits(e132, e133, u32(5), u32(10));
|
||||
let e143: vec4<u32> = u4_;
|
||||
let e144: vec4<u32> = u4_;
|
||||
u4_ = insertBits(e143, e144, u32(5), u32(10));
|
||||
let e153: i32 = i;
|
||||
i = extractBits(e153, u32(5), u32(10));
|
||||
let e162: vec2<i32> = i2;
|
||||
i2 = extractBits(e162, u32(5), u32(10));
|
||||
let e171: vec3<i32> = i3;
|
||||
i3 = extractBits(e171, u32(5), u32(10));
|
||||
let e180: vec4<i32> = i4;
|
||||
i4 = extractBits(e180, u32(5), u32(10));
|
||||
let e162: vec2<i32> = i2_;
|
||||
i2_ = extractBits(e162, u32(5), u32(10));
|
||||
let e171: vec3<i32> = i3_;
|
||||
i3_ = extractBits(e171, u32(5), u32(10));
|
||||
let e180: vec4<i32> = i4_;
|
||||
i4_ = extractBits(e180, u32(5), u32(10));
|
||||
let e189: u32 = u;
|
||||
u = extractBits(e189, u32(5), u32(10));
|
||||
let e198: vec2<u32> = u2;
|
||||
u2 = extractBits(e198, u32(5), u32(10));
|
||||
let e207: vec3<u32> = u3;
|
||||
u3 = extractBits(e207, u32(5), u32(10));
|
||||
let e216: vec4<u32> = u4;
|
||||
u4 = extractBits(e216, u32(5), u32(10));
|
||||
let e198: vec2<u32> = u2_;
|
||||
u2_ = extractBits(e198, u32(5), u32(10));
|
||||
let e207: vec3<u32> = u3_;
|
||||
u3_ = extractBits(e207, u32(5), u32(10));
|
||||
let e216: vec4<u32> = u4_;
|
||||
u4_ = extractBits(e216, u32(5), u32(10));
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -5,30 +5,30 @@ struct FragmentOutput {
|
||||
var<private> o_color: vec4<f32>;
|
||||
|
||||
fn TevPerCompGT(a: f32, b: f32) -> f32 {
|
||||
var a1: f32;
|
||||
var b1: f32;
|
||||
var a_1: f32;
|
||||
var b_1: f32;
|
||||
|
||||
a1 = a;
|
||||
b1 = b;
|
||||
let e5: f32 = a1;
|
||||
let e6: f32 = b1;
|
||||
a_1 = a;
|
||||
b_1 = b;
|
||||
let e5: f32 = a_1;
|
||||
let e6: f32 = b_1;
|
||||
return select(0.0, 1.0, (e5 > e6));
|
||||
}
|
||||
|
||||
fn TevPerCompGT1(a2: vec3<f32>, b2: vec3<f32>) -> vec3<f32> {
|
||||
var a3: vec3<f32>;
|
||||
var b3: vec3<f32>;
|
||||
fn TevPerCompGT_1(a_2: vec3<f32>, b_2: vec3<f32>) -> vec3<f32> {
|
||||
var a_3: vec3<f32>;
|
||||
var b_3: vec3<f32>;
|
||||
|
||||
a3 = a2;
|
||||
b3 = b2;
|
||||
let e7: vec3<f32> = a3;
|
||||
let e8: vec3<f32> = b3;
|
||||
a_3 = a_2;
|
||||
b_3 = b_2;
|
||||
let e7: vec3<f32> = a_3;
|
||||
let e8: vec3<f32> = b_3;
|
||||
return select(vec3<f32>(0.0), vec3<f32>(1.0), (e7 > e8));
|
||||
}
|
||||
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
let e1: vec4<f32> = o_color;
|
||||
let e11: vec3<f32> = TevPerCompGT1(vec3<f32>(3.0), vec3<f32>(5.0));
|
||||
let e11: vec3<f32> = TevPerCompGT_1(vec3<f32>(3.0), vec3<f32>(5.0));
|
||||
o_color.x = e11.x;
|
||||
o_color.y = e11.y;
|
||||
o_color.z = e11.z;
|
||||
@ -39,7 +39,7 @@ fn main1() {
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main() -> FragmentOutput {
|
||||
main1();
|
||||
main_1();
|
||||
let e3: vec4<f32> = o_color;
|
||||
return FragmentOutput(e3);
|
||||
}
|
||||
|
@ -2,19 +2,19 @@ struct VertexOutput {
|
||||
[[builtin(position)]] member: vec4<f32>;
|
||||
};
|
||||
|
||||
var<private> a_pos1: vec2<f32>;
|
||||
var<private> a_pos_1: vec2<f32>;
|
||||
var<private> gl_Position: vec4<f32>;
|
||||
|
||||
fn main1() {
|
||||
let e5: vec2<f32> = a_pos1;
|
||||
fn main_1() {
|
||||
let e5: vec2<f32> = a_pos_1;
|
||||
gl_Position = vec4<f32>(clamp(e5, vec2<f32>(0.0), vec2<f32>(1.0)), 0.0, 1.0);
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main([[location(0)]] a_pos: vec2<f32>) -> VertexOutput {
|
||||
a_pos1 = a_pos;
|
||||
main1();
|
||||
a_pos_1 = a_pos;
|
||||
main_1();
|
||||
let e5: vec4<f32> = gl_Position;
|
||||
return VertexOutput(e5);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ struct Data {
|
||||
[[group(1), binding(0)]]
|
||||
var<uniform> global: Data;
|
||||
|
||||
fn function1() -> vec4<f32> {
|
||||
fn function_() -> vec4<f32> {
|
||||
var sum: vec4<f32> = vec4<f32>(0.0, 0.0, 0.0, 0.0);
|
||||
var i: i32 = 0;
|
||||
|
||||
@ -30,12 +30,12 @@ fn function1() -> vec4<f32> {
|
||||
return e20;
|
||||
}
|
||||
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -1,18 +1,18 @@
|
||||
[[block]]
|
||||
struct type2 {
|
||||
struct type_1 {
|
||||
member: i32;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]]
|
||||
var<storage, read_write> global: type2;
|
||||
var<storage, read_write> unnamed: type_1;
|
||||
|
||||
fn function1() {
|
||||
let e8: i32 = global.member;
|
||||
global.member = (e8 + 1);
|
||||
fn function_() {
|
||||
let e8: i32 = unnamed.member;
|
||||
unnamed.member = (e8 + 1);
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(64, 1, 1)]]
|
||||
fn main() {
|
||||
function1();
|
||||
function_();
|
||||
}
|
||||
|
@ -6,172 +6,172 @@ var<private> global: f32;
|
||||
var<private> o_color: vec4<f32>;
|
||||
|
||||
fn testBinOpVecFloat(a: vec4<f32>, b: f32) {
|
||||
var a1: vec4<f32>;
|
||||
var b1: f32;
|
||||
var a_1: vec4<f32>;
|
||||
var b_1: f32;
|
||||
var v: vec4<f32>;
|
||||
|
||||
a1 = a;
|
||||
b1 = b;
|
||||
let e5: vec4<f32> = a1;
|
||||
a_1 = a;
|
||||
b_1 = b;
|
||||
let e5: vec4<f32> = a_1;
|
||||
v = (e5 * 2.0);
|
||||
let e8: vec4<f32> = a1;
|
||||
let e8: vec4<f32> = a_1;
|
||||
v = (e8 / vec4<f32>(2.0));
|
||||
let e12: vec4<f32> = a1;
|
||||
let e12: vec4<f32> = a_1;
|
||||
v = (e12 + vec4<f32>(2.0));
|
||||
let e16: vec4<f32> = a1;
|
||||
let e16: vec4<f32> = a_1;
|
||||
v = (e16 - vec4<f32>(2.0));
|
||||
return;
|
||||
}
|
||||
|
||||
fn testBinOpFloatVec(a2: vec4<f32>, b2: f32) {
|
||||
var a3: vec4<f32>;
|
||||
var b3: f32;
|
||||
var v1: vec4<f32>;
|
||||
fn testBinOpFloatVec(a_2: vec4<f32>, b_2: f32) {
|
||||
var a_3: vec4<f32>;
|
||||
var b_3: f32;
|
||||
var v_1: vec4<f32>;
|
||||
|
||||
a3 = a2;
|
||||
b3 = b2;
|
||||
let e5: vec4<f32> = a3;
|
||||
let e6: f32 = b3;
|
||||
v1 = (e5 * e6);
|
||||
let e8: vec4<f32> = a3;
|
||||
let e9: f32 = b3;
|
||||
v1 = (e8 / vec4<f32>(e9));
|
||||
let e12: vec4<f32> = a3;
|
||||
let e13: f32 = b3;
|
||||
v1 = (e12 + vec4<f32>(e13));
|
||||
let e16: vec4<f32> = a3;
|
||||
let e17: f32 = b3;
|
||||
v1 = (e16 - vec4<f32>(e17));
|
||||
a_3 = a_2;
|
||||
b_3 = b_2;
|
||||
let e5: vec4<f32> = a_3;
|
||||
let e6: f32 = b_3;
|
||||
v_1 = (e5 * e6);
|
||||
let e8: vec4<f32> = a_3;
|
||||
let e9: f32 = b_3;
|
||||
v_1 = (e8 / vec4<f32>(e9));
|
||||
let e12: vec4<f32> = a_3;
|
||||
let e13: f32 = b_3;
|
||||
v_1 = (e12 + vec4<f32>(e13));
|
||||
let e16: vec4<f32> = a_3;
|
||||
let e17: f32 = b_3;
|
||||
v_1 = (e16 - vec4<f32>(e17));
|
||||
return;
|
||||
}
|
||||
|
||||
fn testBinOpIVecInt(a4: vec4<i32>, b4: i32) {
|
||||
var a5: vec4<i32>;
|
||||
var b5: i32;
|
||||
var v2: vec4<i32>;
|
||||
fn testBinOpIVecInt(a_4: vec4<i32>, b_4: i32) {
|
||||
var a_5: vec4<i32>;
|
||||
var b_5: i32;
|
||||
var v_2: vec4<i32>;
|
||||
|
||||
a5 = a4;
|
||||
b5 = b4;
|
||||
let e5: vec4<i32> = a5;
|
||||
let e6: i32 = b5;
|
||||
v2 = (e5 * e6);
|
||||
let e8: vec4<i32> = a5;
|
||||
let e9: i32 = b5;
|
||||
v2 = (e8 / vec4<i32>(e9));
|
||||
let e12: vec4<i32> = a5;
|
||||
let e13: i32 = b5;
|
||||
v2 = (e12 + vec4<i32>(e13));
|
||||
let e16: vec4<i32> = a5;
|
||||
let e17: i32 = b5;
|
||||
v2 = (e16 - vec4<i32>(e17));
|
||||
let e20: vec4<i32> = a5;
|
||||
let e21: i32 = b5;
|
||||
v2 = (e20 & vec4<i32>(e21));
|
||||
let e24: vec4<i32> = a5;
|
||||
let e25: i32 = b5;
|
||||
v2 = (e24 | vec4<i32>(e25));
|
||||
let e28: vec4<i32> = a5;
|
||||
let e29: i32 = b5;
|
||||
v2 = (e28 ^ vec4<i32>(e29));
|
||||
let e32: vec4<i32> = a5;
|
||||
let e33: i32 = b5;
|
||||
v2 = (e32 >> vec4<u32>(u32(e33)));
|
||||
let e37: vec4<i32> = a5;
|
||||
let e38: i32 = b5;
|
||||
v2 = (e37 << vec4<u32>(u32(e38)));
|
||||
a_5 = a_4;
|
||||
b_5 = b_4;
|
||||
let e5: vec4<i32> = a_5;
|
||||
let e6: i32 = b_5;
|
||||
v_2 = (e5 * e6);
|
||||
let e8: vec4<i32> = a_5;
|
||||
let e9: i32 = b_5;
|
||||
v_2 = (e8 / vec4<i32>(e9));
|
||||
let e12: vec4<i32> = a_5;
|
||||
let e13: i32 = b_5;
|
||||
v_2 = (e12 + vec4<i32>(e13));
|
||||
let e16: vec4<i32> = a_5;
|
||||
let e17: i32 = b_5;
|
||||
v_2 = (e16 - vec4<i32>(e17));
|
||||
let e20: vec4<i32> = a_5;
|
||||
let e21: i32 = b_5;
|
||||
v_2 = (e20 & vec4<i32>(e21));
|
||||
let e24: vec4<i32> = a_5;
|
||||
let e25: i32 = b_5;
|
||||
v_2 = (e24 | vec4<i32>(e25));
|
||||
let e28: vec4<i32> = a_5;
|
||||
let e29: i32 = b_5;
|
||||
v_2 = (e28 ^ vec4<i32>(e29));
|
||||
let e32: vec4<i32> = a_5;
|
||||
let e33: i32 = b_5;
|
||||
v_2 = (e32 >> vec4<u32>(u32(e33)));
|
||||
let e37: vec4<i32> = a_5;
|
||||
let e38: i32 = b_5;
|
||||
v_2 = (e37 << vec4<u32>(u32(e38)));
|
||||
return;
|
||||
}
|
||||
|
||||
fn testBinOpIntIVec(a6: i32, b6: vec4<i32>) {
|
||||
var a7: i32;
|
||||
var b7: vec4<i32>;
|
||||
var v3: vec4<i32>;
|
||||
fn testBinOpIntIVec(a_6: i32, b_6: vec4<i32>) {
|
||||
var a_7: i32;
|
||||
var b_7: vec4<i32>;
|
||||
var v_3: vec4<i32>;
|
||||
|
||||
a7 = a6;
|
||||
b7 = b6;
|
||||
let e5: i32 = a7;
|
||||
let e6: vec4<i32> = b7;
|
||||
v3 = (e5 * e6);
|
||||
let e8: i32 = a7;
|
||||
let e9: vec4<i32> = b7;
|
||||
v3 = (vec4<i32>(e8) + e9);
|
||||
let e12: i32 = a7;
|
||||
let e13: vec4<i32> = b7;
|
||||
v3 = (vec4<i32>(e12) - e13);
|
||||
let e16: i32 = a7;
|
||||
let e17: vec4<i32> = b7;
|
||||
v3 = (vec4<i32>(e16) & e17);
|
||||
let e20: i32 = a7;
|
||||
let e21: vec4<i32> = b7;
|
||||
v3 = (vec4<i32>(e20) | e21);
|
||||
let e24: i32 = a7;
|
||||
let e25: vec4<i32> = b7;
|
||||
v3 = (vec4<i32>(e24) ^ e25);
|
||||
a_7 = a_6;
|
||||
b_7 = b_6;
|
||||
let e5: i32 = a_7;
|
||||
let e6: vec4<i32> = b_7;
|
||||
v_3 = (e5 * e6);
|
||||
let e8: i32 = a_7;
|
||||
let e9: vec4<i32> = b_7;
|
||||
v_3 = (vec4<i32>(e8) + e9);
|
||||
let e12: i32 = a_7;
|
||||
let e13: vec4<i32> = b_7;
|
||||
v_3 = (vec4<i32>(e12) - e13);
|
||||
let e16: i32 = a_7;
|
||||
let e17: vec4<i32> = b_7;
|
||||
v_3 = (vec4<i32>(e16) & e17);
|
||||
let e20: i32 = a_7;
|
||||
let e21: vec4<i32> = b_7;
|
||||
v_3 = (vec4<i32>(e20) | e21);
|
||||
let e24: i32 = a_7;
|
||||
let e25: vec4<i32> = b_7;
|
||||
v_3 = (vec4<i32>(e24) ^ e25);
|
||||
return;
|
||||
}
|
||||
|
||||
fn testBinOpUVecUint(a8: vec4<u32>, b8: u32) {
|
||||
var a9: vec4<u32>;
|
||||
var b9: u32;
|
||||
var v4: vec4<u32>;
|
||||
fn testBinOpUVecUint(a_8: vec4<u32>, b_8: u32) {
|
||||
var a_9: vec4<u32>;
|
||||
var b_9: u32;
|
||||
var v_4: vec4<u32>;
|
||||
|
||||
a9 = a8;
|
||||
b9 = b8;
|
||||
let e5: vec4<u32> = a9;
|
||||
let e6: u32 = b9;
|
||||
v4 = (e5 * e6);
|
||||
let e8: vec4<u32> = a9;
|
||||
let e9: u32 = b9;
|
||||
v4 = (e8 / vec4<u32>(e9));
|
||||
let e12: vec4<u32> = a9;
|
||||
let e13: u32 = b9;
|
||||
v4 = (e12 + vec4<u32>(e13));
|
||||
let e16: vec4<u32> = a9;
|
||||
let e17: u32 = b9;
|
||||
v4 = (e16 - vec4<u32>(e17));
|
||||
let e20: vec4<u32> = a9;
|
||||
let e21: u32 = b9;
|
||||
v4 = (e20 & vec4<u32>(e21));
|
||||
let e24: vec4<u32> = a9;
|
||||
let e25: u32 = b9;
|
||||
v4 = (e24 | vec4<u32>(e25));
|
||||
let e28: vec4<u32> = a9;
|
||||
let e29: u32 = b9;
|
||||
v4 = (e28 ^ vec4<u32>(e29));
|
||||
let e32: vec4<u32> = a9;
|
||||
let e33: u32 = b9;
|
||||
v4 = (e32 >> vec4<u32>(e33));
|
||||
let e36: vec4<u32> = a9;
|
||||
let e37: u32 = b9;
|
||||
v4 = (e36 << vec4<u32>(e37));
|
||||
a_9 = a_8;
|
||||
b_9 = b_8;
|
||||
let e5: vec4<u32> = a_9;
|
||||
let e6: u32 = b_9;
|
||||
v_4 = (e5 * e6);
|
||||
let e8: vec4<u32> = a_9;
|
||||
let e9: u32 = b_9;
|
||||
v_4 = (e8 / vec4<u32>(e9));
|
||||
let e12: vec4<u32> = a_9;
|
||||
let e13: u32 = b_9;
|
||||
v_4 = (e12 + vec4<u32>(e13));
|
||||
let e16: vec4<u32> = a_9;
|
||||
let e17: u32 = b_9;
|
||||
v_4 = (e16 - vec4<u32>(e17));
|
||||
let e20: vec4<u32> = a_9;
|
||||
let e21: u32 = b_9;
|
||||
v_4 = (e20 & vec4<u32>(e21));
|
||||
let e24: vec4<u32> = a_9;
|
||||
let e25: u32 = b_9;
|
||||
v_4 = (e24 | vec4<u32>(e25));
|
||||
let e28: vec4<u32> = a_9;
|
||||
let e29: u32 = b_9;
|
||||
v_4 = (e28 ^ vec4<u32>(e29));
|
||||
let e32: vec4<u32> = a_9;
|
||||
let e33: u32 = b_9;
|
||||
v_4 = (e32 >> vec4<u32>(e33));
|
||||
let e36: vec4<u32> = a_9;
|
||||
let e37: u32 = b_9;
|
||||
v_4 = (e36 << vec4<u32>(e37));
|
||||
return;
|
||||
}
|
||||
|
||||
fn testBinOpUintUVec(a10: u32, b10: vec4<u32>) {
|
||||
var a11: u32;
|
||||
var b11: vec4<u32>;
|
||||
var v5: vec4<u32>;
|
||||
fn testBinOpUintUVec(a_10: u32, b_10: vec4<u32>) {
|
||||
var a_11: u32;
|
||||
var b_11: vec4<u32>;
|
||||
var v_5: vec4<u32>;
|
||||
|
||||
a11 = a10;
|
||||
b11 = b10;
|
||||
let e5: u32 = a11;
|
||||
let e6: vec4<u32> = b11;
|
||||
v5 = (e5 * e6);
|
||||
let e8: u32 = a11;
|
||||
let e9: vec4<u32> = b11;
|
||||
v5 = (vec4<u32>(e8) + e9);
|
||||
let e12: u32 = a11;
|
||||
let e13: vec4<u32> = b11;
|
||||
v5 = (vec4<u32>(e12) - e13);
|
||||
let e16: u32 = a11;
|
||||
let e17: vec4<u32> = b11;
|
||||
v5 = (vec4<u32>(e16) & e17);
|
||||
let e20: u32 = a11;
|
||||
let e21: vec4<u32> = b11;
|
||||
v5 = (vec4<u32>(e20) | e21);
|
||||
let e24: u32 = a11;
|
||||
let e25: vec4<u32> = b11;
|
||||
v5 = (vec4<u32>(e24) ^ e25);
|
||||
a_11 = a_10;
|
||||
b_11 = b_10;
|
||||
let e5: u32 = a_11;
|
||||
let e6: vec4<u32> = b_11;
|
||||
v_5 = (e5 * e6);
|
||||
let e8: u32 = a_11;
|
||||
let e9: vec4<u32> = b_11;
|
||||
v_5 = (vec4<u32>(e8) + e9);
|
||||
let e12: u32 = a_11;
|
||||
let e13: vec4<u32> = b_11;
|
||||
v_5 = (vec4<u32>(e12) - e13);
|
||||
let e16: u32 = a_11;
|
||||
let e17: vec4<u32> = b_11;
|
||||
v_5 = (vec4<u32>(e16) & e17);
|
||||
let e20: u32 = a_11;
|
||||
let e21: vec4<u32> = b_11;
|
||||
v_5 = (vec4<u32>(e20) | e21);
|
||||
let e24: u32 = a_11;
|
||||
let e25: vec4<u32> = b_11;
|
||||
v_5 = (vec4<u32>(e24) ^ e25);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -181,15 +181,15 @@ fn testStructConstructor() {
|
||||
}
|
||||
|
||||
fn testArrayConstructor() {
|
||||
var tree1: array<f32,1u> = array<f32,1u>(0.0);
|
||||
var tree_1: array<f32,1u> = array<f32,1u>(0.0);
|
||||
|
||||
}
|
||||
|
||||
fn privatePointer(a12: ptr<function, f32>) {
|
||||
fn privatePointer(a_12: ptr<function, f32>) {
|
||||
return;
|
||||
}
|
||||
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var local: f32;
|
||||
|
||||
let e3: f32 = global;
|
||||
@ -208,6 +208,6 @@ fn main1() {
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
struct Mat4x3 {
|
||||
struct Mat4x3_ {
|
||||
mx: vec4<f32>;
|
||||
my: vec4<f32>;
|
||||
mz: vec4<f32>;
|
||||
@ -6,28 +6,28 @@ struct Mat4x3 {
|
||||
|
||||
var<private> o_color: vec4<f32>;
|
||||
|
||||
fn Fma(d: ptr<function, Mat4x3>, m: Mat4x3, s: f32) {
|
||||
var m1: Mat4x3;
|
||||
var s1: f32;
|
||||
fn Fma(d: ptr<function, Mat4x3_>, m: Mat4x3_, s: f32) {
|
||||
var m_1: Mat4x3_;
|
||||
var s_1: f32;
|
||||
|
||||
m1 = m;
|
||||
s1 = s;
|
||||
let e6: Mat4x3 = (*d);
|
||||
let e8: Mat4x3 = m1;
|
||||
let e10: f32 = s1;
|
||||
m_1 = m;
|
||||
s_1 = s;
|
||||
let e6: Mat4x3_ = (*d);
|
||||
let e8: Mat4x3_ = m_1;
|
||||
let e10: f32 = s_1;
|
||||
(*d).mx = (e6.mx + (e8.mx * e10));
|
||||
let e14: Mat4x3 = (*d);
|
||||
let e16: Mat4x3 = m1;
|
||||
let e18: f32 = s1;
|
||||
let e14: Mat4x3_ = (*d);
|
||||
let e16: Mat4x3_ = m_1;
|
||||
let e18: f32 = s_1;
|
||||
(*d).my = (e14.my + (e16.my * e18));
|
||||
let e22: Mat4x3 = (*d);
|
||||
let e24: Mat4x3 = m1;
|
||||
let e26: f32 = s1;
|
||||
let e22: Mat4x3_ = (*d);
|
||||
let e24: Mat4x3_ = m_1;
|
||||
let e26: f32 = s_1;
|
||||
(*d).mz = (e22.mz + (e24.mz * e26));
|
||||
return;
|
||||
}
|
||||
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
let e1: vec4<f32> = o_color;
|
||||
let e4: vec4<f32> = vec4<f32>(1.0);
|
||||
o_color.x = e4.x;
|
||||
@ -39,6 +39,6 @@ fn main1() {
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
var<private> i: u32;
|
||||
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var local: array<f32,2u> = array<f32,2u>(1.0, 2.0);
|
||||
|
||||
let e2: u32 = i;
|
||||
@ -8,6 +8,6 @@ fn main1() {
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -37,20 +37,20 @@ var image_2d_depth: texture_depth_2d;
|
||||
fn main([[builtin(local_invocation_id)]] local_id: vec3<u32>) {
|
||||
let dim: vec2<i32> = textureDimensions(image_storage_src);
|
||||
let itc: vec2<i32> = ((dim * vec2<i32>(local_id.xy)) % vec2<i32>(10, 20));
|
||||
let value1: vec4<u32> = textureLoad(image_mipmapped_src, itc, i32(local_id.z));
|
||||
let value2: vec4<u32> = textureLoad(image_multisampled_src, itc, i32(local_id.z));
|
||||
let value4: vec4<u32> = textureLoad(image_storage_src, itc);
|
||||
let value5: vec4<u32> = textureLoad(image_array_src, itc, i32(local_id.z), (i32(local_id.z) + 1));
|
||||
textureStore(image_dst, itc.x, (((value1 + value2) + value4) + value5));
|
||||
let value1_: vec4<u32> = textureLoad(image_mipmapped_src, itc, i32(local_id.z));
|
||||
let value2_: vec4<u32> = textureLoad(image_multisampled_src, itc, i32(local_id.z));
|
||||
let value4_: vec4<u32> = textureLoad(image_storage_src, itc);
|
||||
let value5_: vec4<u32> = textureLoad(image_array_src, itc, i32(local_id.z), (i32(local_id.z) + 1));
|
||||
textureStore(image_dst, itc.x, (((value1_ + value2_) + value4_) + value5_));
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(16, 1, 1)]]
|
||||
fn depth_load([[builtin(local_invocation_id)]] local_id1: vec3<u32>) {
|
||||
let dim1: vec2<i32> = textureDimensions(image_storage_src);
|
||||
let itc1: vec2<i32> = ((dim1 * vec2<i32>(local_id1.xy)) % vec2<i32>(10, 20));
|
||||
let val: f32 = textureLoad(image_depth_multisampled_src, itc1, i32(local_id1.z));
|
||||
textureStore(image_dst, itc1.x, vec4<u32>(u32(val)));
|
||||
fn depth_load([[builtin(local_invocation_id)]] local_id_1: vec3<u32>) {
|
||||
let dim_1: vec2<i32> = textureDimensions(image_storage_src);
|
||||
let itc_1: vec2<i32> = ((dim_1 * vec2<i32>(local_id_1.xy)) % vec2<i32>(10, 20));
|
||||
let val: f32 = textureLoad(image_depth_multisampled_src, itc_1, i32(local_id_1.z));
|
||||
textureStore(image_dst, itc_1.x, vec4<u32>(u32(val)));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -81,8 +81,8 @@ fn levels_queries() -> [[builtin(position)]] vec4<f32> {
|
||||
let num_layers_cube: i32 = textureNumLayers(image_cube_array);
|
||||
let num_levels_3d: i32 = textureNumLevels(image_3d);
|
||||
let num_samples_aa: i32 = textureNumSamples(image_aa);
|
||||
let sum1: i32 = (((((((num_layers_2d + num_layers_cube) + num_samples_aa) + num_levels_2d) + num_levels_2d_array) + num_levels_3d) + num_levels_cube) + num_levels_cube_array);
|
||||
return vec4<f32>(f32(sum1));
|
||||
let sum_1: i32 = (((((((num_layers_2d + num_layers_cube) + num_samples_aa) + num_levels_2d) + num_levels_2d_array) + num_levels_3d) + num_levels_cube) + num_levels_cube_array);
|
||||
return vec4<f32>(f32(sum_1));
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
@ -98,8 +98,8 @@ fn sample() -> [[location(0)]] vec4<f32> {
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn sample_comparison() -> [[location(0)]] f32 {
|
||||
let tc1: vec2<f32> = vec2<f32>(0.5);
|
||||
let s2d_depth: f32 = textureSampleCompare(image_2d_depth, sampler_cmp, tc1, 0.5);
|
||||
let s2d_depth_level: f32 = textureSampleCompareLevel(image_2d_depth, sampler_cmp, tc1, 0.5);
|
||||
let tc_1: vec2<f32> = vec2<f32>(0.5);
|
||||
let s2d_depth: f32 = textureSampleCompare(image_2d_depth, sampler_cmp, tc_1, 0.5);
|
||||
let s2d_depth_level: f32 = textureSampleCompareLevel(image_2d_depth, sampler_cmp, tc_1, 0.5);
|
||||
return (s2d_depth + s2d_depth_level);
|
||||
}
|
||||
|
@ -20,8 +20,8 @@ fn vertex([[builtin(vertex_index)]] vertex_index: u32, [[builtin(instance_index)
|
||||
[[stage(fragment)]]
|
||||
fn fragment(in: VertexOutput, [[builtin(front_facing)]] front_facing: bool, [[builtin(sample_index)]] sample_index: u32, [[builtin(sample_mask)]] sample_mask: u32) -> FragmentOutput {
|
||||
let mask: u32 = (sample_mask & (1u << sample_index));
|
||||
let color1: f32 = select(0.0, 1.0, front_facing);
|
||||
return FragmentOutput(in.varying, mask, color1);
|
||||
let color_1: f32 = select(0.0, 1.0, front_facing);
|
||||
return FragmentOutput(in.varying, mask, color_1);
|
||||
}
|
||||
|
||||
[[stage(compute), workgroup_size(1, 1, 1)]]
|
||||
|
@ -26,6 +26,6 @@ fn main() -> FragmentInput {
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main1(val: FragmentInput) {
|
||||
fn main_1(val: FragmentInput) {
|
||||
return;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
var<private> a: f32;
|
||||
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var b: f32;
|
||||
var c: f32;
|
||||
var d: f32;
|
||||
@ -16,5 +16,5 @@ fn main1() {
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var splat: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 0.0), vec2<f32>(0.0, 1.0));
|
||||
var normal: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 1.0), vec2<f32>(2.0, 2.0));
|
||||
var a: mat2x2<f32> = mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0));
|
||||
@ -25,6 +25,6 @@ fn main1() {
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var a: vec4<f32> = vec4<f32>(1.0, 1.0, 1.0, 1.0);
|
||||
var b: vec4<f32> = vec4<f32>(2.0, 2.0, 2.0, 2.0);
|
||||
var m: mat4x4<f32>;
|
||||
@ -149,6 +149,6 @@ fn main1() {
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -8,15 +8,15 @@ let v_f32_zero: vec4<f32> = vec4<f32>(0.0, 0.0, 0.0, 0.0);
|
||||
let v_f32_half: vec4<f32> = vec4<f32>(0.5, 0.5, 0.5, 0.5);
|
||||
let v_i32_one: vec4<i32> = vec4<i32>(1, 1, 1, 1);
|
||||
fn builtins() -> vec4<f32> {
|
||||
let s1: i32 = select(0, 1, true);
|
||||
let s2: vec4<f32> = select(vec4<f32>(0.0, 0.0, 0.0, 0.0), vec4<f32>(1.0, 1.0, 1.0, 1.0), true);
|
||||
let s3: vec4<f32> = select(vec4<f32>(1.0, 1.0, 1.0, 1.0), vec4<f32>(0.0, 0.0, 0.0, 0.0), vec4<bool>(false, false, false, false));
|
||||
let m1: vec4<f32> = mix(vec4<f32>(0.0, 0.0, 0.0, 0.0), vec4<f32>(1.0, 1.0, 1.0, 1.0), vec4<f32>(0.5, 0.5, 0.5, 0.5));
|
||||
let m2: vec4<f32> = mix(vec4<f32>(0.0, 0.0, 0.0, 0.0), vec4<f32>(1.0, 1.0, 1.0, 1.0), 0.10000000149011612);
|
||||
let b1: f32 = bitcast<f32>(vec4<i32>(1, 1, 1, 1).x);
|
||||
let b2: vec4<f32> = bitcast<vec4<f32>>(vec4<i32>(1, 1, 1, 1));
|
||||
let s1_: i32 = select(0, 1, true);
|
||||
let s2_: vec4<f32> = select(vec4<f32>(0.0, 0.0, 0.0, 0.0), vec4<f32>(1.0, 1.0, 1.0, 1.0), true);
|
||||
let s3_: vec4<f32> = select(vec4<f32>(1.0, 1.0, 1.0, 1.0), vec4<f32>(0.0, 0.0, 0.0, 0.0), vec4<bool>(false, false, false, false));
|
||||
let m1_: vec4<f32> = mix(vec4<f32>(0.0, 0.0, 0.0, 0.0), vec4<f32>(1.0, 1.0, 1.0, 1.0), vec4<f32>(0.5, 0.5, 0.5, 0.5));
|
||||
let m2_: vec4<f32> = mix(vec4<f32>(0.0, 0.0, 0.0, 0.0), vec4<f32>(1.0, 1.0, 1.0, 1.0), 0.10000000149011612);
|
||||
let b1_: f32 = bitcast<f32>(vec4<i32>(1, 1, 1, 1).x);
|
||||
let b2_: vec4<f32> = bitcast<vec4<f32>>(vec4<i32>(1, 1, 1, 1));
|
||||
let v_i32_zero: vec4<i32> = vec4<i32>(vec4<f32>(0.0, 0.0, 0.0, 0.0));
|
||||
return (((((vec4<f32>((vec4<i32>(s1) + v_i32_zero)) + s2) + m1) + m2) + vec4<f32>(b1)) + b2);
|
||||
return (((((vec4<f32>((vec4<i32>(s1_) + v_i32_zero)) + s2_) + m1_) + m2_) + vec4<f32>(b1_)) + b2_);
|
||||
}
|
||||
|
||||
fn splat() -> vec4<f32> {
|
||||
@ -47,8 +47,8 @@ fn constructors() -> f32 {
|
||||
}
|
||||
|
||||
fn modulo() {
|
||||
let a1: i32 = (1 % 1);
|
||||
let b1: f32 = (1.0 % 1.0);
|
||||
let a_1: i32 = (1 % 1);
|
||||
let b_1: f32 = (1.0 % 1.0);
|
||||
let c: vec3<i32> = (vec3<i32>(1) % vec3<i32>(1));
|
||||
let d: vec3<f32> = (vec3<f32>(1.0) % vec3<f32>(1.0));
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
[[block]]
|
||||
struct DynamicArray {
|
||||
array1: [[stride(4)]] array<u32>;
|
||||
array_: [[stride(4)]] array<u32>;
|
||||
};
|
||||
|
||||
fn f() {
|
||||
@ -11,9 +11,9 @@ fn f() {
|
||||
return;
|
||||
}
|
||||
|
||||
fn index_dynamic_array(p: ptr<workgroup, DynamicArray>, i: i32, v1: u32) -> u32 {
|
||||
let old: u32 = (*p).array1[i];
|
||||
(*p).array1[i] = v1;
|
||||
fn index_dynamic_array(p: ptr<workgroup, DynamicArray>, i: i32, v_1: u32) -> u32 {
|
||||
let old: u32 = (*p).array_[i];
|
||||
(*p).array_[i] = v_1;
|
||||
return old;
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var scalar_target: i32;
|
||||
var scalar: i32 = 1;
|
||||
var vec_target: vec2<u32>;
|
||||
var vec1: vec2<u32> = vec2<u32>(1u, 1u);
|
||||
var vec_: vec2<u32> = vec2<u32>(1u, 1u);
|
||||
var mat_target: mat4x3<f32>;
|
||||
var mat1: mat4x3<f32> = mat4x3<f32>(vec3<f32>(1.0, 0.0, 0.0), vec3<f32>(0.0, 1.0, 0.0), vec3<f32>(0.0, 0.0, 1.0), vec3<f32>(0.0, 0.0, 0.0));
|
||||
var mat_: mat4x3<f32> = mat4x3<f32>(vec3<f32>(1.0, 0.0, 0.0), vec3<f32>(0.0, 1.0, 0.0), vec3<f32>(0.0, 0.0, 1.0), vec3<f32>(0.0, 0.0, 0.0));
|
||||
|
||||
let e3: i32 = scalar;
|
||||
scalar = (e3 + 1);
|
||||
@ -13,28 +13,28 @@ fn main1() {
|
||||
let e8: i32 = (e6 - 1);
|
||||
scalar = e8;
|
||||
scalar_target = e8;
|
||||
let e14: vec2<u32> = vec1;
|
||||
vec1 = (e14 - vec2<u32>(1u));
|
||||
let e14: vec2<u32> = vec_;
|
||||
vec_ = (e14 - vec2<u32>(1u));
|
||||
vec_target = e14;
|
||||
let e18: vec2<u32> = vec1;
|
||||
let e18: vec2<u32> = vec_;
|
||||
let e21: vec2<u32> = (e18 + vec2<u32>(1u));
|
||||
vec1 = e21;
|
||||
vec_ = e21;
|
||||
vec_target = e21;
|
||||
let e24: f32 = f32(1);
|
||||
let e32: mat4x3<f32> = mat1;
|
||||
let e32: mat4x3<f32> = mat_;
|
||||
let e34: vec3<f32> = vec3<f32>(1.0);
|
||||
mat1 = (e32 + mat4x3<f32>(e34, e34, e34, e34));
|
||||
mat_ = (e32 + mat4x3<f32>(e34, e34, e34, e34));
|
||||
mat_target = e32;
|
||||
let e37: mat4x3<f32> = mat1;
|
||||
let e37: mat4x3<f32> = mat_;
|
||||
let e39: vec3<f32> = vec3<f32>(1.0);
|
||||
let e41: mat4x3<f32> = (e37 - mat4x3<f32>(e39, e39, e39, e39));
|
||||
mat1 = e41;
|
||||
mat_ = e41;
|
||||
mat_target = e41;
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -9,23 +9,23 @@ struct VertexOutput {
|
||||
};
|
||||
|
||||
var<private> v_uv: vec2<f32>;
|
||||
var<private> a_uv1: vec2<f32>;
|
||||
var<private> a_uv_1: vec2<f32>;
|
||||
var<private> perVertexStruct: gl_PerVertex = gl_PerVertex(vec4<f32>(0.0, 0.0, 0.0, 1.0), );
|
||||
var<private> a_pos1: vec2<f32>;
|
||||
var<private> a_pos_1: vec2<f32>;
|
||||
|
||||
fn main1() {
|
||||
let e12: vec2<f32> = a_uv1;
|
||||
fn main_1() {
|
||||
let e12: vec2<f32> = a_uv_1;
|
||||
v_uv = e12;
|
||||
let e13: vec2<f32> = a_pos1;
|
||||
let e13: vec2<f32> = a_pos_1;
|
||||
perVertexStruct.gl_Position = vec4<f32>(e13.x, e13.y, 0.0, 1.0);
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main([[location(1)]] a_uv: vec2<f32>, [[location(0)]] a_pos: vec2<f32>) -> VertexOutput {
|
||||
a_uv1 = a_uv;
|
||||
a_pos1 = a_pos;
|
||||
main1();
|
||||
a_uv_1 = a_uv;
|
||||
a_pos_1 = a_pos;
|
||||
main_1();
|
||||
let e7: vec2<f32> = v_uv;
|
||||
let e8: vec4<f32> = perVertexStruct.gl_Position;
|
||||
return VertexOutput(e7, e8);
|
||||
|
@ -16,8 +16,8 @@ fn main([[location(0)]] pos: vec2<f32>, [[location(1)]] uv: vec2<f32>) -> Vertex
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main1([[location(0)]] uv1: vec2<f32>) -> [[location(0)]] vec4<f32> {
|
||||
let color: vec4<f32> = textureSample(u_texture, u_sampler, uv1);
|
||||
fn main_1([[location(0)]] uv_1: vec2<f32>) -> [[location(0)]] vec4<f32> {
|
||||
let color: vec4<f32> = textureSample(u_texture, u_sampler, uv_1);
|
||||
if ((color.w == 0.0)) {
|
||||
discard;
|
||||
}
|
||||
|
@ -2,18 +2,18 @@ struct FragmentOutput {
|
||||
[[location(0)]] o_color: vec4<f32>;
|
||||
};
|
||||
|
||||
var<private> v_uv1: vec2<f32>;
|
||||
var<private> v_uv_1: vec2<f32>;
|
||||
var<private> o_color: vec4<f32>;
|
||||
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
o_color = vec4<f32>(1.0, 1.0, 1.0, 1.0);
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main([[location(0)]] v_uv: vec2<f32>) -> FragmentOutput {
|
||||
v_uv1 = v_uv;
|
||||
main1();
|
||||
v_uv_1 = v_uv;
|
||||
main_1();
|
||||
let e7: vec4<f32> = o_color;
|
||||
return FragmentOutput(e7);
|
||||
}
|
||||
|
@ -3,24 +3,24 @@ struct VertexOutput {
|
||||
[[builtin(position)]] member: vec4<f32>;
|
||||
};
|
||||
|
||||
var<private> a_pos1: vec2<f32>;
|
||||
var<private> a_uv1: vec2<f32>;
|
||||
var<private> a_pos_1: vec2<f32>;
|
||||
var<private> a_uv_1: vec2<f32>;
|
||||
var<private> v_uv: vec2<f32>;
|
||||
var<private> gl_Position: vec4<f32>;
|
||||
|
||||
fn main1() {
|
||||
let e4: vec2<f32> = a_uv1;
|
||||
fn main_1() {
|
||||
let e4: vec2<f32> = a_uv_1;
|
||||
v_uv = e4;
|
||||
let e6: vec2<f32> = a_pos1;
|
||||
let e6: vec2<f32> = a_pos_1;
|
||||
gl_Position = vec4<f32>((1.2000000476837158 * e6), 0.0, 1.0);
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn main([[location(0)]] a_pos: vec2<f32>, [[location(1)]] a_uv: vec2<f32>) -> VertexOutput {
|
||||
a_pos1 = a_pos;
|
||||
a_uv1 = a_uv;
|
||||
main1();
|
||||
a_pos_1 = a_pos;
|
||||
a_uv_1 = a_uv;
|
||||
main_1();
|
||||
let e14: vec2<f32> = v_uv;
|
||||
let e16: vec4<f32> = gl_Position;
|
||||
return VertexOutput(e14, e16);
|
||||
|
@ -26,331 +26,331 @@ var texCubeArrayShadow: texture_depth_cube_array;
|
||||
var tex3DShadow: texture_3d<f32>;
|
||||
[[group(1), binding(17)]]
|
||||
var sampShadow: sampler_comparison;
|
||||
var<private> texcoord1: vec4<f32>;
|
||||
var<private> texcoord_1: vec4<f32>;
|
||||
|
||||
fn testTex1D(coord: f32) {
|
||||
var coord1: f32;
|
||||
var coord_1: f32;
|
||||
var c: vec4<f32>;
|
||||
|
||||
coord1 = coord;
|
||||
let e18: f32 = coord1;
|
||||
coord_1 = coord;
|
||||
let e18: f32 = coord_1;
|
||||
let e19: vec4<f32> = textureSample(tex1D, samp, e18);
|
||||
c = e19;
|
||||
let e22: f32 = coord1;
|
||||
let e22: f32 = coord_1;
|
||||
let e24: vec4<f32> = textureSampleBias(tex1D, samp, e22, 2.0);
|
||||
c = e24;
|
||||
let e28: f32 = coord1;
|
||||
let e28: f32 = coord_1;
|
||||
let e31: vec4<f32> = textureSampleGrad(tex1D, samp, e28, 4.0, 4.0);
|
||||
c = e31;
|
||||
let e36: f32 = coord1;
|
||||
let e36: f32 = coord_1;
|
||||
let e40: vec4<f32> = textureSampleGrad(tex1D, samp, e36, 4.0, 4.0, 5);
|
||||
c = e40;
|
||||
let e43: f32 = coord1;
|
||||
let e43: f32 = coord_1;
|
||||
let e45: vec4<f32> = textureSampleLevel(tex1D, samp, e43, 3.0);
|
||||
c = e45;
|
||||
let e49: f32 = coord1;
|
||||
let e49: f32 = coord_1;
|
||||
let e52: vec4<f32> = textureSampleLevel(tex1D, samp, e49, 3.0, 5);
|
||||
c = e52;
|
||||
let e55: f32 = coord1;
|
||||
let e55: f32 = coord_1;
|
||||
let e57: vec4<f32> = textureSample(tex1D, samp, e55, 5);
|
||||
c = e57;
|
||||
let e61: f32 = coord1;
|
||||
let e61: f32 = coord_1;
|
||||
let e64: vec4<f32> = textureSampleBias(tex1D, samp, e61, 2.0, 5);
|
||||
c = e64;
|
||||
let e65: f32 = coord1;
|
||||
let e68: f32 = coord1;
|
||||
let e65: f32 = coord_1;
|
||||
let e68: f32 = coord_1;
|
||||
let e70: vec2<f32> = vec2<f32>(e68, 6.0);
|
||||
let e74: vec4<f32> = textureSample(tex1D, samp, (e70.x / e70.y));
|
||||
c = e74;
|
||||
let e75: f32 = coord1;
|
||||
let e80: f32 = coord1;
|
||||
let e75: f32 = coord_1;
|
||||
let e80: f32 = coord_1;
|
||||
let e84: vec4<f32> = vec4<f32>(e80, 0.0, 0.0, 6.0);
|
||||
let e90: vec4<f32> = textureSample(tex1D, samp, (e84.xyz / vec3<f32>(e84.w)).x);
|
||||
c = e90;
|
||||
let e91: f32 = coord1;
|
||||
let e95: f32 = coord1;
|
||||
let e91: f32 = coord_1;
|
||||
let e95: f32 = coord_1;
|
||||
let e97: vec2<f32> = vec2<f32>(e95, 6.0);
|
||||
let e102: vec4<f32> = textureSampleBias(tex1D, samp, (e97.x / e97.y), 2.0);
|
||||
c = e102;
|
||||
let e103: f32 = coord1;
|
||||
let e109: f32 = coord1;
|
||||
let e103: f32 = coord_1;
|
||||
let e109: f32 = coord_1;
|
||||
let e113: vec4<f32> = vec4<f32>(e109, 0.0, 0.0, 6.0);
|
||||
let e120: vec4<f32> = textureSampleBias(tex1D, samp, (e113.xyz / vec3<f32>(e113.w)).x, 2.0);
|
||||
c = e120;
|
||||
let e121: f32 = coord1;
|
||||
let e126: f32 = coord1;
|
||||
let e121: f32 = coord_1;
|
||||
let e126: f32 = coord_1;
|
||||
let e128: vec2<f32> = vec2<f32>(e126, 6.0);
|
||||
let e134: vec4<f32> = textureSampleGrad(tex1D, samp, (e128.x / e128.y), 4.0, 4.0);
|
||||
c = e134;
|
||||
let e135: f32 = coord1;
|
||||
let e142: f32 = coord1;
|
||||
let e135: f32 = coord_1;
|
||||
let e142: f32 = coord_1;
|
||||
let e146: vec4<f32> = vec4<f32>(e142, 0.0, 0.0, 6.0);
|
||||
let e154: vec4<f32> = textureSampleGrad(tex1D, samp, (e146.xyz / vec3<f32>(e146.w)).x, 4.0, 4.0);
|
||||
c = e154;
|
||||
let e155: f32 = coord1;
|
||||
let e161: f32 = coord1;
|
||||
let e155: f32 = coord_1;
|
||||
let e161: f32 = coord_1;
|
||||
let e163: vec2<f32> = vec2<f32>(e161, 6.0);
|
||||
let e170: vec4<f32> = textureSampleGrad(tex1D, samp, (e163.x / e163.y), 4.0, 4.0, 5);
|
||||
c = e170;
|
||||
let e171: f32 = coord1;
|
||||
let e179: f32 = coord1;
|
||||
let e171: f32 = coord_1;
|
||||
let e179: f32 = coord_1;
|
||||
let e183: vec4<f32> = vec4<f32>(e179, 0.0, 0.0, 6.0);
|
||||
let e192: vec4<f32> = textureSampleGrad(tex1D, samp, (e183.xyz / vec3<f32>(e183.w)).x, 4.0, 4.0, 5);
|
||||
c = e192;
|
||||
let e193: f32 = coord1;
|
||||
let e197: f32 = coord1;
|
||||
let e193: f32 = coord_1;
|
||||
let e197: f32 = coord_1;
|
||||
let e199: vec2<f32> = vec2<f32>(e197, 6.0);
|
||||
let e204: vec4<f32> = textureSampleLevel(tex1D, samp, (e199.x / e199.y), 3.0);
|
||||
c = e204;
|
||||
let e205: f32 = coord1;
|
||||
let e211: f32 = coord1;
|
||||
let e205: f32 = coord_1;
|
||||
let e211: f32 = coord_1;
|
||||
let e215: vec4<f32> = vec4<f32>(e211, 0.0, 0.0, 6.0);
|
||||
let e222: vec4<f32> = textureSampleLevel(tex1D, samp, (e215.xyz / vec3<f32>(e215.w)).x, 3.0);
|
||||
c = e222;
|
||||
let e223: f32 = coord1;
|
||||
let e228: f32 = coord1;
|
||||
let e223: f32 = coord_1;
|
||||
let e228: f32 = coord_1;
|
||||
let e230: vec2<f32> = vec2<f32>(e228, 6.0);
|
||||
let e236: vec4<f32> = textureSampleLevel(tex1D, samp, (e230.x / e230.y), 3.0, 5);
|
||||
c = e236;
|
||||
let e237: f32 = coord1;
|
||||
let e244: f32 = coord1;
|
||||
let e237: f32 = coord_1;
|
||||
let e244: f32 = coord_1;
|
||||
let e248: vec4<f32> = vec4<f32>(e244, 0.0, 0.0, 6.0);
|
||||
let e256: vec4<f32> = textureSampleLevel(tex1D, samp, (e248.xyz / vec3<f32>(e248.w)).x, 3.0, 5);
|
||||
c = e256;
|
||||
let e257: f32 = coord1;
|
||||
let e261: f32 = coord1;
|
||||
let e257: f32 = coord_1;
|
||||
let e261: f32 = coord_1;
|
||||
let e263: vec2<f32> = vec2<f32>(e261, 6.0);
|
||||
let e268: vec4<f32> = textureSample(tex1D, samp, (e263.x / e263.y), 5);
|
||||
c = e268;
|
||||
let e269: f32 = coord1;
|
||||
let e275: f32 = coord1;
|
||||
let e269: f32 = coord_1;
|
||||
let e275: f32 = coord_1;
|
||||
let e279: vec4<f32> = vec4<f32>(e275, 0.0, 0.0, 6.0);
|
||||
let e286: vec4<f32> = textureSample(tex1D, samp, (e279.xyz / vec3<f32>(e279.w)).x, 5);
|
||||
c = e286;
|
||||
let e287: f32 = coord1;
|
||||
let e292: f32 = coord1;
|
||||
let e287: f32 = coord_1;
|
||||
let e292: f32 = coord_1;
|
||||
let e294: vec2<f32> = vec2<f32>(e292, 6.0);
|
||||
let e300: vec4<f32> = textureSampleBias(tex1D, samp, (e294.x / e294.y), 2.0, 5);
|
||||
c = e300;
|
||||
let e301: f32 = coord1;
|
||||
let e308: f32 = coord1;
|
||||
let e301: f32 = coord_1;
|
||||
let e308: f32 = coord_1;
|
||||
let e312: vec4<f32> = vec4<f32>(e308, 0.0, 0.0, 6.0);
|
||||
let e320: vec4<f32> = textureSampleBias(tex1D, samp, (e312.xyz / vec3<f32>(e312.w)).x, 2.0, 5);
|
||||
c = e320;
|
||||
return;
|
||||
}
|
||||
|
||||
fn testTex1DArray(coord2: vec2<f32>) {
|
||||
var coord3: vec2<f32>;
|
||||
var c1: vec4<f32>;
|
||||
fn testTex1DArray(coord_2: vec2<f32>) {
|
||||
var coord_3: vec2<f32>;
|
||||
var c_1: vec4<f32>;
|
||||
|
||||
coord3 = coord2;
|
||||
let e18: vec2<f32> = coord3;
|
||||
coord_3 = coord_2;
|
||||
let e18: vec2<f32> = coord_3;
|
||||
let e22: vec4<f32> = textureSample(tex1DArray, samp, e18.x, i32(e18.y));
|
||||
c1 = e22;
|
||||
let e25: vec2<f32> = coord3;
|
||||
c_1 = e22;
|
||||
let e25: vec2<f32> = coord_3;
|
||||
let e30: vec4<f32> = textureSampleBias(tex1DArray, samp, e25.x, i32(e25.y), 2.0);
|
||||
c1 = e30;
|
||||
let e34: vec2<f32> = coord3;
|
||||
c_1 = e30;
|
||||
let e34: vec2<f32> = coord_3;
|
||||
let e40: vec4<f32> = textureSampleGrad(tex1DArray, samp, e34.x, i32(e34.y), 4.0, 4.0);
|
||||
c1 = e40;
|
||||
let e45: vec2<f32> = coord3;
|
||||
c_1 = e40;
|
||||
let e45: vec2<f32> = coord_3;
|
||||
let e52: vec4<f32> = textureSampleGrad(tex1DArray, samp, e45.x, i32(e45.y), 4.0, 4.0, 5);
|
||||
c1 = e52;
|
||||
let e55: vec2<f32> = coord3;
|
||||
c_1 = e52;
|
||||
let e55: vec2<f32> = coord_3;
|
||||
let e60: vec4<f32> = textureSampleLevel(tex1DArray, samp, e55.x, i32(e55.y), 3.0);
|
||||
c1 = e60;
|
||||
let e64: vec2<f32> = coord3;
|
||||
c_1 = e60;
|
||||
let e64: vec2<f32> = coord_3;
|
||||
let e70: vec4<f32> = textureSampleLevel(tex1DArray, samp, e64.x, i32(e64.y), 3.0, 5);
|
||||
c1 = e70;
|
||||
let e73: vec2<f32> = coord3;
|
||||
c_1 = e70;
|
||||
let e73: vec2<f32> = coord_3;
|
||||
let e78: vec4<f32> = textureSample(tex1DArray, samp, e73.x, i32(e73.y), 5);
|
||||
c1 = e78;
|
||||
let e82: vec2<f32> = coord3;
|
||||
c_1 = e78;
|
||||
let e82: vec2<f32> = coord_3;
|
||||
let e88: vec4<f32> = textureSampleBias(tex1DArray, samp, e82.x, i32(e82.y), 2.0, 5);
|
||||
c1 = e88;
|
||||
c_1 = e88;
|
||||
return;
|
||||
}
|
||||
|
||||
fn testTex2D(coord4: vec2<f32>) {
|
||||
var coord5: vec2<f32>;
|
||||
var c2: vec4<f32>;
|
||||
fn testTex2D(coord_4: vec2<f32>) {
|
||||
var coord_5: vec2<f32>;
|
||||
var c_2: vec4<f32>;
|
||||
|
||||
coord5 = coord4;
|
||||
let e18: vec2<f32> = coord5;
|
||||
coord_5 = coord_4;
|
||||
let e18: vec2<f32> = coord_5;
|
||||
let e19: vec4<f32> = textureSample(tex2D, samp, e18);
|
||||
c2 = e19;
|
||||
let e22: vec2<f32> = coord5;
|
||||
c_2 = e19;
|
||||
let e22: vec2<f32> = coord_5;
|
||||
let e24: vec4<f32> = textureSampleBias(tex2D, samp, e22, 2.0);
|
||||
c2 = e24;
|
||||
let e30: vec2<f32> = coord5;
|
||||
c_2 = e24;
|
||||
let e30: vec2<f32> = coord_5;
|
||||
let e35: vec4<f32> = textureSampleGrad(tex2D, samp, e30, vec2<f32>(4.0), vec2<f32>(4.0));
|
||||
c2 = e35;
|
||||
let e43: vec2<f32> = coord5;
|
||||
c_2 = e35;
|
||||
let e43: vec2<f32> = coord_5;
|
||||
let e50: vec4<f32> = textureSampleGrad(tex2D, samp, e43, vec2<f32>(4.0), vec2<f32>(4.0), vec2<i32>(5, 5));
|
||||
c2 = e50;
|
||||
let e53: vec2<f32> = coord5;
|
||||
c_2 = e50;
|
||||
let e53: vec2<f32> = coord_5;
|
||||
let e55: vec4<f32> = textureSampleLevel(tex2D, samp, e53, 3.0);
|
||||
c2 = e55;
|
||||
let e60: vec2<f32> = coord5;
|
||||
c_2 = e55;
|
||||
let e60: vec2<f32> = coord_5;
|
||||
let e64: vec4<f32> = textureSampleLevel(tex2D, samp, e60, 3.0, vec2<i32>(5, 5));
|
||||
c2 = e64;
|
||||
let e68: vec2<f32> = coord5;
|
||||
c_2 = e64;
|
||||
let e68: vec2<f32> = coord_5;
|
||||
let e71: vec4<f32> = textureSample(tex2D, samp, e68, vec2<i32>(5, 5));
|
||||
c2 = e71;
|
||||
let e76: vec2<f32> = coord5;
|
||||
c_2 = e71;
|
||||
let e76: vec2<f32> = coord_5;
|
||||
let e80: vec4<f32> = textureSampleBias(tex2D, samp, e76, 2.0, vec2<i32>(5, 5));
|
||||
c2 = e80;
|
||||
let e81: vec2<f32> = coord5;
|
||||
let e84: vec2<f32> = coord5;
|
||||
c_2 = e80;
|
||||
let e81: vec2<f32> = coord_5;
|
||||
let e84: vec2<f32> = coord_5;
|
||||
let e86: vec3<f32> = vec3<f32>(e84, 6.0);
|
||||
let e91: vec4<f32> = textureSample(tex2D, samp, (e86.xy / vec2<f32>(e86.z)));
|
||||
c2 = e91;
|
||||
let e92: vec2<f32> = coord5;
|
||||
let e96: vec2<f32> = coord5;
|
||||
c_2 = e91;
|
||||
let e92: vec2<f32> = coord_5;
|
||||
let e96: vec2<f32> = coord_5;
|
||||
let e99: vec4<f32> = vec4<f32>(e96, 0.0, 6.0);
|
||||
let e105: vec4<f32> = textureSample(tex2D, samp, (e99.xyz / vec3<f32>(e99.w)).xy);
|
||||
c2 = e105;
|
||||
let e106: vec2<f32> = coord5;
|
||||
let e110: vec2<f32> = coord5;
|
||||
c_2 = e105;
|
||||
let e106: vec2<f32> = coord_5;
|
||||
let e110: vec2<f32> = coord_5;
|
||||
let e112: vec3<f32> = vec3<f32>(e110, 6.0);
|
||||
let e118: vec4<f32> = textureSampleBias(tex2D, samp, (e112.xy / vec2<f32>(e112.z)), 2.0);
|
||||
c2 = e118;
|
||||
let e119: vec2<f32> = coord5;
|
||||
let e124: vec2<f32> = coord5;
|
||||
c_2 = e118;
|
||||
let e119: vec2<f32> = coord_5;
|
||||
let e124: vec2<f32> = coord_5;
|
||||
let e127: vec4<f32> = vec4<f32>(e124, 0.0, 6.0);
|
||||
let e134: vec4<f32> = textureSampleBias(tex2D, samp, (e127.xyz / vec3<f32>(e127.w)).xy, 2.0);
|
||||
c2 = e134;
|
||||
let e135: vec2<f32> = coord5;
|
||||
let e142: vec2<f32> = coord5;
|
||||
c_2 = e134;
|
||||
let e135: vec2<f32> = coord_5;
|
||||
let e142: vec2<f32> = coord_5;
|
||||
let e144: vec3<f32> = vec3<f32>(e142, 6.0);
|
||||
let e153: vec4<f32> = textureSampleGrad(tex2D, samp, (e144.xy / vec2<f32>(e144.z)), vec2<f32>(4.0), vec2<f32>(4.0));
|
||||
c2 = e153;
|
||||
let e154: vec2<f32> = coord5;
|
||||
let e162: vec2<f32> = coord5;
|
||||
c_2 = e153;
|
||||
let e154: vec2<f32> = coord_5;
|
||||
let e162: vec2<f32> = coord_5;
|
||||
let e165: vec4<f32> = vec4<f32>(e162, 0.0, 6.0);
|
||||
let e175: vec4<f32> = textureSampleGrad(tex2D, samp, (e165.xyz / vec3<f32>(e165.w)).xy, vec2<f32>(4.0), vec2<f32>(4.0));
|
||||
c2 = e175;
|
||||
let e176: vec2<f32> = coord5;
|
||||
let e185: vec2<f32> = coord5;
|
||||
c_2 = e175;
|
||||
let e176: vec2<f32> = coord_5;
|
||||
let e185: vec2<f32> = coord_5;
|
||||
let e187: vec3<f32> = vec3<f32>(e185, 6.0);
|
||||
let e198: vec4<f32> = textureSampleGrad(tex2D, samp, (e187.xy / vec2<f32>(e187.z)), vec2<f32>(4.0), vec2<f32>(4.0), vec2<i32>(5, 5));
|
||||
c2 = e198;
|
||||
let e199: vec2<f32> = coord5;
|
||||
let e209: vec2<f32> = coord5;
|
||||
c_2 = e198;
|
||||
let e199: vec2<f32> = coord_5;
|
||||
let e209: vec2<f32> = coord_5;
|
||||
let e212: vec4<f32> = vec4<f32>(e209, 0.0, 6.0);
|
||||
let e224: vec4<f32> = textureSampleGrad(tex2D, samp, (e212.xyz / vec3<f32>(e212.w)).xy, vec2<f32>(4.0), vec2<f32>(4.0), vec2<i32>(5, 5));
|
||||
c2 = e224;
|
||||
let e225: vec2<f32> = coord5;
|
||||
let e229: vec2<f32> = coord5;
|
||||
c_2 = e224;
|
||||
let e225: vec2<f32> = coord_5;
|
||||
let e229: vec2<f32> = coord_5;
|
||||
let e231: vec3<f32> = vec3<f32>(e229, 6.0);
|
||||
let e237: vec4<f32> = textureSampleLevel(tex2D, samp, (e231.xy / vec2<f32>(e231.z)), 3.0);
|
||||
c2 = e237;
|
||||
let e238: vec2<f32> = coord5;
|
||||
let e243: vec2<f32> = coord5;
|
||||
c_2 = e237;
|
||||
let e238: vec2<f32> = coord_5;
|
||||
let e243: vec2<f32> = coord_5;
|
||||
let e246: vec4<f32> = vec4<f32>(e243, 0.0, 6.0);
|
||||
let e253: vec4<f32> = textureSampleLevel(tex2D, samp, (e246.xyz / vec3<f32>(e246.w)).xy, 3.0);
|
||||
c2 = e253;
|
||||
let e254: vec2<f32> = coord5;
|
||||
let e260: vec2<f32> = coord5;
|
||||
c_2 = e253;
|
||||
let e254: vec2<f32> = coord_5;
|
||||
let e260: vec2<f32> = coord_5;
|
||||
let e262: vec3<f32> = vec3<f32>(e260, 6.0);
|
||||
let e270: vec4<f32> = textureSampleLevel(tex2D, samp, (e262.xy / vec2<f32>(e262.z)), 3.0, vec2<i32>(5, 5));
|
||||
c2 = e270;
|
||||
let e271: vec2<f32> = coord5;
|
||||
let e278: vec2<f32> = coord5;
|
||||
c_2 = e270;
|
||||
let e271: vec2<f32> = coord_5;
|
||||
let e278: vec2<f32> = coord_5;
|
||||
let e281: vec4<f32> = vec4<f32>(e278, 0.0, 6.0);
|
||||
let e290: vec4<f32> = textureSampleLevel(tex2D, samp, (e281.xyz / vec3<f32>(e281.w)).xy, 3.0, vec2<i32>(5, 5));
|
||||
c2 = e290;
|
||||
let e291: vec2<f32> = coord5;
|
||||
let e296: vec2<f32> = coord5;
|
||||
c_2 = e290;
|
||||
let e291: vec2<f32> = coord_5;
|
||||
let e296: vec2<f32> = coord_5;
|
||||
let e298: vec3<f32> = vec3<f32>(e296, 6.0);
|
||||
let e305: vec4<f32> = textureSample(tex2D, samp, (e298.xy / vec2<f32>(e298.z)), vec2<i32>(5, 5));
|
||||
c2 = e305;
|
||||
let e306: vec2<f32> = coord5;
|
||||
let e312: vec2<f32> = coord5;
|
||||
c_2 = e305;
|
||||
let e306: vec2<f32> = coord_5;
|
||||
let e312: vec2<f32> = coord_5;
|
||||
let e315: vec4<f32> = vec4<f32>(e312, 0.0, 6.0);
|
||||
let e323: vec4<f32> = textureSample(tex2D, samp, (e315.xyz / vec3<f32>(e315.w)).xy, vec2<i32>(5, 5));
|
||||
c2 = e323;
|
||||
let e324: vec2<f32> = coord5;
|
||||
let e330: vec2<f32> = coord5;
|
||||
c_2 = e323;
|
||||
let e324: vec2<f32> = coord_5;
|
||||
let e330: vec2<f32> = coord_5;
|
||||
let e332: vec3<f32> = vec3<f32>(e330, 6.0);
|
||||
let e340: vec4<f32> = textureSampleBias(tex2D, samp, (e332.xy / vec2<f32>(e332.z)), 2.0, vec2<i32>(5, 5));
|
||||
c2 = e340;
|
||||
let e341: vec2<f32> = coord5;
|
||||
let e348: vec2<f32> = coord5;
|
||||
c_2 = e340;
|
||||
let e341: vec2<f32> = coord_5;
|
||||
let e348: vec2<f32> = coord_5;
|
||||
let e351: vec4<f32> = vec4<f32>(e348, 0.0, 6.0);
|
||||
let e360: vec4<f32> = textureSampleBias(tex2D, samp, (e351.xyz / vec3<f32>(e351.w)).xy, 2.0, vec2<i32>(5, 5));
|
||||
c2 = e360;
|
||||
c_2 = e360;
|
||||
return;
|
||||
}
|
||||
|
||||
fn testTex2DShadow(coord6: vec2<f32>) {
|
||||
var coord7: vec2<f32>;
|
||||
fn testTex2DShadow(coord_6: vec2<f32>) {
|
||||
var coord_7: vec2<f32>;
|
||||
var d: f32;
|
||||
|
||||
coord7 = coord6;
|
||||
let e17: vec2<f32> = coord7;
|
||||
let e20: vec2<f32> = coord7;
|
||||
coord_7 = coord_6;
|
||||
let e17: vec2<f32> = coord_7;
|
||||
let e20: vec2<f32> = coord_7;
|
||||
let e22: vec3<f32> = vec3<f32>(e20, 1.0);
|
||||
let e25: f32 = textureSampleCompare(tex2DShadow, sampShadow, e22.xy, e22.z);
|
||||
d = e25;
|
||||
let e26: vec2<f32> = coord7;
|
||||
let e33: vec2<f32> = coord7;
|
||||
let e26: vec2<f32> = coord_7;
|
||||
let e33: vec2<f32> = coord_7;
|
||||
let e35: vec3<f32> = vec3<f32>(e33, 1.0);
|
||||
let e42: f32 = textureSampleCompareLevel(tex2DShadow, sampShadow, e35.xy, e35.z);
|
||||
d = e42;
|
||||
let e43: vec2<f32> = coord7;
|
||||
let e52: vec2<f32> = coord7;
|
||||
let e43: vec2<f32> = coord_7;
|
||||
let e52: vec2<f32> = coord_7;
|
||||
let e54: vec3<f32> = vec3<f32>(e52, 1.0);
|
||||
let e63: f32 = textureSampleCompareLevel(tex2DShadow, sampShadow, e54.xy, e54.z, vec2<i32>(5, 5));
|
||||
d = e63;
|
||||
let e64: vec2<f32> = coord7;
|
||||
let e68: vec2<f32> = coord7;
|
||||
let e64: vec2<f32> = coord_7;
|
||||
let e68: vec2<f32> = coord_7;
|
||||
let e70: vec3<f32> = vec3<f32>(e68, 1.0);
|
||||
let e74: f32 = textureSampleCompareLevel(tex2DShadow, sampShadow, e70.xy, e70.z);
|
||||
d = e74;
|
||||
let e75: vec2<f32> = coord7;
|
||||
let e81: vec2<f32> = coord7;
|
||||
let e75: vec2<f32> = coord_7;
|
||||
let e81: vec2<f32> = coord_7;
|
||||
let e83: vec3<f32> = vec3<f32>(e81, 1.0);
|
||||
let e89: f32 = textureSampleCompareLevel(tex2DShadow, sampShadow, e83.xy, e83.z, vec2<i32>(5, 5));
|
||||
d = e89;
|
||||
let e90: vec2<f32> = coord7;
|
||||
let e95: vec2<f32> = coord7;
|
||||
let e90: vec2<f32> = coord_7;
|
||||
let e95: vec2<f32> = coord_7;
|
||||
let e97: vec3<f32> = vec3<f32>(e95, 1.0);
|
||||
let e102: f32 = textureSampleCompare(tex2DShadow, sampShadow, e97.xy, e97.z, vec2<i32>(5, 5));
|
||||
d = e102;
|
||||
let e103: vec2<f32> = coord7;
|
||||
let e107: vec2<f32> = coord7;
|
||||
let e103: vec2<f32> = coord_7;
|
||||
let e107: vec2<f32> = coord_7;
|
||||
let e110: vec4<f32> = vec4<f32>(e107, 1.0, 6.0);
|
||||
let e114: vec3<f32> = (e110.xyz / vec3<f32>(e110.w));
|
||||
let e117: f32 = textureSampleCompare(tex2DShadow, sampShadow, e114.xy, e114.z);
|
||||
d = e117;
|
||||
let e118: vec2<f32> = coord7;
|
||||
let e126: vec2<f32> = coord7;
|
||||
let e118: vec2<f32> = coord_7;
|
||||
let e126: vec2<f32> = coord_7;
|
||||
let e129: vec4<f32> = vec4<f32>(e126, 1.0, 6.0);
|
||||
let e137: vec3<f32> = (e129.xyz / vec3<f32>(e129.w));
|
||||
let e140: f32 = textureSampleCompareLevel(tex2DShadow, sampShadow, e137.xy, e137.z);
|
||||
d = e140;
|
||||
let e141: vec2<f32> = coord7;
|
||||
let e151: vec2<f32> = coord7;
|
||||
let e141: vec2<f32> = coord_7;
|
||||
let e151: vec2<f32> = coord_7;
|
||||
let e154: vec4<f32> = vec4<f32>(e151, 1.0, 6.0);
|
||||
let e164: vec3<f32> = (e154.xyz / vec3<f32>(e154.w));
|
||||
let e167: f32 = textureSampleCompareLevel(tex2DShadow, sampShadow, e164.xy, e164.z, vec2<i32>(5, 5));
|
||||
d = e167;
|
||||
let e168: vec2<f32> = coord7;
|
||||
let e173: vec2<f32> = coord7;
|
||||
let e168: vec2<f32> = coord_7;
|
||||
let e173: vec2<f32> = coord_7;
|
||||
let e176: vec4<f32> = vec4<f32>(e173, 1.0, 6.0);
|
||||
let e181: vec3<f32> = (e176.xyz / vec3<f32>(e176.w));
|
||||
let e184: f32 = textureSampleCompareLevel(tex2DShadow, sampShadow, e181.xy, e181.z);
|
||||
d = e184;
|
||||
let e185: vec2<f32> = coord7;
|
||||
let e192: vec2<f32> = coord7;
|
||||
let e185: vec2<f32> = coord_7;
|
||||
let e192: vec2<f32> = coord_7;
|
||||
let e195: vec4<f32> = vec4<f32>(e192, 1.0, 6.0);
|
||||
let e202: vec3<f32> = (e195.xyz / vec3<f32>(e195.w));
|
||||
let e205: f32 = textureSampleCompareLevel(tex2DShadow, sampShadow, e202.xy, e202.z, vec2<i32>(5, 5));
|
||||
d = e205;
|
||||
let e206: vec2<f32> = coord7;
|
||||
let e212: vec2<f32> = coord7;
|
||||
let e206: vec2<f32> = coord_7;
|
||||
let e212: vec2<f32> = coord_7;
|
||||
let e215: vec4<f32> = vec4<f32>(e212, 1.0, 6.0);
|
||||
let e221: vec3<f32> = (e215.xyz / vec3<f32>(e215.w));
|
||||
let e224: f32 = textureSampleCompare(tex2DShadow, sampShadow, e221.xy, e221.z, vec2<i32>(5, 5));
|
||||
@ -358,217 +358,217 @@ fn testTex2DShadow(coord6: vec2<f32>) {
|
||||
return;
|
||||
}
|
||||
|
||||
fn testTex2DArray(coord8: vec3<f32>) {
|
||||
var coord9: vec3<f32>;
|
||||
var c3: vec4<f32>;
|
||||
fn testTex2DArray(coord_8: vec3<f32>) {
|
||||
var coord_9: vec3<f32>;
|
||||
var c_3: vec4<f32>;
|
||||
|
||||
coord9 = coord8;
|
||||
let e18: vec3<f32> = coord9;
|
||||
coord_9 = coord_8;
|
||||
let e18: vec3<f32> = coord_9;
|
||||
let e22: vec4<f32> = textureSample(tex2DArray, samp, e18.xy, i32(e18.z));
|
||||
c3 = e22;
|
||||
let e25: vec3<f32> = coord9;
|
||||
c_3 = e22;
|
||||
let e25: vec3<f32> = coord_9;
|
||||
let e30: vec4<f32> = textureSampleBias(tex2DArray, samp, e25.xy, i32(e25.z), 2.0);
|
||||
c3 = e30;
|
||||
let e36: vec3<f32> = coord9;
|
||||
c_3 = e30;
|
||||
let e36: vec3<f32> = coord_9;
|
||||
let e44: vec4<f32> = textureSampleGrad(tex2DArray, samp, e36.xy, i32(e36.z), vec2<f32>(4.0), vec2<f32>(4.0));
|
||||
c3 = e44;
|
||||
let e52: vec3<f32> = coord9;
|
||||
c_3 = e44;
|
||||
let e52: vec3<f32> = coord_9;
|
||||
let e62: vec4<f32> = textureSampleGrad(tex2DArray, samp, e52.xy, i32(e52.z), vec2<f32>(4.0), vec2<f32>(4.0), vec2<i32>(5, 5));
|
||||
c3 = e62;
|
||||
let e65: vec3<f32> = coord9;
|
||||
c_3 = e62;
|
||||
let e65: vec3<f32> = coord_9;
|
||||
let e70: vec4<f32> = textureSampleLevel(tex2DArray, samp, e65.xy, i32(e65.z), 3.0);
|
||||
c3 = e70;
|
||||
let e75: vec3<f32> = coord9;
|
||||
c_3 = e70;
|
||||
let e75: vec3<f32> = coord_9;
|
||||
let e82: vec4<f32> = textureSampleLevel(tex2DArray, samp, e75.xy, i32(e75.z), 3.0, vec2<i32>(5, 5));
|
||||
c3 = e82;
|
||||
let e86: vec3<f32> = coord9;
|
||||
c_3 = e82;
|
||||
let e86: vec3<f32> = coord_9;
|
||||
let e92: vec4<f32> = textureSample(tex2DArray, samp, e86.xy, i32(e86.z), vec2<i32>(5, 5));
|
||||
c3 = e92;
|
||||
let e97: vec3<f32> = coord9;
|
||||
c_3 = e92;
|
||||
let e97: vec3<f32> = coord_9;
|
||||
let e104: vec4<f32> = textureSampleBias(tex2DArray, samp, e97.xy, i32(e97.z), 2.0, vec2<i32>(5, 5));
|
||||
c3 = e104;
|
||||
c_3 = e104;
|
||||
return;
|
||||
}
|
||||
|
||||
fn testTex2DArrayShadow(coord10: vec3<f32>) {
|
||||
var coord11: vec3<f32>;
|
||||
var d1: f32;
|
||||
fn testTex2DArrayShadow(coord_10: vec3<f32>) {
|
||||
var coord_11: vec3<f32>;
|
||||
var d_1: f32;
|
||||
|
||||
coord11 = coord10;
|
||||
let e17: vec3<f32> = coord11;
|
||||
let e20: vec3<f32> = coord11;
|
||||
coord_11 = coord_10;
|
||||
let e17: vec3<f32> = coord_11;
|
||||
let e20: vec3<f32> = coord_11;
|
||||
let e22: vec4<f32> = vec4<f32>(e20, 1.0);
|
||||
let e27: f32 = textureSampleCompare(tex2DArrayShadow, sampShadow, e22.xy, i32(e22.z), e22.w);
|
||||
d1 = e27;
|
||||
let e28: vec3<f32> = coord11;
|
||||
let e35: vec3<f32> = coord11;
|
||||
d_1 = e27;
|
||||
let e28: vec3<f32> = coord_11;
|
||||
let e35: vec3<f32> = coord_11;
|
||||
let e37: vec4<f32> = vec4<f32>(e35, 1.0);
|
||||
let e46: f32 = textureSampleCompareLevel(tex2DArrayShadow, sampShadow, e37.xy, i32(e37.z), e37.w);
|
||||
d1 = e46;
|
||||
let e47: vec3<f32> = coord11;
|
||||
let e56: vec3<f32> = coord11;
|
||||
d_1 = e46;
|
||||
let e47: vec3<f32> = coord_11;
|
||||
let e56: vec3<f32> = coord_11;
|
||||
let e58: vec4<f32> = vec4<f32>(e56, 1.0);
|
||||
let e69: f32 = textureSampleCompareLevel(tex2DArrayShadow, sampShadow, e58.xy, i32(e58.z), e58.w, vec2<i32>(5, 5));
|
||||
d1 = e69;
|
||||
let e70: vec3<f32> = coord11;
|
||||
let e74: vec3<f32> = coord11;
|
||||
d_1 = e69;
|
||||
let e70: vec3<f32> = coord_11;
|
||||
let e74: vec3<f32> = coord_11;
|
||||
let e76: vec4<f32> = vec4<f32>(e74, 1.0);
|
||||
let e82: f32 = textureSampleCompareLevel(tex2DArrayShadow, sampShadow, e76.xy, i32(e76.z), e76.w);
|
||||
d1 = e82;
|
||||
let e83: vec3<f32> = coord11;
|
||||
let e89: vec3<f32> = coord11;
|
||||
d_1 = e82;
|
||||
let e83: vec3<f32> = coord_11;
|
||||
let e89: vec3<f32> = coord_11;
|
||||
let e91: vec4<f32> = vec4<f32>(e89, 1.0);
|
||||
let e99: f32 = textureSampleCompareLevel(tex2DArrayShadow, sampShadow, e91.xy, i32(e91.z), e91.w, vec2<i32>(5, 5));
|
||||
d1 = e99;
|
||||
let e100: vec3<f32> = coord11;
|
||||
let e105: vec3<f32> = coord11;
|
||||
d_1 = e99;
|
||||
let e100: vec3<f32> = coord_11;
|
||||
let e105: vec3<f32> = coord_11;
|
||||
let e107: vec4<f32> = vec4<f32>(e105, 1.0);
|
||||
let e114: f32 = textureSampleCompare(tex2DArrayShadow, sampShadow, e107.xy, i32(e107.z), e107.w, vec2<i32>(5, 5));
|
||||
d1 = e114;
|
||||
d_1 = e114;
|
||||
return;
|
||||
}
|
||||
|
||||
fn testTexCube(coord12: vec3<f32>) {
|
||||
var coord13: vec3<f32>;
|
||||
var c4: vec4<f32>;
|
||||
fn testTexCube(coord_12: vec3<f32>) {
|
||||
var coord_13: vec3<f32>;
|
||||
var c_4: vec4<f32>;
|
||||
|
||||
coord13 = coord12;
|
||||
let e18: vec3<f32> = coord13;
|
||||
coord_13 = coord_12;
|
||||
let e18: vec3<f32> = coord_13;
|
||||
let e19: vec4<f32> = textureSample(texCube, samp, e18);
|
||||
c4 = e19;
|
||||
let e22: vec3<f32> = coord13;
|
||||
c_4 = e19;
|
||||
let e22: vec3<f32> = coord_13;
|
||||
let e24: vec4<f32> = textureSampleBias(texCube, samp, e22, 2.0);
|
||||
c4 = e24;
|
||||
let e30: vec3<f32> = coord13;
|
||||
c_4 = e24;
|
||||
let e30: vec3<f32> = coord_13;
|
||||
let e35: vec4<f32> = textureSampleGrad(texCube, samp, e30, vec3<f32>(4.0), vec3<f32>(4.0));
|
||||
c4 = e35;
|
||||
let e38: vec3<f32> = coord13;
|
||||
c_4 = e35;
|
||||
let e38: vec3<f32> = coord_13;
|
||||
let e40: vec4<f32> = textureSampleLevel(texCube, samp, e38, 3.0);
|
||||
c4 = e40;
|
||||
let e45: vec3<f32> = coord13;
|
||||
c_4 = e40;
|
||||
let e45: vec3<f32> = coord_13;
|
||||
let e49: vec4<f32> = textureSampleLevel(texCube, samp, e45, 3.0, vec3<i32>(5, 5, 5));
|
||||
c4 = e49;
|
||||
let e53: vec3<f32> = coord13;
|
||||
c_4 = e49;
|
||||
let e53: vec3<f32> = coord_13;
|
||||
let e56: vec4<f32> = textureSample(texCube, samp, e53, vec3<i32>(5, 5, 5));
|
||||
c4 = e56;
|
||||
let e61: vec3<f32> = coord13;
|
||||
c_4 = e56;
|
||||
let e61: vec3<f32> = coord_13;
|
||||
let e65: vec4<f32> = textureSampleBias(texCube, samp, e61, 2.0, vec3<i32>(5, 5, 5));
|
||||
c4 = e65;
|
||||
c_4 = e65;
|
||||
return;
|
||||
}
|
||||
|
||||
fn testTexCubeShadow(coord14: vec3<f32>) {
|
||||
var coord15: vec3<f32>;
|
||||
var d2: f32;
|
||||
fn testTexCubeShadow(coord_14: vec3<f32>) {
|
||||
var coord_15: vec3<f32>;
|
||||
var d_2: f32;
|
||||
|
||||
coord15 = coord14;
|
||||
let e17: vec3<f32> = coord15;
|
||||
let e20: vec3<f32> = coord15;
|
||||
coord_15 = coord_14;
|
||||
let e17: vec3<f32> = coord_15;
|
||||
let e20: vec3<f32> = coord_15;
|
||||
let e22: vec4<f32> = vec4<f32>(e20, 1.0);
|
||||
let e25: f32 = textureSampleCompare(texCubeShadow, sampShadow, e22.xyz, e22.w);
|
||||
d2 = e25;
|
||||
let e26: vec3<f32> = coord15;
|
||||
let e33: vec3<f32> = coord15;
|
||||
d_2 = e25;
|
||||
let e26: vec3<f32> = coord_15;
|
||||
let e33: vec3<f32> = coord_15;
|
||||
let e35: vec4<f32> = vec4<f32>(e33, 1.0);
|
||||
let e42: f32 = textureSampleCompareLevel(texCubeShadow, sampShadow, e35.xyz, e35.w);
|
||||
d2 = e42;
|
||||
let e43: vec3<f32> = coord15;
|
||||
let e47: vec3<f32> = coord15;
|
||||
d_2 = e42;
|
||||
let e43: vec3<f32> = coord_15;
|
||||
let e47: vec3<f32> = coord_15;
|
||||
let e49: vec4<f32> = vec4<f32>(e47, 1.0);
|
||||
let e53: f32 = textureSampleCompareLevel(texCubeShadow, sampShadow, e49.xyz, e49.w);
|
||||
d2 = e53;
|
||||
let e54: vec3<f32> = coord15;
|
||||
let e60: vec3<f32> = coord15;
|
||||
d_2 = e53;
|
||||
let e54: vec3<f32> = coord_15;
|
||||
let e60: vec3<f32> = coord_15;
|
||||
let e62: vec4<f32> = vec4<f32>(e60, 1.0);
|
||||
let e68: f32 = textureSampleCompareLevel(texCubeShadow, sampShadow, e62.xyz, e62.w, vec3<i32>(5, 5, 5));
|
||||
d2 = e68;
|
||||
let e69: vec3<f32> = coord15;
|
||||
let e74: vec3<f32> = coord15;
|
||||
d_2 = e68;
|
||||
let e69: vec3<f32> = coord_15;
|
||||
let e74: vec3<f32> = coord_15;
|
||||
let e76: vec4<f32> = vec4<f32>(e74, 1.0);
|
||||
let e81: f32 = textureSampleCompare(texCubeShadow, sampShadow, e76.xyz, e76.w, vec3<i32>(5, 5, 5));
|
||||
d2 = e81;
|
||||
d_2 = e81;
|
||||
return;
|
||||
}
|
||||
|
||||
fn testTexCubeArray(coord16: vec4<f32>) {
|
||||
var coord17: vec4<f32>;
|
||||
var c5: vec4<f32>;
|
||||
fn testTexCubeArray(coord_16: vec4<f32>) {
|
||||
var coord_17: vec4<f32>;
|
||||
var c_5: vec4<f32>;
|
||||
|
||||
coord17 = coord16;
|
||||
let e18: vec4<f32> = coord17;
|
||||
coord_17 = coord_16;
|
||||
let e18: vec4<f32> = coord_17;
|
||||
let e22: vec4<f32> = textureSample(texCubeArray, samp, e18.xyz, i32(e18.w));
|
||||
c5 = e22;
|
||||
let e25: vec4<f32> = coord17;
|
||||
c_5 = e22;
|
||||
let e25: vec4<f32> = coord_17;
|
||||
let e30: vec4<f32> = textureSampleBias(texCubeArray, samp, e25.xyz, i32(e25.w), 2.0);
|
||||
c5 = e30;
|
||||
let e36: vec4<f32> = coord17;
|
||||
c_5 = e30;
|
||||
let e36: vec4<f32> = coord_17;
|
||||
let e44: vec4<f32> = textureSampleGrad(texCubeArray, samp, e36.xyz, i32(e36.w), vec3<f32>(4.0), vec3<f32>(4.0));
|
||||
c5 = e44;
|
||||
let e47: vec4<f32> = coord17;
|
||||
c_5 = e44;
|
||||
let e47: vec4<f32> = coord_17;
|
||||
let e52: vec4<f32> = textureSampleLevel(texCubeArray, samp, e47.xyz, i32(e47.w), 3.0);
|
||||
c5 = e52;
|
||||
let e57: vec4<f32> = coord17;
|
||||
c_5 = e52;
|
||||
let e57: vec4<f32> = coord_17;
|
||||
let e64: vec4<f32> = textureSampleLevel(texCubeArray, samp, e57.xyz, i32(e57.w), 3.0, vec3<i32>(5, 5, 5));
|
||||
c5 = e64;
|
||||
let e68: vec4<f32> = coord17;
|
||||
c_5 = e64;
|
||||
let e68: vec4<f32> = coord_17;
|
||||
let e74: vec4<f32> = textureSample(texCubeArray, samp, e68.xyz, i32(e68.w), vec3<i32>(5, 5, 5));
|
||||
c5 = e74;
|
||||
let e79: vec4<f32> = coord17;
|
||||
c_5 = e74;
|
||||
let e79: vec4<f32> = coord_17;
|
||||
let e86: vec4<f32> = textureSampleBias(texCubeArray, samp, e79.xyz, i32(e79.w), 2.0, vec3<i32>(5, 5, 5));
|
||||
c5 = e86;
|
||||
c_5 = e86;
|
||||
return;
|
||||
}
|
||||
|
||||
fn testTexCubeArrayShadow(coord18: vec4<f32>) {
|
||||
var coord19: vec4<f32>;
|
||||
var d3: f32;
|
||||
fn testTexCubeArrayShadow(coord_18: vec4<f32>) {
|
||||
var coord_19: vec4<f32>;
|
||||
var d_3: f32;
|
||||
|
||||
coord19 = coord18;
|
||||
let e19: vec4<f32> = coord19;
|
||||
coord_19 = coord_18;
|
||||
let e19: vec4<f32> = coord_19;
|
||||
let e24: f32 = textureSampleCompare(texCubeArrayShadow, sampShadow, e19.xyz, i32(e19.w), 1.0);
|
||||
d3 = e24;
|
||||
d_3 = e24;
|
||||
return;
|
||||
}
|
||||
|
||||
fn testTex3D(coord20: vec3<f32>) {
|
||||
var coord21: vec3<f32>;
|
||||
var c6: vec4<f32>;
|
||||
fn testTex3D(coord_20: vec3<f32>) {
|
||||
var coord_21: vec3<f32>;
|
||||
var c_6: vec4<f32>;
|
||||
|
||||
coord21 = coord20;
|
||||
let e18: vec3<f32> = coord21;
|
||||
coord_21 = coord_20;
|
||||
let e18: vec3<f32> = coord_21;
|
||||
let e19: vec4<f32> = textureSample(tex3D, samp, e18);
|
||||
c6 = e19;
|
||||
let e22: vec3<f32> = coord21;
|
||||
c_6 = e19;
|
||||
let e22: vec3<f32> = coord_21;
|
||||
let e24: vec4<f32> = textureSampleBias(tex3D, samp, e22, 2.0);
|
||||
c6 = e24;
|
||||
let e30: vec3<f32> = coord21;
|
||||
c_6 = e24;
|
||||
let e30: vec3<f32> = coord_21;
|
||||
let e35: vec4<f32> = textureSampleGrad(tex3D, samp, e30, vec3<f32>(4.0), vec3<f32>(4.0));
|
||||
c6 = e35;
|
||||
let e43: vec3<f32> = coord21;
|
||||
c_6 = e35;
|
||||
let e43: vec3<f32> = coord_21;
|
||||
let e50: vec4<f32> = textureSampleGrad(tex3D, samp, e43, vec3<f32>(4.0), vec3<f32>(4.0), vec3<i32>(5, 5, 5));
|
||||
c6 = e50;
|
||||
let e53: vec3<f32> = coord21;
|
||||
c_6 = e50;
|
||||
let e53: vec3<f32> = coord_21;
|
||||
let e55: vec4<f32> = textureSampleLevel(tex3D, samp, e53, 3.0);
|
||||
c6 = e55;
|
||||
let e60: vec3<f32> = coord21;
|
||||
c_6 = e55;
|
||||
let e60: vec3<f32> = coord_21;
|
||||
let e64: vec4<f32> = textureSampleLevel(tex3D, samp, e60, 3.0, vec3<i32>(5, 5, 5));
|
||||
c6 = e64;
|
||||
let e68: vec3<f32> = coord21;
|
||||
c_6 = e64;
|
||||
let e68: vec3<f32> = coord_21;
|
||||
let e71: vec4<f32> = textureSample(tex3D, samp, e68, vec3<i32>(5, 5, 5));
|
||||
c6 = e71;
|
||||
let e76: vec3<f32> = coord21;
|
||||
c_6 = e71;
|
||||
let e76: vec3<f32> = coord_21;
|
||||
let e80: vec4<f32> = textureSampleBias(tex3D, samp, e76, 2.0, vec3<i32>(5, 5, 5));
|
||||
c6 = e80;
|
||||
c_6 = e80;
|
||||
return;
|
||||
}
|
||||
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
return;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main([[location(0)]] texcoord: vec4<f32>) {
|
||||
texcoord1 = texcoord;
|
||||
main1();
|
||||
texcoord_1 = texcoord;
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
@ -18,13 +18,13 @@ var r_sampler: sampler;
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vs_main([[builtin(vertex_index)]] vertex_index: u32) -> VertexOutput {
|
||||
var tmp1: i32;
|
||||
var tmp2: i32;
|
||||
var tmp1_: i32;
|
||||
var tmp2_: i32;
|
||||
|
||||
tmp1 = (i32(vertex_index) / 2);
|
||||
tmp2 = (i32(vertex_index) & 1);
|
||||
let e10: i32 = tmp1;
|
||||
let e16: i32 = tmp2;
|
||||
tmp1_ = (i32(vertex_index) / 2);
|
||||
tmp2_ = (i32(vertex_index) & 1);
|
||||
let e10: i32 = tmp1_;
|
||||
let e16: i32 = tmp2_;
|
||||
let pos: vec4<f32> = vec4<f32>(((f32(e10) * 4.0) - 1.0), ((f32(e16) * 4.0) - 1.0), 0.0, 1.0);
|
||||
let e27: vec4<f32> = r_data.view[0];
|
||||
let e31: vec4<f32> = r_data.view[1];
|
||||
|
@ -1,4 +1,4 @@
|
||||
fn main1() {
|
||||
fn main_1() {
|
||||
var x: vec3<f32> = vec3<f32>(2.0, 2.0, 2.0);
|
||||
|
||||
let e3: vec3<f32> = x;
|
||||
@ -15,6 +15,6 @@ fn main1() {
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn main() {
|
||||
main1();
|
||||
main_1();
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user