fix: image views segfaulting
Some checks failed
codespell / Check for spelling errors (push) Has been cancelled
suyu verify / Verify Format (push) Has been cancelled
suyu verify / test build (push) Has been cancelled
suyu verify / android (push) Has been cancelled

This commit is contained in:
Samuliak 2024-10-06 19:35:15 +02:00
parent d6148b194e
commit 79e86ed1b6
No known key found for this signature in database

View file

@ -122,17 +122,16 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewI
ImageId image_id_, Image& image)
: VideoCommon::ImageViewBase{info, image.info, image_id_, image.gpu_addr} {
using Shader::TextureType;
if (image.GetHandle()) {
texture = image.GetHandle()->retain();
}
// TODO: create texture view
texture = image.GetHandle();
// TODO: implement
}
// TODO: save slot images
ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewInfo& info,
ImageId image_id_, Image& image, const SlotVector<Image>& slot_imgs)
: ImageView(runtime, info, image_id_, image) {
// TODO: save slot images
texture = image.GetHandle();
}
ImageView::ImageView(TextureCacheRuntime&, const VideoCommon::ImageInfo& info,
@ -147,9 +146,8 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::NullImageV
}
ImageView::~ImageView() {
if (texture) {
texture->release();
}
// TODO: uncomment
// texture->release();
}
Sampler::Sampler(TextureCacheRuntime& runtime, const Tegra::Texture::TSCEntry& tsc) {