Alyssa Rosenzweig
cd09a61887
asahi: Respect render target format swizzle
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
f690d1f7ab
asahi: Use pixel table in is_format_supported
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
8b1e273cb5
asahi: Scaffold format table
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
6bb7172622
asahi: Hide pixel formats behind an opaque type
...
Convenient for mapping a format table.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
022e482eaa
asahi: Add format enums
...
Split it up into the underlying parts. Now we can decode every format
accessible in Metal.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
eb5983b48e
asahi: Print unknown enum values
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
963f07cb6e
asahi: Align strides to 16 bytes
...
Apparently required for texturing.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
bfd5e52f16
asahi: Note that "render target" lacks an sRGB bit
...
sRGB is handled through other mechanisms.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
62ac4adecb
asahi: Handle linear display targets as well as tiled
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
e90d167d3d
asahi: Respect linear strides
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
118682dd83
asahi: Identify line stride in texture/RT XML
...
The off-by-four is concerning.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
bacff07018
asahi: Translate layouts for texture and RTs
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
9c0ef01c68
asahi: Add layout enum to XML
...
Used for textures and render targets. There are more values here, probably for
other tiling schemes and compression.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
46bc37a8d0
asahi: Use dt_stride for line_stride where needed
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
bf3c42fd11
asahi: Determine tiling vs linear for internal textures
...
Logic lifted from Panfrost.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
5c97d1c837
asahi: Implement wide lines
...
Identify line width field and route through the Gallium line width.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Alyssa Rosenzweig
f5f759cff8
asahi: Fix off-by-one in viewport scissoring
...
As discovered during the stream. Typo pointed out by someone in the Twitch chat.
Fixes: f285a1220e ("asahi: Implement scissors and scissor to viewport")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11086 >
2021-06-01 01:31:02 +00:00
Rob Clark
3dff0c30cf
freedreno/headergen2: Fix compile warnings with CP_DRAW_INDIRECT_MULTI
...
Using stripes to deal with the different packet layout variants resulted
in redefining "register" offsets with different values, so use "prefix"
to add a suffix to disambiguate.
drivers/gpu/drm/msm/adreno/adreno_pm4.xml.h:1066: warning: "REG_A6XX_CP_DRAW_INDIRECT_MULTI_INDIRECT" redefined
1066 | #define REG_A6XX_CP_DRAW_INDIRECT_MULTI_INDIRECT 0x00000006
|
drivers/gpu/drm/msm/adreno/adreno_pm4.xml.h:1057: note: this is the location of the previous definition
1057 | #define REG_A6XX_CP_DRAW_INDIRECT_MULTI_INDIRECT 0x00000003
|
(Admittedly it isn't really a "prefix" but that was the field in the
schema available to use, and REG_INDEXED_CP_DRAW_INDIRECT_MULTI_STRIDE
sounds somewhat more funny.)
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944 >
2021-05-31 23:34:43 +00:00
Rob Clark
ff5e17f1f8
freedreno/afuc: Use emulator to extract jmptbl
...
This runs through the SQE bootstrap code to extract the packet-table,
rather than relying on heuristics. As a bonus, it can detect the start
of the LPAC fw in a660+ fw so that we can properly decode the LPAC fw
and packet-table.
Note that this decodes the jmptable as normal instructions, which is a
change in behavior from the previous heuristic based jmptbl extraction.
Not sure if that is a good or bad thing.
For a5xx, for now the legacy heuristic based jmptable decoding is
preserved, at least until enough control regs are figured out.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944 >
2021-05-31 23:34:43 +00:00
Rob Clark
2beb5b015a
freedreno/ci: Add real packet-table loading for afuc test
...
When we start running the bootstrap code thru the emulator we will need
the packet-table loading to actually happen. So add this.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944 >
2021-05-31 23:34:43 +00:00
Rob Clark
df14af6480
freedreno/afuc: Add emulator support to run bootstrap
...
Run until the packet-table is populated, so the disassembler can use
this to know the offsets of various pm4 packet handlers without having
to rely on heuristics.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944 >
2021-05-31 23:34:43 +00:00
Rob Clark
ea2e244198
freedreno/afuc: Split out helpers to parse labels and packet-table
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944 >
2021-05-31 23:34:43 +00:00
Rob Clark
9a4ca194e8
freedreno/afuc: Extract full gpu-id
...
Some of the a6xx gens will require some control reg initialization, and
go into an infinite loop if they don't see the values they expect, so
we'll need to extract the compute gpu-id.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944 >
2021-05-31 23:34:43 +00:00
Rob Clark
c2f8c98d56
freedreno/registers: Add a few a6xx regs and notes
...
A few things I noticed while playing with the emulator.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944 >
2021-05-31 23:34:43 +00:00
Rob Clark
bba61cef38
freedreno/afuc: Add emulator mode to afuc-disasm
...
This is an (at least somewhat complete) logical emulator of the a6xx SQE
that lets us step through firmware execution (bootstrap, cmdstream pkt
handling, etc). It lets us poke at various fw visible state and run
through pm4 packet(s) to better understand what the fw is doing when it
handles various packets.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944 >
2021-05-31 23:34:43 +00:00
Rob Clark
745dad0446
freedreno/afuc: Add pipe reg name decoding
...
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944 >
2021-05-31 23:34:43 +00:00
Rob Clark
184f474574
freedreno/afuc: Clean up special regs
...
Allow for different mnemonics depending on whether they are used as
source or destination register, to better reflect what they do.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944 >
2021-05-31 23:34:43 +00:00
Rob Clark
2876253f28
freedreno/afuc: Split out utils
...
With disasm emulator mode, we'll start wanting some things that are
duplicationg what the assembler does, so just split out all the rnndb
bits into shared utils.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944 >
2021-05-31 23:34:43 +00:00
Rob Clark
d367d84d87
freedreno/afuc: Split out instruction decode helper
...
Split the giant switch/decode out into a helper function so that we can
re-use it for emulator mode.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944 >
2021-05-31 23:34:43 +00:00
Rob Clark
33b9445a68
freedreno: Move pkt parsing helpers to common
...
I'll be needing these in afuc as well.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944 >
2021-05-31 23:34:43 +00:00
Rob Clark
62c53d4361
freedreno/tu+drm: Extract out pm4 pkt header helpers
...
I'm going to need these in a 3rd place, so let's deduplicate first.
Signed-off-by: Rob Clark <robdclark@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944 >
2021-05-31 23:34:43 +00:00
Andres Gomez
d71584aec3
ci: replace glslangValidator with glslang-tools
...
Signed-off-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11096 >
2021-05-31 23:59:55 +03:00
Andres Gomez
5f102f7b02
ci: remove glslangValidator installation from the VK test container
...
We already include glslang-tools.
Signed-off-by: Andres Gomez <agomez@igalia.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11095 >
2021-05-31 19:45:08 +00:00
Mike Blumenkrantz
1199d86b2c
compiler/spirv: expand_to_vec4 -> nir_pad_vec4
...
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10821 >
2021-05-31 18:45:24 +00:00
Rhys Perry
0f8fef1261
radv: make attrib_end variable in radv_flush_vertex_descriptors 32-bit
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Fixes: 1e9dc0474e ("radv: make radv_pipeline::attrib_ends 32bit")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11089 >
2021-05-31 18:28:12 +00:00
Danylo Piliaiev
8d0c76b143
freedreno: reduce the upper bound of IB size by one
...
Going beyond 0x100000 results in hangs, however I found that the
last 0x100000 packet just doesn't get executed. Thus the real limit is
0x0FFFFF. At least this is true for a6xx.
This could be tested by appending nops to the cmdstream and placing
e.g. CP_INTERRUPT at the end, at any position other than being
0x100000 packet it results in a hang.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10786 >
2021-05-31 17:38:26 +00:00
Danylo Piliaiev
f38fd3c577
turnip: place a limit on the growth of BOs
...
There is a limit on IB size, which on freedreno is set to 0x100000.
Going beyond it results in hangs, however I found that the last
0x100000 packet just doesn't get executed. Thus the real limit is
0x0FFFFF.
This could be tested by appending nops to the cmdstream and placing
e.g. CP_INTERRUPT at the end, at any position other than being
0x100000 packet it results in a hang.
Fixes:
dEQP-VK.api.command_buffers.record_many_draws_secondary_2
dEQP-VK.api.command_buffers.record_many_draws_primary_2
However these tests could trigger hangcheck timeouts.
Also this fixes hangs when opening captures of games in RenderDoc.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10786 >
2021-05-31 17:38:26 +00:00
Georg Lehmann
9d66a2d986
v3dv: use VKAPI_ATTR and VKAPI_CALL.
...
Closes #4852
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com >
Tested-by: Roman Stratiienko <r.stratiienko@gmail.com >
Acked-by: Jason Ekstrand <jason@jlekstrand.net >
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11062 >
2021-05-31 17:08:27 +00:00
Neil Roberts
5a4384c2bc
kmsro: Fix confusing comma expression
...
It looks like this was a copy-and-paste mistake in 827e0d6654 where
the initialiser was moved from being a struct initialiser to a
standalone statement. Some of them were fixed with an unrelated change
in 187218395d but not all of them. This shouldn’t make any practical
difference to the compiled code.
Reviewed-by: Emil Velikov <emil.velikov@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11090 >
2021-05-31 14:58:12 +00:00
Mike Blumenkrantz
9ff54d408b
Revert "zink: call tc_driver_internal_flush_notify() on flush"
...
This reverts commit 4d62fca087 .
this is broken beyond space and time but only reveals its true nature
when used outside of a unit test
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11080 >
2021-05-31 14:47:46 +00:00
Mike Blumenkrantz
6dd02a5139
zink: stop using util_set_vertex_buffers_mask()
...
we're already iterating this, so there's no point in double iterating
also no point in doing the extra refcounting
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10997 >
2021-05-31 14:39:57 +00:00
Mike Blumenkrantz
f4bae3fe5e
zink: ref vertex buffers during set_vertex_buffers
...
now we don't need to do it during bind
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10997 >
2021-05-31 14:39:57 +00:00
Mike Blumenkrantz
962b162766
zink: update scissor only when necessary
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10997 >
2021-05-31 14:39:57 +00:00
Mike Blumenkrantz
dbc59aedb9
zink: only update viewport state when necessary
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10997 >
2021-05-31 14:39:57 +00:00
Mike Blumenkrantz
59b6f5db36
zink: only rebind vertex buffers when necessary
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10997 >
2021-05-31 14:39:57 +00:00
Mike Blumenkrantz
906371153c
zink: handle rebinds for vertex buffers
...
now that the tracking info is there, it's easy to make this happen
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10997 >
2021-05-31 14:39:57 +00:00
Mike Blumenkrantz
6d6ef97035
zink: only rebind pipelines when necessary
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10997 >
2021-05-31 14:39:57 +00:00
Mike Blumenkrantz
1a7045acaf
zink: mark some draw functions inline
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10997 >
2021-05-31 14:39:57 +00:00
Mike Blumenkrantz
c2973213d7
zink: remove barriers/refs from descriptor cache
...
these are applied on bind now so there's no need to track them
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10997 >
2021-05-31 14:39:57 +00:00
Mike Blumenkrantz
62ad23239c
zink: reapply program refs automatically
...
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10997 >
2021-05-31 14:39:57 +00:00