Fix: Workbench: Missing texture flag
Drawing volumes would trigger an assertion after fe39456ba5
.
This commit is contained in:
parent
2fdb38f972
commit
c6194afc41
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue