1
1

GPU: Fix Crash Sampling in Texture Paint Mode.

Added additional check if occlude pass is created.

Fix: #106762

Pull Request: blender/blender#106791
This commit is contained in:
2023-04-11 11:24:17 +02:00
parent 28a11c007e
commit 2884f92de1

View File

@@ -214,7 +214,9 @@ static void select_cache_populate(void *vedata, Object *ob)
SELECTID_StorageList *stl = ((SELECTID_Data *)vedata)->stl;
const DRWContextState *draw_ctx = DRW_context_state_get();
if (!DRW_object_is_in_edit_mode(ob)) {
const bool retopology_occlusion = RETOPOLOGY_ENABLED(draw_ctx->v3d) &&
!XRAY_ENABLED(draw_ctx->v3d);
if (retopology_occlusion && !DRW_object_is_in_edit_mode(ob)) {
if (ob->dt >= OB_SOLID) {
struct GPUBatch *geom_faces = DRW_mesh_batch_cache_get_surface(ob->data);
DRW_shgroup_call_obmat(stl->g_data->shgrp_occlude, geom_faces, ob->object_to_world);