anv/video: don't write to params if not set.

This should probably be done different, params should probably be considered immutable,
and this should be moved into the command buffer, also this gets set on decode paths as well
which might not make sense.

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34204>
This commit is contained in:
Dave Airlie
2025-03-28 07:13:20 +10:00
committed by Marge Bot
parent e4981731be
commit af560cd680
+2 -1
View File
@@ -70,7 +70,8 @@ genX(CmdControlVideoCodingKHR)(VkCommandBuffer commandBuffer,
cmd_buffer->video.params->rc_mode = rate_control_info->rateControlMode;
} else {
cmd_buffer->video.params->rc_mode = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR;
if (cmd_buffer->video.params)
cmd_buffer->video.params->rc_mode = VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR;
}
}