Skip to content

Commit ad6246b

Browse files
author
Android Build Coastguard Worker
committed
Snap for 12763142 from cb47c6c to 25Q1-release
Change-Id: I12852e641004bfeec68eca14ae723da77870b81a
2 parents f5857aa + cb47c6c commit ad6246b

9 files changed

Lines changed: 202 additions & 3 deletions

File tree

cmds/installd/tests/fuzzers/InstalldServiceFuzzer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ bool force_compile_without_image() {
4747
} // namespace android
4848

4949
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
50+
// TODO(b/183141167): need to rewrite 'dump' to avoid SIGPIPE.
51+
signal(SIGPIPE, SIG_IGN);
5052
auto service = sp<InstalldNativeService>::make();
5153
fuzzService(service, FuzzedDataProvider(data, size));
5254
return 0;

libs/binder/BackendUnifiedServiceManager.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ bool BinderCacheWithInvalidation::isClientSideCachingEnabled(const std::string&
132132
serviceName.c_str());
133133
return false;
134134
}
135+
if (kRemoveStaticList) return true;
135136
for (const char* name : kStaticCachableList) {
136137
if (name == serviceName) {
137138
return true;
@@ -175,7 +176,7 @@ Status BackendUnifiedServiceManager::updateCache(const std::string& serviceName,
175176
"isBinderAlive_false");
176177
}
177178
// If we reach here with kRemoveStaticList=true then we know service isn't lazy
178-
else if (kRemoveStaticList || mCacheForGetService->isClientSideCachingEnabled(serviceName)) {
179+
else if (mCacheForGetService->isClientSideCachingEnabled(serviceName)) {
179180
binder::ScopedTrace aidlTrace(ATRACE_TAG_AIDL,
180181
"BinderCacheWithInvalidation::updateCache successful");
181182
return mCacheForGetService->setItem(serviceName, binder);

libs/renderengine/skia/SkiaRenderEngine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ void SkiaRenderEngine::drawLayersInternal(
10091009
const auto& item = layer.source.buffer;
10101010
auto imageTextureRef = getOrCreateBackendTexture(item.buffer->getBuffer(), false);
10111011

1012-
// if the layer's buffer has a fence, then we must must respect the fence prior to using
1012+
// if the layer's buffer has a fence, then we must respect the fence prior to using
10131013
// the buffer.
10141014
if (layer.source.buffer.fence != nullptr) {
10151015
waitFence(context, layer.source.buffer.fence->get());

services/surfaceflinger/common/FlagManager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ void FlagManager::dump(std::string& result) const {
165165
DUMP_ACONFIG_FLAG(deprecate_frame_tracker);
166166
DUMP_ACONFIG_FLAG(skip_invisible_windows_in_input);
167167
DUMP_ACONFIG_FLAG(begone_bright_hlg);
168+
DUMP_ACONFIG_FLAG(window_blur_kawase2);
168169

169170
#undef DUMP_ACONFIG_FLAG
170171
#undef DUMP_LEGACY_SERVER_FLAG
@@ -264,6 +265,7 @@ FLAG_MANAGER_ACONFIG_FLAG(connected_display_hdr, "debug.sf.connected_display_hdr
264265
FLAG_MANAGER_ACONFIG_FLAG(deprecate_frame_tracker, "");
265266
FLAG_MANAGER_ACONFIG_FLAG(skip_invisible_windows_in_input, "");
266267
FLAG_MANAGER_ACONFIG_FLAG(begone_bright_hlg, "debug.sf.begone_bright_hlg");
268+
FLAG_MANAGER_ACONFIG_FLAG(window_blur_kawase2, "");
267269

268270
/// Trunk stable server (R/W) flags ///
269271
FLAG_MANAGER_ACONFIG_FLAG(refresh_rate_overlay_on_external_display, "")

services/surfaceflinger/common/include/common/FlagManager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ class FlagManager {
103103
bool skip_invisible_windows_in_input() const;
104104
bool begone_bright_hlg() const;
105105
bool luts_api() const;
106+
bool window_blur_kawase2() const;
106107

107108
protected:
108109
// overridden for unit tests

services/surfaceflinger/surfaceflinger_flags_new.aconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,4 +295,11 @@ flag {
295295
}
296296
} # vrr_bugfix_dropped_frame
297297

298+
flag {
299+
name: "window_blur_kawase2"
300+
namespace: "core_graphics"
301+
description: "Flag for using Kawase2 algorithm for window blur"
302+
bug: "353826438"
303+
} # window_blur_kawase2
304+
298305
# IMPORTANT - please keep alphabetize to reduce merge conflicts

vulkan/vkjson/vkjson.cc

Lines changed: 164 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,78 @@ struct EnumTraits<VkShaderFloatControlsIndependence> {
400400
}
401401
};
402402

403+
template <>
404+
struct EnumTraits<VkPipelineRobustnessBufferBehavior> {
405+
static bool exist(uint32_t e) {
406+
switch (e) {
407+
case VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT:
408+
case VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED:
409+
case VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS:
410+
case VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2:
411+
return true;
412+
}
413+
return false;
414+
}
415+
};
416+
417+
template <>
418+
struct EnumTraits<VkPipelineRobustnessImageBehavior> {
419+
static bool exist(uint32_t e) {
420+
switch (e) {
421+
case VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT:
422+
case VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED:
423+
case VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS:
424+
case VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2:
425+
return true;
426+
}
427+
return false;
428+
}
429+
};
430+
431+
template <>
432+
struct EnumTraits<VkImageLayout> {
433+
static bool exist(uint32_t e) {
434+
switch (e) {
435+
case VK_IMAGE_LAYOUT_UNDEFINED:
436+
case VK_IMAGE_LAYOUT_GENERAL:
437+
case VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL:
438+
case VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL:
439+
case VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL:
440+
case VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL:
441+
case VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL:
442+
case VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL:
443+
case VK_IMAGE_LAYOUT_PREINITIALIZED:
444+
case VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL:
445+
case VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL:
446+
case VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL:
447+
case VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL:
448+
case VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL:
449+
case VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL:
450+
case VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL:
451+
case VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL:
452+
case VK_IMAGE_LAYOUT_PRESENT_SRC_KHR:
453+
case VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR:
454+
case VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR:
455+
case VK_IMAGE_LAYOUT_VIDEO_DECODE_DPB_KHR:
456+
case VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR:
457+
case VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT:
458+
case VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR:
459+
#ifdef VK_ENABLE_BETA_EXTENSIONS
460+
case VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR:
461+
#endif
462+
#ifdef VK_ENABLE_BETA_EXTENSIONS
463+
case VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR:
464+
#endif
465+
#ifdef VK_ENABLE_BETA_EXTENSIONS
466+
case VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR:
467+
#endif
468+
case VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT:
469+
return true;
470+
}
471+
return false;
472+
}
473+
};
474+
403475
// VkSparseImageFormatProperties
404476

405477
template <typename Visitor>
@@ -810,6 +882,68 @@ inline bool Iterate(Visitor* visitor, VkPhysicalDeviceVulkan13Features* features
810882
visitor->Visit("shaderIntegerDotProduct", &features->shaderIntegerDotProduct) &&
811883
visitor->Visit("maintenance4", &features->maintenance4);
812884
}
885+
886+
template <typename Visitor>
887+
inline bool Iterate(Visitor* visitor, VkJsonCore14* core) {
888+
return
889+
visitor->Visit("features", &core->features) &&
890+
visitor->Visit("properties", &core->properties);
891+
}
892+
893+
template <typename Visitor>
894+
inline bool Iterate(Visitor* visitor, VkPhysicalDeviceVulkan14Properties* properties) {
895+
return
896+
visitor->Visit("lineSubPixelPrecisionBits", &properties->lineSubPixelPrecisionBits) &&
897+
visitor->Visit("maxVertexAttribDivisor", &properties->maxVertexAttribDivisor) &&
898+
visitor->Visit("supportsNonZeroFirstInstance", &properties->supportsNonZeroFirstInstance) &&
899+
visitor->Visit("maxPushDescriptors", &properties->maxPushDescriptors) &&
900+
visitor->Visit("dynamicRenderingLocalReadDepthStencilAttachments", &properties->dynamicRenderingLocalReadDepthStencilAttachments) &&
901+
visitor->Visit("dynamicRenderingLocalReadMultisampledAttachments", &properties->dynamicRenderingLocalReadMultisampledAttachments) &&
902+
visitor->Visit("earlyFragmentMultisampleCoverageAfterSampleCounting", &properties->earlyFragmentMultisampleCoverageAfterSampleCounting) &&
903+
visitor->Visit("earlyFragmentSampleMaskTestBeforeSampleCounting", &properties->earlyFragmentSampleMaskTestBeforeSampleCounting) &&
904+
visitor->Visit("depthStencilSwizzleOneSupport", &properties->depthStencilSwizzleOneSupport) &&
905+
visitor->Visit("polygonModePointSize", &properties->polygonModePointSize) &&
906+
visitor->Visit("nonStrictSinglePixelWideLinesUseParallelogram", &properties->nonStrictSinglePixelWideLinesUseParallelogram) &&
907+
visitor->Visit("nonStrictWideLinesUseParallelogram", &properties->nonStrictWideLinesUseParallelogram) &&
908+
visitor->Visit("blockTexelViewCompatibleMultipleLayers", &properties->blockTexelViewCompatibleMultipleLayers) &&
909+
visitor->Visit("maxCombinedImageSamplerDescriptorCount", &properties->maxCombinedImageSamplerDescriptorCount) &&
910+
visitor->Visit("fragmentShadingRateClampCombinerInputs", &properties->fragmentShadingRateClampCombinerInputs) &&
911+
visitor->Visit("defaultRobustnessStorageBuffers", &properties->defaultRobustnessStorageBuffers) &&
912+
visitor->Visit("defaultRobustnessUniformBuffers", &properties->defaultRobustnessUniformBuffers) &&
913+
visitor->Visit("defaultRobustnessVertexInputs", &properties->defaultRobustnessVertexInputs) &&
914+
visitor->Visit("defaultRobustnessImages", &properties->defaultRobustnessImages) &&
915+
visitor->Visit("copySrcLayoutCount", &properties->copySrcLayoutCount) &&
916+
visitor->VisitArray("pCopySrcLayouts", properties->copySrcLayoutCount, &properties->pCopySrcLayouts) &&
917+
visitor->Visit("copyDstLayoutCount", &properties->copyDstLayoutCount) &&
918+
visitor->VisitArray("pCopyDstLayouts", properties->copyDstLayoutCount, &properties->pCopyDstLayouts) &&
919+
visitor->Visit("optimalTilingLayoutUUID", &properties->optimalTilingLayoutUUID) &&
920+
visitor->Visit("identicalMemoryTypeRequirements", &properties->identicalMemoryTypeRequirements);
921+
}
922+
923+
template <typename Visitor>
924+
inline bool Iterate(Visitor* visitor, VkPhysicalDeviceVulkan14Features* features) {
925+
return
926+
visitor->Visit("globalPriorityQuery", &features->globalPriorityQuery) &&
927+
visitor->Visit("shaderSubgroupRotate", &features->shaderSubgroupRotate) &&
928+
visitor->Visit("shaderSubgroupRotateClustered", &features->shaderSubgroupRotateClustered) &&
929+
visitor->Visit("shaderFloatControls2", &features->shaderFloatControls2) &&
930+
visitor->Visit("shaderExpectAssume", &features->shaderExpectAssume) &&
931+
visitor->Visit("rectangularLines", &features->rectangularLines) &&
932+
visitor->Visit("bresenhamLines", &features->bresenhamLines) &&
933+
visitor->Visit("smoothLines", &features->smoothLines) &&
934+
visitor->Visit("stippledRectangularLines", &features->stippledRectangularLines) &&
935+
visitor->Visit("stippledBresenhamLines", &features->stippledBresenhamLines) &&
936+
visitor->Visit("stippledSmoothLines", &features->stippledSmoothLines) &&
937+
visitor->Visit("vertexAttributeInstanceRateDivisor", &features->vertexAttributeInstanceRateDivisor) &&
938+
visitor->Visit("vertexAttributeInstanceRateZeroDivisor", &features->vertexAttributeInstanceRateZeroDivisor) &&
939+
visitor->Visit("indexTypeUint8", &features->indexTypeUint8) &&
940+
visitor->Visit("dynamicRenderingLocalRead", &features->dynamicRenderingLocalRead) &&
941+
visitor->Visit("maintenance5", &features->maintenance5) &&
942+
visitor->Visit("maintenance6", &features->maintenance6) &&
943+
visitor->Visit("pipelineProtectedAccess", &features->pipelineProtectedAccess) &&
944+
visitor->Visit("pipelineRobustness", &features->pipelineRobustness) &&
945+
visitor->Visit("hostImageCopy", &features->hostImageCopy);
946+
}
813947
// clang-format on
814948

815949
template <typename Visitor>
@@ -1051,7 +1185,7 @@ inline bool Iterate(Visitor* visitor, VkJsonDevice* device) {
10511185
switch (device->properties.apiVersion ^
10521186
VK_API_VERSION_PATCH(device->properties.apiVersion)) {
10531187
case VK_API_VERSION_1_4:
1054-
// TODO: real 1.4 support here
1188+
ret &= visitor->Visit("core14", &device->core14);
10551189
FALLTHROUGH_INTENDED;
10561190
case VK_API_VERSION_1_3:
10571191
ret &= visitor->Visit("core13", &device->core13);
@@ -1224,6 +1358,12 @@ class JsonWriterVisitor {
12241358
return true;
12251359
}
12261360

1361+
template <typename T>
1362+
bool VisitArray(const char* key, uint32_t count, const T *value) {
1363+
object_[key] = ArrayToJsonValue(count, *value);
1364+
return true;
1365+
}
1366+
12271367
Json::Value get_object() const { return object_; }
12281368

12291369
private:
@@ -1288,6 +1428,15 @@ inline bool AsValue(Json::Value* json_value, float* value) {
12881428
return true;
12891429
}
12901430

1431+
inline bool AsValue(Json::Value* json_value, VkImageLayout* t) {
1432+
uint32_t value = 0;
1433+
if (!AsValue(json_value, &value))
1434+
return false;
1435+
if (!EnumTraits<VkImageLayout>::exist(value)) return false;
1436+
*t = static_cast<VkImageLayout>(value);
1437+
return true;
1438+
}
1439+
12911440
template <typename T>
12921441
inline bool AsArray(Json::Value* json_value, uint32_t count, T* values) {
12931442
if (json_value->type() != Json::arrayValue || json_value->size() != count)
@@ -1398,6 +1547,20 @@ class JsonReaderVisitor {
13981547
return false;
13991548
}
14001549

1550+
template <typename T>
1551+
bool VisitArray(const char* key, uint32_t count, T *value) {
1552+
Json::Value json_value = (*object_)[key];
1553+
if (!json_value) {
1554+
if (errors_)
1555+
*errors_ = std::string(key) + " missing.";
1556+
return false;
1557+
}
1558+
if (AsArray(&json_value, count, *value)) return true;
1559+
if (errors_)
1560+
*errors_ = std::string("Wrong type for ") + std::string(key) + ".";
1561+
return false;
1562+
}
1563+
14011564

14021565
private:
14031566
Json::Value* object_;

vulkan/vkjson/vkjson.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ struct VkJsonCore13 {
8484
VkPhysicalDeviceVulkan13Features features;
8585
};
8686

87+
struct VkJsonCore14 {
88+
VkPhysicalDeviceVulkan14Properties properties;
89+
VkPhysicalDeviceVulkan14Features features;
90+
};
91+
8792
struct VkJsonDevice {
8893
VkJsonDevice() {
8994
memset(&properties, 0, sizeof(VkPhysicalDeviceProperties));
@@ -110,6 +115,7 @@ struct VkJsonDevice {
110115
sizeof(VkPhysicalDeviceShaderDrawParameterFeatures));
111116
memset(&core12, 0, sizeof(VkJsonCore12));
112117
memset(&core13, 0, sizeof(VkJsonCore13));
118+
memset(&core14, 0, sizeof(VkJsonCore14));
113119
}
114120
VkPhysicalDeviceProperties properties;
115121
VkPhysicalDeviceFeatures features;
@@ -139,6 +145,7 @@ struct VkJsonDevice {
139145
external_semaphore_properties;
140146
VkJsonCore12 core12;
141147
VkJsonCore13 core13;
148+
VkJsonCore14 core14;
142149
};
143150

144151
struct VkJsonDeviceGroup {

vulkan/vkjson/vkjson_instance.cc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,22 @@ VkJsonDevice VkJsonGetDevice(VkPhysicalDevice physical_device) {
292292
vkGetPhysicalDeviceFeatures2(physical_device, &features);
293293
}
294294

295+
if (device.properties.apiVersion >= VK_API_VERSION_1_4) {
296+
device.core14.properties.sType =
297+
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_PROPERTIES;
298+
device.core14.properties.pNext = properties.pNext;
299+
properties.pNext = &device.core14.properties;
300+
301+
vkGetPhysicalDeviceProperties2(physical_device, &properties);
302+
303+
device.core14.features.sType =
304+
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES;
305+
device.core14.features.pNext = features.pNext;
306+
features.pNext = &device.core14.features;
307+
308+
vkGetPhysicalDeviceFeatures2(physical_device, &features);
309+
}
310+
295311
return device;
296312
}
297313

0 commit comments

Comments
 (0)