mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-21 22:32:47 +01:00
fix: image views segfaulting
This commit is contained in:
parent
d6148b194e
commit
79e86ed1b6
1 changed files with 6 additions and 8 deletions
|
@ -122,17 +122,16 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewI
|
||||||
ImageId image_id_, Image& image)
|
ImageId image_id_, Image& image)
|
||||||
: VideoCommon::ImageViewBase{info, image.info, image_id_, image.gpu_addr} {
|
: VideoCommon::ImageViewBase{info, image.info, image_id_, image.gpu_addr} {
|
||||||
using Shader::TextureType;
|
using Shader::TextureType;
|
||||||
if (image.GetHandle()) {
|
texture = image.GetHandle();
|
||||||
texture = image.GetHandle()->retain();
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: create texture view
|
// TODO: implement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: save slot images
|
||||||
ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewInfo& info,
|
ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewInfo& info,
|
||||||
ImageId image_id_, Image& image, const SlotVector<Image>& slot_imgs)
|
ImageId image_id_, Image& image, const SlotVector<Image>& slot_imgs)
|
||||||
: ImageView(runtime, info, image_id_, image) {
|
: ImageView(runtime, info, image_id_, image) {
|
||||||
// TODO: save slot images
|
texture = image.GetHandle();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageView::ImageView(TextureCacheRuntime&, const VideoCommon::ImageInfo& info,
|
ImageView::ImageView(TextureCacheRuntime&, const VideoCommon::ImageInfo& info,
|
||||||
|
@ -147,9 +146,8 @@ ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::NullImageV
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageView::~ImageView() {
|
ImageView::~ImageView() {
|
||||||
if (texture) {
|
// TODO: uncomment
|
||||||
texture->release();
|
// texture->release();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Sampler::Sampler(TextureCacheRuntime& runtime, const Tegra::Texture::TSCEntry& tsc) {
|
Sampler::Sampler(TextureCacheRuntime& runtime, const Tegra::Texture::TSCEntry& tsc) {
|
||||||
|
|
Loading…
Reference in a new issue