Fix #131602: Workbench: Incorrect texture usage depth of field.
Depth of field attaches the half res and scene color texture, but doesn't provide the correct usage flags. This resulted in validation errors in Metal & Vulkan. Pull Request: https://projects.blender.org/blender/blender/pulls/131655
This commit is contained in:
@@ -107,7 +107,7 @@ void DofPass::init(const SceneState &scene_state)
|
||||
int2 half_res = scene_state.resolution / 2;
|
||||
half_res = {max_ii(half_res.x, 1), max_ii(half_res.y, 1)};
|
||||
|
||||
eGPUTextureUsage usage = GPU_TEXTURE_USAGE_SHADER_READ;
|
||||
eGPUTextureUsage usage = GPU_TEXTURE_USAGE_SHADER_READ | GPU_TEXTURE_USAGE_ATTACHMENT;
|
||||
source_tx_.ensure_2d(GPU_RGBA16F, half_res, usage, nullptr, 3);
|
||||
source_tx_.ensure_mip_views();
|
||||
source_tx_.filter_mode(true);
|
||||
|
||||
Reference in New Issue
Block a user