Commit bc63cf9c by Chris Forbes

Fix Context::colorWriteActive to consider all rendertargets

Even in the GLES backend, we support RENDERTARGETS=8. This check only ever considered the first 4. Bug: b/126719156 Change-Id: I0084aa005f342f06373c53c007bee33268466b92 Reviewed-on: https://swiftshader-review.googlesource.com/c/25808Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 201f136c
......@@ -730,9 +730,17 @@ namespace sw
}
}
int Context::colorWriteActive()
bool Context::colorWriteActive()
{
return colorWriteActive(0) | colorWriteActive(1) | colorWriteActive(2) | colorWriteActive(3);
for (int i = 0; i < RENDERTARGETS; i++)
{
if (colorWriteActive(i))
{
return true;
}
}
return false;
}
int Context::colorWriteActive(int index)
......
......@@ -189,7 +189,7 @@ namespace sw
float slopeDepthBias;
VkFormat renderTargetInternalFormat(int index);
int colorWriteActive();
bool colorWriteActive();
int colorWriteActive(int index);
bool colorUsed();
......
......@@ -1468,9 +1468,17 @@ namespace sw
}
}
int Context::colorWriteActive()
bool Context::colorWriteActive()
{
return colorWriteActive(0) | colorWriteActive(1) | colorWriteActive(2) | colorWriteActive(3);
for (int i = 0; i < RENDERTARGETS; i++)
{
if (colorWriteActive(i))
{
return true;
}
}
return false;
}
int Context::colorWriteActive(int index)
......
......@@ -442,7 +442,7 @@ namespace sw
Sampler sampler[TOTAL_IMAGE_UNITS];
Format renderTargetInternalFormat(int index);
int colorWriteActive();
bool colorWriteActive();
int colorWriteActive(int index);
bool colorUsed();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment