forked from blender/blender
me-main #1
@ -155,8 +155,13 @@ static void gpu_viewport_textures_create(GPUViewport *viewport)
|
||||
|
||||
/* Can be shared with GPUOffscreen. */
|
||||
if (viewport->depth_tx == NULL) {
|
||||
viewport->depth_tx = GPU_texture_create_2d_ex(
|
||||
"dtxl_depth", UNPACK2(size), 1, GPU_DEPTH24_STENCIL8, usage, NULL);
|
||||
/* Depth texture can be read back by gizmos #view3d_depths_create .*/
|
||||
viewport->depth_tx = GPU_texture_create_2d_ex("dtxl_depth",
|
||||
UNPACK2(size),
|
||||
1,
|
||||
GPU_DEPTH24_STENCIL8,
|
||||
usage | GPU_TEXTURE_USAGE_HOST_READ,
|
||||
NULL);
|
||||
if (GPU_clear_viewport_workaround()) {
|
||||
static int depth_clear = 0;
|
||||
GPU_texture_clear(viewport->depth_tx, GPU_DATA_UINT_24_8, &depth_clear);
|
||||
|
Loading…
Reference in New Issue
Block a user