mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 13:56:59 +01:00
shader: read raw D16 depth bits through kDepth k16UInt image loads
Co-authored-by: Artyom Zabroda <artyomzabroda@proton.me>
This commit is contained in:
@@ -188,6 +188,12 @@ RawSignedStorageFormat(const ImageResource& image, Prospero::BufferFormat format
|
||||
return Prospero::BufferFormat::kInvalid;
|
||||
}
|
||||
|
||||
// A raw load of a kDepth k16UInt T# reads a D16 surface's codes. Vulkan cannot view D16 as
|
||||
// R16Uint, so the host binds it as UNorm and the shader converts back.
|
||||
[[nodiscard]] constexpr bool ReadsDepthBits(const ImageResource& image) {
|
||||
return image.conversion_format == Prospero::BufferFormat::k16UInt;
|
||||
}
|
||||
|
||||
struct SamplerResource {
|
||||
static constexpr uint32_t NoIndirectSampler = UINT32_MAX;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user