Fix for reading pointers from printf surface on 32bit configurations.

Change-Id: I2b7511b33de6f20f612e87a7f32dd6fd5356b55a
This commit is contained in:
Zdunowski, Piotr
2018-03-27 11:09:37 +02:00
committed by sys_ocldev
parent ffb33f5e86
commit 2cbb76ac88
2 changed files with 13 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Intel Corporation
* Copyright (c) 2017 - 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -748,6 +748,12 @@ TEST_F(PrintFormatterTest, GivenPrintfFormatWhenPointerThenInsertAddress) {
// channel count
storeData(reinterpret_cast<void *>(&temp));
// on 32bit configurations add extra 4 bytes when storing pointers, IGC always stores pointers on 8 bytes
if (!is64bit) {
uint32_t padding = 0;
storeData(padding);
}
char actualOutput[PrintFormatter::maxPrintfOutputLength];
char referenceOutput[PrintFormatter::maxPrintfOutputLength];