iris: make clipper statistics dynamic
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 2 Dec 2018 22:39:29 +0000 (14:39 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:10 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index d5cd6ae82012622d66d3461f45561a59aba3a926..d29cc8b9229b22d2e6b67d80b3344da25345e2fd 100644 (file)
@@ -1150,7 +1150,6 @@ iris_create_rasterizer_state(struct pipe_context *ctx,
       /* cl.NonPerspectiveBarycentricEnable is filled in at draw time from
        * the FS program; cl.ForceZeroRTAIndexEnable is filled in from the FB.
        */
-      cl.StatisticsEnable = true;
       cl.EarlyCullEnable = true;
       cl.UserClipDistanceClipTestEnableBitmask = state->clip_plane_enable;
       cl.ForceUserClipDistanceClipTestEnableBitmask = true;
@@ -4237,6 +4236,8 @@ iris_upload_dirty_render_state(struct iris_context *ice,
 
       uint32_t dynamic_clip[GENX(3DSTATE_CLIP_length)];
       iris_pack_command(GENX(3DSTATE_CLIP), &dynamic_clip, cl) {
+         cl.StatisticsEnable = ice->state.statistics_counters_enabled;
+
          if (wm_prog_data->barycentric_interp_modes &
              BRW_BARYCENTRIC_NONPERSPECTIVE_BITS)
             cl.NonPerspectiveBarycentricEnable = true;