[Mesa-dev] [PATCH] i965: Add enums for 3DSTATE_TE field values.
Kristian Høgsberg
krh at bitplanet.net
Tue Nov 17 11:25:04 PST 2015
On Tue, Nov 17, 2015 at 11:16 AM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> 3DSTATE_TE has partitioning, output topology, and domain fields,
> each of which has several enumerated values. We'll also need to
> switch on the domain, so enums (rather than #defines) seem like a
> natural fit.
>
> I chose to put these in brw_compiler.h because they'll be stored
> in struct brw_tes_prog_data, which will live there.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
> ---
> src/mesa/drivers/dri/i965/brw_compiler.h | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_compiler.h b/src/mesa/drivers/dri/i965/brw_compiler.h
> index 8f147d3..1ee01eb 100644
> --- a/src/mesa/drivers/dri/i965/brw_compiler.h
> +++ b/src/mesa/drivers/dri/i965/brw_compiler.h
> @@ -490,6 +490,34 @@ enum shader_dispatch_mode {
> DISPATCH_MODE_SIMD8 = 3,
> };
>
> +/**
> + * @defgroup Tessellator parameter enumerations.
> + *
> + * These correspond to the hardware values in 3DSTATE_TE, and are provided
> + * as part of the tessellation evaluation shader.
> + *
> + * @{
> + */
> +enum brw_tess_partitioning {
> + BRW_TESS_PARTITIONING_INTEGER = 0,
> + BRW_TESS_PARTITIONING_ODD_FRACTIONAL = 1,
> + BRW_TESS_PARTITIONING_EVEN_FRACTIONAL = 2,
> +};
> +
> +enum brw_tess_output_topology {
> + BRW_TESS_OUTPUT_TOPOLOGY_POINT = 0,
> + BRW_TESS_OUTPUT_TOPOLOGY_LINE = 1,
> + BRW_TESS_OUTPUT_TOPOLOGY_TRI_CW = 2,
> + BRW_TESS_OUTPUT_TOPOLOGY_TRI_CCW = 3,
> +};
> +
> +enum brw_tess_domain {
> + BRW_TESS_DOMAIN_QUAD = 0,
> + BRW_TESS_DOMAIN_TRI = 1,
> + BRW_TESS_DOMAIN_ISOLINE = 2,
> +};
> +/** @} */
> +
> struct brw_vue_prog_data {
> struct brw_stage_prog_data base;
> struct brw_vue_map vue_map;
> --
> 2.6.2
>
> _______________________________________________
> 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