mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
tint: HLSL and GLSL backends now emit 0 for inf and nan
Bug: tint:1581 Change-Id: I62dcde177c3b82408cd8d737526d10d481b48a17 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101240 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
1741f4443e
commit
679cf4f351
@@ -14,7 +14,7 @@ float getAAtOutCoords_() {
|
||||
float unaryOperation_f1_(inout float a) {
|
||||
const float x_47 = a;
|
||||
if ((x_47 < 0.0f)) {
|
||||
return asfloat(0x7f800000u);
|
||||
return 0.0f /* inf */;
|
||||
}
|
||||
const float x_55 = a;
|
||||
return log(x_55);
|
||||
|
||||
@@ -14,7 +14,7 @@ float getAAtOutCoords_() {
|
||||
float unaryOperation_f1_(inout float a) {
|
||||
const float x_47 = a;
|
||||
if ((x_47 < 0.0f)) {
|
||||
return asfloat(0x7f800000u);
|
||||
return 0.0f /* inf */;
|
||||
}
|
||||
const float x_55 = a;
|
||||
return log(x_55);
|
||||
|
||||
@@ -26,7 +26,7 @@ float getAAtOutCoords_() {
|
||||
float unaryOperation_f1_(inout float a) {
|
||||
float x_47 = a;
|
||||
if ((x_47 < 0.0f)) {
|
||||
return uintBitsToFloat(0x7f800000u);
|
||||
return 0.0f /* inf */;
|
||||
}
|
||||
float x_55 = a;
|
||||
return log(x_55);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
static float4 out_var_SV_TARGET = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
out_var_SV_TARGET = (asfloat(0xff800000u)).xxxx;
|
||||
out_var_SV_TARGET = (0.0f /* -inf */).xxxx;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
static float4 out_var_SV_TARGET = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
out_var_SV_TARGET = (asfloat(0xff800000u)).xxxx;
|
||||
out_var_SV_TARGET = (0.0f /* -inf */).xxxx;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ precision mediump float;
|
||||
layout(location = 0) out vec4 out_var_SV_TARGET_1_1;
|
||||
vec4 out_var_SV_TARGET = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
void main_1() {
|
||||
out_var_SV_TARGET = vec4(uintBitsToFloat(0xff800000u));
|
||||
out_var_SV_TARGET = vec4(0.0f /* -inf */);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
static float4 out_var_SV_TARGET = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
out_var_SV_TARGET = (asfloat(0x7f800000u)).xxxx;
|
||||
out_var_SV_TARGET = (0.0f /* inf */).xxxx;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
static float4 out_var_SV_TARGET = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
out_var_SV_TARGET = (asfloat(0x7f800000u)).xxxx;
|
||||
out_var_SV_TARGET = (0.0f /* inf */).xxxx;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ precision mediump float;
|
||||
layout(location = 0) out vec4 out_var_SV_TARGET_1_1;
|
||||
vec4 out_var_SV_TARGET = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
void main_1() {
|
||||
out_var_SV_TARGET = vec4(uintBitsToFloat(0x7f800000u));
|
||||
out_var_SV_TARGET = vec4(0.0f /* inf */);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
static float4 out_var_SV_TARGET = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
out_var_SV_TARGET = float4(asfloat(0x7fc00000u), asfloat(0x7fc00000u), asfloat(0x7fc00000u), asfloat(0x7fc00000u));
|
||||
out_var_SV_TARGET = float4(0.0f /* nan */, 0.0f /* nan */, 0.0f /* nan */, 0.0f /* nan */);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
static float4 out_var_SV_TARGET = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
void main_1() {
|
||||
out_var_SV_TARGET = float4(asfloat(0x7fc00000u), asfloat(0x7fc00000u), asfloat(0x7fc00000u), asfloat(0x7fc00000u));
|
||||
out_var_SV_TARGET = float4(0.0f /* nan */, 0.0f /* nan */, 0.0f /* nan */, 0.0f /* nan */);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ precision mediump float;
|
||||
layout(location = 0) out vec4 out_var_SV_TARGET_1_1;
|
||||
vec4 out_var_SV_TARGET = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
void main_1() {
|
||||
out_var_SV_TARGET = vec4(uintBitsToFloat(0x7fc00000u), uintBitsToFloat(0x7fc00000u), uintBitsToFloat(0x7fc00000u), uintBitsToFloat(0x7fc00000u));
|
||||
out_var_SV_TARGET = vec4(0.0f /* nan */, 0.0f /* nan */, 0.0f /* nan */, 0.0f /* nan */);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user