Francisco Jerez <curroje...@riseup.net> writes: > Matt Turner <matts...@gmail.com> writes: > >> ... instead of assert failing. Can only happen when the program has an >> unconditional infinite loop. > > I'm curious how the framebuffer write gets eliminated, I don't think DCE > is smart enough currently to find out that the FB write is unreachable? > Ah, I guess this is supposed to prevent a regression from 'i965/cfg: Ignore non-CF instructions in unreachable blocks.' but is not currently an issue? Uhm...
>> --- >> Sigh. >> >> src/mesa/drivers/dri/i965/brw_fs.cpp | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp >> b/src/mesa/drivers/dri/i965/brw_fs.cpp >> index d1ac80a..08e9b6c 100644 >> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp >> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp >> @@ -2511,8 +2511,9 @@ fs_visitor::opt_sampler_eot() >> /* Look for a texturing instruction immediately before the final >> FB_WRITE. */ >> bblock_t *block = cfg->blocks[cfg->num_blocks - 1]; >> fs_inst *fb_write = (fs_inst *)block->end(); >> - assert(fb_write->eot); >> - assert(fb_write->opcode == FS_OPCODE_FB_WRITE_LOGICAL); >> + if (unlikely(!fb_write->eot) || >> + unlikely(fb_write->opcode != FS_OPCODE_FB_WRITE_LOGICAL)) >> + return false; >> > > Maybe we want something in between the two? Like: > > | if (unlikely(fb_write->opcode != FS_OPCODE_FB_WRITE_LOGICAL)) > | return false; > | > | assert(fb_write->eot); > > My thinking is that *if* the final instruction of the shader is a > framebuffer write it should have already been marked EOT during > translation. > >> /* There wasn't one; nothing to do. */ >> if (unlikely(fb_write->prev->is_head_sentinel())) >> -- >> 2.7.3 >> >> _______________________________________________ >> mesa-dev mailing list >> mesa-dev@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev