summaryrefslogtreecommitdiffstats
path: root/src/vulkan/gen8_state.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-01-27 12:55:36 -0800
committerJason Ekstrand <[email protected]>2016-01-27 15:12:42 -0800
commitf7d6b8ccfe3f04382d34bcd49cdbdfec88709719 (patch)
tree131ce32af0a6a080ede91a9af773703f61343cf8 /src/vulkan/gen8_state.c
parent162c66258511a40f86187d271cb842b82dd39912 (diff)
gen8/state: Fix QPitch for compressed textures on Broadwell
Diffstat (limited to 'src/vulkan/gen8_state.c')
-rw-r--r--src/vulkan/gen8_state.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/vulkan/gen8_state.c b/src/vulkan/gen8_state.c
index 3fd3187fbe7..2da9c62e153 100644
--- a/src/vulkan/gen8_state.c
+++ b/src/vulkan/gen8_state.c
@@ -147,7 +147,20 @@ get_qpitch(const struct isl_surf *surf)
#endif
case ISL_SURF_DIM_2D:
case ISL_SURF_DIM_3D:
- return isl_surf_get_array_pitch_el_rows(surf);
+ #if ANV_GEN >= 9
+ return isl_surf_get_array_pitch_el_rows(surf);
+ #else
+ /* From the Broadwell PRM for RENDER_SURFACE_STATE.QPitch
+ *
+ * "This field must be set to an integer multiple of the Surface
+ * Vertical Alignment. For compressed textures (BC*, FXT1,
+ * ETC*, and EAC* Surface Formats), this field is in units of
+ * rows in the uncompressed surface, and must be set to an
+ * integer multiple of the vertical alignment parameter "j"
+ * defined in the Common Surface Formats section."
+ */
+ return isl_surf_get_array_pitch_sa_rows(surf);
+ #endif
}
}