diff options
| author | marha <marha@users.sourceforge.net> | 2015-04-30 23:26:47 +0200 |
|---|---|---|
| committer | marha <marha@users.sourceforge.net> | 2015-04-30 23:29:47 +0200 |
| commit | 055e5645a789d2822d3c4e5a3bc81ff6a969ff31 (patch) | |
| tree | 8a923f19c3586f9341114be6c81784ab9018aef8 /mesalib/src/mesa/state_tracker/st_format.c | |
| parent | 0f7871ff824bcf064db3ab6bdfe26645ba6c8087 (diff) | |
| parent | a71d524ecad48837e0124a03124bc05f59a48be7 (diff) | |
| download | vcxsrv-055e5645a789d2822d3c4e5a3bc81ff6a969ff31.tar.gz vcxsrv-055e5645a789d2822d3c4e5a3bc81ff6a969ff31.tar.bz2 vcxsrv-055e5645a789d2822d3c4e5a3bc81ff6a969ff31.zip | |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_format.c')
| -rw-r--r-- | mesalib/src/mesa/state_tracker/st_format.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_format.c b/mesalib/src/mesa/state_tracker/st_format.c index 72dbf3bd4..181465dd8 100644 --- a/mesalib/src/mesa/state_tracker/st_format.c +++ b/mesalib/src/mesa/state_tracker/st_format.c @@ -1942,11 +1942,6 @@ st_ChooseTextureFormat(struct gl_context *ctx, GLenum target, GLint internalFormat, GLenum format, GLenum type) { - const boolean want_renderable = - internalFormat == 3 || internalFormat == 4 || - internalFormat == GL_RGB || internalFormat == GL_RGBA || - internalFormat == GL_RGB8 || internalFormat == GL_RGBA8 || - internalFormat == GL_BGRA; struct st_context *st = st_context(ctx); enum pipe_format pFormat; unsigned bindings; @@ -1962,15 +1957,17 @@ st_ChooseTextureFormat(struct gl_context *ctx, GLenum target, } /* GL textures may wind up being render targets, but we don't know - * that in advance. Specify potential render target flags now. + * that in advance. Specify potential render target flags now for formats + * that we know should always be renderable. */ bindings = PIPE_BIND_SAMPLER_VIEW; - if (want_renderable) { - if (_mesa_is_depth_or_stencil_format(internalFormat)) - bindings |= PIPE_BIND_DEPTH_STENCIL; - else + if (_mesa_is_depth_or_stencil_format(internalFormat)) + bindings |= PIPE_BIND_DEPTH_STENCIL; + else if (internalFormat == 3 || internalFormat == 4 || + internalFormat == GL_RGB || internalFormat == GL_RGBA || + internalFormat == GL_RGB8 || internalFormat == GL_RGBA8 || + internalFormat == GL_BGRA) bindings |= PIPE_BIND_RENDER_TARGET; - } /* GLES allows the driver to choose any format which matches * the format+type combo, because GLES only supports unsized internal |
