@@ -148,6 +148,7 @@ static void adjustPlatform(const IGC::CPlatform &IGCPlatform,
148
148
auto &PlatformInfo = IGCPlatform.getPlatformInfo ();
149
149
unsigned RevId = PlatformInfo.usRevId ;
150
150
Opts.CPUStr = cmc::getPlatformStr (PlatformInfo, /* inout */ RevId);
151
+ Opts.RevId = RevId;
151
152
Opts.WATable = std::make_unique<WA_TABLE>(IGCPlatform.getWATable ());
152
153
}
153
154
@@ -381,6 +382,26 @@ static llvm::Optional<vc::ExternalData> fillExternalData() {
381
382
return std::move (ExtData);
382
383
}
383
384
385
+ static void dumpPlatform (const vc::CompileOptions &Opts, PLATFORM Platform,
386
+ vc::ShaderDumper &Dumper) {
387
+ #if defined(_DEBUG) || defined(_INTERNAL)
388
+ if (!IGC_IS_FLAG_ENABLED (ShaderDumpEnable))
389
+ return ;
390
+
391
+ std::ostringstream Os;
392
+ auto Core = Platform.eDisplayCoreFamily ;
393
+ auto RenderCore = Platform.eRenderCoreFamily ;
394
+ auto Product = Platform.eProductFamily ;
395
+ auto RevId = Platform.usRevId ;
396
+
397
+ Os << " NEO passed: DisplayCore = " << Core << " , RenderCore = " << RenderCore
398
+ << " , Product = " << Product << " , Revision = " << RevId << " \n " ;
399
+ Os << " IGC translated into: " << Opts.CPUStr << " , " << Opts.RevId << " \n " ;
400
+
401
+ Dumper.dumpText (Os.str (), " platform.be.txt" );
402
+ #endif
403
+ }
404
+
384
405
std::error_code vc::translateBuild (const TC::STB_TranslateInputArgs *InputArgs,
385
406
TC::STB_TranslateOutputArgs *OutputArgs,
386
407
TC::TB_DATA_FORMAT InputDataFormatTemp,
@@ -418,7 +439,11 @@ std::error_code vc::translateBuild(const TC::STB_TranslateInputArgs *InputArgs,
418
439
BuildDiag Diag;
419
440
vc::CompileOptions &Opts = ExpOptions.get ();
420
441
adjustOptions (IGCPlatform, InputDataFormatTemp, Opts, Diag);
421
-
442
+
443
+ // here we have Opts set and can dump what we got from runtime and how
444
+ // we understood it
445
+ dumpPlatform (Opts, IGCPlatform.getPlatformInfo (), *Dumper);
446
+
422
447
if (IGC_IS_FLAG_ENABLED (ShaderOverride))
423
448
Opts.ShaderOverrider =
424
449
vc::createVC_IGCShaderOverrider (Hash, IGCPlatform.getPlatformInfo ());
0 commit comments