Comments (8)
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.
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.
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.
Cool, thanks!
from nvk.
This should be fixed in v0.6.3
from nvk.
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.
@norman784 sorry for that, is v0.6.4
working for you now?
from nvk.
Thanks, now it works!
from nvk.
Related Issues (20)
- Typescript is broken? HOT 6
- pNext: "Member isn't allowed to be filled!" incorrect behavior when 'null'
- Empty arrays cause a crash when a structure gets flushed
- Add documentation for ArrayBuffer.getAddress and ArrayBuffer.fromAddress
- Add Cursor/Pointer Lock support
- ArrayBuffer members of structures are not correctly handled
- No render devices available in vmware HOT 2
- oculus support HOT 1
- BigInt.prototype.dereference doesn't actually dereference
- Running new VkDescriptorBufferInfo() in an electron render process causes crash on getArrayBufferFromAddress() in VkBuffer initialisation. HOT 3
- [WebAssembly, ArrayBuffer] Low-level input for structs? HOT 4
- Drop Vk and VK_ prefixes? HOT 1
- Validation Layer name change to "VK_LAYER_KHRONOS_validation" HOT 4
- TypeScript types not working HOT 2
- Disabling rate limit / vsync using NVK
- Howto get humanized Vulkan driver version?
- Issue with BigUint64Array
- VkImageBlit and VkImageBlit2KHR srcOffsets and dstOffsets cause RangeError crash.
- Incorrect TypeScript signature for vkCmdBindVertexBuffers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvk.