From: Ian Romanick <ian.d.roman...@intel.com> No change Valgrind massif results for a trimmed apitrace of dota2.
v2: Fix a couple spelling errors in the comment. 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 5c565ff..ead0863 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -91,6 +91,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 usable. + * Subclasses of ir_instruction can store data here. Care must be taken + * for two reasons: + * + * 1. Direct descendants 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