i965: Support copy propagating of untyped atomic surface indexes.

In the vec4 backend, SHADER_OPCODE_UNTYPED_ATOMIC's src[1] is the
surface index.  We want to copy propagate so we can use an immediate
message descriptor, rather than an indirect send.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Kenneth Graunke 2017-09-24 12:42:52 -07:00
parent 66342c997f
commit a553eb0fdf
1 changed files with 7 additions and 0 deletions

View File

@ -190,6 +190,13 @@ try_constant_propagate(const struct gen_device_info *devinfo,
inst->src[arg] = value;
return true;
case SHADER_OPCODE_UNTYPED_ATOMIC:
if (arg == 1) {
inst->src[arg] = value;
return true;
}
break;
case SHADER_OPCODE_POW:
case SHADER_OPCODE_INT_QUOTIENT:
case SHADER_OPCODE_INT_REMAINDER: