[Mesa-dev] [PATCH] i965/vs: Fix implied_mrf_writes() for integer division.

Kenneth Graunke kenneth at whitecape.org
Tue May 28 18:58:57 PDT 2013


On 05/28/2013 04:12 PM, Eric Anholt wrote:
> Previously it would assertion fail in debug builds (though the correct
> value was returned in a non-debug build).
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64727
> ---
>   src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> index c5aa338..4295e6e 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> @@ -247,6 +247,8 @@ vec4_visitor::implied_mrf_writes(vec4_instruction *inst)
>      case SHADER_OPCODE_SIN:
>      case SHADER_OPCODE_COS:
>         return 1;
> +   case SHADER_OPCODE_INT_QUOTIENT:
> +   case SHADER_OPCODE_INT_REMAINDER:
>      case SHADER_OPCODE_POW:
>         return 2;
>      case VS_OPCODE_URB_WRITE:

How terribly embarassing!

NOTE: This is a candidate for stable branches.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the mesa-dev mailing list