tint: remove LoopToForLoop and FoldTrivialSingleUseLets transforms for HLSL and GLSL

Change-Id: I18c807b2449dc2842cb9dbfaeba98dae640d2355
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102621
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Antonio Maiorano
2022-09-19 14:05:21 +00:00
committed by Dawn LUCI CQ
parent d6afca1955
commit e14a27bc7f
617 changed files with 3539 additions and 2634 deletions

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float16_t r = float16_t(3.0h);
const float16_t a = float16_t(1.0h);
const float16_t b = float16_t(2.0h);
const float16_t r = (a + b);
return;
}

View File

@@ -2,7 +2,9 @@
#extension GL_AMD_gpu_shader_half_float : require
void f() {
float16_t r = 3.0hf;
float16_t a = 1.0hf;
float16_t b = 2.0hf;
float16_t r = (a + b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float r = 3.0f;
const float a = 1.0f;
const float b = 2.0f;
const float r = (a + b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float r = 3.0f;
const float a = 1.0f;
const float b = 2.0f;
const float r = (a + b);
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
float r = 3.0f;
float a = 1.0f;
float b = 2.0f;
float r = (a + b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = 3;
const int a = 1;
const int b = 2;
const int r = (a + b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = 3;
const int a = 1;
const int b = 2;
const int r = (a + b);
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
int r = 3;
int a = 1;
int b = 2;
int r = (a + b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint r = 3u;
const uint a = 1u;
const uint b = 2u;
const uint r = (a + b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint r = 3u;
const uint a = 1u;
const uint b = 2u;
const uint r = (a + b);
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
uint r = 3u;
uint a = 1u;
uint b = 2u;
uint r = (a + b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const vector<float16_t, 3> a = vector<float16_t, 3>(float16_t(1.0h), float16_t(2.0h), float16_t(3.0h));
const vector<float16_t, 3> r = (a + float16_t(4.0h));
const float16_t b = float16_t(4.0h);
const vector<float16_t, 3> r = (a + b);
return;
}

View File

@@ -3,7 +3,8 @@
void f() {
f16vec3 a = f16vec3(1.0hf, 2.0hf, 3.0hf);
f16vec3 r = (a + 4.0hf);
float16_t b = 4.0hf;
f16vec3 r = (a + b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float3 a = float3(1.0f, 2.0f, 3.0f);
const float3 r = (a + 4.0f);
const float b = 4.0f;
const float3 r = (a + b);
return;
}

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float3 a = float3(1.0f, 2.0f, 3.0f);
const float3 r = (a + 4.0f);
const float b = 4.0f;
const float3 r = (a + b);
return;
}

View File

@@ -2,7 +2,8 @@
void f() {
vec3 a = vec3(1.0f, 2.0f, 3.0f);
vec3 r = (a + 4.0f);
float b = 4.0f;
vec3 r = (a + b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int3 a = int3(1, 2, 3);
const int3 r = (a + 4);
const int b = 4;
const int3 r = (a + b);
return;
}

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int3 a = int3(1, 2, 3);
const int3 r = (a + 4);
const int b = 4;
const int3 r = (a + b);
return;
}

View File

@@ -2,7 +2,8 @@
void f() {
ivec3 a = ivec3(1, 2, 3);
ivec3 r = (a + 4);
int b = 4;
ivec3 r = (a + b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint3 a = uint3(1u, 2u, 3u);
const uint3 r = (a + 4u);
const uint b = 4u;
const uint3 r = (a + b);
return;
}

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint3 a = uint3(1u, 2u, 3u);
const uint3 r = (a + 4u);
const uint b = 4u;
const uint3 r = (a + b);
return;
}

View File

@@ -2,7 +2,8 @@
void f() {
uvec3 a = uvec3(1u, 2u, 3u);
uvec3 r = (a + 4u);
uint b = 4u;
uvec3 r = (a + b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const bool r = false;
const bool a = true;
const bool b = false;
const bool r = (a & b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const bool r = false;
const bool a = true;
const bool b = false;
const bool r = (a & b);
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
bool r = false;
bool a = true;
bool b = false;
bool r = bool(uint(a) & uint(b));
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = 0;
const int a = 1;
const int b = 2;
const int r = (a & b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = 0;
const int a = 1;
const int b = 2;
const int r = (a & b);
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
int r = 0;
int a = 1;
int b = 2;
int r = (a & b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint r = 0u;
const uint a = 1u;
const uint b = 2u;
const uint r = (a & b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint r = 0u;
const uint a = 1u;
const uint b = 2u;
const uint r = (a & b);
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
uint r = 0u;
uint a = 1u;
uint b = 2u;
uint r = (a & b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = 3;
const int a = 1;
const int b = 2;
const int r = (a | b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = 3;
const int a = 1;
const int b = 2;
const int r = (a | b);
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
int r = 3;
int a = 1;
int b = 2;
int r = (a | b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint r = 3u;
const uint a = 1u;
const uint b = 2u;
const uint r = (a | b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint r = 3u;
const uint a = 1u;
const uint b = 2u;
const uint r = (a | b);
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
uint r = 3u;
uint a = 1u;
uint b = 2u;
uint r = (a | b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = 3;
const int a = 1;
const int b = 2;
const int r = (a ^ b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = 3;
const int a = 1;
const int b = 2;
const int r = (a ^ b);
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
int r = 3;
int a = 1;
int b = 2;
int r = (a ^ b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint r = 3u;
const uint a = 1u;
const uint b = 2u;
const uint r = (a ^ b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint r = 3u;
const uint a = 1u;
const uint b = 2u;
const uint r = (a ^ b);
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
uint r = 3u;
uint a = 1u;
uint b = 2u;
uint r = (a ^ b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float16_t r = float16_t(0.5h);
const float16_t a = float16_t(1.0h);
const float16_t b = float16_t(2.0h);
const float16_t r = (a / b);
return;
}

View File

@@ -2,7 +2,9 @@
#extension GL_AMD_gpu_shader_half_float : require
void f() {
float16_t r = 0.5hf;
float16_t a = 1.0hf;
float16_t b = 2.0hf;
float16_t r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float r = 0.5f;
const float a = 1.0f;
const float b = 2.0f;
const float r = (a / b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float r = 0.5f;
const float a = 1.0f;
const float b = 2.0f;
const float r = (a / b);
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
float r = 0.5f;
float a = 1.0f;
float b = 2.0f;
float r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = 0;
const int a = 1;
const int b = 2;
const int r = (a / (b == 0 ? 1 : b));
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = 0;
const int a = 1;
const int b = 2;
const int r = (a / (b == 0 ? 1 : b));
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
int r = 0;
int a = 1;
int b = 2;
int r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint r = 0u;
const uint a = 1u;
const uint b = 2u;
const uint r = (a / (b == 0u ? 1u : b));
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint r = 0u;
const uint a = 1u;
const uint b = 2u;
const uint r = (a / (b == 0u ? 1u : b));
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
uint r = 0u;
uint a = 1u;
uint b = 2u;
uint r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const vector<float16_t, 3> a = vector<float16_t, 3>(float16_t(1.0h), float16_t(2.0h), float16_t(3.0h));
const vector<float16_t, 3> r = (a / float16_t(4.0h));
const float16_t b = float16_t(4.0h);
const vector<float16_t, 3> r = (a / b);
return;
}

View File

@@ -3,7 +3,8 @@
void f() {
f16vec3 a = f16vec3(1.0hf, 2.0hf, 3.0hf);
f16vec3 r = (a / 4.0hf);
float16_t b = 4.0hf;
f16vec3 r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float3 a = float3(1.0f, 2.0f, 3.0f);
const float3 r = (a / 4.0f);
const float b = 4.0f;
const float3 r = (a / b);
return;
}

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float3 a = float3(1.0f, 2.0f, 3.0f);
const float3 r = (a / 4.0f);
const float b = 4.0f;
const float3 r = (a / b);
return;
}

View File

@@ -2,7 +2,8 @@
void f() {
vec3 a = vec3(1.0f, 2.0f, 3.0f);
vec3 r = (a / 4.0f);
float b = 4.0f;
vec3 r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int3 a = int3(1, 2, 3);
const int3 r = (a / 4);
const int b = 4;
const int3 r = (a / (b == 0 ? 1 : b));
return;
}

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int3 a = int3(1, 2, 3);
const int3 r = (a / 4);
const int b = 4;
const int3 r = (a / (b == 0 ? 1 : b));
return;
}

View File

@@ -2,7 +2,8 @@
void f() {
ivec3 a = ivec3(1, 2, 3);
ivec3 r = (a / 4);
int b = 4;
ivec3 r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint3 a = uint3(1u, 2u, 3u);
const uint3 r = (a / 4u);
const uint b = 4u;
const uint3 r = (a / (b == 0u ? 1u : b));
return;
}

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint3 a = uint3(1u, 2u, 3u);
const uint3 r = (a / 4u);
const uint b = 4u;
const uint3 r = (a / (b == 0u ? 1u : b));
return;
}

View File

@@ -2,7 +2,8 @@
void f() {
uvec3 a = uvec3(1u, 2u, 3u);
uvec3 r = (a / 4u);
uint b = 4u;
uvec3 r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float16_t r = float16_t(0.0h /* inf */);
const float16_t a = float16_t(1.0h);
const float16_t b = float16_t(0.0h);
const float16_t r = (a / b);
return;
}

View File

@@ -2,7 +2,9 @@
#extension GL_AMD_gpu_shader_half_float : require
void f() {
float16_t r = 0.0hf /* inf */;
float16_t a = 1.0hf;
float16_t b = 0.0hf;
float16_t r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float r = 0.0f /* inf */;
const float a = 1.0f;
const float b = 0.0f;
const float r = (a / b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float r = 0.0f /* inf */;
const float a = 1.0f;
const float b = 0.0f;
const float r = (a / b);
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
float r = 0.0f /* inf */;
float a = 1.0f;
float b = 0.0f;
float r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = 1;
const int a = 1;
const int b = 0;
const int r = (a / (b == 0 ? 1 : b));
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = 1;
const int a = 1;
const int b = 0;
const int r = (a / (b == 0 ? 1 : b));
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
int r = 1;
int a = 1;
int b = 0;
int r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint r = 1u;
const uint a = 1u;
const uint b = 0u;
const uint r = (a / (b == 0u ? 1u : b));
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint r = 1u;
const uint a = 1u;
const uint b = 0u;
const uint r = (a / (b == 0u ? 1u : b));
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
uint r = 1u;
uint a = 1u;
uint b = 0u;
uint r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const vector<float16_t, 3> a = vector<float16_t, 3>(float16_t(1.0h), float16_t(2.0h), float16_t(3.0h));
const vector<float16_t, 3> r = (a / float16_t(0.0h));
const float16_t b = float16_t(0.0h);
const vector<float16_t, 3> r = (a / b);
return;
}

View File

@@ -3,7 +3,8 @@
void f() {
f16vec3 a = f16vec3(1.0hf, 2.0hf, 3.0hf);
f16vec3 r = (a / 0.0hf);
float16_t b = 0.0hf;
f16vec3 r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float3 a = float3(1.0f, 2.0f, 3.0f);
const float3 r = (a / 0.0f);
const float b = 0.0f;
const float3 r = (a / b);
return;
}

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float3 a = float3(1.0f, 2.0f, 3.0f);
const float3 r = (a / 0.0f);
const float b = 0.0f;
const float3 r = (a / b);
return;
}

View File

@@ -2,7 +2,8 @@
void f() {
vec3 a = vec3(1.0f, 2.0f, 3.0f);
vec3 r = (a / 0.0f);
float b = 0.0f;
vec3 r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int3 a = int3(1, 2, 3);
const int3 r = (a / 1);
const int b = 0;
const int3 r = (a / (b == 0 ? 1 : b));
return;
}

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int3 a = int3(1, 2, 3);
const int3 r = (a / 1);
const int b = 0;
const int3 r = (a / (b == 0 ? 1 : b));
return;
}

View File

@@ -2,7 +2,8 @@
void f() {
ivec3 a = ivec3(1, 2, 3);
ivec3 r = (a / 0);
int b = 0;
ivec3 r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint3 a = uint3(1u, 2u, 3u);
const uint3 r = (a / 1u);
const uint b = 0u;
const uint3 r = (a / (b == 0u ? 1u : b));
return;
}

View File

@@ -1,6 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint3 a = uint3(1u, 2u, 3u);
const uint3 r = (a / 1u);
const uint b = 0u;
const uint3 r = (a / (b == 0u ? 1u : b));
return;
}

View File

@@ -2,7 +2,8 @@
void f() {
uvec3 a = uvec3(1u, 2u, 3u);
uvec3 r = (a / 0u);
uint b = 0u;
uvec3 r = (a / b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = (1 << 2u);
const int a = 1;
const uint b = 2u;
const int r = (a << b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = (1 << 2u);
const int a = 1;
const uint b = 2u;
const int r = (a << b);
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
int r = (1 << 2u);
int a = 1;
uint b = 2u;
int r = (a << b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint r = (1u << 2u);
const uint a = 1u;
const uint b = 2u;
const uint r = (a << b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const uint r = (1u << 2u);
const uint a = 1u;
const uint b = 2u;
const uint r = (a << b);
return;
}

View File

@@ -1,7 +1,9 @@
#version 310 es
void f() {
uint r = (1u << 2u);
uint a = 1u;
uint b = 2u;
uint r = (a << b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float16_t r = (float16_t(1.0h) % float16_t(2.0h));
const float16_t a = float16_t(1.0h);
const float16_t b = float16_t(2.0h);
const float16_t r = (a % b);
return;
}

View File

@@ -7,7 +7,9 @@ float16_t tint_float_modulo(float16_t lhs, float16_t rhs) {
void f() {
float16_t r = tint_float_modulo(1.0hf, 2.0hf);
float16_t a = 1.0hf;
float16_t b = 2.0hf;
float16_t r = tint_float_modulo(a, b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float r = (1.0f % 2.0f);
const float a = 1.0f;
const float b = 2.0f;
const float r = (a % b);
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const float r = (1.0f % 2.0f);
const float a = 1.0f;
const float b = 2.0f;
const float r = (a % b);
return;
}

View File

@@ -6,7 +6,9 @@ float tint_float_modulo(float lhs, float rhs) {
void f() {
float r = tint_float_modulo(1.0f, 2.0f);
float a = 1.0f;
float b = 2.0f;
float r = tint_float_modulo(a, b);
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = (1 % 2);
const int a = 1;
const int b = 2;
const int r = (a % (b == 0 ? 1 : b));
return;
}

View File

@@ -1,5 +1,7 @@
[numthreads(1, 1, 1)]
void f() {
const int r = (1 % 2);
const int a = 1;
const int b = 2;
const int r = (a % (b == 0 ? 1 : b));
return;
}

Some files were not shown because too many files have changed in this diff Show More