-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent AMDMTLBronzeDriver unrecognized selector errors
- Loading branch information
Eduardo Covas
authored
Mar 30, 2024
1 parent
e6d193b
commit 050dd3f
Showing
10 changed files
with
3,692 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
...-Binaries/12.5-23/System/Library/Extensions/AMDMTLBronzeDriver.bundle/Contents/Info.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>BuildMachineOSBuild</key> | ||
<string>20A241133</string> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>AMDMTLBronzeDriver</string> | ||
<key>CFBundleGetInfoString</key> | ||
<string>AMDMTLBronzeDriver 4.8.101 24119</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.apple.AMDMTLBronzeDriver</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>AMD Bronze Metal Driver</string> | ||
<key>CFBundlePackageType</key> | ||
<string>BNDL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>4.8.101</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleSupportedPlatforms</key> | ||
<array> | ||
<string>MacOSX</string> | ||
</array> | ||
<key>CFBundleVersion</key> | ||
<string>4.0.8</string> | ||
<key>DTCompiler</key> | ||
<string>com.apple.compilers.llvm.clang.1_0</string> | ||
<key>DTPlatformBuild</key> | ||
<string>21G71</string> | ||
<key>DTPlatformName</key> | ||
<string>macosx</string> | ||
<key>DTPlatformVersion</key> | ||
<string>12.5</string> | ||
<key>DTSDKBuild</key> | ||
<string>21G71</string> | ||
<key>DTSDKName</key> | ||
<string>macosx12.5.internal</string> | ||
<key>DTXcode</key> | ||
<string>1330</string> | ||
<key>DTXcodeBuild</key> | ||
<string>13E6049a</string> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>12.5</string> | ||
<key>NSPrincipalClass</key> | ||
<string>BronzeMtlDevice</string> | ||
</dict> | ||
</plist> |
Binary file added
BIN
+68.2 KB
...-23/System/Library/Extensions/AMDMTLBronzeDriver.bundle/Contents/MacOS/AMDMTLBronzeDriver
Binary file not shown.
Binary file added
BIN
+3.9 MB
...m/Library/Extensions/AMDMTLBronzeDriver.bundle/Contents/MacOS/AMDMTLBronzeDriverOld.dylib
Binary file not shown.
1 change: 1 addition & 0 deletions
1
...sal-Binaries/12.5-23/System/Library/Extensions/AMDMTLBronzeDriver.bundle/Contents/PkgInfo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
BNDL???? |
135 changes: 135 additions & 0 deletions
135
...rary/Extensions/AMDMTLBronzeDriver.bundle/Contents/Resources/BronzeStatistics-analysis.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
var MemBandWidth = MemClkFreq / 100000 * MemBusWidth / 8 * 4; // GB/s | ||
var MaxPixelRate = NumROP * 4; // Pixels/EngineClk | ||
|
||
var waSEVERITY_HIGH = 2; | ||
var waSEVERITY_MEDIUM = 1; | ||
var waSEVERITY_LOW = 0; | ||
|
||
function analysis_TextureSamplingInst_bound() | ||
{ | ||
var ALUActiveThreshold = 20; | ||
var MemoryStallThreshold = 40; | ||
var ShaderCostThreshold = 70; | ||
var TextureUnitBusyThreshold = 60; | ||
var SamplerBusyThreshold = 60; | ||
|
||
var specificShaderStall = false; | ||
if ((ShaderCoreALUActive < ALUActiveThreshold) && (MemoryStallPerWavefrontCompute > MemoryStallThreshold) && (MTLStatComputeCost > ShaderCostThreshold) && (SamplerBusy > SamplerBusyThreshold)) | ||
{ | ||
specificShaderStall = true; | ||
var problemId = ReportProblem(0.3, "Compute shader is texture sampling bound", waSEVERITY_HIGH); | ||
AddProblemSubItem(problemId, "The compute shader has a Low ALU to Memory instruction ratio and a high rate of sampling instruction stalls") | ||
AddProblemSubItem(problemId, "Optimize texture sampling instructions in the compute shader, or increase the ALU workload to take advantage of stalled cycles", "ComputeShader") | ||
} | ||
if ((ShaderCoreALUActive < ALUActiveThreshold) && (MemoryStallPerWavefrontVertex > MemoryStallThreshold) && (MTLStatVertexCost > ShaderCostThreshold) && (SamplerBusy > SamplerBusyThreshold)) | ||
{ | ||
specificShaderStall = true; | ||
var problemId = ReportProblem(0.3, "Vertex shader is texture sampling bound", waSEVERITY_HIGH); | ||
AddProblemSubItem(problemId, "The vertex shader has a Low ALU to Memory instruction ratio and a high rate of sampling instruction stalls") | ||
AddProblemSubItem(problemId, "Optimize texture sampling instructions in the vertex shader, or increase the ALU workload to take advantage of stalled cycles", "VertexShader") | ||
} | ||
if ((ShaderCoreALUActive < ALUActiveThreshold) && (MemoryStallPerWavefrontFragment > MemoryStallThreshold) && (MTLStatFragmentCost > ShaderCostThreshold) && (SamplerBusy > SamplerBusyThreshold)) | ||
{ | ||
specificShaderStall = true; | ||
var problemId = ReportProblem(0.3, "Fragment shader is texture sampling bound", waSEVERITY_HIGH); | ||
AddProblemSubItem(problemId, "The fragment shader has a Low ALU to Memory instruction ratio and a high rate of sampling instruction stalls") | ||
AddProblemSubItem(problemId, "Optimize texture sampling instructions in the fragment shader, or increase the ALU workload to take advantage of stalled cycles", "FragmentShader") | ||
} | ||
|
||
if (specificShaderStall == false && (ShaderCoreALUActive < ALUActiveThreshold) && (MemoryStallPerWavefront > MemoryStallThreshold) && (MTLStatShaderCost > ShaderCostThreshold) && (SamplerBusy > SamplerBusyThreshold)) | ||
{ | ||
var problemId = ReportProblem(0.3, "Shading is texture sampling bound", waSEVERITY_HIGH); | ||
AddProblemSubItem(problemId, "The shaders have a Low ALU to Memory instruction ratio and a high rate of sampling instruction stalls") | ||
AddProblemSubItem(problemId, "Optimize texture sampling instructions in the shaders, or increase the ALU workload to take advantage of stalled cycles", "BoundResources") | ||
} | ||
|
||
} | ||
|
||
function analysis_shaderALU_bound() | ||
{ | ||
var ALUActiveThreshold = 75; | ||
var ShaderCostThreshold = 70; | ||
|
||
if ((ShaderCoreALUActive > ALUActiveThreshold) && (MTLStatVertexCost > ShaderCostThreshold)) | ||
{ | ||
var problemId = ReportProblem(0.3, "Vertex shader is ALU instruction bound", waSEVERITY_HIGH); | ||
AddProblemSubItem(problemId, "Optimize ALU instructions in the vertex shader", "VertexShader"); | ||
} | ||
if ((ShaderCoreALUActive > ALUActiveThreshold) && (MTLStatFragmentCost > ShaderCostThreshold)) | ||
{ | ||
var problemId = ReportProblem(0.3, "Fragment shader is ALU instruction bound", waSEVERITY_HIGH); | ||
AddProblemSubItem(problemId, "Optimize ALU instructions in the fragment shader", "FragmentShader"); | ||
} | ||
if ((ShaderCoreALUActive > ALUActiveThreshold) && (MTLStatComputeCost > ShaderCostThreshold)) | ||
{ | ||
var problemId = ReportProblem(0.3, "Shader is ALU instruction bound", waSEVERITY_HIGH); | ||
AddProblemSubItem(problemId, "Optimize ALU instructions in the compute shader", "Kernel"); | ||
} | ||
} | ||
|
||
function analysis_memory_bound() | ||
{ | ||
var totalMemBandwidth = ColorBlockDramBandwidth + L2CacheDramBandwidth + DepthBlockDramBandwidth; | ||
|
||
if (totalMemBandwidth > (MemBandwidth * 0.7)) | ||
{ | ||
var problemId = ReportProblem(0.3, "Memory bandwidth bound", "Reduce memory access", waSEVERITY_MEDIUM); | ||
AddProblemSubItem(problemId, "Reduce overall use of memory bandwidth") | ||
} | ||
} | ||
|
||
function analysis_pixelRate_bound() | ||
{ | ||
var blendingOn = (AMDStat_CBMemRead == 0) ? 1 : 2; | ||
if (PixelRate > ((MaxPixelRate / blendingOn) * 0.8)) | ||
{ | ||
var severity = waSEVERITY_LOW; | ||
|
||
if ((NumMRT > 2) || (blendingOn == 2)) | ||
{ | ||
severity = waSEVERITY_MEDIUM; | ||
} | ||
|
||
var problemId = ReportProblem(0.3, "Pixel rate bound", severity); | ||
AddProblemSubItem(problemId, "Performance is bound by the maximum rate the GPU can write pixels"); | ||
|
||
if (NumMRT > 2) | ||
{ | ||
AddProblemSubItem(problemId, "Consider decreasing the number of MRTs if possible"); | ||
} | ||
|
||
if (blendingOn == 2) | ||
{ | ||
AddProblemSubItem(problemId, "Blending is on, which will reduce the maximum pixel rate, check if blending needs to be turned on") | ||
} | ||
} | ||
} | ||
|
||
function analysis_primitiveRate_bound() | ||
{ | ||
if (AMDStat_FrontEndBusy > 0) | ||
{ | ||
var stallRate = AMDStat_FrontEndStall / AMDStat_GPU_Engine_Busy_Ticks / NumSE; | ||
var busyRate = AMDStat_FrontEndStarvedBusy / AMDStat_GPU_Engine_Busy_Ticks / NumSE; | ||
var peakPrimitiveRate = NumSE; | ||
if ((stallRate < 0.3) && (busyRate > 0.6)) | ||
{ | ||
if (PrimitiveRate < (peakPrimitiveRate * 0.4)) | ||
{ | ||
var problemId = ReportProblem(0.3, "Low primitive rate", waSEVERITY_MEDIUM); | ||
AddProblemSubItem(problemId, "Try to reuse vertices to attain higher primitive rate") | ||
if (ParameterCacheStall > 70) | ||
{ | ||
problemId = ReportProblem(0.3, "Vertex shader output bound", waSEVERITY_HIGH); | ||
AddProblemSubItem(problemId, "Optimize the number of attributes output by the vertex shader", "VertexShader") | ||
} | ||
} | ||
else | ||
{ | ||
var problemId = ReportProblem(0.3, "Front end primitive bound", waSEVERITY_LOW); | ||
AddProblemSubItem(problemId, "Performance is bound by the maximum rate the GPU can process primitives") | ||
} | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.