Skip to content

Commit

Permalink
Fixups, remove completed 'TODOs'
Browse files Browse the repository at this point in the history
  • Loading branch information
ruipin committed Sep 11, 2018
1 parent 396c823 commit b9db0d3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 24 deletions.
11 changes: 5 additions & 6 deletions rpcs3/Emu/RSX/Common/texture_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ namespace rsx
{
auto &tex = *It;

// TODO ruipin: Removed as a workaround for certain bugs
// TODO ruipin: Removed as a workaround for a bug, will need to be fixed by kd-11
//if (tex.get_section_base() > test_range.start)
// continue;

Expand Down Expand Up @@ -955,7 +955,7 @@ namespace rsx
}

// TODO ruipin: is this safe? What about NA/RO regions overlapping this one?
// What about the small time period between this unprotect and the reprotect below?
// What about the small time period between this unprotect and the reprotect below?
surface->unprotect();
}
}
Expand All @@ -972,7 +972,7 @@ namespace rsx

section_storage_type& region = find_cached_texture(memory_range, false);

if (!region.exists() || region.get_context() != texture_upload_context::framebuffer_storage) // TODO ruipin: Why is this framebuffer check here?
if (!region.exists() || region.get_context() != texture_upload_context::framebuffer_storage)
{
#ifdef TEXTURE_CACHE_DEBUG
if (flags == memory_read_flags::flush_once)
Expand Down Expand Up @@ -1177,7 +1177,6 @@ namespace rsx
if (value.misses >= m_cache_miss_threshold)
{
// Disable prediction if memory is flagged as flush_always
// TODO ruipin: Shouldn't this do an overlaps/inside check?
if (m_flush_always_cache.find(memory_range.start) == m_flush_always_cache.end())
{
// TODO: Determine better way of setting threshold
Expand Down Expand Up @@ -1218,6 +1217,7 @@ namespace rsx
}
}

// TODO ruipin: This fails, most likely a bug
//AUDIT(count == m_unreleased_texture_objects);
m_unreleased_texture_objects = 0;
}
Expand Down Expand Up @@ -1426,7 +1426,7 @@ namespace rsx
auto overlapping = m_rtts.get_merged_texture_memory_region(texaddr, tex_width, tex_height, tex_pitch, bpp);
bool requires_merging = false;

// TODO ruipin: This fails. Bug?
// TODO ruipin: This AUDIT fails due to a bug that kd will have to fix
//AUDIT( !overlapping.empty() );
if (overlapping.size() > 1)
{
Expand Down Expand Up @@ -1757,7 +1757,6 @@ namespace rsx
lock.upgrade();

//Invalidate with writing=false, discard=false, rebuild=false, native_flush=true
//TODO ruipin: must change to writing=true to fix the texture at the same address being locked RO
invalidate_range_impl_base(tex_range, false, false, true, std::forward<Args>(extras)...);

//NOTE: SRGB correction is to be handled in the fragment shader; upload as linear RGB
Expand Down
16 changes: 0 additions & 16 deletions rpcs3/Emu/RSX/Common/texture_cache_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -886,25 +886,13 @@ namespace rsx
{
utils::protection old_prot = get_protection();
rsx::buffered_section::unprotect();

/* ruipin TODO ?
flushed = false;
synchronized = false;
sync_timestamp = 0ull; */

post_protect(old_prot, utils::protection::rw);
}

inline void discard()
{
utils::protection old_prot = get_protection();
rsx::buffered_section::discard();

/* ruipin TODO ?
flushed = false;
synchronized = false;
sync_timestamp = 0ull; */

post_protect(old_prot, utils::protection::rw);
}

Expand Down Expand Up @@ -950,25 +938,21 @@ namespace rsx

void set_view_flags(rsx::texture_create_flags flags)
{
//AUDIT( flags == view_flags || !is_locked());
view_flags = flags;
}

void set_context(rsx::texture_upload_context upload_context)
{
//AUDIT( upload_context == context || !is_locked() );
context = upload_context;
}

void set_image_type(rsx::texture_dimension_extended type)
{
//AUDIT( type == image_type || !is_locked() );
image_type = type;
}

void set_gcm_format(u32 format)
{
//AUDIT( format == gcm_format || !is_locked() );
gcm_format = format;
}

Expand Down
1 change: 0 additions & 1 deletion rpcs3/Emu/RSX/GL/GLTextureCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,6 @@ namespace gl
//Already destroyed
return;

// TODO ruipin: Double-check if this can ever be called while other sections are kept and are overlapping
if (is_locked())
unprotect();

Expand Down
1 change: 0 additions & 1 deletion rpcs3/Emu/RSX/VK/VKTextureCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ namespace vk
m_discardable_storage.push_back(tex);
}

// TODO ruipin: double-check if this can ever be called while other sections are kept and overlapping
if (tex.is_locked())
tex.unprotect();

Expand Down

0 comments on commit b9db0d3

Please sign in to comment.