[Beignet] [PATCH] GBE: Make fields in ImageInfoKey fully aligned
Ruiling Song
ruiling.song at intel.com
Thu Mar 6 22:23:42 PST 2014
We meet an assert (compiler_copy_image1)under debug mode, and it turns out that
ImageInfoKey.data contains garbage bits. But under release mode, seems that the
memory was cleared to zero.
Signed-off-by: Ruiling Song <ruiling.song at intel.com>
---
backend/src/ir/image.hpp | 2 +-
backend/src/ir/instruction.hpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/src/ir/image.hpp b/backend/src/ir/image.hpp
index cf388d4..62e15a6 100644
--- a/backend/src/ir/image.hpp
+++ b/backend/src/ir/image.hpp
@@ -90,7 +90,7 @@ namespace ir {
private:
map<Register, struct ImageInfo *> regMap;
map<uint32_t, struct ImageInfo *> indexMap;
- map<uint32_t, Register> infoRegMap;
+ map<uint16_t, Register> infoRegMap;
GBE_CLASS(ImageSet);
};
} /* namespace ir */
diff --git a/backend/src/ir/instruction.hpp b/backend/src/ir/instruction.hpp
index 457b5b4..82d2102 100644
--- a/backend/src/ir/instruction.hpp
+++ b/backend/src/ir/instruction.hpp
@@ -377,7 +377,7 @@ namespace ir {
uint8_t index; /*! the allocated image index */
uint8_t type; /*! the information type */
};
- uint32_t data;
+ uint16_t data;
} ImageInfoKey;
/*! Get image information */
--
1.7.9.5
More information about the Beignet
mailing list