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
28 changes: 18 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,24 @@ matrix:
# - name: "Linux (Clang)"
# os: linux
# compiler: clang
# - name: "Linux (GCC) with Valgrind"
# os: linux
# compiler: gcc
# addons:
# apt:
# packages:
# - valgrind
# script:
# - make -j
# - valgrind --error-exitcode=99 ./tests
- name: "Linux (GCC 9) with Valgrind"
os: linux
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- valgrind
- libglu1-mesa-dev
- g++-9
before_script:
- mkdir build
- cd build
- cmake -DWARNINGS_AS_ERRORS=OFF -DDECK_ENABLE_GRAPHICS=OFF -DDECK_ENABLE_FORMAT=OFF -DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9 ..
script:
- make -j
- valgrind --error-exitcode=99 ./deckgl-bundle-tests

before_script:
# Build out of source
Expand Down
2 changes: 1 addition & 1 deletion cpp/deps
Submodule deps updated 236 files
Original file line number Diff line number Diff line change
Expand Up @@ -172,24 +172,24 @@ auto calculateViewportUniforms(const std::shared_ptr<Viewport>& viewport, double
// TODO(ilija@unfolded.ai): wrapLongitude and modelMatrix not set, set them to default values explicitly if they
// aren't relevant?
ViewportUniforms uniforms = {// Projection mode values
.viewProjectionMatrix = Matrix4<float>{matrixAndOffset.viewProjectionMatrix},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, what kind of order does gcc try to enforce? This doesn't seem to match order within the actual struct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GCC was complaining that the initializers weren't in the order the fields were declared in.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order they are currently in on this branch does not match what's on master, that's why it looked pretty random to me. Perhaps we need to rebase to make sure it works after we merge

.center = Vector4<float>{matrixAndOffset.projectionCenter},
.commonUnitsPerMeter = Vector3<float>{distanceScales.unitsPerMeter},
.coordinateSystem = static_cast<int32_t>(coordinateSystem),
.commonUnitsPerWorldUnit = Vector3<float>{distanceScales.unitsPerMeter},
.projectionMode = static_cast<int32_t>(viewport->projectionMode()),
.commonUnitsPerWorldUnit2 = Vector3<float>{DEFAULT_PIXELS_PER_UNIT2},
.scale = static_cast<float>(viewport->scale), // This is the mercator scale (2 ** zoom)
// This is for lighting calculations
.cameraPosition = Vector3<float>(matrixAndOffset.cameraPosCommon),
.antimeridian = static_cast<float>(antimeridian),
.commonUnitsPerMeter = Vector3<float>{distanceScales.unitsPerMeter},
.commonUnitsPerWorldUnit = Vector3<float>{distanceScales.unitsPerMeter},
.commonUnitsPerWorldUnit2 = Vector3<float>{DEFAULT_PIXELS_PER_UNIT2},
.center = Vector4<float>{matrixAndOffset.projectionCenter},
.viewProjectionMatrix = Matrix4<float>{matrixAndOffset.viewProjectionMatrix},
.coordinateOrigin = Vector3<float>{matrixAndOffset.shaderCoordinateOrigin},
.devicePixelRatio = static_cast<float>(devicePixelRatio),
// Screen size
.viewportSize = Vector2<float>{viewportSize},
.devicePixelRatio = static_cast<float>(devicePixelRatio),
// Distance at which screen pixels are projected
// TODO(isaac@unfolded.ai): optional focalDistance
.focalDistance = static_cast<float>(viewport->focalDistance),
// This is for lighting calculations
.cameraPosition = Vector3<float>(matrixAndOffset.cameraPosCommon),
.coordinateOrigin = Vector3<float>{matrixAndOffset.shaderCoordinateOrigin}};
.focalDistance = static_cast<float>(viewport->focalDistance)};

if (matrixAndOffset.geospatialOrigin.has_value()) {
auto distanceScalesAtOrigin = viewport->getDistanceScales(matrixAndOffset.geospatialOrigin.value().toVector2());
Expand Down
4 changes: 4 additions & 0 deletions cpp/modules/luma.gl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ target_link_libraries(luma.gl PUBLIC ${DECK_LINK_FLAGS}
${DECK_DEPS_PATH}/webgpu_cpp.o
)
target_link_libraries(luma.gl PUBLIC ${DECK_CONFIG_LIBRARY} math.gl probe.gl)
if (NOT APPLE)
# TODO: Check if still needed
target_link_libraries(luma.gl PUBLIC -pthread -ldl -lX11)
endif()

# GLFW dependencies
if (APPLE)
Expand Down
2 changes: 1 addition & 1 deletion cpp/modules/luma.gl/core/src/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void Model::_initializeVertexState(utils::ComboVertexStateDescriptor* descriptor
auto Model::_createBindGroupLayout(wgpu::Device device, const std::vector<UniformDescriptor>& uniforms)
-> wgpu::BindGroupLayout {
std::vector<wgpu::BindGroupLayoutBinding> bindings;
for (uint32 i = 0; i < uniforms.size(); i++) {
for (uint32_t i = 0; i < uniforms.size(); i++) {
auto binding = wgpu::BindGroupLayoutBinding{i, wgpu::ShaderStage::Vertex, wgpu::BindingType::UniformBuffer,
uniforms[i].isDynamic};
bindings.push_back(binding);
Expand Down
1 change: 1 addition & 0 deletions cpp/modules/luma.gl/webgpu/src/shaderc-utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include "./shaderc-utils.h" // NOLINT(build/include)

#include <cstring>
#include <shaderc/shaderc.hpp>

#include "probe.gl/core.h"
Expand Down
1 change: 1 addition & 0 deletions cpp/modules/luma.gl/webgpu/src/webgpu-helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include "./webgpu-helpers.h" // NOLINT(build/include)

#include <algorithm>
#include <cstring>
#include <iomanip>
#include <sstream>
Expand Down