summaryrefslogtreecommitdiffstats
path: root/src/intel/isl/isl.c
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.c
parent9d5b8f7709d7cce1493cc0b38c750ad1173f7327 (diff)
isl: Add a helper for filling a buffer surface state
Diffstat (limited to 'src/intel/isl/isl.c')
-rw-r--r--src/intel/isl/isl.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c
index f7f276f16df..f7b4c701841 100644
--- a/src/intel/isl/isl.c
+++ b/src/intel/isl/isl.c
@@ -1203,6 +1203,29 @@ isl_surf_fill_state_s(const struct isl_device *dev, void *state,
}
}
+void
+isl_buffer_fill_state_s(const struct isl_device *dev, void *state,
+ const struct isl_buffer_fill_state_info *restrict info)
+{
+ switch (ISL_DEV_GEN(dev)) {
+ case 7:
+ if (ISL_DEV_IS_HASWELL(dev)) {
+ isl_gen75_buffer_fill_state_s(state, info);
+ } else {
+ isl_gen7_buffer_fill_state_s(state, info);
+ }
+ break;
+ case 8:
+ isl_gen8_buffer_fill_state_s(state, info);
+ break;
+ case 9:
+ isl_gen9_buffer_fill_state_s(state, info);
+ break;
+ default:
+ assert(!"Cannot fill surface state for this gen");
+ }
+}
+
/**
* A variant of isl_surf_get_image_offset_sa() specific to
* ISL_DIM_LAYOUT_GEN4_2D.