cso: add point rasterization sanity check assertion
authorBrian Paul <brianp@vmware.com>
Fri, 8 Dec 2017 04:11:40 +0000 (21:11 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 12 Dec 2017 16:46:18 +0000 (09:46 -0700)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/cso_cache/cso_context.c

index df5543c..dd9821e 100644 (file)
@@ -592,6 +592,11 @@ enum pipe_error cso_set_rasterizer(struct cso_context *ctx,
                                                        (void*)templ, key_size);
    void *handle = NULL;
 
+   /* We can't have both point_quad_rasterization (sprites) and point_smooth
+    * (round AA points) enabled at the same time.
+    */
+   assert(!(templ->point_quad_rasterization && templ->point_smooth));
+
    if (cso_hash_iter_is_null(iter)) {
       struct cso_rasterizer *cso = MALLOC(sizeof(struct cso_rasterizer));
       if (!cso)