diff options
author | Bas Nieuwenhuizen <[email protected]> | 2018-01-15 12:34:33 +0100 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2018-01-30 22:00:40 +0100 |
commit | 6f1a3f081e59599557c8436b7c8666d0fbba2677 (patch) | |
tree | fbebc84f882a6d82d842361adf3fcfc7033aec5e | |
parent | f0c9ef410adb52167509e62b5d4a4dfeb602c163 (diff) |
radv: Constify some pipeline helpers.
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 8 | ||||
-rw-r--r-- | src/amd/vulkan/radv_private.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 8627b1122bc..51452a2fd57 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -1576,7 +1576,7 @@ static const struct radv_prim_vertex_count prim_size_table[] = { [V_008958_DI_PT_2D_TRI_STRIP] = {0, 0}, }; -static struct ac_vs_output_info *get_vs_output_info(struct radv_pipeline *pipeline) +static const struct ac_vs_output_info *get_vs_output_info(const struct radv_pipeline *pipeline) { if (radv_pipeline_has_gs(pipeline)) return &pipeline->gs_copy_shader->info.vs.outinfo; @@ -1588,7 +1588,7 @@ static struct ac_vs_output_info *get_vs_output_info(struct radv_pipeline *pipeli static void calculate_vgt_gs_mode(struct radv_pipeline *pipeline) { - struct ac_vs_output_info *outinfo = get_vs_output_info(pipeline); + const struct ac_vs_output_info *outinfo = get_vs_output_info(pipeline); pipeline->graphics.vgt_primitiveid_en = false; pipeline->graphics.vgt_gs_mode = 0; @@ -1608,7 +1608,7 @@ static void calculate_vgt_gs_mode(struct radv_pipeline *pipeline) static void calculate_vs_outinfo(struct radv_pipeline *pipeline) { - struct ac_vs_output_info *outinfo = get_vs_output_info(pipeline); + const struct ac_vs_output_info *outinfo = get_vs_output_info(pipeline); unsigned clip_dist_mask, cull_dist_mask, total_mask; clip_dist_mask = outinfo->clip_dist_mask; @@ -1667,7 +1667,7 @@ static uint32_t offset_to_ps_input(uint32_t offset, bool flat_shade) static void calculate_ps_inputs(struct radv_pipeline *pipeline) { struct radv_shader_variant *ps; - struct ac_vs_output_info *outinfo = get_vs_output_info(pipeline); + const struct ac_vs_output_info *outinfo = get_vs_output_info(pipeline); ps = pipeline->shaders[MESA_SHADER_FRAGMENT]; diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index cf8cf5fd4e7..736c900929e 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -1272,12 +1272,12 @@ struct radv_pipeline { unsigned scratch_bytes_per_wave; }; -static inline bool radv_pipeline_has_gs(struct radv_pipeline *pipeline) +static inline bool radv_pipeline_has_gs(const struct radv_pipeline *pipeline) { return pipeline->shaders[MESA_SHADER_GEOMETRY] ? true : false; } -static inline bool radv_pipeline_has_tess(struct radv_pipeline *pipeline) +static inline bool radv_pipeline_has_tess(const struct radv_pipeline *pipeline) { return pipeline->shaders[MESA_SHADER_TESS_CTRL] ? true : false; } |