early-access version 3602
This commit is contained in:
parent
4029a125f8
commit
44145b1f0a
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 3601.
|
This is the source code for early-access 3602.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -144,6 +144,10 @@ public:
|
|||||||
return state_tracker;
|
return state_tracker;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CheckFeedbackLoop(ImageView& image_view) const noexcept {
|
||||||
|
// OpenGL does not require a barrier for attachment feedback loops.
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct StagingBuffers {
|
struct StagingBuffers {
|
||||||
explicit StagingBuffers(GLenum storage_flags_, GLenum map_flags_);
|
explicit StagingBuffers(GLenum storage_flags_, GLenum map_flags_);
|
||||||
|
@ -175,6 +175,7 @@ public:
|
|||||||
std::array<f32, 4> words{};
|
std::array<f32, 4> words{};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <bool CheckFeedbackLoop = false>
|
||||||
inline void PushImageDescriptors(TextureCache& texture_cache,
|
inline void PushImageDescriptors(TextureCache& texture_cache,
|
||||||
GuestDescriptorQueue& guest_descriptor_queue,
|
GuestDescriptorQueue& guest_descriptor_queue,
|
||||||
const Shader::Info& info, RescalingPushConstant& rescaling,
|
const Shader::Info& info, RescalingPushConstant& rescaling,
|
||||||
@ -192,6 +193,9 @@ inline void PushImageDescriptors(TextureCache& texture_cache,
|
|||||||
const VkImageView vk_image_view{image_view.Handle(desc.type)};
|
const VkImageView vk_image_view{image_view.Handle(desc.type)};
|
||||||
guest_descriptor_queue.AddSampledImage(vk_image_view, sampler);
|
guest_descriptor_queue.AddSampledImage(vk_image_view, sampler);
|
||||||
rescaling.PushTexture(texture_cache.IsRescaling(image_view));
|
rescaling.PushTexture(texture_cache.IsRescaling(image_view));
|
||||||
|
if constexpr (CheckFeedbackLoop) {
|
||||||
|
texture_cache.CheckFeedbackLoop(image_view);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const auto& desc : info.image_descriptors) {
|
for (const auto& desc : info.image_descriptors) {
|
||||||
@ -203,6 +207,9 @@ inline void PushImageDescriptors(TextureCache& texture_cache,
|
|||||||
const VkImageView vk_image_view{image_view.StorageView(desc.type, desc.format)};
|
const VkImageView vk_image_view{image_view.StorageView(desc.type, desc.format)};
|
||||||
guest_descriptor_queue.AddImage(vk_image_view);
|
guest_descriptor_queue.AddImage(vk_image_view);
|
||||||
rescaling.PushImage(texture_cache.IsRescaling(image_view));
|
rescaling.PushImage(texture_cache.IsRescaling(image_view));
|
||||||
|
if constexpr (CheckFeedbackLoop) {
|
||||||
|
texture_cache.CheckFeedbackLoop(image_view);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -457,8 +457,8 @@ void GraphicsPipeline::ConfigureImpl(bool is_indexed) {
|
|||||||
const VideoCommon::ImageViewInOut* views_it{views.data()};
|
const VideoCommon::ImageViewInOut* views_it{views.data()};
|
||||||
const auto prepare_stage{[&](size_t stage) LAMBDA_FORCEINLINE {
|
const auto prepare_stage{[&](size_t stage) LAMBDA_FORCEINLINE {
|
||||||
buffer_cache.BindHostStageBuffers(stage);
|
buffer_cache.BindHostStageBuffers(stage);
|
||||||
PushImageDescriptors(texture_cache, guest_descriptor_queue, stage_infos[stage], rescaling,
|
PushImageDescriptors<true>(texture_cache, guest_descriptor_queue, stage_infos[stage],
|
||||||
samplers_it, views_it);
|
rescaling, samplers_it, views_it);
|
||||||
const auto& info{stage_infos[0]};
|
const auto& info{stage_infos[0]};
|
||||||
if (info.uses_render_area) {
|
if (info.uses_render_area) {
|
||||||
render_area.uses_render_area = true;
|
render_area.uses_render_area = true;
|
||||||
|
@ -106,6 +106,15 @@ public:
|
|||||||
return *master_semaphore;
|
return *master_semaphore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] bool IsRenderpassImage(VkImage image) const noexcept {
|
||||||
|
for (u32 i = 0; i < num_renderpass_images; i++) {
|
||||||
|
if (image == renderpass_images[i]) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
std::mutex submit_mutex;
|
std::mutex submit_mutex;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -861,6 +861,12 @@ VkBuffer TextureCacheRuntime::GetTemporaryBuffer(size_t needed_size) {
|
|||||||
return *buffers[level];
|
return *buffers[level];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TextureCacheRuntime::CheckFeedbackLoop(ImageView& image_view) {
|
||||||
|
if (scheduler.IsRenderpassImage(image_view.ImageHandle())) {
|
||||||
|
scheduler.RequestOutsideRenderPassOperationContext();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void TextureCacheRuntime::ReinterpretImage(Image& dst, Image& src,
|
void TextureCacheRuntime::ReinterpretImage(Image& dst, Image& src,
|
||||||
std::span<const VideoCommon::ImageCopy> copies) {
|
std::span<const VideoCommon::ImageCopy> copies) {
|
||||||
std::vector<VkBufferImageCopy> vk_in_copies(copies.size());
|
std::vector<VkBufferImageCopy> vk_in_copies(copies.size());
|
||||||
|
@ -103,6 +103,8 @@ public:
|
|||||||
|
|
||||||
[[nodiscard]] VkBuffer GetTemporaryBuffer(size_t needed_size);
|
[[nodiscard]] VkBuffer GetTemporaryBuffer(size_t needed_size);
|
||||||
|
|
||||||
|
void CheckFeedbackLoop(ImageView& image_view);
|
||||||
|
|
||||||
const Device& device;
|
const Device& device;
|
||||||
Scheduler& scheduler;
|
Scheduler& scheduler;
|
||||||
MemoryAllocator& memory_allocator;
|
MemoryAllocator& memory_allocator;
|
||||||
|
@ -2374,6 +2374,11 @@ bool TextureCache<P>::IsFullClear(ImageViewId id) {
|
|||||||
scissor.max_y >= size.height;
|
scissor.max_y >= size.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <class P>
|
||||||
|
void TextureCache<P>::CheckFeedbackLoop(ImageView& image_view) {
|
||||||
|
runtime.CheckFeedbackLoop(image_view);
|
||||||
|
}
|
||||||
|
|
||||||
template <class P>
|
template <class P>
|
||||||
void TextureCache<P>::CreateChannel(struct Tegra::Control::ChannelState& channel) {
|
void TextureCache<P>::CreateChannel(struct Tegra::Control::ChannelState& channel) {
|
||||||
VideoCommon::ChannelSetupCaches<TextureCacheChannelInfo>::CreateChannel(channel);
|
VideoCommon::ChannelSetupCaches<TextureCacheChannelInfo>::CreateChannel(channel);
|
||||||
|
@ -224,6 +224,9 @@ public:
|
|||||||
|
|
||||||
[[nodiscard]] bool IsRescaling(const ImageViewBase& image_view) const noexcept;
|
[[nodiscard]] bool IsRescaling(const ImageViewBase& image_view) const noexcept;
|
||||||
|
|
||||||
|
/// Handle feedback loops during draws.
|
||||||
|
void CheckFeedbackLoop(ImageView& image_view);
|
||||||
|
|
||||||
/// Create channel state.
|
/// Create channel state.
|
||||||
void CreateChannel(Tegra::Control::ChannelState& channel) final override;
|
void CreateChannel(Tegra::Control::ChannelState& channel) final override;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user