[client] egl: remove deprecated BGR members and logic

This commit is contained in:
Geoffrey McRae 2023-11-08 14:24:37 +11:00
parent 4aba15f31c
commit 3af2cf54d6
4 changed files with 6 additions and 19 deletions

View file

@ -196,7 +196,7 @@ static bool egl_texBufferStreamUpdate(EGL_Texture * texture,
for(int y = 0; y < update->height; ++y)
{
memcpy(dst, src, update->pitch);
dst += texture->format.bufferPitch;
dst += texture->format.pitch;
src += update->pitch;
}
}
@ -207,7 +207,7 @@ static bool egl_texBufferStreamUpdate(EGL_Texture * texture,
{
src -= update->stride;
memcpy(dst, src, update->stride);
dst += texture->format.bufferPitch;
dst += texture->format.pitch;
}
}

View file

@ -167,7 +167,7 @@ static bool egl_texDMABUFUpdate(EGL_Texture * texture,
EGL_LINUX_DRM_FOURCC_EXT , texture->format.fourcc,
EGL_DMA_BUF_PLANE0_FD_EXT , update->dmaFD,
EGL_DMA_BUF_PLANE0_OFFSET_EXT , 0,
EGL_DMA_BUF_PLANE0_PITCH_EXT , texture->format.bufferPitch,
EGL_DMA_BUF_PLANE0_PITCH_EXT , texture->format.pitch,
EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT, (modifier & 0xffffffff),
EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, (modifier >> 32),
EGL_NONE , EGL_NONE

View file

@ -86,16 +86,7 @@ bool egl_texUtilGetFormat(const EGL_TexSetup * setup, EGL_TexFormat * fmt)
if (!fmt->pitch)
fmt->pitch = fmt->stride * fmt->bpp;
fmt->bufferPitch = setup->pitch;
// adjust the stride for 24-bit in 32-bit buffers
// this is needed to keep values sane for DMABUF support
// if (setup->pixFmt == EGL_PF_BGR)
// fmt->bufferPitch = setup->width * 4;
fmt->dataSize = fmt->height * fmt->pitch;
fmt->bufferSize = fmt->height * fmt->bufferPitch;
fmt->dataSize = fmt->height * fmt->pitch;
return true;
}
@ -106,12 +97,12 @@ bool egl_texUtilGenBuffers(const EGL_TexFormat * fmt, EGL_TexBuffer * buffers,
{
EGL_TexBuffer *buffer = &buffers[i];
buffer->size = fmt->bufferSize;
buffer->size = fmt->dataSize;
glGenBuffers(1, &buffer->pbo);
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, buffer->pbo);
g_egl_dynProcs.glBufferStorageEXT(
GL_PIXEL_UNPACK_BUFFER,
fmt->bufferSize,
fmt->dataSize,
NULL,
GL_MAP_WRITE_BIT |
GL_MAP_PERSISTENT_BIT_EXT |

View file

@ -37,10 +37,6 @@ typedef struct EGL_TexFormat
size_t dataSize;
size_t width , height;
size_t stride, pitch;
// for 24-bit BGR these are the physical adjusted values to get mapping working
size_t bufferSize;
size_t bufferPitch;
}
EGL_TexFormat;