diff --git a/SConstruct b/SConstruct index 127861cd85..1f580b3c29 100644 --- a/SConstruct +++ b/SConstruct @@ -65,8 +65,8 @@ if arch == "larch64": "#third_party/libyuv/larch64/lib", "/usr/lib/aarch64-linux-gnu" ] - cflags = ["-DTICI", "-mcpu=cortex-a57"] - cxxflags = ["-DTICI", "-mcpu=cortex-a57"] + cflags = ["-DQCOM2", "-mcpu=cortex-a57"] + cxxflags = ["-DQCOM2", "-mcpu=cortex-a57"] rpath += ["/usr/local/lib"] else: cflags = [] diff --git a/selfdrive/ui/qt/qt_window.cc b/selfdrive/ui/qt/qt_window.cc index a46eb1a5cf..8d3d7cf72e 100644 --- a/selfdrive/ui/qt/qt_window.cc +++ b/selfdrive/ui/qt/qt_window.cc @@ -13,7 +13,7 @@ void setMainWindow(QWidget *w) { } w->show(); -#ifdef TICI +#ifdef QCOM2 QPlatformNativeInterface *native = QGuiApplication::platformNativeInterface(); wl_surface *s = reinterpret_cast(native->nativeResourceForWindow("surface", w->windowHandle())); wl_surface_set_buffer_transform(s, WL_OUTPUT_TRANSFORM_270); diff --git a/selfdrive/ui/qt/qt_window.h b/selfdrive/ui/qt/qt_window.h index ff00499e8f..6f16e00957 100644 --- a/selfdrive/ui/qt/qt_window.h +++ b/selfdrive/ui/qt/qt_window.h @@ -6,7 +6,7 @@ #include #include -#ifdef TICI +#ifdef QCOM2 #include #include #include diff --git a/selfdrive/ui/qt/widgets/cameraview.cc b/selfdrive/ui/qt/widgets/cameraview.cc index 33ce66bec6..81ef613393 100644 --- a/selfdrive/ui/qt/widgets/cameraview.cc +++ b/selfdrive/ui/qt/widgets/cameraview.cc @@ -27,7 +27,7 @@ const char frame_vertex_shader[] = "}\n"; const char frame_fragment_shader[] = -#ifdef TICI +#ifdef QCOM2 "#version 300 es\n" "#extension GL_OES_EGL_image_external_essl3 : enable\n" "precision mediump float;\n" @@ -79,7 +79,7 @@ CameraWidget::~CameraWidget() { glDeleteVertexArrays(1, &frame_vao); glDeleteBuffers(1, &frame_vbo); glDeleteBuffers(1, &frame_ibo); -#ifndef TICI +#ifndef QCOM2 glDeleteTextures(2, textures); #endif } @@ -137,7 +137,7 @@ void CameraWidget::initializeGL() { glUseProgram(program->programId()); -#ifdef TICI +#ifdef QCOM2 glUniform1i(program->uniformLocation("uTexture"), 0); #else glGenTextures(2, textures); @@ -165,7 +165,7 @@ void CameraWidget::stopVipcThread() { vipc_thread = nullptr; } -#ifdef TICI +#ifdef QCOM2 EGLDisplay egl_display = eglGetCurrentDisplay(); assert(egl_display != EGL_NO_DISPLAY); for (auto &pair : egl_images) { @@ -226,7 +226,7 @@ void CameraWidget::paintGL() { glUseProgram(program->programId()); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); -#ifdef TICI +#ifdef QCOM2 // no frame copy glActiveTexture(GL_TEXTURE0); glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, egl_images[frame->idx]); @@ -263,7 +263,7 @@ void CameraWidget::vipcConnected(VisionIpcClient *vipc_client) { stream_height = vipc_client->buffers[0].height; stream_stride = vipc_client->buffers[0].stride; -#ifdef TICI +#ifdef QCOM2 EGLDisplay egl_display = eglGetCurrentDisplay(); assert(egl_display != EGL_NO_DISPLAY); for (auto &pair : egl_images) { diff --git a/selfdrive/ui/qt/widgets/cameraview.h b/selfdrive/ui/qt/widgets/cameraview.h index a614573460..29aa8493c7 100644 --- a/selfdrive/ui/qt/widgets/cameraview.h +++ b/selfdrive/ui/qt/widgets/cameraview.h @@ -13,7 +13,7 @@ #include #include -#ifdef TICI +#ifdef QCOM2 #define EGL_EGLEXT_PROTOTYPES #define EGL_NO_X11 #define GL_TEXTURE_EXTERNAL_OES 0x8D65 @@ -63,7 +63,7 @@ protected: std::unique_ptr program; QColor bg = QColor("#000000"); -#ifdef TICI +#ifdef QCOM2 std::map egl_images; #endif diff --git a/system/camerad/cameras/camera_qcom2.cc b/system/camerad/cameras/camera_qcom2.cc index d3356af458..8c4602bb31 100644 --- a/system/camerad/cameras/camera_qcom2.cc +++ b/system/camerad/cameras/camera_qcom2.cc @@ -12,7 +12,7 @@ #include #include -#ifdef TICI +#ifdef QCOM2 #include "CL/cl_ext_qcom.h" #else #define CL_PRIORITY_HINT_HIGH_QCOM NULL diff --git a/system/hardware/hw.h b/system/hardware/hw.h index 1eb5965389..d2083a5985 100644 --- a/system/hardware/hw.h +++ b/system/hardware/hw.h @@ -5,7 +5,7 @@ #include "system/hardware/base.h" #include "common/util.h" -#if TICI +#if QCOM2 #include "system/hardware/tici/hardware.h" #define Hardware HardwareTici #else diff --git a/system/loggerd/encoderd.cc b/system/loggerd/encoderd.cc index 0538b8f0b3..3237d13074 100644 --- a/system/loggerd/encoderd.cc +++ b/system/loggerd/encoderd.cc @@ -3,7 +3,7 @@ #include "system/loggerd/loggerd.h" #include "system/loggerd/encoder/jpeg_encoder.h" -#ifdef TICI +#ifdef QCOM2 #include "system/loggerd/encoder/v4l_encoder.h" #define Encoder V4LEncoder #else