[Mesa-dev] [PATCH 04/14] i965/scalar_visitor: Add init function
Jordan Justen
jordan.l.justen at intel.com
Mon Sep 1 09:44:28 PDT 2014
This common init routine can be used by constructors for multiple program
types.
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
src/mesa/drivers/dri/i965/brw_scalar.h | 1 +
src/mesa/drivers/dri/i965/brw_scalar_visitor.cpp | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_scalar.h b/src/mesa/drivers/dri/i965/brw_scalar.h
index b60c6d2..7d3ebdb 100644
--- a/src/mesa/drivers/dri/i965/brw_scalar.h
+++ b/src/mesa/drivers/dri/i965/brw_scalar.h
@@ -215,6 +215,7 @@ public:
struct gl_fragment_program *fp,
unsigned dispatch_width);
~scalar_visitor();
+ void init();
fs_reg *variable_storage(ir_variable *var);
int virtual_grf_alloc(int size);
diff --git a/src/mesa/drivers/dri/i965/brw_scalar_visitor.cpp b/src/mesa/drivers/dri/i965/brw_scalar_visitor.cpp
index 5eadb1e..9616b2a 100644
--- a/src/mesa/drivers/dri/i965/brw_scalar_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_scalar_visitor.cpp
@@ -3262,6 +3262,12 @@ scalar_visitor::scalar_visitor(struct brw_context *brw,
{
this->fp = fp;
this->mem_ctx = mem_ctx;
+ init();
+}
+
+void
+scalar_visitor::init()
+{
this->failed = false;
this->simd16_unsupported = false;
this->no16_msg = NULL;
--
2.1.0
More information about the mesa-dev
mailing list