New names and behavior for QueueBind* APIs.
assert(!err);
/* bind memory */
- err = vkQueueBindObjectMemory(demo->queue,
+ err = vkBindObjectMemory(demo->device,
VK_OBJECT_TYPE_IMAGE, demo->depth.image,
i, demo->depth.mem[i], 0);
assert(!err);
assert(!err);
/* bind memory */
- err = vkQueueBindObjectMemory(demo->queue,
+ err = vkBindObjectMemory(demo->device,
VK_OBJECT_TYPE_IMAGE, tex_obj->image,
j, tex_obj->mem[j], 0);
assert(!err);
{
/* clean up staging resources */
for (uint32_t j = 0; j < tex_objs->num_mem; j ++) {
- vkQueueBindObjectMemory(demo->queue,
+ vkBindObjectMemory(demo->device,
VK_OBJECT_TYPE_IMAGE, tex_objs->image, j, VK_NULL_HANDLE, 0);
vkFreeMemory(demo->device, tex_objs->mem[j]);
}
err = vkUnmapMemory(demo->device, demo->uniform_data.mem[i]);
assert(!err);
- err = vkQueueBindObjectMemory(demo->queue,
+ err = vkBindObjectMemory(demo->device,
VK_OBJECT_TYPE_BUFFER, demo->uniform_data.buf,
i, demo->uniform_data.mem[i], 0);
assert(!err);
// Graphics queue and MemMgr queue can be separate.
// TODO: Add support for separate queues, including synchronization,
- // and appropriate tracking for QueueSubmit and QueueBindObjectMemory
+ // and appropriate tracking for QueueSubmit
for (i = 0; i < queue_count; i++) {
- if ((demo->queue_props[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) &&
- (demo->queue_props[i].queueFlags & VK_QUEUE_MEMMGR_BIT) )
+ if (demo->queue_props[i].queueFlags & VK_QUEUE_GRAPHICS_BIT)
break;
}
assert(i < queue_count);
for (i = 0; i < DEMO_TEXTURE_COUNT; i++) {
vkDestroyObject(demo->device, VK_OBJECT_TYPE_IMAGE_VIEW, demo->textures[i].view);
- vkQueueBindObjectMemory(demo->queue, VK_OBJECT_TYPE_IMAGE, demo->textures[i].image, 0, VK_NULL_HANDLE, 0);
+ vkBindObjectMemory(demo->device, VK_OBJECT_TYPE_IMAGE, demo->textures[i].image, 0, VK_NULL_HANDLE, 0);
vkDestroyObject(demo->device, VK_OBJECT_TYPE_IMAGE, demo->textures[i].image);
for (j = 0; j < demo->textures[i].num_mem; j++)
vkFreeMemory(demo->device, demo->textures[i].mem[j]);
vkDestroySwapChainWSI(demo->swap_chain);
vkDestroyObject(demo->device, VK_OBJECT_TYPE_DEPTH_STENCIL_VIEW, demo->depth.view);
- vkQueueBindObjectMemory(demo->queue, VK_OBJECT_TYPE_IMAGE, demo->depth.image, 0, VK_NULL_HANDLE, 0);
+ vkBindObjectMemory(demo->device, VK_OBJECT_TYPE_IMAGE, demo->depth.image, 0, VK_NULL_HANDLE, 0);
vkDestroyObject(demo->device, VK_OBJECT_TYPE_IMAGE, demo->depth.image);
for (j = 0; j < demo->depth.num_mem; j++) {
vkFreeMemory(demo->device, demo->depth.mem[j]);
}
vkDestroyObject(demo->device, VK_OBJECT_TYPE_BUFFER_VIEW, demo->uniform_data.view);
- vkQueueBindObjectMemory(demo->queue, VK_OBJECT_TYPE_BUFFER, demo->uniform_data.buf, 0, VK_NULL_HANDLE, 0);
+ vkBindObjectMemory(demo->device, VK_OBJECT_TYPE_BUFFER, demo->uniform_data.buf, 0, VK_NULL_HANDLE, 0);
vkDestroyObject(demo->device, VK_OBJECT_TYPE_BUFFER, demo->uniform_data.buf);
for (j = 0; j < demo->uniform_data.num_mem; j++)
vkFreeMemory(demo->device, demo->uniform_data.mem[j]);
assert(!err);
/* bind memory */
- err = vkQueueBindObjectMemory(demo->queue,
+ err = vkBindObjectMemory(demo->device,
VK_OBJECT_TYPE_IMAGE, demo->depth.image,
i, demo->depth.mem[i], 0);
assert(!err);
assert(!err);
/* bind memory */
- err = vkQueueBindObjectMemory(demo->queue,
+ err = vkBindObjectMemory(demo->device,
VK_OBJECT_TYPE_IMAGE, tex_obj->image,
j, tex_obj->mem[j], 0);
assert(!err);
{
/* clean up staging resources */
for (uint32_t j = 0; j < tex_obj->num_mem; j ++) {
- vkQueueBindObjectMemory(demo->queue,
+ vkBindObjectMemory(demo->device,
VK_OBJECT_TYPE_IMAGE, tex_obj->image, j, VK_NULL_HANDLE, 0);
vkFreeMemory(demo->device, tex_obj->mem[j]);
}
err = vkUnmapMemory(demo->device, demo->vertices.mem[i]);
assert(!err);
- err = vkQueueBindObjectMemory(demo->queue,
+ err = vkBindObjectMemory(demo->device,
VK_OBJECT_TYPE_BUFFER, demo->vertices.buf,
i, demo->vertices.mem[i], 0);
assert(!err);
for (i = 0; i < queue_count; i++) {
if (demo->queue_props[i].queueFlags & VK_QUEUE_GRAPHICS_BIT)
break;
- if (demo->queue_props[i].queueFlags & VK_QUEUE_MEMMGR_BIT)
- break;
}
assert(i < queue_count);
demo->graphics_queue_node_index = i;
vkDestroyObject(demo->device, VK_OBJECT_TYPE_PIPELINE_LAYOUT, demo->pipeline_layout);
vkDestroyObject(demo->device, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT, demo->desc_layout);
- vkQueueBindObjectMemory(demo->queue, VK_OBJECT_TYPE_BUFFER, demo->vertices.buf, 0, VK_NULL_HANDLE, 0);
+ vkBindObjectMemory(demo->device, VK_OBJECT_TYPE_BUFFER, demo->vertices.buf, 0, VK_NULL_HANDLE, 0);
vkDestroyObject(demo->device, VK_OBJECT_TYPE_BUFFER, demo->vertices.buf);
for (j = 0; j < demo->vertices.num_mem; j++)
vkFreeMemory(demo->device, demo->vertices.mem[j]);
for (i = 0; i < DEMO_TEXTURE_COUNT; i++) {
vkDestroyObject(demo->device, VK_OBJECT_TYPE_IMAGE_VIEW, demo->textures[i].view);
- vkQueueBindObjectMemory(demo->queue, VK_OBJECT_TYPE_IMAGE, demo->textures[i].image, 0, VK_NULL_HANDLE, 0);
+ vkBindObjectMemory(demo->device, VK_OBJECT_TYPE_IMAGE, demo->textures[i].image, 0, VK_NULL_HANDLE, 0);
vkDestroyObject(demo->device, VK_OBJECT_TYPE_IMAGE, demo->textures[i].image);
for (j = 0; j < demo->textures[i].num_mem; j++)
vkFreeMemory(demo->device, demo->textures[i].mem[j]);
}
vkDestroyObject(demo->device, VK_OBJECT_TYPE_DEPTH_STENCIL_VIEW, demo->depth.view);
- vkQueueBindObjectMemory(demo->queue, VK_OBJECT_TYPE_IMAGE, demo->depth.image, 0, VK_NULL_HANDLE, 0);
+ vkBindObjectMemory(demo->device, VK_OBJECT_TYPE_IMAGE, demo->depth.image, 0, VK_NULL_HANDLE, 0);
vkDestroyObject(demo->device, VK_OBJECT_TYPE_IMAGE, demo->depth.image);
for (j = 0; j < demo->depth.num_mem; j++) {
vkFreeMemory(demo->device, demo->depth.mem[j]);
if (pData == NULL) {
return ret;
}
- props->queueFlags = VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_MEMMGR_BIT;
+ props->queueFlags = VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_SPARSE_MEMMGR_BIT;
props->queueCount = 1;
props->maxAtomicCounters = 1;
props->supportsTimestamps = false;
return base->get_info(base, infoType, pDataSize, pData);
}
-ICD_EXPORT VkResult VKAPI vkQueueBindObjectMemory(
- VkQueue queue,
+ICD_EXPORT VkResult VKAPI vkBindObjectMemory(
+ VkDevice device,
VkObjectType objType,
VkObject object,
uint32_t allocationIdx,
return VK_SUCCESS;
}
-ICD_EXPORT VkResult VKAPI vkQueueBindObjectMemoryRange(
+ICD_EXPORT VkResult VKAPI vkQueueBindSparseBufferMemory(
VkQueue queue,
- VkObjectType objType,
- VkObject object,
+ VkBuffer buffer,
uint32_t allocationIdx,
VkDeviceSize rangeOffset,
VkDeviceSize rangeSize,
return VK_SUCCESS;
}
-ICD_EXPORT VkResult VKAPI vkQueueBindImageMemoryRange(
+ICD_EXPORT VkResult VKAPI vkQueueBindSparseImageMemory(
VkQueue queue,
VkImage image,
uint32_t allocationIdx,
PFN_vkOpenPeerImage OpenPeerImage;
PFN_vkDestroyObject DestroyObject;
PFN_vkGetObjectInfo GetObjectInfo;
- PFN_vkQueueBindObjectMemory QueueBindObjectMemory;
- PFN_vkQueueBindObjectMemoryRange QueueBindObjectMemoryRange;
- PFN_vkQueueBindImageMemoryRange QueueBindImageMemoryRange;
+ PFN_vkBindObjectMemory BindObjectMemory;
+ PFN_vkQueueBindSparseBufferMemory QueueBindSparseBufferMemory;
+ PFN_vkQueueBindSparseImageMemory QueueBindSparseImageMemory;
PFN_vkCreateFence CreateFence;
PFN_vkGetFenceStatus GetFenceStatus;
PFN_vkResetFences ResetFences;
VK_QUEUE_GRAPHICS_BIT = VK_BIT(0), // Queue supports graphics operations
VK_QUEUE_COMPUTE_BIT = VK_BIT(1), // Queue supports compute operations
VK_QUEUE_DMA_BIT = VK_BIT(2), // Queue supports DMA operations
- VK_QUEUE_MEMMGR_BIT = VK_BIT(3), // Queue supports memory management operations
+ VK_QUEUE_SPARSE_MEMMGR_BIT = VK_BIT(3), // Queue supports sparse resource memory management operations
VK_QUEUE_EXTENDED_BIT = VK_BIT(30), // Extended queue
} VkQueueFlagBits;
{
VkDeviceSize size; // Specified in bytes
VkDeviceSize alignment; // Specified in bytes
- VkDeviceSize granularity; // Granularity on which vkQueueBindObjectMemoryRange can bind sub-ranges of memory specified in bytes (usually the page size)
+ VkDeviceSize granularity; // Granularity at which memory can be bound to resource sub-ranges specified in bytes (usually the page size)
VkMemoryPropertyFlags memPropsAllowed; // Allowed memory property flags
VkMemoryPropertyFlags memPropsRequired; // Required memory property flags
} VkMemoryRequirements;
typedef VkResult (VKAPI *PFN_vkOpenPeerImage)(VkDevice device, const VkPeerImageOpenInfo* pOpenInfo, VkImage* pImage, VkDeviceMemory* pMem);
typedef VkResult (VKAPI *PFN_vkDestroyObject)(VkDevice device, VkObjectType objType, VkObject object);
typedef VkResult (VKAPI *PFN_vkGetObjectInfo)(VkDevice device, VkObjectType objType, VkObject object, VkObjectInfoType infoType, size_t* pDataSize, void* pData);
-typedef VkResult (VKAPI *PFN_vkQueueBindObjectMemory)(VkQueue queue, VkObjectType objType, VkObject object, uint32_t allocationIdx, VkDeviceMemory mem, VkDeviceSize offset);
-typedef VkResult (VKAPI *PFN_vkQueueBindObjectMemoryRange)(VkQueue queue, VkObjectType objType, VkObject object, uint32_t allocationIdx, VkDeviceSize rangeOffset, VkDeviceSize rangeSize, VkDeviceMemory mem, VkDeviceSize memOffset);
-typedef VkResult (VKAPI *PFN_vkQueueBindImageMemoryRange)(VkQueue queue, VkImage image, uint32_t allocationIdx, const VkImageMemoryBindInfo* pBindInfo, VkDeviceMemory mem, VkDeviceSize memOffset);
+typedef VkResult (VKAPI *PFN_vkBindObjectMemory)(VkDevice device, VkObjectType objType, VkObject object, uint32_t allocationIdx, VkDeviceMemory mem, VkDeviceSize offset);
+typedef VkResult (VKAPI *PFN_vkQueueBindSparseBufferMemory)(VkQueue queue, VkBuffer buffer, uint32_t allocationIdx, VkDeviceSize rangeOffset, VkDeviceSize rangeSize, VkDeviceMemory mem, VkDeviceSize memOffset);
+typedef VkResult (VKAPI *PFN_vkQueueBindSparseImageMemory)(VkQueue queue, VkImage image, uint32_t allocationIdx, const VkImageMemoryBindInfo* pBindInfo, VkDeviceMemory mem, VkDeviceSize memOffset);
typedef VkResult (VKAPI *PFN_vkCreateFence)(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence);
typedef VkResult (VKAPI *PFN_vkResetFences)(VkDevice device, uint32_t fenceCount, VkFence* pFences);
typedef VkResult (VKAPI *PFN_vkGetFenceStatus)(VkDevice device, VkFence fence);
// Memory management API functions
-VkResult VKAPI vkQueueBindObjectMemory(
- VkQueue queue,
+VkResult VKAPI vkBindObjectMemory(
+ VkDevice device,
VkObjectType objType,
VkObject object,
uint32_t allocationIdx,
VkDeviceMemory mem,
VkDeviceSize memOffset);
-VkResult VKAPI vkQueueBindObjectMemoryRange(
+VkResult VKAPI vkQueueBindSparseBufferMemory(
VkQueue queue,
- VkObjectType objType,
- VkObject object,
+ VkBuffer buffer,
uint32_t allocationIdx,
VkDeviceSize rangeOffset,
VkDeviceSize rangeSize,
VkDeviceMemory mem,
VkDeviceSize memOffset);
-VkResult VKAPI vkQueueBindImageMemoryRange(
+VkResult VKAPI vkQueueBindSparseImageMemory(
VkQueue queue,
VkImage image,
uint32_t allocationIdx,
else {
char str[1024];
sprintf(str, "Destroying obj %p that is still bound to memory object %p\nYou should first clear binding "
- "by calling vkQueueBindObjectMemory(queue, %p, 0, VK_NULL_HANDLE, 0)",
+ "by calling vkBindObjectMemory(queue, %p, 0, VK_NULL_HANDLE, 0)",
object, (void*)pDelInfo->pMemObjInfo->mem, object);
layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, object, 0, MEMTRACK_DESTROY_OBJECT_ERROR, "MEM", str);
// From the spec : If an object has previous memory binding, it is required to unbind memory
void *pData)
{
// TODO : What to track here?
- // Could potentially save returned mem requirements and validate values passed into QueueBindObjectMemory for this object
+ // Could potentially save returned mem requirements and validate values passed into BindObjectMemory for this object
// From spec : The only objects that are guaranteed to have no external memory requirements are devices, queues,
// command buffers, shaders and memory objects.
VkResult result = nextTable.GetObjectInfo(device, objType, object, infoType, pDataSize, pData);
return result;
}
-VK_LAYER_EXPORT VkResult VKAPI vkQueueBindObjectMemory(
- VkQueue queue,
+VK_LAYER_EXPORT VkResult VKAPI vkBindObjectMemory(
+ VkDevice device,
VkObjectType objType,
VkObject object,
uint32_t allocationIdx,
VkDeviceMemory mem,
VkDeviceSize offset)
{
- VkResult result = nextTable.QueueBindObjectMemory(queue, objType, object, allocationIdx, mem, offset);
+ VkResult result = nextTable.BindObjectMemory(device, objType, object, allocationIdx, mem, offset);
loader_platform_thread_lock_mutex(&globalLock);
// Track objects tied to memory
if (VK_FALSE == updateObjectBinding(object, mem)) {
return result;
}
-VK_LAYER_EXPORT VkResult VKAPI vkQueueBindObjectMemoryRange(
+VK_LAYER_EXPORT VkResult VKAPI vkQueueBindSparseBufferMemory(
VkQueue queue,
- VkObjectType objType,
- VkObject object,
+ VkBuffer buffer,
uint32_t allocationIdx,
VkDeviceSize rangeOffset,
VkDeviceSize rangeSize,
VkDeviceMemory mem,
VkDeviceSize memOffset)
{
- VkResult result = nextTable.QueueBindObjectMemoryRange(queue, objType, object, allocationIdx, rangeOffset, rangeSize, mem, memOffset);
+ VkResult result = nextTable.QueueBindSparseBufferMemory(queue, buffer, allocationIdx, rangeOffset, rangeSize, mem, memOffset);
loader_platform_thread_lock_mutex(&globalLock);
// Track objects tied to memory
- if (VK_FALSE == updateObjectBinding(object, mem)) {
+ if (VK_FALSE == updateObjectBinding(buffer, mem)) {
char str[1024];
- sprintf(str, "Unable to set object %p binding to mem obj %p", (void*)object, (void*)mem);
- layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, object, 0, MEMTRACK_MEMORY_BINDING_ERROR, "MEM", str);
+ sprintf(str, "Unable to set object %p binding to mem obj %p", (void*)buffer, (void*)mem);
+ layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, buffer, 0, MEMTRACK_MEMORY_BINDING_ERROR, "MEM", str);
}
printObjList();
printMemList();
return (void*) vkDestroyObject;
if (!strcmp(funcName, "vkGetObjectInfo"))
return (void*) vkGetObjectInfo;
- if (!strcmp(funcName, "vkQueueBindObjectMemory"))
- return (void*) vkQueueBindObjectMemory;
- if (!strcmp(funcName, "vkQueueBindObjectMemoryRange"))
- return (void*) vkQueueBindObjectMemoryRange;
+ if (!strcmp(funcName, "vkBindObjectMemory"))
+ return (void*) vkBindObjectMemory;
+ if (!strcmp(funcName, "vkQueueBindSparseBufferMemory"))
+ return (void*) vkQueueBindSparseBufferMemory;
if (!strcmp(funcName, "vkCreateFence"))
return (void*) vkCreateFence;
if (!strcmp(funcName, "vkGetFenceStatus"))
return result;
}
-VK_LAYER_EXPORT VkResult VKAPI vkQueueBindObjectMemory(VkQueue queue, VkObjectType objType, VkObject object, uint32_t allocationIdx, VkDeviceMemory mem, VkDeviceSize offset)
+VK_LAYER_EXPORT VkResult VKAPI vkBindObjectMemory(VkDevice device, VkObjectType objType, VkObject object, uint32_t allocationIdx, VkDeviceMemory mem, VkDeviceSize offset)
{
- VkResult result = nextTable.QueueBindObjectMemory(queue, objType, object, allocationIdx, mem, offset);
+ VkResult result = nextTable.BindObjectMemory(device, objType, object, allocationIdx, mem, offset);
return result;
}
-VK_LAYER_EXPORT VkResult VKAPI vkQueueBindObjectMemoryRange(VkQueue queue, VkObjectType objType, VkObject object, uint32_t allocationIdx, VkDeviceSize rangeOffset, VkDeviceSize rangeSize, VkDeviceMemory mem, VkDeviceSize memOffset)
+VK_LAYER_EXPORT VkResult VKAPI vkQueueBindSparseBufferMemory(VkQueue queue, VkBuffer buffer, uint32_t allocationIdx, VkDeviceSize rangeOffset, VkDeviceSize rangeSize, VkDeviceMemory mem, VkDeviceSize memOffset)
{
- VkResult result = nextTable.QueueBindObjectMemoryRange(queue, objType, object, allocationIdx, rangeOffset, rangeSize, mem, memOffset);
+ VkResult result = nextTable.QueueBindSparseBufferMemory(queue, buffer, allocationIdx, rangeOffset, rangeSize, mem, memOffset);
return result;
}
-VK_LAYER_EXPORT VkResult VKAPI vkQueueBindImageMemoryRange(VkQueue queue, VkImage image, uint32_t allocationIdx, const VkImageMemoryBindInfo* pBindInfo, VkDeviceMemory mem, VkDeviceSize memOffset)
+VK_LAYER_EXPORT VkResult VKAPI vkQueueBindSparseImageMemory(VkQueue queue, VkImage image, uint32_t allocationIdx, const VkImageMemoryBindInfo* pBindInfo, VkDeviceMemory mem, VkDeviceSize memOffset)
{
char str[1024];
if (!pBindInfo) {
- sprintf(str, "Struct ptr parameter pBindInfo to function QueueBindImageMemoryRange is NULL.");
+ sprintf(str, "Struct ptr parameter pBindInfo to function QueueBindSparseImageMemory is NULL.");
layerCbMsg(VK_DBG_MSG_UNKNOWN, VK_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
}
else if (!vk_validate_vkimagememorybindinfo(pBindInfo)) {
sprintf(str, "Parameter pBindInfo to function BindImageMemoryRange contains an invalid value.");
layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
}
- VkResult result = nextTable.QueueBindImageMemoryRange(queue, image, allocationIdx, pBindInfo, mem, memOffset);
+ VkResult result = nextTable.QueueBindSparseImageMemory(queue, image, allocationIdx, pBindInfo, mem, memOffset);
return result;
}
return (void*) vkDestroyObject;
if (!strcmp(name, "GetObjectInfo"))
return (void*) vkGetObjectInfo;
- if (!strcmp(name, "QueueBindObjectMemory"))
- return (void*) vkQueueBindObjectMemory;
- if (!strcmp(name, "QueueBindObjectMemoryRange"))
- return (void*) vkQueueBindObjectMemoryRange;
- if (!strcmp(name, "QueueBindImageMemoryRange"))
- return (void*) vkQueueBindImageMemoryRange;
+ if (!strcmp(name, "BindObjectMemory"))
+ return (void*) vkBindObjectMemory;
+ if (!strcmp(name, "QueueBindSparseBufferMemory"))
+ return (void*) vkQueueBindSparseBufferMemory;
+ if (!strcmp(name, "QueueBindSparseImageMemory"))
+ return (void*) vkQueueBindSparseImageMemory;
if (!strcmp(name, "CreateFence"))
return (void*) vkCreateFence;
if (!strcmp(name, "ResetFences"))
table->OpenPeerImage = (PFN_vkOpenPeerImage) gpa(gpu, "vkOpenPeerImage");
table->DestroyObject = (PFN_vkDestroyObject) gpa(gpu, "vkDestroyObject");
table->GetObjectInfo = (PFN_vkGetObjectInfo) gpa(gpu, "vkGetObjectInfo");
- table->QueueBindObjectMemory = (PFN_vkQueueBindObjectMemory) gpa(gpu, "vkQueueBindObjectMemory");
- table->QueueBindObjectMemoryRange = (PFN_vkQueueBindObjectMemoryRange) gpa(gpu, "vkQueueBindObjectMemoryRange");
- table->QueueBindImageMemoryRange = (PFN_vkQueueBindImageMemoryRange) gpa(gpu, "vkQueueBindImageMemoryRange");
+ table->BindObjectMemory = (PFN_vkBindObjectMemory) gpa(gpu, "vkBindObjectMemory");
+ table->QueueBindSparseBufferMemory = (PFN_vkQueueBindSparseBufferMemory) gpa(gpu, "vkQueueBindSparseBufferMemory");
+ table->QueueBindSparseImageMemory = (PFN_vkQueueBindSparseImageMemory) gpa(gpu, "vkQueueBindSparseImageMemory");
table->CreateFence = (PFN_vkCreateFence) gpa(gpu, "vkCreateFence");
table->ResetFences = (PFN_vkResetFences) gpa(gpu, "vkResetFences");
table->GetFenceStatus = (PFN_vkGetFenceStatus) gpa(gpu, "vkGetFenceStatus");
return (void *) table->DestroyObject;
if (!strcmp(name, "GetObjectInfo"))
return (void *) table->GetObjectInfo;
- if (!strcmp(name, "QueueBindObjectMemory"))
- return (void *) table->QueueBindObjectMemory;
- if (!strcmp(name, "QueueBindObjectMemoryRange"))
- return (void *) table->QueueBindObjectMemoryRange;
- if (!strcmp(name, "QueueBindImageMemoryRange"))
- return (void *) table->QueueBindImageMemoryRange;
+ if (!strcmp(name, "BindObjectMemory"))
+ return (void *) table->BindObjectMemory;
+ if (!strcmp(name, "QueueBindSparseBufferMemory"))
+ return (void *) table->QueueBindSparseBufferMemory;
+ if (!strcmp(name, "QueueBindSparseImageMemory"))
+ return (void *) table->QueueBindSparseImageMemory;
if (!strcmp(name, "CreateFence"))
return (void *) table->CreateFence;
if (!strcmp(name, "ResetFences"))
return disp->GetObjectInfo(device, objType, object, infoType, pDataSize, pData);
}
-LOADER_EXPORT VkResult VKAPI vkQueueBindObjectMemory(VkQueue queue, VkObjectType objType, VkObject object, uint32_t allocationIdx, VkDeviceMemory mem, VkDeviceSize offset)
+LOADER_EXPORT VkResult VKAPI vkBindObjectMemory(VkDevice device, VkObjectType objType, VkObject object, uint32_t allocationIdx, VkDeviceMemory mem, VkDeviceSize offset)
{
const VkLayerDispatchTable *disp;
- disp = loader_get_dispatch(queue);
+ disp = loader_get_dispatch(device);
- return disp->QueueBindObjectMemory(queue, objType, object, allocationIdx, mem, offset);
+ return disp->BindObjectMemory(device, objType, object, allocationIdx, mem, offset);
}
-LOADER_EXPORT VkResult VKAPI vkQueueBindObjectMemoryRange(VkQueue queue, VkObjectType objType, VkObject object, uint32_t allocationIdx, VkDeviceSize rangeOffset, VkDeviceSize rangeSize, VkDeviceMemory mem, VkDeviceSize memOffset)
+LOADER_EXPORT VkResult VKAPI vkQueueBindSparseBufferMemory(VkQueue queue, VkBuffer buffer, uint32_t allocationIdx, VkDeviceSize rangeOffset, VkDeviceSize rangeSize, VkDeviceMemory mem, VkDeviceSize memOffset)
{
const VkLayerDispatchTable *disp;
disp = loader_get_dispatch(queue);
- return disp->QueueBindObjectMemoryRange(queue, objType, object, allocationIdx, rangeOffset, rangeSize, mem, memOffset);
+ return disp->QueueBindSparseBufferMemory(queue, buffer, allocationIdx, rangeOffset, rangeSize, mem, memOffset);
}
-LOADER_EXPORT VkResult VKAPI vkQueueBindImageMemoryRange(VkQueue queue, VkImage image, uint32_t allocationIdx, const VkImageMemoryBindInfo* pBindInfo, VkDeviceMemory mem, VkDeviceSize memOffset)
+LOADER_EXPORT VkResult VKAPI vkQueueBindSparseImageMemory(VkQueue queue, VkImage image, uint32_t allocationIdx, const VkImageMemoryBindInfo* pBindInfo, VkDeviceMemory mem, VkDeviceSize memOffset)
{
const VkLayerDispatchTable *disp;
disp = loader_get_dispatch(queue);
- return disp->QueueBindImageMemoryRange(queue, image, allocationIdx, pBindInfo, mem, memOffset);
+ return disp->QueueBindSparseImageMemory(queue, image, allocationIdx, pBindInfo, mem, memOffset);
}
LOADER_EXPORT VkResult VKAPI vkCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, VkFence* pFence)
vkOpenPeerImage
vkDestroyObject
vkGetObjectInfo
- vkQueueBindObjectMemory
- vkQueueBindObjectMemoryRange
- vkQueueBindImageMemoryRange
+ vkBindObjectMemory
+ vkQueueBindSparseBufferMemory
+ vkQueueBindSparseImageMemory
vkCreateFence
vkResetFences
vkGetFenceStatus
header_txt.append(' }')
header_txt.append(' if (pQueueInfo != NULL) {')
header_txt.append(' char str[1024];\n')
- header_txt.append(' if ((queueInfo != NULL) && (queueInfo[pQueueInfo->queueNodeIndex].queueFlags & VK_QUEUE_MEMMGR_BIT) == 0) {')
- header_txt.append(' sprintf(str, "Attempting %s on a non-memory-management capable queue -- VK_QUEUE_MEMMGR_BIT not set", function);')
+ header_txt.append(' if ((queueInfo != NULL) && (queueInfo[pQueueInfo->queueNodeIndex].queueFlags & VK_QUEUE_SPARSE_MEMMGR_BIT) == 0) {')
+ header_txt.append(' sprintf(str, "Attempting %s on a non-memory-management capable queue -- VK_QUEUE_SPARSE_MEMMGR_BIT not set", function);')
header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, queue, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK", str);')
header_txt.append(' } else {')
- header_txt.append(' sprintf(str, "Attempting %s on a possibly non-memory-management capable queue -- VK_QUEUE_MEMMGR_BIT not known", function);')
+ header_txt.append(' sprintf(str, "Attempting %s on a possibly non-memory-management capable queue -- VK_QUEUE_SPARSE_MEMMGR_BIT not known", function);')
header_txt.append(' layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, queue, 0, OBJTRACK_UNKNOWN_OBJECT, "OBJTRACK", str);')
header_txt.append(' }')
header_txt.append(' }')
using_line += ' // validate_memory_mapping_status(pMemRefs, memRefCount);\n'
using_line += ' // validate_mem_ref_count(memRefCount);\n'
using_line += ' loader_platform_thread_unlock_mutex(&objLock);\n'
- elif 'QueueBindObjectMemoryRange' in proto.name:
+ elif 'QueueBindSparse' in proto.name:
using_line = ' loader_platform_thread_lock_mutex(&objLock);\n'
- using_line += ' validateObjectType("vk%s", objType, object);\n' % (proto.name)
using_line += ' validateQueueFlags(queue, "%s");\n' % (proto.name)
using_line += ' loader_platform_thread_unlock_mutex(&objLock);\n'
elif 'QueueBindObject' in proto.name:
using_line = ' loader_platform_thread_lock_mutex(&objLock);\n'
using_line += ' validateObjectType("vk%s", objType, object);\n' % (proto.name)
using_line += ' loader_platform_thread_unlock_mutex(&objLock);\n'
- elif 'QueueBindImage' in proto.name:
- using_line = ' loader_platform_thread_lock_mutex(&objLock);\n'
- using_line += ' validateQueueFlags(queue, "%s");\n' % (proto.name)
- using_line += ' loader_platform_thread_unlock_mutex(&objLock);\n'
elif 'GetObjectInfo' in proto.name:
using_line = ' loader_platform_thread_lock_mutex(&objLock);\n'
using_line += ' validateObjectType("vk%s", objType, object);\n' % (proto.name)
Param("size_t*", "pDataSize"),
Param("void*", "pData")]),
- Proto("VkResult", "QueueBindObjectMemory",
- [Param("VkQueue", "queue"),
+ Proto("VkResult", "BindObjectMemory",
+ [Param("VkDevice", "device"),
Param("VkObjectType", "objType"),
Param("VkObject", "object"),
Param("uint32_t", "allocationIdx"),
Param("VkDeviceMemory", "mem"),
Param("VkDeviceSize", "offset")]),
- Proto("VkResult", "QueueBindObjectMemoryRange",
+ Proto("VkResult", "QueueBindSparseBufferMemory",
[Param("VkQueue", "queue"),
- Param("VkObjectType", "objType"),
- Param("VkObject", "object"),
+ Param("VkBuffer", "buffer"),
Param("uint32_t", "allocationIdx"),
Param("VkDeviceSize", "rangeOffset"),
Param("VkDeviceSize", "rangeSize"),
Param("VkDeviceMemory", "mem"),
Param("VkDeviceSize", "memOffset")]),
- Proto("VkResult", "QueueBindImageMemoryRange",
+ Proto("VkResult", "QueueBindSparseImageMemory",
[Param("VkQueue", "queue"),
Param("VkImage", "image"),
Param("uint32_t", "allocationIdx"),