etnaviv: use NORMALIZE_SIGN_EXTEND
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Wed, 16 Oct 2019 04:31:17 +0000 (06:31 +0200)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Fri, 29 Nov 2019 14:06:18 +0000 (15:06 +0100)
The blob driver does something like this for all vertex formats:

if (normalize) {
   if (OPENGL_ES30)
      val = VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_SIGN_EXTEND;
   else
      val = VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_ON;
} else {
   val = VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF;
}

As there is no way to get to that information in gallium we always
assume OPENGL_ES30.

Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_translate.h

index afa5c26057377fc5d5c57aa0423f27c9da94956f..6c367d7ed8b6ee1d4c3ab6a21145ccbc6f2c433e 100644 (file)
@@ -302,7 +302,7 @@ translate_vertex_format_normalize(enum pipe_format fmt)
    /* assumes that normalization of channel 0 holds for all channels;
     * this holds for all vertex formats that we support */
    return desc->channel[0].normalized
-             ? VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_ON
+             ? VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_SIGN_EXTEND
              : VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF;
 }