summaryrefslogtreecommitdiffstats
path: root/tests/cross-compile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cross-compile')
-rw-r--r--tests/cross-compile/precise-keyword.slang.glsl9
-rw-r--r--tests/cross-compile/precise-keyword.slang.hlsl8
2 files changed, 11 insertions, 6 deletions
diff --git a/tests/cross-compile/precise-keyword.slang.glsl b/tests/cross-compile/precise-keyword.slang.glsl
index 17fed739e..027a8eb3b 100644
--- a/tests/cross-compile/precise-keyword.slang.glsl
+++ b/tests/cross-compile/precise-keyword.slang.glsl
@@ -11,15 +11,18 @@ in vec2 _S2;
void main()
{
+ float _S3 = _S2.x;
+
precise float z_0;
- if(_S2.x > float(0))
+ if(_S3 > 0.00000000000000000000)
{
- z_0 = _S2.x * _S2.y + _S2.x;
+ z_0 = _S3 * _S2.y + _S3;
}
else
{
- z_0 = _S2.y * _S2.x + _S2.y;
+ float _S4 = _S2.y;
+ z_0 = _S4 * _S3 + _S4;
}
_S1 = vec4(z_0);
return;
diff --git a/tests/cross-compile/precise-keyword.slang.hlsl b/tests/cross-compile/precise-keyword.slang.hlsl
index 54017868b..7a07fdc5e 100644
--- a/tests/cross-compile/precise-keyword.slang.hlsl
+++ b/tests/cross-compile/precise-keyword.slang.hlsl
@@ -3,15 +3,17 @@
float4 main(float2 v_0 : V) : SV_TARGET
{
+ float _S1 = v_0.x;
precise float z_0;
- if(v_0.x > (float) 0)
+ if (_S1 > 0.00000000000000000000)
{
- z_0 = v_0.x * v_0.y + v_0.x;
+ z_0 = _S1 * v_0.y + _S1;
}
else
{
- z_0 = v_0.y * v_0.x + v_0.y;
+ float _S2 = v_0.y;
+ z_0 = _S2 * _S1 + _S2;
}
return (float4) z_0;