summaryrefslogtreecommitdiffstats
path: root/src/intel/isl/isl.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-02-22 16:48:19 -0800
committerJason Ekstrand <[email protected]>2016-02-27 10:26:14 -0800
commita0cd20eb7fc9396f5ba2ad201018989074091b8f (patch)
tree9c73d84b8ff138efdbde989eb9d95d71192dc1ac /src/intel/isl/isl.h
parent9d5b8f7709d7cce1493cc0b38c750ad1173f7327 (diff)
isl: Add a helper for filling a buffer surface state
Diffstat (limited to 'src/intel/isl/isl.h')
-rw-r--r--src/intel/isl/isl.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/intel/isl/isl.h b/src/intel/isl/isl.h
index dbd480c51ce..151f1ca27cb 100644
--- a/src/intel/isl/isl.h
+++ b/src/intel/isl/isl.h
@@ -789,6 +789,35 @@ struct isl_surf_fill_state_info {
union isl_color_value clear_color;
};
+struct isl_buffer_fill_state_info {
+ /**
+ * The address of the surface in GPU memory.
+ */
+ uint64_t address;
+
+ /**
+ * The size of the buffer
+ */
+ uint64_t size;
+
+ /**
+ * The Memory Object Control state for the filled surface state.
+ *
+ * The exact format of this value depends on hardware generation.
+ */
+ uint32_t mocs;
+
+ /**
+ * The format to use in the surface state
+ *
+ * This may differ from the format of the actual isl_surf but have the
+ * same block size.
+ */
+ enum isl_format format;
+
+ uint32_t stride;
+};
+
extern const struct isl_format_layout isl_format_layouts[];
void
@@ -991,6 +1020,14 @@ void
isl_surf_fill_state_s(const struct isl_device *dev, void *state,
const struct isl_surf_fill_state_info *restrict info);
+#define isl_buffer_fill_state(dev, state, ...) \
+ isl_buffer_fill_state_s((dev), (state), \
+ &(struct isl_buffer_fill_state_info) { __VA_ARGS__ });
+
+void
+isl_buffer_fill_state_s(const struct isl_device *dev, void *state,
+ const struct isl_buffer_fill_state_info *restrict info);
+
/**
* Alignment of the upper-left sample of each subimage, in units of surface
* elements.