Remove getWaTable() method

Change-Id: I508103a0d46ae94b55891c8a7ef104fb47b0b3e0
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2019-09-04 09:10:18 +02:00
committed by sys_ocldev
parent b853a2fccb
commit cf979c3bc0
12 changed files with 24 additions and 47 deletions

View File

@ -325,7 +325,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "this->taskLevel", (uint32_t)this->taskLevel);
if (device.getWaTable()->waSamplerCacheFlushBetweenRedescribedSurfaceReads) {
if (executionEnvironment.getHardwareInfo()->workaroundTable.waSamplerCacheFlushBetweenRedescribedSurfaceReads) {
if (this->samplerCacheFlushRequired != SamplerCacheFlushState::samplerCacheFlushNotRequired) {
auto pCmd = addPipeControlCmd(commandStreamCSR);
pCmd->setTextureCacheInvalidationEnable(true);
@ -599,7 +599,7 @@ size_t CommandStreamReceiverHw<GfxFamily>::getRequiredCmdStreamSize(const Dispat
size += getCmdSizeForPreemption(dispatchFlags);
size += getCmdSizeForEpilogue(dispatchFlags);
if (device.getWaTable()->waSamplerCacheFlushBetweenRedescribedSurfaceReads) {
if (executionEnvironment.getHardwareInfo()->workaroundTable.waSamplerCacheFlushBetweenRedescribedSurfaceReads) {
if (this->samplerCacheFlushRequired != SamplerCacheFlushState::samplerCacheFlushNotRequired) {
size += sizeof(typename GfxFamily::PIPE_CONTROL);
}

View File

@ -55,7 +55,7 @@ PreemptionMode PreemptionHelper::taskPreemptionMode(Device &device, Kernel *kern
}
if (device.getPreemptionMode() >= PreemptionMode::ThreadGroup &&
allowThreadGroupPreemption(kernel, device.getWaTable())) {
allowThreadGroupPreemption(kernel, &device.getHardwareInfo().workaroundTable)) {
return PreemptionMode::ThreadGroup;
}

View File

@ -22,7 +22,7 @@ size_t PreemptionHelper::getPreemptionWaCsSize(const Device &device) {
PreemptionMode preemptionMode = device.getPreemptionMode();
if (preemptionMode == PreemptionMode::ThreadGroup ||
preemptionMode == PreemptionMode::MidThread) {
if (device.getWaTable()->waModifyVFEStateAfterGPGPUPreemption) {
if (device.getHardwareInfo().workaroundTable.waModifyVFEStateAfterGPGPUPreemption) {
size += 2 * sizeof(MI_LOAD_REGISTER_IMM);
}
}
@ -35,7 +35,7 @@ void PreemptionHelper::applyPreemptionWaCmdsBegin(LinearStream *pCommandStream,
PreemptionMode preemptionMode = device.getPreemptionMode();
if (preemptionMode == PreemptionMode::ThreadGroup ||
preemptionMode == PreemptionMode::MidThread) {
if (device.getWaTable()->waModifyVFEStateAfterGPGPUPreemption) {
if (device.getHardwareInfo().workaroundTable.waModifyVFEStateAfterGPGPUPreemption) {
auto pCmd = reinterpret_cast<MI_LOAD_REGISTER_IMM *>(pCommandStream->getSpace(sizeof(MI_LOAD_REGISTER_IMM)));
*pCmd = GfxFamily::cmdInitLoadRegisterImm;
pCmd->setRegisterOffset(CS_GPR_R0);
@ -50,7 +50,7 @@ void PreemptionHelper::applyPreemptionWaCmdsEnd(LinearStream *pCommandStream, co
PreemptionMode preemptionMode = device.getPreemptionMode();
if (preemptionMode == PreemptionMode::ThreadGroup ||
preemptionMode == PreemptionMode::MidThread) {
if (device.getWaTable()->waModifyVFEStateAfterGPGPUPreemption) {
if (device.getHardwareInfo().workaroundTable.waModifyVFEStateAfterGPGPUPreemption) {
auto pCmd = reinterpret_cast<MI_LOAD_REGISTER_IMM *>(pCommandStream->getSpace(sizeof(MI_LOAD_REGISTER_IMM)));
*pCmd = GfxFamily::cmdInitLoadRegisterImm;
pCmd->setRegisterOffset(CS_GPR_R0);

View File

@ -167,8 +167,6 @@ bool Device::createEngine(uint32_t deviceIndex, uint32_t deviceCsrIndex, aub_str
const HardwareInfo &Device::getHardwareInfo() const { return *executionEnvironment->getHardwareInfo(); }
const WorkaroundTable *Device::getWaTable() const { return &getHardwareInfo().workaroundTable; }
const DeviceInfo &Device::getDeviceInfo() const {
return deviceInfo;
}

View File

@ -49,7 +49,6 @@ class Device : public BaseObject<_cl_device_id> {
// Helper functions
const HardwareInfo &getHardwareInfo() const;
const DeviceInfo &getDeviceInfo() const;
MOCKABLE_VIRTUAL const WorkaroundTable *getWaTable() const;
EngineControl &getEngine(aub_stream::EngineType engineType, bool lowPriority);
EngineControl &getDefaultEngine();