mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-13 04:51:38 -10:00
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.
23 lines
668 B
C
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
|