early-access version 2883
This commit is contained in:
parent
cc8084a0ec
commit
fd7b2535a2
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 2882.
|
This is the source code for early-access 2883.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -737,7 +737,8 @@ Image::Image(TextureCacheRuntime& runtime_, const VideoCommon::ImageInfo& info_,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image::Image(const VideoCommon::NullImageParams& params) : VideoCommon::ImageBase{params} {}
|
Image::Image(TextureCacheRuntime&, const VideoCommon::NullImageParams& params)
|
||||||
|
: VideoCommon::ImageBase{params} {}
|
||||||
|
|
||||||
Image::~Image() = default;
|
Image::~Image() = default;
|
||||||
|
|
||||||
@ -1078,7 +1079,7 @@ bool Image::ScaleDown(bool ignore) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewInfo& info,
|
ImageView::ImageView(TextureCacheRuntime& runtime, const VideoCommon::ImageViewInfo& info,
|
||||||
ImageId image_id_, Image& image, const SlotVector<Image>&)
|
ImageId image_id_, Image& image)
|
||||||
: VideoCommon::ImageViewBase{info, image.info, image_id_}, views{runtime.null_image_views} {
|
: VideoCommon::ImageViewBase{info, image.info, image_id_}, views{runtime.null_image_views} {
|
||||||
const Device& device = runtime.device;
|
const Device& device = runtime.device;
|
||||||
if (True(image.flags & ImageFlagBits::Converted)) {
|
if (True(image.flags & ImageFlagBits::Converted)) {
|
||||||
|
@ -189,7 +189,7 @@ class Image : public VideoCommon::ImageBase {
|
|||||||
public:
|
public:
|
||||||
explicit Image(TextureCacheRuntime&, const VideoCommon::ImageInfo& info, GPUVAddr gpu_addr,
|
explicit Image(TextureCacheRuntime&, const VideoCommon::ImageInfo& info, GPUVAddr gpu_addr,
|
||||||
VAddr cpu_addr);
|
VAddr cpu_addr);
|
||||||
explicit Image(const VideoCommon::NullImageParams&);
|
explicit Image(TextureCacheRuntime&, const VideoCommon::NullImageParams&);
|
||||||
|
|
||||||
~Image();
|
~Image();
|
||||||
|
|
||||||
@ -244,8 +244,7 @@ class ImageView : public VideoCommon::ImageViewBase {
|
|||||||
friend Image;
|
friend Image;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ImageView(TextureCacheRuntime&, const VideoCommon::ImageViewInfo&, ImageId, Image&,
|
explicit ImageView(TextureCacheRuntime&, const VideoCommon::ImageViewInfo&, ImageId, Image&);
|
||||||
const SlotVector<Image>&);
|
|
||||||
explicit ImageView(TextureCacheRuntime&, const VideoCommon::ImageInfo&,
|
explicit ImageView(TextureCacheRuntime&, const VideoCommon::ImageInfo&,
|
||||||
const VideoCommon::ImageViewInfo&, GPUVAddr);
|
const VideoCommon::ImageViewInfo&, GPUVAddr);
|
||||||
explicit ImageView(TextureCacheRuntime&, const VideoCommon::ImageInfo& info,
|
explicit ImageView(TextureCacheRuntime&, const VideoCommon::ImageInfo& info,
|
||||||
|
@ -1287,7 +1287,16 @@ Image::Image(TextureCacheRuntime& runtime_, const ImageInfo& info_, GPUVAddr gpu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image::Image(const VideoCommon::NullImageParams& params) : VideoCommon::ImageBase{params} {}
|
Image::Image(TextureCacheRuntime& runtime_, const VideoCommon::NullImageParams& params)
|
||||||
|
: VideoCommon::ImageBase(params), scheduler{&runtime_.scheduler}, runtime{&runtime_},
|
||||||
|
original_image{MakeImage(runtime_.device, info)},
|
||||||
|
commit(runtime_.memory_allocator.Commit(original_image, MemoryUsage::DeviceLocal)),
|
||||||
|
aspect_mask{ImageAspectMask(info.format)} {
|
||||||
|
if (runtime->device.HasDebuggingToolAttached()) {
|
||||||
|
original_image.SetObjectNameEXT("NullImage");
|
||||||
|
}
|
||||||
|
current_image = *original_image;
|
||||||
|
}
|
||||||
|
|
||||||
Image::~Image() = default;
|
Image::~Image() = default;
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ class Image : public VideoCommon::ImageBase {
|
|||||||
public:
|
public:
|
||||||
explicit Image(TextureCacheRuntime&, const VideoCommon::ImageInfo& info, GPUVAddr gpu_addr,
|
explicit Image(TextureCacheRuntime&, const VideoCommon::ImageInfo& info, GPUVAddr gpu_addr,
|
||||||
VAddr cpu_addr);
|
VAddr cpu_addr);
|
||||||
explicit Image(const VideoCommon::NullImageParams&);
|
explicit Image(TextureCacheRuntime&, const VideoCommon::NullImageParams&);
|
||||||
|
|
||||||
~Image();
|
~Image();
|
||||||
|
|
||||||
|
@ -41,8 +41,9 @@ TextureCache<P>::TextureCache(Runtime& runtime_, VideoCore::RasterizerInterface&
|
|||||||
|
|
||||||
// Make sure the first index is reserved for the null resources
|
// Make sure the first index is reserved for the null resources
|
||||||
// This way the null resource becomes a compile time constant
|
// This way the null resource becomes a compile time constant
|
||||||
void(slot_images.insert(NullImageParams{}));
|
void(slot_images.insert(runtime, NullImageParams{}));
|
||||||
void(slot_image_views.insert(runtime, NullImageViewParams{}));
|
void(slot_image_views.insert(runtime, ImageViewInfo{}, NULL_IMAGE_ID,
|
||||||
|
slot_images[NULL_IMAGE_ID]));
|
||||||
void(slot_samplers.insert(runtime, sampler_descriptor));
|
void(slot_samplers.insert(runtime, sampler_descriptor));
|
||||||
|
|
||||||
if constexpr (HAS_DEVICE_MEMORY_INFO) {
|
if constexpr (HAS_DEVICE_MEMORY_INFO) {
|
||||||
@ -1443,8 +1444,7 @@ ImageViewId TextureCache<P>::FindOrEmplaceImageView(ImageId image_id, const Imag
|
|||||||
if (const ImageViewId image_view_id = image.FindView(info); image_view_id) {
|
if (const ImageViewId image_view_id = image.FindView(info); image_view_id) {
|
||||||
return image_view_id;
|
return image_view_id;
|
||||||
}
|
}
|
||||||
const ImageViewId image_view_id =
|
const ImageViewId image_view_id = slot_image_views.insert(runtime, info, image_id, image);
|
||||||
slot_image_views.insert(runtime, info, image_id, image, slot_images);
|
|
||||||
image.InsertView(info, image_view_id);
|
image.InsertView(info, image_view_id);
|
||||||
return image_view_id;
|
return image_view_id;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user