From 3272868218aa31d457115821cab616f89704cf91 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Mon, 29 Aug 2022 17:13:00 -0700 Subject: [PATCH] intel/compiler: Make thread_payload struct abstract Each shader stage has its own struct and will instantiate it, so the base class doesn't need to be instantiated anymore. Reviewed-by: Francisco Jerez Part-of: --- src/intel/compiler/brw_fs.h | 3 +++ src/intel/compiler/brw_fs_visitor.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_fs.h b/src/intel/compiler/brw_fs.h index dd68b83025c..bbe48456221 100644 --- a/src/intel/compiler/brw_fs.h +++ b/src/intel/compiler/brw_fs.h @@ -91,6 +91,9 @@ struct thread_payload { uint8_t num_regs; virtual ~thread_payload() = default; + +protected: + thread_payload() : num_regs() {} }; struct vs_thread_payload : public thread_payload { diff --git a/src/intel/compiler/brw_fs_visitor.cpp b/src/intel/compiler/brw_fs_visitor.cpp index caf3a5f2200..8075076ece5 100644 --- a/src/intel/compiler/brw_fs_visitor.cpp +++ b/src/intel/compiler/brw_fs_visitor.cpp @@ -1241,7 +1241,7 @@ fs_visitor::init() this->nir_ssa_values = NULL; this->nir_system_values = NULL; - this->payload_ = new thread_payload(); + this->payload_ = NULL; this->source_depth_to_render_target = false; this->runtime_check_aads_emit = false; this->first_non_payload_grf = 0;