iris: Track a binding history for buffer resources

This will let us know what caches to flush / state to dirty when
altering the contents of a buffer.
This commit is contained in:
Kenneth Graunke
2018-11-21 00:38:49 -08:00
parent f49f506b13
commit d169747a3e
3 changed files with 31 additions and 3 deletions

View File

@@ -46,6 +46,12 @@ struct iris_resource {
enum pipe_format internal_format;
struct isl_surf surf;
struct iris_bo *bo;
/**
* A bitfield of PIPE_BIND_* indicating how this resource was bound
* in the past. Only meaningful for PIPE_BUFFER; used for flushing.
*/
unsigned bind_history;
};
/**