Fix render target unload for d3d12
This commit is contained in:
+5
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,10 @@ class MaterialSlot {
|
||||
}
|
||||
|
||||
public function unload() {
|
||||
image.unload();
|
||||
imageIcon.unload();
|
||||
function _next() {
|
||||
image.unload();
|
||||
imageIcon.unload();
|
||||
}
|
||||
App.notifyOnNextFrame(_next);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user