mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-01 07:13:36 +00:00
rsx/gl: Minor fixes
- Identify depth textures reaching the gpu via shader_read upload path - Use correct timestamp counter for opengl - inline draw_state::test_property because msvc doesnt do it for us
This commit is contained in:
parent
af1b13550b
commit
07cbf3da48
@ -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<Args>(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 <typename surface_store_type, typename blitter_type, typename ...Args>
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user