Move fullscreen graph ownership out of pass transitions
This commit is contained in:
@@ -84,6 +84,24 @@ RenderGraphTextureHandle RenderGraphBuilder::CreateTransientTexture(
|
||||
return handle;
|
||||
}
|
||||
|
||||
void RenderGraphBuilder::MergeImportedTextureOptions(
|
||||
RenderGraphTextureHandle handle,
|
||||
const RenderGraphImportedTextureOptions& importedOptions) {
|
||||
if (!handle.IsValid() || handle.index >= m_graph.m_textures.size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
RenderGraph::TextureResource& resource = m_graph.m_textures[handle.index];
|
||||
if (resource.kind != RenderGraphTextureKind::Imported) {
|
||||
return;
|
||||
}
|
||||
|
||||
resource.importedOptions.graphOwnsTransitions =
|
||||
resource.importedOptions.graphOwnsTransitions ||
|
||||
importedOptions.graphOwnsTransitions;
|
||||
resource.importedOptions.finalState = importedOptions.finalState;
|
||||
}
|
||||
|
||||
RenderGraphPassHandle RenderGraphBuilder::AddRasterPass(
|
||||
const Containers::String& name,
|
||||
const std::function<void(RenderGraphPassBuilder&)>& setup) {
|
||||
|
||||
@@ -116,6 +116,10 @@ public:
|
||||
m_graph.m_textures[handle.index].kind == RenderGraphTextureKind::Transient;
|
||||
}
|
||||
|
||||
bool OwnsTextureTransitions(RenderGraphTextureHandle handle) const {
|
||||
return ShouldGraphManageTransitions(handle);
|
||||
}
|
||||
|
||||
bool TransitionGraphOwnedImportsToFinalStates(
|
||||
const RenderContext& renderContext,
|
||||
Containers::String* outErrorMessage) {
|
||||
@@ -317,6 +321,11 @@ bool RenderGraphExecutionContext::IsTransientTexture(RenderGraphTextureHandle ha
|
||||
runtimeResources->IsTransientTexture(handle);
|
||||
}
|
||||
|
||||
bool RenderGraphExecutionContext::OwnsTextureTransitions(RenderGraphTextureHandle handle) const {
|
||||
return runtimeResources != nullptr &&
|
||||
runtimeResources->OwnsTextureTransitions(handle);
|
||||
}
|
||||
|
||||
bool RenderGraphExecutor::Execute(
|
||||
const CompiledRenderGraph& graph,
|
||||
const RenderContext& renderContext,
|
||||
|
||||
Reference in New Issue
Block a user