Mesa (master): mesa: create multisample fallback textures like normal textures

Marek Olšák mareko at kemper.freedesktop.org
Wed Aug 26 13:46:33 UTC 2015


Module: Mesa
Branch: master
Commit: f432ae899fb81468778dbeb17ac7615da3ed5c0d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f432ae899fb81468778dbeb17ac7615da3ed5c0d

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Mon Aug 24 00:22:37 2015 +0200

mesa: create multisample fallback textures like normal textures

This works if drivers upsample on upload (like all radeon ones do).
The alternative is an unexpected GL error from anything calling
_mesa_update_state and possibly other issues.

Cc: 10.6 11.0 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied at redhat.com>

---

 src/mesa/main/texstore.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index fc83310..5394026 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -1004,6 +1004,7 @@ store_texsubimage(struct gl_context *ctx,
    /* compute slice info (and do some sanity checks) */
    switch (target) {
    case GL_TEXTURE_2D:
+   case GL_TEXTURE_2D_MULTISAMPLE:
    case GL_TEXTURE_RECTANGLE:
    case GL_TEXTURE_CUBE_MAP:
    case GL_TEXTURE_EXTERNAL_OES:
@@ -1025,6 +1026,7 @@ store_texsubimage(struct gl_context *ctx,
       srcImageStride = _mesa_image_row_stride(packing, width, format, type);
       break;
    case GL_TEXTURE_2D_ARRAY:
+   case GL_TEXTURE_2D_MULTISAMPLE_ARRAY:
       numSlices = depth;
       sliceOffset = zoffset;
       depth = 1;




More information about the mesa-commit mailing list