r600/query: drop rest of vi workaround code.
authorDave Airlie <airlied@redhat.com>
Thu, 9 Nov 2017 05:48:18 +0000 (15:48 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 9 Nov 2017 22:39:16 +0000 (08:39 +1000)
This isn't needed in r600 anymore.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_query.c
src/gallium/drivers/r600/r600_query.h

index 9c17c3ba23e1150080319e2413bf725db39f8eec..987da9a80631a119baf29e36b4a6bccfbec0a3dd 100644 (file)
@@ -506,7 +506,6 @@ void r600_query_hw_destroy(struct r600_common_screen *rscreen,
        }
 
        r600_resource_reference(&query->buffer.buf, NULL);
-       r600_resource_reference(&query->workaround_buf, NULL);
        FREE(rquery);
 }
 
@@ -932,23 +931,19 @@ static void r600_emit_query_predication(struct r600_common_context *ctx,
        flag_wait = ctx->render_cond_mode == PIPE_RENDER_COND_WAIT ||
                    ctx->render_cond_mode == PIPE_RENDER_COND_BY_REGION_WAIT;
 
-       if (query->workaround_buf) {
-               op = PRED_OP(PREDICATION_OP_BOOL64);
-       } else {
-               switch (query->b.type) {
-               case PIPE_QUERY_OCCLUSION_COUNTER:
-               case PIPE_QUERY_OCCLUSION_PREDICATE:
-                       op = PRED_OP(PREDICATION_OP_ZPASS);
-                       break;
-               case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
-               case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
-                       op = PRED_OP(PREDICATION_OP_PRIMCOUNT);
-                       invert = !invert;
-                       break;
-               default:
-                       assert(0);
-                       return;
-               }
+       switch (query->b.type) {
+       case PIPE_QUERY_OCCLUSION_COUNTER:
+       case PIPE_QUERY_OCCLUSION_PREDICATE:
+               op = PRED_OP(PREDICATION_OP_ZPASS);
+               break;
+       case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
+       case PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE:
+               op = PRED_OP(PREDICATION_OP_PRIMCOUNT);
+               invert = !invert;
+               break;
+       default:
+               assert(0);
+               return;
        }
 
        /* if true then invert, see GL_ARB_conditional_render_inverted */
@@ -957,19 +952,6 @@ static void r600_emit_query_predication(struct r600_common_context *ctx,
        else
                op |= PREDICATION_DRAW_VISIBLE; /* Draw if visible or no overflow */
 
-       /* Use the value written by compute shader as a workaround. Note that
-        * the wait flag does not apply in this predication mode.
-        *
-        * The shader outputs the result value to L2. Workarounds only affect VI
-        * and later, where the CP reads data from L2, so we don't need an
-        * additional flush.
-        */
-       if (query->workaround_buf) {
-               uint64_t va = query->workaround_buf->gpu_address + query->workaround_offset;
-               emit_set_predicate(ctx, query->workaround_buf, va, op);
-               return;
-       }
-
        op |= flag_wait ? PREDICATION_HINT_WAIT : PREDICATION_HINT_NOWAIT_DRAW;
 
        /* emit predicate packets for all data blocks */
@@ -1067,8 +1049,6 @@ bool r600_query_hw_begin(struct r600_common_context *rctx,
        if (!(query->flags & R600_QUERY_HW_FLAG_BEGIN_RESUMES))
                r600_query_hw_reset_buffers(rctx, query);
 
-       r600_resource_reference(&query->workaround_buf, NULL);
-
        r600_query_hw_emit_start(rctx, query);
        if (!query->buffer.buf)
                return false;
index 1a3c6839eb3128daa5616efa99939c52c5965dff..acba1a6540c8392928162a33d47d5c6901eda753 100644 (file)
@@ -193,10 +193,6 @@ struct r600_query_hw {
        struct list_head list;
        /* For transform feedback: which stream the query is for */
        unsigned stream;
-
-       /* Workaround via compute shader */
-       struct r600_resource *workaround_buf;
-       unsigned workaround_offset;
 };
 
 bool r600_query_hw_init(struct r600_common_screen *rscreen,