diff options
| author | Robert Stepinski <rob.stepinski@gmail.com> | 2019-03-20 17:13:48 -0400 |
|---|---|---|
| committer | Tim Foley <tfoleyNV@users.noreply.github.com> | 2019-03-20 14:13:48 -0700 |
| commit | fb29281b9061eb5e9b75d1362f2c824d01a8b3d4 (patch) | |
| tree | b3fee168100eff3357169afbe9b698a3d97f7164 /tests/bugs/vk-structured-buffer-load.hlsl.glsl | |
| parent | 662fcca6d3156d7645761ac967038e5ff068fe99 (diff) | |
Add support for scalar rcp() intrinsic for GLSL (#918)
Diffstat (limited to 'tests/bugs/vk-structured-buffer-load.hlsl.glsl')
| -rw-r--r-- | tests/bugs/vk-structured-buffer-load.hlsl.glsl | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/bugs/vk-structured-buffer-load.hlsl.glsl b/tests/bugs/vk-structured-buffer-load.hlsl.glsl index 8060cc921..1cf0b00a7 100644 --- a/tests/bugs/vk-structured-buffer-load.hlsl.glsl +++ b/tests/bugs/vk-structured-buffer-load.hlsl.glsl @@ -29,11 +29,27 @@ void main() float HitT_0 = (gl_HitTNV); _S2.PackedHitInfoA_0.x = HitT_0; + const uint use_rcp_0 = uint(0); + float offsfloat_0 = ((gParamBlock_sbuf_0)._data[(int(uint(0)))]); - float _S4 = inversesqrt(offsfloat_0); - _S2.PackedHitInfoA_0.y = _S4; + + if(bool(use_rcp_0 | uint(HitT_0 > 0.00000000000000000000))) + { + + float _S4 = (1.0/((offsfloat_0))); + + _S2.PackedHitInfoA_0.y = _S4; + + } + else + { + float _S5 = (inversesqrt((offsfloat_0))); + + _S2.PackedHitInfoA_0.y = _S5; + + } return; } |
