החל מ-27 במרץ 2025, מומלץ להשתמש ב-android-latest-release
במקום ב-aosp-main
כדי ליצור תרומות ל-AOSP. מידע נוסף זמין במאמר שינויים ב-AOSP.
Vulkan
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
Android תומך ב-Vulkan, ממשק API לפלטפורמות שונות עם תקורה נמוכה, שמאפשר ליצור גרפיקה תלת-ממדית עם ביצועים גבוהים. בדומה ל-OpenGL ES (GLES), Vulkan מספק כלים ליצירת גרפיקה באיכות גבוהה בזמן אמת באפליקציות. היתרונות של השימוש ב-Vulkan כוללים הפחתה בעלויות העל של המעבד ותמיכה בשפה SPIR-V Binary Intermediate.
ספקי מערכת על שבב (SoC), כמו ספקי חומרה עצמאיים של GPU (IHV), יכולים לכתוב מנהלי התקנים של Vulkan ל-Android. יצרני ציוד מקורי צריכים לשלב את מנהלי ההתקנים האלה במכשירים ספציפיים. פרטים על האינטראקציה של מנהל Vulkan עם המערכת, על אופן ההתקנה של כלים ספציפיים ל-GPU ועל הדרישות הספציפיות ל-Android מופיעים במאמר הטמעת Vulkan.
מפתחי אפליקציות משתמשים ב-Vulkan כדי ליצור אפליקציות שמבצעות פקודות ב-GPU עם עלות ריבית מצטברת (overhead) מופחתת באופן משמעותי. בנוסף, Vulkan מספק מיפוי ישיר יותר ליכולות שקיימות בחומרת הגרפיקה הנוכחית בהשוואה ל-EGL ול-GLES, כך שאפשר לצמצם את הסיכויים לבאגים במנהלי ההתקנים ולקצר את זמן הבדיקה של המפתחים.
למידע כללי על Vulkan, אפשר לעיין בסקירה הכללית על Vulkan או ברשימה של מקורות מידע.
רכיבי Vulkan
תמיכת Vulkan כוללת את הרכיבים הבאים.

איור 1. רכיבי Vulkan
שם הרכיב |
ספק |
תיאור |
שכבות אימות של Vulkan |
Android (ב-NDK) |
ספריות שנעשה בהן שימוש במהלך הפיתוח של אפליקציות Vulkan כדי למצוא שגיאות בשימוש של האפליקציה ב-Vulkan API. אחרי שמוצאים שגיאות בשימוש ב-API, צריך להסיר את הספריות האלה. |
Vulkan Runtime |
Android |
ספריית Native, libvulkan.so , שמספקת Vulkan API מקורי.
רוב הפונקציונליות של Vulkan Runtime מיושמת באמצעות מנהל שמסופק על ידי ספק ה-GPU. Vulkan Runtime עוטף את מנהל ההתקן, מספק יכולות של ניתוב נתוני API (לניפוי באגים ולכלים אחרים למפתחים) ומנהל את האינטראקציה בין מנהל ההתקן לבין יחסי התלות בפלטפורמה. |
Vulkan Driver |
SoC |
מיפוי של Vulkan API לפקודות GPU ספציפיות לחומרה ולאינטראקציות עם מנהל הגרפיקה של הליבה. |
רכיבים ששונו
BufferQueue ו-Gralloc תומכים ב-Vulkan:
- BufferQueue ערכים ושיטות נוספים של enum ב-BufferQueue ובממשק
ANativeWindow
מאפשרים ל-Vulkan Runtime להתחבר ל-BufferQueue דרך ANativeWindow
.
- Gralloc. ממשק אופציונלי מאפשר ל-Gralloc לבדוק אם אפשר להשתמש בפורמט נתון בשילוב ספציפי של יצרן/צרכן בלי להקצות מאגר.
פרטים על הרכיבים האלה זמינים במאמר BufferQueue ו-gralloc. פרטים על ANativeWindow
זמינים במאמר EGLSurfaces ו-OpenGL ES.
משאבים
מקורות המידע הבאים יכולים לעזור לכם ללמוד עוד על Vulkan:
-
Vulkan Loader (
libvulkan.so
) בכתובת platform/frameworks/native/vulkan
. מכיל את מערך הטעינה של Vulkan ב-Android, וגם כמה כלים שקשורים ל-Vulkan ומועילים למפתחי פלטפורמות.
- הטמעת Vulkan
מיועד ליצרני ציוד מקורי (IHV) של GPU שכותבים מנהלי התקנים של Vulkan ל-Android, וליצרני ציוד מקורי שמשלבים את מנהלי ההתקנים האלה במכשירים ספציפיים. במאמר מוסבר איך מתבצעת האינטראקציה של מנהל Vulkan עם המערכת, איך מתקינים כלים ספציפיים ל-GPU ודרישות ההטמעה הספציפיות ל-Android.
- מדריך Vulkan Graphics API המאמר כולל מידע על תחילת השימוש ב-Vulkan באפליקציות ל-Android, על פלטפורמת ההנחיות לעיצוב של Vulkan ב-Android, על שימוש במהדרי shader של Vulkan ועל שימוש בשכבות אימות כדי לשמור על יציבות באפליקציות שמשתמשות ב-Vulkan.
- חדשות Vulkan. אירועים, תיקונים, מדריכים וכתבות חדשותיות נוספות שקשורות ל-Vulkan.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# Vulkan\n\nAndroid supports\n[Vulkan](https://www.khronos.org/vulkan/), a\nlow-overhead, cross-platform API for high-performance 3D graphics. Like\n[OpenGL ES (GLES)](https://www.khronos.org/opengles/),\nVulkan provides tools for creating high-quality, real-time graphics\nin apps. Advantages of using Vulkan include reductions in CPU overhead and\nsupport for the [SPIR-V\nBinary Intermediate](https://www.khronos.org/spir) language.\n\nSystem on chip vendors (SoCs) such as GPU independent hardware vendors (IHVs)\ncan write Vulkan drivers for Android. OEMs need to integrate these\ndrivers for specific devices. For details on how a Vulkan driver interacts with\nthe system, how GPU-specific tools should be installed, and Android-specific\nrequirements, see [Implementing\nVulkan.](/docs/core/graphics/implement-vulkan)\n\nApplication developers use Vulkan to create apps that\nexecute commands on the GPU with significantly reduced overhead. Vulkan also\nprovides a more direct mapping to the capabilities found in current graphics\nhardware compared to [EGL](https://www.khronos.org/egl) and GLES,\nminimizing opportunities for driver bugs and reducing developer testing time.\n\nFor general information on Vulkan, refer to the\n[Vulkan\nOverview](http://khr.io/vulkanlaunchoverview) or see the list of [Resources](#resources).\n\nVulkan components\n-----------------\n\nVulkan support includes the following components.\n\n**Figure 1.** Vulkan components\n\n| Component name | Provider | Description |\n|--------------------------|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Vulkan Validation Layers | Android (in the NDK) | Libraries used during the development of Vulkan apps to find errors in an app's use of the Vulkan API. After API usage errors are found, these libraries should be removed. |\n| Vulkan Runtime | Android | A native library, `libvulkan.so`, that provides a native Vulkan API. Most of Vulkan Runtime's functionality is implemented by a driver provided by the GPU vendor. Vulkan Runtime wraps the driver, provides API interception capabilities (for debugging and other developer tools), and manages the interaction between the driver and the platform dependencies. |\n| Vulkan Driver | SoC | Maps the Vulkan API onto hardware-specific GPU commands and interactions with the kernel graphics driver. |\n\nModified components\n-------------------\n\nBufferQueue and Gralloc support Vulkan:\n\n- **BufferQueue.** Additional enum values and methods in BufferQueue and the `ANativeWindow` interface enable Vulkan Runtime to connect to BufferQueue through `ANativeWindow`.\n- **Gralloc.** An optional interface lets Gralloc discover whether a given format can be used for a particular producer/consumer combination without allocating a buffer.\n\nFor details on these components, see\n[BufferQueue and\ngralloc](/docs/core/graphics/arch-bq-gralloc). For details on `ANativeWindow`, see\n[EGLSurfaces and OpenGL\nES](/docs/core/graphics/arch-egl-opengl)).\n\nResources\n---------\n\nUse the following resources to learn more about Vulkan:\n\n- [Vulkan Loader](https://android.googlesource.com/platform/frameworks/native/+/android16-release/vulkan/#) (`libvulkan.so`) at `platform/frameworks/native/vulkan`. Contains Android's Vulkan loader, as well as some Vulkan-related tools useful to platform developers.\n- [Implementing Vulkan](/docs/core/graphics/implement-vulkan). Intended for GPU IHVs writing Vulkan drivers for Android and OEMs integrating those drivers for specific devices. It describes how a Vulkan driver interacts with the system, how GPU-specific tools should be installed, and Android-specific implementation requirements.\n- [Vulkan Graphics API Guide](https://developer.android.com/ndk/guides/graphics/index.html). Includes information on getting started with using Vulkan in Android apps, Android's Vulkan design guidelines platform, using Vulkan's shader compilers, and using validation layers to help ensure stability in apps using Vulkan.\n- [Vulkan News](https://www.khronos.org/#slider_vulkan). Covers events, patches, tutorials, and more Vulkan-related news articles."]]