Fix #105606: Metal texture upload regression #105794


2 Commits

Author SHA1 Message Date
Jason Fielder 87766429b9 Merge branch 'blender-v3.5-release' into Fix_105606_MetalTextureUploadRegression 2023-03-15 15:05:05 +01:00
Michael Parkin-White 12fa62533e Fix #105606: Metal texture upload regression.
immDrarPixels performs significantly slower in OpenGL
than Metal. This was caused by two main factors. Firstly,
the additional overhead of tiled texture update, where all
memory needed to be kept in flight for each update, but
caused update to take a slow path. Avoidng tile update
with Metal is more efficient for both memory pressure
and GPU pipelining.

Secondly, on AMD platforms, the staging buffer used
for temporary texture data was page-faulting when
several texture updates would occur within one frame.
This is due to liimtations of allocating one large contiguous
memory chunk. Using the Metal buffer pool for staging
data is more efficient.

Authored by Apple: Michael Parkin-White

Ref #96261
2023-03-14 10:02:53 +00:00