Fully working android in older phones
This commit is contained in:
parent
9698ba7f42
commit
61471339ce
8 changed files with 71 additions and 31 deletions
|
|
@ -8,7 +8,7 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
applicationId "com.ethicalml.kompute"
|
||||
minSdkVersion 26
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 29
|
||||
versionCode = 1
|
||||
versionName = "0.0.1"
|
||||
|
|
@ -20,7 +20,8 @@ android {
|
|||
'-DKOMPUTE_OPT_ANDOID_BUILD=1',
|
||||
'-DKOMPUTE_OPT_INSTALL=0',
|
||||
'-DKOMPUTE_OPT_BUILD_SINGLE_HEADER=1',
|
||||
'-DKOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS=1'
|
||||
'-DKOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS=1',
|
||||
'-DKOMPUTE_EXTRA_CXX_FLAGS=-DKOMPUTE_VK_API_MINOR_VERSION=0'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@ include_directories(
|
|||
../../../../../../../single_include/
|
||||
../../../../../../../vk_ndk_wrapper_include/)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 \
|
||||
-DVK_USE_PLATFORM_ANDROID_KHR=1 -DKOMPUTE_DISABLE_VK_DEBUG_LAYERS=1")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 \
|
||||
-DVK_USE_PLATFORM_ANDROID_KHR=1 \
|
||||
-DKOMPUTE_DISABLE_VK_DEBUG_LAYERS=1")
|
||||
|
||||
target_link_libraries(kompute-jni
|
||||
kompute
|
||||
|
|
|
|||
|
|
@ -66,9 +66,11 @@ Java_com_ethicalml_kompute_KomputeJni_initVulkan(JNIEnv *env, jobject thiz) {
|
|||
uint32_t totalRetries = 0;
|
||||
|
||||
while (totalRetries < KOMPUTE_VK_INIT_RETRIES) {
|
||||
LOGI("VULKAN LOAD TRY NUMBER: %u", totalRetries);
|
||||
if(InitVulkan()) {
|
||||
break;
|
||||
}
|
||||
sleep(1);
|
||||
totalRetries++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,9 +51,6 @@ class KomputeJni : AppCompatActivity() {
|
|||
|
||||
fun KomputeButtonOnClick(v: View) {
|
||||
|
||||
// val binding = ActivityKomputeJniBinding.inflate(layoutInflater)
|
||||
// setContentView(binding.root)
|
||||
|
||||
val xiEditText = findViewById<EditText>(R.id.XIEditText)
|
||||
val xjEditText = findViewById<EditText>(R.id.XJEditText)
|
||||
val yEditText = findViewById<EditText>(R.id.YEditText)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue