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/25808
Tested-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
}
}
- 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)
float slopeDepthBias;
VkFormat renderTargetInternalFormat(int index);
- int colorWriteActive();
+ bool colorWriteActive();
int colorWriteActive(int index);
bool colorUsed();
}
}
- 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)
Sampler sampler[TOTAL_IMAGE_UNITS];
Format renderTargetInternalFormat(int index);
- int colorWriteActive();
+ bool colorWriteActive();
int colorWriteActive(int index);
bool colorUsed();