Mesa (master): cso: add point rasterization sanity check assertion

Brian Paul brianp at kemper.freedesktop.org
Tue Dec 12 17:22:41 UTC 2017


Module: Mesa
Branch: master
Commit: 7469966ed2ac47de6a40829bd16a1a3e22fdbecf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7469966ed2ac47de6a40829bd16a1a3e22fdbecf

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Dec  7 21:11:40 2017 -0700

cso: add point rasterization sanity check assertion

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>

---

 src/gallium/auxiliary/cso_cache/cso_context.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index df5543c081..dd9821e828 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -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)




More information about the mesa-commit mailing list