Add render graph depth access semantics
This commit is contained in:
@@ -38,6 +38,7 @@ private:
|
||||
struct TextureAccess {
|
||||
RenderGraphTextureHandle texture = {};
|
||||
RenderGraphAccessMode mode = RenderGraphAccessMode::Read;
|
||||
RenderGraphTextureAspect aspect = RenderGraphTextureAspect::Color;
|
||||
};
|
||||
|
||||
struct PassNode {
|
||||
@@ -60,6 +61,8 @@ class RenderGraphPassBuilder {
|
||||
public:
|
||||
void ReadTexture(RenderGraphTextureHandle texture);
|
||||
void WriteTexture(RenderGraphTextureHandle texture);
|
||||
void ReadDepthTexture(RenderGraphTextureHandle texture);
|
||||
void WriteDepthTexture(RenderGraphTextureHandle texture);
|
||||
void SetExecuteCallback(RenderGraphExecuteCallback callback);
|
||||
|
||||
private:
|
||||
|
||||
@@ -31,6 +31,7 @@ private:
|
||||
struct CompiledTextureAccess {
|
||||
RenderGraphTextureHandle texture = {};
|
||||
RenderGraphAccessMode mode = RenderGraphAccessMode::Read;
|
||||
RenderGraphTextureAspect aspect = RenderGraphTextureAspect::Color;
|
||||
RHI::ResourceStates requiredState = RHI::ResourceStates::Common;
|
||||
};
|
||||
|
||||
|
||||
@@ -35,6 +35,11 @@ enum class RenderGraphAccessMode : Core::uint8 {
|
||||
Write = 1
|
||||
};
|
||||
|
||||
enum class RenderGraphTextureAspect : Core::uint8 {
|
||||
Color = 0,
|
||||
Depth = 1
|
||||
};
|
||||
|
||||
enum class RenderGraphTextureViewType : Core::uint8 {
|
||||
RenderTarget = 0,
|
||||
ShaderResource = 1
|
||||
|
||||
Reference in New Issue
Block a user