[Mesa-dev] [PATCH v2 8/8] i965/fs: Allow copy propagating into new surface access opcodes

Francisco Jerez currojerez at riseup.net
Fri Oct 23 04:43:48 PDT 2015


Kristian Høgsberg Kristensen <krh at bitplanet.net> writes:

> Signed-off-by: Kristian Høgsberg Kristensen <krh at bitplanet.net>
> ---
>  src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> index 5589716..97e206d 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
> @@ -612,6 +612,21 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry)
>           }
>           break;
>  
> +      case SHADER_OPCODE_UNTYPED_ATOMIC:
> +      case SHADER_OPCODE_UNTYPED_SURFACE_READ:
> +      case SHADER_OPCODE_UNTYPED_SURFACE_WRITE:
> +      case SHADER_OPCODE_TYPED_ATOMIC:
> +      case SHADER_OPCODE_TYPED_SURFACE_READ:
> +      case SHADER_OPCODE_TYPED_SURFACE_WRITE:
> +         /* We only propagate into the surface argument of the
> +          * instruction. Everything else goes through LOAD_PAYLOAD.
> +          */
> +         if (i == 1) {
> +            inst->src[i] = val;
> +            progress = true;
> +         }
> +         break;
> +

Reviewed-by: Francisco Jerez <currojerez at riseup.net>

>        case FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD:
>        case SHADER_OPCODE_BROADCAST:
>           inst->src[i] = val;
> -- 
> 2.6.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151023/402e4664/attachment.sig>


More information about the mesa-dev mailing list