-
- if (res->target == PIPE_TEXTURE_1D ||
- res->target == PIPE_TEXTURE_2D) {
- /* 1D, 2D, and 2D_MSAA can set a custom pitch for shader resources
- * starting with gfx10.3 (ignored if pitch <= width). Other texture
- * targets can't. CB and DB can't set a custom pitch for any target.
- */
- if (screen->info.chip_class >= GFX10_3)
- state[4] = S_00A010_DEPTH(tex->surface.u.gfx9.surf_pitch - 1);
- else
- state[4] = 0;
- } else {
- /* Depth is the last accessible layer on gfx9+. The hw doesn't need
- * to know the total number of layers.
- */
- state[4] = S_00A010_DEPTH((type == V_008F1C_SQ_RSRC_IMG_3D && sampler) ?
- depth - 1 : last_layer) |
- S_00A010_BASE_ARRAY(first_layer);
- }
-
+ /* Depth is the the last accessible layer on gfx9+. The hw doesn't need
+ * to know the total number of layers.
+ */
+ state[4] =
+ S_00A010_DEPTH((type == V_008F1C_SQ_RSRC_IMG_3D && sampler) ? depth - 1 : last_layer) |
+ S_00A010_BASE_ARRAY(first_layer);