From c77df3547d1e9353efbc449a92c71fc750436326 Mon Sep 17 00:00:00 2001 From: Sil Vilerino Date: Thu, 9 Mar 2023 22:59:45 -0500 Subject: [PATCH] d3d12: Fix video decode for interlaced streams with reference only textures required Fixes: d8206f628659d468c870430daa271d5bec6e860d ("d3d12: Add video decode implementation of pipe_video_codec") Part-of: (cherry picked from commit 3067bda0f34edacb617afa43ea9f9c25d25d3ee7) --- .pick_status.json | 2 +- src/gallium/drivers/d3d12/d3d12_video_dec_references_mgr.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 2c4beae1134..aa1d5a005b9 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -5017,7 +5017,7 @@ "description": "d3d12: Fix video decode for interlaced streams with reference only textures required", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "d8206f628659d468c870430daa271d5bec6e860d" }, diff --git a/src/gallium/drivers/d3d12/d3d12_video_dec_references_mgr.cpp b/src/gallium/drivers/d3d12/d3d12_video_dec_references_mgr.cpp index 23937397bb8..f9aa7564834 100644 --- a/src/gallium/drivers/d3d12/d3d12_video_dec_references_mgr.cpp +++ b/src/gallium/drivers/d3d12/d3d12_video_dec_references_mgr.cpp @@ -69,7 +69,7 @@ d3d12_video_decoder_references_manager::get_current_frame_decode_output_texture( assert(m_DecodeTargetToOriginalIndex7Bits.count(pCurrentDecodeTarget) > 0); // Needs to already have a Index7Bits assigned for current pic params uint16_t remappedIdx = find_remapped_index(m_DecodeTargetToOriginalIndex7Bits[pCurrentDecodeTarget]); - if(remappedIdx != m_invalidIndex) { // If it already has a remapped index in use, reuse that allocation + if((remappedIdx != m_invalidIndex) && !(is_reference_only())) { // If it already has a remapped index in use, reuse that allocation // return the existing allocation for this decode target d3d12_video_reconstructed_picture reconPicture = m_upD3D12TexturesStorageManager->get_reference_frame(remappedIdx); *ppOutTexture2D = reconPicture.pReconstructedPicture;