iris: Use stream uploader for shader draw parameters.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 20 Jun 2019 06:08:04 +0000 (01:08 -0500)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 20 Jun 2019 18:32:16 +0000 (13:32 -0500)
Most vertex data lives in user VBOs in IRIS_MEMZONE_OTHER, which
typically have high bits set to 0xffff.  The shader draw parameters were
being uploaded in IRIS_MEMZONE_DYNAMIC, which have high bets set to 0x2.
This was causing a lot of ping-ponging of high bits, leading to
unnecessary VF cache flushing.

Cuts 7.2% of the flushes in the Civizilation VI demo on Kabylake GT2.

src/gallium/drivers/iris/iris_state.c

index 0984ae87acfcd2388ceb7f696b2959e72b3e7651..13942df5008a15ea41350ff5c197b44063b05f41 100644 (file)
@@ -5054,7 +5054,7 @@ iris_upload_dirty_render_state(struct iris_context *ice,
 
       if (ice->state.vs_uses_draw_params) {
          if (ice->draw.draw_params_offset == 0) {
-            u_upload_data(ice->state.dynamic_uploader, 0, sizeof(ice->draw.params),
+            u_upload_data(ice->ctx.stream_uploader, 0, sizeof(ice->draw.params),
                           4, &ice->draw.params, &ice->draw.draw_params_offset,
                           &ice->draw.draw_params_res);
          }
@@ -5080,7 +5080,7 @@ iris_upload_dirty_render_state(struct iris_context *ice,
       }
 
       if (ice->state.vs_uses_derived_draw_params) {
-         u_upload_data(ice->state.dynamic_uploader, 0,
+         u_upload_data(ice->ctx.stream_uploader, 0,
                        sizeof(ice->draw.derived_params), 4,
                        &ice->draw.derived_params,
                        &ice->draw.derived_draw_params_offset,