From 8b9ecfff360711cffc41a0a062de5ad810f9cf2b Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 20 May 2015 09:45:47 -0700 Subject: [PATCH] i965: Make fs/vec4_visitor inherit from ir_visitor directly This is using multiple inheritance in C++. However, ir_visitor is really just an interface with no data so it shouldn't be so bad. Reviewed-by: Matt Turner Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.h | 2 +- src/mesa/drivers/dri/i965/brw_shader.h | 2 +- src/mesa/drivers/dri/i965/brw_vec4.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index f63b149dfcf..6f16c3140ac 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -66,7 +66,7 @@ namespace brw { * * Translates either GLSL IR or Mesa IR (for ARB_fragment_program) into FS IR. */ -class fs_visitor : public backend_shader +class fs_visitor : public backend_shader, public ir_visitor { public: const fs_reg reg_null_f; diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h index ac9acfc8cd9..da01d2f7185 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.h +++ b/src/mesa/drivers/dri/i965/brw_shader.h @@ -211,7 +211,7 @@ enum instruction_scheduler_mode { SCHEDULE_POST, }; -class backend_shader : public ir_visitor { +class backend_shader { protected: backend_shader(struct brw_context *brw, diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index f78134339ea..06a16a49b6f 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_vec4.h @@ -73,7 +73,7 @@ class vec4_live_variables; * Translates either GLSL IR or Mesa IR (for ARB_vertex_program and * fixed-function) into VS IR. */ -class vec4_visitor : public backend_shader +class vec4_visitor : public backend_shader, public ir_visitor { public: vec4_visitor(struct brw_context *brw, -- 2.30.2