Address lies about max texture size.

This commit is contained in:
Joshua Yanovski 2020-07-08 02:23:02 +02:00
parent bcfc62b5e1
commit 7fbe5cbfbb

View File

@ -854,7 +854,8 @@ impl Renderer {
/// NOTE: Because Macs lie about their max supported texture size. /// NOTE: Because Macs lie about their max supported texture size.
const MAX_TEXTURE_SIZE_MAX: u16 = 8192; const MAX_TEXTURE_SIZE_MAX: u16 = 8192;
#[cfg(not(target_os = "macos"))] #[cfg(not(target_os = "macos"))]
const MAX_TEXTURE_SIZE_MAX: u16 = u16::MAX; /// NOTE: Apparently Macs aren't the only machines that lie.
const MAX_TEXTURE_SIZE_MAX: u16 = 16384;
// NOTE: Many APIs for textures require coordinates to fit in u16, which is why // NOTE: Many APIs for textures require coordinates to fit in u16, which is why
// we perform this conversion. // we perform this conversion.
u16::try_from(factory.get_capabilities().max_texture_size) u16::try_from(factory.get_capabilities().max_texture_size)