radeonsi: add assertions into draw_vbo and check tessellation
authorMarek Olšák <marek.olsak@amd.com>
Sun, 22 Feb 2015 17:10:38 +0000 (18:10 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 22 Jul 2015 22:59:33 +0000 (00:59 +0200)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_state_draw.c

index 1793c2e6f916ffa11a0c18fd28e8dbeadf885d78..ec8dd84c9ddadde1f8ea721ce0edafb87c5e52d3 100644 (file)
@@ -718,8 +718,14 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
            (info->indexed || !info->count_from_stream_output))
                return;
 
-       if (!sctx->ps_shader || !sctx->vs_shader)
+       if (!sctx->ps_shader || !sctx->vs_shader) {
+               assert(0);
                return;
+       }
+       if (!!sctx->tes_shader != (info->mode == PIPE_PRIM_PATCHES)) {
+               assert(0);
+               return;
+       }
 
        si_decompress_textures(sctx);