0
0
Fork 0

me-main #1

Merged
Nate Rupsis merged 123 commits from me-main into main 2023-02-13 18:39:11 +01:00
1 changed files with 7 additions and 2 deletions
Showing only changes of commit 8b35db914e - Show all commits

View File

@ -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);