Commit f56c4506 by Ben Clayton

GLES: Add tests to exersise sparse labels.

Reproduces the issues reported by b/125183107. Bug: b/125183107 Change-Id: If0f2ab3fcc8c065409fdbbc6df670f78a78fa3f7 Reviewed-on: https://swiftshader-review.googlesource.com/c/25169Tested-by: 's avatarBen Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent c1fd4087
......@@ -1578,6 +1578,22 @@ TEST_F(SwiftShaderTest, CompilerLimits_DeepNestedCallsInUnusedFunction)
);
}
// Test that the compiler correctly handles functions being stripped.
// The frontend will strip the Dead functions, but may keep the their function
// labels reserved. This produces labels that are greater than the number of
// live functions.
TEST_F(SwiftShaderTest, CompilerLimits_SparseLabels)
{
checkCompiles(
"void Dead1() {}\n"
"void Dead2() {}\n"
"void Dead3() {}\n"
"void Dead4() {}\n"
"void Dead5() { Dead1(); Dead2(); Dead3(); Dead4(); }\n"
"float F(float f) { for(int i = 0; i < -1; ++i) { Dead5(); } return f; }\n"
);
}
#ifndef EGL_ANGLE_iosurface_client_buffer
#define EGL_ANGLE_iosurface_client_buffer 1
#define EGL_IOSURFACE_ANGLE 0x3454
......
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