Skip to content

Commit d187a2e

Browse files
committed
Add an isBuffer method to RenderPassReflection::Field
1 parent 88f10a5 commit d187a2e

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Source/Falcor/RenderGraph/RenderPassReflection.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ namespace Falcor
102102
Type getType() const { return mType; }
103103
Visibility getVisibility() const { return mVisibility; }
104104

105+
bool isBuffer() const { return mType == Type::RawBuffer; }
106+
105107
/** Overwrite previously unknown/unspecified fields with specified ones.
106108
If a property is specified both in the current object, as well as the other field, an error will be logged and the current field will be undefined
107109
*/

Source/Falcor/RenderGraph/ResourceCache.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ namespace Falcor
127127

128128
ResourceFormat format = ResourceFormat::Unknown;
129129

130-
if (field.getType() != RenderPassReflection::Field::Type::RawBuffer)
130+
if (!field.isBuffer())
131131
{
132132
format = field.getFormat() == ResourceFormat::Unknown ? params.format : field.getFormat();
133133
if (resolveBindFlags)
@@ -141,7 +141,7 @@ namespace Falcor
141141
bindFlags |= mask;
142142
}
143143
}
144-
else // RawBuffer
144+
else // *Buffer
145145
{
146146
if (resolveBindFlags) bindFlags = Resource::BindFlags::UnorderedAccess | Resource::BindFlags::ShaderResource;
147147
}

0 commit comments

Comments
 (0)