Stack pointer AllocateDescriptorSets

@Perksey ok then I'll make a thread here
9 Replies
Deleted User
Deleted User•3y 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•3y ago
reading
Deleted User
Deleted User•3y ago
note that validation layers don't complain everywhere, just pAllocateInfo->pSetLayouts[4] and up up until 15, then it AVEs
Perksey
Perksey•3y ago
yeah that should work fine
Deleted User
Deleted User•3y ago
well I thought so as well 😛
Perksey
Perksey•3y ago
wait
Deleted User
Deleted User•3y ago
oh I noticed it I pass _resolution * _resolution allocs wups
Perksey
Perksey•3y ago
yup
descriptorSetCount: _resolution
this smelt funny
Deleted User
Deleted User•3y 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