[Mesa-dev] [PATCH 06/11] glsl: add SYSTEM_VALUE_VERTEX_CNT
Rob Clark
robdclark at gmail.com
Wed Sep 16 16:30:48 PDT 2015
On Sun, Sep 13, 2015 at 11:51 AM, Rob Clark <robdclark at gmail.com> wrote:
> From: Rob Clark <robclark at freedesktop.org>
>
> Used internally in freedreno/ir3 to calc stream-out position. Seems
> like a generic enough way to implement stream-out (using str instrs),
> plus it avoids compiler warnings by sneaking in a non-enum value in
> switch statements.
>
> Signed-off-by: Rob Clark <robclark at freedesktop.org>
Anyone got any strong opinions about this? At least a Meh'd-by? I'd
like to push the freedreno/ir3 conversion to
varying_slot_/frag_result_/etc, but need a way to handle my internal
vtxcnt sysval, but don't want to step on any toes..
I could alternatively do something like SYSTEM_VALUE_DRIVERn which
gets re-#defined in freedreno/ir3?
BR,
-R
> ---
> src/glsl/shader_enums.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/glsl/shader_enums.h b/src/glsl/shader_enums.h
> index d054b87..fb4bcd0 100644
> --- a/src/glsl/shader_enums.h
> +++ b/src/glsl/shader_enums.h
> @@ -402,6 +402,12 @@ typedef enum
> SYSTEM_VALUE_TESS_LEVEL_INNER, /**< TES input */
> /*@}*/
>
> + /**
> + * Driver internal vertex-count, used (for example) for drivers to
> + * calculate stride for stream-out outputs. Not externally visible.
> + */
> + SYSTEM_VALUE_VERTEX_CNT,
> +
> SYSTEM_VALUE_MAX /**< Number of values */
> } gl_system_value;
>
> --
> 2.4.3
>
More information about the mesa-dev
mailing list