GPUMaterial: Make compilation fail when reusing failed GPUPass

This avoid leaving a `GPUMaterial` in a `GPU_MAT_QUEUED` state which would
block rendering.

Fix T98603: Hang when saving project in material preview mode

Maniphest Tasks: T98603

Differential Revision: https://developer.blender.org/D15135
This commit is contained in:
2022-06-06 16:57:50 +02:00
parent 128aa7f3b0
commit 58d350b489

View File

@@ -750,6 +750,9 @@ void GPU_material_compile(GPUMaterial *mat)
mat->status = GPU_MAT_SUCCESS;
gpu_node_graph_free_nodes(&mat->graph);
}
else {
mat->status = GPU_MAT_FAILED;
}
}
else {
mat->status = GPU_MAT_FAILED;