diff options
author | Kenneth Graunke <[email protected]> | 2019-06-26 23:38:59 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-06-27 08:12:22 -0700 |
commit | 340df53d6a9dea21a968bb040232ffa66db53add (patch) | |
tree | 15eac714d4e970d45919936944c3386f889ed193 /src/gallium/drivers/iris/iris_context.h | |
parent | 16d334951e7302a40c2d7814a5f8aae32ec5732c (diff) |
iris: Fix resource tracking for CS thread ID buffer
Today, we stream the compute shader thread IDs simply because they're
(annoyingly) relative to dynamic state base address. We could upload
them once at compile time, but we'd need a separate non-streaming
uploader for IRIS_MEMZONE_DYNAMIC, and I'm not sure it's worth it.
stream_state pins the buffer for use in the current batch, but also
returns a reference to the pipe_resource. We dropped this reference
on the floor, leaking a reference basically every time we dispatched
a compute shader after switching to a new one.
The reason it returns a reference is so that we can hold on to it and
re-pin it in iris_restore_compute_saved_bos, which we were also failing
to do. So if we actually filled up a batch with repeated dispatches to
the same compute shader, and flushed, then continued dispatching, we
would fail to pin it and likely GPU hang.
Diffstat (limited to 'src/gallium/drivers/iris/iris_context.h')
-rw-r--r-- | src/gallium/drivers/iris/iris_context.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index e34ea930eae..21877173b3f 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -712,6 +712,7 @@ struct iris_context { struct pipe_resource *scissor; struct pipe_resource *blend; struct pipe_resource *index_buffer; + struct pipe_resource *cs_thread_ids; } last_res; /** Records the size of variable-length state for INTEL_DEBUG=bat */ |