Skip to content

Spec/CTS Clarification: Modifying and copying optimal tiled images from CPU #2753

Description

@squidbus

There exist CTS tests for VK_EXT_host_image_copy, for example dEQP-VK.image.host_image_copy.optimal.image_to_image_copy.general.general.32x32x1_1.0.r8g8b8a8_unorm, which will:

  • Create an image with optimal tiling, with memory mapped to the CPU.
  • Write to the CPU mapped memory with random data.
  • Copy to another image with vkCopyImageToImage, then copy from the duplicate back to memory with vkCopyImageToMemory.
  • Copy the original image to a buffer with vkCmdCopyImageToBuffer.
  • Compare the contents of the two results.

I've been trying to layer this on top of Metal, and what I've found is that, with Apple's transparent texture compression for optimal layout, the host copies will produce a different result for the bad, random data than the GPU copy that it is compared to. Getting the correct results seems to require disabling texture optimization, either explicitly or through operations that seem to implicitly un-optimize.

The question I have is, is it valid for the CTS tests to be relying on this behavior to begin with? My impression is that optimal tiled image contents are treated as fairly opaque to the application, so if you write to an optimal tiled image's underlying memory from the CPU directly with random data, should you even be able to rely on well-defined results from the image?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions