Skip to content

Commit f79ed23

Browse files
committed
samplerlessReads: fix use_pitches test for devices with read_write images supported
The test specified a image_row_pitch on the read_write image without a host_ptr or parent buffer. The read_write image doesn't get inialized like the read_only does, so it's fine to just reset image_row_pitch back to 0 for its creation.
1 parent 4a923c0 commit f79ed23

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test_conformance/images/samplerlessReads/test_read_1D.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ int test_read_image_1D( cl_context context, cl_command_queue queue, cl_kernel ke
9191

9292
if(gTestReadWrite)
9393
{
94+
// We need to reset this because gEnablePitch might be true and specifying a pitch
95+
// on an image without a parent or host_ptr is invalid.
96+
image_desc.image_row_pitch = 0;
9497
read_write_image = clCreateImage(context,
9598
CL_MEM_READ_WRITE,
9699
imageInfo->format,

0 commit comments

Comments
 (0)