[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mesa3d-dev
Subject:    Re: [Mesa-dev] [PATCH 3/9] intel/compiler: Add a uses_basevertexid flag
From:       Kenneth Graunke <kenneth () whitecape ! org>
Date:       2017-11-30 19:42:56
Message-ID: 1586741.oR2GpQ9YzR () kirito
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Friday, November 10, 2017 9:53:31 AM PST Antia Puentes wrote:
> From: Neil Roberts <nroberts@igalia.com>
> 
> ---
>  src/intel/compiler/brw_compiler.h | 1 +
>  src/intel/compiler/brw_vec4.cpp   | 4 ++++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h
> index df6ee018546..6b5b73a54f0 100644
> --- a/src/intel/compiler/brw_compiler.h
> +++ b/src/intel/compiler/brw_compiler.h
> @@ -969,6 +969,7 @@ struct brw_vs_prog_data {
>     bool uses_vertexid;
>     bool uses_instanceid;
>     bool uses_basevertex;
> +   bool uses_basevertexid;
>     bool uses_baseinstance;
>     bool uses_drawid;
>  };
> diff --git a/src/intel/compiler/brw_vec4.cpp b/src/intel/compiler/brw_vec4.cpp
> index bbe4585e0c7..d996ab8c89f 100644
> --- a/src/intel/compiler/brw_vec4.cpp
> +++ b/src/intel/compiler/brw_vec4.cpp
> @@ -2795,6 +2795,10 @@ brw_compile_vs(const struct brw_compiler *compiler, void *log_data,
>         BITFIELD64_BIT(SYSTEM_VALUE_BASE_VERTEX))
>        prog_data->uses_basevertex = true;
>  
> +   if (shader->info.system_values_read &
> +       BITFIELD64_BIT(SYSTEM_VALUE_BASE_VERTEX_ID))
> +      prog_data->uses_basevertexid = true;
> +
>     if (shader->info.system_values_read &
>         BITFIELD64_BIT(SYSTEM_VALUE_BASE_INSTANCE))
>        prog_data->uses_baseinstance = true;
> 

This is fine, and gets a:

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

but I'm also wondering whether it'd make sense to just include
system_values_read here or in brw_stage_prog_data.  We're up to 6
booleans that come from flags, which seems a little silly...

["signature.asc" (application/pgp-signature)]
[Attachment #6 (text/plain)]

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic