<p dir="ltr"><br>
On Nov 13, 2015 5:49 AM, "Iago Toral" <<a href="mailto:itoral@igalia.com">itoral@igalia.com</a>> wrote:<br>
><br>
> On Wed, 2015-11-11 at 17:26 -0800, Jason Ekstrand wrote:<br>
> > ---<br>
> > src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 10 +++++++++-<br>
> > 1 file changed, 9 insertions(+), 1 deletion(-)<br>
> ><br>
> > diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp<br>
> > index 974219f..dad541b 100644<br>
> > --- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp<br>
> > +++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp<br>
> > @@ -680,7 +680,15 @@ fs_generator::generate_tex(fs_inst *inst, struct brw_reg dst, struct brw_reg src<br>
> ><br>
> > switch (dst.type) {<br>
> > case BRW_REGISTER_TYPE_D:<br>
> > - return_format = BRW_SAMPLER_RETURN_FORMAT_SINT32;<br>
> > + /* SINT32 isn't actually allowed for TXS. This isn't explicitly stated<br>
> > + * in the PRM, but the i965 PRM explicitly lists UINT32 and FLOAT32 as<br>
> > + * being valid for resinfo but not SINT32 (Vol. 4 Section 4.8.1.1).<br>
> > + * Emperical testing has also verified this.<br>
><br>
> Empirical<br>
><br>
> > + */<br>
><br>
> Actually, I only see UINT32. For example, from the IVB PRM, volume 4,<br>
> part 1, page 130:<br>
><br>
> "The surface indicated in the surface state is not sampled. Instead, the<br>
> width, height, depth, and MIP count of the surface are returned as<br>
> indicated in the table below. The format of the returned data is UINT32"<br>
><br>
> I see the same text for HSW and BDW. Either way:<br>
><br>
> Reviewed-by: Iago Toral Quiroga <<a href="mailto:itoral@igalia.com">itoral@igalia.com</a>></p>
<p dir="ltr">It's only gen 4-5 where you get any choice. At least on gen4, you can ask for it in float and the hardware will, supposedly do that. However, there's no real point. I can change it to just always stomp resinfo to uint32.<br>
--Jason</p>
<p dir="ltr">><br>
> > + if (inst->opcode == SHADER_OPCODE_TXS)<br>
> > + return_format = BRW_SAMPLER_RETURN_FORMAT_UINT32;<br>
> > + else<br>
> > + return_format = BRW_SAMPLER_RETURN_FORMAT_SINT32;<br>
> > break;<br>
> > case BRW_REGISTER_TYPE_UD:<br>
> > return_format = BRW_SAMPLER_RETURN_FORMAT_UINT32;<br>
><br>
><br>
</p>