aboutsummaryrefslogtreecommitdiffstats
path: root/system/OpenglSystemCommon
diff options
context:
space:
mode:
authorLingfeng Yang <lfy@google.com>2020-07-09 17:42:33 -0700
committerLingfeng Yang <lfy@google.com>2020-07-15 21:56:19 -0700
commitf89f75d19633196b2341998fa212dbca771d65fa (patch)
treecf56668eea98a0126fbe8eefa3eaf912cc7c450d /system/OpenglSystemCommon
parentc42eb49eabdd1e0aef600de7244d6025da63ee68 (diff)
downloaddevice_generic_goldfish-opengl-f89f75d19633196b2341998fa212dbca771d65fa.tar.gz
device_generic_goldfish-opengl-f89f75d19633196b2341998fa212dbca771d65fa.tar.bz2
device_generic_goldfish-opengl-f89f75d19633196b2341998fa212dbca771d65fa.zip
async queue submit (guest)
Bug: 160996822 Change-Id: Ifeabf3de305ce35234cc191b905411f32c19cba7
Diffstat (limited to 'system/OpenglSystemCommon')
-rw-r--r--system/OpenglSystemCommon/EmulatorFeatureInfo.h7
-rw-r--r--system/OpenglSystemCommon/HostConnection.cpp8
-rw-r--r--system/OpenglSystemCommon/HostConnection.h1
3 files changed, 15 insertions, 1 deletions
diff --git a/system/OpenglSystemCommon/EmulatorFeatureInfo.h b/system/OpenglSystemCommon/EmulatorFeatureInfo.h
index e1c414a2..d0ae8530 100644
--- a/system/OpenglSystemCommon/EmulatorFeatureInfo.h
+++ b/system/OpenglSystemCommon/EmulatorFeatureInfo.h
@@ -111,6 +111,9 @@ static const char kVirtioGpuNativeSync[] = "ANDROID_EMU_virtio_gpu_native_sync";
// Vulkan extension that required a protocol update (new marshaling structs)
static const char kVulkanShaderFloat16Int8[] = "ANDROID_EMU_vulkan_shader_float16_int8";
+// Vulkan async queue submit
+static const char kVulkanAsyncQueueSubmit[] = "ANDROID_EMU_vulkan_async_queue_submit";
+
// Struct describing available emulator features
struct EmulatorFeatureInfo {
@@ -131,7 +134,8 @@ struct EmulatorFeatureInfo {
hasSharedSlotsHostMemoryAllocator(false),
hasVulkanFreeMemorySync(false),
hasVirtioGpuNativeSync(false),
- hasVulkanShaderFloat16Int8(false)
+ hasVulkanShaderFloat16Int8(false),
+ hasVulkanAsyncQueueSubmit(false)
{ }
SyncImpl syncImpl;
@@ -151,6 +155,7 @@ struct EmulatorFeatureInfo {
bool hasVulkanFreeMemorySync;
bool hasVirtioGpuNativeSync;
bool hasVulkanShaderFloat16Int8;
+ bool hasVulkanAsyncQueueSubmit;
};
enum HostConnectionType {
diff --git a/system/OpenglSystemCommon/HostConnection.cpp b/system/OpenglSystemCommon/HostConnection.cpp
index d7478d2f..9c6cce37 100644
--- a/system/OpenglSystemCommon/HostConnection.cpp
+++ b/system/OpenglSystemCommon/HostConnection.cpp
@@ -639,6 +639,7 @@ ExtendedRCEncoderContext *HostConnection::rcEncoder()
queryAndSetVulkanFreeMemorySync(rcEnc);
queryAndSetVirtioGpuNativeSync(rcEnc);
queryAndSetVulkanShaderFloat16Int8Support(rcEnc);
+ queryAndSetVulkanAsyncQueueSubmitSupport(m_rcEnc);
if (m_processPipe) {
m_processPipe->processPipeInit(m_connectionType, rcEnc);
}
@@ -894,3 +895,10 @@ void HostConnection::queryAndSetVulkanShaderFloat16Int8Support(ExtendedRCEncoder
rcEnc->featureInfo()->hasVulkanShaderFloat16Int8 = true;
}
}
+
+void HostConnection::queryAndSetVulkanAsyncQueueSubmitSupport(ExtendedRCEncoderContext* rcEnc) {
+ std::string glExtensions = queryGLExtensions(rcEnc);
+ if (glExtensions.find(kVulkanAsyncQueueSubmit) != std::string::npos) {
+ rcEnc->featureInfo()->hasVulkanAsyncQueueSubmit = true;
+ }
+}
diff --git a/system/OpenglSystemCommon/HostConnection.h b/system/OpenglSystemCommon/HostConnection.h
index 4ccd5a77..69d8a16b 100644
--- a/system/OpenglSystemCommon/HostConnection.h
+++ b/system/OpenglSystemCommon/HostConnection.h
@@ -216,6 +216,7 @@ private:
void queryAndSetVulkanFreeMemorySync(ExtendedRCEncoderContext *rcEnc);
void queryAndSetVirtioGpuNativeSync(ExtendedRCEncoderContext *rcEnc);
void queryAndSetVulkanShaderFloat16Int8Support(ExtendedRCEncoderContext *rcEnc);
+ void queryAndSetVulkanAsyncQueueSubmitSupport(ExtendedRCEncoderContext *rcEnc);
private:
HostConnectionType m_connectionType;