me-main #1

Merged
Nate Rupsis merged 123 commits from me-main into main 2023-02-13 18:39:11 +01:00
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. */ /* Can be shared with GPUOffscreen. */
if (viewport->depth_tx == NULL) { if (viewport->depth_tx == NULL) {
viewport->depth_tx = GPU_texture_create_2d_ex( /* Depth texture can be read back by gizmos #view3d_depths_create .*/
"dtxl_depth", UNPACK2(size), 1, GPU_DEPTH24_STENCIL8, usage, NULL); 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()) { if (GPU_clear_viewport_workaround()) {
static int depth_clear = 0; static int depth_clear = 0;
GPU_texture_clear(viewport->depth_tx, GPU_DATA_UINT_24_8, &depth_clear); GPU_texture_clear(viewport->depth_tx, GPU_DATA_UINT_24_8, &depth_clear);