i965/fs: Add a function to resize fs_inst's sources array.
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
07af0abef0
commit
521f9b9a48
|
@ -111,6 +111,15 @@ fs_inst::fs_inst(const fs_inst &that)
|
|||
this->src[i] = that.src[i];
|
||||
}
|
||||
|
||||
void
|
||||
fs_inst::resize_sources(uint8_t num_sources)
|
||||
{
|
||||
if (this->sources != num_sources) {
|
||||
this->src = reralloc(this, this->src, fs_reg, num_sources);
|
||||
this->sources = num_sources;
|
||||
}
|
||||
}
|
||||
|
||||
#define ALU1(op) \
|
||||
fs_inst * \
|
||||
fs_visitor::op(fs_reg dst, fs_reg src0) \
|
||||
|
|
|
@ -200,6 +200,8 @@ public:
|
|||
const fs_reg &src1, const fs_reg &src2);
|
||||
fs_inst(const fs_inst &that);
|
||||
|
||||
void resize_sources(uint8_t num_sources);
|
||||
|
||||
bool equals(fs_inst *inst) const;
|
||||
bool overwrites_reg(const fs_reg ®) const;
|
||||
bool is_send_from_grf() const;
|
||||
|
|
Loading…
Reference in New Issue