Giter Site home page Giter Site logo

Comments (4)

DragonJoker avatar DragonJoker commented on July 3, 2024

Hi
So, I've tried, and I haven't encountered that issue, did you make sure you had ashesGlRenderer.dll in the same folder as ashes-1.dll ?

from ashes.

LouisClt avatar LouisClt commented on July 3, 2024

Hello,

Thanks for your answer.

Yes I did make sure that I had the ashesGlRenderer.dll in the same folder.

I managed to make my code work (there are still OpenGL errors (glBlitFramebuffer) but it is another issue I think) by adding this code:

#if VK_KHR_swapchain
			VkExtensionProperties{ VK_KHR_SWAPCHAIN_EXTENSION_NAME, VK_KHR_SWAPCHAIN_SPEC_VERSION },
#endif

in ash_opengl.cpp line 4608 (which activated the extension VK_KHR_swapchain, else the plugin returned that this extension was not activated and we could not do the vkGetInstanceProcAddr correctly)

For the static linking without vkGetInstanceProcAddr I had to add :

GlRenderer_API VkResult VKAPI_CALL vkGetSwapchainImagesKHR(
		VkDevice device,
		VkSwapchainKHR swapchain,
		uint32_t* pSwapchainImageCount,
		VkImage* pSwapchainImages)
	{
		return ashes::gl::vkGetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages);
	}

line 4750 of the same file (and the corresponding declaration in the hpp file).

What I do not understand is how it can work for you. Maybe the test you've done was from the library itself that does not care about the API that is exposed ?

from ashes.

DragonJoker avatar DragonJoker commented on July 3, 2024

The idiomatic way for Ashes loading is using ICD mode (setting the environment var VK_ICD_FILENAMES to the appropriate json file), and if not, I strongly advise against static linking, which is a convenient but bad way of using Vulkan.
Also, VK_KHR_swapchain being a device extension, its function pointers should be loaded using vkGetDeviceProcAddr (even though Vulkan loader may accept loading them through vkGetProcAddr or vkGetInstanceProcAddr, I don't allow it in Ashes' renderers).

from ashes.

LouisClt avatar LouisClt commented on July 3, 2024

My bad, with vkGetDeviceProcAddr, I have no more issues. I was not aware that the correct way for loading functions was dependant on the type of the extension, having only worked with Vulkan SDK.
I will look into ICD.
Thanks for your answers,

from ashes.

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.