Commit Graph

145 Commits

Author SHA1 Message Date
Sylvain Munaut e02a2ea493 fosphor/cl: Fix init type in cl_queue_clear_buffers
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2023-08-26 12:26:56 +02:00
Sylvain Munaut 62855ff82a fosphor/axis: Fix warning in printf about possible buffer overrun
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2023-08-26 12:26:56 +02:00
Sylvain Munaut 39f4b52431 fosphor/gl_cmap_gen: Introduce a new 'prog' colormap
This color map was originally given to me by 'prog', the sdr# author,
then I tweaked it a bit.

Note that there is currently no way to select it other than changing
the code.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2023-08-26 12:26:56 +02:00
Sylvain Munaut 9d09c6b4c5 fosphor/gl_cmap_gen: Add new function to generate GL colormap from a PNG
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2023-08-26 12:26:56 +02:00
Sylvain Munaut ef5070200f gr-fosphor: Add the overlap block
This will probably be integrated as part of fosphor itself. But until
it is, then this block is useful to overlap several FFT windows.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2023-08-26 12:26:56 +02:00
Sylvain Munaut c1d5d7b63f gr-fosphor: Remove all SWIG stuff
Part of GNURadio 3.9 migration

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2021-01-08 17:40:04 +01:00
Sylvain Munaut 26f06ef630 gr-fosphor: Update all copyright notices headers
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2021-01-08 17:29:58 +01:00
Sylvain Munaut 65c7283981 fosphor: Update all copyright notices headers
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2021-01-08 17:29:58 +01:00
Sylvain Munaut 431afbf8d6 gr-fosphor: Use #pragma once instead of old guard style
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2021-01-08 17:29:58 +01:00
Sylvain Munaut 76c33d41f7 fosphor: Use #pragma once instead of old guard style
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2021-01-08 17:29:58 +01:00
Sylvain Munaut defdd4aca6 gr-fosphor: Set default visibility to false
We're hidden by default.

For Qt we'll get an expose event the first time we're shown.
Needed because we might be hidden by default (like in a tab
chooser) and this would create problems if we consider ourselves
shown by default.

And for GLFW we consider ourself visible after the first reshape,
which is forced at init.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-01-31 23:46:54 +01:00
Sylvain Munaut 6f3a8de592 gr-fosphor: Add 'freq' message port sending the frequency a user clicked
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-01-31 23:46:54 +01:00
Sylvain Munaut 152eb58e58 fosphor: Add position mapping helpers for {x,y} <-> {freq,pwr,samp}
This allows to know an application to know where the user clicked

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-01-31 23:46:54 +01:00
Sylvain Munaut 267b1f05a1 gr-fosphor: Update zoom function to the new {center,span} spec
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-01-31 23:46:54 +01:00
Sylvain Munaut 09b31b4acf fosphor: Review the GL frequency mapping and switch zoom to {center,span}
Previously we were hiding the extrema bin, now we display it "half" on
each side which sort of maps better to the concept of circular spectrum

At the same time we move the zoom spec to {center,span} rather than
{start,stop} since it makes more sense and matches the channel specs

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-01-31 23:46:54 +01:00
Sylvain Munaut e8a64b7297 fosphor/cl: Remove spurious debug fprintf
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2020-01-31 23:46:53 +01:00
Sylvain Munaut 2d4fe78b43 gr-fosphor/build: Update all CMake files
Part of GNURadio 3.8 migration

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut 2f1b0a8793 gr-fosphor/build: Update CMakeLists.txt copyright header
Part of GNURadio 3.8 migration

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut d7c472ec47 gr-fopshor: Remove WX support
This doesn't exist anymore in 3.8

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut 6fd953942f fosphor: Convert mkresources to Python 3
Py3 only ... upgrade your system folks !

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut fa6761afbf gr-fosphor/qt: Qt5 - Track visibility of the widget
When not visible, doing GL operations is not supported

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut caa88f0a31 gr-fosphor/qt: Qt5 - Associate GL context to the worker thread
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut ef55b4f5af gr-fosphor/qt: Qt5 - Switch to linking to Qt5
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut 2e4089a1d1 gr-fosphor: Add concept of visibility to the base block implementation
If we're not visible, don't do any GL calls

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut ffe4a1d7bd gr-fosphor: Missing namespace for thread::mutex
For consistency ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut 423431bdbd gr-fosphor: Fix block name for QT sink
Obvious typo is obvious.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut 3c000bf88a gr-fosphor: Indent (tab/space) fixes
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut 0c658dd3dd fosphor/cl: Make sure to unlocking the GL objects during CL release
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut 51af8dd083 fosphor/cl: Declare the target OpenCL version to avoid warning
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut 15f7a07909 fosphor/cl: Display all devices and allow selection with env var
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut 4aef701e40 fosphor/cl: Check for image support when filtering CL devices
Thanks to Ethan Trewhitt for original patch

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut 0b8390e1c2 fosphor/gl: Fix memory leak when releasing color map
Thanks to Emil Berg for reporting

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-12-08 15:22:38 +01:00
Sylvain Munaut 306f197108 fosphor/gl: Remove redundant initial clear of buffers
The buffers will end up being initialized from the CL result anyway.
(and CL has its own clear).

Apparently the clear of the VBO was causing CL/GL share failur on recent
NVidia driver so get rid of all of it.

Thanks a lot to Aaron Giles <gilesam73@gmail.com> for finding the root
cause of the issue.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-11-30 20:55:37 +01:00
Sylvain Munaut f5e8890139 fosphor/cl: Fix return type/value of cl_queue_clear_buffers
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-11-30 20:55:37 +01:00
Sylvain Munaut b06234e0fc fosphor/cl: Cleanup shared object lock/unlocking code paths
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-11-30 20:55:37 +01:00
Sylvain Munaut 7b6b9961bc fosphor/gl_font: Don't use the format __attribute__ when using MSVC
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2016-05-22 22:34:22 +02:00
Sylvain Munaut 1e4598ff34 gr-fosphor: On WIN32 platform, link and use GLEW to find GL extensions
The FindGLEW is included because it seems the one shipping by CMake by
default fails to find it on windows (which is the only platform where we
use it ...)

This is based on a patch from Geof Nieboer <gnieboer@corpcomm.net>

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2016-05-22 22:34:22 +02:00
Sylvain Munaut dbe239380f gr-fosphor: Improve cleanup path of the worker thread in case of init fail
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2016-05-22 22:34:22 +02:00
Sylvain Munaut 0c4bd380ef gr-fosphor: Rely on the system-wide FindFreetype
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2016-05-22 22:34:22 +02:00
Sylvain Munaut e1eb11b2d8 gr-fosphor: Use FindOpenCL from cmake git master
Author: Martin Hauke <mardnh@gmx.de>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2016-01-25 16:27:00 +01:00
Sylvain Munaut 3a35735409 fosphor/cl: Allow to use APIs deprecated in CL >= 1.2
Really this fixes a2d35f201843c10cceddfbb64c6ed58bdeb03a88 ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2016-01-25 16:27:00 +01:00
Sylvain Munaut b17258f1fc fosphor: Don't redefine gettimeofday in mingw build
Thanks to Martin Hauke <mardnh@gmx.de> for reporting

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2016-01-25 16:27:00 +01:00
Sylvain Munaut acdddf6e90 fosphor: Use lowercase for WIN32 includes
Apparently needed for mingw build and doesn't affect the MSVC ones.

Thanks to Martin Hauke <mardnh@gmx.de> for reporting

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2016-01-25 16:27:00 +01:00
Sylvain Munaut 12c1a6d3f8 Revert "fosphor/gl_cmap_gen: Add new function to generate GL colormap from a PNG"
This reverts commit 585bac0316983286830f3bc50fce8247bad142f9.

This is causing issue with Ubuntu and its lack of libpng 1.6 ... so
removed for now.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2015-11-21 00:19:58 +01:00
Sylvain Munaut 44465b9186 fosphor/cl: Retry context creation without CL/GL sharing if needed
This happens commonly on optimus laptop when CL is Nvidia and the GL
is the Intel card. They can't share data ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2015-10-25 21:41:23 +01:00
Sylvain Munaut a969e7fbb0 fosphor/cl: Don't fail fatally if a platform fails to return devices
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2015-10-25 21:41:23 +01:00
Sylvain Munaut 436b966b76 fosphor/mkresources: Don't generate string longer than 64k
Turns out some fucked up compilers (MSVC I'm looking at you) don't
support strings that are very long.

So in the resource compiler:
 - Change binary encoding to use a separate declaration and use array
   rather than string encoding
 - If a text file is > 64k, use the binary encoding method rather than
   string

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2015-10-25 21:41:22 +01:00
Sylvain Munaut 48b7e9242c gr-fosphor: Make use of proper cmake commands to copy header in binary dir
This way it doesn't depend on platform specific 'cp' and 'mkdir' that
obviously won't work on WIN32.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2015-10-25 21:41:22 +01:00
Sylvain Munaut 6d20a8f367 fosphor/gl_cmap_gen: Remove 'inline' qualifiers
Theses are not in header, and we don't really care about inlining, and
the compiler will most likely do it if it thinks its appropriate anyway.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2015-10-25 21:41:22 +01:00
Sylvain Munaut af9de650ac fosphor/gl_cmap_gen: Spacing fix in _set_rgba_from_hsv
Not sure where this came from ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2015-10-25 21:41:22 +01:00