File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,9 @@ namespace IGC
259259 // / Allow aggressive vector value aliasing
260260 virtual bool EnableVecAliasing () const { return false ; }
261261
262+ // / Restrict dessa aliasing level. -1 : no restriction; max level otherwise.
263+ virtual int DessaAliasLevel () const { return -1 ; }
264+
262265 // / Rounding mode used for DP emulated function, defaults to Round to nearest
263266 virtual unsigned DPEmulationRoundingMode () const { return 0 ; }
264267
Original file line number Diff line number Diff line change @@ -675,6 +675,15 @@ namespace IGC
675675 " IGC::PositionOnlyVertexShader" ) != nullptr ;
676676 }
677677
678+ void CodeGenContext::setFlagsPerCtx ()
679+ {
680+ if (m_DriverInfo.DessaAliasLevel () != -1 ) {
681+ if ((int )IGC_GET_FLAG_VALUE (EnableDeSSAAlias) > m_DriverInfo.DessaAliasLevel ())
682+ {
683+ IGC_SET_FLAG_VALUE (EnableDeSSAAlias, m_DriverInfo.DessaAliasLevel ());
684+ }
685+ }
686+ }
678687
679688
680689}
Original file line number Diff line number Diff line change @@ -777,6 +777,8 @@ namespace IGC
777777 // / input: IGC MetaData Utils
778778 IGC::IGCMD::MetaDataUtils* m_pMdUtils = nullptr ;
779779 IGC::ModuleMetaData* modMD = nullptr ;
780+
781+ virtual void setFlagsPerCtx ();
780782 public:
781783 CodeGenContext (
782784 ShaderType _type, // /< shader type
@@ -805,6 +807,9 @@ namespace IGC
805807 instrStat[i][j] = 0 ;
806808 }
807809 }
810+
811+ // Per context flag adjustment
812+ setFlagsPerCtx ();
808813 }
809814
810815 CodeGenContext (CodeGenContext&) = delete ;
You can’t perform that action at this time.
0 commit comments