[host/client] added experimental RGBA16 float support (EGL only)

This commit is contained in:
Geoffrey McRae
2020-10-11 19:22:31 +11:00
parent 4f40ce4b40
commit 9c6bd888fd
8 changed files with 47 additions and 13 deletions

View File

@@ -197,6 +197,11 @@ bool egl_desktop_update(EGL_Desktop * desktop, const bool sourceChanged, const L
desktop->shader = &desktop->shader_generic;
break;
case FRAME_TYPE_RGBA16F:
pixFmt = EGL_PF_RGBA16F;
desktop->shader = &desktop->shader_generic;
break;
case FRAME_TYPE_YUV420:
pixFmt = EGL_PF_YUV420;
desktop->shader = &desktop->shader_yuv;

View File

@@ -219,6 +219,19 @@ bool egl_texture_setup(EGL_Texture * texture, enum EGL_PixelFormat pixFmt, size_
texture->pboBufferSize = height * stride;
break;
case EGL_PF_RGBA16F:
planeCount = 1;
texture->bpp = 8;
texture->format = GL_RGBA;
texture->planes[0][0] = width;
texture->planes[0][1] = height;
texture->planes[0][2] = stride / 8;
texture->offsets[0] = 0;
texture->intFormat = GL_RGB16;
texture->dataType = GL_FLOAT;
texture->pboBufferSize = height * stride;
break;
case EGL_PF_YUV420:
planeCount = 3;
texture->bpp = 4;

View File

@@ -32,6 +32,7 @@ enum EGL_PixelFormat
EGL_PF_RGBA,
EGL_PF_BGRA,
EGL_PF_RGBA10,
EGL_PF_RGBA16F,
EGL_PF_YUV420
};

View File

@@ -440,6 +440,11 @@ static int frameThread(void * unused)
lgrFormat.bpp = 32;
break;
case FRAME_TYPE_RGBA16F:
dataSize = lgrFormat.height * lgrFormat.pitch;
lgrFormat.bpp = 64;
break;
case FRAME_TYPE_YUV420:
dataSize = lgrFormat.height * lgrFormat.width;
dataSize += (dataSize / 4) * 2;