mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/graphicsdriver/metal: Refactoring
This commit is contained in:
parent
3ec02f767b
commit
19f034e818
@ -826,7 +826,10 @@ func (g *Graphics) HasHighPrecisionFloat() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *Graphics) MaxImageSize() int {
|
func (g *Graphics) MaxImageSize() int {
|
||||||
if g.maxImageSize == 0 {
|
if g.maxImageSize != 0 {
|
||||||
|
return g.maxImageSize
|
||||||
|
}
|
||||||
|
|
||||||
g.maxImageSize = 4096
|
g.maxImageSize = 4096
|
||||||
// https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf
|
// https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf
|
||||||
switch {
|
switch {
|
||||||
@ -853,7 +856,6 @@ func (g *Graphics) MaxImageSize() int {
|
|||||||
default:
|
default:
|
||||||
panic("metal: there is no supported feature set")
|
panic("metal: there is no supported feature set")
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return g.maxImageSize
|
return g.maxImageSize
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user