aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2014-08-30 19:10:27 -0700
committerJordan Justen <[email protected]>2014-09-04 11:46:42 -0700
commit246211d366feeff03e1ffa1756e718a1a5e2a6d5 (patch)
tree4ae64c2d55d7941865e46bcb566b184febbf128d /src/mesa/drivers/dri
parent55d2a1626219ac041ce05477827b592efa1c7b81 (diff)
i965/fs: Add init function to fs_visitor
This common init routine can be used by constructors for multiple program types. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.h1
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_visitor.cpp6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 02435b7d1d8..506f3ad4b39 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -215,6 +215,7 @@ public:
struct gl_fragment_program *fp,
unsigned dispatch_width);
~fs_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_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index ba163ecddc3..2c9602fc50f 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -3271,6 +3271,12 @@ fs_visitor::fs_visitor(struct brw_context *brw,
{
this->fp = fp;
this->mem_ctx = mem_ctx;
+ init();
+}
+
+void
+fs_visitor::init()
+{
this->failed = false;
this->simd16_unsupported = false;
this->no16_msg = NULL;