summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorKarol Herbst <[email protected]>2019-01-16 15:17:31 +0100
committerDylan Baker <[email protected]>2019-02-12 14:19:52 -0800
commitab70eccc75ecf90f82d5e69c4db39226774ddfa5 (patch)
tree575d731f67e2a8637337391e852e14db4c85402c /src/mesa/state_tracker
parent24bb2771b648340011ec3913bf15b2785c4c2ee2 (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]> (cherry picked from commit cbd1ad6165f0aea7fb7c6fd1b36ad5317dd65cb7)
Diffstat (limited to 'src/mesa/state_tracker')
-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 ||