Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VulkanDriver always reports FEATURE_LEVEL_1 #7710

Open
nimrod-gileadi opened this issue Mar 26, 2024 · 2 comments
Open

VulkanDriver always reports FEATURE_LEVEL_1 #7710

nimrod-gileadi opened this issue Mar 26, 2024 · 2 comments
Assignees
Labels
bug Something isn't working vulkan Issues with the Vulkan backend

Comments

@nimrod-gileadi
Copy link
Contributor

Describe the bug

I'm running some code which uses filament with a vulkan backend on a NVIDIA GeForce RTX 2080 Ti, with debug output enabled, and see log lines like:

Backend feature level: 1
FEngine feature level: 1

This is surprising, given how recent the GPU is.

Looking at the source code for VulkanDriver::getFeatureLevel, it appears that if the driver has a very large maxPerStageDescriptorSamplers, it will get FeatureLevel::FEATURE_LEVEL_1, which doesn't sound right.

This logic was inverted in commit 8cdac43. Before that commit, the logic was:

    if (imageCubeArray) {
        if (supportedSamplerCount >= 31) {
            return FeatureLevel::FEATURE_LEVEL_3;
        }
        return FeatureLevel::FEATURE_LEVEL_2;
    }
    return FeatureLevel::FEATURE_LEVEL_1;

i.e.: if maxPerStageDescriptorSamplers is big, you get FEATURE_LEVEL_3.

Was the change intentional?

Steps to reproduce

Try to instantiate an engine like:

filament::Engine* engine =
      filament::Engine::Builder()
          .backend(filament::Engine::Backend::VULKAN)
          .featureLevel(filament::Engine::FeatureLevel::FEATURE_LEVEL_3)
          .build();

Expected behavior

On a powerful enough GPU, I would expect the logs to say

Backend feature level: 3
FEngine feature level: 3

Logs

WARNING: Using soft CircularBuffer (6144 KiB)
FEngine (64 bits) created at 0x556fbe5a4750 (threading is enabled)
FEngine resolved backend: Vulkan
Vulkan device driver: NVIDIA 525.147.05
Selected physical device 'NVIDIA GeForce RTX 2080 Ti' from 2 physical devices. (vendor 0x10de, device 0x1e04, driver 0x8364c140, api 1.3)
Backend feature level: 1
FEngine feature level: 1

Desktop (please complete the following information):

  • OS: Linux
  • GPU: NVIDIA GeForce RTX 2080 Ti
  • Backend: Vulkan

Additional context

I'm working in the Google codebase. I haven't tried compiling externally.

@poweifeng
Copy link
Contributor

I think the inversion of the conditional is unintentional. I'll make a change. Thank you for pointing it out!

@pixelflinger pixelflinger added bug Something isn't working vulkan Issues with the Vulkan backend labels Mar 26, 2024
@Nolram12345
Copy link

Has this change been merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vulkan Issues with the Vulkan backend
Projects
None yet
Development

No branches or pull requests

4 participants