|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<root xmlns:android="http://schemas.android.com/apk/res/android"> |
| 3 | + |
| 4 | + <init> |
| 5 | + <log text="[DEQP_UPL] Initializing Pure Log Verification without CDATA..."/> |
| 6 | + </init> |
| 7 | + |
| 8 | + <gameActivityOnCreateAdditions> |
| 9 | + <insert> |
| 10 | + // ================================================================= |
| 11 | + // [DEQP SELECTOR LOG TEST] Pure log code without CommandLine variable |
| 12 | + // ================================================================= |
| 13 | + boolean testSupportsModernVulkan = false; |
| 14 | + int testDeqpLevel = 0; |
| 15 | + String testDeqpDate = "Unknown"; |
| 16 | + |
| 17 | + if (android.os.Build.VERSION.SDK_INT >= 24) { |
| 18 | + // 1. Check if target dEQP level (2024-03-01) is supported |
| 19 | + testSupportsModernVulkan = getPackageManager().hasSystemFeature("android.software.vulkan.deqp.level", 0x7e80301); |
| 20 | + |
| 21 | + // 2. Extract the actual dEQP level value from the device |
| 22 | + android.content.pm.FeatureInfo[] features = getPackageManager().getSystemAvailableFeatures(); |
| 23 | + if (features != null) { |
| 24 | + for (android.content.pm.FeatureInfo feature : features) { |
| 25 | + if (feature != null && "android.software.vulkan.deqp.level".equals(feature.name)) { |
| 26 | + testDeqpLevel = feature.version; |
| 27 | + break; |
| 28 | + } |
| 29 | + } |
| 30 | + } |
| 31 | + |
| 32 | + // 3. Convert to YYYY-MM-DD format using bitwise operations (escaped for parser safety) |
| 33 | + if (testDeqpLevel > 0) { |
| 34 | + int year = (testDeqpLevel >> 16) & 0xFFFF; |
| 35 | + int month = (testDeqpLevel >> 8) & 0xFF; |
| 36 | + int day = testDeqpLevel & 0xFF; |
| 37 | + testDeqpDate = String.format(java.util.Locale.US, "%04d-%02d-%02d", year, month, day); |
| 38 | + } |
| 39 | + |
| 40 | + // [Log] Logcat output statement cleaned up with standard spacing |
| 41 | + android.util.Log.w("UE_RHI_Selector", "=================================================="); |
| 42 | + android.util.Log.w("UE_RHI_Selector", "Device Model : " + android.os.Build.MODEL); |
| 43 | + android.util.Log.w("UE_RHI_Selector", "OS Version : Android " + android.os.Build.VERSION.RELEASE); |
| 44 | + android.util.Log.w("UE_RHI_Selector", "API Level : " + android.os.Build.VERSION.SDK_INT); |
| 45 | + android.util.Log.w("UE_RHI_Selector", "Device dEQP : 0x" + Integer.toHexString(testDeqpLevel) + " (" + testDeqpDate + ")"); |
| 46 | + android.util.Log.w("UE_RHI_Selector", "Target dEQP : 0x7e80301 (2024-03-01)"); |
| 47 | + android.util.Log.w("UE_RHI_Selector", "Modern Vulkan? : " + testSupportsModernVulkan); |
| 48 | + android.util.Log.w("UE_RHI_Selector", "=================================================="); |
| 49 | + } else { |
| 50 | + android.util.Log.w("UE_RHI_Selector", "Device API Level is below 24. Vulkan dEQP check skipped."); |
| 51 | + } |
| 52 | + // ================================================================= |
| 53 | + </insert> |
| 54 | + </gameActivityOnCreateAdditions> |
| 55 | + |
| 56 | +</root> |
0 commit comments