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;