mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
gfx: swapchain refactor (#3751)
* gfx: swapchain * acquire/release/surface on swapchain * fix swapchain texture creation * acquire/present back on device * formats are swapchain-specific * swapchain: vk works * enable device agent * format fix * update gfxdef * fix enum decl * pipeline adapt * minor * vk: compress attr locations directly in SPIR-V * gles3 adjust * InputAssembler owns an DrawInfo * gles2 adapt * texture keep track of its hash * device cached states * format * glslang finalize * buffer view adapt * fg: subpass support * minor * 3.4 adapt * profiler adapt * buffer update frequency detection * minor * base commit * swapchain works on metal * spirv * mtltexture issue * remote test code * depthtexture * revert ifdef USE_METAL * ios swapchain header * fix some triple buffer issues * resize accept surface transform Co-authored-by: Zeqiang Li <Zeqiang-li@outlook.com>
This commit is contained in:
@@ -25,9 +25,9 @@
|
||||
|
||||
#include "DevicePassResourceTable.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include "FrameGraph.h"
|
||||
#include "PassNode.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace cc {
|
||||
namespace framegraph {
|
||||
@@ -38,15 +38,14 @@ gfx::GFXObject *DevicePassResourceTable::get(const ResourceDictionary &from, Han
|
||||
}
|
||||
|
||||
void DevicePassResourceTable::extract(const FrameGraph & graph,
|
||||
const PassNode *const passNode,
|
||||
bool multiSubPass,
|
||||
const PassNode * passNode,
|
||||
std::vector<const gfx::Texture *> const &renderTargets) noexcept {
|
||||
extract(graph, passNode->_reads, _reads, multiSubPass, renderTargets);
|
||||
extract(graph, passNode->_writes, _writes, true, renderTargets);
|
||||
do {
|
||||
extract(graph, passNode->_reads, _reads, false, renderTargets);
|
||||
extract(graph, passNode->_writes, _writes, true, renderTargets);
|
||||
|
||||
if (passNode->_next) {
|
||||
extract(graph, passNode->_next, multiSubPass, renderTargets);
|
||||
}
|
||||
passNode = passNode->_next;
|
||||
} while (passNode);
|
||||
}
|
||||
|
||||
void DevicePassResourceTable::extract(const FrameGraph & graph,
|
||||
@@ -81,9 +80,7 @@ void DevicePassResourceTable::extract(const FrameGraph & g
|
||||
}
|
||||
}
|
||||
|
||||
if (deviceResource) {
|
||||
to.emplace(handle, deviceResource);
|
||||
}
|
||||
to[handle] = deviceResource;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user