Skip to content

Commit

Permalink
Handle 'NullOp' in jni layer, fix vulkan observer call
Browse files Browse the repository at this point in the history
  • Loading branch information
mwilsnd committed Aug 28, 2024
1 parent 9c9a338 commit 6023a8b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jni::Local<jni::Object<TileOperation>> TileOperation::Create(jni::JNIEnv& env, m
return _class.Get(env, _class.GetStaticField<jni::Object<TileOperation>>(env, "Error"));
case mbgl::TileOperation::Cancelled:
return _class.Get(env, _class.GetStaticField<jni::Object<TileOperation>>(env, "Cancelled"));
case mbgl::TileOperation::NullOp:
return _class.Get(env, _class.GetStaticField<jni::Object<TileOperation>>(env, "NullOp"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ public enum TileOperation {
StartParse,
EndParse,
Error,
Cancelled
Cancelled,
NullOp,
}
2 changes: 1 addition & 1 deletion src/mbgl/shaders/vulkan/shader_program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ ShaderProgram::ShaderProgram(shaders::BuiltIn shaderID,
for (const auto& define : additionalDefines) {
defineStr += "#define " + define.first + " " + define.second + "\n";
}
observer->onPreCompileShader(shaderID, gfx::Backend::Type::Metal, defineStr);
observer.onPreCompileShader(shaderID, gfx::Backend::Type::Metal, defineStr);

constexpr auto targetClientVersion = glslang::EShTargetVulkan_1_0;
constexpr auto targetLanguageVersion = glslang::EShTargetSpv_1_0;
Expand Down

0 comments on commit 6023a8b

Please sign in to comment.