mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
tgsi: Add WORK_DIM System Value
Add a new WORK_DIM SV type, this is will return the grid dimensions (1-4) for compute (opencl) kernels. This is necessary to implement the opencl get_work_dim() function. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
parent
da7efadf04
commit
d386cef246
3 changed files with 10 additions and 0 deletions
|
|
@ -99,6 +99,7 @@ const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT] =
|
|||
"HELPER_INVOCATION",
|
||||
"BASEINSTANCE",
|
||||
"DRAWID",
|
||||
"WORK_DIM",
|
||||
};
|
||||
|
||||
const char *tgsi_texture_names[TGSI_TEXTURE_COUNT] =
|
||||
|
|
|
|||
|
|
@ -3046,6 +3046,14 @@ For vertex shaders, the zero-based index of the current draw in a
|
|||
component is used.
|
||||
|
||||
|
||||
TGSI_SEMANTIC_WORK_DIM
|
||||
""""""""""""""""""""""
|
||||
|
||||
For compute shaders started via opencl this retrieves the work_dim
|
||||
parameter to the clEnqueueNDRangeKernel call with which the shader
|
||||
was started.
|
||||
|
||||
|
||||
Declaration Interpolate
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ enum tgsi_semantic {
|
|||
TGSI_SEMANTIC_HELPER_INVOCATION, /**< current invocation is helper */
|
||||
TGSI_SEMANTIC_BASEINSTANCE,
|
||||
TGSI_SEMANTIC_DRAWID,
|
||||
TGSI_SEMANTIC_WORK_DIM, /**< opencl get_work_dim value */
|
||||
TGSI_SEMANTIC_COUNT, /**< number of semantic values */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue