feat(client): PyroWave planar present path + Linux NVENC match-arm fix (Phase 2b, part 2)
android / android (push) Failing after 45s
ci / web (push) Successful in 51s
ci / docs-site (push) Successful in 56s
decky / build-publish (push) Successful in 17s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 8s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 8s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 9s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 7s
arch / build-publish (push) Failing after 4m15s
ci / rust (push) Failing after 3m59s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 59s
deb / build-publish (push) Failing after 4m7s
ci / bench (push) Successful in 5m28s
rpm / build-publish (44, fedora-44, punktfunk-fedora44-rpm) (push) Failing after 3m46s
rpm / build-publish (43, bazzite, punktfunk-fedora-rpm) (push) Failing after 3m58s
flatpak / build-publish (push) Failing after 8m3s
docker / deploy-docs (push) Successful in 22s
windows-host / package (push) Successful in 14m21s
windows-msix / package (arm64, C:\Users\Public\ffmpeg-arm64, --no-default-features, aarch64-pc-windows-msvc, C:\t-a64) (push) Successful in 3m31s
windows-msix / package (x64, C:\Users\Public\ffmpeg, , x86_64-pc-windows-msvc, C:\t) (push) Successful in 3m35s
windows / build (aarch64-pc-windows-msvc) (push) Successful in 4m57s
windows / build (x86_64-pc-windows-msvc) (push) Successful in 5m46s
apple / swift (push) Successful in 4m59s
apple / screenshots (push) Successful in 21m40s
android / android (push) Failing after 45s
ci / web (push) Successful in 51s
ci / docs-site (push) Successful in 56s
decky / build-publish (push) Successful in 17s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 8s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 8s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 9s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 7s
arch / build-publish (push) Failing after 4m15s
ci / rust (push) Failing after 3m59s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 59s
deb / build-publish (push) Failing after 4m7s
ci / bench (push) Successful in 5m28s
rpm / build-publish (44, fedora-44, punktfunk-fedora44-rpm) (push) Failing after 3m46s
rpm / build-publish (43, bazzite, punktfunk-fedora-rpm) (push) Failing after 3m58s
flatpak / build-publish (push) Failing after 8m3s
docker / deploy-docs (push) Successful in 22s
windows-host / package (push) Successful in 14m21s
windows-msix / package (arm64, C:\Users\Public\ffmpeg-arm64, --no-default-features, aarch64-pc-windows-msvc, C:\t-a64) (push) Successful in 3m31s
windows-msix / package (x64, C:\Users\Public\ffmpeg, , x86_64-pc-windows-msvc, C:\t) (push) Successful in 3m35s
windows / build (aarch64-pc-windows-msvc) (push) Successful in 4m57s
windows / build (x86_64-pc-windows-msvc) (push) Successful in 5m46s
apple / swift (push) Successful in 4m59s
apple / screenshots (push) Successful in 21m40s
The arch package job (--features nvenc) tripped the same class of Codec::PyroWave non-exhaustive matches as windows-host had, in nvenc_cuda.rs (6 sites) — dispatch-guarded unreachable!() arms, plus the vk_util-extraction leftover unused imports in vulkan_video.rs. All Linux host feature combos (none / pyrowave / nvenc,vulkan-encode / all three) now compile clean on .21. Presenter: planar_csc.frag (+ committed .spv) — the 3-plane variant of nv12_csc.frag (separate Cb/Cr R8 planes, same push-constant CSC-row contract, siting correction self-disables at full-res chroma). CscPass grows a shared builder + new_planar()/bind_planes_planar() (GENERAL-layout descriptors — pyrowave planes stay GENERAL); the Vk presenter builds the planar pass when the device passed the pyrowave probe, FrameInput::PyroWave rides present_frame (no acquire barrier needed: the decoder fence-completed and barriered the planes on the same queue), and run.rs presents it with no demote rung (only device loss ends the session). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,32 @@ impl CscPass {
|
||||
/// `attachment_format` = the video image's format: R8G8B8A8 for SDR, a 10-bit
|
||||
/// format when the pass writes PQ (8 bits would band the PQ curve visibly).
|
||||
pub fn new(device: &ash::Device, attachment_format: vk::Format) -> Result<CscPass> {
|
||||
Self::build(
|
||||
device,
|
||||
attachment_format,
|
||||
2,
|
||||
include_bytes!("../shaders/nv12_csc.frag.spv"),
|
||||
)
|
||||
}
|
||||
|
||||
/// The planar 3-plane variant (separate Cb/Cr R8 planes — the PyroWave decode
|
||||
/// output, design/pyrowave-codec-plan.md §4.5). Same push-constant contract.
|
||||
#[cfg(feature = "pyrowave")]
|
||||
pub fn new_planar(device: &ash::Device, attachment_format: vk::Format) -> Result<CscPass> {
|
||||
Self::build(
|
||||
device,
|
||||
attachment_format,
|
||||
3,
|
||||
include_bytes!("../shaders/planar_csc.frag.spv"),
|
||||
)
|
||||
}
|
||||
|
||||
fn build(
|
||||
device: &ash::Device,
|
||||
attachment_format: vk::Format,
|
||||
plane_bindings: u32,
|
||||
frag_spv: &[u8],
|
||||
) -> Result<CscPass> {
|
||||
// One color attachment: the presenter's video image. Content is fully
|
||||
// overwritten (DONT_CARE load), and the pass ends in TRANSFER_SRC so the
|
||||
// existing letterbox blit consumes it with no extra barrier.
|
||||
@@ -89,20 +115,16 @@ impl CscPass {
|
||||
}?;
|
||||
|
||||
let samplers = [sampler];
|
||||
let bindings = [
|
||||
vk::DescriptorSetLayoutBinding::default()
|
||||
.binding(0)
|
||||
.descriptor_type(vk::DescriptorType::COMBINED_IMAGE_SAMPLER)
|
||||
.descriptor_count(1)
|
||||
.stage_flags(vk::ShaderStageFlags::FRAGMENT)
|
||||
.immutable_samplers(&samplers),
|
||||
vk::DescriptorSetLayoutBinding::default()
|
||||
.binding(1)
|
||||
.descriptor_type(vk::DescriptorType::COMBINED_IMAGE_SAMPLER)
|
||||
.descriptor_count(1)
|
||||
.stage_flags(vk::ShaderStageFlags::FRAGMENT)
|
||||
.immutable_samplers(&samplers),
|
||||
];
|
||||
let bindings: Vec<vk::DescriptorSetLayoutBinding> = (0..plane_bindings)
|
||||
.map(|b| {
|
||||
vk::DescriptorSetLayoutBinding::default()
|
||||
.binding(b)
|
||||
.descriptor_type(vk::DescriptorType::COMBINED_IMAGE_SAMPLER)
|
||||
.descriptor_count(1)
|
||||
.stage_flags(vk::ShaderStageFlags::FRAGMENT)
|
||||
.immutable_samplers(&samplers)
|
||||
})
|
||||
.collect();
|
||||
let set_layout = unsafe {
|
||||
device.create_descriptor_set_layout(
|
||||
&vk::DescriptorSetLayoutCreateInfo::default().bindings(&bindings),
|
||||
@@ -124,7 +146,7 @@ impl CscPass {
|
||||
|
||||
let pool_sizes = [vk::DescriptorPoolSize::default()
|
||||
.ty(vk::DescriptorType::COMBINED_IMAGE_SAMPLER)
|
||||
.descriptor_count(2)];
|
||||
.descriptor_count(plane_bindings)];
|
||||
let desc_pool = unsafe {
|
||||
device.create_descriptor_pool(
|
||||
&vk::DescriptorPoolCreateInfo::default()
|
||||
@@ -145,7 +167,7 @@ impl CscPass {
|
||||
device,
|
||||
render_pass,
|
||||
pipeline_layout,
|
||||
include_bytes!("../shaders/nv12_csc.frag.spv"),
|
||||
frag_spv,
|
||||
false, // opaque — the CSC output IS the video
|
||||
)?;
|
||||
|
||||
@@ -184,6 +206,26 @@ impl CscPass {
|
||||
unsafe { device.update_descriptor_sets(&writes, &[]) };
|
||||
}
|
||||
|
||||
/// Planar variant of [`bind_planes`](Self::bind_planes): three single-component
|
||||
/// plane views in GENERAL layout (the pyrowave decode leaves them there; same
|
||||
/// fence-wait safety contract).
|
||||
#[cfg(feature = "pyrowave")]
|
||||
pub fn bind_planes_planar(&self, device: &ash::Device, planes: [vk::ImageView; 3]) {
|
||||
let infos = planes.map(|view| {
|
||||
[vk::DescriptorImageInfo::default()
|
||||
.image_view(view)
|
||||
.image_layout(vk::ImageLayout::GENERAL)]
|
||||
});
|
||||
let writes = [0u32, 1, 2].map(|b| {
|
||||
vk::WriteDescriptorSet::default()
|
||||
.dst_set(self.desc_set)
|
||||
.dst_binding(b)
|
||||
.descriptor_type(vk::DescriptorType::COMBINED_IMAGE_SAMPLER)
|
||||
.image_info(&infos[b as usize])
|
||||
});
|
||||
unsafe { device.update_descriptor_sets(&writes, &[]) };
|
||||
}
|
||||
|
||||
pub fn destroy(&self, device: &ash::Device) {
|
||||
unsafe {
|
||||
device.destroy_pipeline(self.pipeline, None);
|
||||
|
||||
Reference in New Issue
Block a user