[Mesa-dev] [PATCH 1/9] nir: Fix constant evaluation of bfm.
Matt Turner
mattst88 at gmail.com
Mon Jan 11 16:07:40 PST 2016
On Mon, Jan 11, 2016 at 3:52 PM, Ian Romanick <idr at freedesktop.org> wrote:
> On 01/11/2016 02:48 PM, Matt Turner wrote:
>> NIR's bfm, like Intel/AMD's hardware instructions and GLSL IR's
>> ir_binop_bfm takes <bits> as src0 and <offset> as src1.
>
> All the questions...
>
> Is the ordering of the operands documented anywhere? I was only able to
> deduce this by looking at glsl_to_nir.cpp (and then
> ir_constant_expression.cpp). Also notice that ir_binop_bfm is also
> woefully underdocumented. :(
Nope. I had a patch that documented the GLSL IR opcode but we decided
to just remove it (along with bfi) instead.
> Is there a test case that hits this?
Yes, when working on this series, the lack of this patch caused
tests/spec/arb_gpu_shader5/execution/built-in-functions/fs-ldexp.shader_test
to fail.
> It looks like this code has existed since January 2015. Should this be
> tagged for stable?
I think it would have been basically impossible to hit -- you'd have
to have code that NIR could optimize but not GLSL IR since GLSL IR
also had constant evaluation support.
> Either way, this patch is
>
> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Thanks.
More information about the mesa-dev
mailing list