Improve handling for cases where maximum in-flight command buffer count is exceeded. This can occur during light-baking operations. Ensures the application handles this gracefully and also improves workload pipelining by situationally stalling until GPU work has completed, if too much work is queued up. This may have a tangible benefit for T103742 by ensuring Blender does not queue up too much GPU work. Authored by Apple: Michael Parkin-White Ref T96261 Ref T103742 Depends on D17018 Reviewed By: fclem Maniphest Tasks: T103742, T96261 Differential Revision: https://developer.blender.org/D17019
20 lines
683 B
C++
20 lines
683 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#ifndef __MTL_COMMON
|
|
#define __MTL_COMMON
|
|
|
|
/** -- Renderer Options -- */
|
|
/* Number of frames over which rolling averages are taken. */
|
|
#define MTL_FRAME_AVERAGE_COUNT 5
|
|
#define MTL_MAX_DRAWABLES 3
|
|
#define MTL_MAX_SET_BYTES_SIZE 4096
|
|
#define MTL_FORCE_WAIT_IDLE 0
|
|
|
|
/* Number of frames for which we retain in-flight resources such as scratch buffers.
|
|
* Set as number of GPU frames in flight, plus an additional value for extra possible CPU frame. */
|
|
#define MTL_NUM_SAFE_FRAMES (MTL_MAX_DRAWABLES + 1)
|
|
|
|
/* Display debug information about missing attributes and incorrect vertex formats. */
|
|
#define MTL_DEBUG_SHADER_ATTRIBUTES 0
|
|
#endif
|