summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-11-30 17:00:30 -0800
committerJason Ekstrand <[email protected]>2015-12-03 13:43:51 -0800
commite673d642090e6a6fe339570726e52b9191b89d3e (patch)
tree8761eed73c7db507d8af24aac6bf7a27eaa0aa2e
parentfd53603e4259adee7ce976050412309b5a0550cb (diff)
vk/0.210.0: Change field names in vertex input structs
-rw-r--r--include/vulkan/vulkan.h8
-rw-r--r--src/vulkan/anv_meta.c14
-rw-r--r--src/vulkan/anv_meta_clear.c22
-rw-r--r--src/vulkan/anv_pipeline.c4
-rw-r--r--src/vulkan/gen7_pipeline.c11
-rw-r--r--src/vulkan/gen8_pipeline.c14
6 files changed, 37 insertions, 36 deletions
diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h
index 3a428ca54e6..93c4047da9e 100644
--- a/include/vulkan/vulkan.h
+++ b/include/vulkan/vulkan.h
@@ -1598,7 +1598,7 @@ typedef struct VkPipelineShaderStageCreateInfo {
typedef struct VkVertexInputBindingDescription {
uint32_t binding;
- uint32_t strideInBytes;
+ uint32_t stride;
VkVertexInputRate inputRate;
} VkVertexInputBindingDescription;
@@ -1606,15 +1606,15 @@ typedef struct VkVertexInputAttributeDescription {
uint32_t location;
uint32_t binding;
VkFormat format;
- uint32_t offsetInBytes;
+ uint32_t offset;
} VkVertexInputAttributeDescription;
typedef struct VkPipelineVertexInputStateCreateInfo {
VkStructureType sType;
const void* pNext;
- uint32_t bindingCount;
+ uint32_t vertexBindingDescriptionCount;
const VkVertexInputBindingDescription* pVertexBindingDescriptions;
- uint32_t attributeCount;
+ uint32_t vertexAttributeDescriptionCount;
const VkVertexInputAttributeDescription* pVertexAttributeDescriptions;
} VkPipelineVertexInputStateCreateInfo;
diff --git a/src/vulkan/anv_meta.c b/src/vulkan/anv_meta.c
index 3f93e1d0b44..f28775e0f7a 100644
--- a/src/vulkan/anv_meta.c
+++ b/src/vulkan/anv_meta.c
@@ -264,41 +264,41 @@ anv_device_init_meta_blit_state(struct anv_device *device)
VkPipelineVertexInputStateCreateInfo vi_create_info = {
.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
- .bindingCount = 2,
+ .vertexBindingDescriptionCount = 2,
.pVertexBindingDescriptions = (VkVertexInputBindingDescription[]) {
{
.binding = 0,
- .strideInBytes = 0,
+ .stride = 0,
.inputRate = VK_VERTEX_INPUT_RATE_VERTEX
},
{
.binding = 1,
- .strideInBytes = 5 * sizeof(float),
+ .stride = 5 * sizeof(float),
.inputRate = VK_VERTEX_INPUT_RATE_VERTEX
},
},
- .attributeCount = 3,
+ .vertexAttributeDescriptionCount = 3,
.pVertexAttributeDescriptions = (VkVertexInputAttributeDescription[]) {
{
/* VUE Header */
.location = 0,
.binding = 0,
.format = VK_FORMAT_R32G32B32A32_UINT,
- .offsetInBytes = 0
+ .offset = 0
},
{
/* Position */
.location = 1,
.binding = 1,
.format = VK_FORMAT_R32G32_SFLOAT,
- .offsetInBytes = 0
+ .offset = 0
},
{
/* Texture Coordinate */
.location = 2,
.binding = 1,
.format = VK_FORMAT_R32G32B32_SFLOAT,
- .offsetInBytes = 8
+ .offset = 8
}
}
};
diff --git a/src/vulkan/anv_meta_clear.c b/src/vulkan/anv_meta_clear.c
index d1f1d95a3aa..9f3085005f4 100644
--- a/src/vulkan/anv_meta_clear.c
+++ b/src/vulkan/anv_meta_clear.c
@@ -241,36 +241,36 @@ init_color_pipeline(struct anv_device *device)
const VkPipelineVertexInputStateCreateInfo vi_state = {
.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
- .bindingCount = 1,
+ .vertexBindingDescriptionCount = 1,
.pVertexBindingDescriptions = (VkVertexInputBindingDescription[]) {
{
.binding = 0,
- .strideInBytes = sizeof(struct color_clear_vattrs),
+ .stride = sizeof(struct color_clear_vattrs),
.inputRate = VK_VERTEX_INPUT_RATE_VERTEX
},
},
- .attributeCount = 3,
+ .vertexAttributeDescriptionCount = 3,
.pVertexAttributeDescriptions = (VkVertexInputAttributeDescription[]) {
{
/* VUE Header */
.location = 0,
.binding = 0,
.format = VK_FORMAT_R32G32B32A32_UINT,
- .offsetInBytes = offsetof(struct color_clear_vattrs, vue_header),
+ .offset = offsetof(struct color_clear_vattrs, vue_header),
},
{
/* Position */
.location = 1,
.binding = 0,
.format = VK_FORMAT_R32G32_SFLOAT,
- .offsetInBytes = offsetof(struct color_clear_vattrs, position),
+ .offset = offsetof(struct color_clear_vattrs, position),
},
{
/* Color */
.location = 2,
.binding = 0,
.format = VK_FORMAT_R32G32B32A32_SFLOAT,
- .offsetInBytes = offsetof(struct color_clear_vattrs, color),
+ .offset = offsetof(struct color_clear_vattrs, color),
},
},
};
@@ -424,29 +424,29 @@ create_depthstencil_pipeline(struct anv_device *device,
const VkPipelineVertexInputStateCreateInfo vi_state = {
.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
- .bindingCount = 1,
+ .vertexBindingDescriptionCount = 1,
.pVertexBindingDescriptions = (VkVertexInputBindingDescription[]) {
{
.binding = 0,
- .strideInBytes = sizeof(struct depthstencil_clear_vattrs),
+ .stride = sizeof(struct depthstencil_clear_vattrs),
.inputRate = VK_VERTEX_INPUT_RATE_VERTEX
},
},
- .attributeCount = 2,
+ .vertexAttributeDescriptionCount = 2,
.pVertexAttributeDescriptions = (VkVertexInputAttributeDescription[]) {
{
/* VUE Header */
.location = 0,
.binding = 0,
.format = VK_FORMAT_R32G32B32A32_UINT,
- .offsetInBytes = offsetof(struct depthstencil_clear_vattrs, vue_header),
+ .offset = offsetof(struct depthstencil_clear_vattrs, vue_header),
},
{
/* Position */
.location = 1,
.binding = 0,
.format = VK_FORMAT_R32G32_SFLOAT,
- .offsetInBytes = offsetof(struct depthstencil_clear_vattrs, position),
+ .offset = offsetof(struct depthstencil_clear_vattrs, position),
},
},
};
diff --git a/src/vulkan/anv_pipeline.c b/src/vulkan/anv_pipeline.c
index e4209bd13c9..41a26c70d85 100644
--- a/src/vulkan/anv_pipeline.c
+++ b/src/vulkan/anv_pipeline.c
@@ -1034,12 +1034,12 @@ anv_pipeline_init(struct anv_pipeline *pipeline, struct anv_device *device,
const VkPipelineVertexInputStateCreateInfo *vi_info =
pCreateInfo->pVertexInputState;
pipeline->vb_used = 0;
- for (uint32_t i = 0; i < vi_info->bindingCount; i++) {
+ for (uint32_t i = 0; i < vi_info->vertexBindingDescriptionCount; i++) {
const VkVertexInputBindingDescription *desc =
&vi_info->pVertexBindingDescriptions[i];
pipeline->vb_used |= 1 << desc->binding;
- pipeline->binding_stride[desc->binding] = desc->strideInBytes;
+ pipeline->binding_stride[desc->binding] = desc->stride;
/* Step rate is programmed per vertex element (attribute), not
* binding. Set up a map of which bindings step per instance, for
diff --git a/src/vulkan/gen7_pipeline.c b/src/vulkan/gen7_pipeline.c
index 2f51b4bfc73..f63ca4dcb4f 100644
--- a/src/vulkan/gen7_pipeline.c
+++ b/src/vulkan/gen7_pipeline.c
@@ -38,17 +38,18 @@ gen7_emit_vertex_input(struct anv_pipeline *pipeline,
{
const bool sgvs = pipeline->vs_prog_data.uses_vertexid ||
pipeline->vs_prog_data.uses_instanceid;
- const uint32_t element_count = info->attributeCount + (sgvs ? 1 : 0);
+ const uint32_t element_count =
+ info->vertexAttributeDescriptionCount + (sgvs ? 1 : 0);
const uint32_t num_dwords = 1 + element_count * 2;
uint32_t *p;
- if (info->attributeCount == 0 && !sgvs)
+ if (info->vertexAttributeDescriptionCount == 0 && !sgvs)
return;
p = anv_batch_emitn(&pipeline->batch, num_dwords,
GEN7_3DSTATE_VERTEX_ELEMENTS);
- for (uint32_t i = 0; i < info->attributeCount; i++) {
+ for (uint32_t i = 0; i < info->vertexAttributeDescriptionCount; i++) {
const VkVertexInputAttributeDescription *desc =
&info->pVertexAttributeDescriptions[i];
const struct anv_format *format = anv_format_for_vk_format(desc->format);
@@ -58,7 +59,7 @@ gen7_emit_vertex_input(struct anv_pipeline *pipeline,
.Valid = true,
.SourceElementFormat = format->surface_format,
.EdgeFlagEnable = false,
- .SourceElementOffset = desc->offsetInBytes,
+ .SourceElementOffset = desc->offset,
.Component0Control = VFCOMP_STORE_SRC,
.Component1Control = format->num_channels >= 2 ? VFCOMP_STORE_SRC : VFCOMP_STORE_0,
.Component2Control = format->num_channels >= 3 ? VFCOMP_STORE_SRC : VFCOMP_STORE_0,
@@ -77,7 +78,7 @@ gen7_emit_vertex_input(struct anv_pipeline *pipeline,
.Component2Control = VFCOMP_STORE_VID,
.Component3Control = VFCOMP_STORE_IID
};
- GEN7_VERTEX_ELEMENT_STATE_pack(NULL, &p[1 + info->attributeCount * 2], &element);
+ GEN7_VERTEX_ELEMENT_STATE_pack(NULL, &p[1 + info->vertexAttributeDescriptionCount * 2], &element);
}
}
diff --git a/src/vulkan/gen8_pipeline.c b/src/vulkan/gen8_pipeline.c
index 16143300cf1..9bf7d2d555e 100644
--- a/src/vulkan/gen8_pipeline.c
+++ b/src/vulkan/gen8_pipeline.c
@@ -36,17 +36,17 @@ static void
emit_vertex_input(struct anv_pipeline *pipeline,
const VkPipelineVertexInputStateCreateInfo *info)
{
- const uint32_t num_dwords = 1 + info->attributeCount * 2;
+ const uint32_t num_dwords = 1 + info->vertexAttributeDescriptionCount * 2;
uint32_t *p;
static_assert(ANV_GEN >= 8, "should be compiling this for gen < 8");
- if (info->attributeCount > 0) {
+ if (info->vertexAttributeDescriptionCount > 0) {
p = anv_batch_emitn(&pipeline->batch, num_dwords,
GENX(3DSTATE_VERTEX_ELEMENTS));
}
- for (uint32_t i = 0; i < info->attributeCount; i++) {
+ for (uint32_t i = 0; i < info->vertexAttributeDescriptionCount; i++) {
const VkVertexInputAttributeDescription *desc =
&info->pVertexAttributeDescriptions[i];
const struct anv_format *format = anv_format_for_vk_format(desc->format);
@@ -56,7 +56,7 @@ emit_vertex_input(struct anv_pipeline *pipeline,
.Valid = true,
.SourceElementFormat = format->surface_format,
.EdgeFlagEnable = false,
- .SourceElementOffset = desc->offsetInBytes,
+ .SourceElementOffset = desc->offset,
.Component0Control = VFCOMP_STORE_SRC,
.Component1Control = format->num_channels >= 2 ? VFCOMP_STORE_SRC : VFCOMP_STORE_0,
.Component2Control = format->num_channels >= 3 ? VFCOMP_STORE_SRC : VFCOMP_STORE_0,
@@ -75,10 +75,10 @@ emit_vertex_input(struct anv_pipeline *pipeline,
anv_batch_emit(&pipeline->batch, GENX(3DSTATE_VF_SGVS),
.VertexIDEnable = pipeline->vs_prog_data.uses_vertexid,
.VertexIDComponentNumber = 2,
- .VertexIDElementOffset = info->bindingCount,
+ .VertexIDElementOffset = info->vertexBindingDescriptionCount,
.InstanceIDEnable = pipeline->vs_prog_data.uses_instanceid,
.InstanceIDComponentNumber = 3,
- .InstanceIDElementOffset = info->bindingCount);
+ .InstanceIDElementOffset = info->vertexBindingDescriptionCount);
}
static void
@@ -355,7 +355,7 @@ genX(graphics_pipeline_create)(
* inputs. */
if (pipeline->vs_simd8 == NO_KERNEL) {
pipeline->wm_prog_data.num_varying_inputs =
- pCreateInfo->pVertexInputState->attributeCount - 2;
+ pCreateInfo->pVertexInputState->vertexAttributeDescriptionCount - 2;
}
assert(pCreateInfo->pVertexInputState);