diff options
author | Matt Turner <[email protected]> | 2014-02-20 13:14:05 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-06-01 13:29:24 -0700 |
commit | 521f9b9a48da586ca3352cea7f8bf7c49741cf0d (patch) | |
tree | 0c69703ed0848cf8fc721dd7cafd2405a25c9bc2 /src/mesa/drivers/dri/i965/brw_fs.cpp | |
parent | 07af0abef024f8a17a00975265eff79aa069c9b5 (diff) |
i965/fs: Add a function to resize fs_inst's sources array.
Reviewed-by: Chris Forbes <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 9ebb86915c4..f23a946e7ae 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -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) \ |