M2 MacBook Air running Sequoia 15.0.1, I am honestly at a loss here.
For some inexplicable reason whenever I create a WGPURequiredLimits or WGPUSupportedLimits, the call to wgpuAdapterRequestDevice causes a segfault.
This is such that
//WGPURequiredLimits reqs{};
//reqs = getRequiredLimits();
deviceDesc.requiredLimits = nullptr;
works perfectly fine, while even
WGPURequiredLimits reqs{};
//reqs = getRequiredLimits();
deviceDesc.requiredLimits = nullptr;
or
WGPURequiredLimits reqs{};
reqs = getRequiredLimits();
deviceDesc.requiredLimits = nullptr;
will not succeed.
Since I am using the C API with no reference of the C++ file in my code, I am assuming no weird constructor is being called.
To attempt to circumvent this, I have tried the following horrible thing.
char reqs[sizeof(WGPURequiredLimits)];
*reinterpret_cast<WGPURequiredLimits*>(reqs) = getRequiredLimits();
deviceDesc.requiredLimits = nullptr;
Note that after calling getRequiredLimits(), reqs is never referenced anywhere else.
That is just not how this API works apparently. This causes the program to hang on wgpuAdapterRequestDevice, according to my breakpoints in CLion (on Mac, using LLDB).
I am unbelievably lost. I don't know why this is happening.
M2 MacBook Air running Sequoia 15.0.1, I am honestly at a loss here.
For some inexplicable reason whenever I create a
WGPURequiredLimitsorWGPUSupportedLimits, the call towgpuAdapterRequestDevicecauses a segfault.This is such that
works perfectly fine, while even
WGPURequiredLimits reqs{}; //reqs = getRequiredLimits(); deviceDesc.requiredLimits = nullptr;or
WGPURequiredLimits reqs{}; reqs = getRequiredLimits(); deviceDesc.requiredLimits = nullptr;will not succeed.
Since I am using the C API with no reference of the C++ file in my code, I am assuming no weird constructor is being called.
To attempt to circumvent this, I have tried the following horrible thing.
Note that after calling
getRequiredLimits(),reqsis never referenced anywhere else.That is just not how this API works apparently. This causes the program to hang on
wgpuAdapterRequestDevice, according to my breakpoints in CLion (on Mac, using LLDB).I am unbelievably lost. I don't know why this is happening.