etnaviv: fix integer vertex formats
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Sun, 13 Oct 2019 08:54:48 +0000 (10:54 +0200)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Fri, 29 Nov 2019 14:06:18 +0000 (15:06 +0100)
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_format.c

index d95302de8ef62c8b36e80a2a86ea847ef26b4a2f..4cfa4053fc6c9784e86e4d498e49877aca4006f0 100644 (file)
@@ -95,8 +95,8 @@ static struct etna_format formats[PIPE_FORMAT_COUNT] = {
    /* 8-bit */
    VT(R8_UNORM,   UNSIGNED_BYTE, L8, SWIZ(X, 0, 0, 1), NONE),
    V_(R8_SNORM,   BYTE,          NONE),
-   V_(R8_UINT,    UNSIGNED_BYTE, NONE),
-   V_(R8_SINT,    BYTE,          NONE),
+   V_(R8_UINT,    BYTE_I,        NONE),
+   V_(R8_SINT,    BYTE_I,        NONE),
    V_(R8_USCALED, UNSIGNED_BYTE, NONE),
    V_(R8_SSCALED, BYTE,          NONE),
 
@@ -107,8 +107,8 @@ static struct etna_format formats[PIPE_FORMAT_COUNT] = {
    /* 16-bit */
    V_(R16_UNORM,   UNSIGNED_SHORT, NONE),
    V_(R16_SNORM,   SHORT,          NONE),
-   V_(R16_UINT,    UNSIGNED_SHORT, NONE),
-   V_(R16_SINT,    SHORT,          NONE),
+   V_(R16_UINT,    SHORT_I,        NONE),
+   V_(R16_SINT,    SHORT_I,        NONE),
    V_(R16_USCALED, UNSIGNED_SHORT, NONE),
    V_(R16_SSCALED, SHORT,          NONE),
    V_(R16_FLOAT,   HALF_FLOAT,     NONE),
@@ -125,24 +125,24 @@ static struct etna_format formats[PIPE_FORMAT_COUNT] = {
 
    VT(R8G8_UNORM,   UNSIGNED_BYTE,  EXT_G8R8 | EXT_FORMAT, SWIZ(X, Y, 0, 1), NONE),
    V_(R8G8_SNORM,   BYTE,           NONE),
-   V_(R8G8_UINT,    UNSIGNED_BYTE,  NONE),
-   V_(R8G8_SINT,    BYTE,           NONE),
+   V_(R8G8_UINT,    BYTE_I,         NONE),
+   V_(R8G8_SINT,    BYTE_I,         NONE),
    V_(R8G8_USCALED, UNSIGNED_BYTE,  NONE),
    V_(R8G8_SSCALED, BYTE,           NONE),
 
    /* 24-bit */
    V_(R8G8B8_UNORM,   UNSIGNED_BYTE, NONE),
    V_(R8G8B8_SNORM,   BYTE,          NONE),
-   V_(R8G8B8_UINT,    UNSIGNED_BYTE, NONE),
-   V_(R8G8B8_SINT,    BYTE,          NONE),
+   V_(R8G8B8_UINT,    BYTE_I,        NONE),
+   V_(R8G8B8_SINT,    BYTE_I,        NONE),
    V_(R8G8B8_USCALED, UNSIGNED_BYTE, NONE),
    V_(R8G8B8_SSCALED, BYTE,          NONE),
 
    /* 32-bit */
    V_(R32_UNORM,   UNSIGNED_INT, NONE),
    V_(R32_SNORM,   INT,          NONE),
-   V_(R32_SINT,    INT,          NONE),
-   V_(R32_UINT,    UNSIGNED_INT, NONE),
+   V_(R32_SINT,    FLOAT,        NONE),
+   V_(R32_UINT,    FLOAT,        NONE),
    V_(R32_USCALED, UNSIGNED_INT, NONE),
    V_(R32_SSCALED, INT,          NONE),
    V_(R32_FLOAT,   FLOAT,        NONE),
@@ -150,8 +150,8 @@ static struct etna_format formats[PIPE_FORMAT_COUNT] = {
 
    V_(R16G16_UNORM,   UNSIGNED_SHORT, NONE),
    V_(R16G16_SNORM,   SHORT,          NONE),
-   V_(R16G16_UINT,    UNSIGNED_SHORT, NONE),
-   V_(R16G16_SINT,    SHORT,          NONE),
+   V_(R16G16_UINT,    SHORT_I,        NONE),
+   V_(R16G16_SINT,    SHORT_I,        NONE),
    V_(R16G16_USCALED, UNSIGNED_SHORT, NONE),
    V_(R16G16_SSCALED, SHORT,          NONE),
    V_(R16G16_FLOAT,   HALF_FLOAT,     NONE),
@@ -161,8 +161,8 @@ static struct etna_format formats[PIPE_FORMAT_COUNT] = {
    VT(R8G8B8A8_UNORM,   UNSIGNED_BYTE, A8B8G8R8, SWIZ(X, Y, Z, W), A8B8G8R8),
    V_(R8G8B8A8_SNORM,   BYTE,          A8B8G8R8),
    _T(R8G8B8X8_UNORM,   X8B8G8R8,      SWIZ(X, Y, Z, W), X8B8G8R8),
-   V_(R8G8B8A8_UINT,    UNSIGNED_BYTE, A8B8G8R8),
-   V_(R8G8B8A8_SINT,    BYTE,          A8B8G8R8),
+   V_(R8G8B8A8_UINT,    BYTE_I,        A8B8G8R8),
+   V_(R8G8B8A8_SINT,    BYTE_I,        A8B8G8R8),
    V_(R8G8B8A8_USCALED, UNSIGNED_BYTE, A8B8G8R8),
    V_(R8G8B8A8_SSCALED, BYTE,          A8B8G8R8),
 
@@ -182,8 +182,8 @@ static struct etna_format formats[PIPE_FORMAT_COUNT] = {
    /* 48-bit */
    V_(R16G16B16_UNORM,   UNSIGNED_SHORT, NONE),
    V_(R16G16B16_SNORM,   SHORT,          NONE),
-   V_(R16G16B16_UINT,    UNSIGNED_SHORT, NONE),
-   V_(R16G16B16_SINT,    SHORT,          NONE),
+   V_(R16G16B16_UINT,    SHORT_I,        NONE),
+   V_(R16G16B16_SINT,    SHORT_I,        NONE),
    V_(R16G16B16_USCALED, UNSIGNED_SHORT, NONE),
    V_(R16G16B16_SSCALED, SHORT,          NONE),
    V_(R16G16B16_FLOAT,   HALF_FLOAT,     NONE),
@@ -191,16 +191,16 @@ static struct etna_format formats[PIPE_FORMAT_COUNT] = {
    /* 64-bit */
    V_(R16G16B16A16_UNORM,   UNSIGNED_SHORT, NONE),
    V_(R16G16B16A16_SNORM,   SHORT,          NONE),
-   V_(R16G16B16A16_UINT,    UNSIGNED_SHORT, NONE),
-   V_(R16G16B16A16_SINT,    SHORT,          NONE),
+   V_(R16G16B16A16_UINT,    SHORT_I,        NONE),
+   V_(R16G16B16A16_SINT,    SHORT_I,        NONE),
    V_(R16G16B16A16_USCALED, UNSIGNED_SHORT, NONE),
    V_(R16G16B16A16_SSCALED, SHORT,          NONE),
    V_(R16G16B16A16_FLOAT,   HALF_FLOAT,     NONE),
 
    V_(R32G32_UNORM,   UNSIGNED_INT, NONE),
    V_(R32G32_SNORM,   INT,          NONE),
-   V_(R32G32_UINT,    UNSIGNED_INT, NONE),
-   V_(R32G32_SINT,    INT,          NONE),
+   V_(R32G32_UINT,    FLOAT,        NONE),
+   V_(R32G32_SINT,    FLOAT,        NONE),
    V_(R32G32_USCALED, UNSIGNED_INT, NONE),
    V_(R32G32_SSCALED, INT,          NONE),
    V_(R32G32_FLOAT,   FLOAT,        NONE),
@@ -209,8 +209,8 @@ static struct etna_format formats[PIPE_FORMAT_COUNT] = {
    /* 96-bit */
    V_(R32G32B32_UNORM,   UNSIGNED_INT, NONE),
    V_(R32G32B32_SNORM,   INT,          NONE),
-   V_(R32G32B32_UINT,    UNSIGNED_INT, NONE),
-   V_(R32G32B32_SINT,    INT,          NONE),
+   V_(R32G32B32_UINT,    FLOAT,        NONE),
+   V_(R32G32B32_SINT,    FLOAT,        NONE),
    V_(R32G32B32_USCALED, UNSIGNED_INT, NONE),
    V_(R32G32B32_SSCALED, INT,          NONE),
    V_(R32G32B32_FLOAT,   FLOAT,        NONE),
@@ -219,8 +219,8 @@ static struct etna_format formats[PIPE_FORMAT_COUNT] = {
    /* 128-bit */
    V_(R32G32B32A32_UNORM,   UNSIGNED_INT, NONE),
    V_(R32G32B32A32_SNORM,   INT,          NONE),
-   V_(R32G32B32A32_UINT,    UNSIGNED_INT, NONE),
-   V_(R32G32B32A32_SINT,    INT,          NONE),
+   V_(R32G32B32A32_UINT,    FLOAT,        NONE),
+   V_(R32G32B32A32_SINT,    FLOAT,        NONE),
    V_(R32G32B32A32_USCALED, UNSIGNED_INT, NONE),
    V_(R32G32B32A32_SSCALED, INT,          NONE),
    V_(R32G32B32A32_FLOAT,   FLOAT,        NONE),