Generate baked per-pipeline static descriptor access on Vulkan

This commit is contained in:
baldurk
2024-04-10 15:57:48 +01:00
parent 58c3dc52a7
commit 50091dcffc
8 changed files with 178 additions and 2 deletions
+6 -1
View File
@@ -1242,7 +1242,8 @@ struct ShaderResource
bool operator==(const ShaderResource &o) const
{
return resType == o.resType && name == o.name && variableType == o.variableType &&
bindPoint == o.bindPoint && isTexture == o.isTexture && isReadOnly == o.isReadOnly;
bindPoint == o.bindPoint && isTexture == o.isTexture && hasSampler == o.hasSampler &&
isReadOnly == o.isReadOnly;
}
bool operator<(const ShaderResource &o) const
{
@@ -1256,6 +1257,8 @@ struct ShaderResource
return bindPoint < o.bindPoint;
if(!(isTexture == o.isTexture))
return isTexture < o.isTexture;
if(!(hasSampler == o.hasSampler))
return hasSampler < o.hasSampler;
if(!(isReadOnly == o.isReadOnly))
return isReadOnly < o.isReadOnly;
return false;
@@ -1280,6 +1283,8 @@ struct ShaderResource
DOCUMENT("``True`` if this resource is a texture, otherwise it is a buffer.");
bool isTexture;
DOCUMENT("``True`` if this texture resource has a sampler as well.");
bool hasSampler = false;
DOCUMENT(R"(``True`` if this resource is available to the shader for reading only, otherwise it is
able to be read from and written to arbitrarily.
)");