From: Brian Paul Date: Thu, 24 Sep 2015 15:36:44 +0000 (-0600) Subject: st/mesa: try PIPE_BIND_RENDER_TARGET when choosing float texture formats X-Git-Tag: upstream/17.1.0~15732 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb758b892a7e62ff1f6187f2ca9ac543ff70a096;p=platform%2Fupstream%2Fmesa.git st/mesa: try PIPE_BIND_RENDER_TARGET when choosing float texture formats For 8-bit RGB(A) texture formats we set the PIPE_BIND_RENDER_TARGET flag to try to get a hardware format which also supports rendering (for FBO textures). Do the same thing for floating point formats. This allows the Redway3D Flat demo to run. Cc: 10.6 11.0 Reviewed-by: Marek Olšák Reviewed-by: Roland Scheidegger --- diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 0c94428..144b7d6 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -1963,7 +1963,11 @@ st_ChooseTextureFormat(struct gl_context *ctx, GLenum target, else if (internalFormat == 3 || internalFormat == 4 || internalFormat == GL_RGB || internalFormat == GL_RGBA || internalFormat == GL_RGB8 || internalFormat == GL_RGBA8 || - internalFormat == GL_BGRA) + internalFormat == GL_BGRA || + internalFormat == GL_RGB16F || + internalFormat == GL_RGBA16F || + internalFormat == GL_RGB32F || + internalFormat == GL_RGBA32F) bindings |= PIPE_BIND_RENDER_TARGET; /* GLES allows the driver to choose any format which matches