diff options
author | Eric Anholt <[email protected]> | 2012-10-03 13:01:23 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-10-17 12:24:00 -0700 |
commit | 24aeeb2fdcde7a0c257db6469c6b0f064d53d3cf (patch) | |
tree | e4360b0365f2329f1858a1a951211b1925361916 /src/mesa/drivers/dri/i965/brw_shader.h | |
parent | 338fd85e624883996bf9072ca710f2d04e3c59dd (diff) |
i965: Make the FS and VS share a few visitor/instruction fields.
This will let us reuse brw_fs_cfg.cpp from brw_vec4_*.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_shader.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h index 3e6f579e37d..da2b7387f81 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.h +++ b/src/mesa/drivers/dri/i965/brw_shader.h @@ -27,6 +27,31 @@ #pragma once +class backend_instruction : public exec_node { +public: + enum opcode opcode; /* BRW_OPCODE_* or FS_OPCODE_* */ +}; + +class backend_visitor : public ir_visitor { +public: + + struct brw_context *brw; + struct intel_context *intel; + struct gl_context *ctx; + struct brw_compile *p; + struct brw_shader *shader; + struct gl_shader_program *prog; + + /** ralloc context for temporary data used during compile */ + void *mem_ctx; + + /** + * List of either fs_inst or vec4_instruction (inheriting from + * backend_instruction) + */ + exec_list instructions; +}; + int brw_type_for_base_type(const struct glsl_type *type); uint32_t brw_conditional_for_comparison(unsigned int op); uint32_t brw_math_function(enum opcode op); |