mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 14:08:04 +00:00
tint: Implement const eval of binary multiply
Bug: tint:1581 Change-Id: I70ff40ed4d8faf0a665824fef936ffbafb3f0948 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/99362 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
ae6f76fe3a
commit
c20c5dfb4a
@@ -1,5 +1,5 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void f() {
|
||||
const float16_t r = (float16_t(1.0h) * float16_t(2.0h));
|
||||
const float16_t r = float16_t(2.0h);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
|
||||
void f() {
|
||||
float16_t r = (1.0hf * 2.0hf);
|
||||
float16_t r = 2.0hf;
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void f() {
|
||||
const float r = (1.0f * 2.0f);
|
||||
const float r = 2.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void f() {
|
||||
const float r = (1.0f * 2.0f);
|
||||
const float r = 2.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#version 310 es
|
||||
|
||||
void f() {
|
||||
float r = (1.0f * 2.0f);
|
||||
float r = 2.0f;
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void f() {
|
||||
const int r = (1 * 2);
|
||||
const int r = 2;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void f() {
|
||||
const int r = (1 * 2);
|
||||
const int r = 2;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#version 310 es
|
||||
|
||||
void f() {
|
||||
int r = (1 * 2);
|
||||
int r = 2;
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void f() {
|
||||
const uint r = (1u * 2u);
|
||||
const uint r = 2u;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[numthreads(1, 1, 1)]
|
||||
void f() {
|
||||
const uint r = (1u * 2u);
|
||||
const uint r = 2u;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#version 310 es
|
||||
|
||||
void f() {
|
||||
uint r = (1u * 2u);
|
||||
uint r = 2u;
|
||||
}
|
||||
|
||||
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
Reference in New Issue
Block a user