Skip to content

Add support for AMD. - #2

Merged
hgaiser merged 7 commits into
mainfrom
amd-support
Feb 25, 2026
Merged

Add support for AMD.#2
hgaiser merged 7 commits into
mainfrom
amd-support

Conversation

@hgaiser

@hgaiser hgaiser commented Feb 23, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Vulkan Video encoder path to better support AMD/RADV drivers by aligning coded extents to device-reported granularities, handling DPB limitations (layered DPB fallback), and separating upload/encode queue usage where needed.

Changes:

  • Add capability-driven coded-extent alignment (granularity + min/max coded extent) and query/selection of supported SRC/DPB formats.
  • Add layered-DPB fallback when SEPARATE_REFERENCE_IMAGES isn’t supported and centralize DPB barrier recording.
  • Use transfer-queue command resources for uploads, add shared cleanup helper, and tighten validation-layer/extension enabling.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/vulkan.rs Make validation-layer/validation-features enabling conditional on availability.
src/image.rs Add device_wait_idle() before destroying InputImage resources.
src/encoder/resources.rs Add alignment helpers, concurrent sharing for input images when queue families differ, split upload vs encode command pools, layered DPB creation path, centralized resource destruction + DPB barrier helper.
src/encoder/h265/mod.rs Route uploads through transfer queue; switch Drop cleanup to shared destroy helper; track layered DPB usage.
src/encoder/h265/init.rs Compute coded extent from capabilities; choose supported formats; enable layered DPB fallback; chain quality-level info; split upload vs encode command resources.
src/encoder/h265/encode.rs Use centralized DPB barrier recording; combine RESET+RC+QUALITY control command; layered-DPB-aware post-encode barrier.
src/encoder/h265/upload.rs Removed (upload now handled directly in mod.rs via shared upload helper).
src/encoder/h264/mod.rs Route uploads through transfer queue; switch Drop cleanup to shared destroy helper; store aligned coded extent; track layered DPB usage.
src/encoder/h264/init.rs Add more capability logging; align coded extent; chain quality-level info; layered DPB fallback; split upload vs encode command resources; update SPS/PPS defaults for AMD stability.
src/encoder/h264/encode.rs Use centralized DPB barrier recording; align coded extent in picture resources; combine RESET+RC+QUALITY control command; adjust RC disabled handling.
src/encoder/h264/upload.rs Removed (upload now handled directly in mod.rs via shared upload helper).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/encoder/resources.rs
Comment thread src/encoder/resources.rs
Comment thread src/encoder/resources.rs
Comment thread src/encoder/h265/mod.rs Outdated
Comment thread src/encoder/h264/mod.rs
Comment thread src/image.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/encoder/h264/init.rs
Comment thread src/encoder/h265/init.rs Outdated
Comment thread src/encoder/h264/mod.rs
Comment thread src/encoder/h265/mod.rs
Comment thread src/encoder/resources.rs Outdated
Comment thread src/encoder/resources.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/encoder/resources.rs Outdated
Comment thread src/encoder/resources.rs Outdated
hgaiser and others added 3 commits February 25, 2026 23:38
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@hgaiser
hgaiser merged commit dd0e71f into main Feb 25, 2026
6 checks passed
@hgaiser
hgaiser deleted the amd-support branch February 25, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants