Vulkan: Add support to clear D24_S8 texture
Depth 24 stencil 8 texture could not be cleared directly. Recently GPUViewports clear their attachments when created. This resulted into non consistent behavior between backends. This change adds support to clear depth 24 stencil 8 textures using `GPU_texture_clear`. The implementation currently assumes that the input value is a float. Pull Request: https://projects.blender.org/blender/blender/pulls/131650
This commit is contained in:
@@ -811,6 +811,7 @@ VkClearColorValue to_vk_clear_color_value(const eGPUDataFormat format, const voi
|
||||
case GPU_DATA_FLOAT:
|
||||
case GPU_DATA_HALF_FLOAT:
|
||||
case GPU_DATA_UBYTE:
|
||||
case GPU_DATA_UINT_24_8:
|
||||
case GPU_DATA_10_11_11_REV:
|
||||
case GPU_DATA_2_10_10_10_REV: {
|
||||
const float *float_data = static_cast<const float *>(data);
|
||||
@@ -829,10 +830,6 @@ VkClearColorValue to_vk_clear_color_value(const eGPUDataFormat format, const voi
|
||||
copy_color<uint32_t>(result.uint32, uint_data);
|
||||
break;
|
||||
}
|
||||
case GPU_DATA_UINT_24_8: {
|
||||
BLI_assert_unreachable();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user