We can do this when the surface index is an immediate, as we do for reads. Otherwise the visitor should handle this. --- Francisco, maybe you choose not to do this for a reason? It seems a bit inconsistent with the reads though. Also, other read/write messages seem to mark surfaces in the generator when the surface index is an immediate and leave the visitor to handle non-immediate scenarios.
src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp index b8b8ed1..cf4b9ae 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp @@ -2247,6 +2247,8 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width) assert(src[2].file == BRW_IMMEDIATE_VALUE); brw_untyped_surface_write(p, src[0], src[1], inst->mlen, src[2].dw1.ud); + if (src[1].file == BRW_IMMEDIATE_VALUE) + brw_mark_surface_used(prog_data, src[1].dw1.ud); break; case SHADER_OPCODE_TYPED_ATOMIC: -- 1.9.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev