File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -282,6 +282,9 @@ namespace IGC
282282 return 4 * sizeof (MEGABYTE);
283283 }
284284
285+ // Limits simple push constants based on pushed inputs
286+ virtual bool EnableSimplePushRestriction () const { return false ; }
287+
285288
286289 };
287290
Original file line number Diff line number Diff line change @@ -955,9 +955,13 @@ namespace IGC
955955 {
956956 auto & inputs = m_context->getModuleMetaData ()->pushInfo .inputs ;
957957 typedef const std::map<unsigned int , SInputDesc>::value_type& inputPairType;
958- auto largestPair = std::max_element (inputs.begin (), inputs.end (),
959- [](inputPairType a, inputPairType b) { return a.second .index < b.second .index ; });
960- unsigned int largestIndex = largestPair != inputs.end () ? largestPair->second .index : 0 ;
958+ unsigned int largestIndex = 0 ;
959+ if (m_context->m_DriverInfo .EnableSimplePushRestriction ())
960+ {
961+ auto largestPair = std::max_element (inputs.begin (), inputs.end (),
962+ [](inputPairType a, inputPairType b) { return a.second .index < b.second .index ; });
963+ largestIndex = largestPair != inputs.end () ? largestPair->second .index : 0 ;
964+ }
961965 const unsigned int maxPushedGRFs = 96 ;
962966 if (largestIndex >= maxPushedGRFs)
963967 {
You can’t perform that action at this time.
0 commit comments