intel/compiler: Create and use struct for GS thread payload

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18176>
This commit is contained in:
Caio Oliveira
2022-08-22 22:23:17 -07:00
committed by Marge Bot
parent 7664c85b1d
commit 5b6987daee
5 changed files with 64 additions and 52 deletions

View File

@@ -116,6 +116,13 @@ struct tes_thread_payload : public thread_payload {
fs_reg urb_output;
};
struct gs_thread_payload : public thread_payload {
gs_thread_payload(const fs_visitor &v);
fs_reg urb_handles;
fs_reg primitive_id;
};
struct fs_thread_payload : public thread_payload {
fs_thread_payload(const fs_visitor &v,
bool &source_depth_to_render_target,
@@ -192,7 +199,6 @@ public:
bool run_mesh(bool allow_spilling);
void optimize();
void allocate_registers(bool allow_spilling);
void setup_gs_payload();
void setup_cs_payload();
bool fixup_sends_duplicate_payload();
void fixup_3src_null_dest();
@@ -471,6 +477,11 @@ public:
return *static_cast<tes_thread_payload *>(this->payload_);
}
gs_thread_payload &gs_payload() {
assert(stage == MESA_SHADER_GEOMETRY);
return *static_cast<gs_thread_payload *>(this->payload_);
}
fs_thread_payload &fs_payload() {
assert(stage == MESA_SHADER_FRAGMENT);
return *static_cast<fs_thread_payload *>(this->payload_);