Compare commits

...

1 Commits

Author SHA1 Message Date
Doris Wu
bd073119d2 Revert "buffer update opt: Add a flag to guard the feature (#9322)"
This reverts commit 49c4a5d62c.
2025-10-15 23:41:03 +08:00
3 changed files with 3 additions and 24 deletions

View File

@@ -557,8 +557,7 @@ extern "C" JNIEXPORT void JNICALL Java_com_google_android_filament_Engine_nSetBu
jboolean disableHandleUseAfterFreeCheck,
jint preferredShaderLanguage,
jboolean forceGLES2Context, jboolean assertNativeWindowIsValid,
jint gpuContextPriority,
jboolean enableMaterialInstanceUniformBatching) {
jint gpuContextPriority) {
Engine::Builder* builder = (Engine::Builder*) nativeBuilder;
Engine::Config config = {
.commandBufferSizeMB = (uint32_t) commandBufferSizeMB,
@@ -577,7 +576,6 @@ extern "C" JNIEXPORT void JNICALL Java_com_google_android_filament_Engine_nSetBu
.forceGLES2Context = (bool) forceGLES2Context,
.assertNativeWindowIsValid = (bool) assertNativeWindowIsValid,
.gpuContextPriority = (Engine::GpuContextPriority) gpuContextPriority,
.enableMaterialInstanceUniformBatching = (bool) enableMaterialInstanceUniformBatching,
};
builder->config(&config);
}

View File

@@ -264,8 +264,7 @@ public class Engine {
config.disableHandleUseAfterFreeCheck,
config.preferredShaderLanguage.ordinal(),
config.forceGLES2Context, config.assertNativeWindowIsValid,
config.gpuContextPriority.ordinal(),
config.enableMaterialInstanceUniformBatching);
config.gpuContextPriority.ordinal());
return this;
}
@@ -526,15 +525,6 @@ public class Engine {
* GPU context priority level. Controls GPU work scheduling and preemption.
*/
public GpuContextPriority gpuContextPriority = GpuContextPriority.DEFAULT;
/**
* Enables uniform batching for all material instances.
*
* When enabled, material instances will share a common large uniform buffer
* and use sub-allocations within it. This is expected to reduce CPU overhead
* by minimizing the number of buffer updates sent to the driver.
*/
public boolean enableMaterialInstanceUniformBatching = false;
}
private Engine(long nativeEngine, Config config) {
@@ -1539,7 +1529,7 @@ public class Engine {
boolean disableHandleUseAfterFreeCheck,
int preferredShaderLanguage,
boolean forceGLES2Context, boolean assertNativeWindowIsValid,
int gpuContextPriority, boolean enableMaterialInstanceUniformBatching);
int gpuContextPriority);
private static native void nSetBuilderFeatureLevel(long nativeBuilder, int ordinal);
private static native void nSetBuilderSharedContext(long nativeBuilder, long sharedContext);
private static native void nSetBuilderPaused(long nativeBuilder, boolean paused);

View File

@@ -417,15 +417,6 @@ public:
* GPU context priority level. Controls GPU work scheduling and preemption.
*/
GpuContextPriority gpuContextPriority = GpuContextPriority::DEFAULT;
/**
* Enables uniform batching for all material instances.
*
* When enabled, material instances will share a common large uniform buffer
* and use sub-allocations within it. This is expected to reduce CPU overhead
* by minimizing the number of buffer updates sent to the driver.
*/
bool enableMaterialInstanceUniformBatching = false;
};