Giter Site home page Giter Site logo

Comments (8)

maierfelix avatar maierfelix commented on May 21, 2024

nvk's documentation is generated based on the original documentation and not finished yet - the documentation incorrectly states here that VkBool32 has to be used, but VkInout is the correct type.

Edit: Having a quick look at the type definition file, it seems that VkInout should also allow boolean values.

from nvk.

norman784 avatar norman784 commented on May 21, 2024

But if you use VkInout it doesn't work, if I use this code

let surface_support = { $: 0 }
vkGetPhysicalDeviceSurfaceSupportKHR(this.physical_device, 0, this.surface, surface_support)

I get

vkGetPhysicalDeviceSurfaceSupportKHR(this.physical_device, 0, this.surface, surface_support)                                                              
    ^                                                                          
TypeError: Expected 'Boolean' for Object property '$' 4 'pSupported' in 'vkGetPhysicalDeviceSurfaceSupportKHR' 

And if use this

let surface_support = { $: false }
vkGetPhysicalDeviceSurfaceSupportKHR(this.physical_device, 0, this.surface, surface_support)

I get

Argument of type '{ $: boolean; }' is not assignable to parameter of type 'VkInout'.
  Types of property '$' are incompatible.
    Type 'boolean' is not assignable to type 'number'. 
vkGetPhysicalDeviceSurfaceSupportKHR(this.physical_device, 0, this.surface, surface_support)  
                                                                                                                           ~~~~~~~~~~~~~~~  

I'm not sure another way to solve this issue rather than change in the generated files the VkInout for VkBool32

from nvk.

maierfelix avatar maierfelix commented on May 21, 2024

Hey my comment edit above was a reminder for myself, not an actual answer :) - this is a bug in nvk

I'm busy this week, but if you can't wait for a fix, then (depending on your OS) you can try editing the two top lines of this file, by changing them from this:

declare var VkInout: { $: number; }
export interface VkInout { $: number; }

to this:

declare var VkInout: { $: number | boolean; }
export interface VkInout { $: number | boolean; }

from nvk.

norman784 avatar norman784 commented on May 21, 2024

Cool, thanks!

from nvk.

maierfelix avatar maierfelix commented on May 21, 2024

This should be fixed in v0.6.3

from nvk.

norman784 avatar norman784 commented on May 21, 2024

I don't know if is related, but the v0.6.3 points to the generated files v1.1.108 instead of the bundled one v1.1.114.

from nvk.

maierfelix avatar maierfelix commented on May 21, 2024

@norman784 sorry for that, is v0.6.4 working for you now?

from nvk.

norman784 avatar norman784 commented on May 21, 2024

Thanks, now it works!

from nvk.

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.