[Mesa-dev] [PATCH 13/17] st/mesa: add mappings for compute shader sysvals
Ilia Mirkin
imirkin at alum.mit.edu
Mon Jan 25 07:01:04 PST 2016
On Sun, Jan 24, 2016 at 4:09 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> LOCAL_INVOCATION_ID, WORK_GROUP_ID and NUM_WORK_GROUPS are respectively
> mapped to THREAD_ID, BLOCK_ID and GRID_SIZE.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> index 737cc56..922d863 100644
> --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
> @@ -4873,6 +4873,12 @@ const unsigned _mesa_sysval_to_semantic[SYSTEM_VALUE_MAX] = {
> TGSI_SEMANTIC_PRIMID,
> TGSI_SEMANTIC_TESSOUTER,
> TGSI_SEMANTIC_TESSINNER,
> +
> + /* Compute shaders
> + */
> + TGSI_SEMANTIC_THREAD_ID,
> + TGSI_SEMANTIC_BLOCK_ID,
> + TGSI_SEMANTIC_GRID_SIZE,
Please add assert's in st_translate_program for these.
> };
>
> /**
> --
> 2.6.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list