anv/cmd_buffer: Get rid of the meta query workaround
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 15 Dec 2017 17:12:11 +0000 (09:12 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 24 Jan 2018 05:10:20 +0000 (21:10 -0800)
Meta has been gone for a long time.

Tested-by: Józef Kucia <joseph.kucia@gmail.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "18.0" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/anv_cmd_buffer.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/genX_query.c

index 69acafaae26960378d30eca8096dd4237941882e..c0270e128f74cf854d2e2ae1f36dd03900e6490c 100644 (file)
@@ -146,7 +146,6 @@ anv_cmd_state_reset(struct anv_cmd_buffer *cmd_buffer)
    state->push_constant_stages = 0;
    state->restart_index = UINT32_MAX;
    state->dynamic = default_dynamic_state;
-   state->need_query_wa = true;
    state->pma_fix_enabled = false;
    state->hiz_enabled = false;
 
index 5043305ccf2dc7b8a23541bb474126e0aedafe79..f209dca55515753a475120e1abce003fb224f828 100644 (file)
@@ -1691,7 +1691,6 @@ struct anv_cmd_state {
    struct anv_state                             binding_tables[MESA_SHADER_STAGES];
    struct anv_state                             samplers[MESA_SHADER_STAGES];
    struct anv_dynamic_state                     dynamic;
-   bool                                         need_query_wa;
 
    struct anv_push_descriptor_set *             push_descriptors[MAX_SETS];
 
index 266163474bfc2f7eaff830ff64fde3029fa87ef8..4efcc57e4754e8fe730877a2e27be58c4ed6d6d6 100644 (file)
@@ -409,20 +409,6 @@ void genX(CmdBeginQuery)(
    ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
    ANV_FROM_HANDLE(anv_query_pool, pool, queryPool);
 
-   /* Workaround: When meta uses the pipeline with the VS disabled, it seems
-    * that the pipelining of the depth write breaks. What we see is that
-    * samples from the render pass clear leaks into the first query
-    * immediately after the clear. Doing a pipecontrol with a post-sync
-    * operation and DepthStallEnable seems to work around the issue.
-    */
-   if (cmd_buffer->state.need_query_wa) {
-      cmd_buffer->state.need_query_wa = false;
-      anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pc) {
-         pc.DepthCacheFlushEnable   = true;
-         pc.DepthStallEnable        = true;
-      }
-   }
-
    switch (pool->type) {
    case VK_QUERY_TYPE_OCCLUSION:
       emit_ps_depth_count(cmd_buffer, &pool->bo, query * pool->stride + 8);