VkDescriptorInfo tex_descs[DEMO_TEXTURE_COUNT];
VkWriteDescriptorSet writes[2];
VkResult U_ASSERT_ONLY err;
- uint32_t count;
uint32_t i;
err = vkAllocDescriptorSets(demo->device, demo->desc_pool,
VK_DESCRIPTOR_SET_USAGE_STATIC,
1, &demo->desc_layout,
- &demo->desc_set, &count);
- assert(!err && count == 1);
+ &demo->desc_set);
+ assert(!err);
memset(&tex_descs, 0, sizeof(tex_descs));
for (i = 0; i < DEMO_TEXTURE_COUNT; i++) {
VkDescriptorInfo tex_descs[DEMO_TEXTURE_COUNT];
VkWriteDescriptorSet write;
VkResult U_ASSERT_ONLY err;
- uint32_t count;
uint32_t i;
err = vkAllocDescriptorSets(demo->device, demo->desc_pool,
VK_DESCRIPTOR_SET_USAGE_STATIC,
1, &demo->desc_layout,
- &demo->desc_set, &count);
- assert(!err && count == 1);
+ &demo->desc_set);
+ assert(!err);
memset(&tex_descs, 0, sizeof(tex_descs));
for (i = 0; i < DEMO_TEXTURE_COUNT; i++) {
VkDescriptorSetUsage setUsage,
uint32_t count,
const VkDescriptorSetLayout* pSetLayouts,
- VkDescriptorSet* pDescriptorSets,
- uint32_t* pCount)
+ VkDescriptorSet* pDescriptorSets)
{
NULLDRV_LOG_FUNC;
struct nulldrv_desc_pool *pool = nulldrv_desc_pool(descriptorPool);
break;
}
- if (pCount)
- *pCount = i;
-
return ret;
}
((major << 22) | (minor << 12) | patch)
// Vulkan API version supported by this file
-#define VK_API_VERSION VK_MAKE_VERSION(0, 138, 2)
+#define VK_API_VERSION VK_MAKE_VERSION(0, 139, 0)
#define VK_DEFINE_HANDLE(obj) typedef struct obj##_T* obj;
typedef VkResult (VKAPI *PFN_vkCreateDescriptorPool)(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool);
typedef VkResult (VKAPI *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool);
typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool);
-typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount);
+typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets);
typedef VkResult (VKAPI *PFN_vkFreeDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets);
typedef VkResult (VKAPI *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies);
typedef VkResult (VKAPI *PFN_vkCreateDynamicViewportState)(VkDevice device, const VkDynamicViewportStateCreateInfo* pCreateInfo, VkDynamicViewportState* pState);
VkDescriptorSetUsage setUsage,
uint32_t count,
const VkDescriptorSetLayout* pSetLayouts,
- VkDescriptorSet* pDescriptorSets,
- uint32_t* pCount);
+ VkDescriptorSet* pDescriptorSets);
VkResult VKAPI vkFreeDescriptorSets(
VkDevice device,
return result;
}
-VK_LAYER_EXPORT VkResult VKAPI vkAllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount)
+VK_LAYER_EXPORT VkResult VKAPI vkAllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets)
{
- VkResult result = get_dispatch_table(draw_state_device_table_map, device)->AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets, pCount);
- if ((VK_SUCCESS == result) || (*pCount > 0)) {
+ VkResult result = get_dispatch_table(draw_state_device_table_map, device)->AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets);
+ if (VK_SUCCESS == result) {
POOL_NODE *pPoolNode = getPoolNode(descriptorPool);
if (!pPoolNode) {
log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_DESCRIPTOR_POOL, descriptorPool.handle, 0, DRAWSTATE_INVALID_POOL, "DS",
"Unable to find pool node for pool %#" PRIxLEAST64 " specified in vkAllocDescriptorSets() call", descriptorPool.handle);
} else {
- for (uint32_t i = 0; i < *pCount; i++) {
+ if (count == 0) {
+ log_msg(mdd(device), VK_DBG_REPORT_INFO_BIT, VK_OBJECT_TYPE_DESCRIPTOR_SET, count, 0, DRAWSTATE_NONE, "DS",
+ "AllocDescriptorSets called with 0 count");
+ }
+ for (uint32_t i = 0; i < count; i++) {
log_msg(mdd(device), VK_DBG_REPORT_INFO_BIT, VK_OBJECT_TYPE_DESCRIPTOR_SET, pDescriptorSets[i].handle, 0, DRAWSTATE_NONE, "DS",
"Created Descriptor Set %#" PRIxLEAST64, pDescriptorSets[i].handle);
// Create new set node and add to head of pool nodes
VkDescriptorSetUsage setUsage,
uint32_t count,
const VkDescriptorSetLayout *pSetLayouts,
- VkDescriptorSet *pDescriptorSets,
- uint32_t *pCount)
+ VkDescriptorSet *pDescriptorSets)
{
loader_platform_thread_lock_mutex(&objLock);
validate_object(device, device);
loader_platform_thread_unlock_mutex(&objLock);
VkResult result = get_dispatch_table(ObjectTracker_device_table_map, device)->AllocDescriptorSets(
- device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets, pCount);
+ device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets);
loader_platform_thread_lock_mutex(&objLock);
- for (uint32_t i = 0; i < *pCount; i++) {
+ for (uint32_t i = 0; i < count; i++) {
create_obj(device, pDescriptorSets[i], VK_OBJECT_TYPE_DESCRIPTOR_SET);
}
loader_platform_thread_unlock_mutex(&objLock);
VkDescriptorSetUsage setUsage,
uint32_t count,
VkDescriptorSet* pDescriptorSets,
- uint32_t* pCount,
VkResult result)
{
{
}
- if(pCount != nullptr)
- {
- }
-
if(result < VK_SUCCESS)
{
std::string reason = "vkAllocDescriptorSets parameter, VkResult result, is " + EnumeratorString(result);
VkDescriptorSetUsage setUsage,
uint32_t count,
const VkDescriptorSetLayout* pSetLayouts,
- VkDescriptorSet* pDescriptorSets,
- uint32_t* pCount)
+ VkDescriptorSet* pDescriptorSets)
{
PreAllocDescriptorSets(device, pSetLayouts);
- VkResult result = get_dispatch_table(pc_device_table_map, device)->AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets, pCount);
+ VkResult result = get_dispatch_table(pc_device_table_map, device)->AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets);
- PostAllocDescriptorSets(device, descriptorPool, setUsage, count, pDescriptorSets, pCount, result);
+ PostAllocDescriptorSets(device, descriptorPool, setUsage, count, pDescriptorSets, result);
return result;
}
return disp->ResetDescriptorPool(device, descriptorPool);
}
-LOADER_EXPORT VkResult VKAPI vkAllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount)
+LOADER_EXPORT VkResult VKAPI vkAllocDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets)
{
const VkLayerDispatchTable *disp;
disp = loader_get_dispatch(device);
- return disp->AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets, pCount);
+ return disp->AllocDescriptorSets(device, descriptorPool, setUsage, count, pSetLayouts, pDescriptorSets);
}
LOADER_EXPORT VkResult VKAPI vkFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets)
sp_param_dict = {} # Store 'index' for struct param to print, or an name of binding "Count" param for array to print
create_params = 0 # Num of params at end of function that are created and returned as output values
if 'AllocDescriptorSets' in proto.name:
- create_params = -2
+ create_params = -1
elif 'Create' in proto.name or 'Alloc' in proto.name or 'MapMemory' in proto.name:
create_params = -1
if proto.ret != "void":
if prev_count_name != '' and (prev_count_name.replace('Count', '')[1:] in p.name):
sp_param_dict[pindex] = prev_count_name
prev_count_name = ''
- elif 'pDescriptorSets' == p.name and proto.params[-1].name == 'pCount':
- sp_param_dict[pindex] = '*pCount'
elif vk_helper.is_type(p.ty.strip('*').replace('const ', ''), 'struct'):
sp_param_dict[pindex] = 'index'
if p.name.endswith('Count'):
Param("VkDescriptorSetUsage", "setUsage"),
Param("uint32_t", "count"),
Param("const VkDescriptorSetLayout*", "pSetLayouts"),
- Param("VkDescriptorSet*", "pDescriptorSets"),
- Param("uint32_t*", "pCount")]),
+ Param("VkDescriptorSet*", "pDescriptorSets")]),
Proto("VkResult", "FreeDescriptorSets",
[Param("VkDevice", "device"),