summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKarol Herbst <[email protected]>2019-01-16 15:17:31 +0100
committerIlia Mirkin <[email protected]>2019-02-07 21:51:45 -0500
commitcbd1ad6165f0aea7fb7c6fd1b36ad5317dd65cb7 (patch)
treea7c0f22a16426c96ba7e71cb4463a4967df2e834 /src/mesa
parent6010d7b8e8bee1bcea2b329cf6d3b44c5fc3ca66 (diff)
st/mesa: require RGBA2, RGB4, and RGBA4 to be renderable
If the driver does not support rendering to these formats but does support texturing, we can end up in incompatibilities between textures and renderbuffers that are then copied to. Fixes KHR-GL45.copy_image.functional on nvc0 Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Cc: 19.0 <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_format.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index aacb8788287..febde1a5e97 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -2356,6 +2356,8 @@ st_ChooseTextureFormat(struct gl_context *ctx, GLenum target,
bindings |= PIPE_BIND_DEPTH_STENCIL;
else if (is_renderbuffer || internalFormat == 3 || internalFormat == 4 ||
internalFormat == GL_RGB || internalFormat == GL_RGBA ||
+ internalFormat == GL_RGBA2 ||
+ internalFormat == GL_RGB4 || internalFormat == GL_RGBA4 ||
internalFormat == GL_RGB8 || internalFormat == GL_RGBA8 ||
internalFormat == GL_BGRA ||
internalFormat == GL_RGB16F ||