diff options
Diffstat (limited to 'src/gallium/drivers/radeonsi/glsl_tests/sqrt.glsl')
-rw-r--r-- | src/gallium/drivers/radeonsi/glsl_tests/sqrt.glsl | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/glsl_tests/sqrt.glsl b/src/gallium/drivers/radeonsi/glsl_tests/sqrt.glsl new file mode 100644 index 00000000000..c6ddc546d7d --- /dev/null +++ b/src/gallium/drivers/radeonsi/glsl_tests/sqrt.glsl @@ -0,0 +1,56 @@ +; RUN: ./amdgcn_glslc %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s + +; FUNC-LABEL: {{^}}@sqrt: +; GCN: main +; GCN: v_interp_mov +; GCN-NEXT: v_sqrt_f32 +; GCN-NEXT: epilog + +#shader fs sqrt +#version 400 +flat in float f; +void main() { + gl_FragColor.x = sqrt(f); +} + + +; FUNC-LABEL: {{^}}@inv_sqrt: +; GCN: main +; GCN: v_interp_mov +; GCN-NEXT: v_rsq_f32 +; GCN-NEXT: epilog + +#shader fs inv_sqrt +#version 400 +flat in float f; +void main() { + gl_FragColor.x = 1 / sqrt(f); +} + + +; FUNC-LABEL: {{^}}@rsq: +; GCN: main +; GCN: v_interp_mov +; GCN-NEXT: v_rsq_f32 +; GCN-NEXT: epilog + +#shader fs rsq +#version 400 +flat in float f; +void main() { + gl_FragColor.x = inversesqrt(f); +} + + +; FUNC-LABEL: {{^}}@inv_rsq: +; GCN: main +; GCN: v_interp_mov +; GCN-NEXT: v_sqrt_f32 +; GCN-NEXT: epilog + +#shader fs inv_rsq +#version 400 +flat in float f; +void main() { + gl_FragColor.x = 1 / inversesqrt(f); +} |