diff options
author | Caio Marcelo de Oliveira Filho <[email protected]> | 2020-03-03 13:43:39 -0800 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <[email protected]> | 2020-03-12 13:18:54 -0700 |
commit | af33f0d767a72dfd89246947d89d28d3157b4f59 (patch) | |
tree | 9426c5953c6e1e308e975ce526df937b39b35b09 /src/intel/vulkan/anv_private.h | |
parent | bff45b6a7f57694bcc0d8bb47fbc55402911113b (diff) |
anv: Use a separate field in the pipeline for compute shader
This is a preparation for splitting the compute and graphics pipelines
into separate structs.
Reviewed-by: Jason Ekstrand <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4040>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r-- | src/intel/vulkan/anv_private.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 14a2fe33049..f04495c7958 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -3179,6 +3179,7 @@ struct anv_pipeline { struct anv_subpass * subpass; struct anv_shader_bin * shaders[MESA_SHADER_STAGES]; + struct anv_shader_bin * cs; struct util_dynarray executables; @@ -3251,7 +3252,13 @@ ANV_DECL_GET_PROG_DATA_FUNC(tcs, MESA_SHADER_TESS_CTRL) ANV_DECL_GET_PROG_DATA_FUNC(tes, MESA_SHADER_TESS_EVAL) ANV_DECL_GET_PROG_DATA_FUNC(gs, MESA_SHADER_GEOMETRY) ANV_DECL_GET_PROG_DATA_FUNC(wm, MESA_SHADER_FRAGMENT) -ANV_DECL_GET_PROG_DATA_FUNC(cs, MESA_SHADER_COMPUTE) + +static inline const struct brw_cs_prog_data * +get_cs_prog_data(const struct anv_pipeline *pipeline) +{ + assert(pipeline->type == ANV_PIPELINE_COMPUTE); + return (const struct brw_cs_prog_data *) pipeline->cs->prog_data; +} static inline const struct brw_vue_prog_data * anv_pipeline_get_last_vue_prog_data(const struct anv_pipeline *pipeline) |