diff options
author | Jason Ekstrand <[email protected]> | 2017-06-17 13:50:30 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-09-15 10:58:55 -0700 |
commit | a43d379000260485fc4b2b03b069aedc46879557 (patch) | |
tree | dd3690b48818af81c038fd99ceccbc96547b45b6 /src/mesa | |
parent | 1bbe18087312e1b8ccdba6ca6dd8f1c9740a8454 (diff) |
i965/blorp: Set r8stencil_needs_update when writing stencil
This fixes a crash on Haswell when we try to upload a stencil texture
with blorp. It would also be a problem if someone tried to texture from
stencil after glBlitFramebuffers.
Cc: "17.2 17.1" <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c index 4c6ae369196..0c58e74b67d 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.c +++ b/src/mesa/drivers/dri/i965/brw_blorp.c @@ -135,6 +135,8 @@ blorp_surf_for_miptree(struct brw_context *brw, unsigned start_layer, unsigned num_layers, struct isl_surf tmp_surfs[1]) { + const struct gen_device_info *devinfo = &brw->screen->devinfo; + if (mt->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY) { const unsigned num_samples = mt->surf.samples; for (unsigned i = 0; i < num_layers; i++) { @@ -163,6 +165,10 @@ blorp_surf_for_miptree(struct brw_context *brw, else if (mt->hiz_buf) aux_surf = &mt->hiz_buf->surf; + if (mt->format == MESA_FORMAT_S_UINT8 && is_render_target && + devinfo->gen <= 7) + mt->r8stencil_needs_update = true; + if (surf->aux_usage == ISL_AUX_USAGE_HIZ && !intel_miptree_level_has_hiz(mt, *level)) surf->aux_usage = ISL_AUX_USAGE_NONE; |