diff options
author | Jason Ekstrand <[email protected]> | 2019-02-22 15:21:13 -0600 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2019-07-24 12:55:40 -0500 |
commit | bcef32d49bca0a4842fc726061cca55761bf3193 (patch) | |
tree | f1574f3d393de81bb4397eabe4a3d1c44545da7f /src/intel | |
parent | 2a236c76f8209b6c2c7bcbfee5fcfbfaa7b82796 (diff) |
anv/pipeline: Plumb pipeline shader stage create flags
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_pipeline.c | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 5266fb0dc34..ae3693d76ed 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -353,6 +353,7 @@ populate_sampler_prog_key(const struct gen_device_info *devinfo, static void populate_base_prog_key(const struct gen_device_info *devinfo, + VkPipelineShaderStageCreateFlags flags, struct brw_base_prog_key *key) { key->subgroup_size_type = BRW_SUBGROUP_SIZE_API_CONSTANT; @@ -362,11 +363,12 @@ populate_base_prog_key(const struct gen_device_info *devinfo, static void populate_vs_prog_key(const struct gen_device_info *devinfo, + VkPipelineShaderStageCreateFlags flags, struct brw_vs_prog_key *key) { memset(key, 0, sizeof(*key)); - populate_base_prog_key(devinfo, &key->base); + populate_base_prog_key(devinfo, flags, &key->base); /* XXX: Handle vertex input work-arounds */ @@ -375,43 +377,47 @@ populate_vs_prog_key(const struct gen_device_info *devinfo, static void populate_tcs_prog_key(const struct gen_device_info *devinfo, + VkPipelineShaderStageCreateFlags flags, unsigned input_vertices, struct brw_tcs_prog_key *key) { memset(key, 0, sizeof(*key)); - populate_base_prog_key(devinfo, &key->base); + populate_base_prog_key(devinfo, flags, &key->base); key->input_vertices = input_vertices; } static void populate_tes_prog_key(const struct gen_device_info *devinfo, + VkPipelineShaderStageCreateFlags flags, struct brw_tes_prog_key *key) { memset(key, 0, sizeof(*key)); - populate_base_prog_key(devinfo, &key->base); + populate_base_prog_key(devinfo, flags, &key->base); } static void populate_gs_prog_key(const struct gen_device_info *devinfo, + VkPipelineShaderStageCreateFlags flags, struct brw_gs_prog_key *key) { memset(key, 0, sizeof(*key)); - populate_base_prog_key(devinfo, &key->base); + populate_base_prog_key(devinfo, flags, &key->base); } static void populate_wm_prog_key(const struct gen_device_info *devinfo, + VkPipelineShaderStageCreateFlags flags, const struct anv_subpass *subpass, const VkPipelineMultisampleStateCreateInfo *ms_info, struct brw_wm_prog_key *key) { memset(key, 0, sizeof(*key)); - populate_base_prog_key(devinfo, &key->base); + populate_base_prog_key(devinfo, flags, &key->base); /* We set this to 0 here and set to the actual value before we call * brw_compile_fs. @@ -458,11 +464,12 @@ populate_wm_prog_key(const struct gen_device_info *devinfo, static void populate_cs_prog_key(const struct gen_device_info *devinfo, + VkPipelineShaderStageCreateFlags flags, struct brw_cs_prog_key *key) { memset(key, 0, sizeof(*key)); - populate_base_prog_key(devinfo, &key->base); + populate_base_prog_key(devinfo, flags, &key->base); } struct anv_pipeline_stage { @@ -1044,21 +1051,22 @@ anv_pipeline_compile_graphics(struct anv_pipeline *pipeline, const struct gen_device_info *devinfo = &pipeline->device->info; switch (stage) { case MESA_SHADER_VERTEX: - populate_vs_prog_key(devinfo, &stages[stage].key.vs); + populate_vs_prog_key(devinfo, sinfo->flags, &stages[stage].key.vs); break; case MESA_SHADER_TESS_CTRL: - populate_tcs_prog_key(devinfo, + populate_tcs_prog_key(devinfo, sinfo->flags, info->pTessellationState->patchControlPoints, &stages[stage].key.tcs); break; case MESA_SHADER_TESS_EVAL: - populate_tes_prog_key(devinfo, &stages[stage].key.tes); + populate_tes_prog_key(devinfo, sinfo->flags, &stages[stage].key.tes); break; case MESA_SHADER_GEOMETRY: - populate_gs_prog_key(devinfo, &stages[stage].key.gs); + populate_gs_prog_key(devinfo, sinfo->flags, &stages[stage].key.gs); break; case MESA_SHADER_FRAGMENT: - populate_wm_prog_key(devinfo, pipeline->subpass, + populate_wm_prog_key(devinfo, sinfo->flags, + pipeline->subpass, info->pMultisampleState, &stages[stage].key.wm); break; @@ -1352,7 +1360,8 @@ anv_pipeline_compile_cs(struct anv_pipeline *pipeline, struct anv_shader_bin *bin = NULL; - populate_cs_prog_key(&pipeline->device->info, &stage.key.cs); + populate_cs_prog_key(&pipeline->device->info, info->stage.flags, + &stage.key.cs); ANV_FROM_HANDLE(anv_pipeline_layout, layout, info->layout); |