diff options
author | Vadim Girlin <[email protected]> | 2013-05-03 16:53:27 +0400 |
---|---|---|
committer | Vadim Girlin <[email protected]> | 2013-05-03 16:53:42 +0400 |
commit | 41005d7bd203b10cee70a88abbaf805909712d88 (patch) | |
tree | e2168a3fbf2a6fc82619f6e4cc06e4c08ed6a8b2 /src/gallium/drivers | |
parent | f92bd0958e5f6453aa5cf8d54cd57546ca5de963 (diff) |
r600g/sb: zero-initialize bytecode structs
Signed-off-by: Vadim Girlin <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/r600/sb/sb_ir.h | 6 | ||||
-rw-r--r-- | src/gallium/drivers/r600/sb/sb_shader.cpp | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/r600/sb/sb_ir.h b/src/gallium/drivers/r600/sb/sb_ir.h index 7f7e71e2335..47f0a5da99c 100644 --- a/src/gallium/drivers/r600/sb/sb_ir.h +++ b/src/gallium/drivers/r600/sb/sb_ir.h @@ -963,7 +963,7 @@ public: class cf_node : public container_node { protected: - cf_node() : container_node(NT_OP, NST_CF_INST), bc(), jump_target(), + cf_node() : container_node(NT_OP, NST_CF_INST), jump_target(), jump_after_target() {}; public: bc_cf bc; @@ -983,7 +983,7 @@ public: class alu_node : public node { protected: - alu_node() : node(NT_OP, NST_ALU_INST), bc() {}; + alu_node() : node(NT_OP, NST_ALU_INST) {}; public: bc_alu bc; @@ -1029,7 +1029,7 @@ public: class fetch_node : public node { protected: - fetch_node() : node(NT_OP, NST_FETCH_INST), bc() {}; + fetch_node() : node(NT_OP, NST_FETCH_INST) {}; public: bc_fetch bc; diff --git a/src/gallium/drivers/r600/sb/sb_shader.cpp b/src/gallium/drivers/r600/sb/sb_shader.cpp index 3fd6ea49f54..9bda84f32c4 100644 --- a/src/gallium/drivers/r600/sb/sb_shader.cpp +++ b/src/gallium/drivers/r600/sb/sb_shader.cpp @@ -263,6 +263,7 @@ node* shader::create_node(node_type nt, node_subtype nst, node_flags flags) { alu_node* shader::create_alu() { alu_node* n = new (pool.allocate(sizeof(alu_node))) alu_node(); + memset(&n->bc, 0, sizeof(bc_alu)); all_nodes.push_back(n); return n; } @@ -283,6 +284,7 @@ alu_packed_node* shader::create_alu_packed() { cf_node* shader::create_cf() { cf_node* n = new (pool.allocate(sizeof(cf_node))) cf_node(); + memset(&n->bc, 0, sizeof(bc_cf)); n->bc.barrier = 1; all_nodes.push_back(n); return n; @@ -290,6 +292,7 @@ cf_node* shader::create_cf() { fetch_node* shader::create_fetch() { fetch_node* n = new (pool.allocate(sizeof(fetch_node))) fetch_node(); + memset(&n->bc, 0, sizeof(bc_fetch)); all_nodes.push_back(n); return n; } |