internal/graphicsdriver/metal: Refactoring

This commit is contained in:
Hajime Hoshi 2021-07-04 20:35:56 +09:00
parent 3ec02f767b
commit 19f034e818

View File

@ -826,7 +826,10 @@ func (g *Graphics) HasHighPrecisionFloat() bool {
}
func (g *Graphics) MaxImageSize() int {
if g.maxImageSize == 0 {
if g.maxImageSize != 0 {
return g.maxImageSize
}
g.maxImageSize = 4096
// https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf
switch {
@ -853,7 +856,6 @@ func (g *Graphics) MaxImageSize() int {
default:
panic("metal: there is no supported feature set")
}
}
return g.maxImageSize
}