Remove SPVC toggles and excise remaining references

BUG=dawn:521

Change-Id: Ib6428ca366a70d73096f9b4442c1b7fb69a539ba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28142
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
Ryan Harrison
2020-09-03 18:39:37 +00:00
committed by Commit Bot service account
parent b44ca92f1c
commit 2cdb9f1ed1
11 changed files with 3 additions and 235 deletions

View File

@@ -230,72 +230,6 @@ void DawnTestEnvironment::ParseArgs(int argc, char** argv) {
continue;
}
if (strcmp("--use-spvc", argv[i]) == 0) {
if (mSpvcFlagSeen) {
dawn::WarningLog() << "Multiple flags passed in that force whether or not to use "
"the spvc. This may lead to unexpected behaviour.";
}
ASSERT(!mSpvcFlagSeen);
mUseSpvc = true;
mSpvcFlagSeen = true;
continue;
}
if (strcmp("--no-use-spvc", argv[i]) == 0) {
if (mSpvcFlagSeen) {
dawn::WarningLog() << "Multiple flags passed in that force whether or not to use "
"the spvc. This may lead to unexpected behaviour.";
}
ASSERT(!mSpvcFlagSeen);
mUseSpvc = false;
mSpvcFlagSeen = true;
continue;
}
if (strcmp("--use-spvc-parser", argv[i]) == 0) {
if (mSpvcParserFlagSeen) {
dawn::WarningLog() << "Multiple flags passed in that force whether or not to use "
"the spvc parser. This may cause unexpected behaviour.";
}
ASSERT(!mSpvcParserFlagSeen);
if (!mUseSpvc) {
if (mSpvcFlagSeen) {
dawn::ErrorLog()
<< "Overriding force disabling of spvc since it is required for using the "
"spvc parser. This indicates a likely misconfiguration.";
} else {
dawn::InfoLog()
<< "Enabling spvc since it is required for using the spvc parser.";
}
ASSERT(!mSpvcFlagSeen);
}
mUseSpvc = true; // It's impossible to use the spvc parser without using spvc, so
// turning on mUseSpvc implicitly.
mUseSpvcParser = true;
mSpvcParserFlagSeen = true;
continue;
}
if (strcmp("--no-use-spvc-parser", argv[i]) == 0) {
if (mSpvcParserFlagSeen) {
dawn::WarningLog() << "Multiple flags passed in that force whether or not to use "
"the spvc parser. This may cause unexpected behaviour.";
}
ASSERT(!mSpvcParserFlagSeen);
// Intentionally not changing mUseSpvc, since the dependency is one-way. This will
// not correctly handle the case where spvc is off by default, then there is a spvc
// parser on flag followed by a off flag, but that is already being indicated as a
// misuse.
mUseSpvcParser = false;
mSpvcParserFlagSeen = true;
continue;
}
constexpr const char kVendorIdFilterArg[] = "--adapter-vendor-id=";
argLen = sizeof(kVendorIdFilterArg) - 1;
if (strncmp(argv[i], kVendorIdFilterArg, argLen) == 0) {
@@ -356,12 +290,6 @@ void DawnTestEnvironment::ParseArgs(int argc, char** argv) {
" -c, --begin-capture-on-startup: Begin debug capture on startup "
"(defaults to no capture)\n"
" --skip-validation: Skip Dawn validation\n"
" --use-spvc: Use spvc for accessing spirv-cross\n"
" --no-use-spvc: Do not use spvc for accessing spirv-cross\n"
" --use-spvc-parser: Use spvc's spir-v parsing insteads of spirv-cross's, "
"implies --use-spvc\n"
" --no-use-spvc-parser: Do no use spvc's spir-v parsing insteads of "
"spirv-cross's\n"
" --adapter-vendor-id: Select adapter by vendor id to run end2end tests"
"on multi-GPU systems \n"
" --exclusive-device-type-preference: Comma-delimited list of preferred device "
@@ -488,12 +416,6 @@ void DawnTestEnvironment::PrintTestConfigurationAndAdapterInfo() const {
<< "\n"
"SkipDawnValidation: "
<< (mSkipDawnValidation ? "true" : "false")
<< "\n"
"UseSpvc: "
<< (mUseSpvc ? "true" : "false")
<< "\n"
"UseSpvcParser: "
<< (mUseSpvcParser ? "true" : "false")
<< "\n"
"BeginCaptureOnStartup: "
<< (mBeginCaptureOnStartup ? "true" : "false")
@@ -543,14 +465,6 @@ bool DawnTestEnvironment::IsDawnValidationSkipped() const {
return mSkipDawnValidation;
}
bool DawnTestEnvironment::IsSpvcBeingUsed() const {
return mUseSpvc;
}
bool DawnTestEnvironment::IsSpvcParserBeingUsed() const {
return mUseSpvcParser;
}
dawn_native::Instance* DawnTestEnvironment::GetInstance() const {
return mInstance.get();
}
@@ -696,14 +610,6 @@ bool DawnTestBase::IsDawnValidationSkipped() const {
return gTestEnv->IsDawnValidationSkipped();
}
bool DawnTestBase::IsSpvcBeingUsed() const {
return gTestEnv->IsSpvcBeingUsed();
}
bool DawnTestBase::IsSpvcParserBeingUsed() const {
return gTestEnv->IsSpvcParserBeingUsed();
}
bool DawnTestBase::IsAsan() const {
#if defined(ADDRESS_SANITIZER)
return true;
@@ -790,24 +696,6 @@ void DawnTestBase::SetUp() {
deviceDescriptor.forceEnabledToggles.push_back(kSkipValidationToggle);
}
static constexpr char kUseSpvcToggle[] = "use_spvc";
static constexpr char kUseSpvcParserToggle[] = "use_spvc_parser";
if (gTestEnv->IsSpvcBeingUsed()) {
ASSERT(gTestEnv->GetInstance()->GetToggleInfo(kUseSpvcToggle) != nullptr);
deviceDescriptor.forceEnabledToggles.push_back(kUseSpvcToggle);
if (gTestEnv->IsSpvcParserBeingUsed()) {
ASSERT(gTestEnv->GetInstance()->GetToggleInfo(kUseSpvcParserToggle) != nullptr);
deviceDescriptor.forceEnabledToggles.push_back(kUseSpvcParserToggle);
}
} else {
// Turning on spvc parser should always turn on spvc.
ASSERT(!gTestEnv->IsSpvcParserBeingUsed());
ASSERT(gTestEnv->GetInstance()->GetToggleInfo(kUseSpvcToggle) != nullptr);
deviceDescriptor.forceDisabledToggles.push_back(kUseSpvcToggle);
}
backendDevice = mBackendAdapter.CreateDevice(&deviceDescriptor);
ASSERT_NE(nullptr, backendDevice);