aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_shader.h
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-08-21 07:53:42 -0700
committerPaul Berry <[email protected]>2013-08-23 11:02:40 -0700
commite556286802811b4b99c692d1ff5197f8ee1f011b (patch)
treed4e21486b27ab1fc74f465b31d1ed983e1457992 /src/mesa/drivers/dri/i965/brw_shader.h
parent5fb13d871e062354a77a427b3a3fe7f3d6908e5a (diff)
i965: Make brw_{shader,vec4}.h safe to include from C.
The patch that follows will move the definition of struct brw_vec4_prog_key from brw_vs.h to brw_vec4.h, making it necessary for brw_vs.h to include brw_vec4.h (because brw_vs.h defines struct brw_vs_prog_key, which contains brw_vec4_prog_key as a member). Since brw_vs.h is included from C source files, that means that brw_vec4.h will need to be safe to include from C. Same for brw_shader.h, since it is included by brw_vec4.h. Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_shader.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h
index e7d3fb6e019..55769ff2e39 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.h
+++ b/src/mesa/drivers/dri/i965/brw_shader.h
@@ -38,6 +38,8 @@ enum register_file {
UNIFORM, /* prog_data->params[reg] */
};
+#ifdef __cplusplus
+
class backend_instruction : public exec_node {
public:
bool is_tex();
@@ -71,8 +73,11 @@ public:
void dump_instructions();
};
+uint32_t brw_texture_offset(ir_constant *offset);
+
+#endif /* __cplusplus */
+
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);
-uint32_t brw_texture_offset(ir_constant *offset);
const char *brw_instruction_name(enum opcode op);