Giter VIP home page Giter VIP logo

Comments (9)

sunbearc22 avatar sunbearc22 commented on May 18, 2024

Hi realitix, I have adapted the example by LunarG and applied it on vulkan 1.1.71.2 app. Below is the function to test for vkEnumerateInstanceVersion.

    def checkApiVersion(self):
        try:
            vkEnumerateInstanceVersion = vkGetInstanceProcAddr(
                VK_NULL_HANDLE, "vkEnumerateInstanceVersion")
            logging.info('"vkEnumerateInstanceVersion" exist.')
        except ExtensionNotSupportedError:
            logging.info('No "vkEnumerateInstanceVersion": treat as Vulkan 1.0 only.')

Presently, vulkan 1.1.71.2 is returning ExtensionNotSupportedError when this function is executed.

vulkan.cdef.h lines 3874 & 3903 do define vkEnumerateInstanceVersion.

from vulkan.

sunbearc22 avatar sunbearc22 commented on May 18, 2024

I tried appending the following vkEnumerateInstanceVersion function at line 3728 of _vulkan.py to fake its presence but my above function still met the exception ExtensionNotSupportedError.

def vkEnumerateInstanceVersion():

    pApiVersion = ffi.NULL

    result = _callApi(lib.vkEnumerateInstanceVersion, pApiVersion)
    if result != VK_SUCCESS:
        raise exception_codes[result]

    return result

from vulkan.

realitix avatar realitix commented on May 18, 2024

Hello @sunbearc22,
Thanks for the report, I will look at it.

from vulkan.

sunbearc22 avatar sunbearc22 commented on May 18, 2024

@realitix. Thanks. I have corrected the above function to use pApiVersion = ffi.new('uint32_t*') but still did not work.

BTW, is macro VK_DEFINE_HANDLE missing also? I could not find it in _vulkan.py or vulkan.cdef.h.

I have also reviewed the definition of lib. in _vulkan.py. According to line 97 & 100, for Linux users lib refers to $VULKAN_SDK/lib/libvulkan.so.1 which is a link to $VULKAN_SDK/lib/libvulkan.so.1.1.77 in my case. So I have checked that lib. is accessing the correct version of the Vulkan library I want to test.

from vulkan.

sunbearc22 avatar sunbearc22 commented on May 18, 2024

@realitix. According to definition of vkGetInstanceProcAddr line 6857, the object in _instance_ext_funcs needs vkEnumerateInstanceVersion but is missing. After adding the definition, the ExtensionNotSupportedError was avoided. Question: Is vkEnumerateInstanceVersion an instance extension function given that its parameter instance = VK_NULL_HANDLE ?

def vkGetInstanceProcAddr(instance, pName):
    fn = _callApi(lib.vkGetInstanceProcAddr, instance, pName)
    if fn == ffi.NULL:
        raise ProcedureNotFoundError()
    if not pName in _instance_ext_funcs:
        raise ExtensionNotSupportedError()
    fn = ffi.cast('PFN_' + pName, fn)
    return _instance_ext_funcs[pName](fn)

from vulkan.

realitix avatar realitix commented on May 18, 2024

Hello @sunbearc22,
It should be fixed when the new_version will be ready

from vulkan.

realitix avatar realitix commented on May 18, 2024

Hello @sunbearc22,
Can you try again, I just updated to the 1.1.99 SDK

from vulkan.

sunbearc22 avatar sunbearc22 commented on May 18, 2024

Hi realitx, apologies for my late reply. May I know which LunarG Vulkan SDK does vulkan 1.1.99.0 uses? I could find these closes SDKs (1.1.97.0, 1.1.101.0, and 1.1.106.0).

from vulkan.

realitix avatar realitix commented on May 18, 2024

Hello @sunbearc22.
It should work now.
I will push a new version soon on pypi.

from vulkan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.