summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_fence.h
diff options
context:
space:
mode:
authorBruce Cherniak <[email protected]>2016-03-09 19:30:00 -0600
committerTim Rowley <[email protected]>2016-03-14 14:07:48 -0500
commite9d68cc3da07c4b566799bbaec2434bfc21d3e0c (patch)
treee84d07138133a29b1398de4355cebecf4fae3b1d /src/gallium/drivers/swr/swr_fence.h
parent7a2333e4efbaefe6bd6db87b9b2443737c89f01e (diff)
gallium/swr: Resource management
Better tracking of resource state and synchronization. A follow on commit will clean up resource functions into a new swr_resource.cpp file. Reviewed-By: George Kyriazis <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_fence.h')
-rw-r--r--src/gallium/drivers/swr/swr_fence.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/swr_fence.h b/src/gallium/drivers/swr/swr_fence.h
index 257b2408820..df3776e8989 100644
--- a/src/gallium/drivers/swr/swr_fence.h
+++ b/src/gallium/drivers/swr/swr_fence.h
@@ -33,6 +33,8 @@ struct swr_fence {
uint64_t read;
uint64_t write;
+ unsigned pending;
+
unsigned id; /* Just for reference */
};
@@ -44,9 +46,9 @@ swr_fence(struct pipe_fence_handle *fence)
}
static INLINE boolean
-swr_is_fence_done(struct swr_fence *fence)
+swr_is_fence_pending(struct pipe_fence_handle *fence_handle)
{
- return (fence->read == fence->write);
+ return swr_fence(fence_handle)->pending;
}