mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-03-27 22:06:39 -06:00
older tvos hardware does not support layered rendering
This commit is contained in:
parent
13e0fdeac1
commit
fe59958b63
@ -618,6 +618,20 @@ bool Instance::CreateDevice() {
|
||||
#undef PROP_GET
|
||||
#undef FEAT_SET
|
||||
|
||||
// Check layered rendering support on MoltenVK
|
||||
// MoltenVK maps Metal's layeredRendering capability to shaderOutputLayer
|
||||
if (is_moltenvk) {
|
||||
vk::PhysicalDeviceVulkan12Features vulkan12_features;
|
||||
vk::PhysicalDeviceFeatures2 features2;
|
||||
features2.pNext = &vulkan12_features;
|
||||
physical_device.getFeatures2(&features2);
|
||||
if (!vulkan12_features.shaderOutputLayer) {
|
||||
LOG_INFO(Render_Vulkan,
|
||||
"Disabling layered rendering (shaderOutputLayer not supported by device)");
|
||||
layered_rendering_supported = false;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBRETRO
|
||||
// LibRetro builds: device already created by frontend, just return after feature detection
|
||||
return true;
|
||||
|
||||
@ -169,6 +169,9 @@ void Handle::Create(const Instance* instance, u32 width, u32 height, u32 levels,
|
||||
std::string_view debug_name) {
|
||||
const bool is_cube_map =
|
||||
type == TextureType::CubeMap && instance->IsLayeredRenderingSupported();
|
||||
if (!is_cube_map) {
|
||||
flags &= ~vk::ImageCreateFlagBits::eCubeCompatible;
|
||||
}
|
||||
|
||||
this->instance = instance;
|
||||
this->width = width;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user