[Mesa-dev] [PATCH 1/3] amd/common: scan if gl_InvocationID is used

Marek Olšák maraeo at gmail.com
Tue Dec 26 17:40:06 UTC 2017


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Wed, Dec 20, 2017 at 8:56 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/amd/common/ac_shader_info.c | 3 +++
>  src/amd/common/ac_shader_info.h | 1 +
>  2 files changed, 4 insertions(+)
>
> diff --git a/src/amd/common/ac_shader_info.c b/src/amd/common/ac_shader_info.c
> index ab5388fb53..5dac1131bd 100644
> --- a/src/amd/common/ac_shader_info.c
> +++ b/src/amd/common/ac_shader_info.c
> @@ -70,6 +70,9 @@ gather_intrinsic_info(nir_intrinsic_instr *instr, struct ac_shader_info *info)
>         case nir_intrinsic_load_view_index:
>                 info->needs_multiview_view_index = true;
>                 break;
> +       case nir_intrinsic_load_invocation_id:
> +               info->uses_invocation_id = true;
> +               break;
>         case nir_intrinsic_vulkan_resource_index:
>                 info->desc_set_used_mask |= (1 << nir_intrinsic_desc_set(instr));
>                 break;
> diff --git a/src/amd/common/ac_shader_info.h b/src/amd/common/ac_shader_info.h
> index 79e5615254..7c79d1a728 100644
> --- a/src/amd/common/ac_shader_info.h
> +++ b/src/amd/common/ac_shader_info.h
> @@ -31,6 +31,7 @@ struct ac_shader_info {
>         bool needs_push_constants;
>         uint32_t desc_set_used_mask;
>         bool needs_multiview_view_index;
> +       bool uses_invocation_id;
>         struct {
>                 bool has_vertex_buffers; /* needs vertex buffers and base/start */
>                 bool needs_draw_id;
> --
> 2.15.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list