[Mesa-dev] [PATCH 0/9] i965 assembly validator
Kenneth Graunke
kenneth at whitecape.org
Tue Nov 3 23:54:58 PST 2015
On Wednesday, October 21, 2015 03:58:08 PM Matt Turner wrote:
> Inspired by a bug this summer, I've written a basic assembly validation
> pass. The series currently checks only three things:
>
> - that instruction sources are not null (when they shouldn't be);
> - that the Gen supports the instruction opcode; and
> - that the various accumulator restrictions are satisfied.
>
> To do this, I add a bit of infrastructure to the annotation system, to
> allow errors to be printed.
>
> In debug builds, an assertion checks that the assembly was validated.
> When using INTEL_DEBUG=<shader stage>, ERROR: ... will be emitted
> following a bad instruction, with a hopefully helpful message describing
> what's wrong. For example:
>
> mov(8) g116<1>.xUD null
> ERROR: src0 is null
> [...]
> shader_runner: ../../../../../../mesa/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp:1671: void brw::vec4_generator::generate_code(const cfg_t*, const nir_shader*): Assertion `validated' failed.
>
> I'd like to extend the validator to cover many more cases, but that's
> no reason to hold back what I've already written -- checking for null
> source would have saved three people a week or two after all.
[PATCH 1/9] ralloc: Set *start in ralloc_vasprintf_rewrite_tail() if str is NULL.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
[PATCH 2/9] i965: Fill out instruction list.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
[PATCH 3/9] i965: Don't consider control flow instructions to have sources.
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
[PATCH 4/9] i965: Set annotation_info's mem_ctx.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
[PATCH 5/9] i965: Combine assembly annotations if possible.
With a fix,
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
[PATCH 6/9] i965: Add annotation_insert_error() and support for printing errors.
I would like to see a v2.
[PATCH 7/9] i965: Add initial assembly validation pass.
I sent suggestions, but gave a
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
[PATCH 8/9] i965: Check instructions appear only on supported hardware.
Tiny comment. Either way,
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
[PATCH 9/9] i965: Check accumulator restrictions.
Sent feedback. Probably best to see a v2.
-------------- 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/20151103/68b35521/attachment.sig>
More information about the mesa-dev
mailing list