diff --git a/source/blender/gpu/intern/gpu_viewport.cc b/source/blender/gpu/intern/gpu_viewport.cc index 10688285ea7..6c53892583b 100644 --- a/source/blender/gpu/intern/gpu_viewport.cc +++ b/source/blender/gpu/intern/gpu_viewport.cc @@ -162,11 +162,13 @@ static void gpu_viewport_textures_create(GPUViewport *viewport) /* Can be shared with GPUOffscreen. */ if (viewport->depth_tx == nullptr) { /* Depth texture can be read back by gizmos #view3d_depths_create. */ + /* Swizle flag is needed by Workbench Volumes to read the stencil view. */ viewport->depth_tx = GPU_texture_create_2d("dtxl_depth", UNPACK2(size), 1, GPU_DEPTH24_STENCIL8, - usage | GPU_TEXTURE_USAGE_HOST_READ, + usage | GPU_TEXTURE_USAGE_HOST_READ | + GPU_TEXTURE_USAGE_MIP_SWIZZLE_VIEW, nullptr); if (GPU_clear_viewport_workaround()) { static int depth_clear = 0;