radv: Use correct gs_out with tessellation.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 8 Jul 2019 21:18:55 +0000 (23:18 +0200)
committerDave Airlie <airlied@redhat.com>
Tue, 9 Jul 2019 02:04:16 +0000 (12:04 +1000)
We should use the primitives output by the TES in that case.

There is always a separate TES if there is no GS.

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_pipeline.c

index 351ef18a1326630cfe0e498cb4f6ff9b2d7dbb81..1e7c25955fc8daf62edaf4cce2c40e6278dd4c36 100644 (file)
@@ -4156,6 +4156,9 @@ radv_pipeline_init(struct radv_pipeline *pipeline,
        if (radv_pipeline_has_gs(pipeline)) {
                gs_out = si_conv_gl_prim_to_gs_out(pipeline->shaders[MESA_SHADER_GEOMETRY]->info.gs.output_prim);
                pipeline->graphics.can_use_guardband = gs_out == V_028A6C_OUTPRIM_TYPE_TRISTRIP;
+       } else if (radv_pipeline_has_tess(pipeline)) {
+               gs_out = si_conv_gl_prim_to_gs_out(pipeline->shaders[MESA_SHADER_TESS_EVAL]->info.tes.primitive_mode);
+               pipeline->graphics.can_use_guardband = gs_out == V_028A6C_OUTPRIM_TYPE_TRISTRIP;
        } else {
                gs_out = si_conv_prim_to_gs_out(pCreateInfo->pInputAssemblyState->topology);
        }