[Mesa-dev] [PATCH 4/5] i965: If control_data_header_size_bits is zero, don't do EndPrimitive

Kenneth Graunke kenneth at whitecape.org
Tue May 31 21:24:03 UTC 2016


On Tuesday, May 31, 2016 11:52:56 AM PDT Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
> 
> This can occur when max_vertices=0 is explicitly specified.
> 
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Cc: "12.0" <mesa-stable at lists.freedesktop.org>
> ---
>  src/mesa/drivers/dri/i965/brw_fs_nir.cpp          | 3 +++
>  src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp | 3 +++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> index 58191fc..e9f6999 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> @@ -1668,6 +1668,9 @@ fs_visitor::emit_gs_end_primitive(const nir_src &vertex_count_nir_src)
>     struct brw_gs_prog_data *gs_prog_data =
>        (struct brw_gs_prog_data *) prog_data;
>  
> +   if (gs_compile->control_data_header_size_bits == 0)
> +      return;
> +
>     /* We can only do EndPrimitive() functionality when the control data
>      * consists of cut bits.  Fortunately, the only time it isn't is when the
>      * output type is points, in which case EndPrimitive() is a no-op.
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
> index 76a80a5..927438f 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
> @@ -539,6 +539,9 @@ vec4_gs_visitor::gs_end_primitive()
>        return;
>     }
>  
> +   if (c->control_data_header_size_bits == 0)
> +      return;
> +
>     /* Cut bits use one bit per vertex. */
>     assert(c->control_data_bits_per_vertex == 1);
>  
> 

Patch 1 and 4-5 are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160531/e171ca4a/attachment.sig>


More information about the mesa-dev mailing list