Metal: Resolve runtime issues with texture views #107167

Merged
Jeroen Bakker merged 1 commits from Jason-Fielder/blender:MetalEEVEENext_TextureViewCompatibility into main 2023-05-01 09:14:06 +02:00

1 Commits

Author SHA1 Message Date
254b047e6f Metal: Resolve runtime issues with texture views
When creating a texture view, Metal may require that the original
GPUTexture state is modified in some way. This may be a result
of deferred creation, or, to cache the texture view against the
source.

As a result, GPUTexture passed into GPU_texture_create_view
cannot be const.

Small fixes have also been made in the Metal texture
implementation to ensure correct function of texture views.

Authored by Apple: Michael Parkin-White

Ref #96261
2023-04-20 11:41:20 +01:00