mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
fix: correctly patch implicit arg buffer in indirect data
- use correct size alignment of implicit arg buffer, crosshtread data should start after the buffer without extra padding Related-To: NEO-14449 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
22ddaea09f
commit
e345d55fe5
@@ -47,6 +47,7 @@ struct alignas(32) ImplicitArgsV0 {
|
||||
uint8_t reserved[16];
|
||||
|
||||
static constexpr uint8_t getSize() { return static_cast<uint8_t>((offsetof(ImplicitArgsV0, reserved))); }
|
||||
static constexpr uint8_t getAlignedSize() { return sizeof(ImplicitArgsV0); }
|
||||
};
|
||||
|
||||
static_assert(std::alignment_of_v<ImplicitArgsV0> == 32, "Implicit args size need to be aligned to 32");
|
||||
@@ -78,6 +79,7 @@ struct alignas(32) ImplicitArgsV1 {
|
||||
uint8_t reserved[44];
|
||||
|
||||
static constexpr uint8_t getSize() { return static_cast<uint8_t>(offsetof(ImplicitArgsV1, reserved)); }
|
||||
static constexpr uint8_t getAlignedSize() { return sizeof(ImplicitArgsV1); }
|
||||
};
|
||||
|
||||
static_assert(std::alignment_of_v<ImplicitArgsV1> == 32, "Implicit args size need to be aligned to 32");
|
||||
@@ -113,6 +115,18 @@ struct alignas(32) ImplicitArgs {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t getAlignedSize() const {
|
||||
if (v0.header.structVersion == 0) {
|
||||
return ImplicitArgsV0::getAlignedSize();
|
||||
|
||||
} else if (v1.header.structVersion == 1) {
|
||||
return ImplicitArgsV1::getAlignedSize();
|
||||
}
|
||||
|
||||
DEBUG_BREAK_IF(true);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void setNumWorkDim(uint32_t numWorkDim) {
|
||||
if (v0.header.structVersion == 0) {
|
||||
v0.numWorkDim = numWorkDim;
|
||||
|
||||
Reference in New Issue
Block a user