diff options
author | Matt Turner <[email protected]> | 2014-06-29 18:21:30 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-07-05 22:42:30 -0700 |
commit | 6d3e24a5c2e31f0ba95c0c8daf897b749775fea3 (patch) | |
tree | 421c024e71929f0bcab50b139673beb19d98ced1 /src/mesa | |
parent | 0db30fcf8935fab2465a63be56fd317e14fdf7c9 (diff) |
i965: Make backend_instruction usable from C.
With a hack to place an exec_node in the struct in C to be at the same
location as the inherited exec_node in C++.
Acked-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h index e0218205a1c..f8662495108 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.h +++ b/src/mesa/drivers/dri/i965/brw_shader.h @@ -78,12 +78,10 @@ struct backend_reg bool abs; }; -#ifdef __cplusplus - struct cfg_t; +#ifdef __cplusplus struct backend_instruction : public exec_node { -public: bool is_tex() const; bool is_math() const; bool is_control_flow() const; @@ -98,7 +96,10 @@ public: * optimize these out unless you know what you are doing. */ bool has_side_effects() const; - +#else +struct backend_instruction { + struct exec_node link; +#endif /** @{ * Annotation for the generated IR. One of the two can be set. */ @@ -124,6 +125,8 @@ public: bool saturate:1; }; +#ifdef __cplusplus + enum instruction_scheduler_mode { SCHEDULE_PRE, SCHEDULE_PRE_NON_LIFO, |