Allow sqrt representation in virgl's use of tgsi rather than
1/invsqrt, which can lead to a nan result when the operand is
0.

Tested: chromeos on qemu + virglrenderer.
Signed-off-by: Joe M. Kniss <d...@google.com>
---
 src/gallium/drivers/virgl/virgl_screen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/virgl/virgl_screen.c 
b/src/gallium/drivers/virgl/virgl_screen.c
index 02613f1866..07d0d9fb4d 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -314,6 +314,7 @@ virgl_get_shader_param(struct pipe_screen *screen,
       case PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR:
       case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR:
       case PIPE_SHADER_CAP_INDIRECT_CONST_ADDR:
+      case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED:
          return 1;
       case PIPE_SHADER_CAP_MAX_INPUTS:
          if (vscreen->caps.caps.v1.glsl_level < 150)
-- 
2.17.0.484.g0c8726318c-goog

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to