summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--host-common/FeatureControlDefGuest.h1
-rw-r--r--stream-servers/GfxStreamBackend.cpp2
-rw-r--r--stream-servers/RenderControl.cpp15
3 files changed, 18 insertions, 0 deletions
diff --git a/host-common/FeatureControlDefGuest.h b/host-common/FeatureControlDefGuest.h
index e6e8d3f2..f808e31b 100644
--- a/host-common/FeatureControlDefGuest.h
+++ b/host-common/FeatureControlDefGuest.h
@@ -62,3 +62,4 @@ FEATURE_CONTROL_ITEM(ModemSimulator)
FEATURE_CONTROL_ITEM(VirtioMouse)
FEATURE_CONTROL_ITEM(VirtconsoleLogcat)
FEATURE_CONTROL_ITEM(VulkanQueueSubmitWithCommands)
+FEATURE_CONTROL_ITEM(VulkanBatchedDescriptorSetUpdate)
diff --git a/stream-servers/GfxStreamBackend.cpp b/stream-servers/GfxStreamBackend.cpp
index 25e4c0b3..ce2631dd 100644
--- a/stream-servers/GfxStreamBackend.cpp
+++ b/stream-servers/GfxStreamBackend.cpp
@@ -417,6 +417,8 @@ extern "C" VG_EXPORT void gfxstream_backend_init(
kFeature_VulkanQueueSubmitWithCommands, true);
feature_set_enabled_override(kFeature_VulkanNativeSwapchain,
useVulkanNativeSwapchain);
+ feature_set_enabled_override(
+ kFeature_VulkanBatchedDescriptorSetUpdate, true);
if (useVulkanNativeSwapchain && !enableVk) {
fprintf(stderr,
diff --git a/stream-servers/RenderControl.cpp b/stream-servers/RenderControl.cpp
index 26f0d1fc..92359fe1 100644
--- a/stream-servers/RenderControl.cpp
+++ b/stream-servers/RenderControl.cpp
@@ -229,6 +229,9 @@ static const char* kAsyncFrameCommands = "ANDROID_EMU_async_frame_commands";
// Queue submit with commands
static const char* kVulkanQueueSubmitWithCommands = "ANDROID_EMU_vulkan_queue_submit_with_commands";
+// Batched descriptor set update
+static constexpr android::base::StringView kVulkanBatchedDescriptorSetUpdate = "ANDROID_EMU_vulkan_batched_descriptor_set_update";
+
static void rcTriggerWait(uint64_t glsync_ptr,
uint64_t thread_ptr,
uint64_t timeline);
@@ -356,6 +359,12 @@ static bool shouldEnableQueueSubmitWithCommands() {
feature_is_enabled(kFeature_VulkanQueueSubmitWithCommands);
}
+static bool shouldEnableBatchedDescriptorSetUpdate() {
+ return shouldEnableVulkan() &&
+ shouldEnableQueueSubmitWithCommands() &&
+ emugl_feature_is_enabled(android::featurecontrol::VulkanBatchedDescriptorSetUpdate);
+}
+
// OpenGL ES 3.x support involves changing the GL_VERSION string, which is
// assumed to be formatted in the following way:
// "OpenGL ES-CM 1.m <vendor-info>" or
@@ -467,6 +476,7 @@ static EGLint rcGetGLString(EGLenum name, void* buffer, EGLint bufferSize) {
bool vulkanShaderFloat16Int8Enabled = shouldEnableVulkanShaderFloat16Int8();
bool vulkanAsyncQueueSubmitEnabled = shouldEnableAsyncQueueSubmit();
bool vulkanQueueSubmitWithCommands = shouldEnableQueueSubmitWithCommands();
+ bool vulkanBatchedDescriptorSetUpdate = shouldEnableBatchedDescriptorSetUpdate();
if (isChecksumEnabled && name == GL_EXTENSIONS) {
glStr += ChecksumCalculatorThreadInfo::getMaxVersionString();
@@ -580,6 +590,11 @@ static EGLint rcGetGLString(EGLenum name, void* buffer, EGLint bufferSize) {
glStr += " ";
}
+ if (vulkanBatchedDescriptorSetUpdate && name == GL_EXTENSIONS) {
+ glStr += kVulkanBatchedDescriptorSetUpdate;
+ glStr += " ";
+ }
+
if (virtioGpuNativeSyncEnabled && name == GL_EXTENSIONS) {
glStr += kVirtioGpuNativeSync;
glStr += " ";