mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
refactor: remove not needed code
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a027e7d8e4
commit
c72b9ec448
@@ -124,7 +124,6 @@ struct PipelineSelectProperties {
|
||||
};
|
||||
|
||||
struct StateBaseAddressPropertiesSupport {
|
||||
bool globalAtomics = false;
|
||||
bool bindingTablePoolBaseAddress = false;
|
||||
};
|
||||
|
||||
@@ -137,13 +136,12 @@ struct StateBaseAddressProperties {
|
||||
StreamPropertySizeT surfaceStateSize{};
|
||||
StreamPropertySizeT dynamicStateSize{};
|
||||
StreamPropertySizeT indirectObjectSize{};
|
||||
StreamProperty globalAtomics{};
|
||||
StreamProperty statelessMocs{};
|
||||
|
||||
void initSupport(const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
void resetState();
|
||||
|
||||
void setPropertiesAll(bool globalAtomics, int32_t statelessMocs,
|
||||
void setPropertiesAll(int32_t statelessMocs,
|
||||
int64_t bindingTablePoolBaseAddress, size_t bindingTablePoolSize,
|
||||
int64_t surfaceStateBaseAddress, size_t surfaceStateSize,
|
||||
int64_t dynamicStateBaseAddress, size_t dynamicStateSize,
|
||||
|
||||
@@ -431,7 +431,7 @@ void StateBaseAddressProperties::setPropertyStatelessMocs(int32_t statelessMocs)
|
||||
this->statelessMocs.set(statelessMocs);
|
||||
}
|
||||
|
||||
void StateBaseAddressProperties::setPropertiesAll(bool globalAtomics, int32_t statelessMocs,
|
||||
void StateBaseAddressProperties::setPropertiesAll(int32_t statelessMocs,
|
||||
int64_t bindingTablePoolBaseAddress, size_t bindingTablePoolSize,
|
||||
int64_t surfaceStateBaseAddress, size_t surfaceStateSize,
|
||||
int64_t dynamicStateBaseAddress, size_t dynamicStateSize,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
* Copyright (C) 2019-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -49,7 +49,6 @@ struct Gen11 {
|
||||
};
|
||||
|
||||
struct StateBaseAddressStateSupport {
|
||||
static constexpr bool globalAtomics = false;
|
||||
static constexpr bool bindingTablePoolBaseAddress = false;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -50,7 +50,6 @@ struct Gen8 {
|
||||
};
|
||||
|
||||
struct StateBaseAddressStateSupport {
|
||||
static constexpr bool globalAtomics = false;
|
||||
static constexpr bool bindingTablePoolBaseAddress = false;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -49,7 +49,6 @@ struct Gen9 {
|
||||
};
|
||||
|
||||
struct StateBaseAddressStateSupport {
|
||||
static constexpr bool globalAtomics = false;
|
||||
static constexpr bool bindingTablePoolBaseAddress = false;
|
||||
};
|
||||
|
||||
|
||||
@@ -3619,7 +3619,7 @@ HWTEST2_F(CommandStreamReceiverHwTest,
|
||||
|
||||
EXPECT_TRUE(commandStreamReceiver.getGSBAStateDirty());
|
||||
|
||||
this->requiredStreamProperties.stateBaseAddress.setPropertiesAll(false, 1, 0x1000, 0x100, 0x2000, 0x100, 0x3000, 0x100, 0x4000, 0x100);
|
||||
this->requiredStreamProperties.stateBaseAddress.setPropertiesAll(1, 0x1000, 0x100, 0x2000, 0x100, 0x3000, 0x100, 0x4000, 0x100);
|
||||
commandStreamReceiver.flushImmediateTask(commandStream, commandStream.getUsed(), immediateFlushTaskFlags, *pDevice);
|
||||
|
||||
HardwareParse hwParserCsr;
|
||||
@@ -3657,7 +3657,7 @@ HWTEST2_F(CommandStreamReceiverHwTest,
|
||||
|
||||
EXPECT_TRUE(commandStreamReceiver.getGSBAStateDirty());
|
||||
|
||||
this->requiredStreamProperties.stateBaseAddress.setPropertiesAll(false, 1, 0x1000, 0x100, 0x2000, 0x100, 0x3000, 0x100, 0x4000, 0x100);
|
||||
this->requiredStreamProperties.stateBaseAddress.setPropertiesAll(1, 0x1000, 0x100, 0x2000, 0x100, 0x3000, 0x100, 0x4000, 0x100);
|
||||
commandStreamReceiver.flushImmediateTask(commandStream, commandStream.getUsed(), immediateFlushTaskFlags, *pDevice);
|
||||
|
||||
HardwareParse hwParserCsr;
|
||||
@@ -3710,7 +3710,7 @@ HWTEST2_F(CommandStreamReceiverHwTest,
|
||||
|
||||
EXPECT_FALSE(commandStreamReceiver.getGSBAStateDirty());
|
||||
|
||||
this->requiredStreamProperties.stateBaseAddress.setPropertiesAll(false, 1, 0x1000, 0x100, 0x2000, 0x100, 0x3000, 0x100, 0x4000, 0x100);
|
||||
this->requiredStreamProperties.stateBaseAddress.setPropertiesAll(1, 0x1000, 0x100, 0x2000, 0x100, 0x3000, 0x100, 0x4000, 0x100);
|
||||
|
||||
size_t usedSize = commandStreamReceiver.commandStream.getUsed();
|
||||
commandStreamReceiver.flushImmediateTask(commandStream,
|
||||
@@ -3752,7 +3752,7 @@ HWTEST2_F(CommandStreamReceiverHwTest,
|
||||
|
||||
EXPECT_TRUE(commandStreamReceiver.getGSBAStateDirty());
|
||||
|
||||
this->requiredStreamProperties.stateBaseAddress.setPropertiesAll(false, 1, -1, -1, 0x2000, 0x100, 0x3000, 0x100, 0x4000, 0x100);
|
||||
this->requiredStreamProperties.stateBaseAddress.setPropertiesAll(1, -1, -1, 0x2000, 0x100, 0x3000, 0x100, 0x4000, 0x100);
|
||||
commandStreamReceiver.flushImmediateTask(commandStream, commandStream.getUsed(), immediateFlushTaskFlags, *pDevice);
|
||||
|
||||
EXPECT_EQ(0x2000, commandStreamReceiver.streamProperties.stateBaseAddress.surfaceStateBaseAddress.value);
|
||||
@@ -3793,7 +3793,7 @@ HWTEST2_F(CommandStreamReceiverHwTest,
|
||||
|
||||
EXPECT_TRUE(commandStreamReceiver.getGSBAStateDirty());
|
||||
|
||||
this->requiredStreamProperties.stateBaseAddress.setPropertiesAll(false, 1, -1, -1, 0x2000, 0x100, 0x3000, 0x100, 0x4000, 0x100);
|
||||
this->requiredStreamProperties.stateBaseAddress.setPropertiesAll(1, -1, -1, 0x2000, 0x100, 0x3000, 0x100, 0x4000, 0x100);
|
||||
commandStreamReceiver.flushImmediateTask(commandStream, commandStream.getUsed(), immediateFlushTaskFlags, *pDevice);
|
||||
|
||||
EXPECT_EQ(0x2000, commandStreamReceiver.streamProperties.stateBaseAddress.surfaceStateBaseAddress.value);
|
||||
|
||||
@@ -885,14 +885,14 @@ TEST(StreamPropertiesTests, givenStateBaseAddressSupportFlagStateWhenSettingProp
|
||||
sbaProperties.propertiesSupportLoaded = true;
|
||||
sbaProperties.stateBaseAddressPropertiesSupport.bindingTablePoolBaseAddress = false;
|
||||
|
||||
sbaProperties.setPropertiesAll(true, -1, 1, -1, -1, -1, -1, -1, -1, -1);
|
||||
sbaProperties.setPropertiesAll(-1, 1, -1, -1, -1, -1, -1, -1, -1);
|
||||
EXPECT_FALSE(sbaProperties.isDirty());
|
||||
|
||||
EXPECT_EQ(-1, sbaProperties.statelessMocs.value);
|
||||
EXPECT_EQ(-1, sbaProperties.bindingTablePoolBaseAddress.value);
|
||||
EXPECT_EQ(static_cast<size_t>(-1), sbaProperties.bindingTablePoolSize.value);
|
||||
|
||||
sbaProperties.setPropertiesAll(false, 1, 1, -1, -1, -1, -1, -1, -1, -1);
|
||||
sbaProperties.setPropertiesAll(1, 1, -1, -1, -1, -1, -1, -1, -1);
|
||||
EXPECT_TRUE(sbaProperties.isDirty());
|
||||
EXPECT_TRUE(sbaProperties.statelessMocs.isDirty);
|
||||
EXPECT_FALSE(sbaProperties.bindingTablePoolBaseAddress.isDirty);
|
||||
@@ -903,7 +903,7 @@ TEST(StreamPropertiesTests, givenStateBaseAddressSupportFlagStateWhenSettingProp
|
||||
EXPECT_EQ(static_cast<size_t>(-1), sbaProperties.bindingTablePoolSize.value);
|
||||
|
||||
sbaProperties.stateBaseAddressPropertiesSupport.bindingTablePoolBaseAddress = true;
|
||||
sbaProperties.setPropertiesAll(true, -1, 2, 2, -1, -1, -1, -1, -1, -1);
|
||||
sbaProperties.setPropertiesAll(-1, 2, 2, -1, -1, -1, -1, -1, -1);
|
||||
EXPECT_TRUE(sbaProperties.isDirty());
|
||||
EXPECT_FALSE(sbaProperties.statelessMocs.isDirty);
|
||||
EXPECT_TRUE(sbaProperties.bindingTablePoolBaseAddress.isDirty);
|
||||
@@ -913,24 +913,24 @@ TEST(StreamPropertiesTests, givenStateBaseAddressSupportFlagStateWhenSettingProp
|
||||
EXPECT_EQ(2, sbaProperties.bindingTablePoolBaseAddress.value);
|
||||
EXPECT_EQ(2u, sbaProperties.bindingTablePoolSize.value);
|
||||
|
||||
sbaProperties.setPropertiesAll(true, 1, 2, 2, -1, -1, -1, -1, -1, -1);
|
||||
sbaProperties.setPropertiesAll(1, 2, 2, -1, -1, -1, -1, -1, -1);
|
||||
EXPECT_FALSE(sbaProperties.isDirty());
|
||||
|
||||
sbaProperties.setPropertiesAll(false, 0, 3, 2, -1, -1, -1, -1, -1 - 1, -1);
|
||||
sbaProperties.setPropertiesAll(0, 3, 2, -1, -1, -1, -1, -1 - 1, -1);
|
||||
EXPECT_TRUE(sbaProperties.isDirty());
|
||||
|
||||
EXPECT_EQ(0, sbaProperties.statelessMocs.value);
|
||||
EXPECT_EQ(3, sbaProperties.bindingTablePoolBaseAddress.value);
|
||||
EXPECT_EQ(2u, sbaProperties.bindingTablePoolSize.value);
|
||||
|
||||
sbaProperties.setPropertiesAll(false, 0, 3, 3, -1, -1, -1, -1, -1, -1);
|
||||
sbaProperties.setPropertiesAll(0, 3, 3, -1, -1, -1, -1, -1, -1);
|
||||
EXPECT_FALSE(sbaProperties.isDirty());
|
||||
|
||||
EXPECT_EQ(0, sbaProperties.statelessMocs.value);
|
||||
EXPECT_EQ(3, sbaProperties.bindingTablePoolBaseAddress.value);
|
||||
EXPECT_EQ(3u, sbaProperties.bindingTablePoolSize.value);
|
||||
|
||||
sbaProperties.setPropertiesAll(false, 0, 3, -1, -1, -1, -1, -1, -1, -1);
|
||||
sbaProperties.setPropertiesAll(0, 3, -1, -1, -1, -1, -1, -1, -1);
|
||||
EXPECT_FALSE(sbaProperties.isDirty());
|
||||
|
||||
MockStateBaseAddressProperties copySbaProperties{};
|
||||
@@ -955,7 +955,7 @@ TEST(StreamPropertiesTests, givenStateBaseAddressSupportFlagDefaultValueWhenSett
|
||||
StateBaseAddressProperties sbaProperties{};
|
||||
sbaProperties.initSupport(*mockExecutionEnvironment.rootDeviceEnvironments[0]);
|
||||
|
||||
sbaProperties.setPropertiesAll(true, 2, 3, 3, -1, -1, -1, -1, -1, -1);
|
||||
sbaProperties.setPropertiesAll(2, 3, 3, -1, -1, -1, -1, -1, -1);
|
||||
|
||||
EXPECT_EQ(2, sbaProperties.statelessMocs.value);
|
||||
|
||||
@@ -974,7 +974,7 @@ TEST(StreamPropertiesTests, givenStateBaseAddressCommonBaseAddressAndSizeWhenSet
|
||||
sbaProperties.propertiesSupportLoaded = true;
|
||||
sbaProperties.stateBaseAddressPropertiesSupport.bindingTablePoolBaseAddress = false;
|
||||
|
||||
sbaProperties.setPropertiesAll(false, -1, -1, 10, 10, -1, -1, -1, -1, -1);
|
||||
sbaProperties.setPropertiesAll(-1, -1, 10, 10, -1, -1, -1, -1, -1);
|
||||
EXPECT_TRUE(sbaProperties.isDirty());
|
||||
EXPECT_EQ(10, sbaProperties.surfaceStateBaseAddress.value);
|
||||
|
||||
@@ -985,7 +985,7 @@ TEST(StreamPropertiesTests, givenStateBaseAddressCommonBaseAddressAndSizeWhenSet
|
||||
EXPECT_FALSE(sbaProperties.indirectObjectBaseAddress.isDirty);
|
||||
EXPECT_FALSE(sbaProperties.indirectObjectSize.isDirty);
|
||||
|
||||
sbaProperties.setPropertiesAll(false, -1, -1, 10, 10, 20, -1, -1, -1, -1);
|
||||
sbaProperties.setPropertiesAll(-1, -1, 10, 10, 20, -1, -1, -1, -1);
|
||||
EXPECT_FALSE(sbaProperties.isDirty());
|
||||
EXPECT_EQ(20u, sbaProperties.surfaceStateSize.value);
|
||||
|
||||
@@ -996,7 +996,7 @@ TEST(StreamPropertiesTests, givenStateBaseAddressCommonBaseAddressAndSizeWhenSet
|
||||
EXPECT_FALSE(sbaProperties.indirectObjectBaseAddress.isDirty);
|
||||
EXPECT_FALSE(sbaProperties.indirectObjectSize.isDirty);
|
||||
|
||||
sbaProperties.setPropertiesAll(false, -1, -1, 10, 10, 20, 30, -1, -1, -1);
|
||||
sbaProperties.setPropertiesAll(-1, -1, 10, 10, 20, 30, -1, -1, -1);
|
||||
EXPECT_TRUE(sbaProperties.isDirty());
|
||||
EXPECT_EQ(30, sbaProperties.dynamicStateBaseAddress.value);
|
||||
|
||||
@@ -1007,7 +1007,7 @@ TEST(StreamPropertiesTests, givenStateBaseAddressCommonBaseAddressAndSizeWhenSet
|
||||
EXPECT_FALSE(sbaProperties.indirectObjectBaseAddress.isDirty);
|
||||
EXPECT_FALSE(sbaProperties.indirectObjectSize.isDirty);
|
||||
|
||||
sbaProperties.setPropertiesAll(false, -1, -1, 10, 10, 20, 30, 40, -1, -1);
|
||||
sbaProperties.setPropertiesAll(-1, -1, 10, 10, 20, 30, 40, -1, -1);
|
||||
EXPECT_FALSE(sbaProperties.isDirty());
|
||||
EXPECT_EQ(40u, sbaProperties.dynamicStateSize.value);
|
||||
|
||||
@@ -1018,7 +1018,7 @@ TEST(StreamPropertiesTests, givenStateBaseAddressCommonBaseAddressAndSizeWhenSet
|
||||
EXPECT_FALSE(sbaProperties.indirectObjectBaseAddress.isDirty);
|
||||
EXPECT_FALSE(sbaProperties.indirectObjectSize.isDirty);
|
||||
|
||||
sbaProperties.setPropertiesAll(false, -1, -1, 10, 10, 20, 30, 40, 50, -1);
|
||||
sbaProperties.setPropertiesAll(-1, -1, 10, 10, 20, 30, 40, 50, -1);
|
||||
EXPECT_TRUE(sbaProperties.isDirty());
|
||||
EXPECT_EQ(50, sbaProperties.indirectObjectBaseAddress.value);
|
||||
|
||||
@@ -1029,7 +1029,7 @@ TEST(StreamPropertiesTests, givenStateBaseAddressCommonBaseAddressAndSizeWhenSet
|
||||
EXPECT_TRUE(sbaProperties.indirectObjectBaseAddress.isDirty);
|
||||
EXPECT_FALSE(sbaProperties.indirectObjectSize.isDirty);
|
||||
|
||||
sbaProperties.setPropertiesAll(false, -1, -1, 10, 10, 20, 30, 40, 50, 60);
|
||||
sbaProperties.setPropertiesAll(-1, -1, 10, 10, 20, 30, 40, 50, 60);
|
||||
EXPECT_FALSE(sbaProperties.isDirty());
|
||||
EXPECT_EQ(60u, sbaProperties.indirectObjectSize.value);
|
||||
|
||||
@@ -1040,7 +1040,7 @@ TEST(StreamPropertiesTests, givenStateBaseAddressCommonBaseAddressAndSizeWhenSet
|
||||
EXPECT_FALSE(sbaProperties.indirectObjectBaseAddress.isDirty);
|
||||
EXPECT_FALSE(sbaProperties.indirectObjectSize.isDirty);
|
||||
|
||||
sbaProperties.setPropertiesAll(false, -1, -1, 10, 10, 20, 30, 40, 50, 60);
|
||||
sbaProperties.setPropertiesAll(-1, -1, 10, 10, 20, 30, 40, 50, 60);
|
||||
EXPECT_FALSE(sbaProperties.isDirty());
|
||||
|
||||
EXPECT_FALSE(sbaProperties.surfaceStateBaseAddress.isDirty);
|
||||
@@ -1386,7 +1386,7 @@ TEST(StreamPropertiesTests, givenSetAllStateBaseAddressPropertiesWhenResetingSta
|
||||
int64_t indirectObjectBaseAddress = 8;
|
||||
size_t indirectObjectSize = 9;
|
||||
|
||||
sbaProperties.setPropertiesAll(false, statelessMocs,
|
||||
sbaProperties.setPropertiesAll(statelessMocs,
|
||||
bindingTablePoolBaseAddress, bindingTablePoolSize,
|
||||
surfaceStateBaseAddress, surfaceStateSize,
|
||||
dynamicStateBaseAddress, dynamicStateSize,
|
||||
@@ -1449,7 +1449,7 @@ TEST(StreamPropertiesTests, givenAllStreamPropertiesSetWhenAllStreamPropertiesRe
|
||||
size_t dynamicStateSize = 7;
|
||||
int64_t indirectObjectBaseAddress = 8;
|
||||
size_t indirectObjectSize = 9;
|
||||
globalStreamProperties.stateBaseAddress.setPropertiesAll(false, statelessMocs,
|
||||
globalStreamProperties.stateBaseAddress.setPropertiesAll(statelessMocs,
|
||||
bindingTablePoolBaseAddress, bindingTablePoolSize,
|
||||
surfaceStateBaseAddress, surfaceStateSize,
|
||||
dynamicStateBaseAddress, dynamicStateSize,
|
||||
|
||||
Reference in New Issue
Block a user