summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorFeng Chen <vonchenplus@gmail.com>2023-01-05 05:28:48 +0100
committerFeng Chen <vonchenplus@gmail.com>2023-01-05 05:41:33 +0100
commit013b6891531b37e0f882b8b88d404feb63370617 (patch)
treecbfeebc7a015f15004028056c8932c000201e1fc /src/video_core/texture_cache
parentvideo_core: Implement maxwell3d draw texture method (diff)
downloadyuzu-013b6891531b37e0f882b8b88d404feb63370617.tar
yuzu-013b6891531b37e0f882b8b88d404feb63370617.tar.gz
yuzu-013b6891531b37e0f882b8b88d404feb63370617.tar.bz2
yuzu-013b6891531b37e0f882b8b88d404feb63370617.tar.lz
yuzu-013b6891531b37e0f882b8b88d404feb63370617.tar.xz
yuzu-013b6891531b37e0f882b8b88d404feb63370617.tar.zst
yuzu-013b6891531b37e0f882b8b88d404feb63370617.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/texture_cache/texture_cache.h7
-rw-r--r--src/video_core/texture_cache/texture_cache_base.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 87152c8e9..1b01990a4 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -149,6 +149,13 @@ typename P::ImageView& TextureCache<P>::GetImageView(ImageViewId id) noexcept {
}
template <class P>
+typename P::ImageView& TextureCache<P>::GetImageView(u32 index) noexcept {
+ const auto image_view_id = VisitImageView(channel_state->graphics_image_table,
+ channel_state->graphics_image_view_ids, index);
+ return slot_image_views[image_view_id];
+}
+
+template <class P>
void TextureCache<P>::MarkModification(ImageId id) noexcept {
MarkModification(slot_images[id]);
}
diff --git a/src/video_core/texture_cache/texture_cache_base.h b/src/video_core/texture_cache/texture_cache_base.h
index 4eea1f609..485eaabaa 100644
--- a/src/video_core/texture_cache/texture_cache_base.h
+++ b/src/video_core/texture_cache/texture_cache_base.h
@@ -129,6 +129,9 @@ public:
/// Return a reference to the given image view id
[[nodiscard]] ImageView& GetImageView(ImageViewId id) noexcept;
+ /// Get the imageview from the graphics descriptor table in the specified index
+ [[nodiscard]] ImageView& GetImageView(u32 index) noexcept;
+
/// Mark an image as modified from the GPU
void MarkModification(ImageId id) noexcept;