diff options
author | Brian Paul <[email protected]> | 2015-09-24 09:36:44 -0600 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-10-07 14:45:34 +0100 |
commit | 531309a5f05a2b56cb9c30b1fbdd85233c275169 (patch) | |
tree | cd7c5ada23fb9ca6f3ce80962ced67706ef714b4 /src/mesa/state_tracker | |
parent | 0ae914f65d84fb49a227f7584e84a9aa5e2f270f (diff) |
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 <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
(cherry picked from commit cb758b892a7e62ff1f6187f2ca9ac543ff70a096)
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_format.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index f582166e7a9..2b88c309e7f 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -1960,7 +1960,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 |