summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_resource.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-07-30 23:49:34 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:08 -0800
commitdfe1ee4f6f98408e570b2cce882a566becd9bd7d (patch)
tree8ae1d8b40c715ad804313919ddf7406617401779 /src/gallium/drivers/iris/iris_resource.h
parent387a414f2cb2673e9adbe2f84a4a54d5f2a5334c (diff)
iris: comment everything
1. Write the code 2. Add comments 3. PROFIT (or just avoid cost of explaining or relearning things...)
Diffstat (limited to 'src/gallium/drivers/iris/iris_resource.h')
-rw-r--r--src/gallium/drivers/iris/iris_resource.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_resource.h b/src/gallium/drivers/iris/iris_resource.h
index 77a89f292f2..cf333cf0a24 100644
--- a/src/gallium/drivers/iris/iris_resource.h
+++ b/src/gallium/drivers/iris/iris_resource.h
@@ -27,6 +27,10 @@
#include "util/u_inlines.h"
#include "intel/isl/isl.h"
+#define IRIS_RESOURCE_FLAG_SHADER_MEMZONE (PIPE_RESOURCE_FLAG_DRV_PRIV << 0)
+#define IRIS_RESOURCE_FLAG_SURFACE_MEMZONE (PIPE_RESOURCE_FLAG_DRV_PRIV << 1)
+#define IRIS_RESOURCE_FLAG_DYNAMIC_MEMZONE (PIPE_RESOURCE_FLAG_DRV_PRIV << 2)
+
/**
* Resources represent a GPU buffer object or image (mipmap tree).
*
@@ -71,6 +75,9 @@ struct iris_transfer {
void (*unmap)(struct iris_transfer *);
};
+/**
+ * Unwrap a pipe_resource to get the underlying iris_bo (for convenience).
+ */
static inline struct iris_bo *
iris_resource_bo(struct pipe_resource *p_res)
{