diff options
author | Tapani Pälli <[email protected]> | 2018-07-24 08:58:20 +0300 |
---|---|---|
committer | Tapani Pälli <[email protected]> | 2018-07-31 08:19:10 +0300 |
commit | ce80abbb17f828e34ff974e542d34b4d86b3122f (patch) | |
tree | d3bf25b39f5919535f395b3c556bc7fa7e6261fd /src/mesa/main | |
parent | f94681b6e2f815f19ca817382848a878a77b44c9 (diff) |
mesa: add glRenderbufferStorage support for EXT_texture_norm16 formats
These bits were missing, found when extending the Piglit test.
Fixes: 7f467d4f73 "mesa: GL_EXT_texture_norm16 extension plumbing"
Signed-off-by: Tapani Pälli <[email protected]>
Reviewed-by: Nanley Chery <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/fbobject.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 750d7f45e34..cfe2174ef12 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1943,8 +1943,10 @@ _mesa_base_fbo_format(const struct gl_context *ctx, GLenum internalFormat) case GL_RGBA: case GL_RGBA2: case GL_RGBA12: - case GL_RGBA16: return _mesa_is_desktop_gl(ctx) ? GL_RGBA : 0; + case GL_RGBA16: + return _mesa_is_desktop_gl(ctx) || _mesa_has_EXT_texture_norm16(ctx) + ? GL_RGBA : 0; case GL_RGB10_A2: case GL_SRGB8_ALPHA8_EXT: return _mesa_is_desktop_gl(ctx) || _mesa_is_gles3(ctx) ? GL_RGBA : 0; @@ -1979,15 +1981,17 @@ _mesa_base_fbo_format(const struct gl_context *ctx, GLenum internalFormat) ctx->Extensions.ARB_depth_buffer_float) ? GL_DEPTH_STENCIL : 0; case GL_RED: + return _mesa_has_ARB_texture_rg(ctx) ? GL_RED : 0; case GL_R16: - return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_rg + return _mesa_has_ARB_texture_rg(ctx) || _mesa_has_EXT_texture_norm16(ctx) ? GL_RED : 0; case GL_R8: return ctx->API != API_OPENGLES && ctx->Extensions.ARB_texture_rg ? GL_RED : 0; case GL_RG: + return _mesa_has_ARB_texture_rg(ctx) ? GL_RG : 0; case GL_RG16: - return _mesa_is_desktop_gl(ctx) && ctx->Extensions.ARB_texture_rg + return _mesa_has_ARB_texture_rg(ctx) || _mesa_has_EXT_texture_norm16(ctx) ? GL_RG : 0; case GL_RG8: return ctx->API != API_OPENGLES && ctx->Extensions.ARB_texture_rg |