mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-19 19:15:26 +00:00
rsx: Fix const RTV/DSV cast from texture cache
This commit is contained in:
parent
66dc1cc15d
commit
bf96cbe980
4 changed files with 12 additions and 2 deletions
|
@ -113,6 +113,11 @@ namespace gl
|
|||
{
|
||||
return ensure(dynamic_cast<gl::render_target*>(t));
|
||||
}
|
||||
|
||||
static inline const gl::render_target* as_rtt(const gl::texture* t)
|
||||
{
|
||||
return ensure(dynamic_cast<const gl::render_target*>(t));
|
||||
}
|
||||
}
|
||||
|
||||
struct gl_render_target_traits
|
||||
|
|
|
@ -393,7 +393,7 @@ namespace gl
|
|||
return managed_texture.get();
|
||||
}
|
||||
|
||||
gl::render_target* get_render_target()
|
||||
gl::render_target* get_render_target() const
|
||||
{
|
||||
return gl::as_rtt(vram_texture);
|
||||
}
|
||||
|
|
|
@ -85,6 +85,11 @@ namespace vk
|
|||
return ensure(dynamic_cast<vk::render_target*>(t));
|
||||
}
|
||||
|
||||
static inline const vk::render_target* as_rtt(const vk::image* t)
|
||||
{
|
||||
return ensure(dynamic_cast<const vk::render_target*>(t));
|
||||
}
|
||||
|
||||
struct surface_cache_traits
|
||||
{
|
||||
using surface_storage_type = std::unique_ptr<vk::render_target>;
|
||||
|
|
|
@ -163,7 +163,7 @@ namespace vk
|
|||
return managed_texture;
|
||||
}
|
||||
|
||||
vk::render_target* get_render_target()
|
||||
vk::render_target* get_render_target() const
|
||||
{
|
||||
return vk::as_rtt(vram_texture);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue