diff options
author | Jordan Justen <[email protected]> | 2016-07-06 15:50:34 -0700 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2016-08-26 10:09:22 -0700 |
commit | c8194dc737464d19521c948aa555d936f47f381a (patch) | |
tree | a60f17a3fce2fd560ca779eadadc97e8d0908638 | |
parent | 101b56bab26d13691cde877075fb13554ac780f9 (diff) |
i965: Track that the stencil data was updated when using Tex*Image
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Topi Pohjolainen <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_image.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_tex_subimage.c | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_image.c b/src/mesa/drivers/dri/i965/intel_tex_image.c index 958f8bd5a5f..7affe08c808 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_image.c +++ b/src/mesa/drivers/dri/i965/intel_tex_image.c @@ -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, diff --git a/src/mesa/drivers/dri/i965/intel_tex_subimage.c b/src/mesa/drivers/dri/i965/intel_tex_subimage.c index 9561968d2d6..74d4c57391d 100644 --- a/src/mesa/drivers/dri/i965/intel_tex_subimage.c +++ b/src/mesa/drivers/dri/i965/intel_tex_subimage.c @@ -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), |