yuzu-emu
/
yuzu
Archived
1
0
Fork 0

TextureCache: Base fixes on rescaling.

This commit is contained in:
Fernando Sahmkow 2021-09-20 19:11:03 +02:00
parent 99eec162da
commit 19ca0c9ab5
2 changed files with 6 additions and 4 deletions

View File

@ -207,7 +207,7 @@ void RasterizerVulkan::Clear() {
query_cache.UpdateCounters(); query_cache.UpdateCounters();
const auto& regs = maxwell3d.regs; auto& regs = maxwell3d.regs;
const bool use_color = regs.clear_buffers.R || regs.clear_buffers.G || regs.clear_buffers.B || const bool use_color = regs.clear_buffers.R || regs.clear_buffers.G || regs.clear_buffers.B ||
regs.clear_buffers.A; regs.clear_buffers.A;
const bool use_depth = regs.clear_buffers.Z; const bool use_depth = regs.clear_buffers.Z;
@ -228,6 +228,7 @@ void RasterizerVulkan::Clear() {
up_scale = Settings::values.resolution_info.up_scale; up_scale = Settings::values.resolution_info.up_scale;
down_shift = Settings::values.resolution_info.down_shift; down_shift = Settings::values.resolution_info.down_shift;
} }
UpdateViewportsState(regs);
VkClearRect clear_rect{ VkClearRect clear_rect{
.rect = GetScissorState(regs, 0, up_scale, down_shift), .rect = GetScissorState(regs, 0, up_scale, down_shift),

View File

@ -205,8 +205,8 @@ void TextureCache<P>::UpdateRenderTargets(bool is_clear) {
return; return;
} }
u32 scale_rating; u32 scale_rating = 0;
bool rescaled; bool rescaled = false;
std::array<ImageId, NUM_RT> tmp_color_images{}; std::array<ImageId, NUM_RT> tmp_color_images{};
ImageId tmp_depth_image{}; ImageId tmp_depth_image{};
do { do {
@ -223,7 +223,7 @@ void TextureCache<P>::UpdateRenderTargets(bool is_clear) {
bool can_rescale = true; bool can_rescale = true;
bool any_blacklisted = false; bool any_blacklisted = false;
const auto check_rescale = [&](ImageViewId view_id, ImageId& id_save) { const auto check_rescale = [&](ImageViewId view_id, ImageId& id_save) {
if (view_id) { if (view_id != NULL_IMAGE_VIEW_ID && view_id != ImageViewId{}) {
const auto& view = slot_image_views[view_id]; const auto& view = slot_image_views[view_id];
const auto image_id = view.image_id; const auto image_id = view.image_id;
id_save = image_id; id_save = image_id;
@ -265,6 +265,7 @@ void TextureCache<P>::UpdateRenderTargets(bool is_clear) {
scale_up(tmp_color_images[index]); scale_up(tmp_color_images[index]);
} }
scale_up(tmp_depth_image); scale_up(tmp_depth_image);
scale_rating = 2;
} }
} else { } else {
rescaled = false; rescaled = false;