struct iris_bo *bo;
struct iris_query_snapshots *map;
+
+ int batch_idx;
};
struct iris_query_snapshots {
static void
mark_available(struct iris_context *ice, struct iris_query *q)
{
- struct iris_batch *batch = &ice->batches[IRIS_BATCH_RENDER];
+ struct iris_batch *batch = &ice->batches[q->batch_idx];
unsigned flags = PIPE_CONTROL_WRITE_IMMEDIATE;
unsigned offset = offsetof(struct iris_query_snapshots, snapshots_landed);
static void
write_value(struct iris_context *ice, struct iris_query *q, unsigned offset)
{
- struct iris_batch *batch = &ice->batches[IRIS_BATCH_RENDER];
+ struct iris_batch *batch = &ice->batches[q->batch_idx];
const struct gen_device_info *devinfo = &batch->screen->devinfo;
if (!iris_is_query_pipelined(q)) {
static void
calculate_result_on_gpu(struct iris_context *ice, struct iris_query *q)
{
- struct iris_batch *batch = &ice->batches[IRIS_BATCH_RENDER];
+ struct iris_batch *batch = &ice->batches[q->batch_idx];
if (q->type == PIPE_QUERY_SO_OVERFLOW_PREDICATE ||
q->type == PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE) {
q->type = query_type;
q->index = index;
+ if (q->type == PIPE_QUERY_PIPELINE_STATISTICS && q->index == 10)
+ q->batch_idx = IRIS_BATCH_COMPUTE;
+ else
+ q->batch_idx = IRIS_BATCH_RENDER;
return (struct pipe_query *) q;
}
const struct gen_device_info *devinfo = &screen->devinfo;
if (!q->ready) {
- if (iris_batch_references(&ice->batches[IRIS_BATCH_RENDER], q->bo))
- iris_batch_flush(&ice->batches[IRIS_BATCH_RENDER]);
+ if (iris_batch_references(&ice->batches[q->batch_idx], q->bo))
+ iris_batch_flush(&ice->batches[q->batch_idx]);
if (!q->map->snapshots_landed) {
if (wait)
{
struct iris_context *ice = (void *) ctx;
struct iris_query *q = (void *) query;
- struct iris_batch *batch = &ice->batches[IRIS_BATCH_RENDER];
+ struct iris_batch *batch = &ice->batches[q->batch_idx];
const struct gen_device_info *devinfo = &batch->screen->devinfo;
struct iris_resource *res = (void *) p_res;
unsigned snapshots_landed_offset =