diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2016-09-08 23:48:51 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2016-10-05 19:20:42 -0700 |
commit | e51e055fcdf8107aafaba358fa65b00f963e1728 (patch) | |
tree | 2df63f27010bd6ba4dd9ea99610bd3d78ca6f8d8 /src/mesa/drivers/dri/i965/brw_compiler.h | |
parent | 74b02a744913ffaaf409feb0df30aaa92188e250 (diff) | |
download | external_mesa3d-e51e055fcdf8107aafaba358fa65b00f963e1728.zip external_mesa3d-e51e055fcdf8107aafaba358fa65b00f963e1728.tar.gz external_mesa3d-e51e055fcdf8107aafaba358fa65b00f963e1728.tar.bz2 |
i965: Introduce downcast helpers for prog_data structures.
Similar to brw_context(...), intel_texture_object(...), and so on.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arcero@collabora.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_compiler.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_compiler.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_compiler.h b/src/mesa/drivers/dri/i965/brw_compiler.h index 445c166..447d05b 100644 --- a/src/mesa/drivers/dri/i965/brw_compiler.h +++ b/src/mesa/drivers/dri/i965/brw_compiler.h @@ -731,6 +731,23 @@ struct brw_gs_prog_data unsigned char transform_feedback_swizzles[64 /* BRW_MAX_SOL_BINDINGS */]; }; +#define DEFINE_PROG_DATA_DOWNCAST(stage) \ +static inline struct brw_##stage##_prog_data * \ +brw_##stage##_prog_data(struct brw_stage_prog_data *prog_data) \ +{ \ + return (struct brw_##stage##_prog_data *) prog_data; \ +} +DEFINE_PROG_DATA_DOWNCAST(vue) +DEFINE_PROG_DATA_DOWNCAST(vs) +DEFINE_PROG_DATA_DOWNCAST(tcs) +DEFINE_PROG_DATA_DOWNCAST(tes) +DEFINE_PROG_DATA_DOWNCAST(gs) +DEFINE_PROG_DATA_DOWNCAST(wm) +DEFINE_PROG_DATA_DOWNCAST(cs) +DEFINE_PROG_DATA_DOWNCAST(ff_gs) +DEFINE_PROG_DATA_DOWNCAST(clip) +DEFINE_PROG_DATA_DOWNCAST(sf) +#undef DEFINE_PROG_DATA_DOWNCAST /** @} */ |