Capture/Replay: Init shader outputs during self-tests.

This forces all uninitialized variables to have default values.
For instance if the application doesn't initialize the output
color, or a varying that's use in the output, this will ensure we
don't use any undefined values in the computation.

Found when working on a re-trace of T-Rex, which doesn't write to
the alpha channel in the final rendering pass. Also fixes undefined
values in GLSLTest.InactiveVaryingInVertexActiveInFragment.

Bug: angleproject:5133
Change-Id: Ia291338e5adf23dab5263cb2ebe737dc05852d3e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3110225
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
This commit is contained in:
Jamie Madill
2021-08-18 16:58:44 -04:00
committed by Angle LUCI CQ
parent b196eec017
commit 2f45d93d5b
6 changed files with 34 additions and 10 deletions

View File

@@ -300,6 +300,11 @@ bool EGLWindow::initializeDisplay(OSWindow *osWindow,
enabledFeatureOverrides.push_back("forceRobustResourceInit");
}
if (params.forceInitShaderOutputVariables == EGL_TRUE)
{
enabledFeatureOverrides.push_back("forceInitShaderOutputVariables");
}
const bool hasFeatureControlANGLE =
strstr(extensionString, "EGL_ANGLE_feature_control") != nullptr;