summaryrefslogtreecommitdiffstats
path: root/src/intel/isl/isl_surface_state.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-06-07 17:14:39 -0700
committerJason Ekstrand <[email protected]>2016-06-22 12:26:43 -0700
commite66e70ef47907264757751206878b703bd95390b (patch)
tree58f48bba86e0433bf87d9c826d8c4aee3c54d553 /src/intel/isl/isl_surface_state.c
parent39baea551fe228cfc4647d6a56e80639b7129b6a (diff)
isl/state: Put surface format setup at the top
This is purely cosmetic, but it makes things look a bit more readable. Reviewed-by: Chad Versace <[email protected]> Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/intel/isl/isl_surface_state.c')
-rw-r--r--src/intel/isl/isl_surface_state.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index c36ef3bbd5a..0f21e34b17a 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: