Merge branch 'blender-v4.0-release'

This commit is contained in:
Miguel Pozo 2023-10-06 17:49:15 +02:00
commit 026b81ce7c
1 changed files with 3 additions and 1 deletions

View File

@ -162,11 +162,13 @@ static void gpu_viewport_textures_create(GPUViewport *viewport)
/* Can be shared with GPUOffscreen. */ /* Can be shared with GPUOffscreen. */
if (viewport->depth_tx == nullptr) { if (viewport->depth_tx == nullptr) {
/* Depth texture can be read back by gizmos #view3d_depths_create. */ /* 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", viewport->depth_tx = GPU_texture_create_2d("dtxl_depth",
UNPACK2(size), UNPACK2(size),
1, 1,
GPU_DEPTH24_STENCIL8, GPU_DEPTH24_STENCIL8,
usage | GPU_TEXTURE_USAGE_HOST_READ, usage | GPU_TEXTURE_USAGE_HOST_READ |
GPU_TEXTURE_USAGE_MIP_SWIZZLE_VIEW,
nullptr); nullptr);
if (GPU_clear_viewport_workaround()) { if (GPU_clear_viewport_workaround()) {
static int depth_clear = 0; static int depth_clear = 0;