[Beignet] [PATCH v3 3/3] add utest for creating 2d image from buffer.
Guo, Yejun
yejun.guo at intel.com
Tue Sep 15 20:14:59 PDT 2015
2 comments inline, thanks.
-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of xionghu.luo at intel.com
Sent: Wednesday, September 09, 2015 1:44 PM
To: beignet at lists.freedesktop.org
Cc: Luo, Xionghu
Subject: [Beignet] [PATCH v3 3/3] add utest for creating 2d image from buffer.
+ OCL_CALL (clGetDeviceInfo, device, CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT, 0, 0, ¶m_value_size);
+ size_t base_address_alignment = 0;
+ OCL_CALL (clGetDeviceInfo, device, CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT, param_value_size, &base_address_alignment, ¶m_value_size);
[Yejun] the proper usage is: OCL_CALL (clGetDeviceInfo, device, CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT, sizeof(base_address_alignment), &base_address_alignment, NULL);
+ // Setup kernel and images
+ size_t buffer_sz = sizeof(uint32_t) * w * h;
[yejun] it is better to query IMAGE_PITCH_ALIGNMENT to do alignment for w
More information about the Beignet
mailing list