aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-06-26 03:01:30 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-06-26 03:01:30 +0000
commit1e9866bcb9c5a58050dd2c0bcdd886a4380209f4 (patch)
tree72164be104b7bef12f61d0edd2e5f7a2027b3b26
parent67b5d6e2ccf6545909a07663b4dff14443899ef7 (diff)
parenteb100a201f466adb49b11d6612b8aae16dfb7dd6 (diff)
downloadgoldfish-opengl-1e9866bcb9c5a58050dd2c0bcdd886a4380209f4.tar.gz
Snap for 7495277 from eb100a201f466adb49b11d6612b8aae16dfb7dd6 to sc-release
Change-Id: I0c0d14186a6958b7fac3042c4d1cc769bdaa92e6
-rw-r--r--shared/GoldfishAddressSpace/include/goldfish_address_space_android.impl4
-rw-r--r--system/vulkan_enc/ResourceTracker.cpp14
2 files changed, 11 insertions, 7 deletions
diff --git a/shared/GoldfishAddressSpace/include/goldfish_address_space_android.impl b/shared/GoldfishAddressSpace/include/goldfish_address_space_android.impl
index 3467ec5b..7c570cde 100644
--- a/shared/GoldfishAddressSpace/include/goldfish_address_space_android.impl
+++ b/shared/GoldfishAddressSpace/include/goldfish_address_space_android.impl
@@ -261,10 +261,6 @@ void *GoldfishAddressSpaceBlock::mmap(uint64_t host_addr)
::abort();
}
- bool nonzeroOffsetInPage = host_addr & (PAGE_SIZE - 1);
- uint64_t extraBytes = nonzeroOffsetInPage ? PAGE_SIZE : 0;
- m_size += extraBytes;
-
void *result;
const int res = memoryMap(NULL, m_size, m_handle, m_offset, &result);
if (res) {
diff --git a/system/vulkan_enc/ResourceTracker.cpp b/system/vulkan_enc/ResourceTracker.cpp
index 3fa037a5..2e89e28e 100644
--- a/system/vulkan_enc/ResourceTracker.cpp
+++ b/system/vulkan_enc/ResourceTracker.cpp
@@ -1595,8 +1595,13 @@ public:
void*,
VkPhysicalDevice,
VkPhysicalDeviceProperties* pProperties) {
+ // We have host properties at this point
if (pProperties) {
- pProperties->deviceType = VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU;
+ // We need this to ignore some cts tests when using Swiftshader Vk
+ if (pProperties->deviceType != VK_PHYSICAL_DEVICE_TYPE_CPU) {
+ // Otherwise, if not CPU type, mark as virtual type
+ pProperties->deviceType = VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU;
+ }
}
}
@@ -1605,8 +1610,11 @@ public:
VkPhysicalDevice,
VkPhysicalDeviceProperties2* pProperties) {
if (pProperties) {
- pProperties->properties.deviceType =
- VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU;
+ // We need this to ignore some cts tests when using Swiftshader Vk
+ if (pProperties->properties.deviceType != VK_PHYSICAL_DEVICE_TYPE_CPU) {
+ // Otherwise, if not CPU type, mark as virtual type
+ pProperties->properties.deviceType = VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU;
+ }
VkPhysicalDeviceDeviceMemoryReportFeaturesEXT* memoryReportFeaturesEXT =
vk_find_struct<VkPhysicalDeviceDeviceMemoryReportFeaturesEXT>(pProperties);