[Mesa-dev] NIR Debugging Tips

2021-02-25 Thread Tommy Chou
Hi,

Could I get some tips on figuring out what the NIR intrinsics
do, specifically the vulkan related ones? Also, what is the debug
strategy that is used to debug NIR shaders to check if the implementation
is correct?

Thanks,
Tommy
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] NIR Debugging Tips

2021-02-25 Thread Jason Ekstrand
Hi Tommy,

As you've probably noticed already, Mesa documentation is sparse at
best.  For NIR, the best places to go are:

 1. For ALU ops, nir_opcodes.py defines the opcodes as well as a C
snippet which describes the opcode's semantics
 2. For all intrinsics, nir_intrinsics.py defines them and typically
has some sort of description for each.  How good it is very much
depends on the op.

> Also, what is the debug strategy that is used to debug NIR shaders to check 
> if the implementation is correct?

What do you mean?  Debugging back-end drivers?  That's typically done
by running piglit (OpenGL test suite) or CTS tests from one of the
Khronos test suites.

Debugging NIR passes?  Typically the same on your favorite hardware.
The Mesa GitLab CI system will test on a pretty broad spread of
hardware so you can use that once you have it working locally.

--Jason

On Thu, Feb 25, 2021 at 3:39 AM Tommy Chou  wrote:
>
> Hi,
>
> Could I get some tips on figuring out what the NIR intrinsics do, 
> specifically the vulkan related ones? Also, what is the debug strategy that 
> is used to debug NIR shaders to check if the implementation is correct?
>
> Thanks,
> Tommy
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev