mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 00:40:11 +00:00
gl: Do not allow cross-aspect bitcasts
- There is special handling for some cross-aspect bitcasts in vulkan, but this is not possible using OpenGL
This commit is contained in:
parent
64958264c5
commit
81b9952e34
@ -885,9 +885,9 @@ namespace gl
|
||||
bool formats_are_bitcast_compatible(const texture* texture1, const texture* texture2)
|
||||
{
|
||||
if (const u32 transfer_class = texture1->format_class() | texture2->format_class();
|
||||
transfer_class & RSX_FORMAT_CLASS_DEPTH_FLOAT_MASK)
|
||||
transfer_class > RSX_FORMAT_CLASS_COLOR)
|
||||
{
|
||||
// If any one of the two images is a depth float, the other must match exactly or bust
|
||||
// If any one of the two images is a depth format, the other must match exactly or bust
|
||||
return (texture1->format_class() == texture2->format_class());
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ namespace gl
|
||||
{
|
||||
const auto src_bpp = slice.src->pitch() / slice.src->width();
|
||||
const u16 convert_w = u16(slice.src->width() * src_bpp) / dst_bpp;
|
||||
tmp = std::make_unique<texture>(GL_TEXTURE_2D, convert_w, slice.src->height(), 1, 1, static_cast<GLenum>(dst_image->get_internal_format()));
|
||||
tmp = std::make_unique<texture>(GL_TEXTURE_2D, convert_w, slice.src->height(), 1, 1, static_cast<GLenum>(dst_image->get_internal_format()), dst_image->format_class());
|
||||
|
||||
src_image = tmp.get();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user