panfrost: Hoist assert from bind to create
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 14 Aug 2020 22:34:56 +0000 (18:34 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 19 Aug 2020 08:24:37 +0000 (08:24 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6327>

src/gallium/drivers/panfrost/pan_context.c

index 1700070f0d540045d5d984cee87fdaf43b7e0182..e9ddba222565337c16303b4177038dc55fc8281b 100644 (file)
@@ -384,6 +384,9 @@ panfrost_create_rasterizer_state(
 
         so->base = *cso;
 
 
         so->base = *cso;
 
+        /* Gauranteed with the core GL call, so don't expose ARB_polygon_offset */
+        assert(cso->offset_clamp == 0.0);
+
         return so;
 }
 
         return so;
 }
 
@@ -399,9 +402,6 @@ panfrost_bind_rasterizer_state(
         if (!hwcso)
                 return;
 
         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);
         /* Point sprites are emulated */
 
         struct panfrost_shader_state *variant = panfrost_get_shader_state(ctx, PIPE_SHADER_FRAGMENT);