Remove unnecessary getters from dawn_native::Instance.

As part of moving to webgpu.h's version of the Instance, the setters
will be replaced with a descriptor, and getters don't usually exists for
things set with descriptors (except getBindGroupLayout).

BUG=dawn:22

Change-Id: I05be8ebf241b33d019d521e40bfef8e49cdab07d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14540
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2019-12-13 15:32:42 +00:00
committed by Commit Bot service account
parent 97fb51f4af
commit 77fd4750ae
4 changed files with 9 additions and 18 deletions

View File

@@ -175,6 +175,10 @@ const char* DawnPerfTestEnvironment::GetTraceFile() const {
return mTraceFile;
}
DawnPerfTestPlatform* DawnPerfTestEnvironment::GetPlatform() const {
return mPlatform.get();
}
DawnPerfTestBase::DawnPerfTestBase(DawnTestBase* test,
unsigned int iterationsPerStep,
unsigned int maxStepsInFlight)
@@ -216,7 +220,7 @@ void DawnPerfTestBase::RunTest() {
DoRunLoop(kMaximumRunTimeSeconds);
DawnPerfTestPlatform* platform =
reinterpret_cast<DawnPerfTestPlatform*>(gTestEnv->GetInstance()->GetPlatform());
reinterpret_cast<DawnPerfTestPlatform*>(gTestEnv->GetPlatform());
const char* testName = ::testing::UnitTest::GetInstance()->current_test_info()->name();
// Only enable trace event recording in this section.
@@ -234,7 +238,7 @@ void DawnPerfTestBase::RunTest() {
}
void DawnPerfTestBase::DoRunLoop(double maxRunTime) {
dawn_platform::Platform* platform = gTestEnv->GetInstance()->GetPlatform();
dawn_platform::Platform* platform = gTestEnv->GetPlatform();
mNumStepsPerformed = 0;
cpuTime = 0;
@@ -285,7 +289,7 @@ void DawnPerfTestBase::OutputResults() {
// which waits for all threads to stop doing work. When we output results, there should
// be no additional incoming trace events.
DawnPerfTestPlatform* platform =
reinterpret_cast<DawnPerfTestPlatform*>(gTestEnv->GetInstance()->GetPlatform());
reinterpret_cast<DawnPerfTestPlatform*>(gTestEnv->GetPlatform());
std::vector<DawnPerfTestPlatform::TraceEvent> traceEventBuffer =
platform->AcquireTraceEventBuffer();

View File

@@ -40,6 +40,8 @@ class DawnPerfTestEnvironment : public DawnTestEnvironment {
// not be written to a json file.
const char* GetTraceFile() const;
DawnPerfTestPlatform* GetPlatform() const;
private:
// Only run calibration which allows the perf test runner to save time.
bool mIsCalibrating = false;