This is part of r30446 on vulkan.h, discussed in bug 13632.
Meaty chunks of this commit done by Olv, basic hook up and testing by Cody.
vkCmdBindPipeline(cmd_buf, VK_PIPELINE_BIND_POINT_GRAPHICS,
demo->pipeline);
vkCmdBindDescriptorSets(cmd_buf, VK_PIPELINE_BIND_POINT_GRAPHICS,
- demo->desc_layout_chain, 0, 1, &demo->desc_set, NULL);
+ 0, 1, &demo->desc_set, NULL);
vkCmdBindDynamicStateObject(cmd_buf, VK_STATE_BIND_POINT_VIEWPORT, demo->viewport);
vkCmdBindDynamicStateObject(cmd_buf, VK_STATE_BIND_POINT_RASTER, demo->raster);
vkCmdBindPipeline(demo->cmd, VK_PIPELINE_BIND_POINT_GRAPHICS,
demo->pipeline);
vkCmdBindDescriptorSets(demo->cmd, VK_PIPELINE_BIND_POINT_GRAPHICS,
- demo->desc_layout_chain, 0, 1, & demo->desc_set, NULL);
+ 0, 1, & demo->desc_set, NULL);
vkCmdBindDynamicStateObject(demo->cmd, VK_STATE_BIND_POINT_VIEWPORT, demo->viewport);
vkCmdBindDynamicStateObject(demo->cmd, VK_STATE_BIND_POINT_RASTER, demo->raster);
ICD_EXPORT void VKAPI vkCmdBindDescriptorSets(
VkCmdBuffer cmdBuffer,
VkPipelineBindPoint pipelineBindPoint,
- VkDescriptorSetLayoutChain layoutChain,
uint32_t layoutChainSlot,
uint32_t count,
const VkDescriptorSet* pDescriptorSets,
typedef VkResult (VKAPI *PFN_vkResetCommandBuffer)(VkCmdBuffer cmdBuffer);
typedef void (VKAPI *PFN_vkCmdBindPipeline)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
typedef void (VKAPI *PFN_vkCmdBindDynamicStateObject)(VkCmdBuffer cmdBuffer, VkStateBindPoint stateBindPoint, VkDynamicStateObject state);
-typedef void (VKAPI *PFN_vkCmdBindDescriptorSets)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkDescriptorSetLayoutChain layoutChain, uint32_t layoutChainSlot, uint32_t count, const VkDescriptorSet* pDescriptorSets, const uint32_t* pUserData);
+typedef void (VKAPI *PFN_vkCmdBindDescriptorSets)(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t layoutChainSlot, uint32_t count, const VkDescriptorSet* pDescriptorSets, const uint32_t* pUserData);
typedef void (VKAPI *PFN_vkCmdBindIndexBuffer)(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
typedef void (VKAPI *PFN_vkCmdBindVertexBuffers)(VkCmdBuffer cmdBuffer, uint32_t startBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
typedef void (VKAPI *PFN_vkCmdDraw)(VkCmdBuffer cmdBuffer, uint32_t firstVertex, uint32_t vertexCount, uint32_t firstInstance, uint32_t instanceCount);
void VKAPI vkCmdBindDescriptorSets(
VkCmdBuffer cmdBuffer,
VkPipelineBindPoint pipelineBindPoint,
- VkDescriptorSetLayoutChain layoutChain,
uint32_t layoutChainSlot,
uint32_t count,
const VkDescriptorSet* pDescriptorSets,
nextTable.CmdBindDynamicStateObject(cmdBuffer, stateBindPoint, state);
}
-VK_LAYER_EXPORT void VKAPI vkCmdBindDescriptorSets(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkDescriptorSetLayoutChain layoutChain, uint32_t layoutChainSlot, uint32_t count, const VkDescriptorSet* pDescriptorSets, const uint32_t* pUserData)
+VK_LAYER_EXPORT void VKAPI vkCmdBindDescriptorSets(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t layoutChainSlot, uint32_t count, const VkDescriptorSet* pDescriptorSets, const uint32_t* pUserData)
{
GLOBAL_CB_NODE* pCB = getCBNode(cmdBuffer);
if (pCB) {
sprintf(str, "Attempt to use CmdBuffer %p that doesn't exist!", (void*)cmdBuffer);
layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, cmdBuffer, 0, DRAWSTATE_INVALID_CMD_BUFFER, "DS", str);
}
- nextTable.CmdBindDescriptorSets(cmdBuffer, pipelineBindPoint, layoutChain, layoutChainSlot, count, pDescriptorSets, pUserData);
+ nextTable.CmdBindDescriptorSets(cmdBuffer, pipelineBindPoint, layoutChainSlot, count, pDescriptorSets, pUserData);
}
VK_LAYER_EXPORT void VKAPI vkCmdBindIndexBuffer(VkCmdBuffer cmdBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType)
VK_LAYER_EXPORT void VKAPI vkCmdBindDescriptorSets(
VkCmdBuffer cmdBuffer,
VkPipelineBindPoint pipelineBindPoint,
- VkDescriptorSetLayoutChain layoutChain,
uint32_t layoutChainSlot,
uint32_t count,
const VkDescriptorSet* pDescriptorSets,
const uint32_t* pUserData)
{
// TODO : Somewhere need to verify that all textures referenced by shaders in DS are in some type of *SHADER_READ* state
- nextTable.CmdBindDescriptorSets(cmdBuffer, pipelineBindPoint, layoutChain, layoutChainSlot, count, pDescriptorSets, pUserData);
+ nextTable.CmdBindDescriptorSets(cmdBuffer, pipelineBindPoint, layoutChainSlot, count, pDescriptorSets, pUserData);
}
VK_LAYER_EXPORT void VKAPI vkCmdBindVertexBuffers(
nextTable.CmdBindDynamicStateObject(cmdBuffer, stateBindPoint, state);
}
-VK_LAYER_EXPORT void VKAPI vkCmdBindDescriptorSets(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, VkDescriptorSetLayoutChain layoutChain, uint32_t layoutChainSlot, uint32_t count, const VkDescriptorSet* pDescriptorSets, const uint32_t* pUserData)
+VK_LAYER_EXPORT void VKAPI vkCmdBindDescriptorSets(VkCmdBuffer cmdBuffer, VkPipelineBindPoint pipelineBindPoint, uint32_t layoutChainSlot, uint32_t count, const VkDescriptorSet* pDescriptorSets, const uint32_t* pUserData)
{
char str[1024];
if (!validate_VkPipelineBindPoint(pipelineBindPoint)) {
sprintf(str, "Parameter pipelineBindPoint to function CmdBindDescriptorSets has invalid value of %i.", (int)pipelineBindPoint);
layerCbMsg(VK_DBG_MSG_ERROR, VK_VALIDATION_LEVEL_0, NULL, 0, 1, "PARAMCHECK", str);
}
- nextTable.CmdBindDescriptorSets(cmdBuffer, pipelineBindPoint, layoutChain, layoutChainSlot, count, pDescriptorSets, pUserData);
+ nextTable.CmdBindDescriptorSets(cmdBuffer, pipelineBindPoint, layoutChainSlot, count, pDescriptorSets, pUserData);
}
VK_LAYER_EXPORT void VKAPI vkCmdBindVertexBuffers(
return it->second;
}
- layer_initialize_dispatch_table(pTable, gpuw->pGPA, (VkPhysicalGpu) gpuw->nextObject);
+ layer_initialize_dispatch_table(pTable, gpuw->pGPA, (VkPhysicalDevice) gpuw->nextObject);
return pTable;
}
-VK_LAYER_EXPORT VkResult VKAPI vkCreateDevice(VkPhysicalGpu gpu, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice)
+VK_LAYER_EXPORT VkResult VKAPI vkCreateDevice(VkPhysicalDevice gpu, const VkDeviceCreateInfo* pCreateInfo, VkDevice* pDevice)
{
VkLayerDispatchTable* pTable = tableMap[gpu];
VkResult result = pTable->CreateDevice(gpu, pCreateInfo, pDevice);
}
-VK_LAYER_EXPORT VkResult VKAPI vkEnumerateLayers(VkPhysicalGpu gpu, size_t maxLayerCount, size_t maxStringSize, size_t* pOutLayerCount, char* const* pOutLayers, void* pReserved)
+VK_LAYER_EXPORT VkResult VKAPI vkEnumerateLayers(VkPhysicalDevice gpu, size_t maxLayerCount, size_t maxStringSize, size_t* pOutLayerCount, char* const* pOutLayers, void* pReserved)
{
if (pOutLayerCount == NULL || pOutLayers == NULL || pOutLayers[0] == NULL || pOutLayers[1] == NULL || pReserved == NULL)
return VK_ERROR_INVALID_POINTER;
static unsigned
get_format_type(VkFormat fmt) {
switch (fmt) {
- case VK_FMT_UNDEFINED:
+ case VK_FORMAT_UNDEFINED:
return FORMAT_TYPE_UNDEFINED;
- case VK_FMT_R8_SINT:
- case VK_FMT_R8G8_SINT:
- case VK_FMT_R8G8B8_SINT:
- case VK_FMT_R8G8B8A8_SINT:
- case VK_FMT_R16_SINT:
- case VK_FMT_R16G16_SINT:
- case VK_FMT_R16G16B16_SINT:
- case VK_FMT_R16G16B16A16_SINT:
- case VK_FMT_R32_SINT:
- case VK_FMT_R32G32_SINT:
- case VK_FMT_R32G32B32_SINT:
- case VK_FMT_R32G32B32A32_SINT:
- case VK_FMT_B8G8R8_SINT:
- case VK_FMT_B8G8R8A8_SINT:
- case VK_FMT_R10G10B10A2_SINT:
- case VK_FMT_B10G10R10A2_SINT:
+ case VK_FORMAT_R8_SINT:
+ case VK_FORMAT_R8G8_SINT:
+ case VK_FORMAT_R8G8B8_SINT:
+ case VK_FORMAT_R8G8B8A8_SINT:
+ case VK_FORMAT_R16_SINT:
+ case VK_FORMAT_R16G16_SINT:
+ case VK_FORMAT_R16G16B16_SINT:
+ case VK_FORMAT_R16G16B16A16_SINT:
+ case VK_FORMAT_R32_SINT:
+ case VK_FORMAT_R32G32_SINT:
+ case VK_FORMAT_R32G32B32_SINT:
+ case VK_FORMAT_R32G32B32A32_SINT:
+ case VK_FORMAT_B8G8R8_SINT:
+ case VK_FORMAT_B8G8R8A8_SINT:
+ case VK_FORMAT_R10G10B10A2_SINT:
+ case VK_FORMAT_B10G10R10A2_SINT:
return FORMAT_TYPE_SINT;
- case VK_FMT_R8_UINT:
- case VK_FMT_R8G8_UINT:
- case VK_FMT_R8G8B8_UINT:
- case VK_FMT_R8G8B8A8_UINT:
- case VK_FMT_R16_UINT:
- case VK_FMT_R16G16_UINT:
- case VK_FMT_R16G16B16_UINT:
- case VK_FMT_R16G16B16A16_UINT:
- case VK_FMT_R32_UINT:
- case VK_FMT_R32G32_UINT:
- case VK_FMT_R32G32B32_UINT:
- case VK_FMT_R32G32B32A32_UINT:
- case VK_FMT_B8G8R8_UINT:
- case VK_FMT_B8G8R8A8_UINT:
- case VK_FMT_R10G10B10A2_UINT:
- case VK_FMT_B10G10R10A2_UINT:
+ case VK_FORMAT_R8_UINT:
+ case VK_FORMAT_R8G8_UINT:
+ case VK_FORMAT_R8G8B8_UINT:
+ case VK_FORMAT_R8G8B8A8_UINT:
+ case VK_FORMAT_R16_UINT:
+ case VK_FORMAT_R16G16_UINT:
+ case VK_FORMAT_R16G16B16_UINT:
+ case VK_FORMAT_R16G16B16A16_UINT:
+ case VK_FORMAT_R32_UINT:
+ case VK_FORMAT_R32G32_UINT:
+ case VK_FORMAT_R32G32B32_UINT:
+ case VK_FORMAT_R32G32B32A32_UINT:
+ case VK_FORMAT_B8G8R8_UINT:
+ case VK_FORMAT_B8G8R8A8_UINT:
+ case VK_FORMAT_R10G10B10A2_UINT:
+ case VK_FORMAT_B10G10R10A2_UINT:
return FORMAT_TYPE_UINT;
default:
return FORMAT_TYPE_FLOAT;
}
-VK_LAYER_EXPORT void * VKAPI vkGetProcAddr(VkPhysicalGpu gpu, const char* pName)
+VK_LAYER_EXPORT void * VKAPI vkGetProcAddr(VkPhysicalDevice gpu, const char* pName)
{
if (gpu == NULL)
return NULL;
VkBaseLayerObject* gpuw = (VkBaseLayerObject *) gpu;
if (gpuw->pGPA == NULL)
return NULL;
- return gpuw->pGPA((VkPhysicalGpu) gpuw->nextObject, pName);
+ return gpuw->pGPA((VkPhysicalDevice) gpuw->nextObject, pName);
}
Proto("void", "CmdBindDescriptorSets",
[Param("VkCmdBuffer", "cmdBuffer"),
Param("VkPipelineBindPoint", "pipelineBindPoint"),
- Param("VkDescriptorSetLayoutChain", "layoutChain"),
Param("uint32_t", "layoutChainSlot"),
Param("uint32_t", "count"),
Param("const VkDescriptorSet*", "pDescriptorSets"),