mesa/src
Kenneth Graunke 82ee30e558 intel/eu: Handle compaction when inserting validation errors
When the EU validator encountered an error, it would add an annotation
to the disassembly.  Unfortunately, the code to insert an error assumed
that the next instruction would start at (offset + sizeof(brw_inst)),
which is not true if the instruction with an error is compacted.

This could lead to cascading disassembly errors, where we started trying
to decode the next instruction at the wrong offset, and getting lots of
scary looking output:

   ERROR: Register Regioning patterns where [...]
   (-f0.1.any16h) illegal(*** invalid execution size value 6 )      { align1 $7.src atomic };
   (+f0.1.any16h) illegal.sat(*** invalid execution size value 6 )  { align1 $9.src AccWrEnable };
   illegal(*** invalid execution size value 6 )                     { align1 $11.src };
   (+f0.1) illegal.sat(*** invalid execution size value 6 )         { align1 F@2 AccWrEnable };
   (+f0.1) illegal.sat(*** invalid execution size value 6 )         { align1 F@2 AccWrEnable };
   (+f0.1) illegal.sat(*** invalid execution size value 6 )         { align1 $15.src AccWrEnable };
   illegal(*** invalid execution size value 6 )                     { align1 $15.src };
   (+f0.1) illegal.sat.g.f0.1(*** invalid execution size value 6 )  { align1 $13.src AccWrEnable };

Only the first instruction was actually wrong - the rest are just a
result of starting the disassembler at the wrong offset.  Trash ensues!

To fix this, just pass the instruction size in a few layers so we can
record the next offset properly.

Cc: mesa-stable
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17624>
2022-07-28 21:31:45 +00:00
..
amd util/list: rename LIST_ENTRY() to list_entry() 2022-07-28 10:10:44 +00:00
android_stub
asahi panfrost,asahi: Use util_sign_extend for unpacking 2022-07-06 11:23:18 +00:00
broadcom v3dv: expose Vulkan 1.2 2022-07-28 11:18:57 +00:00
c11 c11: reinstate the original license and authorship 2022-06-27 11:46:22 +00:00
compiler util/list: rename LIST_ENTRY() to list_entry() 2022-07-28 10:10:44 +00:00
drm-shim drm-shim: Cleanup on device file close 2022-05-02 19:50:33 +00:00
egl dri: add [ax]bgr16161616 to format lookup tables 2022-07-27 07:27:10 +00:00
etnaviv util/list: rename LIST_ENTRY() to list_entry() 2022-07-28 10:10:44 +00:00
freedreno util/list: rename LIST_ENTRY() to list_entry() 2022-07-28 10:10:44 +00:00
gallium virgL: lower fneg and fabs 2022-07-28 21:20:20 +00:00
gbm gbm: add GBM_FORMAT_[AX]BGR16161616 2022-07-27 07:27:10 +00:00
getopt
glx build(glx): Fix build by adding missing deps 2022-07-18 21:12:26 +00:00
gtest gtest: Fix maybe-uninitialized compiler warning 2022-06-29 21:02:18 +00:00
hgl
imagination pvr: Move BRN 44079, 48492 and 66011 code into pvrsrvkm specific directory 2022-07-27 10:13:19 +00:00
imgui
intel intel/eu: Handle compaction when inserting validation errors 2022-07-28 21:31:45 +00:00
loader dri: add [ax]bgr16161616 to format lookup tables 2022-07-27 07:27:10 +00:00
mapi Fix static glapi on Windows 2022-07-14 20:01:22 +00:00
mesa mesa/st: disable unrestricted fragment depth values for GL/GLES 2022-07-28 10:35:04 +10:00
microsoft dzn: Retrieve validator version 2022-07-23 14:48:17 +00:00
nouveau nir: Split usub_sat lowering flag from uadd_sat. 2022-07-22 17:54:28 +00:00
panfrost util/list: rename LIST_ENTRY() to list_entry() 2022-07-28 10:10:44 +00:00
tool meson/pps: Check if libdrm exists to compile pps 2022-06-22 11:52:36 +03:00
util util/reallocarray: add errno.h include. 2022-07-29 06:47:28 +10:00
virtio venus: add support for VK_KHR_dynamic_rendering 2022-07-23 01:14:22 +00:00
vulkan vulkan: Include self-dep info in rendering continues 2022-07-26 17:47:20 +00:00
meson.build meson: Use cc.get_argument_syntax instead cc.get_id when possible. 2022-06-16 19:59:58 +00:00