mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-14 01:27:00 +00:00
rsx: Improve image aspect tests
- Replace old format-based detection with proper aspect test. Explicit image aspect has been available for a long time, but older code was not updated.
This commit is contained in:
parent
8abd3e8bb4
commit
7ca15c60bb
@ -76,15 +76,7 @@ namespace gl
|
||||
|
||||
bool is_depth_surface() const override
|
||||
{
|
||||
switch (get_internal_format())
|
||||
{
|
||||
case gl::texture::internal_format::depth16:
|
||||
case gl::texture::internal_format::depth24_stencil8:
|
||||
case gl::texture::internal_format::depth32f_stencil8:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return !!(aspect() & gl::image_aspect::depth);
|
||||
}
|
||||
|
||||
void release_ref(texture* t) const override
|
||||
|
@ -413,15 +413,7 @@ namespace gl
|
||||
|
||||
bool is_depth_texture() const
|
||||
{
|
||||
switch (vram_texture->get_internal_format())
|
||||
{
|
||||
case gl::texture::internal_format::depth16:
|
||||
case gl::texture::internal_format::depth24_stencil8:
|
||||
case gl::texture::internal_format::depth32f_stencil8:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return !!(vram_texture->aspect() & gl::image_aspect::depth);
|
||||
}
|
||||
|
||||
bool has_compatible_format(gl::texture* tex) const
|
||||
|
@ -346,16 +346,7 @@ namespace vk
|
||||
|
||||
bool is_depth_texture() const
|
||||
{
|
||||
switch (vram_texture->info.format)
|
||||
{
|
||||
case VK_FORMAT_D16_UNORM:
|
||||
case VK_FORMAT_D32_SFLOAT:
|
||||
case VK_FORMAT_D32_SFLOAT_S8_UINT:
|
||||
case VK_FORMAT_D24_UNORM_S8_UINT:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return !!(vram_texture->aspect() & VK_IMAGE_ASPECT_DEPTH_BIT);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user