gl: Implement CopyBufferToImage in software

- Overrides the drivers CopyBufferToImage handling where possible
This commit is contained in:
kd-11 2022-06-19 22:30:18 +03:00 committed by kd-11
parent 954c60947d
commit f948ce399e
11 changed files with 342 additions and 239 deletions

View file

@ -8,7 +8,15 @@ namespace gl
{
static GLenum sizedfmt_to_ifmt(GLenum sized)
{
return sized == GL_BGRA8 ? GL_RGBA8 : sized;
switch (sized)
{
case GL_BGRA8:
return GL_RGBA8;
case GL_BGR5_A1:
return GL_RGB5_A1;
default:
return sized;
}
}
texture::texture(GLenum target, GLuint width, GLuint height, GLuint depth, GLuint mipmaps, GLenum sized_format, rsx::format_class format_class)