Mesa (master): i965: Fix KHR_blend_equation_advanced with some render targets.

Francisco Jerez currojerez at kemper.freedesktop.org
Sun Feb 25 00:34:14 UTC 2018


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

Author: Francisco Jerez <currojerez at riseup.net>
Date:   Tue Feb 13 14:16:03 2018 -0800

i965: Fix KHR_blend_equation_advanced with some render targets.

This reverts two bogus and seemingly useless changes from the commits
referenced below, which broke KHR_blend_equation_advanced (and
EXT_shader_framebuffer_fetch_non_coherent which wasn't exposed yet)
for any kind of render target surface that would cause the
get_isl_surf() call in brw_emit_surface_state() to do anything useful
(notice how the result of get_isl_surf() is completely ignored by the
caller right now), as was the case while using those extensions with
1D array or 3D framebuffers in particular.

Fixes: f5859b45b1686e8116380d87 "i965/miptree: Switch remaining surfaces to isl"
Fixes: bf24c3539e4b6989512968ca "i965/miptree: Clean-up unused"
Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Plamena Manolova <plamena.manolova at intel.com>

---

 src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 0b6016427b..32d9e2c70f 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -89,6 +89,8 @@ get_isl_surf(struct brw_context *brw, struct intel_mipmap_tree *mt,
    const enum isl_dim_layout dim_layout =
       get_isl_dim_layout(devinfo, mt->surf.tiling, target);
 
+   surf->dim = get_isl_surf_dim(target);
+
    if (surf->dim_layout == dim_layout)
       return;
 
@@ -184,7 +186,7 @@ brw_emit_surface_state(struct brw_context *brw,
                                  brw->isl_dev.ss.align,
                                  surf_offset);
 
-   isl_surf_fill_state(&brw->isl_dev, state, .surf = &mt->surf, .view = &view,
+   isl_surf_fill_state(&brw->isl_dev, state, .surf = &surf, .view = &view,
                        .address = brw_state_reloc(&brw->batch,
                                                   *surf_offset + brw->isl_dev.ss.addr_offset,
                                                   mt->bo, offset, reloc_flags),




More information about the mesa-commit mailing list