intel: Emit 3DSTATE_VF_STATISTICS dynamically

Pipeline statistics queries should not count BLORP's rectangles.

    (23) How do operations like Clear, TexSubImage, etc. affect the
         results of the newly introduced queries?

      DISCUSSION: Implementations might require "helper" rendering
      commands be issued to implement certain operations like Clear,
      TexSubImage, etc.

      RESOLVED: They don't. Only application submitted rendering
      commands should have an effect on the results of the queries.

Piglit's arb_pipeline_statistics_query-vert_adj exposes this bug when
the driver is hacked to always perform glBufferData via a GPU staging
copy (for debugging purposes).

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Kenneth Graunke
2019-04-12 11:55:38 -07:00
parent 47709ca146
commit 8bf9b7b5b6
6 changed files with 35 additions and 11 deletions

View File

@@ -258,11 +258,6 @@ genX(blorp_exec)(struct blorp_batch *batch,
*/
genX(cmd_buffer_enable_pma_fix)(cmd_buffer, false);
/* Disable VF statistics */
blorp_emit(batch, GENX(3DSTATE_VF_STATISTICS), vf) {
vf.StatisticsEnable = false;
}
blorp_exec(batch, params);
cmd_buffer->state.gfx.vb_dirty = ~0;