summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_ir_fs.h
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2015-02-06 01:14:51 +0200
committerFrancisco Jerez <currojerez@riseup.net>2015-02-10 16:05:51 +0200
commitf2668f9f214201503419342b980d3afa8b796926 (patch)
treebed9ffabb096d25d3e2ae6857b72fda589f90acf /src/mesa/drivers/dri/i965/brw_ir_fs.h
parentc472793a2a55bb529bf4297f04ff785ce52cfc6e (diff)
downloadexternal_mesa3d-f2668f9f214201503419342b980d3afa8b796926.zip
external_mesa3d-f2668f9f214201503419342b980d3afa8b796926.tar.gz
external_mesa3d-f2668f9f214201503419342b980d3afa8b796926.tar.bz2
i965/fs: Fix stack allocation of fs_inst and stop stealing src array provided on construction.
Using 'ralloc*(this, ...)' is wrong if the object has automatic storage or was allocated through any other means. Use normal dynamic memory instead. Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_ir_fs.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_ir_fs.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_ir_fs.h b/src/mesa/drivers/dri/i965/brw_ir_fs.h
index 0c7dcaf..9ef1261 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_fs.h
@@ -191,7 +191,7 @@ class fs_inst : public backend_instruction {
fs_inst &operator=(const fs_inst &);
void init(enum opcode opcode, uint8_t exec_width, const fs_reg &dst,
- fs_reg *src, int sources);
+ const fs_reg *src, unsigned sources);
public:
DECLARE_RALLOC_CXX_OPERATORS(fs_inst)
@@ -210,10 +210,12 @@ public:
const fs_reg &src0, const fs_reg &src1, const fs_reg &src2);
fs_inst(enum opcode opcode, const fs_reg &dst, const fs_reg &src0,
const fs_reg &src1, const fs_reg &src2);
- fs_inst(enum opcode opcode, const fs_reg &dst, fs_reg src[], int sources);
+ fs_inst(enum opcode opcode, const fs_reg &dst, const fs_reg src[],
+ unsigned sources);
fs_inst(enum opcode opcode, uint8_t exec_size, const fs_reg &dst,
- fs_reg src[], int sources);
+ const fs_reg src[], unsigned sources);
fs_inst(const fs_inst &that);
+ ~fs_inst();
void resize_sources(uint8_t num_sources);