Commit c51c59c7 by Shahbaz Youssefi Committed by Angle LUCI CQ

Test for missing index dirty bit bug

Bug fixed in https://chromium-review.googlesource.com/c/angle/angle/+/2961690 triggers only in the following situation: - Context 1: draw indexed -> clears index dirty bit - Context 1: change state in such a way that closing the render pass is deferred to dirty bit handling (for example, change FBO) - Context 1: issue a non-indexed draw call. This closes the render pass and starts a new one -> bug was that the index dirty bit was not set - Context 2: flush the command buffer, which submits the previous render pass of context 1 (which contained vkCmdBindIndexBuffer). The primary command buffer is now reset. - Context 1: issue an indexed draw call. Since the index dirty bit was not set, this was missing the vkCmdBindIndexBuffer call. This change implements a regression test based on the above scenario. Bug: chromium:1183068 Bug: chromium:1190493 Change-Id: I729bd48cd6df2621ca763f6231023a52ac08b0fb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2963836Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarCharlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent ce22ad10
...@@ -4,11 +4,20 @@ ...@@ -4,11 +4,20 @@
// See deqp_support/README.md for format. // See deqp_support/README.md for format.
// Generic
// Fails in the flush thread when calling eglMakeCurrent.
6063 OPENGL : SimpleStateChangeTestES31.DrawThenChangeFBOThenDrawThenFlushInAnotherThreadThenDrawIndexed/* = SKIP
6063 GLES : SimpleStateChangeTestES31.DrawThenChangeFBOThenDrawThenFlushInAnotherThreadThenDrawIndexed/* = SKIP
// Windows // Windows
3786 WIN NVIDIA D3D11 : BufferDataOverflowTest.VertexBufferIntegerOverflow/ES3_D3D11 = SKIP 3786 WIN NVIDIA D3D11 : BufferDataOverflowTest.VertexBufferIntegerOverflow/ES3_D3D11 = SKIP
4092 WIN VULKAN : BufferDataOverflowTest.VertexBufferIntegerOverflow/ES3_Vulkan* = SKIP 4092 WIN VULKAN : BufferDataOverflowTest.VertexBufferIntegerOverflow/ES3_Vulkan* = SKIP
4092 WIN OPENGL : BufferDataOverflowTest.VertexBufferIntegerOverflow/ES3_OpenGL = SKIP 4092 WIN OPENGL : BufferDataOverflowTest.VertexBufferIntegerOverflow/ES3_OpenGL = SKIP
4092 WIN GLES : BufferDataOverflowTest.VertexBufferIntegerOverflow/ES3_OpenGLES = SKIP 4092 WIN GLES : BufferDataOverflowTest.VertexBufferIntegerOverflow/ES3_OpenGLES = SKIP
6064 WIN D3D11 : SimpleStateChangeTestES31.DrawThenChangeFBOThenDrawThenFlushInAnotherThreadThenDrawIndexed/* = SKIP
// Linux
6065 LINUX INTEL VULKAN : SimpleStateChangeTestES31.DrawThenUpdateUBOThenDrawThenDrawIndexed/* = SKIP
// Mac // Mac
6025 MAC AMD OPENGL : IndexBufferOffsetTestES3.UseAsUBOThenUpdateThenUInt8Index/ES3_OpenGL = SKIP 6025 MAC AMD OPENGL : IndexBufferOffsetTestES3.UseAsUBOThenUpdateThenUInt8Index/ES3_OpenGL = SKIP
......
...@@ -42,6 +42,9 @@ int main(int argc, char **argv) ...@@ -42,6 +42,9 @@ int main(int argc, char **argv)
return EXIT_FAILURE; return EXIT_FAILURE;
} }
// end2end test expectations only allow SKIP at the moment.
testSuite.setTestExpectationsAllowMask(angle::GPUTestExpectationsParser::kGpuTestSkip);
if (!testSuite.loadAllTestExpectationsFromFile(std::string(foundDataPath.data()))) if (!testSuite.loadAllTestExpectationsFromFile(std::string(foundDataPath.data())))
{ {
return EXIT_FAILURE; return EXIT_FAILURE;
......
...@@ -107,6 +107,7 @@ enum ErrorType ...@@ -107,6 +107,7 @@ enum ErrorType
kErrorIllegalEntry, kErrorIllegalEntry,
kErrorInvalidEntry, kErrorInvalidEntry,
kErrorEntryWithExpectationConflicts, kErrorEntryWithExpectationConflicts,
kErrorEntryWithDisallowedExpectation,
kErrorEntriesOverlap, kErrorEntriesOverlap,
kNumberOfErrors, kNumberOfErrors,
...@@ -195,6 +196,7 @@ const char *kErrorMessage[kNumberOfErrors] = { ...@@ -195,6 +196,7 @@ const char *kErrorMessage[kNumberOfErrors] = {
"entry with wrong format", "entry with wrong format",
"entry invalid, likely unimplemented modifiers", "entry invalid, likely unimplemented modifiers",
"entry with expectation modifier conflicts", "entry with expectation modifier conflicts",
"entry with unsupported expectation",
"two entries' configs overlap", "two entries' configs overlap",
}; };
...@@ -294,6 +296,10 @@ const char *GetConditionName(uint32_t condition) ...@@ -294,6 +296,10 @@ const char *GetConditionName(uint32_t condition)
} }
GPUTestExpectationsParser::GPUTestExpectationsParser() GPUTestExpectationsParser::GPUTestExpectationsParser()
: mExpectationsAllowMask(
GPUTestExpectationsParser::kGpuTestPass | GPUTestExpectationsParser::kGpuTestFail |
GPUTestExpectationsParser::kGpuTestFlaky | GPUTestExpectationsParser::kGpuTestTimeout |
GPUTestExpectationsParser::kGpuTestSkip)
{ {
// Some initial checks. // Some initial checks.
ASSERT((static_cast<unsigned int>(kNumberOfTokens)) == ASSERT((static_cast<unsigned int>(kNumberOfTokens)) ==
...@@ -582,6 +588,12 @@ bool GPUTestExpectationsParser::parseLine(const GPUTestConfig *config, ...@@ -582,6 +588,12 @@ bool GPUTestExpectationsParser::parseLine(const GPUTestConfig *config,
lineNumber); lineNumber);
return false; return false;
} }
if ((mExpectationsAllowMask & kTokenData[token].expectation) == 0)
{
pushErrorMessage(kErrorMessage[kErrorEntryWithDisallowedExpectation],
lineNumber);
return false;
}
entry.testExpectation = kTokenData[token].expectation; entry.testExpectation = kTokenData[token].expectation;
if (stage == kLineParserEqual) if (stage == kLineParserEqual)
stage++; stage++;
......
...@@ -51,6 +51,7 @@ class GPUTestExpectationsParser ...@@ -51,6 +51,7 @@ class GPUTestExpectationsParser
// Get the test expectation of a given test on a given bot. // Get the test expectation of a given test on a given bot.
int32_t getTestExpectation(const std::string &testName); int32_t getTestExpectation(const std::string &testName);
int32_t getTestExpectationWithConfig(const GPUTestConfig &config, const std::string &testName); int32_t getTestExpectationWithConfig(const GPUTestConfig &config, const std::string &testName);
void setTestExpectationsAllowMask(uint32_t mask) { mExpectationsAllowMask = mask; }
private: private:
struct GPUTestExpectationEntry struct GPUTestExpectationEntry
...@@ -95,6 +96,8 @@ class GPUTestExpectationsParser ...@@ -95,6 +96,8 @@ class GPUTestExpectationsParser
std::vector<GPUTestExpectationEntry> mEntries; std::vector<GPUTestExpectationEntry> mEntries;
std::vector<std::string> mErrorMessages; std::vector<std::string> mErrorMessages;
uint32_t mExpectationsAllowMask;
}; };
const char *GetConditionName(uint32_t condition); const char *GetConditionName(uint32_t condition);
......
...@@ -152,6 +152,10 @@ class TestSuite ...@@ -152,6 +152,10 @@ class TestSuite
int32_t getTestExpectation(const std::string &testName); int32_t getTestExpectation(const std::string &testName);
int32_t getTestExpectationWithConfig(const GPUTestConfig &config, const std::string &testName); int32_t getTestExpectationWithConfig(const GPUTestConfig &config, const std::string &testName);
bool logAnyUnusedTestExpectations(); bool logAnyUnusedTestExpectations();
void setTestExpectationsAllowMask(uint32_t mask)
{
mTestExpectationsParser.setTestExpectationsAllowMask(mask);
}
private: private:
bool parseSingleArg(const char *argument); bool parseSingleArg(const char *argument);
......
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