Skip to content

Commit 1644dbd

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 1644dbd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test_conformance/images/samplerlessReads/test_read_1D.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ 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
95+
// specifying a pitch on an image without a parent or host_ptr is
96+
// invalid.
97+
image_desc.image_row_pitch = 0;
9498
read_write_image = clCreateImage(context,
9599
CL_MEM_READ_WRITE,
96100
imageInfo->format,

0 commit comments

Comments
 (0)