[Mesa-dev] [PATCH 4/6] gallium/auxiliary: Add NV_fill_rectangle to pipe state

Brian Paul brianp at vmware.com
Thu Mar 23 16:44:38 UTC 2017


On 03/23/2017 09:27 AM, Lyude wrote:
> Signed-off-by: Lyude <lyude at redhat.com>
> ---
>   src/gallium/include/pipe/p_defines.h | 1 +
>   src/gallium/include/pipe/p_state.h   | 4 ++--
>   2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
> index 0f0e260..7f781c4 100644
> --- a/src/gallium/include/pipe/p_defines.h
> +++ b/src/gallium/include/pipe/p_defines.h
> @@ -133,6 +133,7 @@ enum {
>      PIPE_POLYGON_MODE_FILL,
>      PIPE_POLYGON_MODE_LINE,
>      PIPE_POLYGON_MODE_POINT,
> +   PIPE_POLYGON_MODE_FILL_RECTANGLE,
>   };
>
>   /** Polygon face specification, eg for culling */
> diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
> index ce19b92..9591d05 100644
> --- a/src/gallium/include/pipe/p_state.h
> +++ b/src/gallium/include/pipe/p_state.h
> @@ -90,8 +90,8 @@ struct pipe_rasterizer_state
>      unsigned clamp_fragment_color:1;
>      unsigned front_ccw:1;
>      unsigned cull_face:2;      /**< PIPE_FACE_x */
> -   unsigned fill_front:2;     /**< PIPE_POLYGON_MODE_x */
> -   unsigned fill_back:2;      /**< PIPE_POLYGON_MODE_x */
> +   unsigned fill_front:3;     /**< PIPE_POLYGON_MODE_x */
> +   unsigned fill_back:3;      /**< PIPE_POLYGON_MODE_x */
>      unsigned offset_point:1;
>      unsigned offset_line:1;
>      unsigned offset_tri:1;
>

Are you sure the bitfields need to be widened?  There's four possible 
values for the fill mode now, 0..3 which should fit in two bits.

-Brian



More information about the mesa-dev mailing list