[Mesa-dev] [PATCH] anv: merge tessellation's primitive mode in merge_tess_info()

Kenneth Graunke kenneth at whitecape.org
Sun Jul 2 03:03:24 UTC 2017


On Wednesday, June 28, 2017 3:20:29 AM PDT Samuel Iglesias Gonsálvez wrote:
> SPIR-V tessellation shaders that were created from HSLS will have
> the primitive generation domain set in tessellation control shader
> (hull shader in HLSL) instead of the tessellation evaluation shader.
> 
> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
> ---
>  src/intel/vulkan/anv_pipeline.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
> index c43915e..76b45b9 100644
> --- a/src/intel/vulkan/anv_pipeline.c
> +++ b/src/intel/vulkan/anv_pipeline.c
> @@ -587,6 +587,7 @@ merge_tess_info(struct shader_info *tes_info,
>            tcs_info->tess.spacing == tes_info->tess.spacing);
>     tes_info->tess.spacing |= tcs_info->tess.spacing;
>  
> +   tes_info->tess.primitive_mode |= tcs_info->tess.primitive_mode;
>     tes_info->tess.ccw |= tcs_info->tess.ccw;
>     tes_info->tess.point_mode |= tcs_info->tess.point_mode;
>  }
> 

Oops.  I even had the comment and everything.  Please add:

   assert(tcs_info->tess.primitive_mode == 0 ||
          tes_info->tess.primitive_mode == 0 ||
          tcs_info->tess.primitive_mode == tes_info->tess.primitive_mode);

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

Thanks for fixing this.  I looked to see if radv needed a similar change,
but it doesn't look like they have any merging code like this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170701/d265c80f/attachment-0001.sig>


More information about the mesa-dev mailing list