MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / alloc_write_buffer

Method alloc_write_buffer

external/basisu/encoder/basisu_opencl.cpp:355–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353 }
354
355 cl_mem alloc_write_buffer(size_t size)
356 {
357 cl_serializer serializer(this);
358
359 cl_int ret;
360 cl_mem obj = clCreateBuffer(m_context, CL_MEM_WRITE_ONLY, size, NULL, &ret);
361 if (ret != CL_SUCCESS)
362 {
363 ocl_error_printf("ocl::alloc_write_buffer: clCreateBuffer() failed!\n");
364 return nullptr;
365 }
366
367 return obj;
368 }
369
370 bool destroy_buffer(cl_mem buf)
371 {

Calls 1

ocl_error_printfFunction · 0.85

Tested by

no test coverage detected