summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-11-09 15:48:18 +1000
committerDave Airlie <[email protected]>2017-11-10 08:39:16 +1000
commit24baca6e75b97bd7bf920b9efbc6461c067c9d6b (patch)
tree4be5cf2392c2f6847598e5f1f2c3853a6ad9bc55 /src/gallium/drivers/r600
parentdd38a4ee0d0b6b7addb341fe327c245bf64903e5 (diff)
r600/query: drop rest of vi workaround code.
This isn't needed in r600 anymore. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/r600_query.c46
-rw-r--r--src/gallium/drivers/r600/r600_query.h4
2 files changed, 13 insertions, 37 deletions
diff --git a/src/gallium/drivers/r600/r600_query.c b/src/gallium/drivers/r600/r600_query.c
index 9c17c3ba23e..987da9a8063 100644
--- a/src/gallium/drivers/r600/r600_query.c
+++ b/src/gallium/drivers/r600/r600_query.c
@@ -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;
diff --git a/src/gallium/drivers/r600/r600_query.h b/src/gallium/drivers/r600/r600_query.h
index 1a3c6839eb3..acba1a6540c 100644
--- a/src/gallium/drivers/r600/r600_query.h
+++ b/src/gallium/drivers/r600/r600_query.h
@@ -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,