Mesa (main): zink: always use 32bit floats for so output types

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 15 17:48:35 UTC 2022


Module: Mesa
Branch: main
Commit: a0771cd4ab2f7d6ae34d6f07a69bcc9ecbb9b76d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a0771cd4ab2f7d6ae34d6f07a69bcc9ecbb9b76d

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu Jul  7 14:07:30 2022 -0400

zink: always use 32bit floats for so output types

doubles may be the output variable type, but the xfb output will always
be 32bit

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>

---

 src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
index 86a7d41a98e..abcf971857f 100644
--- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
+++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
@@ -1322,6 +1322,7 @@ get_output_type(struct ntv_context *ctx, unsigned register_index, unsigned num_c
    case GLSL_TYPE_BOOL:
       return get_bvec_type(ctx, num_components);
 
+   case GLSL_TYPE_DOUBLE: //this case is misleading, as so outputs are always 32bit floats
    case GLSL_TYPE_FLOAT:
       return get_fvec_type(ctx, 32, num_components);
 
@@ -1331,9 +1332,6 @@ get_output_type(struct ntv_context *ctx, unsigned register_index, unsigned num_c
    case GLSL_TYPE_UINT:
       return get_uvec_type(ctx, 32, num_components);
 
-   case GLSL_TYPE_DOUBLE:
-      return get_fvec_type(ctx, 64, num_components);
-
    default:
       unreachable("unknown type");
       break;



More information about the mesa-commit mailing list