v143: Bug 14277 - Follow pointer naming convention in VkSubpassDescription
authorCody Northrop <cody@lunarg.com>
Tue, 4 Aug 2015 17:16:41 +0000 (11:16 -0600)
committerCody Northrop <cody@lunarg.com>
Tue, 4 Aug 2015 23:37:03 +0000 (17:37 -0600)
demos/cube.c
demos/tri.c
include/vulkan.h
layers/draw_state.cpp
layers/param_checker.cpp
layers/shader_checker.cpp

index 2c1acd3..bb07c18 100644 (file)
@@ -1372,16 +1372,16 @@ static void demo_prepare_render_pass(struct demo *demo)
         .pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS,
         .flags = 0,
         .inputCount = 0,
-        .inputAttachments = NULL,
+        .pInputAttachments = NULL,
         .colorCount = 1,
-        .colorAttachments = &color_reference,
-        .resolveAttachments = NULL,
+        .pColorAttachments = &color_reference,
+        .pResolveAttachments = NULL,
         .depthStencilAttachment = {
             .attachment = 1,
             .layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
         },
         .preserveCount = 0,
-        .preserveAttachments = NULL,
+        .pPreserveAttachments = NULL,
     };
     const VkRenderPassCreateInfo rp_info = {
         .sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,
index 134e261..b9e4e02 100644 (file)
@@ -1019,16 +1019,16 @@ static void demo_prepare_render_pass(struct demo *demo)
         .pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS,
         .flags = 0,
         .inputCount = 0,
-        .inputAttachments = NULL,
+        .pInputAttachments = NULL,
         .colorCount = 1,
-        .colorAttachments = &color_reference,
-        .resolveAttachments = NULL,
+        .pColorAttachments = &color_reference,
+        .pResolveAttachments = NULL,
         .depthStencilAttachment = {
             .attachment = 1,
             .layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
         },
         .preserveCount = 0,
-        .preserveAttachments = NULL,
+        .pPreserveAttachments = NULL,
     };
     const VkRenderPassCreateInfo rp_info = {
         .sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,
index 33ccde7..bb70391 100644 (file)
@@ -41,7 +41,7 @@ extern "C" {
     ((major << 22) | (minor << 12) | patch)
 
 // Vulkan API version supported by this file
-#define VK_API_VERSION VK_MAKE_VERSION(0, 142, 0)
+#define VK_API_VERSION VK_MAKE_VERSION(0, 143, 0)
 
 
 #define VK_DEFINE_HANDLE(obj) typedef struct obj##_T* obj;
@@ -1894,13 +1894,13 @@ typedef struct {
     VkPipelineBindPoint                         pipelineBindPoint;
     VkSubpassDescriptionFlags                   flags;
     uint32_t                                    inputCount;
-    const VkAttachmentReference*                inputAttachments;
+    const VkAttachmentReference*                pInputAttachments;
     uint32_t                                    colorCount;
-    const VkAttachmentReference*                colorAttachments;
-    const VkAttachmentReference*                resolveAttachments;
+    const VkAttachmentReference*                pColorAttachments;
+    const VkAttachmentReference*                pResolveAttachments;
     VkAttachmentReference                       depthStencilAttachment;
     uint32_t                                    preserveCount;
-    const VkAttachmentReference*                preserveAttachments;
+    const VkAttachmentReference*                pPreserveAttachments;
 } VkSubpassDescription;
 
 typedef struct {
index b8b9df1..2ced664 100644 (file)
@@ -644,10 +644,10 @@ static void validatePipelineState(const GLOBAL_CB_NODE* pCB, const VkPipelineBin
             for (i = 0; i < pSD->colorCount; i++) {
                 uint32_t samples;
 
-                if (pSD->colorAttachments[i].attachment == VK_ATTACHMENT_UNUSED)
+                if (pSD->pColorAttachments[i].attachment == VK_ATTACHMENT_UNUSED)
                     continue;
 
-                samples = pRPCI->pAttachments[pSD->colorAttachments[i].attachment].samples;
+                samples = pRPCI->pAttachments[pSD->pColorAttachments[i].attachment].samples;
                 if (subpassNumSamples == 0) {
                     subpassNumSamples = samples;
                 } else if (subpassNumSamples != samples) {
@@ -2808,30 +2808,30 @@ VK_LAYER_EXPORT VkResult VKAPI vkCreateRenderPass(VkDevice device, const VkRende
             for (uint32_t i = 0; i < localRPCI->subpassCount; i++) {
                 VkSubpassDescription *subpass = (VkSubpassDescription *) &localRPCI->pSubpasses[i];
                 const uint32_t attachmentCount = subpass->inputCount +
-                    subpass->colorCount * (1 + (subpass->resolveAttachments?1:0)) +
+                    subpass->colorCount * (1 + (subpass->pResolveAttachments?1:0)) +
                     subpass->preserveCount;
                 VkAttachmentReference *attachments = new VkAttachmentReference[attachmentCount];
 
-                memcpy(attachments, subpass->inputAttachments,
+                memcpy(attachments, subpass->pInputAttachments,
                         sizeof(attachments[0]) * subpass->inputCount);
-                subpass->inputAttachments = attachments;
+                subpass->pInputAttachments = attachments;
                 attachments += subpass->inputCount;
 
-                memcpy(attachments, subpass->colorAttachments,
+                memcpy(attachments, subpass->pColorAttachments,
                         sizeof(attachments[0]) * subpass->colorCount);
-                subpass->colorAttachments = attachments;
+                subpass->pColorAttachments = attachments;
                 attachments += subpass->colorCount;
 
-                if (subpass->resolveAttachments) {
-                    memcpy(attachments, subpass->resolveAttachments,
+                if (subpass->pResolveAttachments) {
+                    memcpy(attachments, subpass->pResolveAttachments,
                             sizeof(attachments[0]) * subpass->colorCount);
-                    subpass->resolveAttachments = attachments;
+                    subpass->pResolveAttachments = attachments;
                     attachments += subpass->colorCount;
                 }
 
-                memcpy(attachments, subpass->preserveAttachments,
+                memcpy(attachments, subpass->pPreserveAttachments,
                         sizeof(attachments[0]) * subpass->preserveCount);
-                subpass->preserveAttachments = attachments;
+                subpass->pPreserveAttachments = attachments;
             }
         }
         if (pCreateInfo->pDependencies) {
index 1547fbb..81acf89 100644 (file)
@@ -6287,33 +6287,33 @@ bool PreCreateRenderPass(
         "vkCreateRenderPass parameter, VkPipelineBindPoint pCreateInfo->pSubpasses->pipelineBindPoint, is an unrecognized enumerator");
         return false;
     }
-    if(pCreateInfo->pSubpasses->inputAttachments != nullptr)
+    if(pCreateInfo->pSubpasses->pInputAttachments != nullptr)
     {
-    if(pCreateInfo->pSubpasses->inputAttachments->layout < VK_IMAGE_LAYOUT_BEGIN_RANGE ||
-        pCreateInfo->pSubpasses->inputAttachments->layout > VK_IMAGE_LAYOUT_END_RANGE)
+    if(pCreateInfo->pSubpasses->pInputAttachments->layout < VK_IMAGE_LAYOUT_BEGIN_RANGE ||
+        pCreateInfo->pSubpasses->pInputAttachments->layout > VK_IMAGE_LAYOUT_END_RANGE)
     {
         log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType)0, 0, 0, 1, "PARAMCHECK",
-        "vkCreateRenderPass parameter, VkImageLayout pCreateInfo->pSubpasses->inputAttachments->layout, is an unrecognized enumerator");
+        "vkCreateRenderPass parameter, VkImageLayout pCreateInfo->pSubpasses->pInputAttachments->layout, is an unrecognized enumerator");
         return false;
     }
     }
-    if(pCreateInfo->pSubpasses->colorAttachments != nullptr)
+    if(pCreateInfo->pSubpasses->pColorAttachments != nullptr)
     {
-    if(pCreateInfo->pSubpasses->colorAttachments->layout < VK_IMAGE_LAYOUT_BEGIN_RANGE ||
-        pCreateInfo->pSubpasses->colorAttachments->layout > VK_IMAGE_LAYOUT_END_RANGE)
+    if(pCreateInfo->pSubpasses->pColorAttachments->layout < VK_IMAGE_LAYOUT_BEGIN_RANGE ||
+        pCreateInfo->pSubpasses->pColorAttachments->layout > VK_IMAGE_LAYOUT_END_RANGE)
     {
         log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType)0, 0, 0, 1, "PARAMCHECK",
-        "vkCreateRenderPass parameter, VkImageLayout pCreateInfo->pSubpasses->colorAttachments->layout, is an unrecognized enumerator");
+        "vkCreateRenderPass parameter, VkImageLayout pCreateInfo->pSubpasses->pColorAttachments->layout, is an unrecognized enumerator");
         return false;
     }
     }
-    if(pCreateInfo->pSubpasses->resolveAttachments != nullptr)
+    if(pCreateInfo->pSubpasses->pResolveAttachments != nullptr)
     {
-    if(pCreateInfo->pSubpasses->resolveAttachments->layout < VK_IMAGE_LAYOUT_BEGIN_RANGE ||
-        pCreateInfo->pSubpasses->resolveAttachments->layout > VK_IMAGE_LAYOUT_END_RANGE)
+    if(pCreateInfo->pSubpasses->pResolveAttachments->layout < VK_IMAGE_LAYOUT_BEGIN_RANGE ||
+        pCreateInfo->pSubpasses->pResolveAttachments->layout > VK_IMAGE_LAYOUT_END_RANGE)
     {
         log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType)0, 0, 0, 1, "PARAMCHECK",
-        "vkCreateRenderPass parameter, VkImageLayout pCreateInfo->pSubpasses->resolveAttachments->layout, is an unrecognized enumerator");
+        "vkCreateRenderPass parameter, VkImageLayout pCreateInfo->pSubpasses->pResolveAttachments->layout, is an unrecognized enumerator");
         return false;
     }
     }
@@ -6324,13 +6324,13 @@ bool PreCreateRenderPass(
         "vkCreateRenderPass parameter, VkImageLayout pCreateInfo->pSubpasses->depthStencilAttachment.layout, is an unrecognized enumerator");
         return false;
     }
-    if(pCreateInfo->pSubpasses->preserveAttachments != nullptr)
+    if(pCreateInfo->pSubpasses->pPreserveAttachments != nullptr)
     {
-    if(pCreateInfo->pSubpasses->preserveAttachments->layout < VK_IMAGE_LAYOUT_BEGIN_RANGE ||
-        pCreateInfo->pSubpasses->preserveAttachments->layout > VK_IMAGE_LAYOUT_END_RANGE)
+    if(pCreateInfo->pSubpasses->pPreserveAttachments->layout < VK_IMAGE_LAYOUT_BEGIN_RANGE ||
+        pCreateInfo->pSubpasses->pPreserveAttachments->layout > VK_IMAGE_LAYOUT_END_RANGE)
     {
         log_msg(mdd(device), VK_DBG_REPORT_ERROR_BIT, (VkDbgObjectType)0, 0, 0, 1, "PARAMCHECK",
-        "vkCreateRenderPass parameter, VkImageLayout pCreateInfo->pSubpasses->preserveAttachments->layout, is an unrecognized enumerator");
+        "vkCreateRenderPass parameter, VkImageLayout pCreateInfo->pSubpasses->pPreserveAttachments->layout, is an unrecognized enumerator");
         return false;
     }
     }
index a8bfaed..de83b90 100644 (file)
@@ -186,7 +186,7 @@ struct render_pass {
 
             color_formats.reserve(subpass->colorCount);
             for (j = 0; j < subpass->colorCount; j++) {
-                const uint32_t att = subpass->colorAttachments[j].attachment;
+                const uint32_t att = subpass->pColorAttachments[j].attachment;
                 const VkFormat format = pCreateInfo->pAttachments[att].format;
 
                 color_formats.push_back(pCreateInfo->pAttachments[att].format);