MCPcopy Create free account
hub / github.com/defold/defold / read_from_buffer

Method read_from_buffer

engine/dlib/src/basis/encoder/basisu_opencl.cpp:399–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397 }
398
399 bool read_from_buffer(cl_command_queue command_queue, const cl_mem clmem, void* d, size_t m)
400 {
401 cl_serializer serializer(this);
402
403 cl_int ret = clEnqueueReadBuffer(command_queue, clmem, CL_TRUE, 0, m, d, 0, NULL, NULL);
404 if (ret != CL_SUCCESS)
405 {
406 ocl_error_printf("ocl::read_from_buffer: clEnqueueReadBuffer() failed!\n");
407 return false;
408 }
409
410 return true;
411 }
412
413 cl_mem create_read_image_u8(uint32_t width, uint32_t height, const void* pPixels, uint32_t bytes_per_pixel, bool normalized)
414 {

Calls 2

clEnqueueReadBufferFunction · 0.85
ocl_error_printfFunction · 0.85

Tested by

no test coverage detected