summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_pipeline.c
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2016-06-09 12:12:29 -0700
committerNanley Chery <[email protected]>2016-06-13 11:35:45 -0700
commita0d84a9ef9df69606a928cf7dca8f2b80dea1c36 (patch)
tree3b47d68711f1d5d2624de01813838fe888a668f5 /src/intel/vulkan/anv_pipeline.c
parent7f257abc1bdd153b3981efffc3f201e1ea5fe843 (diff)
anv: Document and rename anv_pipeline_init_dynamic_state()
To reduce confusion, clarify that the state being copied is not dynamic. This agrees with the Vulkan spec's usage of the term. Various sections specify that the various pipeline state which have VkDynamicState enums (e.g. viewport, scissor, etc.) may or may not be dynamic. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_pipeline.c')
-rw-r--r--src/intel/vulkan/anv_pipeline.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 959fbbd0de9..ae037875476 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -947,9 +947,22 @@ anv_compute_urb_partition(struct anv_pipeline *pipeline)
pipeline->urb.entries[MESA_SHADER_TESS_EVAL] = 0;
}
+/**
+ * Copy pipeline state not marked as dynamic.
+ * Dynamic state is pipeline state which hasn't been provided at pipeline
+ * creation time, but is dynamically provided afterwards using various
+ * vkCmdSet* functions.
+ *
+ * The set of state considered "non_dynamic" is determined by the pieces of
+ * state that have their corresponding VkDynamicState enums omitted from
+ * VkPipelineDynamicStateCreateInfo::pDynamicStates.
+ *
+ * @param[out] pipeline Destination non_dynamic state.
+ * @param[in] pCreateInfo Source of non_dynamic state to be copied.
+ */
static void
-anv_pipeline_init_dynamic_state(struct anv_pipeline *pipeline,
- const VkGraphicsPipelineCreateInfo *pCreateInfo)
+copy_non_dynamic_state(struct anv_pipeline *pipeline,
+ const VkGraphicsPipelineCreateInfo *pCreateInfo)
{
anv_cmd_dirty_mask_t states = ANV_CMD_DIRTY_DYNAMIC_ALL;
ANV_FROM_HANDLE(anv_render_pass, pass, pCreateInfo->renderPass);
@@ -1122,7 +1135,7 @@ anv_pipeline_init(struct anv_pipeline *pipeline,
pipeline->batch.end = pipeline->batch.start + sizeof(pipeline->batch_data);
pipeline->batch.relocs = &pipeline->batch_relocs;
- anv_pipeline_init_dynamic_state(pipeline, pCreateInfo);
+ copy_non_dynamic_state(pipeline, pCreateInfo);
pipeline->use_repclear = extra && extra->use_repclear;