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
282
282
return 4 * sizeof (MEGABYTE);
283
283
}
284
284
285
+ // Limits simple push constants based on pushed inputs
286
+ virtual bool EnableSimplePushRestriction () const { return false ; }
287
+
285
288
286
289
};
287
290
Original file line number Diff line number Diff line change @@ -955,9 +955,13 @@ namespace IGC
955
955
{
956
956
auto & inputs = m_context->getModuleMetaData ()->pushInfo .inputs ;
957
957
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
+ }
961
965
const unsigned int maxPushedGRFs = 96 ;
962
966
if (largestIndex >= maxPushedGRFs)
963
967
{
You can’t perform that action at this time.
0 commit comments