From 9a2cd200190d23fab4758aabb96d5005af9a37a3 Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Thu, 23 Jul 2026 22:26:43 +0200 Subject: [PATCH] fixing Phi device upload, adding actions for bidirectionnal git mirrors --- .gitea/workflows/mirror-to-github.yml | 190 +++++ .github/workflows/sync-pr-to-gitea.yml | 336 ++++++++ README.md | 1026 ++++++++++++------------ build.zig | 2 +- src/intel/lib.zig | 2 + src/phi/PhiDevice.zig | 48 +- src/phi/PhiTransport.zig | 5 + src/phi/mic/Daemon.c | 4 +- src/phi/mic/Memory.c | 2 +- src/phi/mic/main.c | 32 +- src/phi/shared/Protocol.h | 2 +- 11 files changed, 1126 insertions(+), 523 deletions(-) create mode 100644 .gitea/workflows/mirror-to-github.yml create mode 100644 .github/workflows/sync-pr-to-gitea.yml diff --git a/.gitea/workflows/mirror-to-github.yml b/.gitea/workflows/mirror-to-github.yml new file mode 100644 index 0000000..e82338c --- /dev/null +++ b/.gitea/workflows/mirror-to-github.yml @@ -0,0 +1,190 @@ +name: Mirror Gitea refs to GitHub + +on: + push: + branches: + - main + tags: + - "*" + +jobs: + mirror: + runs-on: ubuntu-latest + + env: + MIRROR_REPOSITORY: ${{ vars.MIRROR_REPOSITORY }} + MIRROR_BASE_BRANCH: ${{ vars.MIRROR_BASE_BRANCH }} + + MIRROR_GITHUB_SSH_KEY: ${{ secrets.MIRROR_GITHUB_SSH_KEY }} + MIRROR_GITHUB_KNOWN_HOSTS: ${{ secrets.MIRROR_GITHUB_KNOWN_HOSTS }} + + MIRROR_REF_TYPE: ${{ gitea.ref_type }} + MIRROR_REF_NAME: ${{ gitea.ref_name }} + + steps: + - name: Check out the authoritative Gitea repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Push without rewriting GitHub history + shell: bash + run: | + set -Eeuo pipefail + + RequireVariable() { + local variable_name="$1" + + if [[ -z "${!variable_name:-}" ]]; then + echo "Missing required variable: ${variable_name}" >&2 + exit 1 + fi + } + + for variable_name in \ + MIRROR_REPOSITORY \ + MIRROR_BASE_BRANCH \ + MIRROR_GITHUB_SSH_KEY \ + MIRROR_GITHUB_KNOWN_HOSTS \ + MIRROR_REF_TYPE \ + MIRROR_REF_NAME; do + RequireVariable "${variable_name}" + done + + install -d -m 700 "${HOME}/.ssh" + + printf '%s\n' "${MIRROR_GITHUB_SSH_KEY}" \ + > "${HOME}/.ssh/id_ed25519" + + printf '%s\n' "${MIRROR_GITHUB_KNOWN_HOSTS}" \ + > "${HOME}/.ssh/known_hosts" + + chmod 600 "${HOME}/.ssh/id_ed25519" + chmod 644 "${HOME}/.ssh/known_hosts" + + git remote remove github 2>/dev/null || true + + git remote add github \ + "git@github.com:${MIRROR_REPOSITORY}.git" + + if [[ "${MIRROR_REF_TYPE}" == "branch" ]]; then + if [[ + "${MIRROR_REF_NAME}" != "${MIRROR_BASE_BRANCH}" + ]]; then + echo \ + "Ignoring non-authoritative branch" \ + "${MIRROR_REF_NAME}." + + exit 0 + fi + + git fetch origin \ + "+refs/heads/${MIRROR_BASE_BRANCH}:refs/remotes/origin/${MIRROR_BASE_BRANCH}" + + local_sha="$( + git rev-parse \ + "refs/remotes/origin/${MIRROR_BASE_BRANCH}" + )" + + remote_sha="$( + git ls-remote \ + github \ + "refs/heads/${MIRROR_BASE_BRANCH}" \ + | awk 'NR == 1 { print $1 }' + )" + + if [[ -z "${remote_sha}" ]]; then + git push github \ + "${local_sha}:refs/heads/${MIRROR_BASE_BRANCH}" + + exit 0 + fi + + if [[ "${local_sha}" == "${remote_sha}" ]]; then + echo \ + "GitHub ${MIRROR_BASE_BRANCH}" \ + "is already synchronized." + + exit 0 + fi + + git fetch \ + --no-tags \ + github \ + "refs/heads/${MIRROR_BASE_BRANCH}:refs/remotes/github/${MIRROR_BASE_BRANCH}" + + if ! git merge-base \ + --is-ancestor \ + "${remote_sha}" \ + "${local_sha}"; then + + echo \ + "Refusing to overwrite GitHub" \ + "${MIRROR_BASE_BRANCH}." \ + >&2 + + echo \ + "GitHub ${remote_sha} is not an ancestor" \ + "of Gitea ${local_sha}." \ + >&2 + + echo \ + "Import and resolve the GitHub commit" \ + "on Gitea first." \ + >&2 + + exit 1 + fi + + git push github \ + "${local_sha}:refs/heads/${MIRROR_BASE_BRANCH}" + + exit 0 + fi + + if [[ "${MIRROR_REF_TYPE}" == "tag" ]]; then + local_tag_sha="$( + git rev-parse \ + "refs/tags/${MIRROR_REF_NAME}" + )" + + remote_tag_sha="$( + git ls-remote \ + github \ + "refs/tags/${MIRROR_REF_NAME}" \ + | awk 'NR == 1 { print $1 }' + )" + + if [[ -z "${remote_tag_sha}" ]]; then + git push github \ + "refs/tags/${MIRROR_REF_NAME}:refs/tags/${MIRROR_REF_NAME}" + + exit 0 + fi + + if [[ "${local_tag_sha}" == "${remote_tag_sha}" ]]; then + echo \ + "GitHub tag ${MIRROR_REF_NAME}" \ + "is already synchronized." + + exit 0 + fi + + echo \ + "Refusing to rewrite GitHub tag" \ + "${MIRROR_REF_NAME}." \ + >&2 + + echo \ + "GitHub has ${remote_tag_sha};" \ + "Gitea has ${local_tag_sha}." \ + >&2 + + exit 1 + fi + + echo \ + "Unsupported ref type: ${MIRROR_REF_TYPE}" \ + >&2 + + exit 1 diff --git a/.github/workflows/sync-pr-to-gitea.yml b/.github/workflows/sync-pr-to-gitea.yml new file mode 100644 index 0000000..030b243 --- /dev/null +++ b/.github/workflows/sync-pr-to-gitea.yml @@ -0,0 +1,336 @@ +name: Sync GitHub PR to Gitea + +on: + pull_request_target: + types: + - opened + - reopened + - synchronize + - edited + - ready_for_review + - converted_to_draft + - closed + +permissions: + contents: read + pull-requests: read + +concurrency: + group: gitea-pr-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + sync: + runs-on: ubuntu-latest + + env: + GITEA_URL: ${{ vars.GITEA_URL }} + GITEA_OWNER: ${{ vars.GITEA_OWNER }} + GITEA_REPO: ${{ vars.GITEA_REPO }} + GITEA_SSH_REMOTE: ${{ vars.GITEA_SSH_REMOTE }} + GITEA_BASE_BRANCH: ${{ vars.GITEA_BASE_BRANCH }} + + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + GITEA_SSH_KEY: ${{ secrets.GITEA_SSH_KEY }} + GITEA_KNOWN_HOSTS: ${{ secrets.GITEA_KNOWN_HOSTS }} + + GH_REPO_TOKEN: ${{ github.token }} + + steps: + - name: Synchronize pull request + shell: bash + run: | + set -Eeuo pipefail + + RequireVariable() { + local variable_name="$1" + + if [[ -z "${!variable_name:-}" ]]; then + echo "Missing required variable: ${variable_name}" >&2 + exit 1 + fi + } + + ApiRequest() { + local method="$1" + local path="$2" + local data="${3:-}" + + if [[ -n "${data}" ]]; then + curl \ + --silent \ + --show-error \ + --fail-with-body \ + --request "${method}" \ + --header "Authorization: token ${GITEA_TOKEN}" \ + --header "Content-Type: application/json" \ + --data "${data}" \ + "${GITEA_URL%/}/api/v1${path}" + else + curl \ + --silent \ + --show-error \ + --fail-with-body \ + --request "${method}" \ + --header "Authorization: token ${GITEA_TOKEN}" \ + --header "Accept: application/json" \ + "${GITEA_URL%/}/api/v1${path}" + fi + } + + FindGiteaPullRequest() { + local branch_name="$1" + local page + local response + local pull_number + + for page in $(seq 1 100); do + response="$( + ApiRequest GET \ + "/repos/${GITEA_OWNER}/${GITEA_REPO}/pulls?state=all&page=${page}&limit=50" + )" + + pull_number="$( + jq \ + -r \ + --arg branch_name "${branch_name}" \ + --arg base_branch "${GITEA_BASE_BRANCH}" \ + ' + .[] + | select( + .head.ref == $branch_name + and .base.ref == $base_branch + ) + | (.number // .index) + ' \ + <<<"${response}" \ + | head -n 1 + )" + + if [[ + -n "${pull_number}" + && "${pull_number}" != "null" + ]]; then + printf '%s\n' "${pull_number}" + return 0 + fi + + if [[ "$(jq 'length' <<<"${response}")" -lt 50 ]]; then + break + fi + done + + return 1 + } + + for variable_name in \ + GITEA_URL \ + GITEA_OWNER \ + GITEA_REPO \ + GITEA_SSH_REMOTE \ + GITEA_BASE_BRANCH \ + GITEA_TOKEN \ + GITEA_SSH_KEY \ + GITEA_KNOWN_HOSTS \ + GH_REPO_TOKEN; do + RequireVariable "${variable_name}" + done + + action="$( + jq -r '.action' "${GITHUB_EVENT_PATH}" + )" + + pr_number="$( + jq -r '.pull_request.number' "${GITHUB_EVENT_PATH}" + )" + + pr_title="$( + jq -r '.pull_request.title' "${GITHUB_EVENT_PATH}" + )" + + pr_body="$( + jq -r '.pull_request.body // ""' "${GITHUB_EVENT_PATH}" + )" + + pr_url="$( + jq -r '.pull_request.html_url' "${GITHUB_EVENT_PATH}" + )" + + pr_author="$( + jq -r '.pull_request.user.login' "${GITHUB_EVENT_PATH}" + )" + + expected_sha="$( + jq -r '.pull_request.head.sha' "${GITHUB_EVENT_PATH}" + )" + + github_base_branch="$( + jq -r '.pull_request.base.ref' "${GITHUB_EVENT_PATH}" + )" + + imported_branch="github-pr/${pr_number}" + + if [[ + "${github_base_branch}" != "${GITEA_BASE_BRANCH}" + ]]; then + echo \ + "Ignoring PR #${pr_number}: base branch" \ + "${github_base_branch} is not ${GITEA_BASE_BRANCH}." + + exit 0 + fi + + install -d -m 700 "${HOME}/.ssh" + + printf '%s\n' "${GITEA_SSH_KEY}" \ + > "${HOME}/.ssh/id_ed25519" + + printf '%s\n' "${GITEA_KNOWN_HOSTS}" \ + > "${HOME}/.ssh/known_hosts" + + chmod 600 "${HOME}/.ssh/id_ed25519" + chmod 644 "${HOME}/.ssh/known_hosts" + + repository_dir="$(mktemp -d)" + + trap 'rm -rf "${repository_dir}"' EXIT + + git -C "${repository_dir}" init --bare + + git -C "${repository_dir}" remote add github \ + "https://github.com/${GITHUB_REPOSITORY}.git" + + git -C "${repository_dir}" remote add gitea \ + "${GITEA_SSH_REMOTE}" + + github_basic_auth="$( + printf \ + 'x-access-token:%s' \ + "${GH_REPO_TOKEN}" \ + | base64 \ + | tr -d '\n' + )" + + git -C "${repository_dir}" config \ + http.https://github.com/.extraheader \ + "AUTHORIZATION: basic ${github_basic_auth}" + + gitea_pull_number="$( + FindGiteaPullRequest "${imported_branch}" || true + )" + + if [[ "${action}" == "closed" ]]; then + if [[ -n "${gitea_pull_number}" ]]; then + close_payload="$( + jq -n '{state: "closed"}' + )" + + ApiRequest \ + PATCH \ + "/repos/${GITEA_OWNER}/${GITEA_REPO}/pulls/${gitea_pull_number}" \ + "${close_payload}" \ + >/dev/null + fi + + git -C "${repository_dir}" push gitea \ + ":refs/heads/${imported_branch}" \ + || true + + exit 0 + fi + + git -C "${repository_dir}" fetch \ + --no-tags \ + github \ + "+refs/pull/${pr_number}/head:refs/remotes/github/pr/${pr_number}" + + fetched_sha="$( + git -C "${repository_dir}" rev-parse \ + "refs/remotes/github/pr/${pr_number}" + )" + + if [[ "${fetched_sha}" != "${expected_sha}" ]]; then + echo \ + "Fetched ${fetched_sha}, expected ${expected_sha}." \ + "Refusing to synchronize." \ + >&2 + + exit 1 + fi + + current_gitea_sha="$( + git -C "${repository_dir}" ls-remote \ + gitea \ + "refs/heads/${imported_branch}" \ + | awk 'NR == 1 { print $1 }' + )" + + if [[ -n "${current_gitea_sha}" ]]; then + git -C "${repository_dir}" push \ + --force-with-lease="refs/heads/${imported_branch}:${current_gitea_sha}" \ + gitea \ + "refs/remotes/github/pr/${pr_number}:refs/heads/${imported_branch}" + else + git -C "${repository_dir}" push \ + gitea \ + "refs/remotes/github/pr/${pr_number}:refs/heads/${imported_branch}" + fi + + marker="" + + imported_body="$(cat </dev/null + else + update_payload="$( + jq \ + -n \ + --arg title "${imported_title}" \ + --arg body "${imported_body}" \ + '{ + title: $title, + body: $body, + state: "open" + }' + )" + + ApiRequest \ + PATCH \ + "/repos/${GITEA_OWNER}/${GITEA_REPO}/pulls/${gitea_pull_number}" \ + "${update_payload}" \ + >/dev/null + fi diff --git a/README.md b/README.md index a19999a..0f4cd37 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ It was forged for my own learning and amusement alone. Pray, do not wield it in To understand Vulkan - not as a humble API mere mortals call upon, but as a labyrinthine system where one may craft a driver by hand. It does not seek to produce a performant or production-worthy driver. \ -*The gods are merciful, but not that merciful.* +_The gods are merciful, but not that merciful._ ## Soft [software] @@ -22,11 +22,13 @@ It maketh use of a bespoke [SPIR-V interpreter](https://git.kbz8.me/kbz_8/SPIRV- ### Build If thou art truly determined: + ``` zig build soft --release=[fast|safe|small] ``` And should thou seek additional build options with: + ``` zig build --help ``` @@ -37,6 +39,7 @@ The precise ritual varies by system - consult the tomes of your operating system Use at your own risk. If thy machine shudders, weeps, or attempts to flee - know that it was warned. #### Vulkan 1.0 specification +
The present standing of thy Vulkan 1.0 specification's implementation @@ -46,174 +49,175 @@ Use at your own risk. If thy machine shudders, weeps, or attempts to flee - know ⚠️ Implemented, yet perchance not fully tested nor proven conformant, but rather working in a manner most general to thee and thine.\ Assume thou that functions lacking in this array are, for now, not intended to be wrought. -Name | Status --------------------------------------------------|-------- -vkAcquireNextImage2KHR | ✅ Implemented -vkAcquireNextImageKHR | ✅ Implemented -vkAllocateCommandBuffers | ✅ Implemented -vkAllocateDescriptorSets | ✅ Implemented -vkAllocateMemory | ✅ Implemented -vkBeginCommandBuffer | ✅ Implemented -vkBindBufferMemory | ✅ Implemented -vkBindImageMemory | ✅ Implemented -vkCmdBeginQuery | ✅ Implemented -vkCmdBeginRenderPass | ✅ Implemented -vkCmdBindDescriptorSets | ✅ Implemented -vkCmdBindIndexBuffer | ✅ Implemented -vkCmdBindPipeline | ✅ Implemented -vkCmdBindVertexBuffers | ✅ Implemented -vkCmdBlitImage | ✅ Implemented -vkCmdClearAttachments | ✅ Implemented -vkCmdClearColorImage | ✅ Implemented -vkCmdClearDepthStencilImage | ✅ Implemented -vkCmdCopyBuffer | ✅ Implemented -vkCmdCopyBufferToImage | ✅ Implemented -vkCmdCopyImage | ✅ Implemented -vkCmdCopyImageToBuffer | ✅ Implemented -vkCmdCopyQueryPoolResults | ✅ Implemented -vkCmdDispatch | ✅ Implemented -vkCmdDispatchBaseKHR | ✅ Implemented -vkCmdDispatchIndirect | ✅ Implemented -vkCmdDraw | ✅ Implemented -vkCmdDrawIndexed | ✅ Implemented -vkCmdDrawIndexedIndirect | ✅ Implemented -vkCmdDrawIndirect | ✅ Implemented -vkCmdEndQuery | ✅ Implemented -vkCmdEndRenderPass | ✅ Implemented -vkCmdExecuteCommands | ✅ Implemented -vkCmdFillBuffer | ✅ Implemented -vkCmdNextSubpass | ✅ Implemented -vkCmdPipelineBarrier | ✅ Implemented -vkCmdPushConstants | ✅ Implemented -vkCmdResetEvent | ✅ Implemented -vkCmdResetQueryPool | ✅ Implemented -vkCmdResolveImage | ✅ Implemented -vkCmdSetBlendConstants | ✅ Implemented -vkCmdSetDepthBias | ✅ Implemented -vkCmdSetDepthBounds | ✅ Implemented -vkCmdSetDeviceMaskKHR | ✅ Implemented -vkCmdSetEvent | ✅ Implemented -vkCmdSetLineWidth | ✅ Implemented -vkCmdSetScissor | ✅ Implemented -vkCmdSetStencilCompareMask | ✅ Implemented -vkCmdSetStencilReference | ✅ Implemented -vkCmdSetStencilWriteMask | ✅ Implemented -vkCmdSetViewport | ✅ Implemented -vkCmdUpdateBuffer | ✅ Implemented -vkCmdWaitEvents | ✅ Implemented -vkCmdWriteTimestamp | ✅ Implemented -vkCreateBuffer | ✅ Implemented -vkCreateBufferView | ✅ Implemented -vkCreateCommandPool | ✅ Implemented -vkCreateComputePipelines | ✅ Implemented -vkCreateDescriptorPool | ✅ Implemented -vkCreateDescriptorSetLayout | ✅ Implemented -vkCreateDevice | ✅ Implemented -vkCreateEvent | ✅ Implemented -vkCreateFence | ✅ Implemented -vkCreateFramebuffer | ✅ Implemented -vkCreateGraphicsPipelines | ✅ Implemented -vkCreateImage | ✅ Implemented -vkCreateImageView | ✅ Implemented -vkCreateInstance | ✅ Implemented -vkCreatePipelineCache | ✅ Implemented -vkCreatePipelineLayout | ✅ Implemented -vkCreateQueryPool | ✅ Implemented -vkCreateRenderPass | ✅ Implemented -vkCreateSampler | ✅ Implemented -vkCreateSemaphore | ✅ Implemented -vkCreateShaderModule | ✅ Implemented -vkCreateSwapchainKHR | ✅ Implemented -vkCreateWaylandSurfaceKHR | ✅ Implemented -vkCreateWin32SurfaceKHR | ⚙️ WIP -vkCreateXcbSurfaceKHR | ⚙️ WIP -vkCreateXlibSurfaceKHR | ⚙️ WIP -vkDestroyBuffer | ✅ Implemented -vkDestroyBufferView | ✅ Implemented -vkDestroyCommandPool | ✅ Implemented -vkDestroyDescriptorPool | ✅ Implemented -vkDestroyDescriptorSetLayout | ✅ Implemented -vkDestroyDevice | ✅ Implemented -vkDestroyEvent | ✅ Implemented -vkDestroyFence | ✅ Implemented -vkDestroyFramebuffer | ✅ Implemented -vkDestroyImage | ✅ Implemented -vkDestroyImageView | ✅ Implemented -vkDestroyInstance | ✅ Implemented -vkDestroyPipeline | ✅ Implemented -vkDestroyPipelineCache | ✅ Implemented -vkDestroyPipelineLayout | ✅ Implemented -vkDestroyQueryPool | ✅ Implemented -vkDestroyRenderPass | ✅ Implemented -vkDestroySampler | ✅ Implemented -vkDestroySemaphore | ✅ Implemented -vkDestroyShaderModule | ✅ Implemented -vkDestroySurfaceKHR | ✅ Implemented -vkDestroySwapchainKHR | ✅ Implemented -vkDeviceWaitIdle | ✅ Implemented -vkEndCommandBuffer | ✅ Implemented -vkEnumerateDeviceExtensionProperties | ✅ Implemented -vkEnumerateDeviceLayerProperties | ✅ Implemented -vkEnumerateInstanceExtensionProperties | ✅ Implemented -vkEnumerateInstanceLayerProperties | ✅ Implemented -vkEnumeratePhysicalDeviceGroupsKHR | ✅ Implemented -vkEnumeratePhysicalDevices | ✅ Implemented -vkFlushMappedMemoryRanges | ✅ Implemented -vkFreeCommandBuffers | ✅ Implemented -vkFreeDescriptorSets | ✅ Implemented -vkFreeMemory | ✅ Implemented -vkGetBufferDeviceAddress | ✅ Implemented -vkGetBufferDeviceAddressEXT | ✅ Implemented -vkGetBufferDeviceAddressKHR | ✅ Implemented -vkGetBufferMemoryRequirements | ✅ Implemented -vkGetDeviceGroupPeerMemoryFeaturesKHR | ✅ Implemented -vkGetDeviceGroupPresentCapabilitiesKHR | ✅ Implemented -vkGetDeviceGroupSurfacePresentModesKHR | ✅ Implemented -vkGetDeviceMemoryCommitment | ✅ Implemented -vkGetDeviceProcAddr | ✅ Implemented -vkGetDeviceQueue | ✅ Implemented -vkGetEventStatus | ✅ Implemented -vkGetFenceStatus | ✅ Implemented -vkGetImageMemoryRequirements | ✅ Implemented -vkGetImageSparseMemoryRequirements | ❎ Unsupported -vkGetImageSubresourceLayout | ✅ Implemented -vkGetInstanceProcAddr | ✅ Implemented -vkGetPhysicalDeviceFeatures | ✅ Implemented -vkGetPhysicalDeviceFormatProperties | ✅ Implemented -vkGetPhysicalDeviceImageFormatProperties | ✅ Implemented -vkGetPhysicalDeviceMemoryProperties | ✅ Implemented -vkGetPhysicalDeviceProperties | ✅ Implemented -vkGetPhysicalDeviceQueueFamilyProperties | ✅ Implemented -vkGetPhysicalDeviceSparseImageFormatProperties | ❎ Unsupported -vkGetPhysicalDeviceSurfaceCapabilitiesKHR | ✅ Implemented -vkGetPhysicalDeviceSurfaceFormatsKHR | ✅ Implemented -vkGetPhysicalDeviceSurfacePresentModesKHR | ✅ Implemented -vkGetPhysicalDeviceSurfaceSupportKHR | ✅ Implemented -vkGetPhysicalDeviceWaylandPresentationSupportKHR | ✅ Implemented -vkGetPhysicalDeviceWin32PresentationSupportKHR | ⚙️ WIP -vkGetPhysicalDeviceXcbPresentationSupportKHR | ⚙️ WIP -vkGetPhysicalDeviceXlibPresentationSupportKHR | ⚙️ WIP -vkGetPipelineCacheData | ✅ Implemented -vkGetQueryPoolResults | ✅ Implemented -vkGetRenderAreaGranularity | ✅ Implemented -vkGetSwapchainImagesKHR | ✅ Implemented -vkInvalidateMappedMemoryRanges | ✅ Implemented -vkMapMemory | ✅ Implemented -vkMergePipelineCaches | ✅ Implemented -vkQueueBindSparse | ❎ Unsupported -vkQueuePresentKHR | ✅ Implemented -vkQueueSubmit | ✅ Implemented -vkQueueWaitIdle | ✅ Implemented -vkResetCommandBuffer | ✅ Implemented -vkResetCommandPool | ✅ Implemented -vkResetDescriptorPool | ✅ Implemented -vkResetEvent | ✅ Implemented -vkResetFences | ✅ Implemented -vkResetQueryPool | ✅ Implemented -vkSetEvent | ✅ Implemented -vkUnmapMemory | ✅ Implemented -vkUpdateDescriptorSets | ✅ Implemented -vkWaitForFences | ✅ Implemented +| Name | Status | +| ------------------------------------------------ | -------------- | +| vkAcquireNextImage2KHR | ✅ Implemented | +| vkAcquireNextImageKHR | ✅ Implemented | +| vkAllocateCommandBuffers | ✅ Implemented | +| vkAllocateDescriptorSets | ✅ Implemented | +| vkAllocateMemory | ✅ Implemented | +| vkBeginCommandBuffer | ✅ Implemented | +| vkBindBufferMemory | ✅ Implemented | +| vkBindImageMemory | ✅ Implemented | +| vkCmdBeginQuery | ✅ Implemented | +| vkCmdBeginRenderPass | ✅ Implemented | +| vkCmdBindDescriptorSets | ✅ Implemented | +| vkCmdBindIndexBuffer | ✅ Implemented | +| vkCmdBindPipeline | ✅ Implemented | +| vkCmdBindVertexBuffers | ✅ Implemented | +| vkCmdBlitImage | ✅ Implemented | +| vkCmdClearAttachments | ✅ Implemented | +| vkCmdClearColorImage | ✅ Implemented | +| vkCmdClearDepthStencilImage | ✅ Implemented | +| vkCmdCopyBuffer | ✅ Implemented | +| vkCmdCopyBufferToImage | ✅ Implemented | +| vkCmdCopyImage | ✅ Implemented | +| vkCmdCopyImageToBuffer | ✅ Implemented | +| vkCmdCopyQueryPoolResults | ✅ Implemented | +| vkCmdDispatch | ✅ Implemented | +| vkCmdDispatchBaseKHR | ✅ Implemented | +| vkCmdDispatchIndirect | ✅ Implemented | +| vkCmdDraw | ✅ Implemented | +| vkCmdDrawIndexed | ✅ Implemented | +| vkCmdDrawIndexedIndirect | ✅ Implemented | +| vkCmdDrawIndirect | ✅ Implemented | +| vkCmdEndQuery | ✅ Implemented | +| vkCmdEndRenderPass | ✅ Implemented | +| vkCmdExecuteCommands | ✅ Implemented | +| vkCmdFillBuffer | ✅ Implemented | +| vkCmdNextSubpass | ✅ Implemented | +| vkCmdPipelineBarrier | ✅ Implemented | +| vkCmdPushConstants | ✅ Implemented | +| vkCmdResetEvent | ✅ Implemented | +| vkCmdResetQueryPool | ✅ Implemented | +| vkCmdResolveImage | ✅ Implemented | +| vkCmdSetBlendConstants | ✅ Implemented | +| vkCmdSetDepthBias | ✅ Implemented | +| vkCmdSetDepthBounds | ✅ Implemented | +| vkCmdSetDeviceMaskKHR | ✅ Implemented | +| vkCmdSetEvent | ✅ Implemented | +| vkCmdSetLineWidth | ✅ Implemented | +| vkCmdSetScissor | ✅ Implemented | +| vkCmdSetStencilCompareMask | ✅ Implemented | +| vkCmdSetStencilReference | ✅ Implemented | +| vkCmdSetStencilWriteMask | ✅ Implemented | +| vkCmdSetViewport | ✅ Implemented | +| vkCmdUpdateBuffer | ✅ Implemented | +| vkCmdWaitEvents | ✅ Implemented | +| vkCmdWriteTimestamp | ✅ Implemented | +| vkCreateBuffer | ✅ Implemented | +| vkCreateBufferView | ✅ Implemented | +| vkCreateCommandPool | ✅ Implemented | +| vkCreateComputePipelines | ✅ Implemented | +| vkCreateDescriptorPool | ✅ Implemented | +| vkCreateDescriptorSetLayout | ✅ Implemented | +| vkCreateDevice | ✅ Implemented | +| vkCreateEvent | ✅ Implemented | +| vkCreateFence | ✅ Implemented | +| vkCreateFramebuffer | ✅ Implemented | +| vkCreateGraphicsPipelines | ✅ Implemented | +| vkCreateImage | ✅ Implemented | +| vkCreateImageView | ✅ Implemented | +| vkCreateInstance | ✅ Implemented | +| vkCreatePipelineCache | ✅ Implemented | +| vkCreatePipelineLayout | ✅ Implemented | +| vkCreateQueryPool | ✅ Implemented | +| vkCreateRenderPass | ✅ Implemented | +| vkCreateSampler | ✅ Implemented | +| vkCreateSemaphore | ✅ Implemented | +| vkCreateShaderModule | ✅ Implemented | +| vkCreateSwapchainKHR | ✅ Implemented | +| vkCreateWaylandSurfaceKHR | ✅ Implemented | +| vkCreateWin32SurfaceKHR | ⚙️ WIP | +| vkCreateXcbSurfaceKHR | ⚙️ WIP | +| vkCreateXlibSurfaceKHR | ⚙️ WIP | +| vkDestroyBuffer | ✅ Implemented | +| vkDestroyBufferView | ✅ Implemented | +| vkDestroyCommandPool | ✅ Implemented | +| vkDestroyDescriptorPool | ✅ Implemented | +| vkDestroyDescriptorSetLayout | ✅ Implemented | +| vkDestroyDevice | ✅ Implemented | +| vkDestroyEvent | ✅ Implemented | +| vkDestroyFence | ✅ Implemented | +| vkDestroyFramebuffer | ✅ Implemented | +| vkDestroyImage | ✅ Implemented | +| vkDestroyImageView | ✅ Implemented | +| vkDestroyInstance | ✅ Implemented | +| vkDestroyPipeline | ✅ Implemented | +| vkDestroyPipelineCache | ✅ Implemented | +| vkDestroyPipelineLayout | ✅ Implemented | +| vkDestroyQueryPool | ✅ Implemented | +| vkDestroyRenderPass | ✅ Implemented | +| vkDestroySampler | ✅ Implemented | +| vkDestroySemaphore | ✅ Implemented | +| vkDestroyShaderModule | ✅ Implemented | +| vkDestroySurfaceKHR | ✅ Implemented | +| vkDestroySwapchainKHR | ✅ Implemented | +| vkDeviceWaitIdle | ✅ Implemented | +| vkEndCommandBuffer | ✅ Implemented | +| vkEnumerateDeviceExtensionProperties | ✅ Implemented | +| vkEnumerateDeviceLayerProperties | ✅ Implemented | +| vkEnumerateInstanceExtensionProperties | ✅ Implemented | +| vkEnumerateInstanceLayerProperties | ✅ Implemented | +| vkEnumeratePhysicalDeviceGroupsKHR | ✅ Implemented | +| vkEnumeratePhysicalDevices | ✅ Implemented | +| vkFlushMappedMemoryRanges | ✅ Implemented | +| vkFreeCommandBuffers | ✅ Implemented | +| vkFreeDescriptorSets | ✅ Implemented | +| vkFreeMemory | ✅ Implemented | +| vkGetBufferDeviceAddress | ✅ Implemented | +| vkGetBufferDeviceAddressEXT | ✅ Implemented | +| vkGetBufferDeviceAddressKHR | ✅ Implemented | +| vkGetBufferMemoryRequirements | ✅ Implemented | +| vkGetDeviceGroupPeerMemoryFeaturesKHR | ✅ Implemented | +| vkGetDeviceGroupPresentCapabilitiesKHR | ✅ Implemented | +| vkGetDeviceGroupSurfacePresentModesKHR | ✅ Implemented | +| vkGetDeviceMemoryCommitment | ✅ Implemented | +| vkGetDeviceProcAddr | ✅ Implemented | +| vkGetDeviceQueue | ✅ Implemented | +| vkGetEventStatus | ✅ Implemented | +| vkGetFenceStatus | ✅ Implemented | +| vkGetImageMemoryRequirements | ✅ Implemented | +| vkGetImageSparseMemoryRequirements | ❎ Unsupported | +| vkGetImageSubresourceLayout | ✅ Implemented | +| vkGetInstanceProcAddr | ✅ Implemented | +| vkGetPhysicalDeviceFeatures | ✅ Implemented | +| vkGetPhysicalDeviceFormatProperties | ✅ Implemented | +| vkGetPhysicalDeviceImageFormatProperties | ✅ Implemented | +| vkGetPhysicalDeviceMemoryProperties | ✅ Implemented | +| vkGetPhysicalDeviceProperties | ✅ Implemented | +| vkGetPhysicalDeviceQueueFamilyProperties | ✅ Implemented | +| vkGetPhysicalDeviceSparseImageFormatProperties | ❎ Unsupported | +| vkGetPhysicalDeviceSurfaceCapabilitiesKHR | ✅ Implemented | +| vkGetPhysicalDeviceSurfaceFormatsKHR | ✅ Implemented | +| vkGetPhysicalDeviceSurfacePresentModesKHR | ✅ Implemented | +| vkGetPhysicalDeviceSurfaceSupportKHR | ✅ Implemented | +| vkGetPhysicalDeviceWaylandPresentationSupportKHR | ✅ Implemented | +| vkGetPhysicalDeviceWin32PresentationSupportKHR | ⚙️ WIP | +| vkGetPhysicalDeviceXcbPresentationSupportKHR | ⚙️ WIP | +| vkGetPhysicalDeviceXlibPresentationSupportKHR | ⚙️ WIP | +| vkGetPipelineCacheData | ✅ Implemented | +| vkGetQueryPoolResults | ✅ Implemented | +| vkGetRenderAreaGranularity | ✅ Implemented | +| vkGetSwapchainImagesKHR | ✅ Implemented | +| vkInvalidateMappedMemoryRanges | ✅ Implemented | +| vkMapMemory | ✅ Implemented | +| vkMergePipelineCaches | ✅ Implemented | +| vkQueueBindSparse | ❎ Unsupported | +| vkQueuePresentKHR | ✅ Implemented | +| vkQueueSubmit | ✅ Implemented | +| vkQueueWaitIdle | ✅ Implemented | +| vkResetCommandBuffer | ✅ Implemented | +| vkResetCommandPool | ✅ Implemented | +| vkResetDescriptorPool | ✅ Implemented | +| vkResetEvent | ✅ Implemented | +| vkResetFences | ✅ Implemented | +| vkResetQueryPool | ✅ Implemented | +| vkSetEvent | ✅ Implemented | +| vkUnmapMemory | ✅ Implemented | +| vkUpdateDescriptorSets | ✅ Implemented | +| vkWaitForFences | ✅ Implemented | +
[Here](https://vulkan-driver.kbz8.me/cts/soft/) shalt thou find a most meticulous account of the Vulkan 1.0 conformance trials, set forth for thy scrutiny. @@ -226,11 +230,13 @@ Whether the Knights Landing cards shall one day receive the same providence rema ### Build To bring forth the driver: + ``` zig build phi --release=[fast|safe|small] ``` And for those who seek another manner of building: + ``` zig build --help ``` @@ -238,6 +244,7 @@ zig build --help The same rites apply as for the Soft build. #### Vulkan 1.0 specification +
Here standeth the present reckoning of thy Vulkan 1.0 implementation @@ -247,176 +254,179 @@ The same rites apply as for the Soft build. ⚠️ Implemented, yet perchance not fully tested nor proven conformant, but rather working in a manner most general to thee and thine.\ Assume thou that functions lacking in this array are, for now, not intended to be wrought. -Name | Status --------------------------------------------------|-------- -vkAcquireNextImage2KHR | ⚙️ WIP -vkAcquireNextImageKHR | ⚙️ WIP -vkAllocateCommandBuffers | ✅ Implemented -vkAllocateDescriptorSets | ⚙️ WIP -vkAllocateMemory | ✅ Implemented -vkBeginCommandBuffer | ✅ Implemented -vkBindBufferMemory | ⚙️ WIP -vkBindImageMemory | ✅ Implemented -vkCmdBeginQuery | ⚙️ WIP -vkCmdBeginRenderPass | ⚙️ WIP -vkCmdBindDescriptorSets | ⚙️ WIP -vkCmdBindIndexBuffer | ⚙️ WIP -vkCmdBindPipeline | ⚙️ WIP -vkCmdBindVertexBuffers | ⚙️ WIP -vkCmdBlitImage | ✅ Implemented -vkCmdClearAttachments | ⚙️ WIP -vkCmdClearColorImage | ⚙️ WIP -vkCmdClearDepthStencilImage | ⚙️ WIP -vkCmdCopyBuffer | ✅ Implemented -vkCmdCopyBufferToImage | ✅ Implemented -vkCmdCopyImage | ⚙️ WIP -vkCmdCopyImageToBuffer | ✅ Implemented -vkCmdCopyQueryPoolResults | ⚙️ WIP -vkCmdDispatch | ⚙️ WIP -vkCmdDispatchBaseKHR | ⚙️ WIP -vkCmdDispatchIndirect | ⚙️ WIP -vkCmdDraw | ⚙️ WIP -vkCmdDrawIndexed | ⚙️ WIP -vkCmdDrawIndexedIndirect | ⚙️ WIP -vkCmdDrawIndirect | ⚙️ WIP -vkCmdEndQuery | ⚙️ WIP -vkCmdEndRenderPass | ⚙️ WIP -vkCmdExecuteCommands | ⚙️ WIP -vkCmdFillBuffer | ✅ Implemented -vkCmdNextSubpass | ⚙️ WIP -vkCmdPipelineBarrier | ⚙️ WIP -vkCmdPushConstants | ⚙️ WIP -vkCmdResetEvent | ⚙️ WIP -vkCmdResetQueryPool | ⚙️ WIP -vkCmdResolveImage | ⚙️ WIP -vkCmdSetBlendConstants | ⚙️ WIP -vkCmdSetDepthBias | ⚙️ WIP -vkCmdSetDepthBounds | ⚙️ WIP -vkCmdSetDeviceMaskKHR | ⚙️ WIP -vkCmdSetEvent | ⚙️ WIP -vkCmdSetLineWidth | ⚙️ WIP -vkCmdSetScissor | ⚙️ WIP -vkCmdSetStencilCompareMask | ⚙️ WIP -vkCmdSetStencilReference | ⚙️ WIP -vkCmdSetStencilWriteMask | ⚙️ WIP -vkCmdSetViewport | ⚙️ WIP -vkCmdUpdateBuffer | ⚙️ WIP -vkCmdWaitEvents | ⚙️ WIP -vkCmdWriteTimestamp | ⚙️ WIP -vkCreateBuffer | ⚙️ WIP -vkCreateBufferView | ⚙️ WIP -vkCreateCommandPool | ✅ Implemented -vkCreateComputePipelines | ⚙️ WIP -vkCreateDescriptorPool | ⚙️ WIP -vkCreateDescriptorSetLayout | ⚙️ WIP -vkCreateDevice | ✅ Implemented -vkCreateEvent | ⚙️ WIP -vkCreateFence | ⚙️ WIP -vkCreateFramebuffer | ⚙️ WIP -vkCreateGraphicsPipelines | ⚙️ WIP -vkCreateImage | ✅ Implemented -vkCreateImageView | ⚙️ WIP -vkCreateInstance | ✅ Implemented -vkCreatePipelineCache | ⚙️ WIP -vkCreatePipelineLayout | ⚙️ WIP -vkCreateQueryPool | ⚙️ WIP -vkCreateRenderPass | ⚙️ WIP -vkCreateSampler | ⚙️ WIP -vkCreateSemaphore | ⚙️ WIP -vkCreateShaderModule | ⚙️ WIP -vkCreateSwapchainKHR | ⚙️ WIP -vkCreateWaylandSurfaceKHR | ⚙️ WIP -vkCreateWin32SurfaceKHR | ⚙️ WIP -vkCreateXcbSurfaceKHR | ⚙️ WIP -vkCreateXlibSurfaceKHR | ⚙️ WIP -vkDestroyBuffer | ⚙️ WIP -vkDestroyBufferView | ⚙️ WIP -vkDestroyCommandPool | ✅ Implemented -vkDestroyDescriptorPool | ⚙️ WIP -vkDestroyDescriptorSetLayout | ⚙️ WIP -vkDestroyDevice | ✅ Implemented -vkDestroyEvent | ⚙️ WIP -vkDestroyFence | ⚙️ WIP -vkDestroyFramebuffer | ⚙️ WIP -vkDestroyImage | ✅ Implemented -vkDestroyImageView | ⚙️ WIP -vkDestroyInstance | ✅ Implemented -vkDestroyPipeline | ⚙️ WIP -vkDestroyPipelineCache | ⚙️ WIP -vkDestroyPipelineLayout | ⚙️ WIP -vkDestroyQueryPool | ⚙️ WIP -vkDestroyRenderPass | ⚙️ WIP -vkDestroySampler | ⚙️ WIP -vkDestroySemaphore | ⚙️ WIP -vkDestroyShaderModule | ⚙️ WIP -vkDestroySurfaceKHR | ⚙️ WIP -vkDestroySwapchainKHR | ⚙️ WIP -vkDeviceWaitIdle | ⚙️ WIP -vkEndCommandBuffer | ✅ Implemented -vkEnumerateDeviceExtensionProperties | ⚙️ WIP -vkEnumerateDeviceLayerProperties | ⚙️ WIP -vkEnumerateInstanceExtensionProperties | ⚙️ WIP -vkEnumerateInstanceLayerProperties | ⚙️ WIP -vkEnumeratePhysicalDeviceGroupsKHR | ⚙️ WIP -vkEnumeratePhysicalDevices | ✅ Implemented -vkFlushMappedMemoryRanges | ⚙️ WIP -vkFreeCommandBuffers | ⚙️ WIP -vkFreeDescriptorSets | ⚙️ WIP -vkFreeMemory | ✅ Implemented -vkGetBufferDeviceAddress | ⚙️ WIP -vkGetBufferDeviceAddressEXT | ⚙️ WIP -vkGetBufferDeviceAddressKHR | ⚙️ WIP -vkGetBufferMemoryRequirements | ⚙️ WIP -vkGetDeviceGroupPeerMemoryFeaturesKHR | ⚙️ WIP -vkGetDeviceGroupPresentCapabilitiesKHR | ⚙️ WIP -vkGetDeviceGroupSurfacePresentModesKHR | ⚙️ WIP -vkGetDeviceMemoryCommitment | ⚙️ WIP -vkGetDeviceProcAddr | ⚙️ WIP -vkGetDeviceQueue | ⚙️ WIP -vkGetEventStatus | ⚙️ WIP -vkGetFenceStatus | ⚙️ WIP -vkGetImageMemoryRequirements | ✅ Implemented -vkGetImageSparseMemoryRequirements | ⚙️ WIP -vkGetImageSubresourceLayout | ✅ Implemented -vkGetInstanceProcAddr | ⚙️ WIP -vkGetPhysicalDeviceFeatures | ✅ Implemented -vkGetPhysicalDeviceFormatProperties | ⚙️ WIP -vkGetPhysicalDeviceImageFormatProperties | ✅ Implemented -vkGetPhysicalDeviceMemoryProperties | ✅ Implemented -vkGetPhysicalDeviceProperties | ✅ Implemented -vkGetPhysicalDeviceQueueFamilyProperties | ⚙️ WIP -vkGetPhysicalDeviceSparseImageFormatProperties | ⚙️ WIP -vkGetPhysicalDeviceSurfaceCapabilitiesKHR | ⚙️ WIP -vkGetPhysicalDeviceSurfaceFormatsKHR | ⚙️ WIP -vkGetPhysicalDeviceSurfacePresentModesKHR | ⚙️ WIP -vkGetPhysicalDeviceSurfaceSupportKHR | ⚙️ WIP -vkGetPhysicalDeviceWaylandPresentationSupportKHR | ⚙️ WIP -vkGetPhysicalDeviceWin32PresentationSupportKHR | ⚙️ WIP -vkGetPhysicalDeviceXcbPresentationSupportKHR | ⚙️ WIP -vkGetPhysicalDeviceXlibPresentationSupportKHR | ⚙️ WIP -vkGetPipelineCacheData | ⚙️ WIP -vkGetQueryPoolResults | ⚙️ WIP -vkGetRenderAreaGranularity | ⚙️ WIP -vkGetSwapchainImagesKHR | ⚙️ WIP -vkInvalidateMappedMemoryRanges | ⚙️ WIP -vkMapMemory | ⚙️ WIP -vkMergePipelineCaches | ⚙️ WIP -vkQueueBindSparse | ⚙️ WIP -vkQueuePresentKHR | ⚙️ WIP -vkQueueSubmit | ✅ Implemented -vkQueueWaitIdle | ⚙️ WIP -vkResetCommandBuffer | ⚙️ WIP -vkResetCommandPool | ✅ Implemented -vkResetDescriptorPool | ⚙️ WIP -vkResetEvent | ⚙️ WIP -vkResetFences | ⚙️ WIP -vkResetQueryPool | ⚙️ WIP -vkSetEvent | ⚙️ WIP -vkUnmapMemory | ⚙️ WIP -vkUpdateDescriptorSets | ⚙️ WIP -vkWaitForFences | ⚙️ WIP +| Name | Status | +| ------------------------------------------------ | -------------- | +| vkAcquireNextImage2KHR | ⚙️ WIP | +| vkAcquireNextImageKHR | ⚙️ WIP | +| vkAllocateCommandBuffers | ✅ Implemented | +| vkAllocateDescriptorSets | ⚙️ WIP | +| vkAllocateMemory | ✅ Implemented | +| vkBeginCommandBuffer | ✅ Implemented | +| vkBindBufferMemory | ⚙️ WIP | +| vkBindImageMemory | ✅ Implemented | +| vkCmdBeginQuery | ⚙️ WIP | +| vkCmdBeginRenderPass | ⚙️ WIP | +| vkCmdBindDescriptorSets | ⚙️ WIP | +| vkCmdBindIndexBuffer | ⚙️ WIP | +| vkCmdBindPipeline | ⚙️ WIP | +| vkCmdBindVertexBuffers | ⚙️ WIP | +| vkCmdBlitImage | ✅ Implemented | +| vkCmdClearAttachments | ⚙️ WIP | +| vkCmdClearColorImage | ⚙️ WIP | +| vkCmdClearDepthStencilImage | ⚙️ WIP | +| vkCmdCopyBuffer | ✅ Implemented | +| vkCmdCopyBufferToImage | ✅ Implemented | +| vkCmdCopyImage | ⚙️ WIP | +| vkCmdCopyImageToBuffer | ✅ Implemented | +| vkCmdCopyQueryPoolResults | ⚙️ WIP | +| vkCmdDispatch | ⚙️ WIP | +| vkCmdDispatchBaseKHR | ⚙️ WIP | +| vkCmdDispatchIndirect | ⚙️ WIP | +| vkCmdDraw | ⚙️ WIP | +| vkCmdDrawIndexed | ⚙️ WIP | +| vkCmdDrawIndexedIndirect | ⚙️ WIP | +| vkCmdDrawIndirect | ⚙️ WIP | +| vkCmdEndQuery | ⚙️ WIP | +| vkCmdEndRenderPass | ⚙️ WIP | +| vkCmdExecuteCommands | ⚙️ WIP | +| vkCmdFillBuffer | ✅ Implemented | +| vkCmdNextSubpass | ⚙️ WIP | +| vkCmdPipelineBarrier | ⚙️ WIP | +| vkCmdPushConstants | ⚙️ WIP | +| vkCmdResetEvent | ⚙️ WIP | +| vkCmdResetQueryPool | ⚙️ WIP | +| vkCmdResolveImage | ⚙️ WIP | +| vkCmdSetBlendConstants | ⚙️ WIP | +| vkCmdSetDepthBias | ⚙️ WIP | +| vkCmdSetDepthBounds | ⚙️ WIP | +| vkCmdSetDeviceMaskKHR | ⚙️ WIP | +| vkCmdSetEvent | ⚙️ WIP | +| vkCmdSetLineWidth | ⚙️ WIP | +| vkCmdSetScissor | ⚙️ WIP | +| vkCmdSetStencilCompareMask | ⚙️ WIP | +| vkCmdSetStencilReference | ⚙️ WIP | +| vkCmdSetStencilWriteMask | ⚙️ WIP | +| vkCmdSetViewport | ⚙️ WIP | +| vkCmdUpdateBuffer | ⚙️ WIP | +| vkCmdWaitEvents | ⚙️ WIP | +| vkCmdWriteTimestamp | ⚙️ WIP | +| vkCreateBuffer | ⚙️ WIP | +| vkCreateBufferView | ⚙️ WIP | +| vkCreateCommandPool | ✅ Implemented | +| vkCreateComputePipelines | ⚙️ WIP | +| vkCreateDescriptorPool | ⚙️ WIP | +| vkCreateDescriptorSetLayout | ⚙️ WIP | +| vkCreateDevice | ✅ Implemented | +| vkCreateEvent | ⚙️ WIP | +| vkCreateFence | ⚙️ WIP | +| vkCreateFramebuffer | ⚙️ WIP | +| vkCreateGraphicsPipelines | ⚙️ WIP | +| vkCreateImage | ✅ Implemented | +| vkCreateImageView | ⚙️ WIP | +| vkCreateInstance | ✅ Implemented | +| vkCreatePipelineCache | ⚙️ WIP | +| vkCreatePipelineLayout | ⚙️ WIP | +| vkCreateQueryPool | ⚙️ WIP | +| vkCreateRenderPass | ⚙️ WIP | +| vkCreateSampler | ⚙️ WIP | +| vkCreateSemaphore | ⚙️ WIP | +| vkCreateShaderModule | ⚙️ WIP | +| vkCreateSwapchainKHR | ⚙️ WIP | +| vkCreateWaylandSurfaceKHR | ⚙️ WIP | +| vkCreateWin32SurfaceKHR | ⚙️ WIP | +| vkCreateXcbSurfaceKHR | ⚙️ WIP | +| vkCreateXlibSurfaceKHR | ⚙️ WIP | +| vkDestroyBuffer | ⚙️ WIP | +| vkDestroyBufferView | ⚙️ WIP | +| vkDestroyCommandPool | ✅ Implemented | +| vkDestroyDescriptorPool | ⚙️ WIP | +| vkDestroyDescriptorSetLayout | ⚙️ WIP | +| vkDestroyDevice | ✅ Implemented | +| vkDestroyEvent | ⚙️ WIP | +| vkDestroyFence | ⚙️ WIP | +| vkDestroyFramebuffer | ⚙️ WIP | +| vkDestroyImage | ✅ Implemented | +| vkDestroyImageView | ⚙️ WIP | +| vkDestroyInstance | ✅ Implemented | +| vkDestroyPipeline | ⚙️ WIP | +| vkDestroyPipelineCache | ⚙️ WIP | +| vkDestroyPipelineLayout | ⚙️ WIP | +| vkDestroyQueryPool | ⚙️ WIP | +| vkDestroyRenderPass | ⚙️ WIP | +| vkDestroySampler | ⚙️ WIP | +| vkDestroySemaphore | ⚙️ WIP | +| vkDestroyShaderModule | ⚙️ WIP | +| vkDestroySurfaceKHR | ⚙️ WIP | +| vkDestroySwapchainKHR | ⚙️ WIP | +| vkDeviceWaitIdle | ⚙️ WIP | +| vkEndCommandBuffer | ✅ Implemented | +| vkEnumerateDeviceExtensionProperties | ⚙️ WIP | +| vkEnumerateDeviceLayerProperties | ⚙️ WIP | +| vkEnumerateInstanceExtensionProperties | ⚙️ WIP | +| vkEnumerateInstanceLayerProperties | ⚙️ WIP | +| vkEnumeratePhysicalDeviceGroupsKHR | ⚙️ WIP | +| vkEnumeratePhysicalDevices | ✅ Implemented | +| vkFlushMappedMemoryRanges | ⚙️ WIP | +| vkFreeCommandBuffers | ⚙️ WIP | +| vkFreeDescriptorSets | ⚙️ WIP | +| vkFreeMemory | ✅ Implemented | +| vkGetBufferDeviceAddress | ⚙️ WIP | +| vkGetBufferDeviceAddressEXT | ⚙️ WIP | +| vkGetBufferDeviceAddressKHR | ⚙️ WIP | +| vkGetBufferMemoryRequirements | ⚙️ WIP | +| vkGetDeviceGroupPeerMemoryFeaturesKHR | ⚙️ WIP | +| vkGetDeviceGroupPresentCapabilitiesKHR | ⚙️ WIP | +| vkGetDeviceGroupSurfacePresentModesKHR | ⚙️ WIP | +| vkGetDeviceMemoryCommitment | ⚙️ WIP | +| vkGetDeviceProcAddr | ⚙️ WIP | +| vkGetDeviceQueue | ⚙️ WIP | +| vkGetEventStatus | ⚙️ WIP | +| vkGetFenceStatus | ⚙️ WIP | +| vkGetImageMemoryRequirements | ✅ Implemented | +| vkGetImageSparseMemoryRequirements | ⚙️ WIP | +| vkGetImageSubresourceLayout | ✅ Implemented | +| vkGetInstanceProcAddr | ⚙️ WIP | +| vkGetPhysicalDeviceFeatures | ✅ Implemented | +| vkGetPhysicalDeviceFormatProperties | ⚙️ WIP | +| vkGetPhysicalDeviceImageFormatProperties | ✅ Implemented | +| vkGetPhysicalDeviceMemoryProperties | ✅ Implemented | +| vkGetPhysicalDeviceProperties | ✅ Implemented | +| vkGetPhysicalDeviceQueueFamilyProperties | ⚙️ WIP | +| vkGetPhysicalDeviceSparseImageFormatProperties | ⚙️ WIP | +| vkGetPhysicalDeviceSurfaceCapabilitiesKHR | ⚙️ WIP | +| vkGetPhysicalDeviceSurfaceFormatsKHR | ⚙️ WIP | +| vkGetPhysicalDeviceSurfacePresentModesKHR | ⚙️ WIP | +| vkGetPhysicalDeviceSurfaceSupportKHR | ⚙️ WIP | +| vkGetPhysicalDeviceWaylandPresentationSupportKHR | ⚙️ WIP | +| vkGetPhysicalDeviceWin32PresentationSupportKHR | ⚙️ WIP | +| vkGetPhysicalDeviceXcbPresentationSupportKHR | ⚙️ WIP | +| vkGetPhysicalDeviceXlibPresentationSupportKHR | ⚙️ WIP | +| vkGetPipelineCacheData | ⚙️ WIP | +| vkGetQueryPoolResults | ⚙️ WIP | +| vkGetRenderAreaGranularity | ⚙️ WIP | +| vkGetSwapchainImagesKHR | ⚙️ WIP | +| vkInvalidateMappedMemoryRanges | ⚙️ WIP | +| vkMapMemory | ⚙️ WIP | +| vkMergePipelineCaches | ⚙️ WIP | +| vkQueueBindSparse | ⚙️ WIP | +| vkQueuePresentKHR | ⚙️ WIP | +| vkQueueSubmit | ✅ Implemented | +| vkQueueWaitIdle | ⚙️ WIP | +| vkResetCommandBuffer | ⚙️ WIP | +| vkResetCommandPool | ✅ Implemented | +| vkResetDescriptorPool | ⚙️ WIP | +| vkResetEvent | ⚙️ WIP | +| vkResetFences | ⚙️ WIP | +| vkResetQueryPool | ⚙️ WIP | +| vkSetEvent | ⚙️ WIP | +| vkUnmapMemory | ⚙️ WIP | +| vkUpdateDescriptorSets | ⚙️ WIP | +| vkWaitForFences | ⚙️ WIP | +
+[The present reckoning](https://vulkan-driver.kbz8.me/cts/phi/) of thy Vulkan 1.0 implementation standeth thus. + ## Flint [Intel] Flint be an implementation of the Vulkan specification, fashioned for the elder Intel iGPUs of generations 9 through 11. @@ -425,11 +435,13 @@ Whether Haswell and those that followed-even the Xe kindred-shall one day partak ### Build The rite of forging the driver: + ``` zig build flint --release=[fast|safe|small] ``` Should the foregoing not suffice, further build options await thee: + ``` zig build --help ``` @@ -437,6 +449,7 @@ zig build --help The same rites apply as for the Soft and Phi build. #### Vulkan 1.0 specification +
Behold the present state of thy Vulkan 1.0 implementation @@ -446,177 +459,178 @@ The same rites apply as for the Soft and Phi build. ⚠️ Implemented, yet perchance not fully tested nor proven conformant, but rather working in a manner most general to thee and thine.\ Assume thou that functions lacking in this array are, for now, not intended to be wrought. -Name | Status --------------------------------------------------|-------- -vkAcquireNextImage2KHR | ⚙️ WIP -vkAcquireNextImageKHR | ⚙️ WIP -vkAllocateCommandBuffers | ✅ Implemented -vkAllocateDescriptorSets | ⚙️ WIP -vkAllocateMemory | ✅ Implemented -vkBeginCommandBuffer | ✅ Implemented -vkBindBufferMemory | ✅ Implemented -vkBindImageMemory | ✅ Implemented -vkCmdBeginQuery | ⚙️ WIP -vkCmdBeginRenderPass | ⚙️ WIP -vkCmdBindDescriptorSets | ⚙️ WIP -vkCmdBindIndexBuffer | ⚙️ WIP -vkCmdBindPipeline | ⚙️ WIP -vkCmdBindVertexBuffers | ⚙️ WIP -vkCmdBlitImage | ⚙️ WIP -vkCmdClearAttachments | ⚙️ WIP -vkCmdClearColorImage | ⚙️ WIP -vkCmdClearDepthStencilImage | ⚙️ WIP -vkCmdCopyBuffer | ✅ Implemented -vkCmdCopyBufferToImage | ✅ Implemented -vkCmdCopyImage | ✅ Implemented -vkCmdCopyImageToBuffer | ✅ Implemented -vkCmdCopyQueryPoolResults | ⚙️ WIP -vkCmdDispatch | ⚙️ WIP -vkCmdDispatchBaseKHR | ⚙️ WIP -vkCmdDispatchIndirect | ⚙️ WIP -vkCmdDraw | ⚙️ WIP -vkCmdDrawIndexed | ⚙️ WIP -vkCmdDrawIndexedIndirect | ⚙️ WIP -vkCmdDrawIndirect | ⚙️ WIP -vkCmdEndQuery | ⚙️ WIP -vkCmdEndRenderPass | ⚙️ WIP -vkCmdExecuteCommands | ✅ Implemented -vkCmdFillBuffer | ✅ Implemented -vkCmdNextSubpass | ⚙️ WIP -vkCmdPipelineBarrier | ⚙️ WIP -vkCmdPushConstants | ⚙️ WIP -vkCmdResetEvent | ⚙️ WIP -vkCmdResetQueryPool | ⚙️ WIP -vkCmdResolveImage | ⚙️ WIP -vkCmdSetBlendConstants | ⚙️ WIP -vkCmdSetDepthBias | ⚙️ WIP -vkCmdSetDepthBounds | ⚙️ WIP -vkCmdSetDeviceMaskKHR | ⚙️ WIP -vkCmdSetEvent | ⚙️ WIP -vkCmdSetLineWidth | ⚙️ WIP -vkCmdSetScissor | ⚙️ WIP -vkCmdSetStencilCompareMask | ⚙️ WIP -vkCmdSetStencilReference | ⚙️ WIP -vkCmdSetStencilWriteMask | ⚙️ WIP -vkCmdSetViewport | ⚙️ WIP -vkCmdUpdateBuffer | ⚙️ WIP -vkCmdWaitEvents | ⚙️ WIP -vkCmdWriteTimestamp | ⚙️ WIP -vkCreateBuffer | ✅ Implemented -vkCreateBufferView | ⚙️ WIP -vkCreateCommandPool | ✅ Implemented -vkCreateComputePipelines | ⚙️ WIP -vkCreateDescriptorPool | ⚙️ WIP -vkCreateDescriptorSetLayout | ⚙️ WIP -vkCreateDevice | ✅ Implemented -vkCreateEvent | ⚙️ WIP -vkCreateFence | ✅ Implemented -vkCreateFramebuffer | ⚙️ WIP -vkCreateGraphicsPipelines | ⚙️ WIP -vkCreateImage | ✅ Implemented -vkCreateImageView | ⚙️ WIP -vkCreateInstance | ✅ Implemented -vkCreatePipelineCache | ⚙️ WIP -vkCreatePipelineLayout | ⚙️ WIP -vkCreateQueryPool | ⚙️ WIP -vkCreateRenderPass | ⚙️ WIP -vkCreateSampler | ⚙️ WIP -vkCreateSemaphore | ✅ Implemented -vkCreateShaderModule | ⚙️ WIP -vkCreateSwapchainKHR | ⚙️ WIP -vkCreateWaylandSurfaceKHR | ⚙️ WIP -vkCreateWin32SurfaceKHR | ⚙️ WIP -vkCreateXcbSurfaceKHR | ⚙️ WIP -vkCreateXlibSurfaceKHR | ⚙️ WIP -vkDestroyBuffer | ✅ Implemented -vkDestroyBufferView | ⚙️ WIP -vkDestroyCommandPool | ✅ Implemented -vkDestroyDescriptorPool | ⚙️ WIP -vkDestroyDescriptorSetLayout | ⚙️ WIP -vkDestroyDevice | ✅ Implemented -vkDestroyEvent | ⚙️ WIP -vkDestroyFence | ✅ Implemented -vkDestroyFramebuffer | ⚙️ WIP -vkDestroyImage | ✅ Implemented -vkDestroyImageView | ⚙️ WIP -vkDestroyInstance | ✅ Implemented -vkDestroyPipeline | ⚙️ WIP -vkDestroyPipelineCache | ⚙️ WIP -vkDestroyPipelineLayout | ⚙️ WIP -vkDestroyQueryPool | ⚙️ WIP -vkDestroyRenderPass | ⚙️ WIP -vkDestroySampler | ⚙️ WIP -vkDestroySemaphore | ✅ Implemented -vkDestroyShaderModule | ⚙️ WIP -vkDestroySurfaceKHR | ⚙️ WIP -vkDestroySwapchainKHR | ⚙️ WIP -vkDeviceWaitIdle | ✅ Implemented -vkEndCommandBuffer | ✅ Implemented -vkEnumerateDeviceExtensionProperties | ✅ Implemented -vkEnumerateDeviceLayerProperties | ⚙️ WIP -vkEnumerateInstanceExtensionProperties | ⚙️ WIP -vkEnumerateInstanceLayerProperties | ⚙️ WIP -vkEnumeratePhysicalDeviceGroupsKHR | ⚙️ WIP -vkEnumeratePhysicalDevices | ✅ Implemented -vkFlushMappedMemoryRanges | ✅ Implemented -vkFreeCommandBuffers | ✅ Implemented -vkFreeDescriptorSets | ⚙️ WIP -vkFreeMemory | ✅ Implemented -vkGetBufferDeviceAddress | ⚙️ WIP -vkGetBufferDeviceAddressEXT | ⚙️ WIP -vkGetBufferDeviceAddressKHR | ⚙️ WIP -vkGetBufferMemoryRequirements | ⚙️ WIP -vkGetDeviceGroupPeerMemoryFeaturesKHR | ⚙️ WIP -vkGetDeviceGroupPresentCapabilitiesKHR | ⚙️ WIP -vkGetDeviceGroupSurfacePresentModesKHR | ⚙️ WIP -vkGetDeviceMemoryCommitment | ⚙️ WIP -vkGetDeviceProcAddr | ✅ Implemented -vkGetDeviceQueue | ✅ Implemented -vkGetEventStatus | ⚙️ WIP -vkGetFenceStatus | ✅ Implemented -vkGetImageMemoryRequirements | ⚙️ WIP -vkGetImageSparseMemoryRequirements | ⚙️ WIP -vkGetImageSubresourceLayout | ⚙️ WIP -vkGetInstanceProcAddr | ⚙️ WIP -vkGetPhysicalDeviceFeatures | ✅ Implemented -vkGetPhysicalDeviceFormatProperties | ⚙️ WIP -vkGetPhysicalDeviceImageFormatProperties | ⚙️ WIP -vkGetPhysicalDeviceMemoryProperties | ✅ Implemented -vkGetPhysicalDeviceProperties | ✅ Implemented -vkGetPhysicalDeviceQueueFamilyProperties | ⚙️ WIP -vkGetPhysicalDeviceSparseImageFormatProperties | ⚙️ WIP -vkGetPhysicalDeviceSurfaceCapabilitiesKHR | ⚙️ WIP -vkGetPhysicalDeviceSurfaceFormatsKHR | ⚙️ WIP -vkGetPhysicalDeviceSurfacePresentModesKHR | ⚙️ WIP -vkGetPhysicalDeviceSurfaceSupportKHR | ⚙️ WIP -vkGetPhysicalDeviceWaylandPresentationSupportKHR | ⚙️ WIP -vkGetPhysicalDeviceWin32PresentationSupportKHR | ⚙️ WIP -vkGetPhysicalDeviceXcbPresentationSupportKHR | ⚙️ WIP -vkGetPhysicalDeviceXlibPresentationSupportKHR | ⚙️ WIP -vkGetPipelineCacheData | ⚙️ WIP -vkGetQueryPoolResults | ⚙️ WIP -vkGetRenderAreaGranularity | ⚙️ WIP -vkGetSwapchainImagesKHR | ⚙️ WIP -vkInvalidateMappedMemoryRanges | ✅ Implemented -vkMapMemory | ✅ Implemented -vkMergePipelineCaches | ⚙️ WIP -vkQueueBindSparse | ⚙️ WIP -vkQueuePresentKHR | ⚙️ WIP -vkQueueSubmit | ✅ Implemented -vkQueueWaitIdle | ✅ Implemented -vkResetCommandBuffer | ✅ Implemented -vkResetCommandPool | ✅ Implemented -vkResetDescriptorPool | ⚙️ WIP -vkResetEvent | ⚙️ WIP -vkResetFences | ✅ Implemented -vkResetQueryPool | ⚙️ WIP -vkSetEvent | ⚙️ WIP -vkUnmapMemory | ✅ Implemented -vkUpdateDescriptorSets | ⚙️ WIP -vkWaitForFences | ✅ Implemented +| Name | Status | +| ------------------------------------------------ | -------------- | +| vkAcquireNextImage2KHR | ⚙️ WIP | +| vkAcquireNextImageKHR | ⚙️ WIP | +| vkAllocateCommandBuffers | ✅ Implemented | +| vkAllocateDescriptorSets | ⚙️ WIP | +| vkAllocateMemory | ✅ Implemented | +| vkBeginCommandBuffer | ✅ Implemented | +| vkBindBufferMemory | ✅ Implemented | +| vkBindImageMemory | ✅ Implemented | +| vkCmdBeginQuery | ⚙️ WIP | +| vkCmdBeginRenderPass | ⚙️ WIP | +| vkCmdBindDescriptorSets | ⚙️ WIP | +| vkCmdBindIndexBuffer | ⚙️ WIP | +| vkCmdBindPipeline | ⚙️ WIP | +| vkCmdBindVertexBuffers | ⚙️ WIP | +| vkCmdBlitImage | ⚙️ WIP | +| vkCmdClearAttachments | ⚙️ WIP | +| vkCmdClearColorImage | ⚙️ WIP | +| vkCmdClearDepthStencilImage | ⚙️ WIP | +| vkCmdCopyBuffer | ✅ Implemented | +| vkCmdCopyBufferToImage | ✅ Implemented | +| vkCmdCopyImage | ✅ Implemented | +| vkCmdCopyImageToBuffer | ✅ Implemented | +| vkCmdCopyQueryPoolResults | ⚙️ WIP | +| vkCmdDispatch | ⚙️ WIP | +| vkCmdDispatchBaseKHR | ⚙️ WIP | +| vkCmdDispatchIndirect | ⚙️ WIP | +| vkCmdDraw | ⚙️ WIP | +| vkCmdDrawIndexed | ⚙️ WIP | +| vkCmdDrawIndexedIndirect | ⚙️ WIP | +| vkCmdDrawIndirect | ⚙️ WIP | +| vkCmdEndQuery | ⚙️ WIP | +| vkCmdEndRenderPass | ⚙️ WIP | +| vkCmdExecuteCommands | ✅ Implemented | +| vkCmdFillBuffer | ✅ Implemented | +| vkCmdNextSubpass | ⚙️ WIP | +| vkCmdPipelineBarrier | ⚙️ WIP | +| vkCmdPushConstants | ⚙️ WIP | +| vkCmdResetEvent | ⚙️ WIP | +| vkCmdResetQueryPool | ⚙️ WIP | +| vkCmdResolveImage | ⚙️ WIP | +| vkCmdSetBlendConstants | ⚙️ WIP | +| vkCmdSetDepthBias | ⚙️ WIP | +| vkCmdSetDepthBounds | ⚙️ WIP | +| vkCmdSetDeviceMaskKHR | ⚙️ WIP | +| vkCmdSetEvent | ⚙️ WIP | +| vkCmdSetLineWidth | ⚙️ WIP | +| vkCmdSetScissor | ⚙️ WIP | +| vkCmdSetStencilCompareMask | ⚙️ WIP | +| vkCmdSetStencilReference | ⚙️ WIP | +| vkCmdSetStencilWriteMask | ⚙️ WIP | +| vkCmdSetViewport | ⚙️ WIP | +| vkCmdUpdateBuffer | ⚙️ WIP | +| vkCmdWaitEvents | ⚙️ WIP | +| vkCmdWriteTimestamp | ⚙️ WIP | +| vkCreateBuffer | ✅ Implemented | +| vkCreateBufferView | ⚙️ WIP | +| vkCreateCommandPool | ✅ Implemented | +| vkCreateComputePipelines | ⚙️ WIP | +| vkCreateDescriptorPool | ⚙️ WIP | +| vkCreateDescriptorSetLayout | ⚙️ WIP | +| vkCreateDevice | ✅ Implemented | +| vkCreateEvent | ⚙️ WIP | +| vkCreateFence | ✅ Implemented | +| vkCreateFramebuffer | ⚙️ WIP | +| vkCreateGraphicsPipelines | ⚙️ WIP | +| vkCreateImage | ✅ Implemented | +| vkCreateImageView | ⚙️ WIP | +| vkCreateInstance | ✅ Implemented | +| vkCreatePipelineCache | ⚙️ WIP | +| vkCreatePipelineLayout | ⚙️ WIP | +| vkCreateQueryPool | ⚙️ WIP | +| vkCreateRenderPass | ⚙️ WIP | +| vkCreateSampler | ⚙️ WIP | +| vkCreateSemaphore | ✅ Implemented | +| vkCreateShaderModule | ⚙️ WIP | +| vkCreateSwapchainKHR | ⚙️ WIP | +| vkCreateWaylandSurfaceKHR | ⚙️ WIP | +| vkCreateWin32SurfaceKHR | ⚙️ WIP | +| vkCreateXcbSurfaceKHR | ⚙️ WIP | +| vkCreateXlibSurfaceKHR | ⚙️ WIP | +| vkDestroyBuffer | ✅ Implemented | +| vkDestroyBufferView | ⚙️ WIP | +| vkDestroyCommandPool | ✅ Implemented | +| vkDestroyDescriptorPool | ⚙️ WIP | +| vkDestroyDescriptorSetLayout | ⚙️ WIP | +| vkDestroyDevice | ✅ Implemented | +| vkDestroyEvent | ⚙️ WIP | +| vkDestroyFence | ✅ Implemented | +| vkDestroyFramebuffer | ⚙️ WIP | +| vkDestroyImage | ✅ Implemented | +| vkDestroyImageView | ⚙️ WIP | +| vkDestroyInstance | ✅ Implemented | +| vkDestroyPipeline | ⚙️ WIP | +| vkDestroyPipelineCache | ⚙️ WIP | +| vkDestroyPipelineLayout | ⚙️ WIP | +| vkDestroyQueryPool | ⚙️ WIP | +| vkDestroyRenderPass | ⚙️ WIP | +| vkDestroySampler | ⚙️ WIP | +| vkDestroySemaphore | ✅ Implemented | +| vkDestroyShaderModule | ⚙️ WIP | +| vkDestroySurfaceKHR | ⚙️ WIP | +| vkDestroySwapchainKHR | ⚙️ WIP | +| vkDeviceWaitIdle | ✅ Implemented | +| vkEndCommandBuffer | ✅ Implemented | +| vkEnumerateDeviceExtensionProperties | ✅ Implemented | +| vkEnumerateDeviceLayerProperties | ⚙️ WIP | +| vkEnumerateInstanceExtensionProperties | ⚙️ WIP | +| vkEnumerateInstanceLayerProperties | ⚙️ WIP | +| vkEnumeratePhysicalDeviceGroupsKHR | ⚙️ WIP | +| vkEnumeratePhysicalDevices | ✅ Implemented | +| vkFlushMappedMemoryRanges | ✅ Implemented | +| vkFreeCommandBuffers | ✅ Implemented | +| vkFreeDescriptorSets | ⚙️ WIP | +| vkFreeMemory | ✅ Implemented | +| vkGetBufferDeviceAddress | ⚙️ WIP | +| vkGetBufferDeviceAddressEXT | ⚙️ WIP | +| vkGetBufferDeviceAddressKHR | ⚙️ WIP | +| vkGetBufferMemoryRequirements | ⚙️ WIP | +| vkGetDeviceGroupPeerMemoryFeaturesKHR | ⚙️ WIP | +| vkGetDeviceGroupPresentCapabilitiesKHR | ⚙️ WIP | +| vkGetDeviceGroupSurfacePresentModesKHR | ⚙️ WIP | +| vkGetDeviceMemoryCommitment | ⚙️ WIP | +| vkGetDeviceProcAddr | ✅ Implemented | +| vkGetDeviceQueue | ✅ Implemented | +| vkGetEventStatus | ⚙️ WIP | +| vkGetFenceStatus | ✅ Implemented | +| vkGetImageMemoryRequirements | ⚙️ WIP | +| vkGetImageSparseMemoryRequirements | ⚙️ WIP | +| vkGetImageSubresourceLayout | ⚙️ WIP | +| vkGetInstanceProcAddr | ⚙️ WIP | +| vkGetPhysicalDeviceFeatures | ✅ Implemented | +| vkGetPhysicalDeviceFormatProperties | ⚙️ WIP | +| vkGetPhysicalDeviceImageFormatProperties | ⚙️ WIP | +| vkGetPhysicalDeviceMemoryProperties | ✅ Implemented | +| vkGetPhysicalDeviceProperties | ✅ Implemented | +| vkGetPhysicalDeviceQueueFamilyProperties | ⚙️ WIP | +| vkGetPhysicalDeviceSparseImageFormatProperties | ⚙️ WIP | +| vkGetPhysicalDeviceSurfaceCapabilitiesKHR | ⚙️ WIP | +| vkGetPhysicalDeviceSurfaceFormatsKHR | ⚙️ WIP | +| vkGetPhysicalDeviceSurfacePresentModesKHR | ⚙️ WIP | +| vkGetPhysicalDeviceSurfaceSupportKHR | ⚙️ WIP | +| vkGetPhysicalDeviceWaylandPresentationSupportKHR | ⚙️ WIP | +| vkGetPhysicalDeviceWin32PresentationSupportKHR | ⚙️ WIP | +| vkGetPhysicalDeviceXcbPresentationSupportKHR | ⚙️ WIP | +| vkGetPhysicalDeviceXlibPresentationSupportKHR | ⚙️ WIP | +| vkGetPipelineCacheData | ⚙️ WIP | +| vkGetQueryPoolResults | ⚙️ WIP | +| vkGetRenderAreaGranularity | ⚙️ WIP | +| vkGetSwapchainImagesKHR | ⚙️ WIP | +| vkInvalidateMappedMemoryRanges | ✅ Implemented | +| vkMapMemory | ✅ Implemented | +| vkMergePipelineCaches | ⚙️ WIP | +| vkQueueBindSparse | ⚙️ WIP | +| vkQueuePresentKHR | ⚙️ WIP | +| vkQueueSubmit | ✅ Implemented | +| vkQueueWaitIdle | ✅ Implemented | +| vkResetCommandBuffer | ✅ Implemented | +| vkResetCommandPool | ✅ Implemented | +| vkResetDescriptorPool | ⚙️ WIP | +| vkResetEvent | ⚙️ WIP | +| vkResetFences | ✅ Implemented | +| vkResetQueryPool | ⚙️ WIP | +| vkSetEvent | ⚙️ WIP | +| vkUnmapMemory | ✅ Implemented | +| vkUpdateDescriptorSets | ⚙️ WIP | +| vkWaitForFences | ✅ Implemented | +
-[Herein](https://vulkan-driver.kbz8.me/cts/flint/) is the reckoning of the Vulkan 1.0 conformance trials laid bare. Judge it as thou wilt. +[herein](https://vulkan-driver.kbz8.me/cts/flint/) is the reckoning of the vulkan 1.0 conformance trials laid bare. judge it as thou wilt. ## License diff --git a/build.zig b/build.zig index eaaafa9..dd9a622 100644 --- a/build.zig +++ b/build.zig @@ -512,7 +512,7 @@ fn customFlint( _: bool, ) !void { lib_mod.addImport("intel_c", base_c_mod); - lib_mod.addImport("shader_compiler", b.createModule(.{ + lib_mod.addImport("shader_ir", b.createModule(.{ .root_source_file = b.path("src/compiler/root.zig"), .target = target, .optimize = optimize, diff --git a/src/intel/lib.zig b/src/intel/lib.zig index 5146a75..a6a6010 100644 --- a/src/intel/lib.zig +++ b/src/intel/lib.zig @@ -32,6 +32,7 @@ pub const FlintQueryPool = @import("FlintQueryPool.zig"); pub const FlintRenderPass = @import("FlintRenderPass.zig"); pub const FlintSampler = @import("FlintSampler.zig"); pub const FlintShaderModule = @import("FlintShaderModule.zig"); +pub const compiler = @import("compiler/root.zig"); pub const Instance = FlintInstance; @@ -89,6 +90,7 @@ test { std.testing.refAllDecls(FlintRenderPass); std.testing.refAllDecls(FlintSampler); std.testing.refAllDecls(FlintShaderModule); + std.testing.refAllDecls(compiler); std.testing.refAllDecls(kmd); std.testing.refAllDecls(base); } diff --git a/src/phi/PhiDevice.zig b/src/phi/PhiDevice.zig index 94a2b01..c76de7d 100644 --- a/src/phi/PhiDevice.zig +++ b/src/phi/PhiDevice.zig @@ -81,9 +81,27 @@ pub fn create(instance: *base.Instance, physical_device: *base.PhysicalDevice, a const phi_physical_device: *PhiPhysicalDevice = @alignCast(@fieldParentPtr("interface", physical_device)); const transport = PhiTransport.init(instance, phi_physical_device.scif_node_id) catch blk: { - // If first connect failed try to upload the daemon to the card + // If the first connection failed, upload and launch the daemon on the card. try uploadAndLaunchDaemon(instance, allocator, phi_physical_device.mic_device_num); - break :blk try PhiTransport.init(instance, phi_physical_device.scif_node_id); + + const max_connect_attempts = 3; + for (0..max_connect_attempts) |attempt| { + (std.Io.Clock.Duration{ + .raw = .fromNanoseconds(std.time.ns_per_s), + .clock = .awake, + }).sleep(instance.io()) catch return VkError.InitializationFailed; + + const retry = PhiTransport.init(instance, phi_physical_device.scif_node_id) catch |err| { + if (attempt + 1 == max_connect_attempts) return err; + std.log.scoped(.PhiDevice).debug( + "Phi daemon is not ready; retrying connection ({d}/{d})", + .{ attempt + 1, max_connect_attempts }, + ); + continue; + }; + break :blk retry; + } + unreachable; }; self.* = .{ @@ -226,10 +244,12 @@ pub fn getDeviceGroupSurfacePresentModesKHR(_: *Interface, _: *base.SurfaceKHR) fn uploadAndLaunchDaemon(instance: *base.Instance, allocator: std.mem.Allocator, mic_device_num: u32) VkError!void { const io = instance.io(); + const process_id = std.os.linux.getpid(); + const thread_id = std.Thread.getCurrentId(); - const local_path = std.fmt.allocPrint(allocator, "/tmp/ape_phi_device_{d}_{d}.mic", .{ std.os.linux.getpid(), mic_device_num }) catch return VkError.OutOfHostMemory; + const local_path = std.fmt.allocPrint(allocator, "/tmp/ape_phi_device_{d}_{d}_{d}.mic", .{ process_id, thread_id, mic_device_num }) catch return VkError.OutOfHostMemory; defer allocator.free(local_path); - defer std.Io.Dir.deleteFileAbsolute(io, local_path) catch @panic("Caught an error while handling an error"); + defer std.Io.Dir.deleteFileAbsolute(io, local_path) catch @panic("Caught an error in a deferred cleanup"); std.Io.Dir.writeFile(.cwd(), io, .{ .sub_path = local_path, @@ -242,19 +262,29 @@ fn uploadAndLaunchDaemon(instance: *base.Instance, allocator: std.mem.Allocator, const host = std.fmt.allocPrint(allocator, "{s}{d}", .{ config.phi_daemon_host_prefix, mic_device_num }) catch return VkError.OutOfHostMemory; defer allocator.free(host); - const remote_target = std.fmt.allocPrint(allocator, "{s}:{s}", .{ host, config.phi_daemon_remote_path }) catch return VkError.OutOfHostMemory; - defer allocator.free(remote_target); + // Upload beside the daemon and atomically replace it. Copying directly over a + // running executable fails with ETXTBSY ("Text file busy") on the card. + const remote_upload_path = std.fmt.allocPrint( + allocator, + "{s}.upload-{d}-{d}-{d}", + .{ config.phi_daemon_remote_path, process_id, thread_id, mic_device_num }, + ) catch return VkError.OutOfHostMemory; + defer allocator.free(remote_upload_path); + const remote_upload_target = std.fmt.allocPrint(allocator, "{s}:{s}", .{ host, remote_upload_path }) catch return VkError.OutOfHostMemory; + defer allocator.free(remote_upload_target); + + std.log.scoped(.PhiDevice).debug("Uploading Phi daemon to {s}", .{remote_upload_target}); try runHostCommand(instance, allocator, &.{ "scp", local_path, - remote_target, + remote_upload_target, }); const launch_command = std.fmt.allocPrint( allocator, - "chmod +x {s} && nohup {s} >/tmp/phi_device.log 2>&1 /tmp/phi_device.log 2>&1 #include +#include #include #include @@ -50,7 +50,7 @@ scif_epd_t StartDaemon() return 0; } - if(scif_listen(endpoint, 1) < 0) + if(scif_listen(endpoint, 16) < 0) { PhiLogError("Could not listen to SCIF port"); scif_close(endpoint); diff --git a/src/phi/mic/Memory.c b/src/phi/mic/Memory.c index 44dfb08..863eae0 100644 --- a/src/phi/mic/Memory.c +++ b/src/phi/mic/Memory.c @@ -25,7 +25,7 @@ int HandleAllocMemory(scif_epd_t endpoint, const PhiMessageHeader* header) if(ReadAll(endpoint, &request, sizeof(request)) < 0) return -1; - void* memory = malloc((size_t)request.size); + const void* memory = malloc((size_t)request.size); if(memory == NULL) { diff --git a/src/phi/mic/main.c b/src/phi/mic/main.c index 23301e8..81cef18 100644 --- a/src/phi/mic/main.c +++ b/src/phi/mic/main.c @@ -1,13 +1,35 @@ +#include +#include +#include + #include #include +static void* HandleClient(void* const argument) +{ + scif_epd_t client = (scif_epd_t)(intptr_t)argument; + + (void)HandlePacket(client); + scif_close(client); + return NULL; +} + int main(void) { scif_epd_t endpoint = StartDaemon(); + pthread_attr_t client_thread_attributes; if(endpoint == 0) return 1; + if(pthread_attr_init(&client_thread_attributes) != 0 || + pthread_attr_setdetachstate(&client_thread_attributes, PTHREAD_CREATE_DETACHED) != 0) + { + PhiLogError("Could not initialize client thread attributes"); + ShutdownDaemon(endpoint); + return 1; + } + for(;;) { struct scif_portID peer; @@ -21,11 +43,15 @@ int main(void) break; } - (void)HandlePacket(client); - - scif_close(client); + pthread_t client_thread; + if(pthread_create(&client_thread, &client_thread_attributes, HandleClient, (void*)(intptr_t)client) != 0) + { + PhiLogError("Could not create SCIF client thread"); + scif_close(client); + } } + pthread_attr_destroy(&client_thread_attributes); ShutdownDaemon(endpoint); return 0; diff --git a/src/phi/shared/Protocol.h b/src/phi/shared/Protocol.h index b3e0cbe..31b8ec6 100644 --- a/src/phi/shared/Protocol.h +++ b/src/phi/shared/Protocol.h @@ -1,7 +1,7 @@ #ifndef APE_PHI_PROTOCOL_H #define APE_PHI_PROTOCOL_H -#include "Commands.h" +#include "Commands.h" // IWYU pragma: keep #include #define PHI_PROTOCOL_MAGIC 0x50484941u