-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should descriptor_pool_info
include FREE_DESCRIPTOR_SET
flag?
#117
Comments
We aren't doing any This looks like one of the following things to me:
|
After several hours of debugging, I can confirm that this issue only occurs with Intel's drivers.
__int64 __fastcall vkDescriptorAllocatePoolSet(__int64 a1, __int64 a2, __int64 a3)
{
...
// Check descriptor_pool->dword424 is bigger than set.
// the throw VK_ERROR_OUT_OF_POOL_MEMORY error.
//
// When this error occurs.
// 0:000> dd 0x00000212bdec4878+424 l1
// 00000212`bdec4c9c 0000ea60
// 0:000> dd 0x00000212bdec4878+420 l1
// 00000212`bdec4c98 0000ea60
//
if ( v11 && (unsigned int)(descriptor_pool->dword424 + 1) > descriptor_pool->dword420 )
{
sub_180470550(&v36, 20LL);
v37[0] = v36;
CxxThrowException(v37, (_ThrowInfo *)&_TI1_AUException_VK__);
}
...
// here inc dword424
*(_DWORD *)(v14 + 68) = descriptor_pool->dword424++;
v30 = v12;
v20 = v11;
v21 = playout;
} __int64 __fastcall vkResetDescriptorPool(__int64 hDevice, struct_descriptor_pool *descriptor_pool)
{
//
// VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT = 1
// defalut descriptor_pool->flags == 0
//
if ( descriptor_pool->flags ){
...
//
// void __fastcall sub_18039C3B0(struct_descriptor_pool *descriptor_pool, __int64 a2)
// {
// ...
// // ONLY this way to dec descriptor_pool->dword424
// descriptor_pool->dword424 -= *(_DWORD *)(a2 + 68) != -1;
// v16 = *(unsigned int *)(a2 + 68);
// ...
// }
//
sub_18039C3B0(descriptor_pool, v11);
...
}else{
// NERVER DEC descriptor_pool->dword424
}
} |
@kvark Does adding
Even though blade only releases entire pools, it seems like this flag only extends you to allow to release each set individually. If this fixes the Intel driver bug, and doesn't meddle with other graphics cards, I think it'd be a good solution. |
I suspect it may change the allocation strategy for the descriptors, thus making it slower for us to allocate new ones. And this would be potentially significant since Blade relies on allocating descriptors many times per frame, potentially thousands of times. |
Yeah sounds good. |
Interestingly, someone else is having this issue but on an AMD GPU: zed-industries/zed#12561 (comment) |
Uhh, that's rather unfortunate. Maybe it's just a Windows thing in general? |
but there is some good news, on zed's last commit, it looks fine e829a8c3b0564bc902cc0d0a530099be7f0f036e |
ah, ok, phew, so it was addressed by #118 |
Closed by #129 |
From zed-industries/zed#10018 (comment)
The text was updated successfully, but these errors were encountered: