mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 19:07:01 +02:00
render: simplify command and resource ownership
This commit is contained in:
@@ -19,21 +19,8 @@ inline constexpr bool depth_htile_stencil_acceleration_compatible(bool has_stenc
|
||||
}
|
||||
|
||||
struct RenderDepthInfo {
|
||||
// Discovery keeps guest image information but can remap the view into a larger cache image.
|
||||
TextureCache::ImageDesc desc;
|
||||
vk::Format format = vk::Format::eUndefined;
|
||||
uint32_t width = 0;
|
||||
uint32_t height = 0;
|
||||
uint32_t samples = 1;
|
||||
bool htile = false;
|
||||
uint64_t depth_buffer_size = 0;
|
||||
uint64_t depth_buffer_vaddr = 0;
|
||||
uint64_t depth_tile_swizzle = 0;
|
||||
uint64_t stencil_buffer_size = 0;
|
||||
uint64_t stencil_buffer_vaddr = 0;
|
||||
uint64_t stencil_tile_swizzle = 0;
|
||||
uint64_t htile_buffer_size = 0;
|
||||
uint64_t htile_buffer_vaddr = 0;
|
||||
uint64_t htile_tile_swizzle = 0;
|
||||
bool depth_clear_enable = false;
|
||||
bool depth_load_clear_enable = false;
|
||||
bool depth_meta_clear_enable = false;
|
||||
@@ -52,10 +39,6 @@ struct RenderDepthInfo {
|
||||
PipelineStencilDynamicState stencil_dynamic_front;
|
||||
PipelineStencilDynamicState stencil_dynamic_back;
|
||||
ImageId image_id;
|
||||
vk::ImageView image_view = nullptr;
|
||||
uint64_t vaddr[3] = {};
|
||||
uint64_t size[3] = {};
|
||||
int vaddr_num = 0;
|
||||
|
||||
[[nodiscard]] vk::ImageAspectFlags AttachmentWriteAspects() const;
|
||||
};
|
||||
@@ -65,7 +48,7 @@ inline bool depth_attachment_read_only(const RenderDepthInfo& depth) {
|
||||
}
|
||||
|
||||
inline vk::ImageLayout depth_attachment_layout(const RenderDepthInfo& depth) {
|
||||
const auto available = ImageViewOps::DepthAspectMask(depth.format);
|
||||
const auto available = ImageViewOps::DepthAspectMask(depth.desc.view_info.format);
|
||||
const auto writes = depth.AttachmentWriteAspects();
|
||||
const bool has_depth = static_cast<bool>(available & vk::ImageAspectFlagBits::eDepth);
|
||||
const bool has_stencil = static_cast<bool>(available & vk::ImageAspectFlagBits::eStencil);
|
||||
|
||||
Reference in New Issue
Block a user