diff --git a/.pick_status.json b/.pick_status.json index 8fc2b0350e0..c136376337a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -804,7 +804,7 @@ "description": "anv: fix casting to graphics_pipeline_base", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index fcf57756c3a..7d3c974254e 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -4252,7 +4252,7 @@ VkResult anv_GetPipelineExecutableStatisticsKHR( switch (pipeline->type) { case ANV_PIPELINE_GRAPHICS: case ANV_PIPELINE_GRAPHICS_LIB: { - prog_data = anv_pipeline_to_graphics(pipeline)->base.shaders[exe->stage]->prog_data; + prog_data = anv_pipeline_to_graphics_base(pipeline)->shaders[exe->stage]->prog_data; break; } case ANV_PIPELINE_COMPUTE: { diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index b0c728b1a06..cb87ebe5f80 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -4372,11 +4372,19 @@ struct anv_ray_tracing_pipeline { } ANV_DECL_PIPELINE_DOWNCAST(graphics, ANV_PIPELINE_GRAPHICS) -ANV_DECL_PIPELINE_DOWNCAST(graphics_base, ANV_PIPELINE_GRAPHICS) ANV_DECL_PIPELINE_DOWNCAST(graphics_lib, ANV_PIPELINE_GRAPHICS_LIB) ANV_DECL_PIPELINE_DOWNCAST(compute, ANV_PIPELINE_COMPUTE) ANV_DECL_PIPELINE_DOWNCAST(ray_tracing, ANV_PIPELINE_RAY_TRACING) +/* Can't use the macro because we need to handle both types. */ +static inline struct anv_graphics_base_pipeline * +anv_pipeline_to_graphics_base(struct anv_pipeline *pipeline) +{ + assert(pipeline->type == ANV_PIPELINE_GRAPHICS || + pipeline->type == ANV_PIPELINE_GRAPHICS_LIB); + return (struct anv_graphics_base_pipeline *) pipeline; +} + static inline bool anv_pipeline_has_stage(const struct anv_graphics_pipeline *pipeline, gl_shader_stage stage)