Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 21 additions & 18 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ jobs:
strategy:
fail-fast: false
matrix:
compiler: [gcc12, clang17, clang19]
compiler: [gcc14, gcc16, clang23]
build_type: [Debug]
include:
- compiler: gcc12
CC: "/usr/bin/gcc-12"
CXX: "/usr/bin/g++-12"
- compiler: clang17
CC: '/usr/bin/clang-17'
CXX: '/usr/bin/clang++-17'
- compiler: clang19
CC: '/usr/bin/clang-19'
CXX: '/usr/bin/clang++-19'
- compiler: gcc14
CC: "/usr/bin/gcc-14"
CXX: "/usr/bin/g++-14"
- compiler: gcc16
CC: '/usr/bin/gcc-16'
CXX: '/usr/bin/g++-16'
- compiler: clang23
CC: '/usr/bin/clang-23'
CXX: '/usr/bin/clang++-23'

runs-on: ubuntu-24.04

Expand All @@ -49,17 +49,20 @@ jobs:
sudo apt-get update
sudo apt-get install -y build-essential ccache ninja-build lld libgl1-mesa-dev libxcb-cursor-dev xorg-dev libx11-xcb-dev libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev libdrm-dev libgbm-dev xvfb libxcb-cursor0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0

- name: Install Clang 17
if: matrix.compiler == 'clang17'
- name: Install GCC 16
if: matrix.compiler == 'gcc16'
run: |
sudo apt-get install -y clang-17
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y --no-install-recommends gcc-16 g++-16

- name: Install Clang 19
if: matrix.compiler == 'clang19'
- name: Install Clang 23
if: matrix.compiler == 'clang23'
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x ./llvm.sh
sudo ./llvm.sh 19
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc > /dev/null
echo "deb https://apt.llvm.org/noble/ llvm-toolchain-noble-23 main" | sudo tee /etc/apt/sources.list.d/llvm-23.list
sudo apt-get update
sudo apt-get install -y --no-install-recommends clang-23 lld-23 libclang-rt-23-dev

- name: Install Qt
uses: jurplel/install-qt-action@v4
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ include(cmake/AddRepo.cmake)
include(cmake/Version.cmake)

########################################### setup #################################################
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
Expand Down
3 changes: 2 additions & 1 deletion app/ModelBinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <QVector2D>
#include <QVector3D>
#include <QVector4D>
#include <QtAssert>

namespace {

Expand Down Expand Up @@ -142,7 +143,7 @@ void ModelBinding::classBegin() { }

void ModelBinding::componentComplete()
{
assert(m_complete == false);
Q_ASSERT(m_complete == false);
if (!m_qml_target.isValid()) {
qWarning() << "ModelBinding: QML property invalid!";
if (m_model)
Expand Down
9 changes: 5 additions & 4 deletions app/RenderThreadNotifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <QQuickWindow>
#include <QRunnable>
#include <QThread>
#include <QtAssert>

RenderThreadNotifier::RenderThreadNotifier(QObject *parent)
: QObject{parent}
Expand All @@ -41,8 +42,8 @@ RenderThreadNotifier* RenderThreadNotifier::instance()

void RenderThreadNotifier::set_root_window(QQuickWindow* root_window)
{
assert(m_root_window == nullptr);
assert(root_window);
Q_ASSERT(m_root_window == nullptr);
Q_ASSERT(root_window);
m_root_window = root_window;
}

Expand All @@ -53,8 +54,8 @@ void RenderThreadNotifier::notify()
#ifndef __EMSCRIPTEN__
if (QThread::currentThread() != QCoreApplication::instance()->thread())
qDebug() << "RenderThreadNotifier::notify() current thread: " << QThread::currentThread() << " this.thread: " << this->thread();
assert(QThread::currentThread() == QCoreApplication::instance()->thread());
assert(m_root_window != nullptr);
Q_ASSERT(QThread::currentThread() == QCoreApplication::instance()->thread());
Q_ASSERT(m_root_window != nullptr);

auto* runnable = QRunnable::create([]() {
// qDebug() << "QCoreApplication::processEvents called on: " << QThread::currentThread() << "(" << QThread::currentThread()->objectName() << ")";
Expand Down
3 changes: 2 additions & 1 deletion app/RenderingContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <QMutex>
#include <QOpenGLContext>
#include <QThread>
#include <QtAssert>
#include <gl_engine/AvalancheWarningLayer.h>
#include <gl_engine/Context.h>
#include <gl_engine/MapLabels.h>
Expand Down Expand Up @@ -76,7 +77,7 @@ RenderingContext::RenderingContext(QObject* parent)
, m(std::make_unique<RenderingContext::Data>())
{
using TilePattern = nucleus::tile::TileLoadService::UrlPattern;
assert(QThread::currentThread() == QCoreApplication::instance()->thread());
Q_ASSERT(QThread::currentThread() == QCoreApplication::instance()->thread());

#ifdef ALP_ENABLE_THREADING
m->scheduler_thread = std::make_unique<QThread>();
Expand Down
3 changes: 2 additions & 1 deletion app/TerrainRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <QOpenGLFramebufferObjectFormat>
#include <QQuickWindow>
#include <QThread>
#include <QtAssert>

#include "RenderingContext.h"
#include "TerrainRendererItem.h"
Expand Down Expand Up @@ -161,6 +162,6 @@ nucleus::camera::Controller* TerrainRenderer::controller() const { return m_came

std::shared_ptr<nucleus::avalanche::ReportLoadService> TerrainRenderer::eaws_report_load_service()
{
assert(m_eaws_report_load_service);
Q_ASSERT(m_eaws_report_load_service);
return m_eaws_report_load_service;
}
3 changes: 1 addition & 2 deletions apps/webgpu_app/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "webgpu/engine/Window.h"
#include <QCoreApplication>
#include <QFile>
#include <cassert>
#include <qthread.h> //TODO maybe only for threading enabled?
#include <webgpu/base/webgpu_interface.hpp>

Expand Down Expand Up @@ -96,7 +95,7 @@ void App::init_window()
// Load icon using the existing image loader
auto icon = nucleus::utils::image_loader::rgba8(":/icons/logo32.png").value();
// Create SDL_Surface from the raw image data
SDL_Surface* iconSurface = SDL_CreateRGBSurfaceFrom((void*)icon.bytes(), // Pixel data
SDL_Surface* iconSurface = SDL_CreateRGBSurfaceFrom(icon.bytes().data(), // Pixel data
icon.width(), // Image width
icon.height(), // Image height
32, // Bits per pixel (RGBA = 32 bits)
Expand Down
4 changes: 3 additions & 1 deletion apps/webgpu_app/RenderingContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "RenderingContext.h"

#include <QtAssert>

#include "nucleus/DataQuerier.h"
#include "nucleus/tile/SchedulerDirector.h"
#include "nucleus/tile/Texture3DScheduler.h"
Expand All @@ -44,7 +46,7 @@ RenderingContext::RenderingContext()
{

using TilePattern = nucleus::tile::TileLoadService::UrlPattern;
assert(QThread::currentThread() == QCoreApplication::instance()->thread());
Q_ASSERT(QThread::currentThread() == QCoreApplication::instance()->thread());

#ifdef ALP_ENABLE_THREADING
m_scheduler_thread = std::make_unique<QThread>();
Expand Down
5 changes: 3 additions & 2 deletions apps/webgpu_app/compute/nodes/NodeRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <IconsFontAwesome5.h>
#include <QJsonArray>
#include <QtAssert>
#include <imgui.h>
#include <imnodes.h>
#include <iomanip>
Expand Down Expand Up @@ -230,7 +231,7 @@ void NodeRenderer::rename(const std::string& new_name)

int NodeRenderer::get_input_socket_id(const std::string& input_socket_name) const
{
assert(m_node->has_input_socket(input_socket_name));
Q_ASSERT(m_node->has_input_socket(input_socket_name));

for (size_t i = 0; i < m_node->input_sockets().size(); i++) {
if (input_socket_name == m_node->input_sockets().at(i).name()) {
Expand All @@ -243,7 +244,7 @@ int NodeRenderer::get_input_socket_id(const std::string& input_socket_name) cons

int NodeRenderer::get_output_socket_id(const std::string& output_socket_name) const
{
assert(m_node->has_output_socket(output_socket_name));
Q_ASSERT(m_node->has_output_socket(output_socket_name));

for (size_t i = 0; i < m_node->output_sockets().size(); i++) {
if (output_socket_name == m_node->output_sockets().at(i).name()) {
Expand Down
2 changes: 1 addition & 1 deletion apps/webgpu_app/ui/LogoPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ LogoPanel::LogoPanel(WGPUDevice device)

void LogoPanel::init_logo()
{
nucleus::Raster<glm::u8vec4> logo = nucleus::utils::image_loader::rgba8(":/gfx/sujet.png").value();
radix::Raster<glm::u8vec4> logo = nucleus::utils::image_loader::rgba8(":/gfx/sujet.png").value();
m_webigeo_logo_size = ImVec2(float(logo.width()), float(logo.height()));

WGPUTextureDescriptor texture_desc {};
Expand Down
3 changes: 2 additions & 1 deletion apps/webgpu_app/util/InputMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "InputMapper.h"
#include "nucleus/camera/Controller.h"
#include <QDebug>
#include <QtAssert>

namespace webgpu_app {

Expand Down Expand Up @@ -156,7 +157,7 @@ void InputMapper::handle_mouse_button_event(const SDL_Event& event)
const int button = event.button.button;
const int action = (event.type == SDL_MOUSEBUTTONDOWN) ? SDL_PRESSED : SDL_RELEASED;

assert(button >= 0 && (size_t)button < m_buttonmap.size());
Q_ASSERT(button >= 0 && (size_t)button < m_buttonmap.size());

if (m_gui_manager && m_gui_manager->want_capture_mouse())
return;
Expand Down
Loading
Loading