From 6e39982b326c913b72a8abb03a8756387874c8e2 Mon Sep 17 00:00:00 2001 From: Silvio Vilerino Date: Thu, 19 Mar 2026 09:01:14 -0400 Subject: [PATCH] d3d12: d3d12_video_encode_support_caps was assigning a stack variable address to capEncoderSupportData in/out arg Reviewed-by: Pohsiang (John) Hsu Part-of: --- src/gallium/drivers/d3d12/d3d12_video_screen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/d3d12/d3d12_video_screen.cpp b/src/gallium/drivers/d3d12/d3d12_video_screen.cpp index 0c4128a7b16..29e98945d0e 100644 --- a/src/gallium/drivers/d3d12/d3d12_video_screen.cpp +++ b/src/gallium/drivers/d3d12/d3d12_video_screen.cpp @@ -625,7 +625,7 @@ struct d3d12_encode_support_cap_allocations static bool d3d12_video_encode_support_caps(const D3D12_VIDEO_ENCODER_CODEC &argTargetCodec, - D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC maxResolution, + const D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC &maxResolution, DXGI_FORMAT encodeFormat, ID3D12VideoDevice3 *pD3D12VideoDevice, D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT codecSupport, @@ -1934,7 +1934,7 @@ d3d12_has_video_encode_support(struct pipe_screen *pscreen, // DXGI_FORMAT InputFormat; capEncoderSupportData.InputFormat, // D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC InputResolution; - capEncoderSupportData.pResolutionList[0], + maxRes, // D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION CodecConfiguration; capEncoderSupportData.CodecConfiguration, // D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE SubregionFrameEncoding;