mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-29 16:51:20 +00:00
implement dynamic
This commit is contained in:
1 parent
59b8fad341
commit
35a89d616a
16 files changed
+470
-117
No files matched your search
@@ -598,11 +598,14 @@ enum class ImageMipMode { None, DynamicStorage };
|
||||
constexpr uint32_t StorageImageIdentitySwizzle = 0x00000facu;
|
||||
|
||||
struct ImageResource {
|
||||
static constexpr uint32_t MaxMipLevels = 16;
|
||||
|
||||
uint32_t source = 0;
|
||||
uint32_t first_use_pc = 0;
|
||||
ResourceKind kind = ResourceKind::None;
|
||||
Decoder::ImageDimension dimension = Decoder::ImageDimension::Unknown;
|
||||
ImageMipMode mip_mode = ImageMipMode::None;
|
||||
uint32_t mip_levels = 1;
|
||||
uint32_t storage_swizzle = StorageImageIdentitySwizzle;
|
||||
bool read = false;
|
||||
bool written = false;
|
||||
@@ -610,6 +613,10 @@ struct ImageResource {
|
||||
bool depth_compare = false;
|
||||
bool cube = false;
|
||||
|
||||
[[nodiscard]] uint32_t NumBindings() const {
|
||||
return mip_mode == ImageMipMode::DynamicStorage ? mip_levels : 1u;
|
||||
}
|
||||
|
||||
bool operator==(const ImageResource& other) const = default;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user