Mesa (master): panfrost: Hoist assert from bind to create

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 19 08:55:51 UTC 2020


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

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Fri Aug 14 18:34:56 2020 -0400

panfrost: Hoist assert from bind to create

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6327>

---

 src/gallium/drivers/panfrost/pan_context.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 1700070f0d5..e9ddba22256 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -384,6 +384,9 @@ panfrost_create_rasterizer_state(
 
         so->base = *cso;
 
+        /* Gauranteed with the core GL call, so don't expose ARB_polygon_offset */
+        assert(cso->offset_clamp == 0.0);
+
         return so;
 }
 
@@ -399,9 +402,6 @@ panfrost_bind_rasterizer_state(
         if (!hwcso)
                 return;
 
-        /* Gauranteed with the core GL call, so don't expose ARB_polygon_offset */
-        assert(ctx->rasterizer->base.offset_clamp == 0.0);
-
         /* Point sprites are emulated */
 
         struct panfrost_shader_state *variant = panfrost_get_shader_state(ctx, PIPE_SHADER_FRAGMENT);



More information about the mesa-commit mailing list