i965: Track that the stencil data was updated when using Tex*Image
authorJordan Justen <jordan.l.justen@intel.com>
Wed, 6 Jul 2016 22:50:34 +0000 (15:50 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Fri, 26 Aug 2016 17:09:22 +0000 (10:09 -0700)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/intel_tex_image.c
src/mesa/drivers/dri/i965/intel_tex_subimage.c

index 958f8bd5a5f8601a4ddd21df7b516c5d47a4c1c7..7affe08c808ad3b05498e0130bf9af2b66ef5ed6 100644 (file)
@@ -108,6 +108,9 @@ intelTexImage(struct gl_context * ctx,
 
    assert(intelImage->mt);
 
+   if (intelImage->mt->format == MESA_FORMAT_S_UINT8)
+      intelImage->mt->r8stencil_needs_update = true;
+
    ok = _mesa_meta_pbo_TexSubImage(ctx, dims, texImage, 0, 0, 0,
                                    texImage->Width, texImage->Height,
                                    texImage->Depth,
index 9561968d2d6f4809c408edbc977b52c6dd9b60ec..74d4c57391d0c5a8c9f427a97eec305dc8b08472 100644 (file)
@@ -199,10 +199,13 @@ intelTexSubImage(struct gl_context * ctx,
                  const GLvoid * pixels,
                  const struct gl_pixelstore_attrib *packing)
 {
-   struct intel_texture_image *intelImage = intel_texture_image(texImage);
+   struct intel_mipmap_tree *mt = intel_texture_image(texImage)->mt;
    bool ok;
 
-   bool tex_busy = intelImage->mt && drm_intel_bo_busy(intelImage->mt->bo);
+   bool tex_busy = mt && drm_intel_bo_busy(mt->bo);
+
+   if (mt && mt->format == MESA_FORMAT_S_UINT8)
+      mt->r8stencil_needs_update = true;
 
    DBG("%s mesa_format %s target %s format %s type %s level %d %dx%dx%d\n",
        __func__, _mesa_get_format_name(texImage->TexFormat),