<div dir="ltr">I'm using the latest fosphor from git (7b6b9961bc2d9b84daeb42a5c8f8aeba293d207c) and am seeing two weird (and I believe related) issues. Firstly, I see the following error:<br clear="all"><div><br></div><div><div>[+] Selected device: TITAN X (Pascal)</div><div>[!] CL Error (-30, /home/user/gr-fosphor/lib/fosphor/cl.c:409): Unable to queue clear of spectrum buffer</div><div><br></div></div><div>This is CL_INVALID_VALUE returning from clEnqueueFillBuffer, so I added some debug fprints to cl.c to see what parameters were being passed into clEnqueueFillBuffer:</div><div><div>Edits:</div><div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>fprintf(stderr, "size = %d\n", 2 * 2 * sizeof(cl_float) * FOSPHOR_FFT_LEN);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">  </span>fprintf(stderr, "pattern_size = %d\n", sizeof(float));<br></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>fprintf(stderr, "pattern = %p\n", &noise_floor); </div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>fprintf(stderr, "offset = %d\n", 0);</div></div><div><br></div><div>Output:</div><div>size = 16384</div><div>pattern_size = 4<br></div><div>pattern = 0x7fb66b7fdd2c</div><div>offset = 0</div></div><div><br></div><div>These parameters look like they shouldn't cause CL_INVALID_VALUE:</div><div><a href="https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/clEnqueueFillBuffer.html">https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/clEnqueueFillBuffer.html</a><br></div><div><br></div><div>But there is this one condition that might be met, which is that somehow size (16384) is larger than the underlying buffer (cl->mem_spectrum). The underlying OpenGL buffer being too small brings me to my next (I believe related) issue. The spectrum plot in fosphor is weirdly pixelated, please see the attachment, which shows a screencap from "osmocom_fft -F -f 100e6 -g 20 -s 10e6".</div><div><br></div><div>Where is the cl->mem_spectrum buffer ultimately declared / initialized? My OpenCL / OpenGL sharing knowledge is nonexistent, any pointers for how I can help debug this issue?</div><div><br></div><div>Output of clinfo is attached as well, and I'm on Ubuntu 16.04 on x86_64.</div><div><br></div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>Raj Bhattacharjea, PhD</div><div>Georgia Tech Research Institute</div><div>Information and Communications Laboratory</div><div><a href="http://www.prism.gatech.edu/~rb288/" style="font-size:12.8px" target="_blank"><span style="font-size:12.8px">http://www.prism.gatech.edu/~r</span>b288/</a><br></div><div>404.407.6622</div></div></div></div></div></div></div></div>
</div>