intel/compiler: Use FS thread payload only for FS

Move the setup into the FS thread payload constructor.  Consolidate
payload setup for that in brw_fs_thread_payload.cpp file.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18176>
This commit is contained in:
Caio Oliveira
2022-08-19 12:40:20 -07:00
committed by Marge Bot
parent dab66d20a7
commit 73920b7e2f
12 changed files with 322 additions and 279 deletions

View File

@@ -89,9 +89,15 @@ struct shader_stats {
struct thread_payload {
/** The number of thread payload registers the hardware will supply. */
uint8_t num_regs;
virtual ~thread_payload() = default;
};
struct fs_thread_payload : public thread_payload {
fs_thread_payload(const fs_visitor &v,
bool &source_depth_to_render_target,
bool &runtime_check_aads_emit);
uint8_t subspan_coord_reg[2];
uint8_t source_depth_reg[2];
uint8_t source_w_reg[2];
@@ -150,8 +156,6 @@ public:
bool run_mesh(bool allow_spilling);
void optimize();
void allocate_registers(bool allow_spilling);
void setup_fs_payload_gfx4();
void setup_fs_payload_gfx6();
void setup_vs_payload();
void setup_gs_payload();
void setup_cs_payload();
@@ -411,7 +415,16 @@ public:
bool failed;
char *fail_msg;
fs_thread_payload payload;
thread_payload *payload_;
thread_payload &payload() {
return *this->payload_;
}
fs_thread_payload &fs_payload() {
assert(stage == MESA_SHADER_FRAGMENT);
return *static_cast<fs_thread_payload *>(this->payload_);
};
bool source_depth_to_render_target;
bool runtime_check_aads_emit;