Dont restore overrideCommandStreamReceiverCreation at creation time

Change-Id: I17039e501c0cdc84799ae16e7f82e8091cc6fb3a
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2019-01-08 13:11:09 +01:00
committed by sys_ocldev
parent c2ef7ef0ca
commit a9470b9f79
7 changed files with 31 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Intel Corporation
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -14,6 +14,7 @@
#include "unit_tests/helpers/execution_environment_helper.h"
#include "unit_tests/libult/create_command_stream.h"
#include "unit_tests/helpers/debug_manager_state_restore.h"
#include "unit_tests/helpers/variable_backup.h"
#include "test.h"
using namespace OCLRT;
@@ -40,7 +41,7 @@ HWTEST_P(CreateCommandStreamReceiverTest, givenCreateCommandStreamWhenCsrIsSetTo
CommandStreamReceiverType csrType = GetParam();
overrideCommandStreamReceiverCreation = true;
VariableBackup<bool> backup(&overrideCommandStreamReceiverCreation, true);
DebugManager.flags.SetCommandStreamReceiver.set(csrType);
executionEnvironment->commandStreamReceivers.resize(1);
executionEnvironment->commandStreamReceivers[0][0] = std::unique_ptr<CommandStreamReceiver>(createCommandStream(hwInfo,