diff --git a/rpcs3/Emu/RSX/Common/texture_cache.h b/rpcs3/Emu/RSX/Common/texture_cache.h index 156a4792d3..b436311673 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache.h +++ b/rpcs3/Emu/RSX/Common/texture_cache.h @@ -1668,13 +1668,24 @@ namespace rsx auto subresources_layout = get_subresources_layout(tex); auto remap_vector = tex.decoded_remap(); + bool is_depth_format = false; + switch (format) + { + case CELL_GCM_TEXTURE_DEPTH16: + case CELL_GCM_TEXTURE_DEPTH16_FLOAT: + case CELL_GCM_TEXTURE_DEPTH24_D8: + case CELL_GCM_TEXTURE_DEPTH24_D8_FLOAT: + is_depth_format = true; + break; + } + //Invalidate with writing=false, discard=false, rebuild=false, native_flush=true invalidate_range_impl_base(texaddr, tex_size, false, false, false, true, std::forward(extras)...); m_texture_memory_in_use += (tex_pitch * tex_height); return{ upload_image_from_cpu(cmd, texaddr, tex_width, tex_height, depth, tex.get_exact_mipmap_count(), tex_pitch, format, texture_upload_context::shader_read, subresources_layout, extended_dimension, is_swizzled, remap_vector)->get_raw_view(), - texture_upload_context::shader_read, false, scale_x, scale_y, extended_dimension }; + texture_upload_context::shader_read, is_depth_format, scale_x, scale_y, extended_dimension }; } template diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp index 0f0ba6db2f..8f4d2d6ffe 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.cpp +++ b/rpcs3/Emu/RSX/GL/GLGSRender.cpp @@ -1399,14 +1399,6 @@ void GLGSRender::flip(int buffer) m_textures_upload_time = 0; } - -u64 GLGSRender::timestamp() const -{ - GLint64 result; - glGetInteger64v(GL_TIMESTAMP, &result); - return result; -} - bool GLGSRender::on_access_violation(u32 address, bool is_writing) { bool can_flush = (std::this_thread::get_id() == m_thread_id); diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.h b/rpcs3/Emu/RSX/GL/GLGSRender.h index 2393b901f2..6aab3443be 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.h +++ b/rpcs3/Emu/RSX/GL/GLGSRender.h @@ -98,7 +98,7 @@ struct driver_state return !!test; } - const bool test_property(GLenum property, u32 test) const + inline bool test_property(GLenum property, u32 test) const { auto found = properties.find(property); if (found == properties.end()) @@ -374,7 +374,6 @@ protected: void on_exit() override; bool do_method(u32 id, u32 arg) override; void flip(int buffer) override; - u64 timestamp() const override; void do_local_task(bool idle) override;