Sagar Ghuge
a064e8ff29
intel/decoder: Bump the binding table guess value to 32
...
Let's bump the binding table value guess to 32 instead of 8 and also stop
decoding the binding table entries as soon as we hit the zero
initialized value in the map.
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22221 >
2023-03-31 01:01:53 +00:00
Lionel Landwerlin
5b79745b04
intel/common: add a INTEL_DECODE variable to parameter decoder at runtime
...
Sometimes you want to diff 2 runs with INTEL_DEBUG=bat, but a tiny
allocation change can mess quite badly with offsets printed in the
decoding, making it hard to look at the diff with meld.
Fortunately our decoder can avoid printing offsets. We just need a
variable to specify that.
We still use the defaults specified by the driver but you can turn
things on/off with :
INTEL_DECODE=+color,-offsets,-floats INTEL_DEBUG=bat ./my_app
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20874 >
2023-01-24 15:15:17 +00:00
Lionel Landwerlin
31931754bc
intel/decoder: print out compute push constants
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20874 >
2023-01-24 15:15:17 +00:00
Daniil Tatianin
089ae08ab1
intel_batch_decoder: disasm shaders when decoding states besides VS
...
Previously only 'decode_vs_state' would dump the referenced shader,
which meant we completely ignored every other shader when decoding
the '3DSTATE_PIPELINED_POINTERS' command.
Move the program disassembly logic from 'decode_vs_state' into a
common 'disasm_program_from_group' helper and call it from every
other decode_*_state function, too.
Signed-off-by: Daniil Tatianin <99danilt@gmail.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19880 >
2022-11-21 10:00:32 +00:00
José Roberto de Souza
772dfd60ad
intel: Convert i915 engine type to intel in tools/ common/ and ds/
...
This ones were left to be done after initial conversion.
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18975 >
2022-10-15 20:04:51 +00:00
Kenneth Graunke
72e9843991
intel/compiler: Introduce a new brw_isa_info structure
...
This structure will contain the opcode mapping tables in the next
commit. For now, this is the mechanical change to plumb it into all
the necessary places, and it continues simply holding devinfo.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17309 >
2022-06-30 23:46:35 +00:00
Kenneth Graunke
b637f6c3db
intel/decoder: Fix binding table pointer decoding with large offsets
...
XeHP supports a 20:5 pointer format, so the offset can legitimately
be more than UINT16_MAX. Likewise, with 256B binding table mode on
Icelake/Tigerlake, we might have 18:8 pointers that exceed UINT16_MAX.
Thanks to Felix DeGrood for catching this!
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16538 >
2022-05-17 08:52:00 +00:00
Vitalii.Lomaka
1407a4db69
intel/batch-decoder: Fix uninitialized scalar variables
...
CID: 1498516
CID: 1498560
Signed-off-by: Vitalii Lomaka <vitalii.lomaka@globallogic.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15685 >
2022-04-08 18:35:34 +00:00
Kenneth Graunke
9bc97e4fc1
intel/decoder: Fix decoder handling of binding table pool alloc on XeHP
...
3DSTATE_BINDING_TABLE_POOL_ALLOC no longer has a "Binding Table Pool
Enable" bit. It is always enabled.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15625 >
2022-03-29 02:35:54 -07:00
Dave Airlie
d051854cca
treewide: drop mtypes/macros includes from main
...
These aren't required in lots of places, so remove them.
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14127 >
2021-12-08 22:14:45 +00:00
Marcin Ślusarz
bba26939b1
intel/decoder: Dump Task/Mesh shaders
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Acked-by: Jordan Justen <jordan.l.justen@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13657 >
2021-11-04 21:01:13 +00:00
Dave Airlie
929db0a818
intel/decode/gfx6: add support for gfx6 CC/VIEWPORT pointers.
...
These have 3 sub states encoded and valid fields on SNB.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12864 >
2021-09-16 05:13:16 +10:00
Dave Airlie
e79a78a16f
intel/decode: add gfx4 vertex shader decode
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12160 >
2021-08-02 07:23:58 +10:00
Dave Airlie
0dec873f2a
intel/decode: add gfx4 constant buffer decode
...
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12160 >
2021-08-02 07:23:38 +10:00
Marcin Ślusarz
b6843d990b
intel/tools/aubinator_error_decode: tag hanging instruction
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11957 >
2021-07-21 08:20:06 +00:00
Marcin Ślusarz
365c7cc87c
intel/decoder: add assert for register size
...
Coverity complains about out-of-bounds access in
intel_field_iterator_init, because it doesn't know that the GT_MODE
register has a size of 4 bytes. Add an assertion to verify that.
CID: 1474552
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11574 >
2021-06-28 09:31:41 +00:00
Dave Airlie
f3630548f1
crocus: initial gallium driver for Intel gfx 4-7
...
This is a gallium driver for the Intel gfx 4-7 GPUs.
It was initially cloned from the iris driver by Ilia Mirkin,
then I ported over large reams of code from i965 until it worked.
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11146 >
2021-06-14 06:34:05 +10:00
Dave Airlie
4de8ba15b4
intel/decode: handle gen4/5 WM state fragment shaders
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11146 >
2021-06-14 06:05:17 +10:00
Dave Airlie
922f71b819
intel/decoder: add gen4/5 geometry state decode
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10642 >
2021-05-05 07:28:34 +00:00
Dave Airlie
d91d3613ad
intel/decoder: fixup batch decoder for binding tables on gen4/5
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10642 >
2021-05-05 07:28:34 +00:00
Lionel Landwerlin
4dcfb18a82
intel/decoder: decode CPS_STATE
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7455 >
2021-05-02 20:20:06 +00:00
Marcin Ślusarz
c073648d80
intel/batch_decoder: set foreground color of decoded instructions
...
It's impossible to see the names of instructions if the terminal's
color scheme uses black as foreground. Just set it to white - it
will look good on any color scheme.
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10341 >
2021-04-21 11:47:45 +00:00
Anuj Phogat
61e8636557
intel: Rename gen_device prefix to intel_device
...
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "gen_device" -rIl $SEARCH_PATH | xargs sed -ie "s/gen_device/intel_device/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241 >
2021-04-20 20:06:33 +00:00
Mike Blumenkrantz
387189a955
intel: avoid dumping null cs sampler/binding states
...
this crashes the driver
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10077 >
2021-04-07 14:24:08 +00:00
Anuj Phogat
1d296484b4
intel: Rename Genx keyword to Gfxx
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "Gen[[:digit:]]+" -rIl $SEARCH_PATH | xargs sed -ie "s/Gen\([[:digit:]]\+\)/Gfx\1/g"
Exclude changes in src/intel/perf/oa-*.xml:
find src/intel/perf -type f \( -name "*.xml" \) | xargs sed -ie "s/Gfx/Gen/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
b75f095bc7
intel: Rename genx keyword to gfxx in source files
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "gen[[:digit:]]+" -rIl $SEARCH_PATH | xargs sed -ie "s/gen\([[:digit:]]\+\)/gfx\1/g"
Exclude pack.h and xml changes in this patch:
grep -E "gfx[[:digit:]]+_pack\.h" -rIl $SEARCH_PATH | xargs sed -ie "s/gfx\([[:digit:]]\+_pack\.h\)/gen\1/g"
grep -E "gfx[[:digit:]]+\.xml" -rIl $SEARCH_PATH | xargs sed -ie "s/gfx\([[:digit:]]\+\.xml\)/gen\1/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Anuj Phogat
abe9a71a09
intel: Rename gen field in gen_device_info struct to ver
...
Commands used to do the changes:
export SEARCH_PATH="src/intel src/gallium/drivers/iris src/mesa/drivers/dri/i965"
grep -E "info\)*(.|->)gen" -rIl $SEARCH_PATH | xargs sed -ie "s/info\()*\)\(\.\|->\)gen/info\1\2ver/g"
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9936 >
2021-04-02 18:33:07 +00:00
Marcin Ślusarz
08f8677b29
intel/batch_decoder: assert on invalid sampler pointer
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9707 >
2021-03-22 08:36:55 +00:00
Marcin Ślusarz
56cd91bc7c
intel/batch_decoder: fix decoding of sampler states
...
There's only 1 sampler state behind
3DSTATE_SAMPLER_STATE_POINTERS[_VS|_HS|_DS|_GS|_PS] and
3DSTATE_SAMPLER_STATE_POINTERS.[PointertoVSSamplerState|PointertoPSSamplerState|PointertoGSSamplerState].
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9707 >
2021-03-22 08:36:55 +00:00
Marcin Ślusarz
cd0f9cdb6e
intel/batch_decoder: drop bogus check
...
state_addr == bo.addr, bo.size==0 is handled by another check
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9707 >
2021-03-22 08:36:55 +00:00
Marcin Ślusarz
bb8ee5f52d
intel/batch_decoder: catch invalid sampler state pointer
...
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9707 >
2021-03-22 08:36:55 +00:00
Jason Ekstrand
731ea06758
intel/tools: Handle BINDING_TABLE_POOL_ALLOC in batch decoding
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729 >
2021-03-20 12:46:50 -05:00
Jason Ekstrand
05e133a84a
intel/tools: Handle GT_MODE in the batch decoder
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729 >
2021-03-20 12:46:50 -05:00
Jason Ekstrand
b2421f7b44
intel/tools: Handle milti-LRI in the batch decoder
...
Context batches tend to have a lot of multi-LRI and, if we want to be
able to parse those registers nicely, we really handle it.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9729 >
2021-03-20 12:33:18 -05:00
Anuj Phogat
96e251bde7
intel: Rename "GEN_" prefix used in common code to "INTEL_"
...
This patch renames all macros with "GEN_" prefix defined in
common code.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9413 >
2021-03-10 22:23:51 +00:00
Anuj Phogat
65d7f52098
intel: Fix broken alignment due to gen_ prefix renaming
...
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9413 >
2021-03-10 22:23:51 +00:00
Anuj Phogat
692472a376
intel: Rename "gen_" prefix used in common code to "intel_"
...
This patch renames functions, structures, enums etc. with "gen_"
prefix defined in common code.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9413 >
2021-03-10 22:23:51 +00:00
Anuj Phogat
733b0ee8cb
intel: Rename files with gen_ prefix in common code to intel_
...
Changes in this patch include:
- Rename all files in src/intel/common path
- Update the filenames used in source and build files
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com >
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9413 >
2021-03-10 22:23:51 +00:00