X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fdrivers%2Fdri%2Fi965%2Fbrw_fs.cpp;h=3414d92efdecf8f63a35fd91db346800399bdf2b;hb=bfdae9149e00bd5c2521db3e75669ae043eed5cc;hp=b2701b896892e5c0bb3de6c8edddd2f463273367;hpb=abf3fefa1aa734844e0ca8e95e8c3a501909aa33;p=mesa.git diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index b2701b89689..3414d92efde 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2658,6 +2658,16 @@ fs_visitor::opt_sampler_eot() if (unlikely(tex_inst->is_head_sentinel()) || !tex_inst->is_tex()) return false; + /* This optimisation doesn't seem to work for textureGather for some + * reason. I can't find any documentation or known workarounds to indicate + * that this is expected, but considering that it is probably pretty + * unlikely that a shader would directly write out the results from + * textureGather we might as well just disable it. + */ + if (tex_inst->opcode == SHADER_OPCODE_TG4 || + tex_inst->opcode == SHADER_OPCODE_TG4_OFFSET) + return false; + /* If there's no header present, we need to munge the LOAD_PAYLOAD as well. * It's very likely to be the previous instruction. */