mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-22 20:06:54 +02:00
image: drop optional create flags the driver rejects instead of aborting (#1760)
* image: request extended usage only for storage images * tests: restore block-texel-view support through the flag check loop order --------- Co-authored-by: nmzik <Nmzik@mail.ru>
This commit is contained in:
@@ -44928,6 +44928,26 @@ void CheckImageTransitionState(RenderContext &renderer) {
|
||||
ImageTestAccess::CopyRows(copy_capacity + 4, 1, copy_capacity) == 0,
|
||||
"buffered image copy does not split at the fixed scratch capacity");
|
||||
|
||||
// RADV rejects 3D 128-bit BC images with block-texel views plus extended usage.
|
||||
auto volume_info = MakeInfo(vk::Format::eBc7UnormBlock, 1, 1);
|
||||
volume_info.guest_format = Prospero::BufferFormat::kBc7UNorm;
|
||||
volume_info.type = Prospero::ImageType::kColor3D;
|
||||
volume_info.extent.depth = 4;
|
||||
volume_info.bytes_per_block = 16;
|
||||
for (const bool supported : {false, context.supports_block_texel_view}) {
|
||||
context.supports_block_texel_view = supported;
|
||||
Image volume(context, scheduler, volume_info);
|
||||
const auto flags = volume.backing.flags;
|
||||
Require(name, "block volume create flags",
|
||||
(flags & vk::ImageCreateFlagBits::e2DArrayCompatible) &&
|
||||
static_cast<bool>(flags & vk::ImageCreateFlagBits::eBlockTexelViewCompatible) ==
|
||||
supported &&
|
||||
static_cast<bool>(flags & vk::ImageCreateFlagBits::eExtendedUsage) ==
|
||||
static_cast<bool>(volume.backing.usage &
|
||||
vk::ImageUsageFlagBits::eStorage),
|
||||
"block volume requested extended usage without storage");
|
||||
}
|
||||
|
||||
Image image(context, scheduler, MakeInfo(vk::Format::eR8Unorm, 2, 3));
|
||||
auto barriers =
|
||||
image.GetBarriers(vk::ImageLayout::eShaderReadOnlyOptimal,
|
||||
|
||||
Reference in New Issue
Block a user