From 9061c0ba3a08ba35604dbb45fbc2891adb929901 Mon Sep 17 00:00:00 2001 From: Bhaskar VishnuVardhan Chebrolu Date: Tue, 17 Nov 2020 11:29:26 +0530 Subject: [PATCH] updated the buffers to read_write to fix post_validate issue (#622) --- library_examples/gzip_app/src/zlib.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library_examples/gzip_app/src/zlib.cpp b/library_examples/gzip_app/src/zlib.cpp index 2da4bd482..87a9e2ded 100644 --- a/library_examples/gzip_app/src/zlib.cpp +++ b/library_examples/gzip_app/src/zlib.cpp @@ -475,7 +475,7 @@ xfZlib::xfZlib(const std::string &binaryFileName, uint8_t max_cr, OCL_CHECK(err, buffer_zlib_output[i][j] = new cl::Buffer( - *m_context, CL_MEM_USE_HOST_PTR | CL_MEM_WRITE_ONLY, + *m_context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE, host_buffer_size * 2, h_buf_zlibout[i][j].data(), &err)); OCL_CHECK(err, buffer_inblk_size[i][j] = new cl::Buffer( @@ -529,7 +529,7 @@ xfZlib::xfZlib(const std::string &binaryFileName, uint8_t max_cr, // Output Device Buffer allocation (__enqueue_reads) for (int i = 0; i < DOUT_BUFFERCOUNT; i++) { OCL_CHECK(err, buffer_dec_zlib_output[i] = new cl::Buffer( - *m_context, CL_MEM_USE_HOST_PTR | CL_MEM_WRITE_ONLY, + *m_context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE, outBufferSize, h_dbufstream_zlibout[i].data(), &err)); } @@ -713,7 +713,7 @@ void xfZlib::_enqueue_reads(uint32_t bufSize, uint8_t *out, cl_int err; for (int i = 0; i < BUFCNT; i++) { OCL_CHECK(err, buffer_size[i] = new cl::Buffer( - *m_context, CL_MEM_USE_HOST_PTR | CL_MEM_WRITE_ONLY, + *m_context, CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE, 2 * sizeof(uint32_t), h_dcompressSize_stream[i].data(), &err)); }