Skip to content

Commit

Permalink
v24.9.258 RC1
Browse files Browse the repository at this point in the history
- added PerformanceStat instead of CpuPerformance class
- CMake: unity build
- Profiler: add GeneralProfiler and RemoteGeneralProfiler with cpu usage, mem usage, etc
- Serializing: Bit packing moved to separate BitSerializer
- Vulkan: add VK_NV_clip_space_w_scaling
- Vulkan: add VK_EXT_subgroup_size_control
- add AE_LICENSE_* to shader code, allow to disable code with unsupported license
  • Loading branch information
azhirnov committed Sep 30, 2024
1 parent 25d867d commit bfbdf50
Show file tree
Hide file tree
Showing 645 changed files with 24,071 additions and 10,956 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
working-directory: ${{github.workspace}}
run: |
cd AE-Bin
wget -O external.zip "https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/J96d_RPphPyYBg"
wget -O external.zip "https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/O1s2phbgeQ0qYQ"
unzip external.zip
rm external.zip
cd ../AE/android
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: |
mkdir _build
cd AE-Bin
wget -O external.zip "https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/ItFRNcXTSg8jJw"
wget -O external.zip "https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/kOFxBTUcF_tPSA"
unzip external.zip
- name: Configure CMake
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
run: |
mkdir _build
cd AE-Bin
wget -O external.zip "https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/7FIqOv5RO-12oA"
wget -O external.zip "https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/EFVy6uci9CWp8Q"
unzip external.zip
- name: Configure CMake
Expand Down Expand Up @@ -225,7 +225,7 @@ jobs:
run: |
mkdir _build
cd AE-Bin
wget -O external.zip "https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/7FIqOv5RO-12oA"
wget -O external.zip "https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/EFVy6uci9CWp8Q"
unzip external.zip
- name: Configure CMake
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: |
mkdir _build
cd AE-Bin
wget -O external.zip "https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/d3yxp6smqL7wEg"
wget -O external.zip "https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/D8CH8QhYzxYB6w"
unzip external.zip
- name: Configure CMake
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: |
mkdir _build
cd AE-Bin
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/jrEo9X0ToUJC0g', 'external.zip' )"
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/rp0poS4J38WM3A', 'external.zip' )"
powershell Expand-Archive external.zip -DestinationPath "."
- name: Configure CMake
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
run: |
mkdir _build
cd AE-Bin
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/jrEo9X0ToUJC0g', 'external.zip' )"
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/rp0poS4J38WM3A', 'external.zip' )"
powershell Expand-Archive external.zip -DestinationPath "."
- name: Configure CMake
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
run: |
mkdir _build
cd AE-Bin
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/tzvkvWlNsKtxcA', 'external.zip' )"
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://getfile.dokpub.com/yandex/get/https://disk.yandex.ru/d/y8QLb9g37nBpJA', 'external.zip' )"
powershell Expand-Archive external.zip -DestinationPath "."
- name: Configure CMake
Expand Down
18 changes: 15 additions & 3 deletions AE/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ endif()
#----------------------------------------------------------

project( "AE"
VERSION 24.8.254 # year, month, version
VERSION 24.9.258 # year, month, version
LANGUAGES C CXX
DESCRIPTION "async game engine"
)
Expand All @@ -39,11 +39,14 @@ message( STATUS "target processor: ${CMAKE_SYSTEM_PROCESSOR}" )
#----------------------------------------------------------

if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
set( AE_USE_PCH ON CACHE BOOL "use precompiled headers" )
set( AE_USE_PCH ON CACHE BOOL "use precompiled headers" )
set( AE_USE_UNITY_BUILD OFF CACHE BOOL "use unity build" )
else()
set( AE_USE_PCH OFF CACHE INTERNAL "" FORCE )
set( AE_USE_PCH OFF CACHE INTERNAL "" FORCE )
set( AE_USE_UNITY_BUILD OFF CACHE INTERNAL "" FORCE )
endif()
message( STATUS "Precompiled headers: ${AE_USE_PCH}" )
message( STATUS "Unity build: ${AE_USE_UNITY_BUILD}" )

#----------------------------------------------------------

Expand All @@ -54,6 +57,15 @@ set( CMAKE_RELEASE_POSTFIX "" CACHE INTERNAL "" FORCE )
set( MAIN_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "" FORCE )
set( MAIN_BINARY_DIR "${CMAKE_BINARY_DIR}/bin" CACHE INTERNAL "" FORCE )

# for IDE
set( ANDROID_SDK_ROOT "$ENV{ANDROID_SDK_ROOT}" )
set( ANDROID_NDK_INCLUDE "${ANDROID_SDK_ROOT}/ndk/26.3.11579264/toolchains/llvm/prebuilt/windows-x86_64" CACHE INTERNAL "" FORCE )
if (WIN32)
if (NOT EXISTS ${ANDROID_NDK_INCLUDE})
message( STATUS "Android NDK is not found in '${ANDROID_NDK_INCLUDE}'" )
endif()
endif()

# this settings breaks native debugger on android
if (NOT ANDROID)
set( CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "installation directory" FORCE )
Expand Down
1 change: 1 addition & 0 deletions AE/android/cicd/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ android {
arguments '-DANDROID_STL=c++_static', // see https://developer.android.com/ndk/guides/cpp-support#static_runtimes
'-DANDROID_ARM_NEON=ON',
'-DAE_ENABLE_VULKAN=ON'
targets 'CICD'
}
}
}
Expand Down
1 change: 1 addition & 0 deletions AE/android/demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ android {
arguments '-DANDROID_STL=c++_static', // see https://developer.android.com/ndk/guides/cpp-support#static_runtimes
'-DANDROID_ARM_NEON=ON',
'-DAE_ENABLE_VULKAN=ON'
targets 'SampleDemo'
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions AE/android/demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" android:required="true" />

<!-- camera -->
<uses-feature android:name="android.hardware.camera" android:required="true" />
<uses-permission android:name="android.permission.CAMERA" android:required="true" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-permission android:name="android.permission.CAMERA" android:required="false" />


<application
Expand Down
72 changes: 71 additions & 1 deletion AE/android/engine/src/main/java/AE/engine/BaseActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,32 @@

import android.Manifest;
import android.annotation.SuppressLint;

import android.app.Activity;

import android.content.Context;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.BroadcastReceiver;
import android.content.Intent;
import android.content.IntentFilter;

import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;

import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;

import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.BatteryManager;

import android.util.Log;

import android.view.Display;
import android.view.KeyEvent;
import android.view.MotionEvent;
Expand Down Expand Up @@ -59,6 +70,7 @@ public class BaseActivity
{
try {
native_Update( _wndID );
_UpdateBattery();
_handler.post( _nativeTick );
}
catch (Exception e) {
Expand All @@ -77,6 +89,7 @@ public class BaseActivity

_sensorMngr = (SensorManager)getSystemService( Context.SENSOR_SERVICE );
_locationMngr = (LocationManager)getSystemService( Context.LOCATION_SERVICE );
_batteryManager = (BatteryManager)getSystemService( Context.BATTERY_SERVICE );
_supportedSensorBits = _GetSupportedSensorsBits();

_wndID = native_OnCreate( this );
Expand All @@ -93,6 +106,7 @@ public class BaseActivity

_sensorMngr = null;
_locationMngr = null;
_batteryManager = null;
}

@Override protected void onPause ()
Expand Down Expand Up @@ -125,13 +139,17 @@ public class BaseActivity
{
super.onStart();
native_OnStart( _wndID );

registerReceiver( this._batInfoReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED) );
}

@Override protected void onStop ()
{
super.onStop();
native_OnStop( _wndID );
_handler.removeCallbacks( _nativeTick );

unregisterReceiver( this._batInfoReceiver );
}

@Override public void onConfigurationChanged (Configuration newConfig)
Expand Down Expand Up @@ -170,11 +188,59 @@ private void _SetFullscreen ()
ctrl.setSystemBarsBehavior( WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE );
ctrl.hide( WindowInsetsCompat.Type.systemBars() );
}

// API 24
wnd.setSustainedPerformanceMode( true );
}


//-----------------------------------------------------------------------------
// SurfaceHolder.Callback
// Battery

private static final int _batUpdateFreq = 10; // update Battery each X frames
private int _batSkipUpdates = 0;

private void _UpdateBattery ()
{
if ( _batteryManager == null )
return;

if ( _batSkipUpdates++ < _batUpdateFreq )
return;

_batSkipUpdates = 0;

float current = _batteryManager.getIntProperty( BatteryManager.BATTERY_PROPERTY_CURRENT_NOW ); // mA, uA
float capacity = _batteryManager.getIntProperty( BatteryManager.BATTERY_PROPERTY_CHARGE_COUNTER ); // mAh, uAh
float energy = _batteryManager.getLongProperty( BatteryManager.BATTERY_PROPERTY_ENERGY_COUNTER ); // nWh

native_SendBatteryStat1( current, capacity, energy );
}

private BroadcastReceiver _batInfoReceiver = new BroadcastReceiver()
{
@Override public void onReceive (Context ctx, Intent intent)
{
boolean is_present = intent.getBooleanExtra( BatteryManager.EXTRA_PRESENT, false );
if ( !is_present )
return;

int ilevel = intent.getIntExtra( "level", 0 );
int ilevel_scale = intent.getIntExtra( BatteryManager.EXTRA_SCALE, 100 );
float level = ilevel * 100.f / (float)ilevel_scale;
int status = intent.getIntExtra( BatteryManager.EXTRA_STATUS, -1 );
boolean is_charging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
status == BatteryManager.BATTERY_STATUS_FULL;
float temperature = intent.getIntExtra( BatteryManager.EXTRA_TEMPERATURE, 0 ) * 0.1f; // C
float voltage = intent.getIntExtra( BatteryManager.EXTRA_VOLTAGE, 0 ); // V, mV, uV

native_SendBatteryStat2( level, temperature, voltage, is_charging );
}
};


//-----------------------------------------------------------------------------
// SurfaceHolder.Callback

private SurfaceView _surfaceView;

Expand Down Expand Up @@ -264,6 +330,8 @@ private void _CreateSurface ()

private SensorManager _sensorMngr = null;
private LocationManager _locationMngr = null;
private BatteryManager _batteryManager = null;

private int _enabledSensorBits = 0;
private int _supportedSensorBits = 0;
private boolean _sensorsEnumerated = false;
Expand Down Expand Up @@ -444,4 +512,6 @@ public void EnableSensors (int enableBits)
private static native void native_UpdateSensor (int id, int sensor, float[] values);
private static native void native_UpdateGNS (double lat, double lon, double alt, long time, float bearing, float speed,
float horAcc, float vertAcc, float bearingAcc, float speedAcc);
private static native void native_SendBatteryStat1 (float current, float capacity, float energy);
private static native void native_SendBatteryStat2 (float level, float temperature, float voltage, boolean isCharging);
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.os.Environment;
import android.os.LocaleList;
import android.os.Build;
import android.os.Debug;
import android.util.Log;
import android.view.Display;
import android.util.DisplayMetrics;
Expand All @@ -35,7 +36,7 @@ public class BaseApplication
public void onCreate ()
{
super.onCreate();
native_OnCreate( this, getResources().getAssets() );
native_OnCreate( this, getResources().getAssets(), Debug.isDebuggerConnected() );

_SendDirectories();
_SendSystemInfo();
Expand Down Expand Up @@ -187,7 +188,7 @@ public final boolean IsNetworkConnected ()
//-----------------------------------------------------------------------------
// native

private static native void native_OnCreate (Object app, Object assetMngr);
private static native void native_OnCreate (Object app, Object assetMngr, boolean isUnderDebugger);
private static native void native_SetDirectories (String internal, String internalCache, String external, String externalCache);
private static native void native_SetSystemInfo (String iso3Lang0, String iso3Lang1);
private static native void native_SetDisplayInfo (int minWidth, int minHeight, int maxWidth, int maxHeight,
Expand Down
1 change: 1 addition & 0 deletions AE/android/rg-device/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ android {
arguments '-DANDROID_STL=c++_static', // see https://developer.android.com/ndk/guides/cpp-support#static_runtimes
'-DANDROID_ARM_NEON=ON',
'-DAE_ENABLE_VULKAN=ON'
targets 'RemoteGraphicsDevice'
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

package AE.RmG.Device;

import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.widget.Button;
Expand Down Expand Up @@ -43,5 +44,6 @@ public final class RmGDActivity
@Override public void onBackPressed () {
super.onBackPressed();
this.finish();
System.exit(0);
}
}
1 change: 1 addition & 0 deletions AE/android/test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ android {
arguments '-DANDROID_STL=c++_static', // see https://developer.android.com/ndk/guides/cpp-support#static_runtimes
'-DANDROID_ARM_NEON=ON',
'-DAE_ENABLE_VULKAN=ON'
targets 'TestLauncher'
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions AE/build_scripts/win_arm64/init.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cd ../../..
rmdir /Q /S "_build_arm64"

mkdir _build_arm64
cd _build_arm64
cmake -G "Visual Studio 17 2022" -A ARM64 -DAE_ENABLE_VULKAN=ON "../AE"

pause

START AE.sln
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit bfbdf50

Please sign in to comment.