Align RenderGraph imported texture ownership
This commit is contained in:
@@ -143,6 +143,7 @@ native RenderGraph 当前支持:
|
||||
- 执行阶段通过 `RenderGraphExecutionContext` 解析 view 和 texture desc。
|
||||
- Graph-managed surface 必须关闭 `RenderSurface::autoTransition`,让 graph 统一负责 transition。
|
||||
- imported surface 的 transition ownership 只能通过 `RenderGraphImportedTextureOptions` 表达,不要在 pass 内外重复 barrier。
|
||||
- imported texture 的资源身份是 `RHITexture*`,不是某个 primary view。需要 graph 管理 transition 时,必须通过 `RenderGraphImportedTextureDesc.texture` 显式给出资源;`primaryView` 只能作为默认访问 view。surface import registry 应优先按 texture 合并,只有拿不到 texture 的非 graph-owned legacy/view-only import 才能退回按 view 区分。
|
||||
- fullscreen chain 中间输出优先使用 transient texture,不要把后处理链硬绑到 backbuffer。
|
||||
|
||||
## 6. Builtin Forward
|
||||
|
||||
@@ -83,6 +83,10 @@ public:
|
||||
|
||||
void Reset();
|
||||
|
||||
RenderGraphTextureHandle ImportTexture(
|
||||
const Containers::String& name,
|
||||
const RenderGraphImportedTextureDesc& importedDesc);
|
||||
|
||||
RenderGraphTextureHandle ImportTexture(
|
||||
const Containers::String& name,
|
||||
const RenderGraphTextureDesc& desc,
|
||||
|
||||
@@ -92,6 +92,13 @@ struct RenderGraphImportedTextureOptions {
|
||||
bool graphOwnsTransitions = false;
|
||||
};
|
||||
|
||||
struct RenderGraphImportedTextureDesc {
|
||||
RenderGraphTextureDesc textureDesc = {};
|
||||
RHI::RHITexture* texture = nullptr;
|
||||
RHI::RHIResourceView* primaryView = nullptr;
|
||||
RenderGraphImportedTextureOptions options = {};
|
||||
};
|
||||
|
||||
struct RenderGraphTextureTransitionPlan {
|
||||
bool graphOwnsTransitions = false;
|
||||
bool hasFirstAccessState = false;
|
||||
|
||||
Reference in New Issue
Block a user