On Wed, 2015-11-11 at 17:26 -0800, Jason Ekstrand wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp 
> b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> index 974219f..dad541b 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
> @@ -680,7 +680,15 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg 
> dst, struct brw_reg src
>  
>     switch (dst.type) {
>     case BRW_REGISTER_TYPE_D:
> -      return_format = BRW_SAMPLER_RETURN_FORMAT_SINT32;
> +      /* SINT32 isn't actually allowed for TXS.  This isn't explicitly stated
> +       * in the PRM, but the i965 PRM explicitly lists UINT32 and FLOAT32 as
> +       * being valid for resinfo but not SINT32 (Vol. 4 Section 4.8.1.1).
> +       * Emperical testing has also verified this.

Empirical

> +       */

Actually, I only see UINT32. For example, from the IVB PRM, volume 4,
part 1, page 130:

"The surface indicated in the surface state is not sampled. Instead, the
width, height, depth, and MIP count of the surface are returned as
indicated in the table below. The format of the returned data is UINT32"

I see the same text for HSW and BDW. Either way:

Reviewed-by: Iago Toral Quiroga <ito...@igalia.com>


> +      if (inst->opcode == SHADER_OPCODE_TXS)
> +         return_format = BRW_SAMPLER_RETURN_FORMAT_UINT32;
> +      else
> +         return_format = BRW_SAMPLER_RETURN_FORMAT_SINT32;
>        break;
>     case BRW_REGISTER_TYPE_UD:
>        return_format = BRW_SAMPLER_RETURN_FORMAT_UINT32;


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to