[Mesa-dev] [PATCH] i965/fs: Fix broken math on values loaded from uniform buffers on gen6.

Kenneth Graunke kenneth at whitecape.org
Wed Feb 20 20:39:26 PST 2013


On 02/20/2013 06:39 PM, Eric Anholt wrote:
> In a debug build this led to assertion failures, but on a non-debug
> build the hardware would just reference the whole vec8 instead of the
> same channel 8 times.
>
> Fixes the new piglit glsl-1.40/uniform-buffer/fs-exp2.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57121
> Note: This is a candidate for the stable branches
> ---
>   src/mesa/drivers/dri/i965/brw_fs.cpp |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
> index f3232b2..e53de66 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
> @@ -1929,6 +1929,7 @@ fs_visitor::register_coalesce()
>
>         bool has_source_modifiers = (inst->src[0].abs ||
>                                      inst->src[0].negate ||
> +                                   inst->src[0].smear != -1 ||
>                                      inst->src[0].file == UNIFORM);
>
>         /* Found a move of a GRF to a GRF.  Let's see if we can coalesce

Looks reasonable to me.  I've thought about making a 
fs_inst::has_source_modifiers() method.  It could be used here and in 
try_copy_propagate().

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the mesa-dev mailing list