mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
[V3.6.0 gfx] auto barrier added (#12118)
auto barrier added. Co-authored-by: Zeqiang Li <zeqiang-li@outlook.com>
This commit is contained in:
@@ -51,8 +51,8 @@ void DevicePassResourceTable::extract(const FrameGraph &graph,
|
||||
void DevicePassResourceTable::extract(const FrameGraph &graph,
|
||||
ccstd::vector<Handle> const &from,
|
||||
ResourceDictionary &to,
|
||||
bool ignoreRenderTarget,
|
||||
ccstd::vector<const gfx::Texture *> const &renderTargets) noexcept {
|
||||
bool /*ignoreRenderTarget*/,
|
||||
ccstd::vector<const gfx::Texture *> const &/*renderTargets*/) noexcept {
|
||||
std::for_each(from.cbegin(), from.cend(), [&](const Handle handle) {
|
||||
if (to.find(handle) != to.cend()) {
|
||||
return;
|
||||
@@ -66,19 +66,19 @@ void DevicePassResourceTable::extract(const FrameGraph &graph,
|
||||
return;
|
||||
}
|
||||
|
||||
if (ignoreRenderTarget) {
|
||||
bool const isRenderTarget =
|
||||
std::find_if(
|
||||
renderTargets.cbegin(),
|
||||
renderTargets.cend(),
|
||||
[&deviceResource](const gfx::Texture *const x) {
|
||||
return deviceResource == x;
|
||||
}) != renderTargets.cend();
|
||||
//if (ignoreRenderTarget) {
|
||||
// bool const isRenderTarget =
|
||||
// std::find_if(
|
||||
// renderTargets.cbegin(),
|
||||
// renderTargets.cend(),
|
||||
// [&deviceResource](const gfx::Texture *const x) {
|
||||
// return deviceResource == x;
|
||||
// }) != renderTargets.cend();
|
||||
|
||||
if (isRenderTarget) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// if (isRenderTarget) {
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
|
||||
to[handle] = deviceResource;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user