[Mesa-dev] [PATCH 12/64] isl/state: Put surface format setup at the top
Jason Ekstrand
jason at jlekstrand.net
Sat Jun 11 16:02:27 UTC 2016
---
src/intel/isl/isl_surface_state.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index c36ef3b..0f21e34 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -206,6 +206,13 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
s.SurfaceType = get_surftype(info->surf->dim, info->view->usage);
+ if (info->view->usage & ISL_SURF_USAGE_STORAGE_BIT) {
+ s.SurfaceFormat =
+ isl_lower_storage_image_format(dev->info, info->view->format);
+ } else {
+ s.SurfaceFormat = info->view->format;
+ }
+
s.SurfaceArray = info->surf->phys_level0_sa.array_len > 1;
s.SurfaceVerticalAlignment = valign;
s.SurfaceHorizontalAlignment = halign;
@@ -291,13 +298,6 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
s.SurfacePitch = info->surf->row_pitch - 1;
}
- if (info->view->usage & ISL_SURF_USAGE_STORAGE_BIT) {
- s.SurfaceFormat =
- isl_lower_storage_image_format(dev->info, info->view->format);
- } else {
- s.SurfaceFormat = info->view->format;
- }
-
switch (s.SurfaceType) {
case SURFTYPE_1D:
case SURFTYPE_2D:
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list