mono / VulkanSharp

Open source .NET binding for the Vulkan API
MIT License
537 stars 61 forks source link

odd code generation #10

Closed AlonzoTG closed 8 years ago

AlonzoTG commented 8 years ago

Thanks for responding so shockingly immediately to last night's bug.

My expired trial version of a code checker flagged this little function as always returning false:

    public Bool32 GetSurfaceSupportKHR (UInt32 queueFamilyIndex, SurfaceKhr surface)
    {
        Result result;
        Bool32 pSupported;
        unsafe {
            pSupported = new Bool32 ();
            result = Interop.NativeMethods.vkGetPhysicalDeviceSurfaceSupportKHR (this.m, queueFamilyIndex, surface.m, &pSupported);
            if (result != Result.Success)
                throw new ResultException (result);

            return pSupported;
        }
    }

I'm trying to compile against .net 4.6. It's giving me grief about sizeof<>() ... but I'd tend to ignore most of those...

radekdoulik commented 8 years ago

From quick look this seems OK to me, the vkGetPhysicalDeviceSurfaceSupportKHR is called with pointer to pSupported and can modify the pSupported value.