File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -3989,7 +3989,7 @@ namespace IGC
39893989 }
39903990
39913991 if ((context->type == ShaderType::OPENCL_SHADER || context->type == ShaderType::COMPUTE_SHADER) &&
3992- VISAPlatform >= GENX_SKL && IGC_IS_FLAG_ENABLED (EnablePreemption) && !hasStackCall && !context-> m_enableFunctionPointer )
3992+ VISAPlatform >= GENX_SKL && IGC_IS_FLAG_ENABLED (EnablePreemption) && !hasStackCall)
39933993 {
39943994 SaveOption (vISA_enablePreemption, true );
39953995 }
Original file line number Diff line number Diff line change @@ -732,6 +732,14 @@ bool EmitPass::runOnFunction(llvm::Function& F)
732732 }
733733 }
734734
735+ // Temp WA to disable MTP when stack calls are present
736+ // TODO: Remove when VISA is fixed to copy R0 to dedicated register, so R0 contents won't be corrupted by MTP
737+ if (m_currShader->GetShaderType() == ShaderType::OPENCL_SHADER && hasStackCall)
738+ {
739+ COpenCLKernel* kernel = static_cast<COpenCLKernel*>(m_currShader);
740+ kernel->SetDisableMidthreadPreemption();
741+ }
742+
735743 if (m_SimdMode == SIMDMode::SIMD16 &&
736744 this->m_ShaderMode == ShaderDispatchMode::NOT_APPLICABLE &&
737745 IsStage1BestPerf(m_pCtx->m_CgFlag, m_pCtx->m_StagingCtx))
You can’t perform that action at this time.
0 commit comments