gallium: Add a cap bit for integer multiplication between 32-bit and 16-bit
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 14 Nov 2019 22:16:26 +0000 (14:16 -0800)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Jan 2020 00:18:57 +0000 (00:18 +0000)
Driver supports integer multiplication between a 32-bit integer and a
16-bit integer.  If the second operand is 32-bits, the upper 16-bits are
ignored, and the low 16-bits are possibly sign extended as necessary.

Iris will eventually enable this.  Not sure about other drivers.

v2: Add default value to u_screen.c.  Suggested by Caio.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/767>

src/gallium/auxiliary/util/u_screen.c
src/gallium/docs/source/screen.rst
src/gallium/include/pipe/p_defines.h

index 5a7790b75dea5ee61cae0c793a29c7e50dd9e515..785d1bd3e24a52b02ceb5bddc558ea6f7b86d32b 100644 (file)
@@ -405,6 +405,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
       return 16;
 
    case PIPE_CAP_OPENCL_INTEGER_FUNCTIONS:
+   case PIPE_CAP_INTEGER_MULTIPLY_32X16:
       return 0;
 
    default:
index a0149cf6994f0021ea3366a988473a3c45591a8e..5137418bd7c622916ffec571f9e2f21b620eb37c 100644 (file)
@@ -566,6 +566,7 @@ The integer capabilities:
 * ``PIPE_CAP_CLIP_PLANES``: Driver supports user-defined clip-planes.
 * ``PIPE_CAP_MAX_VERTEX_BUFFERS``: Number of supported vertex buffers.
 * ``PIPE_CAP_OPENCL_INTEGER_FUNCTIONS``: Driver supports extended OpenCL-style integer functions.  This includes averge, saturating additiong, saturating subtraction, absolute difference, count leading zeros, and count trailing zeros.
+* ``PIPE_CAP_INTEGER_MULTIPLY_32X16``: Driver supports integer multiplication between a 32-bit integer and a 16-bit integer.  If the second operand is 32-bits, the upper 16-bits are ignored, and the low 16-bits are possibly sign extended as necessary.
 
 .. _pipe_capf:
 
index 3599b7713471c55f5c450d5c9a58a8445d32853d..4a7edd4e08431bf640944222e6936df271dc8a7b 100644 (file)
@@ -911,6 +911,7 @@ enum pipe_cap
    PIPE_CAP_CLIP_PLANES,
    PIPE_CAP_MAX_VERTEX_BUFFERS,
    PIPE_CAP_OPENCL_INTEGER_FUNCTIONS,
+   PIPE_CAP_INTEGER_MULTIPLY_32X16,
 };
 
 /**