DRW: Add texture usage host read to Lightcache texture.

Required by Metal backend to have correct usage flags for textures which are read by host.

Authored by Apple: Michael Parkin-White

Ref T96261

Reviewed By: fclem

Maniphest Tasks: T96261

Differential Revision: https://developer.blender.org/D17020
This commit is contained in:
Jason Fielder 2023-01-23 17:46:28 +01:00 committed by Clément Foucault
parent 1c672f3d1d
commit 139fb38d4f
Notes: blender-bot 2023-02-13 16:03:55 +01:00
Referenced by issue #96261, Metal Viewport
1 changed files with 2 additions and 1 deletions

View File

@ -395,7 +395,8 @@ static bool eevee_lightcache_static_load(LightCache *lcache)
}
if (lcache->grid_tx.tex == NULL) {
eGPUTextureUsage usage = GPU_TEXTURE_USAGE_SHADER_READ | GPU_TEXTURE_USAGE_ATTACHMENT;
eGPUTextureUsage usage = GPU_TEXTURE_USAGE_SHADER_READ | GPU_TEXTURE_USAGE_ATTACHMENT |
GPU_TEXTURE_USAGE_HOST_READ;
lcache->grid_tx.tex = GPU_texture_create_2d_array_ex("lightcache_irradiance",
UNPACK3(lcache->grid_tx.tex_size),
1,