aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2019-11-14 14:16:26 -0800
committerMarge Bot <[email protected]>2020-01-23 00:18:57 +0000
commitb14e718e68019019ea241d7e7a7f1bbdb8fcf21e (patch)
treee2b2a4b69e89b523f1dac23f561e950898b08bf6 /src/gallium
parent9db20748fd1af930920424a95321ee11b6eae16e (diff)
gallium: Add a cap bit for integer multiplication between 32-bit and 16-bit
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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/767>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_screen.c1
-rw-r--r--src/gallium/docs/source/screen.rst1
-rw-r--r--src/gallium/include/pipe/p_defines.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c
index 5a7790b75de..785d1bd3e24 100644
--- a/src/gallium/auxiliary/util/u_screen.c
+++ b/src/gallium/auxiliary/util/u_screen.c
@@ -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:
diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
index a0149cf6994..5137418bd7c 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
@@ -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:
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 3599b771347..4a7edd4e084 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -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,
};
/**