anv: merge tessellation's primitive mode in merge_tess_info()
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Wed, 28 Jun 2017 07:39:55 +0000 (09:39 +0200)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Mon, 3 Jul 2017 06:00:43 +0000 (08:00 +0200)
SPIR-V tessellation shaders that were created from HLSL will have
the primitive generation domain set in tessellation control shader
(hull shader in HLSL) instead of the tessellation evaluation shader.

v2:
- Add assert (Kenneth)

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/vulkan/anv_pipeline.c

index c43915e4c08ea40f3702982ab47af94e4a5b8096..5494a6ee75ec3bfdd16b29fd8b07e6cbf716462c 100644 (file)
@@ -587,6 +587,10 @@ merge_tess_info(struct shader_info *tes_info,
           tcs_info->tess.spacing == tes_info->tess.spacing);
    tes_info->tess.spacing |= tcs_info->tess.spacing;
 
+   assert(tcs_info->tess.primitive_mode == 0 ||
+          tes_info->tess.primitive_mode == 0 ||
+          tcs_info->tess.primitive_mode == tes_info->tess.primitive_mode);
+   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;
 }