Giter VIP home page Giter VIP logo

Comments (12)

rdb avatar rdb commented on May 14, 2024

None of these errors make any sense. We're clearly setting compareEnable to VK_FALSE just before calling vkCreateSampler, for example.

Can you run pview successfully? I wonder if something in the linking is going wrong and you're somehow linking to a binary incompatible version that somehow has subtly different struct definitions.

I installed 1.0.65.1 and couldn't reproduce anything like what you're seeing. (However, I did find a different couple of errors that I have pushed a fix to, along with a merge from master.)

from panda3d.

nosyliam avatar nosyliam commented on May 14, 2024

It might be because I just merged all the changes on the vulkan branch into my custom panda build which could be outdated. Are there any other sources outside of the Vulkan branch that might be causing this issue?

I'll also go through the object files through IDA to see if everything is valid.

from panda3d.

rdb avatar rdb commented on May 14, 2024

No, I don't see how that could be an issue, unless you somehow pulled a very outdated version of the Vulkan branch. The vulkandisplay directory is isolated code and other branches shouldn't be interfering.

from panda3d.

nosyliam avatar nosyliam commented on May 14, 2024

I think I know what might be wrong. If I remember correctly, makepanda.py for Vulkan links to Lib\vulkan-1.lib while my linker links to Lib32\vulkan-1.lib. Will see what happens.

from panda3d.

rdb avatar rdb commented on May 14, 2024

That sounds remotely plausible in that a 32-bit version would have a different struct layout than a 64-bit version, but I find it very strange why it would allow you to link to a library with a mismatching architecture to begin with, and why it wouldn't immediately crash upon attempting to run the resulting binary.

from panda3d.

nosyliam avatar nosyliam commented on May 14, 2024

I've checked out EVERYTHING and it still doesn't work. I've even took the liberty to go through the compiled .obj with IDA which shows stuff like this:
image
Compare that to the code:

VkRenderPassCreateInfo pass_info;
pass_info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
pass_info.pNext = NULL;
pass_info.flags = 0;
pass_info.attachmentCount = _depth_stencil_format ? 2 : 1;
pass_info.pAttachments = attachments;
pass_info.subpassCount = 1;
pass_info.pSubpasses = &subpass;
pass_info.dependencyCount = 0;
pass_info.pDependencies = NULL;

VkRenderPass pass;
VkResult
err = vkCreateRenderPass(vkgsg->_device, &pass_info, NULL, &pass);

I've also checked the executable too, it all checks out. I have reason to suspect that it's the libraries themselves. Where should I get the Vulkan libraries from? Compiling them myself isn't an option as VS 2010 isn't supported.

from panda3d.

rdb avatar rdb commented on May 14, 2024

I use the official Vulkan SDK from LunarG. Panda3D looks for the latest version of the Vulkan SDK and links it when building libp3vulkandisplay.dll.

Well, let's try to narrow down the issue: can you build the SDK in normal, dynamic mode, and run pview.exe? If that works, then we know that the Vulkan renderer works at all and we can further narrow it down. If it doesn't, then you should try to run tools like vulkaninfo to try and find out whether you can run any Vulkan application.

from panda3d.

nosyliam avatar nosyliam commented on May 14, 2024

I feel like such an idiot: it was only when I was debugging the program in VS that I saw it was still using DLLs from Vulkan 1.0.65.1 while I was compiling with Vulkan 1.0.49.0. Everything works fantastic now -- I just don't have a shader, though. Do you perhaps have a default shader I could use?

from panda3d.

rdb avatar rdb commented on May 14, 2024

OK, here goes:
http://rdb.name/vert.spv
http://rdb.name/frag.spv
Place these anywhere on the model-path.

It's a simple shader that only supports a single texture. It uses push constants to get the color scale and modelview-projection matrix in because uniform buffers aren't yet implemented. And the VulkanGSG hardcodes the data bindings because there's no shader reflection code yet or any code to use that to build pipeline layouts. (I do have local work that enables reflection of SPIR-V shaders, but haven't gotten around to cleaning it up yet.)

from panda3d.

nosyliam avatar nosyliam commented on May 14, 2024

Everything works, but since alpha maps aren't supported in the shader you provided stuff like this happens:
image

I have no idea how shaders work, so if you had any shaders that supported textures & alpha maps or at least had the GLSL source so I could (attempt) to fix it that would be great.

from panda3d.

theclashingfritz avatar theclashingfritz commented on May 14, 2024

I would just leave Alpha maps out as a non-inclusion if necessary. On a side note nice bear.

from panda3d.

rdb avatar rdb commented on May 14, 2024

Closing because the original issue is resolved.

I suggest you check back after basic support for SPIR-V reflection is implemented, which would be required for any fancier shaders than the crude one that I have shared.

from panda3d.

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.