1 /*========================== begin_copyright_notice ============================ 2 3 Copyright (C) 2017-2021 Intel Corporation 4 5 SPDX-License-Identifier: MIT 6 7 ============================= end_copyright_notice ===========================*/ 8 9 #pragma once 10 11 #include "usc_config.h" 12 13 #define USC_DBG_OFF (0x00000000) 14 #define USC_DBG_CRITICAL (0x00000001) 15 #define USC_DBG_NORMAL (0x00000002) 16 #define USC_DBG_VERBOSE (0x00000004) 17 #define USC_DBG_VERBOSE_VERBOSITY (0x00000040) 18 19 #define USC_DBG_FUNCTION (0x80000000) 20 21 #define USC_DBG_INTERFACE ((0x00010000) | USC_DBG_FUNCTION) 22 #define USC_DBG_HARDWARE ((0x00020000) | USC_DBG_VERBOSE) 23 #define USC_DBG_COMPILER ((0x00040000) | USC_DBG_VERBOSE) 24 #define USC_DBG_COMPILER_LIR_DUMP ((0x00001000) | USC_DBG_VERBOSE) 25 #define USC_DBG_COMPILER_IR_TO_LIR_TRACE ((0x00002000)) 26 27 namespace USC 28 { 29 30 #if defined (_DEBUG) || defined (_INTERNAL) 31 /*****************************************************************************\ 32 Debug structure for manual control over debug logging level. 33 \*****************************************************************************/ 34 struct SDebugLevel 35 { 36 unsigned int Critical : 1; 37 unsigned int Normal : 1; 38 unsigned int Verbose : 1; 39 unsigned int VerboseVerbosity : 1; 40 41 unsigned int : 4; 42 43 unsigned int : 4; 44 45 unsigned int CompilerLirDump : 1; 46 unsigned int CompilerIRToLIRTrace : 1; 47 unsigned int : 2; 48 49 unsigned int Interface : 1; 50 unsigned int Hardware : 1; 51 unsigned int Compiler : 1; 52 53 unsigned int : 5; 54 55 unsigned int : 4; 56 57 unsigned int : 3; 58 unsigned int Function : 1; 59 }; 60 61 /*****************************************************************************\ 62 Debug structure that holds MsgLevel together with break on assert option. 63 \*****************************************************************************/ 64 struct SDebugControl 65 { 66 bool breakOnAssert; 67 68 union 69 { 70 unsigned int MsgLevelValue; 71 SDebugLevel MsgLevel; 72 }; 73 }; 74 75 // Debug variable that holds MsgLevel together with break on assert option 76 // for USC. 77 USC_API extern SDebugControl g_DebugControl; 78 #endif //_DEBUG 79 80 /*****************************************************************************\ 81 Debug structure for overriding USC behavior. 82 \*****************************************************************************/ 83 struct SDebugVariables 84 { 85 /////////////////////////////////////////////////////////////////////////// 86 // Hardware Debug Controls 87 /////////////////////////////////////////////////////////////////////////// 88 unsigned int PassThroughVertexShaderEnable : 1; 89 unsigned int PassThroughPixelShaderEnable : 1; 90 91 unsigned int MaxSoftwareGRFRegistersOverride; 92 93 unsigned int MaxVSThreadsOverride; 94 unsigned int MaxGSThreadsOverride; 95 unsigned int MaxGSThreadsOverrideWithSO; 96 unsigned int MaxPSThreadsOverride; 97 unsigned int MaxHSThreadsOverride; 98 unsigned int MaxDSThreadsOverride; 99 unsigned int MaxCSThreadsOverride; 100 101 unsigned int MaxVSURBEntriesOverride; 102 unsigned int MaxGSURBEntriesOverride; 103 104 unsigned int MaxShaderScratchSpaceOverride; // Overrides the limit on the maximum scratch space 105 // size used by all threads in each stage of 3D pipeline. 106 107 unsigned int GSExecutionMode; 108 109 unsigned int ExtendAllSourceLiveRanges; 110 /////////////////////////////////////////////////////////////////////////// 111 // Software Debug Controls 112 /////////////////////////////////////////////////////////////////////////// 113 unsigned int BreakInCreateCompiler : 1; 114 unsigned int PrintVertexShaderKeyEnable : 1; 115 unsigned int PrintGeometryShaderKeyEnable : 1; 116 unsigned int PrintPixelShaderKeyEnable : 1; 117 unsigned int ReportAssertEnable : 1; 118 unsigned int ImprovedIsaDisassemblyEnable : 1; 119 unsigned int ShaderDumpEnable : 1; 120 unsigned int ShaderDumpToRamdisk : 1; 121 unsigned int PrintLirRegSetsEnable : 1; 122 unsigned int PrintFunctionBodyInstructionListEnable : 1; 123 unsigned int ShaderDumpPidDisable : 1; 124 unsigned int ShaderDumpDuplicatesEnable : 1; 125 unsigned int IsaInjectionEnable : 1; 126 unsigned int IsaLabelPrintingEnable : 1; 127 unsigned int EnableDebugFileDump : 1; 128 unsigned int AllDumpsInSingleFile : 1; 129 unsigned int OptimizationStatsEnable : 1; 130 unsigned int CompilationTimeDumpEnable : 1; 131 unsigned int QualityMetricsEnable : 1; 132 unsigned int CodeStatsEnable : 1; 133 unsigned int MemoryStatsEnable : 1; 134 unsigned int MemoryStatsDetailedEnable : 1; 135 unsigned int TimeStatsEnable : 1; 136 unsigned int DisablePixelShaderSampleInstructions : 1; 137 unsigned int DisableVertexShaderSampleInstructions : 1; 138 unsigned int ForceSampler2x2 : 1; 139 unsigned int DisableRenderTargetSurfaceState : 1; 140 unsigned int ForceSampleCToSample : 1; 141 unsigned int IllegalInstructionAfterEOTEnable : 1; 142 unsigned int ResetUninitializedVariablesEnable : 1; 143 unsigned int CompilerLogsInReleaseBuildEnable : 1; 144 145 unsigned int ISASchedulerLogs; 146 147 unsigned int RetailMessageControl; 148 149 unsigned int FullLIRDumpHashCode; 150 unsigned int DisableMcsFastClear; 151 unsigned int DisableMcsMsaa; 152 153 unsigned int ShaderDebugHashCode; 154 unsigned int ShaderDebugExtra; 155 unsigned int ShaderDebugHashCodeInKernel : 1; 156 unsigned int SystemThreadCacheFlushEnable : 1; 157 unsigned int SystemThreadCacheFlushCountOverride; 158 159 unsigned int PrintSimdMaskInLIR : 1; 160 161 unsigned int KillPixelHangWorkaroundOverrideEnable; 162 unsigned int KillPixelHangWorkaroundOverride; // 0-always enable message header for RT write messages 163 // 1-dispatch simd8 only when kill pixel enabled 164 // 2-thread count = 84(42 GT1) always 165 // 3-thread count = 84(42 GT1) when kill pixel enabled 166 unsigned int SendsSupportEnable : 1; 167 168 /////////////////////////////////////////////////////////////////////////// 169 // Compiler Debug Controls 170 /////////////////////////////////////////////////////////////////////////// 171 unsigned int SystemThreadEnable : 1; 172 unsigned int InstructionCompactionEnable : 1; // TODO: change to Override 173 unsigned int SIMD32CompileOverride : 1; 174 unsigned int SIMD32CompileEnable : 1; 175 unsigned int SIMD32CompileForce : 1; 176 unsigned int SIMD32AllowSpillFill : 1; 177 unsigned int SIMD16CompileOverride : 1; 178 unsigned int SIMD16CompileEnable : 1; 179 unsigned int SIMD16CompileForce : 1; 180 unsigned int SIMD8CompileOverride : 1; 181 unsigned int SIMD8CompileEnable : 1; 182 unsigned int CSSIMD32CompileForce : 1; 183 unsigned int CSSIMD16CompileForce : 1; 184 unsigned int CSSIMD8CompileForce : 1; 185 unsigned int HeaderBypassDisable : 1; 186 unsigned int DisableOptimizeDependencies : 1; 187 unsigned int DisableMergePatchConstantShaders : 1; 188 unsigned int DisableInstanceUnroll : 1; 189 unsigned int HSIndexedControlPointShaderEnable : 1; 190 unsigned int HSUseSingleHardwareThreadEnable : 1; 191 unsigned int ForceVSPullModel : 1; 192 unsigned int ForceGSPullModel : 1; 193 unsigned int ForceHSPullModel : 1; 194 unsigned int ForceDSPullModel : 1; 195 unsigned int ForceSampleUVtoZero : 1; 196 unsigned int ForceSkipValueNumberingForSample : 1; 197 unsigned int VSSIMD4x2CompileForce : 1; 198 unsigned int HSSIMD4x2CompileForce : 1; 199 unsigned int DSSIMD4x2CompileForce : 1; 200 unsigned int GSSIMD4x2CompileForce : 1; 201 unsigned int VSSIMD8CompileForce : 1; 202 unsigned int HSSIMD8CompileForce : 1; 203 unsigned int DSSIMD8CompileForce : 1; // For Gen9+ this mean SIMD8 single- and dual-patch compilation instead of SIMD4x2. 204 unsigned int DSSIMD8SPCompileForce : 1; // For Gen9+ only, this mean only single-patch compilation. 205 unsigned int GSSIMD8CompileForce : 1; 206 unsigned int VSSIMD8WithFullEpilogEnable : 1; 207 unsigned int GSSIMD8WithSpillFillCompileEnable : 1; 208 unsigned int HSSIMD8DualPatchModeCompileEnable : 1; 209 unsigned int HSSIMD8EightPatchModeCompileEnable : 1; 210 unsigned int DSSIMD8SingleOrDualPatchModeCompileEnable : 1; 211 unsigned int DisableGPGPUIndirectPayload : 1; 212 unsigned int LowPrecisionOverride : 1; 213 unsigned int LowPrecisionEnable : 1; 214 unsigned int SampleLdWithNativeZeroLodDisable : 1; 215 unsigned int SIMDExpansionEnable : 1; 216 unsigned int OCLSurfaceStateSpillFillEnable : 1; 217 unsigned int DisableHSBarrierRead : 1; 218 unsigned int ClearVHEnable : 1; 219 unsigned int ForceSamplerPointer : 1; 220 unsigned int ForceDoubleSamplerSlots : 1; 221 unsigned int URBPaddingSIMD8Disable : 1; 222 unsigned int ForceSendTGSMFence : 1; 223 unsigned int DisableRSPushConstants : 1; 224 unsigned int DisableRSPushConstantsCompute : 1; 225 unsigned int SWStencilPushConstantEnable : 1; 226 unsigned int AppendPaddingToISA : 1; 227 unsigned int CallToSubroutineCallForceEnable : 1; 228 229 unsigned int ForceCompilerInlineFunctionPolicy; 230 231 unsigned int MaxHSPatchConstantShaders; 232 unsigned int MaxSIMD16PixelShaderInstructionCount; 233 unsigned int MaxSIMD32PixelShaderInstructionCount; 234 235 unsigned int SIMD32CpiThreshold; 236 unsigned int OCLSIMD32InstructionThreshold; 237 unsigned int OCLSIMD32LIRThreshold; 238 unsigned int OCLSIMD32TPMThreshold; 239 unsigned int MaxSIMD16ComputeShaderInstructionCount; 240 unsigned int MaxSIMD32ComputeShaderInstructionCount; 241 242 unsigned int SamplerOffsetWorkaroundMinSampleCount; 243 unsigned int L3WAMaxShortVSLength; 244 unsigned int DoLlvmOptimize; 245 unsigned int ShaderTestFlagsFound; 246 unsigned int MaxInstructionsToFixPrecision; 247 248 unsigned int ForceShortenURBDataLenght :1; 249 unsigned int DisableILReflectOpts; 250 unsigned int DisableSIMD32DueEarlyEOTAfterDiscard :1; 251 unsigned int EnableResourceIndexAlwaysNonUniform :1; 252 // USCTester and USCLauncher use different compiler settings, e.g. USCTester does not support CB2CR on other platforms than HSW 253 // This is needed to pass this information from USCTester. 254 unsigned int DisableUSCTesterUnsupportedFeatures : 1; 255 256 /////////////////////////////////////////////////////////////////////////// 257 // USC WA Override Controls 258 /////////////////////////////////////////////////////////////////////////// 259 unsigned int WaDisable_WIZUnit_ScratchSpace; 260 unsigned int WaClampSamplerArrayIndex; 261 unsigned int WaForcePushConstantEvenReadLength; 262 unsigned int WaDisableHeaderBypassForPSDepthOutput; 263 unsigned int WaForceHeaderForKillPixInstructions; 264 unsigned int WaDecomposePowToLogMulExp; 265 unsigned int WaDisableMadSrc0Replicate; 266 unsigned int WaSamplerChannelDisables; 267 unsigned int WaUAVTypedWriteOverlapping; 268 unsigned int WaUAVTypedReadOverwritesAllDestChannels; 269 unsigned int WaUseOnlySIMD8UntypedRead; 270 unsigned int WaUVoffsetToZeroForLd2dms; 271 unsigned int WaPerThreadScratchSpaceInGPGPUIncrease; 272 unsigned int WaUseFDP3InsteadOfFDP2; 273 unsigned int WaApplyAbsToFrcInstruction; 274 unsigned int WaForPlusInfRoundingModeFrcInstruction; 275 unsigned int WaEmulateIBFEInstrucion; 276 unsigned int WaShaderCalculateResourceOffsets; 277 unsigned int WaUseThreadPayloadCompression; 278 unsigned int WaUnlitCentroidInterpolation; 279 unsigned int WaAddCallToEOTEnabled; 280 unsigned int WaZeroUnusedSampleDGradientsParameters; 281 unsigned int WaAlphaToOneOGL; 282 unsigned int WaOGLGSVertexReordering; 283 unsigned int WaOGLGSVertexReorderingTriStripAdjOnly; 284 unsigned int WaXScaledFormatConversion; 285 unsigned int WaCMPInstFlagDepClearedEarly; 286 unsigned int WaScalarAtomic; 287 unsigned int WaL3UseSamplerForLoadDualConstant; 288 unsigned int WaL3UseSamplerForVectorLoadScatter; 289 unsigned int Wa1DSurfaceSIMD4x2ArrayIndexInRAddress; 290 unsigned int WaBreakSimd16TernaryInstructionsIntoSimd8; 291 unsigned int WaGSPullModelForPatchlistInputTopology; 292 unsigned int WaGSSingleDispatchModeForTriangleInput; 293 unsigned int WaForceSIMD8ForBFIInstruction; 294 unsigned int WaBreakSimd16InstWhenAccIsUsedIntoSimd8; 295 unsigned int WaEnableDummyMovInGpgpuContextSave; 296 unsigned int WaClearNotificationRegInGpgpuContextSave; 297 unsigned int WaNotifRegSwapInGpGpuContextRestore; 298 unsigned int WaStoreSlmOffsetInSRDuringGpGpuPreemption; 299 unsigned int WaSampleGCToSampleLC; 300 unsigned int WaCMPInstNullDstForcesThreadSwitch; 301 unsigned int WaCMPInstNullDstBreaksR0Scoreboarding; 302 unsigned int WaForceHeaderForDualSourceBlendHi; 303 unsigned int WaForceHSPullModel; 304 unsigned int WaInsertNopToHaltDestination; 305 unsigned int WaForceTypeConvertF32To16ToAlign1; 306 unsigned int WaAdditionalMovWhenSrc1ModOnMulMach; 307 unsigned int WaForceMulSrc1WordToAlign1; 308 unsigned int WaCallForcesThreadSwitch; 309 unsigned int WaThreadSwitchAfterCall; 310 unsigned int WANOPBeetweenIndirectAdressingAndBranch; 311 unsigned int WaA32StatelessMessagesRequireHeader; 312 unsigned int WaNoA32ByteScatteredStatelessMessages; 313 unsigned int WaUrbAtomics; 314 unsigned int WaBasicCompilationForDPInstructions; 315 unsigned int WaHalfFloatSelNotAllowedWithSourceModifiers; 316 unsigned int WaLowPrecWriteRTOnlyFloat; 317 unsigned int WaBreakF32MixedModeIntoSimd8; 318 unsigned int WaDisableDSDualPatchMode; 319 unsigned int WaDisableNoSrcDepSetBeforeEOTSend; 320 unsigned int WaDstSubRegNumNotAllowedWithLowPrecPacked; 321 unsigned int WaHeaderRequiredOnSimd16Sample16bit; 322 unsigned int WaLodRequiredOnTypedMsaaUav; 323 unsigned int AccWrEnNotAllowedToAcc1With16bit; 324 unsigned int WaSendsSrc1Length0NotAllowed; 325 unsigned int WaDisableEuBypassOnSimd16Float16; 326 unsigned int WaDisableEuBypassOnSimd16Float32; 327 unsigned int WaStructuredBufferAsRawBufferOverride; 328 unsigned int WaSrc1ImmHfNotAllowed; 329 unsigned int WaCselUnsupported; 330 unsigned int WaDisableDSCaching; 331 unsigned int WaDisallow64BitImmMov; 332 unsigned int WaDisallowDFImmMovWithSimd8; 333 unsigned int WaEmitVtxWhenOutVtxCntIsZero; 334 unsigned int WaFixCentroidInterpolationRTIR16X; 335 unsigned int WaDisableIndirectDataForGPGPUWalker; 336 unsigned int WaDisableIndirectDataAndFlushGPGPUWalker; 337 unsigned int WaDisablePushConstantHSGS; 338 unsigned int WaEnableAllWriteChannelMask; 339 unsigned int WaGather4WithGreenChannelSelectOnR32G32Float; 340 unsigned int WaPreventHSTessLevelsInterference; 341 unsigned int WaAvoidDomainShaderCacheStall; 342 unsigned int WaClearArfDependenciesBeforeEot; 343 unsigned int WaDoNotPushConstantsForAllPulledGSTopologies; 344 unsigned int WaDisableDbg0Register; 345 unsigned int WaGrfDependecyClearInGpgpuContextRestore; 346 unsigned int WaRestoreFCandMSGRegistersFromUpperOword; 347 unsigned int WaRestoreFC4RegisterDW0fromDW1; 348 unsigned int WaRestoreFc0RegistersWithOffset; 349 unsigned int WaGrfDepClearOnOutstandingSamplerInGpgpuContextSave; 350 unsigned int WaStoreAcc2to9InAlign16InGpgpuContextSave; 351 unsigned int WaGrfScoreboardClearInGpgpuContextSave; 352 unsigned int WaClearFlowControlGpgpuContextSave; 353 unsigned int WaClearCr0SpfInGpgpuContextRestore; 354 unsigned int WaSendsSrc1SizeLimitWhenEOT; 355 unsigned int WaDisableMixedModeLog; 356 unsigned int WaDisableMixedModePow; 357 unsigned int WaDisableMixedModeFdiv; 358 unsigned int WaFloatMixedModeSelNotAllowedWithPackedDestination; 359 unsigned int WaDisableNativeDWxDWMultiplication; 360 unsigned int WaForceMinMaxGSThreadCount; 361 unsigned int WaIntegerDivisionSourceModifierNotSupported; 362 unsigned int WaDisableLowPrecisionWriteRTRepData; 363 unsigned int WAResetN0AfterRenderTargetRead; 364 365 unsigned int WADisableWriteCommitForPageFault; // Disables Write commit for page fault 366 unsigned int WaDisableDeepLoopsUnrolling; 367 unsigned int EnableRegSizeConsistencyCheck :1; // Enables RegSizeConsistencyCheck 368 unsigned int EnableUntypedSrfRead :1; 369 }; 370 371 #if ( defined _DEBUG ) || ( defined _INTERNAL ) 372 // Debug variable for overriding USC behavior. 373 USC_API extern SDebugVariables g_DebugVariables; 374 #endif // defined _DEBUG || defined _INTERNAL 375 376 /*****************************************************************************\ 377 MACRO: USC_RV_Declare 378 PURPOSE: Declares a new entry in the global registry table. 379 \*****************************************************************************/ 380 #define USC_RV_Declare(type, name, value, subkey, description) \ 381 struct SRegistryEntry##name : public SRegistryEntry \ 382 { \ 383 SRegistryEntry##name() \ 384 : SRegistryEntry(value, false, #name, subkey, #type, description, USC_RV_SetGroup) \ 385 { \ 386 } \ 387 } name 388 389 #define DGB_VAR_INITIAL_VALUE 0xCCCCCCCC 390 /*****************************************************************************\ 391 MACRO: USC_RV_USCWAOverrideControl 392 PURPOSE: Declares a new control debug variable which can be use to override 393 workaround related to USC. 394 \*****************************************************************************/ 395 #define USC_RV_USCWAOverrideControl( name ) \ 396 USC_RV_Declare( DWORD, name, DGB_VAR_INITIAL_VALUE, "", "" ) 397 398 /*****************************************************************************\ 399 MACRO: USC_RV_DeclareCompilerControl 400 PURPOSE: Declares a new compiler control debug variable meta data, one per 401 shader unit 402 \*****************************************************************************/ 403 #define USC_RV_DeclareCompilerControl( type, name, value, subkey, description ) \ 404 USC_RV_Declare( type, VS_##name, value, subkey, description ); \ 405 USC_RV_Declare( type, GS_##name, value, subkey, description ); \ 406 USC_RV_Declare( type, PS_##name, value, subkey, description ); \ 407 USC_RV_Declare( type, HS_##name, value, subkey, description ); \ 408 USC_RV_Declare( type, DS_##name, value, subkey, description ); \ 409 USC_RV_Declare( type, CS_##name, value, subkey, description ) 410 411 /*****************************************************************************\ 412 STRUCT: SRegistryVariable 413 PURPOSE: Defines data for holding/defining registry variables 414 \*****************************************************************************/ 415 struct SRegistryEntry 416 { SRegistryEntrySRegistryEntry417 SRegistryEntry( 418 unsigned int in_value, 419 bool in_isSet, 420 const char* in_pName, 421 const char* in_pSubKey, 422 const char* in_pType, 423 const char* in_pDescription, 424 const char* in_pGroup) 425 : Value(in_value), 426 IsSet(in_isSet), 427 pName(in_pName), 428 pSubKey(in_pSubKey), 429 pType(in_pType), 430 pDescription(in_pDescription), 431 pGroup(in_pGroup) 432 { 433 } 434 435 unsigned int Value; 436 bool IsSet; 437 const char* pName; 438 const char* pSubKey; 439 const char* pType; 440 const char* pDescription; 441 const char* pGroup; 442 }; 443 /*****************************************************************************\ 444 STRUCT: Global definition for the USC registry variables. 445 \*****************************************************************************/ 446 struct SUSCRegistryVariables 447 { 448 // Only use USC_RV_Declare macros in this structure. Any other data declaration will break the 449 // functionality when parsing this data. 450 451 #define USC_RV_SetGroup "DebugVariables" 452 USC_RV_Declare( bool, PassThroughVertexShaderEnable, false, "", " Doesn't do anything, just pass through the default values" ); 453 USC_RV_Declare( bool, PassThroughPixelShaderEnable , false, "", " Doesn't do anything, just pass through the default values" ); 454 USC_RV_Declare( dword, MaxSoftwareGRFRegistersOverride, 0, "", " Sets maximum number of software registers(max is 128)" ); 455 USC_RV_Declare( dword, MaxVSThreadsOverride , 0, "", " Max number of Vertex Shader thread" ); 456 USC_RV_Declare( dword, MaxGSThreadsOverride , 0, "", " Max number of Geometry Shader thread" ); 457 USC_RV_Declare( dword, MaxGSThreadsOverrideWithSO , 0, "", " Max number of Geometry Shader threads when stream output is enabled" ); 458 USC_RV_Declare( dword, MaxPSThreadsOverride , 0, "", " Max number of Pixel Shader thread" ); 459 USC_RV_Declare( dword, MaxHSThreadsOverride , 0, "", " Max number of Hull Shader thread " ); 460 USC_RV_Declare( dword, MaxDSThreadsOverride , 0, "", " Max number of Domain Shader thread " ); 461 USC_RV_Declare( dword, MaxCSThreadsOverride , 0, "", " Max number of Compute Shader thread " ); 462 USC_RV_Declare( dword, MaxVSURBEntriesOverride, 0, "", " Max number of Vertex Shader URB entries" ); 463 USC_RV_Declare( dword, MaxGSURBEntriesOverride, 0, "", " Max number of Geometry Shader URB entries" ); 464 USC_RV_Declare( dword, MaxShaderScratchSpaceOverride, 0, "", " Maximum amount of scratch space to be used by all threads. " ); 465 USC_RV_Declare( dword, GSExecutionMode, 0xffffffff, "", " Mode of GS compilation. Set 0 for single mode or 1 for dual mode. " ); 466 USC_RV_Declare( dword, ExtendAllSourceLiveRanges, 0, "", "" ); 467 468 USC_RV_Declare( bool, IllegalInstructionAfterEOTEnable, false, "", "Enables debug/release internal driver to insert illegal instruction at the end of each kernel. " ); 469 USC_RV_Declare( bool, BreakInCreateCompiler, false, "", "Will cause halt on breakpoint situated in CreateCompiler. " ); 470 USC_RV_Declare( bool, PrintVertexShaderKeyEnable , false, "", "Enables the printing of different vertex shader keys" ); 471 USC_RV_Declare( bool, PrintGeometryShaderKeyEnable , false, "", "Enables the printing of different geometry shader keys" ); 472 USC_RV_Declare( bool, PrintPixelShaderKeyEnable , false, "", "Enables the printing of different pixel shader keys " ); 473 USC_RV_Declare( bool, ShaderDumpEnable , false, "", "Enables debug/release driver to dump IL and ISA shaders to GHAL3D_OUTPUT_DIRECTORY" ); 474 USC_RV_Declare( bool, ShaderDumpToRamdisk, false, "", "Enables debug/release driver to dump IL and ISA shaders to ramdisk defined in system environmental variable. Works only with ShaderDumpEnable flag, used only for Jenkins automatization purposes. " ); 475 USC_RV_Declare( bool, PrintLirRegSetsEnable, false, "", "Enables/Disables printing LIR reg sets (e.g. Live-In, Live-Out, etc) in LIR shader dumps" ); 476 USC_RV_Declare( bool, PrintFunctionBodyInstructionListEnable, false, "", "" ); 477 USC_RV_Declare( bool, ShaderDumpPidDisable , false, "", "Enables adding PID to the name of shader dump directory" ); 478 USC_RV_Declare( bool, ShaderDumpDuplicatesEnable , false, "", "Enables dumping duplicate shader dumps. Works only with ShaderDumpEnable flag." ); 479 USC_RV_Declare( bool, IsaInjectionEnable , false, "", "Enables loading of kernels precompiled with IsaASM." ); 480 USC_RV_Declare( bool, IsaLabelPrintingEnable , true, "", "Enables using Labels instead of JIP and UIP numbers." ); 481 USC_RV_Declare( bool, EnableDebugFileDump , false, "", "Enables dumping debug output to file. " ); 482 USC_RV_Declare( bool, AllDumpsInSingleFile, false, "", "All dumps will be dumped into one file. "); 483 USC_RV_Declare( bool, OptimizationStatsEnable, false, "", "Enables counting optimizations statistics. " ); 484 USC_RV_Declare( bool, CompilationTimeDumpEnable , false, "", "Enables compilation time dump. " ); 485 USC_RV_Declare( bool, QualityMetricsEnable , false, "", "Enables computing Shader Quality Metrics. " ); 486 USC_RV_Declare( bool, TimeStatsEnable, false, "", "Enables computing time statisics. " ); 487 USC_RV_Declare( bool, DisablePixelShaderSampleInstructions, false, "", "Disables sample Pixel shader instructions for debug purposes" ); 488 USC_RV_Declare( bool, ForceSampler2x2, false, "", "" ); 489 USC_RV_Declare( bool, DisableRenderTargetSurfaceState, false, "", "" ); 490 USC_RV_Declare( bool, ForceSampleCToSample, false, "", "" ); 491 USC_RV_Declare( bool, ResetUninitializedVariablesEnable, false, "", "Enables initialization of all uninitialized variables" ); 492 USC_RV_Declare( bool, CompilerLogsInReleaseBuildEnable, false, "", "Enables some compiler logs in release-internal builds" ); 493 USC_RV_Declare( dword, ISASchedulerLogs, 0, "", "Enables ISA scheduler logs: 1 - timings only, 2 - summary file " ); 494 USC_RV_Declare( dword, RetailMessageControl, 0, "", "" ); 495 USC_RV_Declare( dword, FullLIRDumpHashCode , 0, "", "" ); 496 USC_RV_Declare( bool, DisableMcsFastClear , false, "", "Runs without color fast clear" ); 497 USC_RV_Declare( bool, DisableMcsMsaa, false, "", "Runs without MSAA compression" ); 498 USC_RV_Declare( dword, ShaderDebugHashCode , 0, "", "The driver will set a breakpoint in the first instruction of the shader which has the provided hash code. It works only when the value is different then 0 and SystemThreadEnable is set to TRUE." ); 499 USC_RV_Declare( dword, ShaderDebugExtra, 0, "", "Bits 0-5: flags for setting breakpoint in VS,HS,DS,GS,PS,CS. Bits 16-31 contain zero-based number of ISA instruction to set a breakpoint. Remained bits are unused."); 500 USC_RV_Declare( bool, ShaderDebugHashCodeInKernel, false, "", "" ); 501 USC_RV_Declare( bool, SystemThreadCacheFlushDisable, false, "", "" ); 502 USC_RV_Declare( dword, SystemThreadCacheFlushCountOverride , 0, "", "" ); 503 USC_RV_Declare( bool, PrintSimdMaskInLIR, false, "", "Prints the destination SIMD mask in the LIR dump" ); 504 USC_RV_Declare( bool, KillPixelHangWorkaroundOverrideEnable, false, "", "" ); 505 USC_RV_Declare( dword, KillPixelHangWorkaroundOverride, 0, "", "" ); 506 USC_RV_Declare( bool, SendsSupportEnable, false, "", "Enables Sends instruction support for Gen9+." ); 507 508 USC_RV_Declare( bool, SystemThreadEnable, false, "", "This key forces software to create a system thread. The system thread may still be created by software even if this control is set to false. The system thread is invoked if either the software requires exception handling or if kernel debugging is active and a breakpoint is hit." ); 509 USC_RV_Declare( bool, InstructionCompactionEnable, true, "", "Enables instruction compaction capability" ); 510 USC_RV_Declare( bool, SIMD32CompileOverride, false, "", "Overrides current SIMD32 settings with regkey settings for Pixel Shaders." ); 511 USC_RV_Declare( bool, SIMD32CompileEnable, true, "", "Enables/Disables SIMD32 Compile. If we compile SIMD32 we also need to compile SIMD16 Note: JIT compiler may use additional heuristics which will suppress SIMD32 kernels with this settings (for example SIMD32 kernels will not be generated if there is already SIMD16 kernel which hides IO latencies)." ); 512 USC_RV_Declare( bool, SIMD32CompileForce, false, "", "Forces SIMD32 compile, all JIT heuristics are bypassed. SIMD32 kernels will not be generated only if SIMD32AllowSpillFill flag is set to FALSE and SIMD32 kernel would require spill-fills." ); 513 USC_RV_Declare( bool, SIMD32AllowSpillFill, false, "", "Allow / disallow SIMD32 compilation with spill-fills" ); 514 USC_RV_Declare( bool, SIMD16CompileOverride, false, "", "Overrides current SIMD16 settings with regkey settings" ); 515 USC_RV_Declare( bool, SIMD16CompileEnable, true, "", "Enables/Disables SIMD16 Compile" ); 516 USC_RV_Declare( bool, SIMD16CompileForce, false, "", "Forces SIMD16 compile " ); 517 USC_RV_Declare( bool, SIMD8CompileOverride, false, "", "Overrides current SIMD8 settings with regkey settings" ); 518 USC_RV_Declare( bool, SIMD8CompileEnable, true, "", "Enables/Disables SIMD8 Compile" ); 519 USC_RV_Declare( bool, CSSIMD32CompileForce, false, "", "Forces SIMD32 compilation of compute shaders (may result in spill-fills)." ); 520 USC_RV_Declare( bool, CSSIMD16CompileForce, false, "", "Forces SIMD16 compilation of compute shaders (may result in spill-fills)." ); 521 USC_RV_Declare( bool, CSSIMD8CompileForce, false, "", "Forces SIMD8 compilation of compute shaders (may result in spill-fills)." ); 522 USC_RV_Declare( bool, HeaderBypassDisable, false, "", "" ); 523 USC_RV_Declare( bool, DisableOptimizeDependencies, false, "", "" ); 524 USC_RV_Declare( bool, DisableMergePatchConstantShaders, false, "", "Set to disable merging Patch Constant Hull Shaders" ); 525 USC_RV_Declare( bool, DisableInstanceUnroll, false, "", "Set to disable Hull Shader instance unrolling optimization" ); 526 USC_RV_Declare( bool, HSIndexedControlPointShaderEnable, true, "", "Enable/Disable Hull Shader pass-through Control Point phase to use indexing" ); 527 USC_RV_Declare( bool, HSUseSingleHardwareThreadEnable , true, "", "Enable/Disable Hull Shader single thread compile heuristic" ); 528 USC_RV_Declare( bool, ForceVSPullModel , false, "", "" ); 529 USC_RV_Declare( bool, ForceGSPullModel , false, "", "" ); 530 USC_RV_Declare( bool, ForceHSPullModel , false, "", "" ); 531 USC_RV_Declare( bool, ForceDSPullModel , false, "", "" ); 532 USC_RV_Declare( bool, ForceSampleUVtoZero, false, "", "" ); 533 USC_RV_Declare( bool, ForceSkipValueNumberingForSample, false, "", "" ); 534 USC_RV_Declare( bool, VSSIMD4x2CompileForce, false, "", "" ); 535 USC_RV_Declare( bool, HSSIMD4x2CompileForce, false, "", "" ); 536 USC_RV_Declare( bool, DSSIMD4x2CompileForce, false, "", "" ); 537 USC_RV_Declare( bool, GSSIMD4x2CompileForce, false, "", "" ); 538 USC_RV_Declare( bool, VSSIMD8CompileForce, false, "", "" ); 539 USC_RV_Declare( bool, HSSIMD8CompileForce, false, "", "" ); 540 USC_RV_Declare( bool, DSSIMD8CompileForce, false, "", "" ); 541 USC_RV_Declare( bool, DSSIMD8SPCompileForce, false, "", "" ); 542 USC_RV_Declare( bool, GSSIMD8CompileForce, false, "", "" ); 543 USC_RV_Declare( bool, VSSIMD8WithFullEpilogEnable, false, "", "Enabling this causes sending all parts of Vertex Header and position as paramter for DX9 from VS" ); 544 USC_RV_Declare( bool, HSSIMD8DualPatchModeCompileEnable, false, "", "" ); 545 USC_RV_Declare( bool, HSSIMD8EightPatchModeCompileEnable, false, "", "For Gen9+ this mean SIMD8 single- and dual-patch compilation instead of SIMD4x2" ); 546 USC_RV_Declare( bool, DSSIMD8SingleOrDualPatchModeCompileEnable, false, "", "For Gen9+ only, this mean only single-patch compilation" ); 547 USC_RV_Declare( dword, MaxHSPatchConstantShaders , 0, "", "Set the upper limit for the number of Patch Constant Hull Shaders" ); 548 USC_RV_Declare( dword, MaxSIMD16PixelShaderInstructionCount, 8192, "", "SIMD16 kernels will be disabled if their instruction count exceeds the default number" ); 549 USC_RV_Declare( dword, MaxSIMD32PixelShaderInstructionCount, 8192, "", "SIMD32 kernels will be disabled if their instruction count exceeds the default number" ); 550 USC_RV_Declare( dword, SIMD32CpiThreshold, 150, "", "(0 for VLV2) SIMD32 kernels will be disabled if SIMD16 CPI will be lower than number of threads per EU on given platform times this number/100" ); 551 USC_RV_Declare( dword, OCLSIMD32InstructionThreshold, 2048, "", "Compute Shader Compiler will attempt SIMD32 if the number of IL instructions is below this number. Currently used by OpenCL only." ); 552 USC_RV_Declare( dword, OCLSIMD32LIRThreshold, 65, "", "Compute Shader Compiler will attempt SIMD32 with any extra heuristic checks if the number of LIR instructions is below this number. Currently used by OpenCL only." ); 553 USC_RV_Declare( dword, OCLSIMD32TPMThreshold, 256, "", "Compute Shader Compiler will attempt SIMD32 if the TPM (thread private memory) used by the shader is less than or equal to this number." ); 554 USC_RV_Declare( dword, MaxSIMD16ComputeShaderInstructionCount, 8192, "", "" ); 555 USC_RV_Declare( dword, MaxSIMD32ComputeShaderInstructionCount , 4096, "", "" ); 556 USC_RV_Declare( dword, SamplerOffsetWorkaroundMinSampleCount, 4, "", "" ); 557 USC_RV_Declare( dword, L3WAMaxShortVSLength, 0xffff, "", "" ); 558 USC_RV_Declare( bool, DoLlvmOptimize, false, "", "" ); 559 USC_RV_Declare( bool, DisableGPGPUIndirectPayload, false, "", "" ); 560 USC_RV_Declare( bool, LowPrecisionOverride, false, "", " Overrides support for low precision values" ); 561 USC_RV_Declare( bool, LowPrecisionEnable, true, "", " Enables support for low precision values" ); 562 USC_RV_Declare( bool, SampleLdWithNativeZeroLodDisable, false, "", " Disables usage of native HW sample_lz, sample_c_lz_and ld_lz. Instead sample, sample_c and ld with LOD 0 are used." ); 563 USC_RV_Declare( bool, SIMDExpansionEnable, true, "", "When enabled simd expansion will be performed while compiling shader to higher simd (compile time optimization)" ); 564 USC_RV_Declare( bool, OCLSurfaceStateSpillFillEnable, false, "", "Set to enable OpenCL spill/fills to go to a surface instead of stateless memory." ); 565 USC_RV_Declare( dword, MaxInstructionsToFixPrecision, 2, "", " Maximum number of instructions that can have degraded performence due to precision change before compiler decides to insert converting MOV" ); 566 USC_RV_Declare( bool, ForceShortenURBDataLenght, false, "", "Forces shorten URBData lenght" ); 567 USC_RV_Declare( bool, DisableILReflectOpts, false, "", "Disable T-Rex Reflection Optimization"); 568 USC_RV_Declare( bool, DisableSIMD32DueEarlyEOTAfterDiscard, false, "","Disable SIMD32 Due Early EOT After Discard"); 569 USC_RV_Declare( bool, EnableResourceIndexAlwaysNonUniform, false, "", "D3d12 - Treat all indexing as they are maked non-uniform"); 570 USC_RV_Declare( bool, EnableRegSizeConsistencyCheck, true, "","Enables RegSizeConsistencyCheck"); 571 USC_RV_Declare( bool, EnableUntypedSrfRead, false, "", "Common optimization for all shaders. Use untyped surface read message to load scattered constant buffer."); 572 USC_RV_Declare( bool, DisableHSBarrierRead, false, "", "Removes pre-barrier URB read intended to force URB sync." ); 573 USC_RV_Declare( bool, ClearVHEnable, false, "", "Clear VH DW0..DW7 for VS,DS,GS." ); 574 USC_RV_Declare( bool, ForceSamplerPointer, false, "", "Forces sampler instructions to use sampler table pointer " ); 575 USC_RV_Declare( bool, ForceDoubleSamplerSlots, false, "", "Forces sampler instructions to use double spaced slots in sampler table access" ); 576 USC_RV_Declare( bool, URBPaddingSIMD8Disable, false, "", "Disables URB padding for shaders compiled in SIMD8 mode." ); 577 USC_RV_Declare( bool, ForceSendTGSMFence, false, "", "Send a memory fence for TGSM/SLM even if this it not required for the device." ); 578 USC_RV_Declare( bool, DisableRSPushConstants, false, "", "Control whether CBs for RC/RD/samplers are used for graphics stages. Must be kept in line with IGFX\\D3D_\\DisableRSPushConstants." ); 579 USC_RV_Declare( bool, DisableRSPushConstantsCompute, false, "", "Control whether CBs for RC/RD/samplers are used for compute stage. Must be kept in line with (as opposite to) IGFX\\D3D_\\UseRTLPushConstantsCompute." ); 580 USC_RV_Declare( bool, SWStencilPushConstantEnable, false, "", "Whether SW stencil should use push or pull constants" ); 581 USC_RV_Declare( bool, CallToSubroutineCallForceEnable, false, "", "Forces replacing simple CALL with SUBROUTINE_CALL" ); 582 USC_RV_Declare( dword, ForceCompilerInlineFunctionPolicy, 0, "", "Inling function policies: 0 - do not force, 1 - never, 2 - always, 3 - heuristic, 4 - when possible" ); 583 #undef USC_RV_SetGroup 584 585 #define USC_RV_SetGroup "USCWAOverrideControl" 586 USC_RV_USCWAOverrideControl( WaDisable_WIZUnit_ScratchSpace ); 587 USC_RV_USCWAOverrideControl( WaClampSamplerArrayIndex ); 588 USC_RV_USCWAOverrideControl( WaForcePushConstantEvenReadLength ); 589 USC_RV_USCWAOverrideControl( WaDisableHeaderBypassForPSDepthOutput ); 590 USC_RV_USCWAOverrideControl( WaForceHeaderForKillPixInstructions ); 591 USC_RV_USCWAOverrideControl( WaDecomposePowToLogMulExp ); 592 USC_RV_USCWAOverrideControl( WaDisableMadSrc0Replicate ); 593 USC_RV_USCWAOverrideControl( WaSamplerChannelDisables ); 594 USC_RV_USCWAOverrideControl( WaUAVTypedWriteOverlapping ); 595 USC_RV_USCWAOverrideControl( WaUAVTypedReadOverwritesAllDestChannels ); 596 USC_RV_USCWAOverrideControl( WaUseOnlySIMD8UntypedRead ); 597 USC_RV_USCWAOverrideControl( WaUVoffsetToZeroForLd2dms ); 598 USC_RV_USCWAOverrideControl( WaPerThreadScratchSpaceInGPGPUIncrease ); 599 USC_RV_USCWAOverrideControl( WaUseFDP3InsteadOfFDP2 ); 600 USC_RV_USCWAOverrideControl( WaApplyAbsToFrcInstruction ); 601 USC_RV_USCWAOverrideControl( WaForPlusInfRoundingModeFrcInstruction ); 602 USC_RV_USCWAOverrideControl( WaEmulateIBFEInstrucion ); 603 USC_RV_USCWAOverrideControl( WaShaderCalculateResourceOffsets ); 604 USC_RV_USCWAOverrideControl( WaUseThreadPayloadCompression ); 605 USC_RV_USCWAOverrideControl( WaUnlitCentroidInterpolation ); 606 USC_RV_USCWAOverrideControl( WaAddCallToEOTEnabled ); 607 USC_RV_USCWAOverrideControl( WaZeroUnusedSampleDGradientsParameters ); 608 USC_RV_USCWAOverrideControl( WaAlphaToOneOGL ); 609 USC_RV_USCWAOverrideControl( WaOGLGSVertexReordering ); 610 USC_RV_USCWAOverrideControl( WaOGLGSVertexReorderingTriStripAdjOnly ); 611 USC_RV_USCWAOverrideControl( WaXScaledFormatConversion ); 612 USC_RV_USCWAOverrideControl( WaCMPInstFlagDepClearedEarly ); 613 USC_RV_USCWAOverrideControl( WaScalarAtomic ); 614 USC_RV_USCWAOverrideControl( WaL3UseSamplerForLoadDualConstant ); 615 USC_RV_USCWAOverrideControl( WaL3UseSamplerForVectorLoadScatter ); 616 USC_RV_USCWAOverrideControl( Wa1DSurfaceSIMD4x2ArrayIndexInRAddress ); 617 USC_RV_USCWAOverrideControl( WaBreakSimd16TernaryInstructionsIntoSimd8 ); 618 USC_RV_USCWAOverrideControl( WaGSPullModelForPatchlistInputTopology ); 619 USC_RV_USCWAOverrideControl( WaGSSingleDispatchModeForTriangleInput ); 620 USC_RV_USCWAOverrideControl( WaForceSIMD8ForBFIInstruction ); 621 USC_RV_USCWAOverrideControl( WaBreakSimd16InstWhenAccIsUsedIntoSimd8 ); 622 USC_RV_USCWAOverrideControl( WaEnableDummyMovInGpgpuContextSave ); 623 USC_RV_USCWAOverrideControl( WaClearNotificationRegInGpgpuContextSave ); 624 USC_RV_USCWAOverrideControl( WaNotifRegSwapInGpGpuContextRestore ); 625 USC_RV_USCWAOverrideControl( WaStoreSlmOffsetInSRDuringGpGpuPreemption ); 626 USC_RV_USCWAOverrideControl( WaSampleGCToSampleLC ); 627 USC_RV_USCWAOverrideControl( WaCMPInstNullDstForcesThreadSwitch ); 628 USC_RV_USCWAOverrideControl( WaCMPInstNullDstBreaksR0Scoreboarding ); 629 USC_RV_USCWAOverrideControl( WaForceHeaderForDualSourceBlendHi ); 630 USC_RV_USCWAOverrideControl( WaForceHSPullModel ); 631 USC_RV_USCWAOverrideControl( WaInsertNopToHaltDestination ); 632 USC_RV_USCWAOverrideControl( WaForceTypeConvertF32To16ToAlign1 ); 633 USC_RV_USCWAOverrideControl( WaAdditionalMovWhenSrc1ModOnMulMach ); 634 USC_RV_USCWAOverrideControl( WaForceMulSrc1WordToAlign1 ); 635 USC_RV_USCWAOverrideControl( WaCallForcesThreadSwitch ); 636 USC_RV_USCWAOverrideControl( WaThreadSwitchAfterCall ); 637 USC_RV_USCWAOverrideControl( WANOPBeetweenIndirectAdressingAndBranch ); 638 USC_RV_USCWAOverrideControl( WaA32StatelessMessagesRequireHeader ); 639 USC_RV_USCWAOverrideControl( WaNoA32ByteScatteredStatelessMessages ); 640 USC_RV_USCWAOverrideControl( WaUrbAtomics ); 641 USC_RV_USCWAOverrideControl( WaBasicCompilationForDPInstructions ); 642 USC_RV_USCWAOverrideControl( WaHalfFloatSelNotAllowedWithSourceModifiers ); 643 USC_RV_USCWAOverrideControl( WaLowPrecWriteRTOnlyFloat ); 644 USC_RV_USCWAOverrideControl( WaBreakF32MixedModeIntoSimd8 ); 645 USC_RV_USCWAOverrideControl( WaDisableDSDualPatchMode ); 646 USC_RV_USCWAOverrideControl( WaDisallow64BitImmMov ); 647 USC_RV_USCWAOverrideControl( WaDisallowDFImmMovWithSimd8 ); 648 USC_RV_USCWAOverrideControl( WaDisableNoSrcDepSetBeforeEOTSend ); 649 USC_RV_USCWAOverrideControl( WaDstSubRegNumNotAllowedWithLowPrecPacked ); 650 USC_RV_USCWAOverrideControl( WaHeaderRequiredOnSimd16Sample16bit ); 651 USC_RV_USCWAOverrideControl( WaLodRequiredOnTypedMsaaUav ); 652 USC_RV_USCWAOverrideControl( AccWrEnNotAllowedToAcc1With16bit ); 653 USC_RV_USCWAOverrideControl( WaSendsSrc1Length0NotAllowed ); 654 USC_RV_USCWAOverrideControl( WaDisableEuBypassOnSimd16Float16 ); 655 USC_RV_USCWAOverrideControl( WaDisableEuBypassOnSimd16Float32 ); 656 USC_RV_USCWAOverrideControl( WaStructuredBufferAsRawBufferOverride ); 657 USC_RV_USCWAOverrideControl( WaSrc1ImmHfNotAllowed ); 658 USC_RV_USCWAOverrideControl( WaCselUnsupported ); 659 USC_RV_USCWAOverrideControl( WaDisableDSCaching ); 660 USC_RV_USCWAOverrideControl( WaEmitVtxWhenOutVtxCntIsZero ); 661 USC_RV_USCWAOverrideControl( WaFixCentroidInterpolationRTIR16X ); 662 USC_RV_USCWAOverrideControl( WaDisableIndirectDataForGPGPUWalker ); 663 USC_RV_USCWAOverrideControl( WaDisableIndirectDataAndFlushGPGPUWalker ); 664 USC_RV_USCWAOverrideControl( WaDisablePushConstantHSGS ); 665 USC_RV_USCWAOverrideControl( WaEnableAllWriteChannelMask ); 666 USC_RV_USCWAOverrideControl( WaGather4WithGreenChannelSelectOnR32G32Float ); 667 USC_RV_USCWAOverrideControl( WaPreventHSTessLevelsInterference ); 668 USC_RV_USCWAOverrideControl( WaAvoidDomainShaderCacheStall ); 669 USC_RV_USCWAOverrideControl( WaClearArfDependenciesBeforeEot ); 670 USC_RV_USCWAOverrideControl( WaDoNotPushConstantsForAllPulledGSTopologies ); 671 USC_RV_USCWAOverrideControl( WaDisableDbg0Register ); 672 USC_RV_USCWAOverrideControl( WaGrfDependecyClearInGpgpuContextRestore ); 673 USC_RV_USCWAOverrideControl( WaRestoreFCandMSGRegistersFromUpperOword ); 674 USC_RV_USCWAOverrideControl( WaRestoreFC4RegisterDW0fromDW1 ); 675 USC_RV_USCWAOverrideControl( WaRestoreFc0RegistersWithOffset ); 676 USC_RV_USCWAOverrideControl( WaGrfDepClearOnOutstandingSamplerInGpgpuContextSave ); 677 USC_RV_USCWAOverrideControl( WaStoreAcc2to9InAlign16InGpgpuContextSave ); 678 USC_RV_USCWAOverrideControl( WaGrfScoreboardClearInGpgpuContextSave ); 679 USC_RV_USCWAOverrideControl( WaClearFlowControlGpgpuContextSave ); 680 USC_RV_USCWAOverrideControl( WaClearCr0SpfInGpgpuContextRestore ); 681 USC_RV_USCWAOverrideControl( WaSendsSrc1SizeLimitWhenEOT ); 682 USC_RV_USCWAOverrideControl( WaDisableMixedModeLog ); 683 USC_RV_USCWAOverrideControl( WaDisableMixedModePow ); 684 USC_RV_USCWAOverrideControl( WaDisableMixedModeFdiv ); 685 USC_RV_USCWAOverrideControl( WaFloatMixedModeSelNotAllowedWithPackedDestination ); 686 USC_RV_USCWAOverrideControl( WaDisableNativeDWxDWMultiplication ); 687 USC_RV_USCWAOverrideControl( WaForceMinMaxGSThreadCount ); 688 USC_RV_USCWAOverrideControl( WaIntegerDivisionSourceModifierNotSupported ); 689 USC_RV_USCWAOverrideControl( WaDisableLowPrecisionWriteRTRepData ); 690 USC_RV_USCWAOverrideControl( WADisableWriteCommitForPageFault ); 691 USC_RV_USCWAOverrideControl( WaDisableDeepLoopsUnrolling ); 692 #undef USC_RV_SetGroup 693 694 //NOTE: no default values in first step of this implementation. 695 #define USC_RV_SetGroup "ShaderCompilerControls" 696 USC_RV_DeclareCompilerControl( bool, IndirectTemporaryRemovalEnable, false, "", "" ); 697 USC_RV_DeclareCompilerControl( bool, CallCndTranslationEnable, false, "", "" ); 698 USC_RV_DeclareCompilerControl( bool, LoopUnrollingEnable, false, "", "" ); 699 USC_RV_DeclareCompilerControl( bool, ILPatternMatchingEnable, false, "", "" ); 700 USC_RV_DeclareCompilerControl( bool, ConditionalExpressionSimplificationEnable, false, "", "" ); 701 USC_RV_DeclareCompilerControl( bool, TrivialSwitchRemovalEnable, false, "", "" ); 702 USC_RV_DeclareCompilerControl( bool, TrivialIfRemovalEnable, false, "", "" ); 703 USC_RV_DeclareCompilerControl( bool, EarlyEOTAfterDiscardEnable, false, "", "" ); 704 USC_RV_DeclareCompilerControl( bool, SwitchTranslationEnable, false, "", "" ); 705 USC_RV_DeclareCompilerControl( bool, EarlyReturnRemovalEnable, false, "", "" ); 706 USC_RV_DeclareCompilerControl( bool, InlineSubstitutionEnable, false, "", "" ); 707 USC_RV_DeclareCompilerControl( bool, CallToSubroutineCallEnable, false, "", "" ); 708 USC_RV_DeclareCompilerControl( bool, ConstantBufferToConstantRegisterEnable, false, "", "" ); 709 USC_RV_DeclareCompilerControl( bool, ConstantBufferToConstantRegisterLDRAWEnable, false, "", "" ); 710 USC_RV_DeclareCompilerControl( bool, ParseOpcodesToPrecModifierEnable, true, "", "" ); 711 USC_RV_DeclareCompilerControl( bool, IndexedTempGRFCachingEnable, false, "", "" ); 712 USC_RV_DeclareCompilerControl( bool, ILConstantFoldingEnable, false, "", "" ); 713 USC_RV_DeclareCompilerControl( bool, ILConstantFoldingAggressive, false, "", "" ); 714 USC_RV_DeclareCompilerControl( bool, PrintfExpansionEnable, false, "", "" ); 715 USC_RV_DeclareCompilerControl( bool, TranslateVendorExtensionsEnable, false, "", "" ); 716 USC_RV_DeclareCompilerControl( bool, RemoveDeadOutputEnable, false, "", "" ); 717 USC_RV_DeclareCompilerControl( dword, MaxLoopUnrollLength, 0, "", "" ); 718 USC_RV_DeclareCompilerControl( dword, MaxConstantBufferPairs, 0, "", "" ); 719 USC_RV_DeclareCompilerControl( dword, PartialUnrollFactor, 0, "", "" ); 720 USC_RV_DeclareCompilerControl( bool, ProcessDynamicResourceIndexingEnable, true, "", "" ); 721 USC_RV_DeclareCompilerControl( dword, IfConversionLength, 0, "", "" ); 722 #undef USC_RV_SetGroup 723 724 #define USC_RV_SetGroup "SShaderPatternMatchControls" 725 USC_RV_DeclareCompilerControl( bool, FMulFAddToFMad, false, "", "" ); 726 USC_RV_DeclareCompilerControl( bool, MovFCmpBranchToMovFCmp, false, "", "" ); 727 USC_RV_DeclareCompilerControl( bool, MovCndToMov, false, "", "" ); 728 USC_RV_DeclareCompilerControl( bool, LDStructuredScalarToVector, false, "", "" ); 729 USC_RV_DeclareCompilerControl( bool, FLogFExp2ScalarToVector, false, "", "" ); 730 USC_RV_DeclareCompilerControl( bool, MovFCmpToFMax, false, "", "" ); 731 USC_RV_DeclareCompilerControl( bool, FCmpGtToFMaxOrFCmpLtToFMin, false, "", "" ); 732 USC_RV_DeclareCompilerControl( bool, PreserveFunctionRetMovs, false, "", "" ); 733 USC_RV_DeclareCompilerControl( bool, IfDiscardToDiscardCND, false, "", "" ); 734 USC_RV_DeclareCompilerControl( bool, IfBranchFlattening, false, "", "" ); 735 USC_RV_DeclareCompilerControl( bool, ContinueCndRemoval, false, "", "" ); 736 USC_RV_DeclareCompilerControl( bool, LDRawPtrToIndexedCB, false, "", "" ); 737 #undef USC_RV_SetGroup 738 739 #define USC_RV_SetGroup "KernelCompilerControls" 740 USC_RV_DeclareCompilerControl( bool, ValueNumberingEnable, false, "", "" ); 741 USC_RV_DeclareCompilerControl( bool, BlockLoadDirectConstantsEnable, false, "", "" ); 742 USC_RV_DeclareCompilerControl( bool, BlockLoadIndirectConstantsEnable, false, "", "" ); 743 USC_RV_DeclareCompilerControl( bool, BlockLoadScatteredConstantsEnable, false, "", "" ); 744 USC_RV_DeclareCompilerControl( bool, OptimizeReplicateEnable, false, "", "" ); 745 USC_RV_DeclareCompilerControl( bool, Optimize64bitReplicateEnable, false, "", "" ); 746 USC_RV_DeclareCompilerControl( bool, ReorderInstructionsEnable, false, "", "" ); 747 USC_RV_DeclareCompilerControl( bool, ClusterSamplesEnable, false, "", "" ); 748 USC_RV_DeclareCompilerControl( bool, DeferredInterpolationEnable, false, "", "" ); 749 USC_RV_DeclareCompilerControl( bool, AtomicReorderInstructionsEnable, false, "", "" ); 750 USC_RV_DeclareCompilerControl( bool, CoalescingEnable, false, "", "" ); 751 USC_RV_DeclareCompilerControl( bool, CoalesceCopiesEnable, false, "", "" ); 752 USC_RV_DeclareCompilerControl( bool, CoalesceBitcastsEnable, false, "", "" ); 753 USC_RV_DeclareCompilerControl( bool, CoalesceSplitsEnable, false, "", "" ); 754 USC_RV_DeclareCompilerControl( bool, CoalesceJoinsEnable, false, "", "" ); 755 USC_RV_DeclareCompilerControl( bool, CoalesceMultiplePayloadsEnable, false, "", "" ); 756 USC_RV_DeclareCompilerControl( bool, CoalesceHeadersLastEnable, false, "", "" ); 757 USC_RV_DeclareCompilerControl( bool, ImmediatesToConstantBufferEnable, false, "", "" ); 758 USC_RV_DeclareCompilerControl( dword, IndirectCBOptimizationMode, 0, "", "" ); 759 USC_RV_DeclareCompilerControl( dword, ImmediatesToConstantBufferMinImmediates, 5, "", "" ); 760 USC_RV_DeclareCompilerControl( dword, MaxNumOfMulInstructionsPerPowUnwind, 3, "", "" ); 761 USC_RV_DeclareCompilerControl( dword, MulWeightOfSqrtInstructionInPowUnwind, 2, "", "" ); 762 USC_RV_DeclareCompilerControl( dword, MulWeightOfInvInstructionInPowUnwind, 2, "", "" ); 763 USC_RV_DeclareCompilerControl( bool, OptimizeResourceLoadsEnable, false, "", "" ); 764 USC_RV_DeclareCompilerControl( bool, ISASchedulingEnable, false, "", "" ); 765 USC_RV_DeclareCompilerControl( bool, Reduce64To32ALUBitEnable, false, "", "" ); 766 USC_RV_DeclareCompilerControl( bool, Reduce32To8ALUBitEnable, false, "", "" ); 767 USC_RV_DeclareCompilerControl( bool, Reduce64To32ALUTopDownPassBitEnable, false, "", "" ); 768 USC_RV_DeclareCompilerControl( bool, Reduce64To32ALUBottomUpPassBitEnable, false, "", "" ); 769 USC_RV_DeclareCompilerControl( bool, Reduce64To32ALUSplitPassBitEnable, false, "", "" ); 770 USC_RV_DeclareCompilerControl( bool, MergeSplitJoinDpEnable, false, "", "" ); 771 USC_RV_DeclareCompilerControl( bool, FoldUnpacksEnable, false, "", "" ); 772 USC_RV_DeclareCompilerControl( bool, ConstantFoldingEnable, false, "", "" ); 773 USC_RV_DeclareCompilerControl( bool, LoopInvariantCodeMotionEnable, false, "", "" ); 774 USC_RV_DeclareCompilerControl( bool, InputMarkingEnable, false, "", "" ); 775 USC_RV_DeclareCompilerControl( bool, DispatchDetectionEnable, false, "", "" ); 776 USC_RV_DeclareCompilerControl( bool, SimdReductionEnable, false, "", "" ); 777 USC_RV_DeclareCompilerControl( bool, LocallyScalarSimdReductionEnable, false, "", "" ); 778 USC_RV_DeclareCompilerControl( bool, CPLoadBufferOptimizationEnable, false, "", "" ); 779 USC_RV_DeclareCompilerControl( bool, RoundRobinRegisterAllocationEnable, false, "", "" ); 780 USC_RV_DeclareCompilerControl( bool, PatternMatchReplaceEnable, false, "", "" ); 781 USC_RV_DeclareCompilerControl( bool, EuBypassEnable, false, "", "" ); 782 USC_RV_DeclareCompilerControl( bool, GRFBankAlignmentEnable, false, "", "" ); 783 USC_RV_DeclareCompilerControl( bool, OptimizeValuesNamespaceEnable, false, "", "" ); 784 USC_RV_DeclareCompilerControl( bool, UrbAtomicsEnable, false, "", "" ); 785 USC_RV_DeclareCompilerControl( bool, ScalarAtomicEnable, false, "", "" ); 786 USC_RV_DeclareCompilerControl( bool, ComputeToAccumulatorEnable, false, "", "" ); 787 USC_RV_DeclareCompilerControl( bool, OptimizeSimd8MovsEnable, false, "", "" ); 788 USC_RV_DeclareCompilerControl( bool, AlignedPointerDetectionEnable, false, "", "" ); 789 USC_RV_DeclareCompilerControl( bool, BlockLoadGloballyScalarPointerEnable, false, "", "" ); 790 USC_RV_DeclareCompilerControl( bool, ChannelPropagationEnable, false, "", "" ); 791 USC_RV_DeclareCompilerControl( bool, CoalesceLdThreadEnable, false, "", "" ); 792 USC_RV_DeclareCompilerControl( bool, CoalesceLdCrossLaneEnable, false, "", "" ); 793 USC_RV_DeclareCompilerControl( bool, CoalesceLdEnable, false, "", "" ); 794 USC_RV_DeclareCompilerControl( bool, CoalesceStoreEnable, false, "", "" ); 795 USC_RV_DeclareCompilerControl( bool, CutNonspillableLiveRangesEnable, false, "", "" ); 796 USC_RV_DeclareCompilerControl( bool, DecreaseGRFPressureIfSpilledEnable, false, "", "" ); 797 USC_RV_DeclareCompilerControl( bool, CodeSinkingEnable, false, "", "" ); 798 USC_RV_DeclareCompilerControl( bool, MovPropagationEnable, false, "", "" ); 799 USC_RV_DeclareCompilerControl( bool, CondModPropagationEnable, false, "", "" ); 800 USC_RV_DeclareCompilerControl( bool, RematerializationEnable, false, "", "" ); 801 USC_RV_DeclareCompilerControl( bool, RegionPreSchedulingEnable, false, "", "" ); 802 USC_RV_DeclareCompilerControl( bool, PruningEnable, false, "", "" ); 803 USC_RV_DeclareCompilerControl( bool, DeadBranchRemovalEnable, false, "", "" ); 804 USC_RV_DeclareCompilerControl( bool, NoSrcDepSetEnable, false, "", "" ); 805 USC_RV_DeclareCompilerControl( bool, ShaderHWInputPackingEnable, false, "", "" ); 806 USC_RV_DeclareCompilerControl( bool, ShaderDeclarationPackingEnable, false, "", "" ); 807 USC_RV_DeclareCompilerControl( bool, GotoJoinOptEnable, false, "", "" ); 808 USC_RV_DeclareCompilerControl( bool, GotoAroundGotoMergeEnable, false, "", "" ); 809 USC_RV_DeclareCompilerControl( bool, StatefulCompilationEnable, false, "", "" ); 810 USC_RV_DeclareCompilerControl( bool, AtomicDstRemovalEnable, false, "", "" ); 811 USC_RV_DeclareCompilerControl( bool, MergeSimd8SamplerCBLoadsToSimd16Enable, false, "", "" ); 812 USC_RV_DeclareCompilerControl( bool, SoftwareFp16PayloadEnable, false, "", ""); 813 USC_RV_DeclareCompilerControl( bool, SplitQuadTo32bitForALUEnable, false, "", "" ); 814 USC_RV_DeclareCompilerControl( bool, SIMD32DivergentLoopHeuristicEnable, false, "", "" ); 815 USC_RV_DeclareCompilerControl( bool, SIMD32SampleCountHeuristicEnable, false, "", "" ); 816 USC_RV_DeclareCompilerControl( bool, SIMD32ConcurrentValuesHeuristicEnable,false, "", "" ); 817 USC_RV_DeclareCompilerControl( bool, SIMD32ExtraHeuristicsEnable, false, "", "" ); 818 819 USC_RV_DeclareCompilerControl( bool, PMRChannelMatchEnable, false, "", "" ); 820 USC_RV_DeclareCompilerControl( bool, PMRPowerMatchEnable, false, "", "" ); 821 USC_RV_DeclareCompilerControl( bool, PMREUBypassMatchEnable, false, "", "" ); 822 USC_RV_DeclareCompilerControl( bool, PMRComparisonMatchEnable, false, "", "" ); 823 USC_RV_DeclareCompilerControl( bool, PMRFlowControlMatchEnable, false, "", "" ); 824 USC_RV_DeclareCompilerControl( bool, PMRMultiplyMatchEnable, false, "", "" ); 825 USC_RV_DeclareCompilerControl( bool, PMRMulMadMatchEnable, false, "", "" ); 826 USC_RV_DeclareCompilerControl( bool, PMRSqrtMatchEnable, false, "", "" ); 827 USC_RV_DeclareCompilerControl( bool, PMRFDivMatchEnable, false, "", "" ); 828 USC_RV_DeclareCompilerControl( bool, PMRSelectMatchEnable, false, "", "" ); 829 USC_RV_DeclareCompilerControl( bool, PMRMinMaxMatchEnable, false, "", "" ); 830 USC_RV_DeclareCompilerControl( bool, PMRMulDivMatchEnable, false, "", "" ); 831 USC_RV_DeclareCompilerControl( bool, PMRFDP3MatchEnable, false, "", "" ); 832 USC_RV_DeclareCompilerControl( bool, PMRFDP4ToHMatchEnable, false, "", "" ); 833 USC_RV_DeclareCompilerControl( bool, PMRMov0FDPMatchEnable, false, "", "" ); 834 USC_RV_DeclareCompilerControl( bool, PMRMadMatchEnable, false, "", "" ); 835 USC_RV_DeclareCompilerControl( bool, PMRBfeMatchEnable, false, "", "" ); 836 USC_RV_DeclareCompilerControl( bool, PMRLrpMatchEnable, false, "", "" ); 837 USC_RV_DeclareCompilerControl( bool, PMRTrivialLrpMatchEnable, false, "", "" ); 838 USC_RV_DeclareCompilerControl( bool, PMRMovLrpToAddMadMatchEnable, false, "", "" ); 839 USC_RV_DeclareCompilerControl( bool, PMRBfiMatchEnable, false, "", "" ); 840 USC_RV_DeclareCompilerControl( bool, PMRShrShlMatchEnable, false, "", "" ); 841 USC_RV_DeclareCompilerControl( bool, PMRAddShlMatchEnable, false, "", "" ); 842 USC_RV_DeclareCompilerControl( bool, PMRAddAddMatchEnable, false, "", "" ); 843 USC_RV_DeclareCompilerControl( bool, PMRAndShiftMatchEnable, false, "", "" ); 844 USC_RV_DeclareCompilerControl( bool, PMRJOIN_DPMatchEnable, false, "", "" ); 845 USC_RV_DeclareCompilerControl( bool, PMRConvert64bitTo32bit, false, "", "" ); 846 USC_RV_DeclareCompilerControl( bool, PMRGetValueFromActiveChannelMatchEnable, false, "", "" ); 847 USC_RV_DeclareCompilerControl( bool, PMRCselMatchEnable, false, "", "" ); 848 USC_RV_DeclareCompilerControl( bool, PMRReplicateComponentMatchEnable, false, "", "" ); 849 USC_RV_DeclareCompilerControl( bool, PMRFDPHMatchEnable, false, "", "" ); 850 USC_RV_DeclareCompilerControl( bool, PMRPackMatchEnable, false, "", "" ); 851 USC_RV_DeclareCompilerControl( bool, PMRFFRCMatchEnable, false, "", "" ); 852 USC_RV_DeclareCompilerControl( bool, PMRConstantPropagationMatchEnable, true, "", "Enables Constant Propagation" ); 853 USC_RV_DeclareCompilerControl( bool, PMRTrivialPOWMatchEnable, false, "", "" ); 854 USC_RV_DeclareCompilerControl( bool, PMRMulAddToMulMatchEnable, false, "", "" ); 855 USC_RV_DeclareCompilerControl( bool, PMRVecImmScalarMatchEnable, false, "", "" ); 856 USC_RV_DeclareCompilerControl( bool, PMRMovTwoLowPrecImmEnable, false, "", "" ); 857 USC_RV_DeclareCompilerControl( bool, PMRIntConvertToBitcastEnable, false, "", "" ); 858 USC_RV_DeclareCompilerControl( bool, PMRHoistBitcastsEnable, false, "", "" ); 859 USC_RV_DeclareCompilerControl( bool, PMRMediaBlockReadPackMatchEnable, false, "", "" ); 860 USC_RV_DeclareCompilerControl( bool, PMRAverageMatchEnable, false, "", "" ); 861 USC_RV_DeclareCompilerControl( bool, PMRPropIntConvMatchEnable, false, "", "" ); 862 USC_RV_DeclareCompilerControl( bool, PMRConvToMovMatchEnable, false, "", "" ); 863 USC_RV_DeclareCompilerControl( bool, PMRPropagateRedundantPackEnable, false, "", "" ); 864 USC_RV_DeclareCompilerControl( bool, PMRHoistSaturateEnable, false, "", "" ); 865 USC_RV_DeclareCompilerControl( bool, PMRMergeWordByteUnpacksEnable, false, "", "" ); 866 USC_RV_DeclareCompilerControl( bool, PMRMergeWordUnpacksEnable, false, "", "" ); 867 USC_RV_DeclareCompilerControl( bool, PMRPropLowPrecEnable, false, "", "" ); 868 USC_RV_DeclareCompilerControl( bool, DecomposeFDivToFRcpFMul, false, "", "" ); 869 870 #undef USC_RV_SetGroup 871 872 }; 873 const unsigned int NUM_REGISTRY_VARIABLES = sizeof(SUSCRegistryVariables) / sizeof(SRegistryEntry); 874 875 } //namespace USC 876 877 /*****************************************************************************\ 878 DEFINE: GHAL3D_OUTPUT_DIRECTORY and USC_ISA_INJECTION_DIRECTORY 879 \*****************************************************************************/ 880 #if defined(_WIN32) 881 #define GHAL3D_OUTPUT_DIRECTORY "\\Intel\\USC\\" 882 #elif defined(ANDROID) 883 #define GHAL3D_OUTPUT_DIRECTORY "/sdcard/IntelUSC/" 884 #define USC_ISA_INJECTION_DIRECTORY "/sdcard/IntelUSC/IsaInjection/" 885 #else 886 #define GHAL3D_OUTPUT_DIRECTORY "/tmp/IntelUSC/" 887 #define USC_ISA_INJECTION_DIRECTORY "/tmp/IntelUSC/IsaInjection/" 888 #endif 889