From: Ian Romanick <ian.d.roman...@intel.com> No change in the peak ir_variable memory usage in a trimmed apitrace of dota2 on 64-bit.
No change in the peak ir_variable memory usage in a trimmed apitrace of dota2 on 32-bit. Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> --- src/glsl/ir.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/glsl/ir.h b/src/glsl/ir.h index bc02f6e..fb10c32 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -95,6 +95,20 @@ private: uint8_t ir_type; public: + /** + * Alignment padding that would be added by the compiler + * + * Putting a field here makes what would otherwise be dead space usabled. + * Subclasses of ir_instruction can store data here. Care must be taken + * for two reasons: + * + * 1. Direct descendents in the class hierarchy (e.g., \c ir_dereference + * and \c ir_dereference_array) must not try to use this space. + * + * 2. The size of the padding depends on the architecture. + */ + uint8_t padding[sizeof(intptr_t) - 1]; + inline enum ir_node_type get_ir_type() const { STATIC_ASSERT(ir_type_max < 256); -- 1.8.1.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev