GithubHelp home page GithubHelp logo

Compiling on Raspberry Pi 4 about tempest HOT 11 CLOSED

try avatar try commented on May 26, 2024
Compiling on Raspberry Pi 4

from tempest.

Comments (11)

Try avatar Try commented on May 26, 2024 1

RG8 actually made the game start! (Why?)

The better question is why RG16 failed. Most likely RG16 it s UnsupportedTextureFormat exception:

Attachment Device::attachment(TextureFormat frm, const uint32_t w, const uint32_t h, const bool mips) {
  if(!devProps.hasSamplerFormat(frm) && !devProps.hasAttachFormat(frm))
    throw std::system_error(Tempest::GraphicsErrc::UnsupportedTextureFormat);
  ...
  }

Anyway, RG8 is not a good replacement: spec requires each gbuffer texture must have same byte-length. In this case: RGBA8 will do in short term.

About crashes in general:
Without crash-reason and stacktrace it's difficult to make a good advice.
I'm not sure about VS-code, but since error handling is exceptions-bases, it would be a good idea to add break-point on any thrown exception, if it's possible in vs-code.

PS
While writing this answer I noticed that crash-logging is not completer on non-windows platforms:

// crashlog.cpp
void CrashLog::dumpStack(const char *sig) {
#ifdef __WINDOWS__   // <-- don't remember why it's disabled on other platforms :(
...
#endif
  }

from tempest.

Try avatar Try commented on May 26, 2024

Hello, @ip0p !
This compilation error man that there is no definition VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL in scope.
Most likely it because of old Vulkan-SDK version. My version is 1.2.148.1 - try this one or newer.

I'm trying to compile on a pi4 just for fun. Is this actually possible?

May be, but no one ever tried :)

from tempest.

ip0p avatar ip0p commented on May 26, 2024

I got it compiling when I changed the mentioned variables with the suggested alternative. Doesnt seem right but didnt gave me errors. But when I tried to run it just said no validation layer found and aborted. What does that mean? Is there a way to get a more detailed log? I also found out there seems to be sdk 1.1 installed. For the newer SDK version I didn't find an arm version. Vulkan on rpi4 itself seems to be experimental/wip at the moment.

from tempest.

ip0p avatar ip0p commented on May 26, 2024

Update: I had set VK_ICD_FILENAMES=/home/pi/local-install/share/vulkan/icd.d/broadcom_icd.armv7l.json to make vulkan to work.
Now the changelayout method is still my enemy. Commenting out was not a good solution and now it crashes there. This is how far I come now:
`VulkanApi: no validation layers available
VulkanApi: start init
VulkanApi: create instance
VulkanApi: create instance done
VulkanApi: start init done
vk: error: v3dv_GetPhysicalDeviceProperties2: ignored VkStructureType 1000212000:VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT

WARNING: v3dv is neither a complete nor a conformant Vulkan implementation. Testing use only.
VulkanApi: changelayout method
VulkanApi: switch old
VulkanApi: switch new
VulkanApi: changelayout method
VulkanApi: switch old
VulkanApi: switch new
VulkanApi: changelayout method
VulkanApi: switch old
VulkanApi: switch new
VulkanApi: changelayout method
VulkanApi: switch old
VulkanApi: switch new
Info: Couldn't load VDF-Archive /home/pi/Documents/Gothic II/Data/$Templates$/SPLASH.BMP: unsupported
Info: Couldn't load VDF-Archive /home/pi/Documents/Gothic II/Data/$Templates$/MSSDS3D.M3D: unsupported
Info: Couldn't load VDF-Archive /home/pi/Documents/Gothic II/Data/$Templates$/ZGAMEPAD.DLL: unsupported
Info: Couldn't load VDF-Archive /home/pi/Documents/Gothic II/Data/$Templates$/ZACTIVATECTRL.DLL: unsupported
Info: Couldn't load VDF-Archive /home/pi/Documents/Gothic II/Data/$Templates$/ZBINKFIX.DLL: unsupported
Info: Couldn't load VDF-Archive /home/pi/Documents/Gothic II/Data/$Templates$/ZMOUSEFIX.DLL: unsupported
vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000072002:VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO

GPU = V3D 4.2
Depth format = 10 Shadow format = 4
VulkanApi: changelayout method
VulkanApi: switch old
VulkanApi: switch new
VulkanApi: changelayout method
VulkanApi: switch old
VulkanApi: switch new
VulkanApi: changelayout method
VulkanApi: switch old
VulkanApi: switch new
VulkanApi: changelayout method
VulkanApi: switch old
VulkanApi: switch new
VulkanApi: changelayout method
VulkanApi: switch old
VulkanApi: switch new
VulkanApi: changelayout method
VulkanApi: switch old
VulkanApi: switch new
VulkanApi: changelayout method
VulkanApi: switch old
VulkanApi: switch new
Abgebrochen
`

from tempest.

Try avatar Try commented on May 26, 2024

Actually from this log it's hard to say what exactly is going on. I can only bring light to a few things:

Commenting out was not a good solution and now it crashes there.

Commenting VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL is ok - this layout is never used in opengothic.

vk: error: v3dv_AllocateMemory: ignored VkStructureType 1000127001:VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO

It seem like your issue not in barriers(or at least not only in barriers), but in gpu memory allocation. Looks like v3dv driver exposed a "VK_KHR_dedicated_allocation" extension to use, but it's not actually finished.
Possible workaround: modify VDevice::createLogicalDevice and make set props.hasDedicatedAlloc; to false there.

At this point I want to recommend to run test-suite(MoltenTempest/Tests/tests) at first to see how simple content works.

from tempest.

ip0p avatar ip0p commented on May 26, 2024

Hey!
Here are the good news:
I fixed the not declared errors in vcommandbuffer.cpp by copying the header files from the newest sdk to my /usr/lib. (Don't know if this is right but it compiled after that)
I also setup VS Code on the pi to be able to better debug. Found out that in renderer.cpp changing the gbufDepth TextureFormat to RG8 actually made the game start! (Why?)
Coming to the bad news:
After a few seconds (1-3) playing epic gothic music it just crashes. :(
Don't know if its caused by the audio part or something else. Currently I'm out of ideas how to debug this. Maybe you have a hint...
Screenshot 2020-10-16 213744

from tempest.

ip0p avatar ip0p commented on May 26, 2024

I tried to add break points everywhere in crashlog.cpp. Nothing. Also added some additional SIGs. (Still c++ noob so blindly testing stuff). Found out SIGABRT is double defined there btw. But signalHandler and terminateHandler never got called. Also checked system logs nothing. Maybe its something wrong in my setup but I have the feeling that somehow the X-Server force closes the app or something like that. But all of that is still guessing... πŸ˜… Could it be that the graphics ram is running full or something like this? It's just so strange that it shows the menu I can do stuff, also the intro is playing from start to end(maybe interesting!) and just closes after a random amount of seconds.

from tempest.

Try avatar Try commented on May 26, 2024

I can do stuff, also the intro is playing from start to end(maybe interesting!)

Actually it's very cool! Move from 'doesn't compiling' to working menu is very nice progress πŸ‘

just closes after a random amount of seconds.

Closes, while game at loading screen and never reaches the game-play itself, right?
So current ideas of what might it be:

  • Gbuffer - I'm not sure if it supported on V3D 4.2
// step-by-step debug in this method can help in this case
void Renderer::draw(Tempest::Encoder<CommandBuffer>& cmd,
                    FrameBuffer& fbo, FrameBuffer& fboCpy, const Gothic &gothic, uint8_t frameId) {
  }
  • Gpu side error:
void MainWindow::render(){
...
    // break point around this calls can be usefull in that case
    device.submit(cmd,context.imageAvailable,context.renderDone,context.gpuLock);
    device.present(swapchain,imgId,context.renderDone);
  • Low cpu/gpu-memory - unlikely, since there suppose to be a std::bad_alloc exception in this case.
    For this case you can run ./Gothic2Notr -w dragonisland.zen to start game at smallest game location - halls of Irdorath
  • Any Vulkan-spec violation by game Engine
    ./Gothic2Notr -v - to run with validation layer
  • Any arm64-related bug(SIGBUS)
    Very bad case - means some variable has wrong alignment in memory.

from tempest.

ip0p avatar ip0p commented on May 26, 2024

Closes, while game at loading screen and never reaches the game-play itself, right?

Actually it crashes when idle in menu. Also with nomenu flag after few seconds. Maybe it could be from the audio side. πŸ€”

Thanks for your feedback! I will check this things when I have time in the evening.

from tempest.

Nindaleth avatar Nindaleth commented on May 26, 2024

@ip0p Did you find a bit of time for re-trying this on RPi4? The CrashLog::DumpStack is now implemented for Linux so there should be better traces.

from tempest.

Nindaleth avatar Nindaleth commented on May 26, 2024

I guess this is no longer an issue as others post in-game screenshots from RPi4 (Try/OpenGothic#121)

from tempest.

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.