Files
RetroArch/record/record_native_buffer.h
T
Codex 54a6926a3f record: align native buffer settings with bounded capture rings
Use the same native queue limits in menu ranges and backend initialization. Honor the selected NVENC ring size instead of fixing it at four. Keep invalid legacy values on the existing four-slot fallback and restore legacy ranges when switching away from native recording.

Validate native ranges and fallback values, driver changes and actual Metal initializer slot configurations in the portable frontend tests.
2026-11-12 18:53:15 +01:00

23 lines
668 B
C

/* Copyright (C) 2026 The RetroArch team. SPDX-License-Identifier: GPL-3.0-or-later */
#ifndef RECORD_NATIVE_BUFFER_H
#define RECORD_NATIVE_BUFFER_H
#include <string.h>
#include <retro_inline.h>
#include "record_gpu_queue.h"
/* Native capture rings are bounded; invalid legacy settings use four slots. */
static INLINE unsigned recording_native_buffer_min(const char *ident)
{
return ident && !strcmp(ident, "nvenc") ? 4u : 2u;
}
static INLINE unsigned recording_native_buffer_count(
const char *ident, unsigned requested)
{
return requested >= recording_native_buffer_min(ident)
&& requested <= RECORD_GPU_QUEUE_SLOTS ? requested : 4u;
}
#endif