Skip to content

Commit

Permalink
Updated StructuredBuffer::GetDimensions() in GLSL.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewRichards-Code committed Jan 9, 2025
1 parent e3510fe commit 6028b89
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Applications/Sfx/Sfx.ypp
Original file line number Diff line number Diff line change
Expand Up @@ -3969,7 +3969,12 @@ string GetSizeFunction(string textureName, string x, string y, string z)
if (config->getSizeExpression.size() > 0)
{
ShaderResourceType type = GetShaderResourceType(buildFunction, textureName);
if (IsTexture(type))
//STRUCTURED_BUFFER and RW_STRUCTURED_BUFFER GetDeminsion for GLSL - AJR. TODO: Find a better solution to this!
if (IsStructuredBuffer(type) || IsRWStructuredBuffer(type))
{
full_expr << x << "=" << textureName << ".length()";
}
else
{
bool isImage = IsRW(type);
bool isMsaa = IsMSAATexture(type);
Expand Down Expand Up @@ -4044,10 +4049,6 @@ string GetSizeFunction(string textureName, string x, string y, string z)
}
}
}
else //STRUCTURED_BUFFER and RW_STRUCTURED_BUFFER GetDeminsion for GLSL - AJR. TODO: Find a better solution to this!
{
full_expr << x << "=" << textureName << ".length()";
}
}
else
{
Expand Down

0 comments on commit 6028b89

Please sign in to comment.