isl: Fix RenderTargetViewExtent for mipmapped 3D surfaces
authorNanley Chery <nanley.g.chery@intel.com>
Thu, 3 Mar 2016 23:49:13 +0000 (15:49 -0800)
committerNanley Chery <nanley.g.chery@intel.com>
Fri, 4 Mar 2016 21:20:44 +0000 (13:20 -0800)
Match the comment stated above the assignment.

Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/intel/isl/isl_surface_state.c

index fe8f07cfe30195f5feb403e4de5d2ff8bda5342d..f3390a6c553c2361c9b5d09dfeed0076187a461c 100644 (file)
@@ -346,7 +346,8 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
        *    indicates the extent of the accessible 'R' coordinates minus 1 on
        *    the LOD currently being rendered to.
        */
-      s.RenderTargetViewExtent = info->surf->logical_level0_px.depth - 1;
+      s.RenderTargetViewExtent = isl_minify(info->surf->logical_level0_px.depth,
+                                            info->view->base_level) - 1;
       break;
    default:
       unreachable(!"bad SurfaceType");