[Bf-blender-cvs] [139fb38d4fb] master: DRW: Add texture usage host read to Lightcache texture.
Jason Fielder
noreply at git.blender.org
Mon Jan 23 17:46:47 CET 2023
Commit: 139fb38d4fb4317a467a0abd28557f1713eb15af
Author: Jason Fielder
Date: Mon Jan 23 17:46:28 2023 +0100
Branches: master
https://developer.blender.org/rB139fb38d4fb4317a467a0abd28557f1713eb15af
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
===================================================================
M source/blender/draw/engines/eevee/eevee_lightcache.c
===================================================================
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c
index b3b4b5a6dec..b28189973da 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.c
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.c
@@ -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,
More information about the Bf-blender-cvs
mailing list