Stack pointer AllocateDescriptorSets

@Perksey ok then I'll make a thread here
9 Replies
Deleted User
Deleted UserOP•4y ago
var allocateInfos = new DescriptorSetAllocateInfo[_resolution];
var setLayout = _setLayout;
for (int i = 0; i < _resolution; i++)
allocateInfos[i] = new DescriptorSetAllocateInfo(descriptorPool: _descriptorPool,
descriptorSetCount: _resolution, pSetLayouts: &setLayout);
_vk.AllocateDescriptorSets(_device, allocateInfos, _descriptorSets).ThrowCode();
allocateInfos = null;
var allocateInfos = new DescriptorSetAllocateInfo[_resolution];
var setLayout = _setLayout;
for (int i = 0; i < _resolution; i++)
allocateInfos[i] = new DescriptorSetAllocateInfo(descriptorPool: _descriptorPool,
descriptorSetCount: _resolution, pSetLayouts: &setLayout);
_vk.AllocateDescriptorSets(_device, allocateInfos, _descriptorSets).ThrowCode();
allocateInfos = null;
why would this code not work? Validation layers say pAllocateInfos->pSetLayouts is VK_NULL_HANDLE
Perksey
Perksey•4y ago
reading
Deleted User
Deleted UserOP•4y ago
note that validation layers don't complain everywhere, just pAllocateInfo->pSetLayouts[4] and up up until 15, then it AVEs
Perksey
Perksey•4y ago
yeah that should work fine
Deleted User
Deleted UserOP•4y ago
well I thought so as well 😛
Perksey
Perksey•4y ago
wait
Deleted User
Deleted UserOP•4y ago
oh I noticed it I pass _resolution * _resolution allocs wups
Perksey
Perksey•4y ago
yup
descriptorSetCount: _resolution
this smelt funny
Deleted User
Deleted UserOP•4y ago
I did only notice cause I F12ed into the bindings and noticed _descriptorSets [Count] is computed via descriptorSetCount oh wait but SetLayouts is an array again fuckin hell
Want results from more Discord servers?
Add your server