intel/compiler: Create struct for TCS thread payload
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> 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:
@@ -93,6 +93,10 @@ struct thread_payload {
|
||||
virtual ~thread_payload() = default;
|
||||
};
|
||||
|
||||
struct tcs_thread_payload : public thread_payload {
|
||||
tcs_thread_payload(const fs_visitor &v);
|
||||
};
|
||||
|
||||
struct fs_thread_payload : public thread_payload {
|
||||
fs_thread_payload(const fs_visitor &v,
|
||||
bool &source_depth_to_render_target,
|
||||
@@ -421,6 +425,11 @@ public:
|
||||
return *this->payload_;
|
||||
}
|
||||
|
||||
tcs_thread_payload &tcs_payload() {
|
||||
assert(stage == MESA_SHADER_TESS_CTRL);
|
||||
return *static_cast<tcs_thread_payload *>(this->payload_);
|
||||
}
|
||||
|
||||
fs_thread_payload &fs_payload() {
|
||||
assert(stage == MESA_SHADER_FRAGMENT);
|
||||
return *static_cast<fs_thread_payload *>(this->payload_);
|
||||
|
Reference in New Issue
Block a user