Fix render target unload for d3d12

This commit is contained in:
luboslenco
2021-02-02 20:30:52 +01:00
parent d97cf8ebc0
commit a841a849f2
3 changed files with 21 additions and 8 deletions
+5 -1
View File
@@ -319,7 +319,11 @@ class App {
}
if (UINodes.inst.grid != null) {
UINodes.inst.grid.unload();
var _grid = UINodes.inst.grid;
function _next() {
_grid.unload();
}
App.notifyOnNextFrame(_next);
UINodes.inst.grid = null;
}
+5 -2
View File
@@ -52,7 +52,10 @@ class MaterialSlot {
}
public function unload() {
image.unload();
imageIcon.unload();
function _next() {
image.unload();
imageIcon.unload();
}
App.notifyOnNextFrame(_next);
}
}
+11 -5
View File
@@ -230,19 +230,25 @@ class MakeMaterial {
static function bakeNodePreviews() {
if (Context.nodePreviewsBlur != null) {
for (image in Context.nodePreviewsBlur) {
image.unload();
App.notifyOnNextFrame(function() {
image.unload();
});
}
Context.nodePreviewsBlur = null;
}
if (Context.nodePreviewsWarp != null) {
for (img in Context.nodePreviewsWarp) {
img.unload();
for (image in Context.nodePreviewsWarp) {
App.notifyOnNextFrame(function() {
image.unload();
});
}
Context.nodePreviewsWarp = null;
}
if (Context.nodePreviewsBake != null) {
for (img in Context.nodePreviewsBake) {
img.unload();
for (image in Context.nodePreviewsBake) {
App.notifyOnNextFrame(function() {
image.unload();
});
}
Context.nodePreviewsBake = null;
}