static void DefaultOnGUI_UnitToolbar( Object asset, ShaderBuildReport r, ShaderBuildReport.GPUProgram po, ShaderBuildReport.CompileUnit cu, ShaderBuildReport.PerformanceUnit pu, ShaderBuildReport.ProgramPerformanceMetrics p, ShaderBuildReport reference, string assetGUID) { }
static void SendMeasure(ShaderBuildReport.PerformanceUnit unit) { var sg = GetReportSampleGroups(unit); Measure.Custom(sg.sgprCount, unit.parsedReport.SGPRCount); Measure.Custom(sg.sgprUsedCount, unit.parsedReport.SGPRUsedCount); Measure.Custom(sg.sgprUserCount, unit.parsedReport.UserSGPRCount); Measure.Custom(sg.vgprCount, unit.parsedReport.VGPRCount); Measure.Custom(sg.vgprUsedCount, unit.parsedReport.VGPRUsedCount); Measure.Custom(sg.microCodeSize, unit.parsedReport.microCodeSize); Measure.Custom(sg.threadGroupWaves, unit.parsedReport.threadGroupWaves); Measure.Custom(sg.CUOccupancyCount, unit.parsedReport.CUOccupancyCount); Measure.Custom(sg.CUOccupancyMax, unit.parsedReport.CUOccupancyMax); Measure.Custom(sg.LDSSize, unit.parsedReport.LDSSize); Measure.Custom(sg.SIMDOccupancyCount, unit.parsedReport.SIMDOccupancyCount); Measure.Custom(sg.SIMDOccupancyMax, unit.parsedReport.SIMDOccupancyMax); }
) GetReportSampleGroups(ShaderBuildReport.PerformanceUnit unit) { var name = string.Join(";", unit.compileUnit.defines); var fullName = $"{unit.program.name}:{name}"; return( new SampleGroup(PerformanceTestUtils.FormatSampleGroupName("VGPR_Count", "GPU", fullName), SampleUnit.Undefined), new SampleGroup(PerformanceTestUtils.FormatSampleGroupName("VGPR_Used_Count", "GPU", fullName), SampleUnit.Undefined), new SampleGroup(PerformanceTestUtils.FormatSampleGroupName("SGPR_Count", "GPU", fullName), SampleUnit.Undefined), new SampleGroup(PerformanceTestUtils.FormatSampleGroupName("SGPR_Used_Count", "GPU", fullName), SampleUnit.Undefined), new SampleGroup(PerformanceTestUtils.FormatSampleGroupName("SGPR_User_Count", "GPU", fullName), SampleUnit.Undefined), new SampleGroup(PerformanceTestUtils.FormatSampleGroupName("MicroCode_Size", "GPU", fullName), SampleUnit.Undefined), new SampleGroup(PerformanceTestUtils.FormatSampleGroupName("ThreadGroup_Waves", "GPU", fullName), SampleUnit.Undefined), new SampleGroup(PerformanceTestUtils.FormatSampleGroupName("CU_Occupancy_Count", "GPU", fullName), SampleUnit.Undefined), new SampleGroup(PerformanceTestUtils.FormatSampleGroupName("CU_Occupancy_Max", "GPU", fullName), SampleUnit.Undefined), new SampleGroup(PerformanceTestUtils.FormatSampleGroupName("LDS_Size", "GPU", fullName), SampleUnit.Undefined), new SampleGroup(PerformanceTestUtils.FormatSampleGroupName("SIMD_Occupancy_Count", "GPU", fullName), SampleUnit.Undefined), new SampleGroup(PerformanceTestUtils.FormatSampleGroupName("SIMD_Occupancy_Max", "GPU", fullName), SampleUnit.Undefined) ); }