Thread overview
having troubles with D and Vulkan.
Jul 19
Danni Coy
Jul 19
harakim
Jul 19
Danni Coy
Jul 19
Danni Coy
Jul 19
Mike Shah
Jul 20
Danni Coy
Jul 20
Danni Coy
Jul 20
Danni Coy
Jul 21
harakim
Jul 24
Mike Shah
July 19
I am trying to run through the basic Vulkan triangle demo. I am getting stuck at
vkGetDeviceQueue which segfaults for me.
I have written the same tutorial to about the same point in C and I am
not getting the segfault.
I have enabled validation layers and they are not picking up anything.

Any suggestions?


July 19
On Wednesday, 19 July 2023 at 02:50:05 UTC, Danni Coy wrote:
> I am trying to run through the basic Vulkan triangle demo. I am getting stuck at
> vkGetDeviceQueue which segfaults for me.
> I have written the same tutorial to about the same point in C and I am
> not getting the segfault.
> I have enabled validation layers and they are not picking up anything.
>
> Any suggestions?

I was able to get through the triangle demo a while back. I feel like it's more of a D question than a Vulkan library question. You'll have to post your code so people can tell what it is. Just a hunch, but it's probably something that the gc is collecting before it is used.
July 19
>
> I was able to get through the triangle demo a while back. I feel like it's more of a D question than a Vulkan library question. You'll have to post your code so people can tell what it is. Just a hunch, but it's probably something that the gc is collecting before it is used.

What's the best way to post code?

I am mostly not using the GC, using std.experimental.allocator specifically mallocator to allocate other than using std.exception.enforce.
July 19
https://pastebin.com/JxxJufNB
July 19
On Wednesday, 19 July 2023 at 07:39:35 UTC, Danni Coy wrote:
> https://pastebin.com/JxxJufNB

What platform are you using, and how are you trying to build?

I can try to replicate on my end.
July 20
On Thu, Jul 20, 2023 at 5:30 AM Mike Shah via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:
>
> On Wednesday, 19 July 2023 at 07:39:35 UTC, Danni Coy wrote:
> > https://pastebin.com/JxxJufNB
>
> What platform are you using, and how are you trying to build?
>
> I can try to replicate on my end.

I am on Manjaro Linux with an AMD RX 6600 using the open source driver.
I am building with visual studio code and dub.
I get segfaults when building with dmd or ldc.

The following C code https://pastebin.com/2XJbjzMw
does not cause a segfault on the same system.

Other code you will need to build https://pastebin.com/hx2GD1DL

Build settings (from dub.json)
{
"dependencies": {
"bindbc-opengl": "~>1.0",
"bindbc-sdl": "~>1.0",
"erupted": "~>2.1.98+v1.3.248"
},
"versions": [
"SDL_206",
"GL_32",
"validateVulkan"
],
"name": "subterrainian"
}

July 20
https://pastebin.com/Jc9ZaFFs
Redid the code as an almost exact translation of the C code.
should be easier to test and compare. Same issue is occurring.

On Thu, Jul 20, 2023 at 5:30 AM Mike Shah via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:
>
> On Wednesday, 19 July 2023 at 07:39:35 UTC, Danni Coy wrote:
> > https://pastebin.com/JxxJufNB
>
> What platform are you using, and how are you trying to build?
>
> I can try to replicate on my end.

July 20
ok found it, I am an idiot, (really not used to working with dynamic libraries).

erupted needs a call to load device level functions.

loadDeviceLevelFunctions(instance);

On Thu, Jul 20, 2023 at 4:22 PM Danni Coy <danni.coy@gmail.com> wrote:
>
> https://pastebin.com/Jc9ZaFFs
> Redid the code as an almost exact translation of the C code.
> should be easier to test and compare. Same issue is occurring.
>
> On Thu, Jul 20, 2023 at 5:30 AM Mike Shah via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:
> >
> > On Wednesday, 19 July 2023 at 07:39:35 UTC, Danni Coy wrote:
> > > https://pastebin.com/JxxJufNB
> >
> > What platform are you using, and how are you trying to build?
> >
> > I can try to replicate on my end.

July 21
On Thursday, 20 July 2023 at 06:27:13 UTC, Danni Coy wrote:
> ok found it, I am an idiot, (really not used to working with dynamic libraries).
>
> erupted needs a call to load device level functions.
>
> loadDeviceLevelFunctions(instance);
>
> On Thu, Jul 20, 2023 at 4:22 PM Danni Coy <danni.coy@gmail.com> wrote:
>>
>> https://pastebin.com/Jc9ZaFFs
>> Redid the code as an almost exact translation of the C code.
>> should be easier to test and compare. Same issue is occurring.
>>
>> On Thu, Jul 20, 2023 at 5:30 AM Mike Shah via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:
>> >
>> > On Wednesday, 19 July 2023 at 07:39:35 UTC, Danni Coy wrote:
>> > > https://pastebin.com/JxxJufNB
>> >
>> > What platform are you using, and how are you trying to build?
>> >
>> > I can try to replicate on my end.

Good work! Now I can rest in peace tonight. :D
July 24
On Friday, 21 July 2023 at 02:22:56 UTC, harakim wrote:
> On Thursday, 20 July 2023 at 06:27:13 UTC, Danni Coy wrote:
>> ok found it, I am an idiot, (really not used to working with dynamic libraries).
>>
>> erupted needs a call to load device level functions.
>>
>> loadDeviceLevelFunctions(instance);
>>
>> On Thu, Jul 20, 2023 at 4:22 PM Danni Coy <danni.coy@gmail.com> wrote:
>>>
>>> https://pastebin.com/Jc9ZaFFs
>>> Redid the code as an almost exact translation of the C code.
>>> should be easier to test and compare. Same issue is occurring.
>>>
>>> On Thu, Jul 20, 2023 at 5:30 AM Mike Shah via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:
>>> > [...]
>
> Good work! Now I can rest in peace tonight. :D

Same for me :) Great to see folks working in Vulkan with D.