intel/compiler: Make thread_payload struct abstract
authorCaio Oliveira <caio.oliveira@intel.com>
Tue, 30 Aug 2022 00:13:00 +0000 (17:13 -0700)
committerMarge Bot <emma+marge@anholt.net>
Tue, 13 Sep 2022 01:44:24 +0000 (01:44 +0000)
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 <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18176>

src/intel/compiler/brw_fs.h
src/intel/compiler/brw_fs_visitor.cpp

index dd68b83..bbe4845 100644 (file)
@@ -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 {
index caf3a5f..8075076 100644 (file)
@@ -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;