[Mesa-dev] [PATCH 1/5] i965: Mark UB/B immediates as unreachable.

Kenneth Graunke kenneth at whitecape.org
Wed Feb 4 12:22:48 PST 2015


On Friday, January 30, 2015 03:54:28 PM Matt Turner wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_shader.cpp | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
> index 678390e..c393bfc 100644
> --- a/src/mesa/drivers/dri/i965/brw_shader.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
> @@ -602,11 +602,8 @@ brw_saturate_immediate(enum brw_reg_type type, struct brw_reg *reg)
>        sat_imm.f = CLAMP(imm.f, 0.0f, 1.0f);
>        break;
>     case BRW_REGISTER_TYPE_UB:
> -      sat_imm.ud = CLAMP(imm.ud, 0, UCHAR_MAX);
> -      break;
>     case BRW_REGISTER_TYPE_B:
> -      sat_imm.d = CLAMP(imm.d, CHAR_MIN, CHAR_MAX);
> -      break;
> +      unreachable("no UB/B immediates");
>     case BRW_REGISTER_TYPE_V:
>     case BRW_REGISTER_TYPE_UV:
>     case BRW_REGISTER_TYPE_VF:
> 

Please justify this change in your commit message - it's not immediately
obvious.  Does the GPU not allow saturate on B/UB values?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150204/98f99c92/attachment.sig>


More information about the mesa-dev mailing list