[Mesa-dev] [PATCH 04/41] i965/fs: Make half() divide the register width by 2 and use it more

Matt Turner mattst88 at gmail.com
Tue Sep 23 10:25:02 PDT 2014


On Sat, Sep 20, 2014 at 10:22 AM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_fs.cpp | 14 ++++++++++----
>  src/mesa/drivers/dri/i965/brw_fs.h   |  4 +++-
>  2 files changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index 67bb529..4443cc6 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -1314,6 +1314,7 @@ fs_visitor::compute_sample_position(fs_reg dst, fs_reg int_sample_pos)
>  fs_reg *
>  fs_visitor::emit_samplepos_setup()
>  {
> +   fs_inst *inst;
>     assert(brw->gen >= 6);
>
>     this->current_annotation = "compute sample position";
> @@ -1337,8 +1338,10 @@ fs_visitor::emit_samplepos_setup()
>        stride(retype(brw_vec1_grf(payload.sample_pos_reg, 0),
>                      BRW_REGISTER_TYPE_B), 16, 8, 2);
>
> -   fs_inst *inst = emit(MOV(int_sample_x, fs_reg(sample_pos_reg)));

I'd leave the fs_inst *inst declaration here by just removing the
initializer, and remove the one you added above.


More information about the mesa-dev mailing list